@obsfx/trekker-dashboard 1.11.0 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var px=e=>{throw TypeError(e)};var _h=(e,t,n)=>t.has(e)||px("Cannot "+n);var V=(e,t,n)=>(_h(e,t,"read from private field"),n?n.call(e):t.get(e)),De=(e,t,n)=>t.has(e)?px("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ee=(e,t,n,r)=>(_h(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ze=(e,t,n)=>(_h(e,t,"access private method"),n);var Gu=(e,t,n,r)=>({set _(o){Ee(e,t,o,n)},get _(){return V(e,t,r)}});function MT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();var Xu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Th={exports:{}},Ga={},Ph={exports:{}},Qe={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var mx=e=>{throw TypeError(e)};var _h=(e,t,n)=>t.has(e)||mx("Cannot "+n);var V=(
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var mx;function LT(){if(mx)return Qe;mx=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=p&&L[p]||L["@@iterator"],typeof L=="function"?L:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,k={};function S(L,K,I){this.props=L,this.context=K,this.refs=k,this.updater=I||g}S.prototype.isReactComponent={},S.prototype.setState=function(L,K){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,K,"setState")},S.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function E(){}E.prototype=S.prototype;function _(L,K,I){this.props=L,this.context=K,this.refs=k,this.updater=I||g}var P=_.prototype=new E;P.constructor=_,C(P,S.prototype),P.isPureReactComponent=!0;var R=Array.isArray,A=Object.prototype.hasOwnProperty,j={current:null},F={key:!0,ref:!0,__self:!0,__source:!0};function Z(L,K,I){var ue,ve={},xe=null,ie=null;if(K!=null)for(ue in K.ref!==void 0&&(ie=K.ref),K.key!==void 0&&(xe=""+K.key),K)A.call(K,ue)&&!F.hasOwnProperty(ue)&&(ve[ue]=K[ue]);var me=arguments.length-2;if(me===1)ve.children=I;else if(1<me){for(var Se=Array(me),be=0;be<me;be++)Se[be]=arguments[be+2];ve.children=Se}if(L&&L.defaultProps)for(ue in me=L.defaultProps,me)ve[ue]===void 0&&(ve[ue]=me[ue]);return{$$typeof:e,type:L,key:xe,ref:ie,props:ve,_owner:j.current}}function re(L,K){return{$$typeof:e,type:L.type,key:K,ref:L.ref,props:L.props,_owner:L._owner}}function O(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function Y(L){var K={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(I){return K[I]})}var M=/\/+/g;function ne(L,K){return typeof L=="object"&&L!==null&&L.key!=null?Y(""+L.key):K.toString(36)}function W(L,K,I,ue,ve){var xe=typeof L;(xe==="undefined"||xe==="boolean")&&(L=null);var ie=!1;if(L===null)ie=!0;else switch(xe){case"string":case"number":ie=!0;break;case"object":switch(L.$$typeof){case e:case t:ie=!0}}if(ie)return ie=L,ve=ve(ie),L=ue===""?"."+ne(ie,0):ue,R(ve)?(I="",L!=null&&(I=L.replace(M,"$&/")+"/"),W(ve,K,I,"",function(be){return be})):ve!=null&&(O(ve)&&(ve=re(ve,I+(!ve.key||ie&&ie.key===ve.key?"":(""+ve.key).replace(M,"$&/")+"/")+L)),K.push(ve)),1;if(ie=0,ue=ue===""?".":ue+":",R(L))for(var me=0;me<L.length;me++){xe=L[me];var Se=ue+ne(xe,me);ie+=W(xe,K,I,Se,ve)}else if(Se=x(L),typeof Se=="function")for(L=Se.call(L),me=0;!(xe=L.next()).done;)xe=xe.value,Se=ue+ne(xe,me++),ie+=W(xe,K,I,Se,ve);else if(xe==="object")throw K=String(L),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return ie}function U(L,K,I){if(L==null)return L;var ue=[],ve=0;return W(L,ue,"","",function(xe){return K.call(I,xe,ve++)}),ue}function Q(L){if(L._status===-1){var K=L._result;K=K(),K.then(function(I){(L._status===0||L._status===-1)&&(L._status=1,L._result=I)},function(I){(L._status===0||L._status===-1)&&(L._status=2,L._result=I)}),L._status===-1&&(L._status=0,L._result=K)}if(L._status===1)return L._result.default;throw L._result}var J={current:null},D={transition:null},G={ReactCurrentDispatcher:J,ReactCurrentBatchConfig:D,ReactCurrentOwner:j};function N(){throw Error("act(...) is not supported in production builds of React.")}return Qe.Children={map:U,forEach:function(L,K,I){U(L,function(){K.apply(this,arguments)},I)},count:function(L){var K=0;return U(L,function(){K++}),K},toArray:function(L){return U(L,function(K){return K})||[]},only:function(L){if(!O(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Qe.Component=S,Qe.Fragment=n,Qe.Profiler=o,Qe.PureComponent=_,Qe.StrictMode=r,Qe.Suspense=d,Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,Qe.act=N,Qe.cloneElement=function(L,K,I){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var ue=C({},L.props),ve=L.key,xe=L.ref,ie=L._owner;if(K!=null){if(K.ref!==void 0&&(xe=K.ref,ie=j.current),K.key!==void 0&&(ve=""+K.key),L.type&&L.type.defaultProps)var me=L.type.defaultProps;for(Se in K)A.call(K,Se)&&!F.hasOwnProperty(Se)&&(ue[Se]=K[Se]===void 0&&me!==void 0?me[Se]:K[Se])}var Se=arguments.length-2;if(Se===1)ue.children=I;else if(1<Se){me=Array(Se);for(var be=0;be<Se;be++)me[be]=arguments[be+2];ue.children=me}return{$$typeof:e,type:L.type,key:ve,ref:xe,props:ue,_owner:ie}},Qe.createContext=function(L){return L={$$typeof:l,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_context:L},L.Consumer=L},Qe.createElement=Z,Qe.createFactory=function(L){var K=Z.bind(null,L);return K.type=L,K},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(L){return{$$typeof:u,render:L}},Qe.isValidElement=O,Qe.lazy=function(L){return{$$typeof:h,_payload:{_status:-1,_result:L},_init:Q}},Qe.memo=function(L,K){return{$$typeof:f,type:L,compare:K===void 0?null:K}},Qe.startTransition=function(L){var K=D.transition;D.transition={};try{L()}finally{D.transition=K}},Qe.unstable_act=N,Qe.useCallback=function(L,K){return J.current.useCallback(L,K)},Qe.useContext=function(L){return J.current.useContext(L)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(L){return J.current.useDeferredValue(L)},Qe.useEffect=function(L,K){return J.current.useEffect(L,K)},Qe.useId=function(){return J.current.useId()},Qe.useImperativeHandle=function(L,K,I){return J.current.useImperativeHandle(L,K,I)},Qe.useInsertionEffect=function(L,K){return J.current.useInsertionEffect(L,K)},Qe.useLayoutEffect=function(L,K){return J.current.useLayoutEffect(L,K)},Qe.useMemo=function(L,K){return J.current.useMemo(L,K)},Qe.useReducer=function(L,K,I){return J.current.useReducer(L,K,I)},Qe.useRef=function(L){return J.current.useRef(L)},Qe.useState=function(L){return J.current.useState(L)},Qe.useSyncExternalStore=function(L,K,I){return J.current.useSyncExternalStore(L,K,I)},Qe.useTransition=function(){return J.current.useTransition()},Qe.version="18.3.1",Qe}var gx;function fm(){return gx||(gx=1,Ph.exports=LT()),Ph.exports}/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var mx=e=>{throw TypeError(e)};var _h=(e,t,n)=>t.has(e)||mx("Cannot "+n);var V=(
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var yx;function FT(){if(yx)return Ga;yx=1;var e=fm(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(u,d,f){var h,p={},x=null,g=null;f!==void 0&&(x=""+f),d.key!==void 0&&(x=""+d.key),d.ref!==void 0&&(g=d.ref);for(h in d)r.call(d,h)&&!a.hasOwnProperty(h)&&(p[h]=d[h]);if(u&&u.defaultProps)for(h in d=u.defaultProps,d)p[h]===void 0&&(p[h]=d[h]);return{$$typeof:t,type:u,key:x,ref:g,props:p,_owner:o.current}}return Ga.Fragment=n,Ga.jsx=l,Ga.jsxs=l,Ga}var vx;function $T(){return vx||(vx=1,Th.exports=FT()),Th.exports}var y=$T(),b=fm();const le=Jo(b),hm=MT({__proto__:null,default:le},[b]);var Ju={},Nh={exports:{}},zn={},jh={exports:{}},Rh={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.min.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var mx=e=>{throw TypeError(e)};var _h=(e,t,n)=>t.has(e)||mx("Cannot "+n);var V=(
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var
|
|
25
|
+
*/var xx;function VT(){return xx||(xx=1,(function(e){function t(D,G){var N=D.length;D.push(G);e:for(;0<N;){var L=N-1>>>1,K=D[L];if(0<o(K,G))D[L]=G,D[N]=K,N=L;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var G=D[0],N=D.pop();if(N!==G){D[0]=N;e:for(var L=0,K=D.length,I=K>>>1;L<I;){var ue=2*(L+1)-1,ve=D[ue],xe=ue+1,ie=D[xe];if(0>o(ve,N))xe<K&&0>o(ie,ve)?(D[L]=ie,D[xe]=N,L=xe):(D[L]=ve,D[ue]=N,L=ue);else if(xe<K&&0>o(ie,N))D[L]=ie,D[xe]=N,L=xe;else break e}}return G}function o(D,G){var N=D.sortIndex-G.sortIndex;return N!==0?N:D.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],h=1,p=null,x=3,g=!1,C=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(D){for(var G=n(f);G!==null;){if(G.callback===null)r(f);else if(G.startTime<=D)r(f),G.sortIndex=G.expirationTime,t(d,G);else break;G=n(f)}}function R(D){if(k=!1,P(D),!C)if(n(d)!==null)C=!0,Q(A);else{var G=n(f);G!==null&&J(R,G.startTime-D)}}function A(D,G){C=!1,k&&(k=!1,E(Z),Z=-1),g=!0;var N=x;try{for(P(G),p=n(d);p!==null&&(!(p.expirationTime>G)||D&&!Y());){var L=p.callback;if(typeof L=="function"){p.callback=null,x=p.priorityLevel;var K=L(p.expirationTime<=G);G=e.unstable_now(),typeof K=="function"?p.callback=K:p===n(d)&&r(d),P(G)}else r(d);p=n(d)}if(p!==null)var I=!0;else{var ue=n(f);ue!==null&&J(R,ue.startTime-G),I=!1}return I}finally{p=null,x=N,g=!1}}var j=!1,F=null,Z=-1,re=5,O=-1;function Y(){return!(e.unstable_now()-O<re)}function M(){if(F!==null){var D=e.unstable_now();O=D;var G=!0;try{G=F(!0,D)}finally{G?ne():(j=!1,F=null)}}else j=!1}var ne;if(typeof _=="function")ne=function(){_(M)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,U=W.port2;W.port1.onmessage=M,ne=function(){U.postMessage(null)}}else ne=function(){S(M,0)};function Q(D){F=D,j||(j=!0,ne())}function J(D,G){Z=S(function(){D(e.unstable_now())},G)}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(D){D.callback=null},e.unstable_continueExecution=function(){C||g||(C=!0,Q(A))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(D){switch(x){case 1:case 2:case 3:var G=3;break;default:G=x}var N=x;x=G;try{return D()}finally{x=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,G){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var N=x;x=D;try{return G()}finally{x=N}},e.unstable_scheduleCallback=function(D,G,N){var L=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?L+N:L):N=L,D){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=N+K,D={id:h++,callback:G,priorityLevel:D,startTime:N,expirationTime:K,sortIndex:-1},N>L?(D.sortIndex=N,t(f,D),n(d)===null&&D===n(f)&&(k?(E(Z),Z=-1):k=!0,J(R,N-L))):(D.sortIndex=K,t(d,D),C||g||(C=!0,Q(A))),D},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(D){var G=x;return function(){var N=x;x=G;try{return D.apply(this,arguments)}finally{x=N}}}})(Rh)),Rh}var wx;function BT(){return wx||(wx=1,jh.exports=VT()),jh.exports}/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -30,14 +30,14 @@ var mx=e=>{throw TypeError(e)};var _h=(e,t,n)=>t.has(e)||mx("Cannot "+n);var V=(
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
33
|
+
*/var bx;function UT(){if(bx)return zn;bx=1;var e=fm(),t=BT();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){l(i,s),l(i+"Capture",s)}function l(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[: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]*$/,h={},p={};function x(i){return d.call(p,i)?!0:d.call(h,i)?!1:f.test(i)?p[i]=!0:(h[i]=!0,!1)}function g(i,s,c,m){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return m?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function C(i,s,c,m){if(s===null||typeof s>"u"||g(i,s,c,m))return!0;if(m)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,c,m,v,w,T){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=m,this.attributeNamespace=v,this.mustUseProperty=c,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=T}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];S[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new k(i,2,!1,i,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(i){S[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function _(i){return i[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(i){var s=i.replace(E,_);S[s]=new k(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(E,_);S[s]=new k(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(E,_);S[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function P(i,s,c,m){var v=S.hasOwnProperty(s)?S[s]:null;(v!==null?v.type!==0:m||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(C(s,c,v,m)&&(c=null),m||v===null?x(s)&&(c===null?i.removeAttribute(s):i.setAttribute(s,""+c)):v.mustUseProperty?i[v.propertyName]=c===null?v.type===3?!1:"":c:(s=v.attributeName,m=v.attributeNamespace,c===null?i.removeAttribute(s):(v=v.type,c=v===3||v===4&&c===!0?"":""+c,m?i.setAttributeNS(m,s,c):i.setAttribute(s,c))))}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),j=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),Y=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),J=Symbol.for("react.offscreen"),D=Symbol.iterator;function G(i){return i===null||typeof i!="object"?null:(i=D&&i[D]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,L;function K(i){if(L===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);L=s&&s[1]||""}return`
|
|
34
34
|
`+L+i}var I=!1;function ue(i,s){if(!i||I)return"";I=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(oe){var m=oe}Reflect.construct(i,[],s)}else{try{s.call()}catch(oe){m=oe}i.call(s.prototype)}else{try{throw Error()}catch(oe){m=oe}i()}}catch(oe){if(oe&&m&&typeof oe.stack=="string"){for(var v=oe.stack.split(`
|
|
35
35
|
`),w=m.stack.split(`
|
|
36
36
|
`),T=v.length-1,z=w.length-1;1<=T&&0<=z&&v[T]!==w[z];)z--;for(;1<=T&&0<=z;T--,z--)if(v[T]!==w[z]){if(T!==1||z!==1)do if(T--,z--,0>z||v[T]!==w[z]){var H=`
|
|
37
|
-
`+v[T].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=T&&0<=z);break}}}finally{I=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?K(i):""}function ve(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=ue(i.type,!1),i;case 11:return i=ue(i.type.render,!1),i;case 1:return i=ue(i.type,!0),i;default:return""}}function xe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case F:return"Fragment";case j:return"Portal";case re:return"Profiler";case Z:return"StrictMode";case ne:return"Suspense";case W:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Y:return(i.displayName||"Context")+".Consumer";case O:return(i._context.displayName||"Context")+".Provider";case M:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case U:return s=i.displayName||null,s!==null?s:xe(i.type)||"Memo";case Q:s=i._payload,i=i._init;try{return xe(i(s))}catch{}}return null}function ie(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(s);case 8:return s===Z?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function me(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Se(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function be(i){var s=Se(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),m=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var v=c.get,w=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return v.call(this)},set:function(T){m=""+T,w.call(this,T)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return m},setValue:function(T){m=""+T},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Ae(i){i._valueTracker||(i._valueTracker=be(i))}function Ve(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),m="";return i&&(m=Se(i)?i.checked?"true":"false":i.value),i=m,i!==c?(s.setValue(i),!0):!1}function nt(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function It(i,s){var c=s.checked;return N({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??i._wrapperState.initialChecked})}function sn(i,s){var c=s.defaultValue==null?"":s.defaultValue,m=s.checked!=null?s.checked:s.defaultChecked;c=me(s.value!=null?s.value:c),i._wrapperState={initialChecked:m,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Gt(i,s){s=s.checked,s!=null&&P(i,"checked",s,!1)}function an(i,s){Gt(i,s);var c=me(s.value),m=s.type;if(c!=null)m==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?_n(i,s.type,c):s.hasOwnProperty("defaultValue")&&_n(i,s.type,me(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function tr(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var m=s.type;if(!(m!=="submit"&&m!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function _n(i,s,c){(s!=="number"||nt(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Tn=Array.isArray;function $(i,s,c,m){if(i=i.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<i.length;c++)v=s.hasOwnProperty("$"+i[c].value),i[c].selected!==v&&(i[c].selected=v),v&&m&&(i[c].defaultSelected=!0)}else{for(c=""+me(c),s=null,v=0;v<i.length;v++){if(i[v].value===c){i[v].selected=!0,m&&(i[v].defaultSelected=!0);return}s!==null||i[v].disabled||(s=i[v])}s!==null&&(s.selected=!0)}}function ee(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function ae(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(Tn(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:me(c)}}function ke(i,s){var c=me(s.value),m=me(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),m!=null&&(i.defaultValue=""+m)}function ye(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function B(i){switch(i){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 se(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?B(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var we,_e=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,m,v){MSApp.execUnsafeLocalFunction(function(){return i(s,c,m,v)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(we=we||document.createElement("div"),we.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=we.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function ze(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var dt={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},Nt=["Webkit","ms","Moz","O"];Object.keys(dt).forEach(function(i){Nt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),dt[s]=dt[i]})});function Zt(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||dt.hasOwnProperty(i)&&dt[i]?(""+s).trim():s+"px"}function $t(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var m=c.indexOf("--")===0,v=Zt(c,s[c],m);c==="float"&&(c="cssFloat"),m?i.setProperty(c,v):i[c]=v}}var Pn=N({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 pt(i,s){if(s){if(Pn[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function pn(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xt=null;function oi(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var rs=null,Pi=null,Fr=null;function vr(i){if(i=za(i)){if(typeof rs!="function")throw Error(n(280));var s=i.stateNode;s&&(s=fu(s),rs(i.stateNode,i.type,s))}}function Ul(i){Pi?Fr?Fr.push(i):Fr=[i]:Pi=i}function He(){if(Pi){var i=Pi,s=Fr;if(Fr=Pi=null,vr(i),s)for(i=0;i<s.length;i++)vr(s[i])}}function rt(i,s){return i(s)}function ft(){}var mn=!1;function Nn(i,s,c){if(mn)return i(s,c);mn=!0;try{return rt(i,s,c)}finally{mn=!1,(Pi!==null||Fr!==null)&&(ft(),He())}}function jn(i,s){var c=i.stateNode;if(c===null)return null;var m=fu(c);if(m===null)return null;c=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var xr=!1;if(u)try{var Jt={};Object.defineProperty(Jt,"passive",{get:function(){xr=!0}}),window.addEventListener("test",Jt,Jt),window.removeEventListener("test",Jt,Jt)}catch{xr=!1}function $r(i,s,c,m,v,w,T,z,H){var oe=Array.prototype.slice.call(arguments,3);try{s.apply(c,oe)}catch(fe){this.onError(fe)}}var ya=!1,Hl=null,Wl=!1,Hd=null,WE={onError:function(i){ya=!0,Hl=i}};function ZE(i,s,c,m,v,w,T,z,H){ya=!1,Hl=null,$r.apply(WE,arguments)}function qE(i,s,c,m,v,w,T,z,H){if(ZE.apply(this,arguments),ya){if(ya){var oe=Hl;ya=!1,Hl=null}else throw Error(n(198));Wl||(Wl=!0,Hd=oe)}}function yo(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function Lg(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function Fg(i){if(yo(i)!==i)throw Error(n(188))}function QE(i){var s=i.alternate;if(!s){if(s=yo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,m=s;;){var v=c.return;if(v===null)break;var w=v.alternate;if(w===null){if(m=v.return,m!==null){c=m;continue}break}if(v.child===w.child){for(w=v.child;w;){if(w===c)return Fg(v),i;if(w===m)return Fg(v),s;w=w.sibling}throw Error(n(188))}if(c.return!==m.return)c=v,m=w;else{for(var T=!1,z=v.child;z;){if(z===c){T=!0,c=v,m=w;break}if(z===m){T=!0,m=v,c=w;break}z=z.sibling}if(!T){for(z=w.child;z;){if(z===c){T=!0,c=w,m=v;break}if(z===m){T=!0,m=w,c=v;break}z=z.sibling}if(!T)throw Error(n(189))}}if(c.alternate!==m)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function $g(i){return i=QE(i),i!==null?Vg(i):null}function Vg(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Vg(i);if(s!==null)return s;i=i.sibling}return null}var Bg=t.unstable_scheduleCallback,Ug=t.unstable_cancelCallback,YE=t.unstable_shouldYield,KE=t.unstable_requestPaint,jt=t.unstable_now,GE=t.unstable_getCurrentPriorityLevel,Wd=t.unstable_ImmediatePriority,Hg=t.unstable_UserBlockingPriority,Zl=t.unstable_NormalPriority,XE=t.unstable_LowPriority,Wg=t.unstable_IdlePriority,ql=null,Vr=null;function JE(i){if(Vr&&typeof Vr.onCommitFiberRoot=="function")try{Vr.onCommitFiberRoot(ql,i,void 0,(i.current.flags&128)===128)}catch{}}var wr=Math.clz32?Math.clz32:n_,e_=Math.log,t_=Math.LN2;function n_(i){return i>>>=0,i===0?32:31-(e_(i)/t_|0)|0}var Ql=64,Yl=4194304;function va(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Kl(i,s){var c=i.pendingLanes;if(c===0)return 0;var m=0,v=i.suspendedLanes,w=i.pingedLanes,T=c&268435455;if(T!==0){var z=T&~v;z!==0?m=va(z):(w&=T,w!==0&&(m=va(w)))}else T=c&~v,T!==0?m=va(T):w!==0&&(m=va(w));if(m===0)return 0;if(s!==0&&s!==m&&(s&v)===0&&(v=m&-m,w=s&-s,v>=w||v===16&&(w&4194240)!==0))return s;if((m&4)!==0&&(m|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=m;0<s;)c=31-wr(s),v=1<<c,m|=i[c],s&=~v;return m}function r_(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 i_(i,s){for(var c=i.suspendedLanes,m=i.pingedLanes,v=i.expirationTimes,w=i.pendingLanes;0<w;){var T=31-wr(w),z=1<<T,H=v[T];H===-1?((z&c)===0||(z&m)!==0)&&(v[T]=r_(z,s)):H<=s&&(i.expiredLanes|=z),w&=~z}}function Zd(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Zg(){var i=Ql;return Ql<<=1,(Ql&4194240)===0&&(Ql=64),i}function qd(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function xa(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-wr(s),i[s]=c}function o_(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0<c;){var v=31-wr(c),w=1<<v;s[v]=0,m[v]=-1,i[v]=-1,c&=~w}}function Qd(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var m=31-wr(c),v=1<<m;v&s|i[m]&s&&(i[m]|=s),c&=~v}}var at=0;function qg(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Qg,Yd,Yg,Kg,Gg,Kd=!1,Gl=[],Ni=null,ji=null,Ri=null,wa=new Map,ba=new Map,Ii=[],s_="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 Xg(i,s){switch(i){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":ji=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":wa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ba.delete(s.pointerId)}}function ka(i,s,c,m,v,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:c,eventSystemFlags:m,nativeEvent:w,targetContainers:[v]},s!==null&&(s=za(s),s!==null&&Yd(s)),i):(i.eventSystemFlags|=m,s=i.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),i)}function a_(i,s,c,m,v){switch(s){case"focusin":return Ni=ka(Ni,i,s,c,m,v),!0;case"dragenter":return ji=ka(ji,i,s,c,m,v),!0;case"mouseover":return Ri=ka(Ri,i,s,c,m,v),!0;case"pointerover":var w=v.pointerId;return wa.set(w,ka(wa.get(w)||null,i,s,c,m,v)),!0;case"gotpointercapture":return w=v.pointerId,ba.set(w,ka(ba.get(w)||null,i,s,c,m,v)),!0}return!1}function Jg(i){var s=vo(i.target);if(s!==null){var c=yo(s);if(c!==null){if(s=c.tag,s===13){if(s=Lg(c),s!==null){i.blockedOn=s,Gg(i.priority,function(){Yg(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Xl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=Xd(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var m=new c.constructor(c.type,c);Xt=m,c.target.dispatchEvent(m),Xt=null}else return s=za(c),s!==null&&Yd(s),i.blockedOn=c,!1;s.shift()}return!0}function ey(i,s,c){Xl(i)&&c.delete(s)}function l_(){Kd=!1,Ni!==null&&Xl(Ni)&&(Ni=null),ji!==null&&Xl(ji)&&(ji=null),Ri!==null&&Xl(Ri)&&(Ri=null),wa.forEach(ey),ba.forEach(ey)}function Sa(i,s){i.blockedOn===s&&(i.blockedOn=null,Kd||(Kd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,l_)))}function Ca(i){function s(v){return Sa(v,i)}if(0<Gl.length){Sa(Gl[0],i);for(var c=1;c<Gl.length;c++){var m=Gl[c];m.blockedOn===i&&(m.blockedOn=null)}}for(Ni!==null&&Sa(Ni,i),ji!==null&&Sa(ji,i),Ri!==null&&Sa(Ri,i),wa.forEach(s),ba.forEach(s),c=0;c<Ii.length;c++)m=Ii[c],m.blockedOn===i&&(m.blockedOn=null);for(;0<Ii.length&&(c=Ii[0],c.blockedOn===null);)Jg(c),c.blockedOn===null&&Ii.shift()}var is=R.ReactCurrentBatchConfig,Jl=!0;function u_(i,s,c,m){var v=at,w=is.transition;is.transition=null;try{at=1,Gd(i,s,c,m)}finally{at=v,is.transition=w}}function c_(i,s,c,m){var v=at,w=is.transition;is.transition=null;try{at=4,Gd(i,s,c,m)}finally{at=v,is.transition=w}}function Gd(i,s,c,m){if(Jl){var v=Xd(i,s,c,m);if(v===null)gf(i,s,m,eu,c),Xg(i,m);else if(a_(v,i,s,c,m))m.stopPropagation();else if(Xg(i,m),s&4&&-1<s_.indexOf(i)){for(;v!==null;){var w=za(v);if(w!==null&&Qg(w),w=Xd(i,s,c,m),w===null&&gf(i,s,m,eu,c),w===v)break;v=w}v!==null&&m.stopPropagation()}else gf(i,s,m,null,c)}}var eu=null;function Xd(i,s,c,m){if(eu=null,i=oi(m),i=vo(i),i!==null)if(s=yo(i),s===null)i=null;else if(c=s.tag,c===13){if(i=Lg(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return eu=i,null}function ty(i){switch(i){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(GE()){case Wd:return 1;case Hg:return 4;case Zl:case XE:return 16;case Wg:return 536870912;default:return 16}default:return 16}}var Ai=null,Jd=null,tu=null;function ny(){if(tu)return tu;var i,s=Jd,c=s.length,m,v="value"in Ai?Ai.value:Ai.textContent,w=v.length;for(i=0;i<c&&s[i]===v[i];i++);var T=c-i;for(m=1;m<=T&&s[c-m]===v[w-m];m++);return tu=v.slice(i,1<m?1-m:void 0)}function nu(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function ru(){return!0}function ry(){return!1}function Wn(i){function s(c,m,v,w,T){this._reactName=c,this._targetInst=v,this.type=m,this.nativeEvent=w,this.target=T,this.currentTarget=null;for(var z in i)i.hasOwnProperty(z)&&(c=i[z],this[z]=c?c(w):w[z]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?ru:ry,this.isPropagationStopped=ry,this}return N(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=ru)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=ru)},persist:function(){},isPersistent:ru}),s}var os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ef=Wn(os),Ea=N({},os,{view:0,detail:0}),d_=Wn(Ea),tf,nf,_a,iu=N({},Ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:of,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==_a&&(_a&&i.type==="mousemove"?(tf=i.screenX-_a.screenX,nf=i.screenY-_a.screenY):nf=tf=0,_a=i),tf)},movementY:function(i){return"movementY"in i?i.movementY:nf}}),iy=Wn(iu),f_=N({},iu,{dataTransfer:0}),h_=Wn(f_),p_=N({},Ea,{relatedTarget:0}),rf=Wn(p_),m_=N({},os,{animationName:0,elapsedTime:0,pseudoElement:0}),g_=Wn(m_),y_=N({},os,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),v_=Wn(y_),x_=N({},os,{data:0}),oy=Wn(x_),w_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},b_={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"},k_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function S_(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=k_[i])?!!s[i]:!1}function of(){return S_}var C_=N({},Ea,{key:function(i){if(i.key){var s=w_[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=nu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?b_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:of,charCode:function(i){return i.type==="keypress"?nu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?nu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),E_=Wn(C_),__=N({},iu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sy=Wn(__),T_=N({},Ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:of}),P_=Wn(T_),N_=N({},os,{propertyName:0,elapsedTime:0,pseudoElement:0}),j_=Wn(N_),R_=N({},iu,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),I_=Wn(R_),A_=[9,13,27,32],sf=u&&"CompositionEvent"in window,Ta=null;u&&"documentMode"in document&&(Ta=document.documentMode);var O_=u&&"TextEvent"in window&&!Ta,ay=u&&(!sf||Ta&&8<Ta&&11>=Ta),ly=" ",uy=!1;function cy(i,s){switch(i){case"keyup":return A_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dy(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ss=!1;function D_(i,s){switch(i){case"compositionend":return dy(s);case"keypress":return s.which!==32?null:(uy=!0,ly);case"textInput":return i=s.data,i===ly&&uy?null:i;default:return null}}function z_(i,s){if(ss)return i==="compositionend"||!sf&&cy(i,s)?(i=ny(),tu=Jd=Ai=null,ss=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return ay&&s.locale!=="ko"?null:s.data;default:return null}}var M_={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 fy(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!M_[i.type]:s==="textarea"}function hy(i,s,c,m){Ul(m),s=uu(s,"onChange"),0<s.length&&(c=new ef("onChange","change",null,c,m),i.push({event:c,listeners:s}))}var Pa=null,Na=null;function L_(i){Ry(i,0)}function ou(i){var s=ds(i);if(Ve(s))return i}function F_(i,s){if(i==="change")return s}var py=!1;if(u){var af;if(u){var lf="oninput"in document;if(!lf){var my=document.createElement("div");my.setAttribute("oninput","return;"),lf=typeof my.oninput=="function"}af=lf}else af=!1;py=af&&(!document.documentMode||9<document.documentMode)}function gy(){Pa&&(Pa.detachEvent("onpropertychange",yy),Na=Pa=null)}function yy(i){if(i.propertyName==="value"&&ou(Na)){var s=[];hy(s,Na,i,oi(i)),Nn(L_,s)}}function $_(i,s,c){i==="focusin"?(gy(),Pa=s,Na=c,Pa.attachEvent("onpropertychange",yy)):i==="focusout"&&gy()}function V_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return ou(Na)}function B_(i,s){if(i==="click")return ou(s)}function U_(i,s){if(i==="input"||i==="change")return ou(s)}function H_(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var br=typeof Object.is=="function"?Object.is:H_;function ja(i,s){if(br(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),m=Object.keys(s);if(c.length!==m.length)return!1;for(m=0;m<c.length;m++){var v=c[m];if(!d.call(s,v)||!br(i[v],s[v]))return!1}return!0}function vy(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function xy(i,s){var c=vy(i);i=0;for(var m;c;){if(c.nodeType===3){if(m=i+c.textContent.length,i<=s&&m>=s)return{node:c,offset:s-i};i=m}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=vy(c)}}function wy(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?wy(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function by(){for(var i=window,s=nt();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=nt(i.document)}return s}function uf(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function W_(i){var s=by(),c=i.focusedElem,m=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&wy(c.ownerDocument.documentElement,c)){if(m!==null&&uf(c)){if(s=m.start,i=m.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var v=c.textContent.length,w=Math.min(m.start,v);m=m.end===void 0?w:Math.min(m.end,v),!i.extend&&w>m&&(v=m,m=w,w=v),v=xy(c,w);var T=xy(c,m);v&&T&&(i.rangeCount!==1||i.anchorNode!==v.node||i.anchorOffset!==v.offset||i.focusNode!==T.node||i.focusOffset!==T.offset)&&(s=s.createRange(),s.setStart(v.node,v.offset),i.removeAllRanges(),w>m?(i.addRange(s),i.extend(T.node,T.offset)):(s.setEnd(T.node,T.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var Z_=u&&"documentMode"in document&&11>=document.documentMode,as=null,cf=null,Ra=null,df=!1;function ky(i,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;df||as==null||as!==nt(m)||(m=as,"selectionStart"in m&&uf(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Ra&&ja(Ra,m)||(Ra=m,m=uu(cf,"onSelect"),0<m.length&&(s=new ef("onSelect","select",null,s,c),i.push({event:s,listeners:m}),s.target=as)))}function su(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var ls={animationend:su("Animation","AnimationEnd"),animationiteration:su("Animation","AnimationIteration"),animationstart:su("Animation","AnimationStart"),transitionend:su("Transition","TransitionEnd")},ff={},Sy={};u&&(Sy=document.createElement("div").style,"AnimationEvent"in window||(delete ls.animationend.animation,delete ls.animationiteration.animation,delete ls.animationstart.animation),"TransitionEvent"in window||delete ls.transitionend.transition);function au(i){if(ff[i])return ff[i];if(!ls[i])return i;var s=ls[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in Sy)return ff[i]=s[c];return i}var Cy=au("animationend"),Ey=au("animationiteration"),_y=au("animationstart"),Ty=au("transitionend"),Py=new Map,Ny="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 Oi(i,s){Py.set(i,s),a(s,[i])}for(var hf=0;hf<Ny.length;hf++){var pf=Ny[hf],q_=pf.toLowerCase(),Q_=pf[0].toUpperCase()+pf.slice(1);Oi(q_,"on"+Q_)}Oi(Cy,"onAnimationEnd"),Oi(Ey,"onAnimationIteration"),Oi(_y,"onAnimationStart"),Oi("dblclick","onDoubleClick"),Oi("focusin","onFocus"),Oi("focusout","onBlur"),Oi(Ty,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ia="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(" "),Y_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ia));function jy(i,s,c){var m=i.type||"unknown-event";i.currentTarget=c,qE(m,s,void 0,i),i.currentTarget=null}function Ry(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var m=i[c],v=m.event;m=m.listeners;e:{var w=void 0;if(s)for(var T=m.length-1;0<=T;T--){var z=m[T],H=z.instance,oe=z.currentTarget;if(z=z.listener,H!==w&&v.isPropagationStopped())break e;jy(v,z,oe),w=H}else for(T=0;T<m.length;T++){if(z=m[T],H=z.instance,oe=z.currentTarget,z=z.listener,H!==w&&v.isPropagationStopped())break e;jy(v,z,oe),w=H}}}if(Wl)throw i=Hd,Wl=!1,Hd=null,i}function yt(i,s){var c=s[kf];c===void 0&&(c=s[kf]=new Set);var m=i+"__bubble";c.has(m)||(Iy(s,i,2,!1),c.add(m))}function mf(i,s,c){var m=0;s&&(m|=4),Iy(c,i,m,s)}var lu="_reactListening"+Math.random().toString(36).slice(2);function Aa(i){if(!i[lu]){i[lu]=!0,r.forEach(function(c){c!=="selectionchange"&&(Y_.has(c)||mf(c,!1,i),mf(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[lu]||(s[lu]=!0,mf("selectionchange",!1,s))}}function Iy(i,s,c,m){switch(ty(s)){case 1:var v=u_;break;case 4:v=c_;break;default:v=Gd}c=v.bind(null,s,c,i),v=void 0,!xr||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),m?v!==void 0?i.addEventListener(s,c,{capture:!0,passive:v}):i.addEventListener(s,c,!0):v!==void 0?i.addEventListener(s,c,{passive:v}):i.addEventListener(s,c,!1)}function gf(i,s,c,m,v){var w=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var T=m.tag;if(T===3||T===4){var z=m.stateNode.containerInfo;if(z===v||z.nodeType===8&&z.parentNode===v)break;if(T===4)for(T=m.return;T!==null;){var H=T.tag;if((H===3||H===4)&&(H=T.stateNode.containerInfo,H===v||H.nodeType===8&&H.parentNode===v))return;T=T.return}for(;z!==null;){if(T=vo(z),T===null)return;if(H=T.tag,H===5||H===6){m=w=T;continue e}z=z.parentNode}}m=m.return}Nn(function(){var oe=w,fe=oi(c),he=[];e:{var de=Py.get(i);if(de!==void 0){var Te=ef,Ne=i;switch(i){case"keypress":if(nu(c)===0)break e;case"keydown":case"keyup":Te=E_;break;case"focusin":Ne="focus",Te=rf;break;case"focusout":Ne="blur",Te=rf;break;case"beforeblur":case"afterblur":Te=rf;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=iy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=h_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=P_;break;case Cy:case Ey:case _y:Te=g_;break;case Ty:Te=j_;break;case"scroll":Te=d_;break;case"wheel":Te=I_;break;case"copy":case"cut":case"paste":Te=v_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=sy}var Ie=(s&4)!==0,Rt=!Ie&&i==="scroll",X=Ie?de!==null?de+"Capture":null:de;Ie=[];for(var q=oe,te;q!==null;){te=q;var ge=te.stateNode;if(te.tag===5&&ge!==null&&(te=ge,X!==null&&(ge=jn(q,X),ge!=null&&Ie.push(Oa(q,ge,te)))),Rt)break;q=q.return}0<Ie.length&&(de=new Te(de,Ne,null,c,fe),he.push({event:de,listeners:Ie}))}}if((s&7)===0){e:{if(de=i==="mouseover"||i==="pointerover",Te=i==="mouseout"||i==="pointerout",de&&c!==Xt&&(Ne=c.relatedTarget||c.fromElement)&&(vo(Ne)||Ne[si]))break e;if((Te||de)&&(de=fe.window===fe?fe:(de=fe.ownerDocument)?de.defaultView||de.parentWindow:window,Te?(Ne=c.relatedTarget||c.toElement,Te=oe,Ne=Ne?vo(Ne):null,Ne!==null&&(Rt=yo(Ne),Ne!==Rt||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(Te=null,Ne=oe),Te!==Ne)){if(Ie=iy,ge="onMouseLeave",X="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=sy,ge="onPointerLeave",X="onPointerEnter",q="pointer"),Rt=Te==null?de:ds(Te),te=Ne==null?de:ds(Ne),de=new Ie(ge,q+"leave",Te,c,fe),de.target=Rt,de.relatedTarget=te,ge=null,vo(fe)===oe&&(Ie=new Ie(X,q+"enter",Ne,c,fe),Ie.target=te,Ie.relatedTarget=Rt,ge=Ie),Rt=ge,Te&&Ne)t:{for(Ie=Te,X=Ne,q=0,te=Ie;te;te=us(te))q++;for(te=0,ge=X;ge;ge=us(ge))te++;for(;0<q-te;)Ie=us(Ie),q--;for(;0<te-q;)X=us(X),te--;for(;q--;){if(Ie===X||X!==null&&Ie===X.alternate)break t;Ie=us(Ie),X=us(X)}Ie=null}else Ie=null;Te!==null&&Ay(he,de,Te,Ie,!1),Ne!==null&&Rt!==null&&Ay(he,Rt,Ne,Ie,!0)}}e:{if(de=oe?ds(oe):window,Te=de.nodeName&&de.nodeName.toLowerCase(),Te==="select"||Te==="input"&&de.type==="file")var Oe=F_;else if(fy(de))if(py)Oe=U_;else{Oe=V_;var Le=$_}else(Te=de.nodeName)&&Te.toLowerCase()==="input"&&(de.type==="checkbox"||de.type==="radio")&&(Oe=B_);if(Oe&&(Oe=Oe(i,oe))){hy(he,Oe,c,fe);break e}Le&&Le(i,de,oe),i==="focusout"&&(Le=de._wrapperState)&&Le.controlled&&de.type==="number"&&_n(de,"number",de.value)}switch(Le=oe?ds(oe):window,i){case"focusin":(fy(Le)||Le.contentEditable==="true")&&(as=Le,cf=oe,Ra=null);break;case"focusout":Ra=cf=as=null;break;case"mousedown":df=!0;break;case"contextmenu":case"mouseup":case"dragend":df=!1,ky(he,c,fe);break;case"selectionchange":if(Z_)break;case"keydown":case"keyup":ky(he,c,fe)}var Fe;if(sf)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else ss?cy(i,c)&&(Ue="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ue="onCompositionStart");Ue&&(ay&&c.locale!=="ko"&&(ss||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ss&&(Fe=ny()):(Ai=fe,Jd="value"in Ai?Ai.value:Ai.textContent,ss=!0)),Le=uu(oe,Ue),0<Le.length&&(Ue=new oy(Ue,i,null,c,fe),he.push({event:Ue,listeners:Le}),Fe?Ue.data=Fe:(Fe=dy(c),Fe!==null&&(Ue.data=Fe)))),(Fe=O_?D_(i,c):z_(i,c))&&(oe=uu(oe,"onBeforeInput"),0<oe.length&&(fe=new oy("onBeforeInput","beforeinput",null,c,fe),he.push({event:fe,listeners:oe}),fe.data=Fe))}Ry(he,s)})}function Oa(i,s,c){return{instance:i,listener:s,currentTarget:c}}function uu(i,s){for(var c=s+"Capture",m=[];i!==null;){var v=i,w=v.stateNode;v.tag===5&&w!==null&&(v=w,w=jn(i,c),w!=null&&m.unshift(Oa(i,w,v)),w=jn(i,s),w!=null&&m.push(Oa(i,w,v))),i=i.return}return m}function us(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Ay(i,s,c,m,v){for(var w=s._reactName,T=[];c!==null&&c!==m;){var z=c,H=z.alternate,oe=z.stateNode;if(H!==null&&H===m)break;z.tag===5&&oe!==null&&(z=oe,v?(H=jn(c,w),H!=null&&T.unshift(Oa(c,H,z))):v||(H=jn(c,w),H!=null&&T.push(Oa(c,H,z)))),c=c.return}T.length!==0&&i.push({event:s,listeners:T})}var K_=/\r\n?/g,G_=/\u0000|\uFFFD/g;function Oy(i){return(typeof i=="string"?i:""+i).replace(K_,`
|
|
38
|
-
`).replace(G_,"")}function cu(i,s,c){if(s=Oy(s),Oy(i)!==s&&c)throw Error(n(425))}function du(){}var yf=null,vf=null;function xf(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var wf=typeof setTimeout=="function"?setTimeout:void 0,X_=typeof clearTimeout=="function"?clearTimeout:void 0,Dy=typeof Promise=="function"?Promise:void 0,J_=typeof queueMicrotask=="function"?queueMicrotask:typeof Dy<"u"?function(i){return Dy.resolve(null).then(i).catch(eT)}:wf;function eT(i){setTimeout(function(){throw i})}function bf(i,s){var c=s,m=0;do{var v=c.nextSibling;if(i.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"){if(m===0){i.removeChild(v),Ca(s);return}m--}else c!=="$"&&c!=="$?"&&c!=="$!"||m++;c=v}while(c);Ca(s)}function Di(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function zy(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var cs=Math.random().toString(36).slice(2),Br="__reactFiber$"+cs,Da="__reactProps$"+cs,si="__reactContainer$"+cs,kf="__reactEvents$"+cs,tT="__reactListeners$"+cs,nT="__reactHandles$"+cs;function vo(i){var s=i[Br];if(s)return s;for(var c=i.parentNode;c;){if(s=c[si]||c[Br]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=zy(i);i!==null;){if(c=i[Br])return c;i=zy(i)}return s}i=c,c=i.parentNode}return null}function za(i){return i=i[Br]||i[si],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ds(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function fu(i){return i[Da]||null}var Sf=[],fs=-1;function zi(i){return{current:i}}function vt(i){0>fs||(i.current=Sf[fs],Sf[fs]=null,fs--)}function mt(i,s){fs++,Sf[fs]=i.current,i.current=s}var Mi={},ln=zi(Mi),Rn=zi(!1),xo=Mi;function hs(i,s){var c=i.type.contextTypes;if(!c)return Mi;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var v={},w;for(w in c)v[w]=s[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=v),v}function In(i){return i=i.childContextTypes,i!=null}function hu(){vt(Rn),vt(ln)}function My(i,s,c){if(ln.current!==Mi)throw Error(n(168));mt(ln,s),mt(Rn,c)}function Ly(i,s,c){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return c;m=m.getChildContext();for(var v in m)if(!(v in s))throw Error(n(108,ie(i)||"Unknown",v));return N({},c,m)}function pu(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Mi,xo=ln.current,mt(ln,i),mt(Rn,Rn.current),!0}function Fy(i,s,c){var m=i.stateNode;if(!m)throw Error(n(169));c?(i=Ly(i,s,xo),m.__reactInternalMemoizedMergedChildContext=i,vt(Rn),vt(ln),mt(ln,i)):vt(Rn),mt(Rn,c)}var ai=null,mu=!1,Cf=!1;function $y(i){ai===null?ai=[i]:ai.push(i)}function rT(i){mu=!0,$y(i)}function Li(){if(!Cf&&ai!==null){Cf=!0;var i=0,s=at;try{var c=ai;for(at=1;i<c.length;i++){var m=c[i];do m=m(!0);while(m!==null)}ai=null,mu=!1}catch(v){throw ai!==null&&(ai=ai.slice(i+1)),Bg(Wd,Li),v}finally{at=s,Cf=!1}}return null}var ps=[],ms=0,gu=null,yu=0,nr=[],rr=0,wo=null,li=1,ui="";function bo(i,s){ps[ms++]=yu,ps[ms++]=gu,gu=i,yu=s}function Vy(i,s,c){nr[rr++]=li,nr[rr++]=ui,nr[rr++]=wo,wo=i;var m=li;i=ui;var v=32-wr(m)-1;m&=~(1<<v),c+=1;var w=32-wr(s)+v;if(30<w){var T=v-v%5;w=(m&(1<<T)-1).toString(32),m>>=T,v-=T,li=1<<32-wr(s)+v|c<<v|m,ui=w+i}else li=1<<w|c<<v|m,ui=i}function Ef(i){i.return!==null&&(bo(i,1),Vy(i,1,0))}function _f(i){for(;i===gu;)gu=ps[--ms],ps[ms]=null,yu=ps[--ms],ps[ms]=null;for(;i===wo;)wo=nr[--rr],nr[rr]=null,ui=nr[--rr],nr[rr]=null,li=nr[--rr],nr[rr]=null}var Zn=null,qn=null,xt=!1,kr=null;function By(i,s){var c=ar(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function Uy(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Zn=i,qn=Di(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Zn=i,qn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=wo!==null?{id:li,overflow:ui}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=ar(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Zn=i,qn=null,!0):!1;default:return!1}}function Tf(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Pf(i){if(xt){var s=qn;if(s){var c=s;if(!Uy(i,s)){if(Tf(i))throw Error(n(418));s=Di(c.nextSibling);var m=Zn;s&&Uy(i,s)?By(m,c):(i.flags=i.flags&-4097|2,xt=!1,Zn=i)}}else{if(Tf(i))throw Error(n(418));i.flags=i.flags&-4097|2,xt=!1,Zn=i}}}function Hy(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Zn=i}function vu(i){if(i!==Zn)return!1;if(!xt)return Hy(i),xt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!xf(i.type,i.memoizedProps)),s&&(s=qn)){if(Tf(i))throw Wy(),Error(n(418));for(;s;)By(i,s),s=Di(s.nextSibling)}if(Hy(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){qn=Di(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}qn=null}}else qn=Zn?Di(i.stateNode.nextSibling):null;return!0}function Wy(){for(var i=qn;i;)i=Di(i.nextSibling)}function gs(){qn=Zn=null,xt=!1}function Nf(i){kr===null?kr=[i]:kr.push(i)}var iT=R.ReactCurrentBatchConfig;function Ma(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var m=c.stateNode}if(!m)throw Error(n(147,i));var v=m,w=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(T){var z=v.refs;T===null?delete z[w]:z[w]=T},s._stringRef=w,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function xu(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Zy(i){var s=i._init;return s(i._payload)}function qy(i){function s(X,q){if(i){var te=X.deletions;te===null?(X.deletions=[q],X.flags|=16):te.push(q)}}function c(X,q){if(!i)return null;for(;q!==null;)s(X,q),q=q.sibling;return null}function m(X,q){for(X=new Map;q!==null;)q.key!==null?X.set(q.key,q):X.set(q.index,q),q=q.sibling;return X}function v(X,q){return X=Zi(X,q),X.index=0,X.sibling=null,X}function w(X,q,te){return X.index=te,i?(te=X.alternate,te!==null?(te=te.index,te<q?(X.flags|=2,q):te):(X.flags|=2,q)):(X.flags|=1048576,q)}function T(X){return i&&X.alternate===null&&(X.flags|=2),X}function z(X,q,te,ge){return q===null||q.tag!==6?(q=wh(te,X.mode,ge),q.return=X,q):(q=v(q,te),q.return=X,q)}function H(X,q,te,ge){var Oe=te.type;return Oe===F?fe(X,q,te.props.children,ge,te.key):q!==null&&(q.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Q&&Zy(Oe)===q.type)?(ge=v(q,te.props),ge.ref=Ma(X,q,te),ge.return=X,ge):(ge=Uu(te.type,te.key,te.props,null,X.mode,ge),ge.ref=Ma(X,q,te),ge.return=X,ge)}function oe(X,q,te,ge){return q===null||q.tag!==4||q.stateNode.containerInfo!==te.containerInfo||q.stateNode.implementation!==te.implementation?(q=bh(te,X.mode,ge),q.return=X,q):(q=v(q,te.children||[]),q.return=X,q)}function fe(X,q,te,ge,Oe){return q===null||q.tag!==7?(q=No(te,X.mode,ge,Oe),q.return=X,q):(q=v(q,te),q.return=X,q)}function he(X,q,te){if(typeof q=="string"&&q!==""||typeof q=="number")return q=wh(""+q,X.mode,te),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case A:return te=Uu(q.type,q.key,q.props,null,X.mode,te),te.ref=Ma(X,null,q),te.return=X,te;case j:return q=bh(q,X.mode,te),q.return=X,q;case Q:var ge=q._init;return he(X,ge(q._payload),te)}if(Tn(q)||G(q))return q=No(q,X.mode,te,null),q.return=X,q;xu(X,q)}return null}function de(X,q,te,ge){var Oe=q!==null?q.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return Oe!==null?null:z(X,q,""+te,ge);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case A:return te.key===Oe?H(X,q,te,ge):null;case j:return te.key===Oe?oe(X,q,te,ge):null;case Q:return Oe=te._init,de(X,q,Oe(te._payload),ge)}if(Tn(te)||G(te))return Oe!==null?null:fe(X,q,te,ge,null);xu(X,te)}return null}function Te(X,q,te,ge,Oe){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return X=X.get(te)||null,z(q,X,""+ge,Oe);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case A:return X=X.get(ge.key===null?te:ge.key)||null,H(q,X,ge,Oe);case j:return X=X.get(ge.key===null?te:ge.key)||null,oe(q,X,ge,Oe);case Q:var Le=ge._init;return Te(X,q,te,Le(ge._payload),Oe)}if(Tn(ge)||G(ge))return X=X.get(te)||null,fe(q,X,ge,Oe,null);xu(q,ge)}return null}function Ne(X,q,te,ge){for(var Oe=null,Le=null,Fe=q,Ue=q=0,Yt=null;Fe!==null&&Ue<te.length;Ue++){Fe.index>Ue?(Yt=Fe,Fe=null):Yt=Fe.sibling;var et=de(X,Fe,te[Ue],ge);if(et===null){Fe===null&&(Fe=Yt);break}i&&Fe&&et.alternate===null&&s(X,Fe),q=w(et,q,Ue),Le===null?Oe=et:Le.sibling=et,Le=et,Fe=Yt}if(Ue===te.length)return c(X,Fe),xt&&bo(X,Ue),Oe;if(Fe===null){for(;Ue<te.length;Ue++)Fe=he(X,te[Ue],ge),Fe!==null&&(q=w(Fe,q,Ue),Le===null?Oe=Fe:Le.sibling=Fe,Le=Fe);return xt&&bo(X,Ue),Oe}for(Fe=m(X,Fe);Ue<te.length;Ue++)Yt=Te(Fe,X,Ue,te[Ue],ge),Yt!==null&&(i&&Yt.alternate!==null&&Fe.delete(Yt.key===null?Ue:Yt.key),q=w(Yt,q,Ue),Le===null?Oe=Yt:Le.sibling=Yt,Le=Yt);return i&&Fe.forEach(function(qi){return s(X,qi)}),xt&&bo(X,Ue),Oe}function Ie(X,q,te,ge){var Oe=G(te);if(typeof Oe!="function")throw Error(n(150));if(te=Oe.call(te),te==null)throw Error(n(151));for(var Le=Oe=null,Fe=q,Ue=q=0,Yt=null,et=te.next();Fe!==null&&!et.done;Ue++,et=te.next()){Fe.index>Ue?(Yt=Fe,Fe=null):Yt=Fe.sibling;var qi=de(X,Fe,et.value,ge);if(qi===null){Fe===null&&(Fe=Yt);break}i&&Fe&&qi.alternate===null&&s(X,Fe),q=w(qi,q,Ue),Le===null?Oe=qi:Le.sibling=qi,Le=qi,Fe=Yt}if(et.done)return c(X,Fe),xt&&bo(X,Ue),Oe;if(Fe===null){for(;!et.done;Ue++,et=te.next())et=he(X,et.value,ge),et!==null&&(q=w(et,q,Ue),Le===null?Oe=et:Le.sibling=et,Le=et);return xt&&bo(X,Ue),Oe}for(Fe=m(X,Fe);!et.done;Ue++,et=te.next())et=Te(Fe,X,Ue,et.value,ge),et!==null&&(i&&et.alternate!==null&&Fe.delete(et.key===null?Ue:et.key),q=w(et,q,Ue),Le===null?Oe=et:Le.sibling=et,Le=et);return i&&Fe.forEach(function(MT){return s(X,MT)}),xt&&bo(X,Ue),Oe}function Rt(X,q,te,ge){if(typeof te=="object"&&te!==null&&te.type===F&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case A:e:{for(var Oe=te.key,Le=q;Le!==null;){if(Le.key===Oe){if(Oe=te.type,Oe===F){if(Le.tag===7){c(X,Le.sibling),q=v(Le,te.props.children),q.return=X,X=q;break e}}else if(Le.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Q&&Zy(Oe)===Le.type){c(X,Le.sibling),q=v(Le,te.props),q.ref=Ma(X,Le,te),q.return=X,X=q;break e}c(X,Le);break}else s(X,Le);Le=Le.sibling}te.type===F?(q=No(te.props.children,X.mode,ge,te.key),q.return=X,X=q):(ge=Uu(te.type,te.key,te.props,null,X.mode,ge),ge.ref=Ma(X,q,te),ge.return=X,X=ge)}return T(X);case j:e:{for(Le=te.key;q!==null;){if(q.key===Le)if(q.tag===4&&q.stateNode.containerInfo===te.containerInfo&&q.stateNode.implementation===te.implementation){c(X,q.sibling),q=v(q,te.children||[]),q.return=X,X=q;break e}else{c(X,q);break}else s(X,q);q=q.sibling}q=bh(te,X.mode,ge),q.return=X,X=q}return T(X);case Q:return Le=te._init,Rt(X,q,Le(te._payload),ge)}if(Tn(te))return Ne(X,q,te,ge);if(G(te))return Ie(X,q,te,ge);xu(X,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,q!==null&&q.tag===6?(c(X,q.sibling),q=v(q,te),q.return=X,X=q):(c(X,q),q=wh(te,X.mode,ge),q.return=X,X=q),T(X)):c(X,q)}return Rt}var ys=qy(!0),Qy=qy(!1),wu=zi(null),bu=null,vs=null,jf=null;function Rf(){jf=vs=bu=null}function If(i){var s=wu.current;vt(wu),i._currentValue=s}function Af(i,s,c){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===c)break;i=i.return}}function xs(i,s){bu=i,jf=vs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(An=!0),i.firstContext=null)}function ir(i){var s=i._currentValue;if(jf!==i)if(i={context:i,memoizedValue:s,next:null},vs===null){if(bu===null)throw Error(n(308));vs=i,bu.dependencies={lanes:0,firstContext:i}}else vs=vs.next=i;return s}var ko=null;function Of(i){ko===null?ko=[i]:ko.push(i)}function Yy(i,s,c,m){var v=s.interleaved;return v===null?(c.next=c,Of(s)):(c.next=v.next,v.next=c),s.interleaved=c,ci(i,m)}function ci(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Fi=!1;function Df(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ky(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function di(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function $i(i,s,c){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(Je&2)!==0){var v=m.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),m.pending=s,ci(i,c)}return v=m.interleaved,v===null?(s.next=s,Of(m)):(s.next=v.next,v.next=s),m.interleaved=s,ci(i,c)}function ku(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,Qd(i,c)}}function Gy(i,s){var c=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var v=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var T={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};w===null?v=w=T:w=w.next=T,c=c.next}while(c!==null);w===null?v=w=s:w=w.next=s}else v=w=s;c={baseState:m.baseState,firstBaseUpdate:v,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function Su(i,s,c,m){var v=i.updateQueue;Fi=!1;var w=v.firstBaseUpdate,T=v.lastBaseUpdate,z=v.shared.pending;if(z!==null){v.shared.pending=null;var H=z,oe=H.next;H.next=null,T===null?w=oe:T.next=oe,T=H;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,z=fe.lastBaseUpdate,z!==T&&(z===null?fe.firstBaseUpdate=oe:z.next=oe,fe.lastBaseUpdate=H))}if(w!==null){var he=v.baseState;T=0,fe=oe=H=null,z=w;do{var de=z.lane,Te=z.eventTime;if((m&de)===de){fe!==null&&(fe=fe.next={eventTime:Te,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var Ne=i,Ie=z;switch(de=s,Te=c,Ie.tag){case 1:if(Ne=Ie.payload,typeof Ne=="function"){he=Ne.call(Te,he,de);break e}he=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ie.payload,de=typeof Ne=="function"?Ne.call(Te,he,de):Ne,de==null)break e;he=N({},he,de);break e;case 2:Fi=!0}}z.callback!==null&&z.lane!==0&&(i.flags|=64,de=v.effects,de===null?v.effects=[z]:de.push(z))}else Te={eventTime:Te,lane:de,tag:z.tag,payload:z.payload,callback:z.callback,next:null},fe===null?(oe=fe=Te,H=he):fe=fe.next=Te,T|=de;if(z=z.next,z===null){if(z=v.shared.pending,z===null)break;de=z,z=de.next,de.next=null,v.lastBaseUpdate=de,v.shared.pending=null}}while(!0);if(fe===null&&(H=he),v.baseState=H,v.firstBaseUpdate=oe,v.lastBaseUpdate=fe,s=v.shared.interleaved,s!==null){v=s;do T|=v.lane,v=v.next;while(v!==s)}else w===null&&(v.shared.lanes=0);Eo|=T,i.lanes=T,i.memoizedState=he}}function Xy(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var m=i[s],v=m.callback;if(v!==null){if(m.callback=null,m=c,typeof v!="function")throw Error(n(191,v));v.call(m)}}}var La={},Ur=zi(La),Fa=zi(La),$a=zi(La);function So(i){if(i===La)throw Error(n(174));return i}function zf(i,s){switch(mt($a,s),mt(Fa,i),mt(Ur,La),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:se(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=se(s,i)}vt(Ur),mt(Ur,s)}function ws(){vt(Ur),vt(Fa),vt($a)}function Jy(i){So($a.current);var s=So(Ur.current),c=se(s,i.type);s!==c&&(mt(Fa,i),mt(Ur,c))}function Mf(i){Fa.current===i&&(vt(Ur),vt(Fa))}var kt=zi(0);function Cu(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Lf=[];function Ff(){for(var i=0;i<Lf.length;i++)Lf[i]._workInProgressVersionPrimary=null;Lf.length=0}var Eu=R.ReactCurrentDispatcher,$f=R.ReactCurrentBatchConfig,Co=0,St=null,Vt=null,qt=null,_u=!1,Va=!1,Ba=0,oT=0;function un(){throw Error(n(321))}function Vf(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!br(i[c],s[c]))return!1;return!0}function Bf(i,s,c,m,v,w){if(Co=w,St=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Eu.current=i===null||i.memoizedState===null?uT:cT,i=c(m,v),Va){w=0;do{if(Va=!1,Ba=0,25<=w)throw Error(n(301));w+=1,qt=Vt=null,s.updateQueue=null,Eu.current=dT,i=c(m,v)}while(Va)}if(Eu.current=Nu,s=Vt!==null&&Vt.next!==null,Co=0,qt=Vt=St=null,_u=!1,s)throw Error(n(300));return i}function Uf(){var i=Ba!==0;return Ba=0,i}function Hr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?St.memoizedState=qt=i:qt=qt.next=i,qt}function or(){if(Vt===null){var i=St.alternate;i=i!==null?i.memoizedState:null}else i=Vt.next;var s=qt===null?St.memoizedState:qt.next;if(s!==null)qt=s,Vt=i;else{if(i===null)throw Error(n(310));Vt=i,i={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},qt===null?St.memoizedState=qt=i:qt=qt.next=i}return qt}function Ua(i,s){return typeof s=="function"?s(i):s}function Hf(i){var s=or(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var m=Vt,v=m.baseQueue,w=c.pending;if(w!==null){if(v!==null){var T=v.next;v.next=w.next,w.next=T}m.baseQueue=v=w,c.pending=null}if(v!==null){w=v.next,m=m.baseState;var z=T=null,H=null,oe=w;do{var fe=oe.lane;if((Co&fe)===fe)H!==null&&(H=H.next={lane:0,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),m=oe.hasEagerState?oe.eagerState:i(m,oe.action);else{var he={lane:fe,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null};H===null?(z=H=he,T=m):H=H.next=he,St.lanes|=fe,Eo|=fe}oe=oe.next}while(oe!==null&&oe!==w);H===null?T=m:H.next=z,br(m,s.memoizedState)||(An=!0),s.memoizedState=m,s.baseState=T,s.baseQueue=H,c.lastRenderedState=m}if(i=c.interleaved,i!==null){v=i;do w=v.lane,St.lanes|=w,Eo|=w,v=v.next;while(v!==i)}else v===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Wf(i){var s=or(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var m=c.dispatch,v=c.pending,w=s.memoizedState;if(v!==null){c.pending=null;var T=v=v.next;do w=i(w,T.action),T=T.next;while(T!==v);br(w,s.memoizedState)||(An=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),c.lastRenderedState=w}return[w,m]}function ev(){}function tv(i,s){var c=St,m=or(),v=s(),w=!br(m.memoizedState,v);if(w&&(m.memoizedState=v,An=!0),m=m.queue,Zf(iv.bind(null,c,m,i),[i]),m.getSnapshot!==s||w||qt!==null&&qt.memoizedState.tag&1){if(c.flags|=2048,Ha(9,rv.bind(null,c,m,v,s),void 0,null),Qt===null)throw Error(n(349));(Co&30)!==0||nv(c,s,v)}return v}function nv(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=St.updateQueue,s===null?(s={lastEffect:null,stores:null},St.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function rv(i,s,c,m){s.value=c,s.getSnapshot=m,ov(s)&&sv(i)}function iv(i,s,c){return c(function(){ov(s)&&sv(i)})}function ov(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!br(i,c)}catch{return!0}}function sv(i){var s=ci(i,1);s!==null&&_r(s,i,1,-1)}function av(i){var s=Hr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:i},s.queue=i,i=i.dispatch=lT.bind(null,St,i),[s.memoizedState,i]}function Ha(i,s,c,m){return i={tag:i,create:s,destroy:c,deps:m,next:null},s=St.updateQueue,s===null?(s={lastEffect:null,stores:null},St.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(m=c.next,c.next=i,i.next=m,s.lastEffect=i)),i}function lv(){return or().memoizedState}function Tu(i,s,c,m){var v=Hr();St.flags|=i,v.memoizedState=Ha(1|s,c,void 0,m===void 0?null:m)}function Pu(i,s,c,m){var v=or();m=m===void 0?null:m;var w=void 0;if(Vt!==null){var T=Vt.memoizedState;if(w=T.destroy,m!==null&&Vf(m,T.deps)){v.memoizedState=Ha(s,c,w,m);return}}St.flags|=i,v.memoizedState=Ha(1|s,c,w,m)}function uv(i,s){return Tu(8390656,8,i,s)}function Zf(i,s){return Pu(2048,8,i,s)}function cv(i,s){return Pu(4,2,i,s)}function dv(i,s){return Pu(4,4,i,s)}function fv(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function hv(i,s,c){return c=c!=null?c.concat([i]):null,Pu(4,4,fv.bind(null,s,i),c)}function qf(){}function pv(i,s){var c=or();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Vf(s,m[1])?m[0]:(c.memoizedState=[i,s],i)}function mv(i,s){var c=or();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Vf(s,m[1])?m[0]:(i=i(),c.memoizedState=[i,s],i)}function gv(i,s,c){return(Co&21)===0?(i.baseState&&(i.baseState=!1,An=!0),i.memoizedState=c):(br(c,s)||(c=Zg(),St.lanes|=c,Eo|=c,i.baseState=!0),s)}function sT(i,s){var c=at;at=c!==0&&4>c?c:4,i(!0);var m=$f.transition;$f.transition={};try{i(!1),s()}finally{at=c,$f.transition=m}}function yv(){return or().memoizedState}function aT(i,s,c){var m=Hi(i);if(c={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null},vv(i))xv(s,c);else if(c=Yy(i,s,c,m),c!==null){var v=yn();_r(c,i,m,v),wv(c,s,m)}}function lT(i,s,c){var m=Hi(i),v={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null};if(vv(i))xv(s,v);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var T=s.lastRenderedState,z=w(T,c);if(v.hasEagerState=!0,v.eagerState=z,br(z,T)){var H=s.interleaved;H===null?(v.next=v,Of(s)):(v.next=H.next,H.next=v),s.interleaved=v;return}}catch{}finally{}c=Yy(i,s,v,m),c!==null&&(v=yn(),_r(c,i,m,v),wv(c,s,m))}}function vv(i){var s=i.alternate;return i===St||s!==null&&s===St}function xv(i,s){Va=_u=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function wv(i,s,c){if((c&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,Qd(i,c)}}var Nu={readContext:ir,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useInsertionEffect:un,useLayoutEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useMutableSource:un,useSyncExternalStore:un,useId:un,unstable_isNewReconciler:!1},uT={readContext:ir,useCallback:function(i,s){return Hr().memoizedState=[i,s===void 0?null:s],i},useContext:ir,useEffect:uv,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,Tu(4194308,4,fv.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Tu(4194308,4,i,s)},useInsertionEffect:function(i,s){return Tu(4,2,i,s)},useMemo:function(i,s){var c=Hr();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var m=Hr();return s=c!==void 0?c(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=aT.bind(null,St,i),[m.memoizedState,i]},useRef:function(i){var s=Hr();return i={current:i},s.memoizedState=i},useState:av,useDebugValue:qf,useDeferredValue:function(i){return Hr().memoizedState=i},useTransition:function(){var i=av(!1),s=i[0];return i=sT.bind(null,i[1]),Hr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var m=St,v=Hr();if(xt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Qt===null)throw Error(n(349));(Co&30)!==0||nv(m,s,c)}v.memoizedState=c;var w={value:c,getSnapshot:s};return v.queue=w,uv(iv.bind(null,m,w,i),[i]),m.flags|=2048,Ha(9,rv.bind(null,m,w,c,s),void 0,null),c},useId:function(){var i=Hr(),s=Qt.identifierPrefix;if(xt){var c=ui,m=li;c=(m&~(1<<32-wr(m)-1)).toString(32)+c,s=":"+s+"R"+c,c=Ba++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=oT++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},cT={readContext:ir,useCallback:pv,useContext:ir,useEffect:Zf,useImperativeHandle:hv,useInsertionEffect:cv,useLayoutEffect:dv,useMemo:mv,useReducer:Hf,useRef:lv,useState:function(){return Hf(Ua)},useDebugValue:qf,useDeferredValue:function(i){var s=or();return gv(s,Vt.memoizedState,i)},useTransition:function(){var i=Hf(Ua)[0],s=or().memoizedState;return[i,s]},useMutableSource:ev,useSyncExternalStore:tv,useId:yv,unstable_isNewReconciler:!1},dT={readContext:ir,useCallback:pv,useContext:ir,useEffect:Zf,useImperativeHandle:hv,useInsertionEffect:cv,useLayoutEffect:dv,useMemo:mv,useReducer:Wf,useRef:lv,useState:function(){return Wf(Ua)},useDebugValue:qf,useDeferredValue:function(i){var s=or();return Vt===null?s.memoizedState=i:gv(s,Vt.memoizedState,i)},useTransition:function(){var i=Wf(Ua)[0],s=or().memoizedState;return[i,s]},useMutableSource:ev,useSyncExternalStore:tv,useId:yv,unstable_isNewReconciler:!1};function Sr(i,s){if(i&&i.defaultProps){s=N({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Qf(i,s,c,m){s=i.memoizedState,c=c(m,s),c=c==null?s:N({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var ju={isMounted:function(i){return(i=i._reactInternals)?yo(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var m=yn(),v=Hi(i),w=di(m,v);w.payload=s,c!=null&&(w.callback=c),s=$i(i,w,v),s!==null&&(_r(s,i,v,m),ku(s,i,v))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var m=yn(),v=Hi(i),w=di(m,v);w.tag=1,w.payload=s,c!=null&&(w.callback=c),s=$i(i,w,v),s!==null&&(_r(s,i,v,m),ku(s,i,v))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=yn(),m=Hi(i),v=di(c,m);v.tag=2,s!=null&&(v.callback=s),s=$i(i,v,m),s!==null&&(_r(s,i,m,c),ku(s,i,m))}};function bv(i,s,c,m,v,w,T){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,w,T):s.prototype&&s.prototype.isPureReactComponent?!ja(c,m)||!ja(v,w):!0}function kv(i,s,c){var m=!1,v=Mi,w=s.contextType;return typeof w=="object"&&w!==null?w=ir(w):(v=In(s)?xo:ln.current,m=s.contextTypes,w=(m=m!=null)?hs(i,v):Mi),s=new s(c,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ju,i.stateNode=s,s._reactInternals=i,m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=v,i.__reactInternalMemoizedMaskedChildContext=w),s}function Sv(i,s,c,m){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,m),s.state!==i&&ju.enqueueReplaceState(s,s.state,null)}function Yf(i,s,c,m){var v=i.stateNode;v.props=c,v.state=i.memoizedState,v.refs={},Df(i);var w=s.contextType;typeof w=="object"&&w!==null?v.context=ir(w):(w=In(s)?xo:ln.current,v.context=hs(i,w)),v.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Qf(i,s,w,c),v.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(s=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),s!==v.state&&ju.enqueueReplaceState(v,v.state,null),Su(i,c,v,m),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308)}function bs(i,s){try{var c="",m=s;do c+=ve(m),m=m.return;while(m);var v=c}catch(w){v=`
|
|
37
|
+
`+v[T].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=T&&0<=z);break}}}finally{I=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?K(i):""}function ve(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=ue(i.type,!1),i;case 11:return i=ue(i.type.render,!1),i;case 1:return i=ue(i.type,!0),i;default:return""}}function xe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case F:return"Fragment";case j:return"Portal";case re:return"Profiler";case Z:return"StrictMode";case ne:return"Suspense";case W:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Y:return(i.displayName||"Context")+".Consumer";case O:return(i._context.displayName||"Context")+".Provider";case M:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case U:return s=i.displayName||null,s!==null?s:xe(i.type)||"Memo";case Q:s=i._payload,i=i._init;try{return xe(i(s))}catch{}}return null}function ie(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(s);case 8:return s===Z?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function me(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Se(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function be(i){var s=Se(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),m=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var v=c.get,w=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return v.call(this)},set:function(T){m=""+T,w.call(this,T)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return m},setValue:function(T){m=""+T},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Ae(i){i._valueTracker||(i._valueTracker=be(i))}function Ve(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),m="";return i&&(m=Se(i)?i.checked?"true":"false":i.value),i=m,i!==c?(s.setValue(i),!0):!1}function nt(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function It(i,s){var c=s.checked;return N({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??i._wrapperState.initialChecked})}function sn(i,s){var c=s.defaultValue==null?"":s.defaultValue,m=s.checked!=null?s.checked:s.defaultChecked;c=me(s.value!=null?s.value:c),i._wrapperState={initialChecked:m,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Gt(i,s){s=s.checked,s!=null&&P(i,"checked",s,!1)}function an(i,s){Gt(i,s);var c=me(s.value),m=s.type;if(c!=null)m==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?_n(i,s.type,c):s.hasOwnProperty("defaultValue")&&_n(i,s.type,me(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function tr(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var m=s.type;if(!(m!=="submit"&&m!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function _n(i,s,c){(s!=="number"||nt(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Tn=Array.isArray;function $(i,s,c,m){if(i=i.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<i.length;c++)v=s.hasOwnProperty("$"+i[c].value),i[c].selected!==v&&(i[c].selected=v),v&&m&&(i[c].defaultSelected=!0)}else{for(c=""+me(c),s=null,v=0;v<i.length;v++){if(i[v].value===c){i[v].selected=!0,m&&(i[v].defaultSelected=!0);return}s!==null||i[v].disabled||(s=i[v])}s!==null&&(s.selected=!0)}}function ee(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function ae(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(Tn(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:me(c)}}function ke(i,s){var c=me(s.value),m=me(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),m!=null&&(i.defaultValue=""+m)}function ye(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function B(i){switch(i){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 se(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?B(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var we,_e=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,m,v){MSApp.execUnsafeLocalFunction(function(){return i(s,c,m,v)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(we=we||document.createElement("div"),we.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=we.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function ze(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var dt={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},Nt=["Webkit","ms","Moz","O"];Object.keys(dt).forEach(function(i){Nt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),dt[s]=dt[i]})});function Zt(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||dt.hasOwnProperty(i)&&dt[i]?(""+s).trim():s+"px"}function $t(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var m=c.indexOf("--")===0,v=Zt(c,s[c],m);c==="float"&&(c="cssFloat"),m?i.setProperty(c,v):i[c]=v}}var Pn=N({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 pt(i,s){if(s){if(Pn[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function pn(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xt=null;function oi(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var rs=null,Pi=null,Fr=null;function vr(i){if(i=za(i)){if(typeof rs!="function")throw Error(n(280));var s=i.stateNode;s&&(s=fu(s),rs(i.stateNode,i.type,s))}}function Ul(i){Pi?Fr?Fr.push(i):Fr=[i]:Pi=i}function He(){if(Pi){var i=Pi,s=Fr;if(Fr=Pi=null,vr(i),s)for(i=0;i<s.length;i++)vr(s[i])}}function rt(i,s){return i(s)}function ft(){}var mn=!1;function Nn(i,s,c){if(mn)return i(s,c);mn=!0;try{return rt(i,s,c)}finally{mn=!1,(Pi!==null||Fr!==null)&&(ft(),He())}}function jn(i,s){var c=i.stateNode;if(c===null)return null;var m=fu(c);if(m===null)return null;c=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var xr=!1;if(u)try{var Jt={};Object.defineProperty(Jt,"passive",{get:function(){xr=!0}}),window.addEventListener("test",Jt,Jt),window.removeEventListener("test",Jt,Jt)}catch{xr=!1}function $r(i,s,c,m,v,w,T,z,H){var oe=Array.prototype.slice.call(arguments,3);try{s.apply(c,oe)}catch(fe){this.onError(fe)}}var ya=!1,Hl=null,Wl=!1,Hd=null,HE={onError:function(i){ya=!0,Hl=i}};function WE(i,s,c,m,v,w,T,z,H){ya=!1,Hl=null,$r.apply(HE,arguments)}function ZE(i,s,c,m,v,w,T,z,H){if(WE.apply(this,arguments),ya){if(ya){var oe=Hl;ya=!1,Hl=null}else throw Error(n(198));Wl||(Wl=!0,Hd=oe)}}function yo(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function Mg(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function Lg(i){if(yo(i)!==i)throw Error(n(188))}function qE(i){var s=i.alternate;if(!s){if(s=yo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,m=s;;){var v=c.return;if(v===null)break;var w=v.alternate;if(w===null){if(m=v.return,m!==null){c=m;continue}break}if(v.child===w.child){for(w=v.child;w;){if(w===c)return Lg(v),i;if(w===m)return Lg(v),s;w=w.sibling}throw Error(n(188))}if(c.return!==m.return)c=v,m=w;else{for(var T=!1,z=v.child;z;){if(z===c){T=!0,c=v,m=w;break}if(z===m){T=!0,m=v,c=w;break}z=z.sibling}if(!T){for(z=w.child;z;){if(z===c){T=!0,c=w,m=v;break}if(z===m){T=!0,m=w,c=v;break}z=z.sibling}if(!T)throw Error(n(189))}}if(c.alternate!==m)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function Fg(i){return i=qE(i),i!==null?$g(i):null}function $g(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=$g(i);if(s!==null)return s;i=i.sibling}return null}var Vg=t.unstable_scheduleCallback,Bg=t.unstable_cancelCallback,QE=t.unstable_shouldYield,YE=t.unstable_requestPaint,jt=t.unstable_now,KE=t.unstable_getCurrentPriorityLevel,Wd=t.unstable_ImmediatePriority,Ug=t.unstable_UserBlockingPriority,Zl=t.unstable_NormalPriority,GE=t.unstable_LowPriority,Hg=t.unstable_IdlePriority,ql=null,Vr=null;function XE(i){if(Vr&&typeof Vr.onCommitFiberRoot=="function")try{Vr.onCommitFiberRoot(ql,i,void 0,(i.current.flags&128)===128)}catch{}}var wr=Math.clz32?Math.clz32:t_,JE=Math.log,e_=Math.LN2;function t_(i){return i>>>=0,i===0?32:31-(JE(i)/e_|0)|0}var Ql=64,Yl=4194304;function va(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Kl(i,s){var c=i.pendingLanes;if(c===0)return 0;var m=0,v=i.suspendedLanes,w=i.pingedLanes,T=c&268435455;if(T!==0){var z=T&~v;z!==0?m=va(z):(w&=T,w!==0&&(m=va(w)))}else T=c&~v,T!==0?m=va(T):w!==0&&(m=va(w));if(m===0)return 0;if(s!==0&&s!==m&&(s&v)===0&&(v=m&-m,w=s&-s,v>=w||v===16&&(w&4194240)!==0))return s;if((m&4)!==0&&(m|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=m;0<s;)c=31-wr(s),v=1<<c,m|=i[c],s&=~v;return m}function n_(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 r_(i,s){for(var c=i.suspendedLanes,m=i.pingedLanes,v=i.expirationTimes,w=i.pendingLanes;0<w;){var T=31-wr(w),z=1<<T,H=v[T];H===-1?((z&c)===0||(z&m)!==0)&&(v[T]=n_(z,s)):H<=s&&(i.expiredLanes|=z),w&=~z}}function Zd(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Wg(){var i=Ql;return Ql<<=1,(Ql&4194240)===0&&(Ql=64),i}function qd(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function xa(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-wr(s),i[s]=c}function i_(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0<c;){var v=31-wr(c),w=1<<v;s[v]=0,m[v]=-1,i[v]=-1,c&=~w}}function Qd(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var m=31-wr(c),v=1<<m;v&s|i[m]&s&&(i[m]|=s),c&=~v}}var at=0;function Zg(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var qg,Yd,Qg,Yg,Kg,Kd=!1,Gl=[],Ni=null,ji=null,Ri=null,wa=new Map,ba=new Map,Ii=[],o_="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 Gg(i,s){switch(i){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":ji=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":wa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ba.delete(s.pointerId)}}function ka(i,s,c,m,v,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:c,eventSystemFlags:m,nativeEvent:w,targetContainers:[v]},s!==null&&(s=za(s),s!==null&&Yd(s)),i):(i.eventSystemFlags|=m,s=i.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),i)}function s_(i,s,c,m,v){switch(s){case"focusin":return Ni=ka(Ni,i,s,c,m,v),!0;case"dragenter":return ji=ka(ji,i,s,c,m,v),!0;case"mouseover":return Ri=ka(Ri,i,s,c,m,v),!0;case"pointerover":var w=v.pointerId;return wa.set(w,ka(wa.get(w)||null,i,s,c,m,v)),!0;case"gotpointercapture":return w=v.pointerId,ba.set(w,ka(ba.get(w)||null,i,s,c,m,v)),!0}return!1}function Xg(i){var s=vo(i.target);if(s!==null){var c=yo(s);if(c!==null){if(s=c.tag,s===13){if(s=Mg(c),s!==null){i.blockedOn=s,Kg(i.priority,function(){Qg(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Xl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=Xd(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var m=new c.constructor(c.type,c);Xt=m,c.target.dispatchEvent(m),Xt=null}else return s=za(c),s!==null&&Yd(s),i.blockedOn=c,!1;s.shift()}return!0}function Jg(i,s,c){Xl(i)&&c.delete(s)}function a_(){Kd=!1,Ni!==null&&Xl(Ni)&&(Ni=null),ji!==null&&Xl(ji)&&(ji=null),Ri!==null&&Xl(Ri)&&(Ri=null),wa.forEach(Jg),ba.forEach(Jg)}function Sa(i,s){i.blockedOn===s&&(i.blockedOn=null,Kd||(Kd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,a_)))}function Ca(i){function s(v){return Sa(v,i)}if(0<Gl.length){Sa(Gl[0],i);for(var c=1;c<Gl.length;c++){var m=Gl[c];m.blockedOn===i&&(m.blockedOn=null)}}for(Ni!==null&&Sa(Ni,i),ji!==null&&Sa(ji,i),Ri!==null&&Sa(Ri,i),wa.forEach(s),ba.forEach(s),c=0;c<Ii.length;c++)m=Ii[c],m.blockedOn===i&&(m.blockedOn=null);for(;0<Ii.length&&(c=Ii[0],c.blockedOn===null);)Xg(c),c.blockedOn===null&&Ii.shift()}var is=R.ReactCurrentBatchConfig,Jl=!0;function l_(i,s,c,m){var v=at,w=is.transition;is.transition=null;try{at=1,Gd(i,s,c,m)}finally{at=v,is.transition=w}}function u_(i,s,c,m){var v=at,w=is.transition;is.transition=null;try{at=4,Gd(i,s,c,m)}finally{at=v,is.transition=w}}function Gd(i,s,c,m){if(Jl){var v=Xd(i,s,c,m);if(v===null)gf(i,s,m,eu,c),Gg(i,m);else if(s_(v,i,s,c,m))m.stopPropagation();else if(Gg(i,m),s&4&&-1<o_.indexOf(i)){for(;v!==null;){var w=za(v);if(w!==null&&qg(w),w=Xd(i,s,c,m),w===null&&gf(i,s,m,eu,c),w===v)break;v=w}v!==null&&m.stopPropagation()}else gf(i,s,m,null,c)}}var eu=null;function Xd(i,s,c,m){if(eu=null,i=oi(m),i=vo(i),i!==null)if(s=yo(i),s===null)i=null;else if(c=s.tag,c===13){if(i=Mg(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return eu=i,null}function ey(i){switch(i){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(KE()){case Wd:return 1;case Ug:return 4;case Zl:case GE:return 16;case Hg:return 536870912;default:return 16}default:return 16}}var Ai=null,Jd=null,tu=null;function ty(){if(tu)return tu;var i,s=Jd,c=s.length,m,v="value"in Ai?Ai.value:Ai.textContent,w=v.length;for(i=0;i<c&&s[i]===v[i];i++);var T=c-i;for(m=1;m<=T&&s[c-m]===v[w-m];m++);return tu=v.slice(i,1<m?1-m:void 0)}function nu(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function ru(){return!0}function ny(){return!1}function Wn(i){function s(c,m,v,w,T){this._reactName=c,this._targetInst=v,this.type=m,this.nativeEvent=w,this.target=T,this.currentTarget=null;for(var z in i)i.hasOwnProperty(z)&&(c=i[z],this[z]=c?c(w):w[z]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?ru:ny,this.isPropagationStopped=ny,this}return N(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=ru)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=ru)},persist:function(){},isPersistent:ru}),s}var os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ef=Wn(os),Ea=N({},os,{view:0,detail:0}),c_=Wn(Ea),tf,nf,_a,iu=N({},Ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:of,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==_a&&(_a&&i.type==="mousemove"?(tf=i.screenX-_a.screenX,nf=i.screenY-_a.screenY):nf=tf=0,_a=i),tf)},movementY:function(i){return"movementY"in i?i.movementY:nf}}),ry=Wn(iu),d_=N({},iu,{dataTransfer:0}),f_=Wn(d_),h_=N({},Ea,{relatedTarget:0}),rf=Wn(h_),p_=N({},os,{animationName:0,elapsedTime:0,pseudoElement:0}),m_=Wn(p_),g_=N({},os,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),y_=Wn(g_),v_=N({},os,{data:0}),iy=Wn(v_),x_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},w_={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"},b_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function k_(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=b_[i])?!!s[i]:!1}function of(){return k_}var S_=N({},Ea,{key:function(i){if(i.key){var s=x_[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=nu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?w_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:of,charCode:function(i){return i.type==="keypress"?nu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?nu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),C_=Wn(S_),E_=N({},iu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oy=Wn(E_),__=N({},Ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:of}),T_=Wn(__),P_=N({},os,{propertyName:0,elapsedTime:0,pseudoElement:0}),N_=Wn(P_),j_=N({},iu,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),R_=Wn(j_),I_=[9,13,27,32],sf=u&&"CompositionEvent"in window,Ta=null;u&&"documentMode"in document&&(Ta=document.documentMode);var A_=u&&"TextEvent"in window&&!Ta,sy=u&&(!sf||Ta&&8<Ta&&11>=Ta),ay=" ",ly=!1;function uy(i,s){switch(i){case"keyup":return I_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cy(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ss=!1;function O_(i,s){switch(i){case"compositionend":return cy(s);case"keypress":return s.which!==32?null:(ly=!0,ay);case"textInput":return i=s.data,i===ay&&ly?null:i;default:return null}}function D_(i,s){if(ss)return i==="compositionend"||!sf&&uy(i,s)?(i=ty(),tu=Jd=Ai=null,ss=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return sy&&s.locale!=="ko"?null:s.data;default:return null}}var z_={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 dy(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!z_[i.type]:s==="textarea"}function fy(i,s,c,m){Ul(m),s=uu(s,"onChange"),0<s.length&&(c=new ef("onChange","change",null,c,m),i.push({event:c,listeners:s}))}var Pa=null,Na=null;function M_(i){jy(i,0)}function ou(i){var s=ds(i);if(Ve(s))return i}function L_(i,s){if(i==="change")return s}var hy=!1;if(u){var af;if(u){var lf="oninput"in document;if(!lf){var py=document.createElement("div");py.setAttribute("oninput","return;"),lf=typeof py.oninput=="function"}af=lf}else af=!1;hy=af&&(!document.documentMode||9<document.documentMode)}function my(){Pa&&(Pa.detachEvent("onpropertychange",gy),Na=Pa=null)}function gy(i){if(i.propertyName==="value"&&ou(Na)){var s=[];fy(s,Na,i,oi(i)),Nn(M_,s)}}function F_(i,s,c){i==="focusin"?(my(),Pa=s,Na=c,Pa.attachEvent("onpropertychange",gy)):i==="focusout"&&my()}function $_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return ou(Na)}function V_(i,s){if(i==="click")return ou(s)}function B_(i,s){if(i==="input"||i==="change")return ou(s)}function U_(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var br=typeof Object.is=="function"?Object.is:U_;function ja(i,s){if(br(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),m=Object.keys(s);if(c.length!==m.length)return!1;for(m=0;m<c.length;m++){var v=c[m];if(!d.call(s,v)||!br(i[v],s[v]))return!1}return!0}function yy(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function vy(i,s){var c=yy(i);i=0;for(var m;c;){if(c.nodeType===3){if(m=i+c.textContent.length,i<=s&&m>=s)return{node:c,offset:s-i};i=m}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=yy(c)}}function xy(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?xy(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function wy(){for(var i=window,s=nt();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=nt(i.document)}return s}function uf(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function H_(i){var s=wy(),c=i.focusedElem,m=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&xy(c.ownerDocument.documentElement,c)){if(m!==null&&uf(c)){if(s=m.start,i=m.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var v=c.textContent.length,w=Math.min(m.start,v);m=m.end===void 0?w:Math.min(m.end,v),!i.extend&&w>m&&(v=m,m=w,w=v),v=vy(c,w);var T=vy(c,m);v&&T&&(i.rangeCount!==1||i.anchorNode!==v.node||i.anchorOffset!==v.offset||i.focusNode!==T.node||i.focusOffset!==T.offset)&&(s=s.createRange(),s.setStart(v.node,v.offset),i.removeAllRanges(),w>m?(i.addRange(s),i.extend(T.node,T.offset)):(s.setEnd(T.node,T.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var W_=u&&"documentMode"in document&&11>=document.documentMode,as=null,cf=null,Ra=null,df=!1;function by(i,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;df||as==null||as!==nt(m)||(m=as,"selectionStart"in m&&uf(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Ra&&ja(Ra,m)||(Ra=m,m=uu(cf,"onSelect"),0<m.length&&(s=new ef("onSelect","select",null,s,c),i.push({event:s,listeners:m}),s.target=as)))}function su(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var ls={animationend:su("Animation","AnimationEnd"),animationiteration:su("Animation","AnimationIteration"),animationstart:su("Animation","AnimationStart"),transitionend:su("Transition","TransitionEnd")},ff={},ky={};u&&(ky=document.createElement("div").style,"AnimationEvent"in window||(delete ls.animationend.animation,delete ls.animationiteration.animation,delete ls.animationstart.animation),"TransitionEvent"in window||delete ls.transitionend.transition);function au(i){if(ff[i])return ff[i];if(!ls[i])return i;var s=ls[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in ky)return ff[i]=s[c];return i}var Sy=au("animationend"),Cy=au("animationiteration"),Ey=au("animationstart"),_y=au("transitionend"),Ty=new Map,Py="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 Oi(i,s){Ty.set(i,s),a(s,[i])}for(var hf=0;hf<Py.length;hf++){var pf=Py[hf],Z_=pf.toLowerCase(),q_=pf[0].toUpperCase()+pf.slice(1);Oi(Z_,"on"+q_)}Oi(Sy,"onAnimationEnd"),Oi(Cy,"onAnimationIteration"),Oi(Ey,"onAnimationStart"),Oi("dblclick","onDoubleClick"),Oi("focusin","onFocus"),Oi("focusout","onBlur"),Oi(_y,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ia="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(" "),Q_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ia));function Ny(i,s,c){var m=i.type||"unknown-event";i.currentTarget=c,ZE(m,s,void 0,i),i.currentTarget=null}function jy(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var m=i[c],v=m.event;m=m.listeners;e:{var w=void 0;if(s)for(var T=m.length-1;0<=T;T--){var z=m[T],H=z.instance,oe=z.currentTarget;if(z=z.listener,H!==w&&v.isPropagationStopped())break e;Ny(v,z,oe),w=H}else for(T=0;T<m.length;T++){if(z=m[T],H=z.instance,oe=z.currentTarget,z=z.listener,H!==w&&v.isPropagationStopped())break e;Ny(v,z,oe),w=H}}}if(Wl)throw i=Hd,Wl=!1,Hd=null,i}function yt(i,s){var c=s[kf];c===void 0&&(c=s[kf]=new Set);var m=i+"__bubble";c.has(m)||(Ry(s,i,2,!1),c.add(m))}function mf(i,s,c){var m=0;s&&(m|=4),Ry(c,i,m,s)}var lu="_reactListening"+Math.random().toString(36).slice(2);function Aa(i){if(!i[lu]){i[lu]=!0,r.forEach(function(c){c!=="selectionchange"&&(Q_.has(c)||mf(c,!1,i),mf(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[lu]||(s[lu]=!0,mf("selectionchange",!1,s))}}function Ry(i,s,c,m){switch(ey(s)){case 1:var v=l_;break;case 4:v=u_;break;default:v=Gd}c=v.bind(null,s,c,i),v=void 0,!xr||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),m?v!==void 0?i.addEventListener(s,c,{capture:!0,passive:v}):i.addEventListener(s,c,!0):v!==void 0?i.addEventListener(s,c,{passive:v}):i.addEventListener(s,c,!1)}function gf(i,s,c,m,v){var w=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var T=m.tag;if(T===3||T===4){var z=m.stateNode.containerInfo;if(z===v||z.nodeType===8&&z.parentNode===v)break;if(T===4)for(T=m.return;T!==null;){var H=T.tag;if((H===3||H===4)&&(H=T.stateNode.containerInfo,H===v||H.nodeType===8&&H.parentNode===v))return;T=T.return}for(;z!==null;){if(T=vo(z),T===null)return;if(H=T.tag,H===5||H===6){m=w=T;continue e}z=z.parentNode}}m=m.return}Nn(function(){var oe=w,fe=oi(c),he=[];e:{var de=Ty.get(i);if(de!==void 0){var Te=ef,Ne=i;switch(i){case"keypress":if(nu(c)===0)break e;case"keydown":case"keyup":Te=C_;break;case"focusin":Ne="focus",Te=rf;break;case"focusout":Ne="blur",Te=rf;break;case"beforeblur":case"afterblur":Te=rf;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=ry;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=f_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=T_;break;case Sy:case Cy:case Ey:Te=m_;break;case _y:Te=N_;break;case"scroll":Te=c_;break;case"wheel":Te=R_;break;case"copy":case"cut":case"paste":Te=y_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=oy}var Ie=(s&4)!==0,Rt=!Ie&&i==="scroll",X=Ie?de!==null?de+"Capture":null:de;Ie=[];for(var q=oe,te;q!==null;){te=q;var ge=te.stateNode;if(te.tag===5&&ge!==null&&(te=ge,X!==null&&(ge=jn(q,X),ge!=null&&Ie.push(Oa(q,ge,te)))),Rt)break;q=q.return}0<Ie.length&&(de=new Te(de,Ne,null,c,fe),he.push({event:de,listeners:Ie}))}}if((s&7)===0){e:{if(de=i==="mouseover"||i==="pointerover",Te=i==="mouseout"||i==="pointerout",de&&c!==Xt&&(Ne=c.relatedTarget||c.fromElement)&&(vo(Ne)||Ne[si]))break e;if((Te||de)&&(de=fe.window===fe?fe:(de=fe.ownerDocument)?de.defaultView||de.parentWindow:window,Te?(Ne=c.relatedTarget||c.toElement,Te=oe,Ne=Ne?vo(Ne):null,Ne!==null&&(Rt=yo(Ne),Ne!==Rt||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(Te=null,Ne=oe),Te!==Ne)){if(Ie=ry,ge="onMouseLeave",X="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=oy,ge="onPointerLeave",X="onPointerEnter",q="pointer"),Rt=Te==null?de:ds(Te),te=Ne==null?de:ds(Ne),de=new Ie(ge,q+"leave",Te,c,fe),de.target=Rt,de.relatedTarget=te,ge=null,vo(fe)===oe&&(Ie=new Ie(X,q+"enter",Ne,c,fe),Ie.target=te,Ie.relatedTarget=Rt,ge=Ie),Rt=ge,Te&&Ne)t:{for(Ie=Te,X=Ne,q=0,te=Ie;te;te=us(te))q++;for(te=0,ge=X;ge;ge=us(ge))te++;for(;0<q-te;)Ie=us(Ie),q--;for(;0<te-q;)X=us(X),te--;for(;q--;){if(Ie===X||X!==null&&Ie===X.alternate)break t;Ie=us(Ie),X=us(X)}Ie=null}else Ie=null;Te!==null&&Iy(he,de,Te,Ie,!1),Ne!==null&&Rt!==null&&Iy(he,Rt,Ne,Ie,!0)}}e:{if(de=oe?ds(oe):window,Te=de.nodeName&&de.nodeName.toLowerCase(),Te==="select"||Te==="input"&&de.type==="file")var Oe=L_;else if(dy(de))if(hy)Oe=B_;else{Oe=$_;var Le=F_}else(Te=de.nodeName)&&Te.toLowerCase()==="input"&&(de.type==="checkbox"||de.type==="radio")&&(Oe=V_);if(Oe&&(Oe=Oe(i,oe))){fy(he,Oe,c,fe);break e}Le&&Le(i,de,oe),i==="focusout"&&(Le=de._wrapperState)&&Le.controlled&&de.type==="number"&&_n(de,"number",de.value)}switch(Le=oe?ds(oe):window,i){case"focusin":(dy(Le)||Le.contentEditable==="true")&&(as=Le,cf=oe,Ra=null);break;case"focusout":Ra=cf=as=null;break;case"mousedown":df=!0;break;case"contextmenu":case"mouseup":case"dragend":df=!1,by(he,c,fe);break;case"selectionchange":if(W_)break;case"keydown":case"keyup":by(he,c,fe)}var Fe;if(sf)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else ss?uy(i,c)&&(Ue="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ue="onCompositionStart");Ue&&(sy&&c.locale!=="ko"&&(ss||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ss&&(Fe=ty()):(Ai=fe,Jd="value"in Ai?Ai.value:Ai.textContent,ss=!0)),Le=uu(oe,Ue),0<Le.length&&(Ue=new iy(Ue,i,null,c,fe),he.push({event:Ue,listeners:Le}),Fe?Ue.data=Fe:(Fe=cy(c),Fe!==null&&(Ue.data=Fe)))),(Fe=A_?O_(i,c):D_(i,c))&&(oe=uu(oe,"onBeforeInput"),0<oe.length&&(fe=new iy("onBeforeInput","beforeinput",null,c,fe),he.push({event:fe,listeners:oe}),fe.data=Fe))}jy(he,s)})}function Oa(i,s,c){return{instance:i,listener:s,currentTarget:c}}function uu(i,s){for(var c=s+"Capture",m=[];i!==null;){var v=i,w=v.stateNode;v.tag===5&&w!==null&&(v=w,w=jn(i,c),w!=null&&m.unshift(Oa(i,w,v)),w=jn(i,s),w!=null&&m.push(Oa(i,w,v))),i=i.return}return m}function us(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Iy(i,s,c,m,v){for(var w=s._reactName,T=[];c!==null&&c!==m;){var z=c,H=z.alternate,oe=z.stateNode;if(H!==null&&H===m)break;z.tag===5&&oe!==null&&(z=oe,v?(H=jn(c,w),H!=null&&T.unshift(Oa(c,H,z))):v||(H=jn(c,w),H!=null&&T.push(Oa(c,H,z)))),c=c.return}T.length!==0&&i.push({event:s,listeners:T})}var Y_=/\r\n?/g,K_=/\u0000|\uFFFD/g;function Ay(i){return(typeof i=="string"?i:""+i).replace(Y_,`
|
|
38
|
+
`).replace(K_,"")}function cu(i,s,c){if(s=Ay(s),Ay(i)!==s&&c)throw Error(n(425))}function du(){}var yf=null,vf=null;function xf(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var wf=typeof setTimeout=="function"?setTimeout:void 0,G_=typeof clearTimeout=="function"?clearTimeout:void 0,Oy=typeof Promise=="function"?Promise:void 0,X_=typeof queueMicrotask=="function"?queueMicrotask:typeof Oy<"u"?function(i){return Oy.resolve(null).then(i).catch(J_)}:wf;function J_(i){setTimeout(function(){throw i})}function bf(i,s){var c=s,m=0;do{var v=c.nextSibling;if(i.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"){if(m===0){i.removeChild(v),Ca(s);return}m--}else c!=="$"&&c!=="$?"&&c!=="$!"||m++;c=v}while(c);Ca(s)}function Di(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function Dy(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var cs=Math.random().toString(36).slice(2),Br="__reactFiber$"+cs,Da="__reactProps$"+cs,si="__reactContainer$"+cs,kf="__reactEvents$"+cs,eT="__reactListeners$"+cs,tT="__reactHandles$"+cs;function vo(i){var s=i[Br];if(s)return s;for(var c=i.parentNode;c;){if(s=c[si]||c[Br]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=Dy(i);i!==null;){if(c=i[Br])return c;i=Dy(i)}return s}i=c,c=i.parentNode}return null}function za(i){return i=i[Br]||i[si],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ds(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function fu(i){return i[Da]||null}var Sf=[],fs=-1;function zi(i){return{current:i}}function vt(i){0>fs||(i.current=Sf[fs],Sf[fs]=null,fs--)}function mt(i,s){fs++,Sf[fs]=i.current,i.current=s}var Mi={},ln=zi(Mi),Rn=zi(!1),xo=Mi;function hs(i,s){var c=i.type.contextTypes;if(!c)return Mi;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var v={},w;for(w in c)v[w]=s[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=v),v}function In(i){return i=i.childContextTypes,i!=null}function hu(){vt(Rn),vt(ln)}function zy(i,s,c){if(ln.current!==Mi)throw Error(n(168));mt(ln,s),mt(Rn,c)}function My(i,s,c){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return c;m=m.getChildContext();for(var v in m)if(!(v in s))throw Error(n(108,ie(i)||"Unknown",v));return N({},c,m)}function pu(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Mi,xo=ln.current,mt(ln,i),mt(Rn,Rn.current),!0}function Ly(i,s,c){var m=i.stateNode;if(!m)throw Error(n(169));c?(i=My(i,s,xo),m.__reactInternalMemoizedMergedChildContext=i,vt(Rn),vt(ln),mt(ln,i)):vt(Rn),mt(Rn,c)}var ai=null,mu=!1,Cf=!1;function Fy(i){ai===null?ai=[i]:ai.push(i)}function nT(i){mu=!0,Fy(i)}function Li(){if(!Cf&&ai!==null){Cf=!0;var i=0,s=at;try{var c=ai;for(at=1;i<c.length;i++){var m=c[i];do m=m(!0);while(m!==null)}ai=null,mu=!1}catch(v){throw ai!==null&&(ai=ai.slice(i+1)),Vg(Wd,Li),v}finally{at=s,Cf=!1}}return null}var ps=[],ms=0,gu=null,yu=0,nr=[],rr=0,wo=null,li=1,ui="";function bo(i,s){ps[ms++]=yu,ps[ms++]=gu,gu=i,yu=s}function $y(i,s,c){nr[rr++]=li,nr[rr++]=ui,nr[rr++]=wo,wo=i;var m=li;i=ui;var v=32-wr(m)-1;m&=~(1<<v),c+=1;var w=32-wr(s)+v;if(30<w){var T=v-v%5;w=(m&(1<<T)-1).toString(32),m>>=T,v-=T,li=1<<32-wr(s)+v|c<<v|m,ui=w+i}else li=1<<w|c<<v|m,ui=i}function Ef(i){i.return!==null&&(bo(i,1),$y(i,1,0))}function _f(i){for(;i===gu;)gu=ps[--ms],ps[ms]=null,yu=ps[--ms],ps[ms]=null;for(;i===wo;)wo=nr[--rr],nr[rr]=null,ui=nr[--rr],nr[rr]=null,li=nr[--rr],nr[rr]=null}var Zn=null,qn=null,xt=!1,kr=null;function Vy(i,s){var c=ar(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function By(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Zn=i,qn=Di(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Zn=i,qn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=wo!==null?{id:li,overflow:ui}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=ar(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Zn=i,qn=null,!0):!1;default:return!1}}function Tf(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Pf(i){if(xt){var s=qn;if(s){var c=s;if(!By(i,s)){if(Tf(i))throw Error(n(418));s=Di(c.nextSibling);var m=Zn;s&&By(i,s)?Vy(m,c):(i.flags=i.flags&-4097|2,xt=!1,Zn=i)}}else{if(Tf(i))throw Error(n(418));i.flags=i.flags&-4097|2,xt=!1,Zn=i}}}function Uy(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Zn=i}function vu(i){if(i!==Zn)return!1;if(!xt)return Uy(i),xt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!xf(i.type,i.memoizedProps)),s&&(s=qn)){if(Tf(i))throw Hy(),Error(n(418));for(;s;)Vy(i,s),s=Di(s.nextSibling)}if(Uy(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){qn=Di(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}qn=null}}else qn=Zn?Di(i.stateNode.nextSibling):null;return!0}function Hy(){for(var i=qn;i;)i=Di(i.nextSibling)}function gs(){qn=Zn=null,xt=!1}function Nf(i){kr===null?kr=[i]:kr.push(i)}var rT=R.ReactCurrentBatchConfig;function Ma(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var m=c.stateNode}if(!m)throw Error(n(147,i));var v=m,w=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(T){var z=v.refs;T===null?delete z[w]:z[w]=T},s._stringRef=w,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function xu(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Wy(i){var s=i._init;return s(i._payload)}function Zy(i){function s(X,q){if(i){var te=X.deletions;te===null?(X.deletions=[q],X.flags|=16):te.push(q)}}function c(X,q){if(!i)return null;for(;q!==null;)s(X,q),q=q.sibling;return null}function m(X,q){for(X=new Map;q!==null;)q.key!==null?X.set(q.key,q):X.set(q.index,q),q=q.sibling;return X}function v(X,q){return X=Zi(X,q),X.index=0,X.sibling=null,X}function w(X,q,te){return X.index=te,i?(te=X.alternate,te!==null?(te=te.index,te<q?(X.flags|=2,q):te):(X.flags|=2,q)):(X.flags|=1048576,q)}function T(X){return i&&X.alternate===null&&(X.flags|=2),X}function z(X,q,te,ge){return q===null||q.tag!==6?(q=wh(te,X.mode,ge),q.return=X,q):(q=v(q,te),q.return=X,q)}function H(X,q,te,ge){var Oe=te.type;return Oe===F?fe(X,q,te.props.children,ge,te.key):q!==null&&(q.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Q&&Wy(Oe)===q.type)?(ge=v(q,te.props),ge.ref=Ma(X,q,te),ge.return=X,ge):(ge=Uu(te.type,te.key,te.props,null,X.mode,ge),ge.ref=Ma(X,q,te),ge.return=X,ge)}function oe(X,q,te,ge){return q===null||q.tag!==4||q.stateNode.containerInfo!==te.containerInfo||q.stateNode.implementation!==te.implementation?(q=bh(te,X.mode,ge),q.return=X,q):(q=v(q,te.children||[]),q.return=X,q)}function fe(X,q,te,ge,Oe){return q===null||q.tag!==7?(q=No(te,X.mode,ge,Oe),q.return=X,q):(q=v(q,te),q.return=X,q)}function he(X,q,te){if(typeof q=="string"&&q!==""||typeof q=="number")return q=wh(""+q,X.mode,te),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case A:return te=Uu(q.type,q.key,q.props,null,X.mode,te),te.ref=Ma(X,null,q),te.return=X,te;case j:return q=bh(q,X.mode,te),q.return=X,q;case Q:var ge=q._init;return he(X,ge(q._payload),te)}if(Tn(q)||G(q))return q=No(q,X.mode,te,null),q.return=X,q;xu(X,q)}return null}function de(X,q,te,ge){var Oe=q!==null?q.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return Oe!==null?null:z(X,q,""+te,ge);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case A:return te.key===Oe?H(X,q,te,ge):null;case j:return te.key===Oe?oe(X,q,te,ge):null;case Q:return Oe=te._init,de(X,q,Oe(te._payload),ge)}if(Tn(te)||G(te))return Oe!==null?null:fe(X,q,te,ge,null);xu(X,te)}return null}function Te(X,q,te,ge,Oe){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return X=X.get(te)||null,z(q,X,""+ge,Oe);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case A:return X=X.get(ge.key===null?te:ge.key)||null,H(q,X,ge,Oe);case j:return X=X.get(ge.key===null?te:ge.key)||null,oe(q,X,ge,Oe);case Q:var Le=ge._init;return Te(X,q,te,Le(ge._payload),Oe)}if(Tn(ge)||G(ge))return X=X.get(te)||null,fe(q,X,ge,Oe,null);xu(q,ge)}return null}function Ne(X,q,te,ge){for(var Oe=null,Le=null,Fe=q,Ue=q=0,Yt=null;Fe!==null&&Ue<te.length;Ue++){Fe.index>Ue?(Yt=Fe,Fe=null):Yt=Fe.sibling;var et=de(X,Fe,te[Ue],ge);if(et===null){Fe===null&&(Fe=Yt);break}i&&Fe&&et.alternate===null&&s(X,Fe),q=w(et,q,Ue),Le===null?Oe=et:Le.sibling=et,Le=et,Fe=Yt}if(Ue===te.length)return c(X,Fe),xt&&bo(X,Ue),Oe;if(Fe===null){for(;Ue<te.length;Ue++)Fe=he(X,te[Ue],ge),Fe!==null&&(q=w(Fe,q,Ue),Le===null?Oe=Fe:Le.sibling=Fe,Le=Fe);return xt&&bo(X,Ue),Oe}for(Fe=m(X,Fe);Ue<te.length;Ue++)Yt=Te(Fe,X,Ue,te[Ue],ge),Yt!==null&&(i&&Yt.alternate!==null&&Fe.delete(Yt.key===null?Ue:Yt.key),q=w(Yt,q,Ue),Le===null?Oe=Yt:Le.sibling=Yt,Le=Yt);return i&&Fe.forEach(function(qi){return s(X,qi)}),xt&&bo(X,Ue),Oe}function Ie(X,q,te,ge){var Oe=G(te);if(typeof Oe!="function")throw Error(n(150));if(te=Oe.call(te),te==null)throw Error(n(151));for(var Le=Oe=null,Fe=q,Ue=q=0,Yt=null,et=te.next();Fe!==null&&!et.done;Ue++,et=te.next()){Fe.index>Ue?(Yt=Fe,Fe=null):Yt=Fe.sibling;var qi=de(X,Fe,et.value,ge);if(qi===null){Fe===null&&(Fe=Yt);break}i&&Fe&&qi.alternate===null&&s(X,Fe),q=w(qi,q,Ue),Le===null?Oe=qi:Le.sibling=qi,Le=qi,Fe=Yt}if(et.done)return c(X,Fe),xt&&bo(X,Ue),Oe;if(Fe===null){for(;!et.done;Ue++,et=te.next())et=he(X,et.value,ge),et!==null&&(q=w(et,q,Ue),Le===null?Oe=et:Le.sibling=et,Le=et);return xt&&bo(X,Ue),Oe}for(Fe=m(X,Fe);!et.done;Ue++,et=te.next())et=Te(Fe,X,Ue,et.value,ge),et!==null&&(i&&et.alternate!==null&&Fe.delete(et.key===null?Ue:et.key),q=w(et,q,Ue),Le===null?Oe=et:Le.sibling=et,Le=et);return i&&Fe.forEach(function(zT){return s(X,zT)}),xt&&bo(X,Ue),Oe}function Rt(X,q,te,ge){if(typeof te=="object"&&te!==null&&te.type===F&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case A:e:{for(var Oe=te.key,Le=q;Le!==null;){if(Le.key===Oe){if(Oe=te.type,Oe===F){if(Le.tag===7){c(X,Le.sibling),q=v(Le,te.props.children),q.return=X,X=q;break e}}else if(Le.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Q&&Wy(Oe)===Le.type){c(X,Le.sibling),q=v(Le,te.props),q.ref=Ma(X,Le,te),q.return=X,X=q;break e}c(X,Le);break}else s(X,Le);Le=Le.sibling}te.type===F?(q=No(te.props.children,X.mode,ge,te.key),q.return=X,X=q):(ge=Uu(te.type,te.key,te.props,null,X.mode,ge),ge.ref=Ma(X,q,te),ge.return=X,X=ge)}return T(X);case j:e:{for(Le=te.key;q!==null;){if(q.key===Le)if(q.tag===4&&q.stateNode.containerInfo===te.containerInfo&&q.stateNode.implementation===te.implementation){c(X,q.sibling),q=v(q,te.children||[]),q.return=X,X=q;break e}else{c(X,q);break}else s(X,q);q=q.sibling}q=bh(te,X.mode,ge),q.return=X,X=q}return T(X);case Q:return Le=te._init,Rt(X,q,Le(te._payload),ge)}if(Tn(te))return Ne(X,q,te,ge);if(G(te))return Ie(X,q,te,ge);xu(X,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,q!==null&&q.tag===6?(c(X,q.sibling),q=v(q,te),q.return=X,X=q):(c(X,q),q=wh(te,X.mode,ge),q.return=X,X=q),T(X)):c(X,q)}return Rt}var ys=Zy(!0),qy=Zy(!1),wu=zi(null),bu=null,vs=null,jf=null;function Rf(){jf=vs=bu=null}function If(i){var s=wu.current;vt(wu),i._currentValue=s}function Af(i,s,c){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===c)break;i=i.return}}function xs(i,s){bu=i,jf=vs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(An=!0),i.firstContext=null)}function ir(i){var s=i._currentValue;if(jf!==i)if(i={context:i,memoizedValue:s,next:null},vs===null){if(bu===null)throw Error(n(308));vs=i,bu.dependencies={lanes:0,firstContext:i}}else vs=vs.next=i;return s}var ko=null;function Of(i){ko===null?ko=[i]:ko.push(i)}function Qy(i,s,c,m){var v=s.interleaved;return v===null?(c.next=c,Of(s)):(c.next=v.next,v.next=c),s.interleaved=c,ci(i,m)}function ci(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Fi=!1;function Df(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yy(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function di(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function $i(i,s,c){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(Je&2)!==0){var v=m.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),m.pending=s,ci(i,c)}return v=m.interleaved,v===null?(s.next=s,Of(m)):(s.next=v.next,v.next=s),m.interleaved=s,ci(i,c)}function ku(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,Qd(i,c)}}function Ky(i,s){var c=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var v=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var T={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};w===null?v=w=T:w=w.next=T,c=c.next}while(c!==null);w===null?v=w=s:w=w.next=s}else v=w=s;c={baseState:m.baseState,firstBaseUpdate:v,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function Su(i,s,c,m){var v=i.updateQueue;Fi=!1;var w=v.firstBaseUpdate,T=v.lastBaseUpdate,z=v.shared.pending;if(z!==null){v.shared.pending=null;var H=z,oe=H.next;H.next=null,T===null?w=oe:T.next=oe,T=H;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,z=fe.lastBaseUpdate,z!==T&&(z===null?fe.firstBaseUpdate=oe:z.next=oe,fe.lastBaseUpdate=H))}if(w!==null){var he=v.baseState;T=0,fe=oe=H=null,z=w;do{var de=z.lane,Te=z.eventTime;if((m&de)===de){fe!==null&&(fe=fe.next={eventTime:Te,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var Ne=i,Ie=z;switch(de=s,Te=c,Ie.tag){case 1:if(Ne=Ie.payload,typeof Ne=="function"){he=Ne.call(Te,he,de);break e}he=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ie.payload,de=typeof Ne=="function"?Ne.call(Te,he,de):Ne,de==null)break e;he=N({},he,de);break e;case 2:Fi=!0}}z.callback!==null&&z.lane!==0&&(i.flags|=64,de=v.effects,de===null?v.effects=[z]:de.push(z))}else Te={eventTime:Te,lane:de,tag:z.tag,payload:z.payload,callback:z.callback,next:null},fe===null?(oe=fe=Te,H=he):fe=fe.next=Te,T|=de;if(z=z.next,z===null){if(z=v.shared.pending,z===null)break;de=z,z=de.next,de.next=null,v.lastBaseUpdate=de,v.shared.pending=null}}while(!0);if(fe===null&&(H=he),v.baseState=H,v.firstBaseUpdate=oe,v.lastBaseUpdate=fe,s=v.shared.interleaved,s!==null){v=s;do T|=v.lane,v=v.next;while(v!==s)}else w===null&&(v.shared.lanes=0);Eo|=T,i.lanes=T,i.memoizedState=he}}function Gy(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var m=i[s],v=m.callback;if(v!==null){if(m.callback=null,m=c,typeof v!="function")throw Error(n(191,v));v.call(m)}}}var La={},Ur=zi(La),Fa=zi(La),$a=zi(La);function So(i){if(i===La)throw Error(n(174));return i}function zf(i,s){switch(mt($a,s),mt(Fa,i),mt(Ur,La),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:se(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=se(s,i)}vt(Ur),mt(Ur,s)}function ws(){vt(Ur),vt(Fa),vt($a)}function Xy(i){So($a.current);var s=So(Ur.current),c=se(s,i.type);s!==c&&(mt(Fa,i),mt(Ur,c))}function Mf(i){Fa.current===i&&(vt(Ur),vt(Fa))}var kt=zi(0);function Cu(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Lf=[];function Ff(){for(var i=0;i<Lf.length;i++)Lf[i]._workInProgressVersionPrimary=null;Lf.length=0}var Eu=R.ReactCurrentDispatcher,$f=R.ReactCurrentBatchConfig,Co=0,St=null,Vt=null,qt=null,_u=!1,Va=!1,Ba=0,iT=0;function un(){throw Error(n(321))}function Vf(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!br(i[c],s[c]))return!1;return!0}function Bf(i,s,c,m,v,w){if(Co=w,St=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Eu.current=i===null||i.memoizedState===null?lT:uT,i=c(m,v),Va){w=0;do{if(Va=!1,Ba=0,25<=w)throw Error(n(301));w+=1,qt=Vt=null,s.updateQueue=null,Eu.current=cT,i=c(m,v)}while(Va)}if(Eu.current=Nu,s=Vt!==null&&Vt.next!==null,Co=0,qt=Vt=St=null,_u=!1,s)throw Error(n(300));return i}function Uf(){var i=Ba!==0;return Ba=0,i}function Hr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?St.memoizedState=qt=i:qt=qt.next=i,qt}function or(){if(Vt===null){var i=St.alternate;i=i!==null?i.memoizedState:null}else i=Vt.next;var s=qt===null?St.memoizedState:qt.next;if(s!==null)qt=s,Vt=i;else{if(i===null)throw Error(n(310));Vt=i,i={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},qt===null?St.memoizedState=qt=i:qt=qt.next=i}return qt}function Ua(i,s){return typeof s=="function"?s(i):s}function Hf(i){var s=or(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var m=Vt,v=m.baseQueue,w=c.pending;if(w!==null){if(v!==null){var T=v.next;v.next=w.next,w.next=T}m.baseQueue=v=w,c.pending=null}if(v!==null){w=v.next,m=m.baseState;var z=T=null,H=null,oe=w;do{var fe=oe.lane;if((Co&fe)===fe)H!==null&&(H=H.next={lane:0,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),m=oe.hasEagerState?oe.eagerState:i(m,oe.action);else{var he={lane:fe,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null};H===null?(z=H=he,T=m):H=H.next=he,St.lanes|=fe,Eo|=fe}oe=oe.next}while(oe!==null&&oe!==w);H===null?T=m:H.next=z,br(m,s.memoizedState)||(An=!0),s.memoizedState=m,s.baseState=T,s.baseQueue=H,c.lastRenderedState=m}if(i=c.interleaved,i!==null){v=i;do w=v.lane,St.lanes|=w,Eo|=w,v=v.next;while(v!==i)}else v===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Wf(i){var s=or(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var m=c.dispatch,v=c.pending,w=s.memoizedState;if(v!==null){c.pending=null;var T=v=v.next;do w=i(w,T.action),T=T.next;while(T!==v);br(w,s.memoizedState)||(An=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),c.lastRenderedState=w}return[w,m]}function Jy(){}function ev(i,s){var c=St,m=or(),v=s(),w=!br(m.memoizedState,v);if(w&&(m.memoizedState=v,An=!0),m=m.queue,Zf(rv.bind(null,c,m,i),[i]),m.getSnapshot!==s||w||qt!==null&&qt.memoizedState.tag&1){if(c.flags|=2048,Ha(9,nv.bind(null,c,m,v,s),void 0,null),Qt===null)throw Error(n(349));(Co&30)!==0||tv(c,s,v)}return v}function tv(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=St.updateQueue,s===null?(s={lastEffect:null,stores:null},St.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function nv(i,s,c,m){s.value=c,s.getSnapshot=m,iv(s)&&ov(i)}function rv(i,s,c){return c(function(){iv(s)&&ov(i)})}function iv(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!br(i,c)}catch{return!0}}function ov(i){var s=ci(i,1);s!==null&&_r(s,i,1,-1)}function sv(i){var s=Hr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:i},s.queue=i,i=i.dispatch=aT.bind(null,St,i),[s.memoizedState,i]}function Ha(i,s,c,m){return i={tag:i,create:s,destroy:c,deps:m,next:null},s=St.updateQueue,s===null?(s={lastEffect:null,stores:null},St.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(m=c.next,c.next=i,i.next=m,s.lastEffect=i)),i}function av(){return or().memoizedState}function Tu(i,s,c,m){var v=Hr();St.flags|=i,v.memoizedState=Ha(1|s,c,void 0,m===void 0?null:m)}function Pu(i,s,c,m){var v=or();m=m===void 0?null:m;var w=void 0;if(Vt!==null){var T=Vt.memoizedState;if(w=T.destroy,m!==null&&Vf(m,T.deps)){v.memoizedState=Ha(s,c,w,m);return}}St.flags|=i,v.memoizedState=Ha(1|s,c,w,m)}function lv(i,s){return Tu(8390656,8,i,s)}function Zf(i,s){return Pu(2048,8,i,s)}function uv(i,s){return Pu(4,2,i,s)}function cv(i,s){return Pu(4,4,i,s)}function dv(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function fv(i,s,c){return c=c!=null?c.concat([i]):null,Pu(4,4,dv.bind(null,s,i),c)}function qf(){}function hv(i,s){var c=or();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Vf(s,m[1])?m[0]:(c.memoizedState=[i,s],i)}function pv(i,s){var c=or();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Vf(s,m[1])?m[0]:(i=i(),c.memoizedState=[i,s],i)}function mv(i,s,c){return(Co&21)===0?(i.baseState&&(i.baseState=!1,An=!0),i.memoizedState=c):(br(c,s)||(c=Wg(),St.lanes|=c,Eo|=c,i.baseState=!0),s)}function oT(i,s){var c=at;at=c!==0&&4>c?c:4,i(!0);var m=$f.transition;$f.transition={};try{i(!1),s()}finally{at=c,$f.transition=m}}function gv(){return or().memoizedState}function sT(i,s,c){var m=Hi(i);if(c={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null},yv(i))vv(s,c);else if(c=Qy(i,s,c,m),c!==null){var v=yn();_r(c,i,m,v),xv(c,s,m)}}function aT(i,s,c){var m=Hi(i),v={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null};if(yv(i))vv(s,v);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var T=s.lastRenderedState,z=w(T,c);if(v.hasEagerState=!0,v.eagerState=z,br(z,T)){var H=s.interleaved;H===null?(v.next=v,Of(s)):(v.next=H.next,H.next=v),s.interleaved=v;return}}catch{}finally{}c=Qy(i,s,v,m),c!==null&&(v=yn(),_r(c,i,m,v),xv(c,s,m))}}function yv(i){var s=i.alternate;return i===St||s!==null&&s===St}function vv(i,s){Va=_u=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function xv(i,s,c){if((c&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,Qd(i,c)}}var Nu={readContext:ir,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useInsertionEffect:un,useLayoutEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useMutableSource:un,useSyncExternalStore:un,useId:un,unstable_isNewReconciler:!1},lT={readContext:ir,useCallback:function(i,s){return Hr().memoizedState=[i,s===void 0?null:s],i},useContext:ir,useEffect:lv,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,Tu(4194308,4,dv.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Tu(4194308,4,i,s)},useInsertionEffect:function(i,s){return Tu(4,2,i,s)},useMemo:function(i,s){var c=Hr();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var m=Hr();return s=c!==void 0?c(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=sT.bind(null,St,i),[m.memoizedState,i]},useRef:function(i){var s=Hr();return i={current:i},s.memoizedState=i},useState:sv,useDebugValue:qf,useDeferredValue:function(i){return Hr().memoizedState=i},useTransition:function(){var i=sv(!1),s=i[0];return i=oT.bind(null,i[1]),Hr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var m=St,v=Hr();if(xt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Qt===null)throw Error(n(349));(Co&30)!==0||tv(m,s,c)}v.memoizedState=c;var w={value:c,getSnapshot:s};return v.queue=w,lv(rv.bind(null,m,w,i),[i]),m.flags|=2048,Ha(9,nv.bind(null,m,w,c,s),void 0,null),c},useId:function(){var i=Hr(),s=Qt.identifierPrefix;if(xt){var c=ui,m=li;c=(m&~(1<<32-wr(m)-1)).toString(32)+c,s=":"+s+"R"+c,c=Ba++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=iT++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},uT={readContext:ir,useCallback:hv,useContext:ir,useEffect:Zf,useImperativeHandle:fv,useInsertionEffect:uv,useLayoutEffect:cv,useMemo:pv,useReducer:Hf,useRef:av,useState:function(){return Hf(Ua)},useDebugValue:qf,useDeferredValue:function(i){var s=or();return mv(s,Vt.memoizedState,i)},useTransition:function(){var i=Hf(Ua)[0],s=or().memoizedState;return[i,s]},useMutableSource:Jy,useSyncExternalStore:ev,useId:gv,unstable_isNewReconciler:!1},cT={readContext:ir,useCallback:hv,useContext:ir,useEffect:Zf,useImperativeHandle:fv,useInsertionEffect:uv,useLayoutEffect:cv,useMemo:pv,useReducer:Wf,useRef:av,useState:function(){return Wf(Ua)},useDebugValue:qf,useDeferredValue:function(i){var s=or();return Vt===null?s.memoizedState=i:mv(s,Vt.memoizedState,i)},useTransition:function(){var i=Wf(Ua)[0],s=or().memoizedState;return[i,s]},useMutableSource:Jy,useSyncExternalStore:ev,useId:gv,unstable_isNewReconciler:!1};function Sr(i,s){if(i&&i.defaultProps){s=N({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Qf(i,s,c,m){s=i.memoizedState,c=c(m,s),c=c==null?s:N({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var ju={isMounted:function(i){return(i=i._reactInternals)?yo(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var m=yn(),v=Hi(i),w=di(m,v);w.payload=s,c!=null&&(w.callback=c),s=$i(i,w,v),s!==null&&(_r(s,i,v,m),ku(s,i,v))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var m=yn(),v=Hi(i),w=di(m,v);w.tag=1,w.payload=s,c!=null&&(w.callback=c),s=$i(i,w,v),s!==null&&(_r(s,i,v,m),ku(s,i,v))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=yn(),m=Hi(i),v=di(c,m);v.tag=2,s!=null&&(v.callback=s),s=$i(i,v,m),s!==null&&(_r(s,i,m,c),ku(s,i,m))}};function wv(i,s,c,m,v,w,T){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,w,T):s.prototype&&s.prototype.isPureReactComponent?!ja(c,m)||!ja(v,w):!0}function bv(i,s,c){var m=!1,v=Mi,w=s.contextType;return typeof w=="object"&&w!==null?w=ir(w):(v=In(s)?xo:ln.current,m=s.contextTypes,w=(m=m!=null)?hs(i,v):Mi),s=new s(c,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ju,i.stateNode=s,s._reactInternals=i,m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=v,i.__reactInternalMemoizedMaskedChildContext=w),s}function kv(i,s,c,m){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,m),s.state!==i&&ju.enqueueReplaceState(s,s.state,null)}function Yf(i,s,c,m){var v=i.stateNode;v.props=c,v.state=i.memoizedState,v.refs={},Df(i);var w=s.contextType;typeof w=="object"&&w!==null?v.context=ir(w):(w=In(s)?xo:ln.current,v.context=hs(i,w)),v.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Qf(i,s,w,c),v.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(s=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),s!==v.state&&ju.enqueueReplaceState(v,v.state,null),Su(i,c,v,m),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308)}function bs(i,s){try{var c="",m=s;do c+=ve(m),m=m.return;while(m);var v=c}catch(w){v=`
|
|
39
39
|
Error generating stack: `+w.message+`
|
|
40
|
-
`+w.stack}return{value:i,source:s,stack:v,digest:null}}function Kf(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Gf(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var fT=typeof WeakMap=="function"?WeakMap:Map;function Cv(i,s,c){c=di(-1,c),c.tag=3,c.payload={element:null};var m=s.value;return c.callback=function(){Mu||(Mu=!0,fh=m),Gf(i,s)},c}function Ev(i,s,c){c=di(-1,c),c.tag=3;var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var v=s.value;c.payload=function(){return m(v)},c.callback=function(){Gf(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(c.callback=function(){Gf(i,s),typeof m!="function"&&(Bi===null?Bi=new Set([this]):Bi.add(this));var T=s.stack;this.componentDidCatch(s.value,{componentStack:T!==null?T:""})}),c}function _v(i,s,c){var m=i.pingCache;if(m===null){m=i.pingCache=new fT;var v=new Set;m.set(s,v)}else v=m.get(s),v===void 0&&(v=new Set,m.set(s,v));v.has(c)||(v.add(c),i=_T.bind(null,i,s,c),s.then(i,i))}function Tv(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Pv(i,s,c,m,v){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=di(-1,1),s.tag=2,$i(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=v,i)}var hT=R.ReactCurrentOwner,An=!1;function gn(i,s,c,m){s.child=i===null?Qy(s,null,c,m):ys(s,i.child,c,m)}function Nv(i,s,c,m,v){c=c.render;var w=s.ref;return xs(s,v),m=Bf(i,s,c,m,w,v),c=Uf(),i!==null&&!An?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~v,fi(i,s,v)):(xt&&c&&Ef(s),s.flags|=1,gn(i,s,m,v),s.child)}function jv(i,s,c,m,v){if(i===null){var w=c.type;return typeof w=="function"&&!xh(w)&&w.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=w,Rv(i,s,w,m,v)):(i=Uu(c.type,null,m,s,s.mode,v),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,(i.lanes&v)===0){var T=w.memoizedProps;if(c=c.compare,c=c!==null?c:ja,c(T,m)&&i.ref===s.ref)return fi(i,s,v)}return s.flags|=1,i=Zi(w,m),i.ref=s.ref,i.return=s,s.child=i}function Rv(i,s,c,m,v){if(i!==null){var w=i.memoizedProps;if(ja(w,m)&&i.ref===s.ref)if(An=!1,s.pendingProps=m=w,(i.lanes&v)!==0)(i.flags&131072)!==0&&(An=!0);else return s.lanes=i.lanes,fi(i,s,v)}return Xf(i,s,c,m,v)}function Iv(i,s,c){var m=s.pendingProps,v=m.children,w=i!==null?i.memoizedState:null;if(m.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Ss,Qn),Qn|=c;else{if((c&1073741824)===0)return i=w!==null?w.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,mt(Ss,Qn),Qn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=w!==null?w.baseLanes:c,mt(Ss,Qn),Qn|=m}else w!==null?(m=w.baseLanes|c,s.memoizedState=null):m=c,mt(Ss,Qn),Qn|=m;return gn(i,s,v,c),s.child}function Av(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Xf(i,s,c,m,v){var w=In(c)?xo:ln.current;return w=hs(s,w),xs(s,v),c=Bf(i,s,c,m,w,v),m=Uf(),i!==null&&!An?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~v,fi(i,s,v)):(xt&&m&&Ef(s),s.flags|=1,gn(i,s,c,v),s.child)}function Ov(i,s,c,m,v){if(In(c)){var w=!0;pu(s)}else w=!1;if(xs(s,v),s.stateNode===null)Iu(i,s),kv(s,c,m),Yf(s,c,m,v),m=!0;else if(i===null){var T=s.stateNode,z=s.memoizedProps;T.props=z;var H=T.context,oe=c.contextType;typeof oe=="object"&&oe!==null?oe=ir(oe):(oe=In(c)?xo:ln.current,oe=hs(s,oe));var fe=c.getDerivedStateFromProps,he=typeof fe=="function"||typeof T.getSnapshotBeforeUpdate=="function";he||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==m||H!==oe)&&Sv(s,T,m,oe),Fi=!1;var de=s.memoizedState;T.state=de,Su(s,m,T,v),H=s.memoizedState,z!==m||de!==H||Rn.current||Fi?(typeof fe=="function"&&(Qf(s,c,fe,m),H=s.memoizedState),(z=Fi||bv(s,c,z,m,de,H,oe))?(he||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(s.flags|=4194308)):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=H),T.props=m,T.state=H,T.context=oe,m=z):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{T=s.stateNode,Ky(i,s),z=s.memoizedProps,oe=s.type===s.elementType?z:Sr(s.type,z),T.props=oe,he=s.pendingProps,de=T.context,H=c.contextType,typeof H=="object"&&H!==null?H=ir(H):(H=In(c)?xo:ln.current,H=hs(s,H));var Te=c.getDerivedStateFromProps;(fe=typeof Te=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==he||de!==H)&&Sv(s,T,m,H),Fi=!1,de=s.memoizedState,T.state=de,Su(s,m,T,v);var Ne=s.memoizedState;z!==he||de!==Ne||Rn.current||Fi?(typeof Te=="function"&&(Qf(s,c,Te,m),Ne=s.memoizedState),(oe=Fi||bv(s,c,oe,m,de,Ne,H)||!1)?(fe||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(m,Ne,H),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(m,Ne,H)),typeof T.componentDidUpdate=="function"&&(s.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof T.componentDidUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=Ne),T.props=m,T.state=Ne,T.context=H,m=oe):(typeof T.componentDidUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=1024),m=!1)}return Jf(i,s,c,m,w,v)}function Jf(i,s,c,m,v,w){Av(i,s);var T=(s.flags&128)!==0;if(!m&&!T)return v&&Fy(s,c,!1),fi(i,s,w);m=s.stateNode,hT.current=s;var z=T&&typeof c.getDerivedStateFromError!="function"?null:m.render();return s.flags|=1,i!==null&&T?(s.child=ys(s,i.child,null,w),s.child=ys(s,null,z,w)):gn(i,s,z,w),s.memoizedState=m.state,v&&Fy(s,c,!0),s.child}function Dv(i){var s=i.stateNode;s.pendingContext?My(i,s.pendingContext,s.pendingContext!==s.context):s.context&&My(i,s.context,!1),zf(i,s.containerInfo)}function zv(i,s,c,m,v){return gs(),Nf(v),s.flags|=256,gn(i,s,c,m),s.child}var eh={dehydrated:null,treeContext:null,retryLane:0};function th(i){return{baseLanes:i,cachePool:null,transitions:null}}function Mv(i,s,c){var m=s.pendingProps,v=kt.current,w=!1,T=(s.flags&128)!==0,z;if((z=T)||(z=i!==null&&i.memoizedState===null?!1:(v&2)!==0),z?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(v|=1),mt(kt,v&1),i===null)return Pf(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(T=m.children,i=m.fallback,w?(m=s.mode,w=s.child,T={mode:"hidden",children:T},(m&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=T):w=Hu(T,m,0,null),i=No(i,m,c,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=th(c),s.memoizedState=eh,i):nh(s,T));if(v=i.memoizedState,v!==null&&(z=v.dehydrated,z!==null))return pT(i,s,T,m,z,v,c);if(w){w=m.fallback,T=s.mode,v=i.child,z=v.sibling;var H={mode:"hidden",children:m.children};return(T&1)===0&&s.child!==v?(m=s.child,m.childLanes=0,m.pendingProps=H,s.deletions=null):(m=Zi(v,H),m.subtreeFlags=v.subtreeFlags&14680064),z!==null?w=Zi(z,w):(w=No(w,T,c,null),w.flags|=2),w.return=s,m.return=s,m.sibling=w,s.child=m,m=w,w=s.child,T=i.child.memoizedState,T=T===null?th(c):{baseLanes:T.baseLanes|c,cachePool:null,transitions:T.transitions},w.memoizedState=T,w.childLanes=i.childLanes&~c,s.memoizedState=eh,m}return w=i.child,i=w.sibling,m=Zi(w,{mode:"visible",children:m.children}),(s.mode&1)===0&&(m.lanes=c),m.return=s,m.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=m,s.memoizedState=null,m}function nh(i,s){return s=Hu({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Ru(i,s,c,m){return m!==null&&Nf(m),ys(s,i.child,null,c),i=nh(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function pT(i,s,c,m,v,w,T){if(c)return s.flags&256?(s.flags&=-257,m=Kf(Error(n(422))),Ru(i,s,T,m)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=m.fallback,v=s.mode,m=Hu({mode:"visible",children:m.children},v,0,null),w=No(w,v,T,null),w.flags|=2,m.return=s,w.return=s,m.sibling=w,s.child=m,(s.mode&1)!==0&&ys(s,i.child,null,T),s.child.memoizedState=th(T),s.memoizedState=eh,w);if((s.mode&1)===0)return Ru(i,s,T,null);if(v.data==="$!"){if(m=v.nextSibling&&v.nextSibling.dataset,m)var z=m.dgst;return m=z,w=Error(n(419)),m=Kf(w,m,void 0),Ru(i,s,T,m)}if(z=(T&i.childLanes)!==0,An||z){if(m=Qt,m!==null){switch(T&-T){case 4:v=2;break;case 16:v=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:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(m.suspendedLanes|T))!==0?0:v,v!==0&&v!==w.retryLane&&(w.retryLane=v,ci(i,v),_r(m,i,v,-1))}return vh(),m=Kf(Error(n(421))),Ru(i,s,T,m)}return v.data==="$?"?(s.flags|=128,s.child=i.child,s=TT.bind(null,i),v._reactRetry=s,null):(i=w.treeContext,qn=Di(v.nextSibling),Zn=s,xt=!0,kr=null,i!==null&&(nr[rr++]=li,nr[rr++]=ui,nr[rr++]=wo,li=i.id,ui=i.overflow,wo=s),s=nh(s,m.children),s.flags|=4096,s)}function Lv(i,s,c){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),Af(i.return,s,c)}function rh(i,s,c,m,v){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:v}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=m,w.tail=c,w.tailMode=v)}function Fv(i,s,c){var m=s.pendingProps,v=m.revealOrder,w=m.tail;if(gn(i,s,m.children,c),m=kt.current,(m&2)!==0)m=m&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Lv(i,c,s);else if(i.tag===19)Lv(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}m&=1}if(mt(kt,m),(s.mode&1)===0)s.memoizedState=null;else switch(v){case"forwards":for(c=s.child,v=null;c!==null;)i=c.alternate,i!==null&&Cu(i)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),rh(s,!1,v,c,w);break;case"backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(i=v.alternate,i!==null&&Cu(i)===null){s.child=v;break}i=v.sibling,v.sibling=c,c=v,v=i}rh(s,!0,c,null,w);break;case"together":rh(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Iu(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function fi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Eo|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=Zi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Zi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function mT(i,s,c){switch(s.tag){case 3:Dv(s),gs();break;case 5:Jy(s);break;case 1:In(s.type)&&pu(s);break;case 4:zf(s,s.stateNode.containerInfo);break;case 10:var m=s.type._context,v=s.memoizedProps.value;mt(wu,m._currentValue),m._currentValue=v;break;case 13:if(m=s.memoizedState,m!==null)return m.dehydrated!==null?(mt(kt,kt.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?Mv(i,s,c):(mt(kt,kt.current&1),i=fi(i,s,c),i!==null?i.sibling:null);mt(kt,kt.current&1);break;case 19:if(m=(c&s.childLanes)!==0,(i.flags&128)!==0){if(m)return Fv(i,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),mt(kt,kt.current),m)break;return null;case 22:case 23:return s.lanes=0,Iv(i,s,c)}return fi(i,s,c)}var $v,ih,Vv,Bv;$v=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},ih=function(){},Vv=function(i,s,c,m){var v=i.memoizedProps;if(v!==m){i=s.stateNode,So(Ur.current);var w=null;switch(c){case"input":v=It(i,v),m=It(i,m),w=[];break;case"select":v=N({},v,{value:void 0}),m=N({},m,{value:void 0}),w=[];break;case"textarea":v=ee(i,v),m=ee(i,m),w=[];break;default:typeof v.onClick!="function"&&typeof m.onClick=="function"&&(i.onclick=du)}pt(c,m);var T;c=null;for(oe in v)if(!m.hasOwnProperty(oe)&&v.hasOwnProperty(oe)&&v[oe]!=null)if(oe==="style"){var z=v[oe];for(T in z)z.hasOwnProperty(T)&&(c||(c={}),c[T]="")}else oe!=="dangerouslySetInnerHTML"&&oe!=="children"&&oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&oe!=="autoFocus"&&(o.hasOwnProperty(oe)?w||(w=[]):(w=w||[]).push(oe,null));for(oe in m){var H=m[oe];if(z=v!=null?v[oe]:void 0,m.hasOwnProperty(oe)&&H!==z&&(H!=null||z!=null))if(oe==="style")if(z){for(T in z)!z.hasOwnProperty(T)||H&&H.hasOwnProperty(T)||(c||(c={}),c[T]="");for(T in H)H.hasOwnProperty(T)&&z[T]!==H[T]&&(c||(c={}),c[T]=H[T])}else c||(w||(w=[]),w.push(oe,c)),c=H;else oe==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,z=z?z.__html:void 0,H!=null&&z!==H&&(w=w||[]).push(oe,H)):oe==="children"?typeof H!="string"&&typeof H!="number"||(w=w||[]).push(oe,""+H):oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&(o.hasOwnProperty(oe)?(H!=null&&oe==="onScroll"&&yt("scroll",i),w||z===H||(w=[])):(w=w||[]).push(oe,H))}c&&(w=w||[]).push("style",c);var oe=w;(s.updateQueue=oe)&&(s.flags|=4)}},Bv=function(i,s,c,m){c!==m&&(s.flags|=4)};function Wa(i,s){if(!xt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function cn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,m=0;if(s)for(var v=i.child;v!==null;)c|=v.lanes|v.childLanes,m|=v.subtreeFlags&14680064,m|=v.flags&14680064,v.return=i,v=v.sibling;else for(v=i.child;v!==null;)c|=v.lanes|v.childLanes,m|=v.subtreeFlags,m|=v.flags,v.return=i,v=v.sibling;return i.subtreeFlags|=m,i.childLanes=c,s}function gT(i,s,c){var m=s.pendingProps;switch(_f(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cn(s),null;case 1:return In(s.type)&&hu(),cn(s),null;case 3:return m=s.stateNode,ws(),vt(Rn),vt(ln),Ff(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(i===null||i.child===null)&&(vu(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,kr!==null&&(mh(kr),kr=null))),ih(i,s),cn(s),null;case 5:Mf(s);var v=So($a.current);if(c=s.type,i!==null&&s.stateNode!=null)Vv(i,s,c,m,v),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!m){if(s.stateNode===null)throw Error(n(166));return cn(s),null}if(i=So(Ur.current),vu(s)){m=s.stateNode,c=s.type;var w=s.memoizedProps;switch(m[Br]=s,m[Da]=w,i=(s.mode&1)!==0,c){case"dialog":yt("cancel",m),yt("close",m);break;case"iframe":case"object":case"embed":yt("load",m);break;case"video":case"audio":for(v=0;v<Ia.length;v++)yt(Ia[v],m);break;case"source":yt("error",m);break;case"img":case"image":case"link":yt("error",m),yt("load",m);break;case"details":yt("toggle",m);break;case"input":sn(m,w),yt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!w.multiple},yt("invalid",m);break;case"textarea":ae(m,w),yt("invalid",m)}pt(c,w),v=null;for(var T in w)if(w.hasOwnProperty(T)){var z=w[T];T==="children"?typeof z=="string"?m.textContent!==z&&(w.suppressHydrationWarning!==!0&&cu(m.textContent,z,i),v=["children",z]):typeof z=="number"&&m.textContent!==""+z&&(w.suppressHydrationWarning!==!0&&cu(m.textContent,z,i),v=["children",""+z]):o.hasOwnProperty(T)&&z!=null&&T==="onScroll"&&yt("scroll",m)}switch(c){case"input":Ae(m),tr(m,w,!0);break;case"textarea":Ae(m),ye(m);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(m.onclick=du)}m=v,s.updateQueue=m,m!==null&&(s.flags|=4)}else{T=v.nodeType===9?v:v.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=B(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=T.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=T.createElement(c,{is:m.is}):(i=T.createElement(c),c==="select"&&(T=i,m.multiple?T.multiple=!0:m.size&&(T.size=m.size))):i=T.createElementNS(i,c),i[Br]=s,i[Da]=m,$v(i,s,!1,!1),s.stateNode=i;e:{switch(T=pn(c,m),c){case"dialog":yt("cancel",i),yt("close",i),v=m;break;case"iframe":case"object":case"embed":yt("load",i),v=m;break;case"video":case"audio":for(v=0;v<Ia.length;v++)yt(Ia[v],i);v=m;break;case"source":yt("error",i),v=m;break;case"img":case"image":case"link":yt("error",i),yt("load",i),v=m;break;case"details":yt("toggle",i),v=m;break;case"input":sn(i,m),v=It(i,m),yt("invalid",i);break;case"option":v=m;break;case"select":i._wrapperState={wasMultiple:!!m.multiple},v=N({},m,{value:void 0}),yt("invalid",i);break;case"textarea":ae(i,m),v=ee(i,m),yt("invalid",i);break;default:v=m}pt(c,v),z=v;for(w in z)if(z.hasOwnProperty(w)){var H=z[w];w==="style"?$t(i,H):w==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&_e(i,H)):w==="children"?typeof H=="string"?(c!=="textarea"||H!=="")&&ze(i,H):typeof H=="number"&&ze(i,""+H):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(o.hasOwnProperty(w)?H!=null&&w==="onScroll"&&yt("scroll",i):H!=null&&P(i,w,H,T))}switch(c){case"input":Ae(i),tr(i,m,!1);break;case"textarea":Ae(i),ye(i);break;case"option":m.value!=null&&i.setAttribute("value",""+me(m.value));break;case"select":i.multiple=!!m.multiple,w=m.value,w!=null?$(i,!!m.multiple,w,!1):m.defaultValue!=null&&$(i,!!m.multiple,m.defaultValue,!0);break;default:typeof v.onClick=="function"&&(i.onclick=du)}switch(c){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return cn(s),null;case 6:if(i&&s.stateNode!=null)Bv(i,s,i.memoizedProps,m);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(c=So($a.current),So(Ur.current),vu(s)){if(m=s.stateNode,c=s.memoizedProps,m[Br]=s,(w=m.nodeValue!==c)&&(i=Zn,i!==null))switch(i.tag){case 3:cu(m.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&cu(m.nodeValue,c,(i.mode&1)!==0)}w&&(s.flags|=4)}else m=(c.nodeType===9?c:c.ownerDocument).createTextNode(m),m[Br]=s,s.stateNode=m}return cn(s),null;case 13:if(vt(kt),m=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(xt&&qn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Wy(),gs(),s.flags|=98560,w=!1;else if(w=vu(s),m!==null&&m.dehydrated!==null){if(i===null){if(!w)throw Error(n(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[Br]=s}else gs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;cn(s),w=!1}else kr!==null&&(mh(kr),kr=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(m=m!==null,m!==(i!==null&&i.memoizedState!==null)&&m&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(kt.current&1)!==0?Bt===0&&(Bt=3):vh())),s.updateQueue!==null&&(s.flags|=4),cn(s),null);case 4:return ws(),ih(i,s),i===null&&Aa(s.stateNode.containerInfo),cn(s),null;case 10:return If(s.type._context),cn(s),null;case 17:return In(s.type)&&hu(),cn(s),null;case 19:if(vt(kt),w=s.memoizedState,w===null)return cn(s),null;if(m=(s.flags&128)!==0,T=w.rendering,T===null)if(m)Wa(w,!1);else{if(Bt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(T=Cu(i),T!==null){for(s.flags|=128,Wa(w,!1),m=T.updateQueue,m!==null&&(s.updateQueue=m,s.flags|=4),s.subtreeFlags=0,m=c,c=s.child;c!==null;)w=c,i=m,w.flags&=14680066,T=w.alternate,T===null?(w.childLanes=0,w.lanes=i,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=T.childLanes,w.lanes=T.lanes,w.child=T.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=T.memoizedProps,w.memoizedState=T.memoizedState,w.updateQueue=T.updateQueue,w.type=T.type,i=T.dependencies,w.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return mt(kt,kt.current&1|2),s.child}i=i.sibling}w.tail!==null&&jt()>Cs&&(s.flags|=128,m=!0,Wa(w,!1),s.lanes=4194304)}else{if(!m)if(i=Cu(T),i!==null){if(s.flags|=128,m=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Wa(w,!0),w.tail===null&&w.tailMode==="hidden"&&!T.alternate&&!xt)return cn(s),null}else 2*jt()-w.renderingStartTime>Cs&&c!==1073741824&&(s.flags|=128,m=!0,Wa(w,!1),s.lanes=4194304);w.isBackwards?(T.sibling=s.child,s.child=T):(c=w.last,c!==null?c.sibling=T:s.child=T,w.last=T)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=jt(),s.sibling=null,c=kt.current,mt(kt,m?c&1|2:c&1),s):(cn(s),null);case 22:case 23:return yh(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(Qn&1073741824)!==0&&(cn(s),s.subtreeFlags&6&&(s.flags|=8192)):cn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function yT(i,s){switch(_f(s),s.tag){case 1:return In(s.type)&&hu(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ws(),vt(Rn),vt(ln),Ff(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Mf(s),null;case 13:if(vt(kt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));gs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return vt(kt),null;case 4:return ws(),null;case 10:return If(s.type._context),null;case 22:case 23:return yh(),null;case 24:return null;default:return null}}var Au=!1,dn=!1,vT=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function ks(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(m){Tt(i,s,m)}else c.current=null}function oh(i,s,c){try{c()}catch(m){Tt(i,s,m)}}var Uv=!1;function xT(i,s){if(yf=Jl,i=by(),uf(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var v=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var T=0,z=-1,H=-1,oe=0,fe=0,he=i,de=null;t:for(;;){for(var Te;he!==c||v!==0&&he.nodeType!==3||(z=T+v),he!==w||m!==0&&he.nodeType!==3||(H=T+m),he.nodeType===3&&(T+=he.nodeValue.length),(Te=he.firstChild)!==null;)de=he,he=Te;for(;;){if(he===i)break t;if(de===c&&++oe===v&&(z=T),de===w&&++fe===m&&(H=T),(Te=he.nextSibling)!==null)break;he=de,de=he.parentNode}he=Te}c=z===-1||H===-1?null:{start:z,end:H}}else c=null}c=c||{start:0,end:0}}else c=null;for(vf={focusedElem:i,selectionRange:c},Jl=!1,Pe=s;Pe!==null;)if(s=Pe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Pe=i;else for(;Pe!==null;){s=Pe;try{var Ne=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Ie=Ne.memoizedProps,Rt=Ne.memoizedState,X=s.stateNode,q=X.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:Sr(s.type,Ie),Rt);X.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var te=s.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ge){Tt(s,s.return,ge)}if(i=s.sibling,i!==null){i.return=s.return,Pe=i;break}Pe=s.return}return Ne=Uv,Uv=!1,Ne}function Za(i,s,c){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var v=m=m.next;do{if((v.tag&i)===i){var w=v.destroy;v.destroy=void 0,w!==void 0&&oh(s,c,w)}v=v.next}while(v!==m)}}function Ou(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var m=c.create;c.destroy=m()}c=c.next}while(c!==s)}}function sh(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function Hv(i){var s=i.alternate;s!==null&&(i.alternate=null,Hv(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Br],delete s[Da],delete s[kf],delete s[tT],delete s[nT])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Wv(i){return i.tag===5||i.tag===3||i.tag===4}function Zv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Wv(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ah(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=du));else if(m!==4&&(i=i.child,i!==null))for(ah(i,s,c),i=i.sibling;i!==null;)ah(i,s,c),i=i.sibling}function lh(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(lh(i,s,c),i=i.sibling;i!==null;)lh(i,s,c),i=i.sibling}var en=null,Cr=!1;function Vi(i,s,c){for(c=c.child;c!==null;)qv(i,s,c),c=c.sibling}function qv(i,s,c){if(Vr&&typeof Vr.onCommitFiberUnmount=="function")try{Vr.onCommitFiberUnmount(ql,c)}catch{}switch(c.tag){case 5:dn||ks(c,s);case 6:var m=en,v=Cr;en=null,Vi(i,s,c),en=m,Cr=v,en!==null&&(Cr?(i=en,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):en.removeChild(c.stateNode));break;case 18:en!==null&&(Cr?(i=en,c=c.stateNode,i.nodeType===8?bf(i.parentNode,c):i.nodeType===1&&bf(i,c),Ca(i)):bf(en,c.stateNode));break;case 4:m=en,v=Cr,en=c.stateNode.containerInfo,Cr=!0,Vi(i,s,c),en=m,Cr=v;break;case 0:case 11:case 14:case 15:if(!dn&&(m=c.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){v=m=m.next;do{var w=v,T=w.destroy;w=w.tag,T!==void 0&&((w&2)!==0||(w&4)!==0)&&oh(c,s,T),v=v.next}while(v!==m)}Vi(i,s,c);break;case 1:if(!dn&&(ks(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=c.memoizedProps,m.state=c.memoizedState,m.componentWillUnmount()}catch(z){Tt(c,s,z)}Vi(i,s,c);break;case 21:Vi(i,s,c);break;case 22:c.mode&1?(dn=(m=dn)||c.memoizedState!==null,Vi(i,s,c),dn=m):Vi(i,s,c);break;default:Vi(i,s,c)}}function Qv(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new vT),s.forEach(function(m){var v=PT.bind(null,i,m);c.has(m)||(c.add(m),m.then(v,v))})}}function Er(i,s){var c=s.deletions;if(c!==null)for(var m=0;m<c.length;m++){var v=c[m];try{var w=i,T=s,z=T;e:for(;z!==null;){switch(z.tag){case 5:en=z.stateNode,Cr=!1;break e;case 3:en=z.stateNode.containerInfo,Cr=!0;break e;case 4:en=z.stateNode.containerInfo,Cr=!0;break e}z=z.return}if(en===null)throw Error(n(160));qv(w,T,v),en=null,Cr=!1;var H=v.alternate;H!==null&&(H.return=null),v.return=null}catch(oe){Tt(v,s,oe)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Yv(s,i),s=s.sibling}function Yv(i,s){var c=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Er(s,i),Wr(i),m&4){try{Za(3,i,i.return),Ou(3,i)}catch(Ie){Tt(i,i.return,Ie)}try{Za(5,i,i.return)}catch(Ie){Tt(i,i.return,Ie)}}break;case 1:Er(s,i),Wr(i),m&512&&c!==null&&ks(c,c.return);break;case 5:if(Er(s,i),Wr(i),m&512&&c!==null&&ks(c,c.return),i.flags&32){var v=i.stateNode;try{ze(v,"")}catch(Ie){Tt(i,i.return,Ie)}}if(m&4&&(v=i.stateNode,v!=null)){var w=i.memoizedProps,T=c!==null?c.memoizedProps:w,z=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{z==="input"&&w.type==="radio"&&w.name!=null&&Gt(v,w),pn(z,T);var oe=pn(z,w);for(T=0;T<H.length;T+=2){var fe=H[T],he=H[T+1];fe==="style"?$t(v,he):fe==="dangerouslySetInnerHTML"?_e(v,he):fe==="children"?ze(v,he):P(v,fe,he,oe)}switch(z){case"input":an(v,w);break;case"textarea":ke(v,w);break;case"select":var de=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!w.multiple;var Te=w.value;Te!=null?$(v,!!w.multiple,Te,!1):de!==!!w.multiple&&(w.defaultValue!=null?$(v,!!w.multiple,w.defaultValue,!0):$(v,!!w.multiple,w.multiple?[]:"",!1))}v[Da]=w}catch(Ie){Tt(i,i.return,Ie)}}break;case 6:if(Er(s,i),Wr(i),m&4){if(i.stateNode===null)throw Error(n(162));v=i.stateNode,w=i.memoizedProps;try{v.nodeValue=w}catch(Ie){Tt(i,i.return,Ie)}}break;case 3:if(Er(s,i),Wr(i),m&4&&c!==null&&c.memoizedState.isDehydrated)try{Ca(s.containerInfo)}catch(Ie){Tt(i,i.return,Ie)}break;case 4:Er(s,i),Wr(i);break;case 13:Er(s,i),Wr(i),v=i.child,v.flags&8192&&(w=v.memoizedState!==null,v.stateNode.isHidden=w,!w||v.alternate!==null&&v.alternate.memoizedState!==null||(dh=jt())),m&4&&Qv(i);break;case 22:if(fe=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(oe=dn)||fe,Er(s,i),dn=oe):Er(s,i),Wr(i),m&8192){if(oe=i.memoizedState!==null,(i.stateNode.isHidden=oe)&&!fe&&(i.mode&1)!==0)for(Pe=i,fe=i.child;fe!==null;){for(he=Pe=fe;Pe!==null;){switch(de=Pe,Te=de.child,de.tag){case 0:case 11:case 14:case 15:Za(4,de,de.return);break;case 1:ks(de,de.return);var Ne=de.stateNode;if(typeof Ne.componentWillUnmount=="function"){m=de,c=de.return;try{s=m,Ne.props=s.memoizedProps,Ne.state=s.memoizedState,Ne.componentWillUnmount()}catch(Ie){Tt(m,c,Ie)}}break;case 5:ks(de,de.return);break;case 22:if(de.memoizedState!==null){Xv(he);continue}}Te!==null?(Te.return=de,Pe=Te):Xv(he)}fe=fe.sibling}e:for(fe=null,he=i;;){if(he.tag===5){if(fe===null){fe=he;try{v=he.stateNode,oe?(w=v.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(z=he.stateNode,H=he.memoizedProps.style,T=H!=null&&H.hasOwnProperty("display")?H.display:null,z.style.display=Zt("display",T))}catch(Ie){Tt(i,i.return,Ie)}}}else if(he.tag===6){if(fe===null)try{he.stateNode.nodeValue=oe?"":he.memoizedProps}catch(Ie){Tt(i,i.return,Ie)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;fe===he&&(fe=null),he=he.return}fe===he&&(fe=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:Er(s,i),Wr(i),m&4&&Qv(i);break;case 21:break;default:Er(s,i),Wr(i)}}function Wr(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(Wv(c)){var m=c;break e}c=c.return}throw Error(n(160))}switch(m.tag){case 5:var v=m.stateNode;m.flags&32&&(ze(v,""),m.flags&=-33);var w=Zv(i);lh(i,w,v);break;case 3:case 4:var T=m.stateNode.containerInfo,z=Zv(i);ah(i,z,T);break;default:throw Error(n(161))}}catch(H){Tt(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function wT(i,s,c){Pe=i,Kv(i)}function Kv(i,s,c){for(var m=(i.mode&1)!==0;Pe!==null;){var v=Pe,w=v.child;if(v.tag===22&&m){var T=v.memoizedState!==null||Au;if(!T){var z=v.alternate,H=z!==null&&z.memoizedState!==null||dn;z=Au;var oe=dn;if(Au=T,(dn=H)&&!oe)for(Pe=v;Pe!==null;)T=Pe,H=T.child,T.tag===22&&T.memoizedState!==null?Jv(v):H!==null?(H.return=T,Pe=H):Jv(v);for(;w!==null;)Pe=w,Kv(w),w=w.sibling;Pe=v,Au=z,dn=oe}Gv(i)}else(v.subtreeFlags&8772)!==0&&w!==null?(w.return=v,Pe=w):Gv(i)}}function Gv(i){for(;Pe!==null;){var s=Pe;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||Ou(5,s);break;case 1:var m=s.stateNode;if(s.flags&4&&!dn)if(c===null)m.componentDidMount();else{var v=s.elementType===s.type?c.memoizedProps:Sr(s.type,c.memoizedProps);m.componentDidUpdate(v,c.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Xy(s,w,m);break;case 3:var T=s.updateQueue;if(T!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}Xy(s,T,c)}break;case 5:var z=s.stateNode;if(c===null&&s.flags&4){c=z;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&c.focus();break;case"img":H.src&&(c.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var oe=s.alternate;if(oe!==null){var fe=oe.memoizedState;if(fe!==null){var he=fe.dehydrated;he!==null&&Ca(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&sh(s)}catch(de){Tt(s,s.return,de)}}if(s===i){Pe=null;break}if(c=s.sibling,c!==null){c.return=s.return,Pe=c;break}Pe=s.return}}function Xv(i){for(;Pe!==null;){var s=Pe;if(s===i){Pe=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Pe=c;break}Pe=s.return}}function Jv(i){for(;Pe!==null;){var s=Pe;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{Ou(4,s)}catch(H){Tt(s,c,H)}break;case 1:var m=s.stateNode;if(typeof m.componentDidMount=="function"){var v=s.return;try{m.componentDidMount()}catch(H){Tt(s,v,H)}}var w=s.return;try{sh(s)}catch(H){Tt(s,w,H)}break;case 5:var T=s.return;try{sh(s)}catch(H){Tt(s,T,H)}}}catch(H){Tt(s,s.return,H)}if(s===i){Pe=null;break}var z=s.sibling;if(z!==null){z.return=s.return,Pe=z;break}Pe=s.return}}var bT=Math.ceil,Du=R.ReactCurrentDispatcher,uh=R.ReactCurrentOwner,sr=R.ReactCurrentBatchConfig,Je=0,Qt=null,At=null,tn=0,Qn=0,Ss=zi(0),Bt=0,qa=null,Eo=0,zu=0,ch=0,Qa=null,On=null,dh=0,Cs=1/0,hi=null,Mu=!1,fh=null,Bi=null,Lu=!1,Ui=null,Fu=0,Ya=0,hh=null,$u=-1,Vu=0;function yn(){return(Je&6)!==0?jt():$u!==-1?$u:$u=jt()}function Hi(i){return(i.mode&1)===0?1:(Je&2)!==0&&tn!==0?tn&-tn:iT.transition!==null?(Vu===0&&(Vu=Zg()),Vu):(i=at,i!==0||(i=window.event,i=i===void 0?16:ty(i.type)),i)}function _r(i,s,c,m){if(50<Ya)throw Ya=0,hh=null,Error(n(185));xa(i,c,m),((Je&2)===0||i!==Qt)&&(i===Qt&&((Je&2)===0&&(zu|=c),Bt===4&&Wi(i,tn)),Dn(i,m),c===1&&Je===0&&(s.mode&1)===0&&(Cs=jt()+500,mu&&Li()))}function Dn(i,s){var c=i.callbackNode;i_(i,s);var m=Kl(i,i===Qt?tn:0);if(m===0)c!==null&&Ug(c),i.callbackNode=null,i.callbackPriority=0;else if(s=m&-m,i.callbackPriority!==s){if(c!=null&&Ug(c),s===1)i.tag===0?rT(tx.bind(null,i)):$y(tx.bind(null,i)),J_(function(){(Je&6)===0&&Li()}),c=null;else{switch(qg(m)){case 1:c=Wd;break;case 4:c=Hg;break;case 16:c=Zl;break;case 536870912:c=Wg;break;default:c=Zl}c=ux(c,ex.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function ex(i,s){if($u=-1,Vu=0,(Je&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Es()&&i.callbackNode!==c)return null;var m=Kl(i,i===Qt?tn:0);if(m===0)return null;if((m&30)!==0||(m&i.expiredLanes)!==0||s)s=Bu(i,m);else{s=m;var v=Je;Je|=2;var w=rx();(Qt!==i||tn!==s)&&(hi=null,Cs=jt()+500,To(i,s));do try{CT();break}catch(z){nx(i,z)}while(!0);Rf(),Du.current=w,Je=v,At!==null?s=0:(Qt=null,tn=0,s=Bt)}if(s!==0){if(s===2&&(v=Zd(i),v!==0&&(m=v,s=ph(i,v))),s===1)throw c=qa,To(i,0),Wi(i,m),Dn(i,jt()),c;if(s===6)Wi(i,m);else{if(v=i.current.alternate,(m&30)===0&&!kT(v)&&(s=Bu(i,m),s===2&&(w=Zd(i),w!==0&&(m=w,s=ph(i,w))),s===1))throw c=qa,To(i,0),Wi(i,m),Dn(i,jt()),c;switch(i.finishedWork=v,i.finishedLanes=m,s){case 0:case 1:throw Error(n(345));case 2:Po(i,On,hi);break;case 3:if(Wi(i,m),(m&130023424)===m&&(s=dh+500-jt(),10<s)){if(Kl(i,0)!==0)break;if(v=i.suspendedLanes,(v&m)!==m){yn(),i.pingedLanes|=i.suspendedLanes&v;break}i.timeoutHandle=wf(Po.bind(null,i,On,hi),s);break}Po(i,On,hi);break;case 4:if(Wi(i,m),(m&4194240)===m)break;for(s=i.eventTimes,v=-1;0<m;){var T=31-wr(m);w=1<<T,T=s[T],T>v&&(v=T),m&=~w}if(m=v,m=jt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*bT(m/1960))-m,10<m){i.timeoutHandle=wf(Po.bind(null,i,On,hi),m);break}Po(i,On,hi);break;case 5:Po(i,On,hi);break;default:throw Error(n(329))}}}return Dn(i,jt()),i.callbackNode===c?ex.bind(null,i):null}function ph(i,s){var c=Qa;return i.current.memoizedState.isDehydrated&&(To(i,s).flags|=256),i=Bu(i,s),i!==2&&(s=On,On=c,s!==null&&mh(s)),i}function mh(i){On===null?On=i:On.push.apply(On,i)}function kT(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var m=0;m<c.length;m++){var v=c[m],w=v.getSnapshot;v=v.value;try{if(!br(w(),v))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Wi(i,s){for(s&=~ch,s&=~zu,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-wr(s),m=1<<c;i[c]=-1,s&=~m}}function tx(i){if((Je&6)!==0)throw Error(n(327));Es();var s=Kl(i,0);if((s&1)===0)return Dn(i,jt()),null;var c=Bu(i,s);if(i.tag!==0&&c===2){var m=Zd(i);m!==0&&(s=m,c=ph(i,m))}if(c===1)throw c=qa,To(i,0),Wi(i,s),Dn(i,jt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Po(i,On,hi),Dn(i,jt()),null}function gh(i,s){var c=Je;Je|=1;try{return i(s)}finally{Je=c,Je===0&&(Cs=jt()+500,mu&&Li())}}function _o(i){Ui!==null&&Ui.tag===0&&(Je&6)===0&&Es();var s=Je;Je|=1;var c=sr.transition,m=at;try{if(sr.transition=null,at=1,i)return i()}finally{at=m,sr.transition=c,Je=s,(Je&6)===0&&Li()}}function yh(){Qn=Ss.current,vt(Ss)}function To(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,X_(c)),At!==null)for(c=At.return;c!==null;){var m=c;switch(_f(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&hu();break;case 3:ws(),vt(Rn),vt(ln),Ff();break;case 5:Mf(m);break;case 4:ws();break;case 13:vt(kt);break;case 19:vt(kt);break;case 10:If(m.type._context);break;case 22:case 23:yh()}c=c.return}if(Qt=i,At=i=Zi(i.current,null),tn=Qn=s,Bt=0,qa=null,ch=zu=Eo=0,On=Qa=null,ko!==null){for(s=0;s<ko.length;s++)if(c=ko[s],m=c.interleaved,m!==null){c.interleaved=null;var v=m.next,w=c.pending;if(w!==null){var T=w.next;w.next=v,m.next=T}c.pending=m}ko=null}return i}function nx(i,s){do{var c=At;try{if(Rf(),Eu.current=Nu,_u){for(var m=St.memoizedState;m!==null;){var v=m.queue;v!==null&&(v.pending=null),m=m.next}_u=!1}if(Co=0,qt=Vt=St=null,Va=!1,Ba=0,uh.current=null,c===null||c.return===null){Bt=1,qa=s,At=null;break}e:{var w=i,T=c.return,z=c,H=s;if(s=tn,z.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var oe=H,fe=z,he=fe.tag;if((fe.mode&1)===0&&(he===0||he===11||he===15)){var de=fe.alternate;de?(fe.updateQueue=de.updateQueue,fe.memoizedState=de.memoizedState,fe.lanes=de.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var Te=Tv(T);if(Te!==null){Te.flags&=-257,Pv(Te,T,z,w,s),Te.mode&1&&_v(w,oe,s),s=Te,H=oe;var Ne=s.updateQueue;if(Ne===null){var Ie=new Set;Ie.add(H),s.updateQueue=Ie}else Ne.add(H);break e}else{if((s&1)===0){_v(w,oe,s),vh();break e}H=Error(n(426))}}else if(xt&&z.mode&1){var Rt=Tv(T);if(Rt!==null){(Rt.flags&65536)===0&&(Rt.flags|=256),Pv(Rt,T,z,w,s),Nf(bs(H,z));break e}}w=H=bs(H,z),Bt!==4&&(Bt=2),Qa===null?Qa=[w]:Qa.push(w),w=T;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var X=Cv(w,H,s);Gy(w,X);break e;case 1:z=H;var q=w.type,te=w.stateNode;if((w.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Bi===null||!Bi.has(te)))){w.flags|=65536,s&=-s,w.lanes|=s;var ge=Ev(w,z,s);Gy(w,ge);break e}}w=w.return}while(w!==null)}ox(c)}catch(Oe){s=Oe,At===c&&c!==null&&(At=c=c.return);continue}break}while(!0)}function rx(){var i=Du.current;return Du.current=Nu,i===null?Nu:i}function vh(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Qt===null||(Eo&268435455)===0&&(zu&268435455)===0||Wi(Qt,tn)}function Bu(i,s){var c=Je;Je|=2;var m=rx();(Qt!==i||tn!==s)&&(hi=null,To(i,s));do try{ST();break}catch(v){nx(i,v)}while(!0);if(Rf(),Je=c,Du.current=m,At!==null)throw Error(n(261));return Qt=null,tn=0,Bt}function ST(){for(;At!==null;)ix(At)}function CT(){for(;At!==null&&!YE();)ix(At)}function ix(i){var s=lx(i.alternate,i,Qn);i.memoizedProps=i.pendingProps,s===null?ox(i):At=s,uh.current=null}function ox(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=gT(c,s,Qn),c!==null){At=c;return}}else{if(c=yT(c,s),c!==null){c.flags&=32767,At=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Bt=6,At=null;return}}if(s=s.sibling,s!==null){At=s;return}At=s=i}while(s!==null);Bt===0&&(Bt=5)}function Po(i,s,c){var m=at,v=sr.transition;try{sr.transition=null,at=1,ET(i,s,c,m)}finally{sr.transition=v,at=m}return null}function ET(i,s,c,m){do Es();while(Ui!==null);if((Je&6)!==0)throw Error(n(327));c=i.finishedWork;var v=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var w=c.lanes|c.childLanes;if(o_(i,w),i===Qt&&(At=Qt=null,tn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Lu||(Lu=!0,ux(Zl,function(){return Es(),null})),w=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||w){w=sr.transition,sr.transition=null;var T=at;at=1;var z=Je;Je|=4,uh.current=null,xT(i,c),Yv(c,i),W_(vf),Jl=!!yf,vf=yf=null,i.current=c,wT(c),KE(),Je=z,at=T,sr.transition=w}else i.current=c;if(Lu&&(Lu=!1,Ui=i,Fu=v),w=i.pendingLanes,w===0&&(Bi=null),JE(c.stateNode),Dn(i,jt()),s!==null)for(m=i.onRecoverableError,c=0;c<s.length;c++)v=s[c],m(v.value,{componentStack:v.stack,digest:v.digest});if(Mu)throw Mu=!1,i=fh,fh=null,i;return(Fu&1)!==0&&i.tag!==0&&Es(),w=i.pendingLanes,(w&1)!==0?i===hh?Ya++:(Ya=0,hh=i):Ya=0,Li(),null}function Es(){if(Ui!==null){var i=qg(Fu),s=sr.transition,c=at;try{if(sr.transition=null,at=16>i?16:i,Ui===null)var m=!1;else{if(i=Ui,Ui=null,Fu=0,(Je&6)!==0)throw Error(n(331));var v=Je;for(Je|=4,Pe=i.current;Pe!==null;){var w=Pe,T=w.child;if((Pe.flags&16)!==0){var z=w.deletions;if(z!==null){for(var H=0;H<z.length;H++){var oe=z[H];for(Pe=oe;Pe!==null;){var fe=Pe;switch(fe.tag){case 0:case 11:case 15:Za(8,fe,w)}var he=fe.child;if(he!==null)he.return=fe,Pe=he;else for(;Pe!==null;){fe=Pe;var de=fe.sibling,Te=fe.return;if(Hv(fe),fe===oe){Pe=null;break}if(de!==null){de.return=Te,Pe=de;break}Pe=Te}}}var Ne=w.alternate;if(Ne!==null){var Ie=Ne.child;if(Ie!==null){Ne.child=null;do{var Rt=Ie.sibling;Ie.sibling=null,Ie=Rt}while(Ie!==null)}}Pe=w}}if((w.subtreeFlags&2064)!==0&&T!==null)T.return=w,Pe=T;else e:for(;Pe!==null;){if(w=Pe,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Za(9,w,w.return)}var X=w.sibling;if(X!==null){X.return=w.return,Pe=X;break e}Pe=w.return}}var q=i.current;for(Pe=q;Pe!==null;){T=Pe;var te=T.child;if((T.subtreeFlags&2064)!==0&&te!==null)te.return=T,Pe=te;else e:for(T=q;Pe!==null;){if(z=Pe,(z.flags&2048)!==0)try{switch(z.tag){case 0:case 11:case 15:Ou(9,z)}}catch(Oe){Tt(z,z.return,Oe)}if(z===T){Pe=null;break e}var ge=z.sibling;if(ge!==null){ge.return=z.return,Pe=ge;break e}Pe=z.return}}if(Je=v,Li(),Vr&&typeof Vr.onPostCommitFiberRoot=="function")try{Vr.onPostCommitFiberRoot(ql,i)}catch{}m=!0}return m}finally{at=c,sr.transition=s}}return!1}function sx(i,s,c){s=bs(c,s),s=Cv(i,s,1),i=$i(i,s,1),s=yn(),i!==null&&(xa(i,1,s),Dn(i,s))}function Tt(i,s,c){if(i.tag===3)sx(i,i,c);else for(;s!==null;){if(s.tag===3){sx(s,i,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Bi===null||!Bi.has(m))){i=bs(c,i),i=Ev(s,i,1),s=$i(s,i,1),i=yn(),s!==null&&(xa(s,1,i),Dn(s,i));break}}s=s.return}}function _T(i,s,c){var m=i.pingCache;m!==null&&m.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Qt===i&&(tn&c)===c&&(Bt===4||Bt===3&&(tn&130023424)===tn&&500>jt()-dh?To(i,0):ch|=c),Dn(i,s)}function ax(i,s){s===0&&((i.mode&1)===0?s=1:(s=Yl,Yl<<=1,(Yl&130023424)===0&&(Yl=4194304)));var c=yn();i=ci(i,s),i!==null&&(xa(i,s,c),Dn(i,c))}function TT(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),ax(i,c)}function PT(i,s){var c=0;switch(i.tag){case 13:var m=i.stateNode,v=i.memoizedState;v!==null&&(c=v.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(n(314))}m!==null&&m.delete(s),ax(i,c)}var lx;lx=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Rn.current)An=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return An=!1,mT(i,s,c);An=(i.flags&131072)!==0}else An=!1,xt&&(s.flags&1048576)!==0&&Vy(s,yu,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;Iu(i,s),i=s.pendingProps;var v=hs(s,ln.current);xs(s,c),v=Bf(null,s,m,i,v,c);var w=Uf();return s.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,In(m)?(w=!0,pu(s)):w=!1,s.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,Df(s),v.updater=ju,s.stateNode=v,v._reactInternals=s,Yf(s,m,i,c),s=Jf(null,s,m,!0,w,c)):(s.tag=0,xt&&w&&Ef(s),gn(null,s,v,c),s=s.child),s;case 16:m=s.elementType;e:{switch(Iu(i,s),i=s.pendingProps,v=m._init,m=v(m._payload),s.type=m,v=s.tag=jT(m),i=Sr(m,i),v){case 0:s=Xf(null,s,m,i,c);break e;case 1:s=Ov(null,s,m,i,c);break e;case 11:s=Nv(null,s,m,i,c);break e;case 14:s=jv(null,s,m,Sr(m.type,i),c);break e}throw Error(n(306,m,""))}return s;case 0:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Xf(i,s,m,v,c);case 1:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Ov(i,s,m,v,c);case 3:e:{if(Dv(s),i===null)throw Error(n(387));m=s.pendingProps,w=s.memoizedState,v=w.element,Ky(i,s),Su(s,m,null,c);var T=s.memoizedState;if(m=T.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){v=bs(Error(n(423)),s),s=zv(i,s,m,c,v);break e}else if(m!==v){v=bs(Error(n(424)),s),s=zv(i,s,m,c,v);break e}else for(qn=Di(s.stateNode.containerInfo.firstChild),Zn=s,xt=!0,kr=null,c=Qy(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(gs(),m===v){s=fi(i,s,c);break e}gn(i,s,m,c)}s=s.child}return s;case 5:return Jy(s),i===null&&Pf(s),m=s.type,v=s.pendingProps,w=i!==null?i.memoizedProps:null,T=v.children,xf(m,v)?T=null:w!==null&&xf(m,w)&&(s.flags|=32),Av(i,s),gn(i,s,T,c),s.child;case 6:return i===null&&Pf(s),null;case 13:return Mv(i,s,c);case 4:return zf(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=ys(s,null,m,c):gn(i,s,m,c),s.child;case 11:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Nv(i,s,m,v,c);case 7:return gn(i,s,s.pendingProps,c),s.child;case 8:return gn(i,s,s.pendingProps.children,c),s.child;case 12:return gn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(m=s.type._context,v=s.pendingProps,w=s.memoizedProps,T=v.value,mt(wu,m._currentValue),m._currentValue=T,w!==null)if(br(w.value,T)){if(w.children===v.children&&!Rn.current){s=fi(i,s,c);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var z=w.dependencies;if(z!==null){T=w.child;for(var H=z.firstContext;H!==null;){if(H.context===m){if(w.tag===1){H=di(-1,c&-c),H.tag=2;var oe=w.updateQueue;if(oe!==null){oe=oe.shared;var fe=oe.pending;fe===null?H.next=H:(H.next=fe.next,fe.next=H),oe.pending=H}}w.lanes|=c,H=w.alternate,H!==null&&(H.lanes|=c),Af(w.return,c,s),z.lanes|=c;break}H=H.next}}else if(w.tag===10)T=w.type===s.type?null:w.child;else if(w.tag===18){if(T=w.return,T===null)throw Error(n(341));T.lanes|=c,z=T.alternate,z!==null&&(z.lanes|=c),Af(T,c,s),T=w.sibling}else T=w.child;if(T!==null)T.return=w;else for(T=w;T!==null;){if(T===s){T=null;break}if(w=T.sibling,w!==null){w.return=T.return,T=w;break}T=T.return}w=T}gn(i,s,v.children,c),s=s.child}return s;case 9:return v=s.type,m=s.pendingProps.children,xs(s,c),v=ir(v),m=m(v),s.flags|=1,gn(i,s,m,c),s.child;case 14:return m=s.type,v=Sr(m,s.pendingProps),v=Sr(m.type,v),jv(i,s,m,v,c);case 15:return Rv(i,s,s.type,s.pendingProps,c);case 17:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Iu(i,s),s.tag=1,In(m)?(i=!0,pu(s)):i=!1,xs(s,c),kv(s,m,v),Yf(s,m,v,c),Jf(null,s,m,!0,i,c);case 19:return Fv(i,s,c);case 22:return Iv(i,s,c)}throw Error(n(156,s.tag))};function ux(i,s){return Bg(i,s)}function NT(i,s,c,m){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(i,s,c,m){return new NT(i,s,c,m)}function xh(i){return i=i.prototype,!(!i||!i.isReactComponent)}function jT(i){if(typeof i=="function")return xh(i)?1:0;if(i!=null){if(i=i.$$typeof,i===M)return 11;if(i===U)return 14}return 2}function Zi(i,s){var c=i.alternate;return c===null?(c=ar(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function Uu(i,s,c,m,v,w){var T=2;if(m=i,typeof i=="function")xh(i)&&(T=1);else if(typeof i=="string")T=5;else e:switch(i){case F:return No(c.children,v,w,s);case Z:T=8,v|=8;break;case re:return i=ar(12,c,s,v|2),i.elementType=re,i.lanes=w,i;case ne:return i=ar(13,c,s,v),i.elementType=ne,i.lanes=w,i;case W:return i=ar(19,c,s,v),i.elementType=W,i.lanes=w,i;case J:return Hu(c,v,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case O:T=10;break e;case Y:T=9;break e;case M:T=11;break e;case U:T=14;break e;case Q:T=16,m=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ar(T,c,s,v),s.elementType=i,s.type=m,s.lanes=w,s}function No(i,s,c,m){return i=ar(7,i,m,s),i.lanes=c,i}function Hu(i,s,c,m){return i=ar(22,i,m,s),i.elementType=J,i.lanes=c,i.stateNode={isHidden:!1},i}function wh(i,s,c){return i=ar(6,i,null,s),i.lanes=c,i}function bh(i,s,c){return s=ar(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function RT(i,s,c,m,v){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qd(0),this.expirationTimes=qd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qd(0),this.identifierPrefix=m,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function kh(i,s,c,m,v,w,T,z,H){return i=new RT(i,s,c,z,H),s===1?(s=1,w===!0&&(s|=8)):s=0,w=ar(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Df(w),i}function IT(i,s,c){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:m==null?null:""+m,children:i,containerInfo:s,implementation:c}}function cx(i){if(!i)return Mi;i=i._reactInternals;e:{if(yo(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(In(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(In(c))return Ly(i,c,s)}return s}function dx(i,s,c,m,v,w,T,z,H){return i=kh(c,m,!0,i,v,w,T,z,H),i.context=cx(null),c=i.current,m=yn(),v=Hi(c),w=di(m,v),w.callback=s??null,$i(c,w,v),i.current.lanes=v,xa(i,v,m),Dn(i,m),i}function Wu(i,s,c,m){var v=s.current,w=yn(),T=Hi(v);return c=cx(c),s.context===null?s.context=c:s.pendingContext=c,s=di(w,T),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=$i(v,s,T),i!==null&&(_r(i,v,T,w),ku(i,v,T)),T}function Zu(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function fx(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Sh(i,s){fx(i,s),(i=i.alternate)&&fx(i,s)}function AT(){return null}var hx=typeof reportError=="function"?reportError:function(i){console.error(i)};function Ch(i){this._internalRoot=i}qu.prototype.render=Ch.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Wu(i,s,null,null)},qu.prototype.unmount=Ch.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;_o(function(){Wu(null,i,null,null)}),s[si]=null}};function qu(i){this._internalRoot=i}qu.prototype.unstable_scheduleHydration=function(i){if(i){var s=Kg();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Ii.length&&s!==0&&s<Ii[c].priority;c++);Ii.splice(c,0,i),c===0&&Jg(i)}};function Eh(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Qu(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function px(){}function OT(i,s,c,m,v){if(v){if(typeof m=="function"){var w=m;m=function(){var oe=Zu(T);w.call(oe)}}var T=dx(s,m,i,0,null,!1,!1,"",px);return i._reactRootContainer=T,i[si]=T.current,Aa(i.nodeType===8?i.parentNode:i),_o(),T}for(;v=i.lastChild;)i.removeChild(v);if(typeof m=="function"){var z=m;m=function(){var oe=Zu(H);z.call(oe)}}var H=kh(i,0,!1,null,null,!1,!1,"",px);return i._reactRootContainer=H,i[si]=H.current,Aa(i.nodeType===8?i.parentNode:i),_o(function(){Wu(s,H,c,m)}),H}function Yu(i,s,c,m,v){var w=c._reactRootContainer;if(w){var T=w;if(typeof v=="function"){var z=v;v=function(){var H=Zu(T);z.call(H)}}Wu(s,T,i,v)}else T=OT(c,s,i,v,m);return Zu(T)}Qg=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=va(s.pendingLanes);c!==0&&(Qd(s,c|1),Dn(s,jt()),(Je&6)===0&&(Cs=jt()+500,Li()))}break;case 13:_o(function(){var m=ci(i,1);if(m!==null){var v=yn();_r(m,i,1,v)}}),Sh(i,1)}},Yd=function(i){if(i.tag===13){var s=ci(i,134217728);if(s!==null){var c=yn();_r(s,i,134217728,c)}Sh(i,134217728)}},Yg=function(i){if(i.tag===13){var s=Hi(i),c=ci(i,s);if(c!==null){var m=yn();_r(c,i,s,m)}Sh(i,s)}},Kg=function(){return at},Gg=function(i,s){var c=at;try{return at=i,s()}finally{at=c}},rs=function(i,s,c){switch(s){case"input":if(an(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var m=c[s];if(m!==i&&m.form===i.form){var v=fu(m);if(!v)throw Error(n(90));Ve(m),an(m,v)}}}break;case"textarea":ke(i,c);break;case"select":s=c.value,s!=null&&$(i,!!c.multiple,s,!1)}},rt=gh,ft=_o;var DT={usingClientEntryPoint:!1,Events:[za,ds,fu,Ul,He,gh]},Ka={findFiberByHostInstance:vo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zT={bundleType:Ka.bundleType,version:Ka.version,rendererPackageName:Ka.rendererPackageName,rendererConfig:Ka.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=$g(i),i===null?null:i.stateNode},findFiberByHostInstance:Ka.findFiberByHostInstance||AT,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 Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{ql=Ku.inject(zT),Vr=Ku}catch{}}return zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DT,zn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Eh(s))throw Error(n(200));return IT(i,s,null,c)},zn.createRoot=function(i,s){if(!Eh(i))throw Error(n(299));var c=!1,m="",v=hx;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=kh(i,1,!1,null,null,c,!1,m,v),i[si]=s.current,Aa(i.nodeType===8?i.parentNode:i),new Ch(s)},zn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=$g(s),i=i===null?null:i.stateNode,i},zn.flushSync=function(i){return _o(i)},zn.hydrate=function(i,s,c){if(!Qu(s))throw Error(n(200));return Yu(null,i,s,!0,c)},zn.hydrateRoot=function(i,s,c){if(!Eh(i))throw Error(n(405));var m=c!=null&&c.hydratedSources||null,v=!1,w="",T=hx;if(c!=null&&(c.unstable_strictMode===!0&&(v=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onRecoverableError!==void 0&&(T=c.onRecoverableError)),s=dx(s,null,i,1,c??null,v,!1,w,T),i[si]=s.current,Aa(i),m)for(i=0;i<m.length;i++)c=m[i],v=c._getVersion,v=v(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,v]:s.mutableSourceEagerHydrationData.push(c,v);return new qu(s)},zn.render=function(i,s,c){if(!Qu(s))throw Error(n(200));return Yu(null,i,s,!1,c)},zn.unmountComponentAtNode=function(i){if(!Qu(i))throw Error(n(40));return i._reactRootContainer?(_o(function(){Yu(null,null,i,!1,function(){i._reactRootContainer=null,i[si]=null})}),!0):!1},zn.unstable_batchedUpdates=gh,zn.unstable_renderSubtreeIntoContainer=function(i,s,c,m){if(!Qu(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Yu(i,s,c,!1,m)},zn.version="18.3.1-next-f1338f8080-20240426",zn}var Sx;function Eb(){if(Sx)return Nh.exports;Sx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Nh.exports=HT(),Nh.exports}var Cx;function WT(){if(Cx)return Ju;Cx=1;var e=Eb();return Ju.createRoot=e.createRoot,Ju.hydrateRoot=e.hydrateRoot,Ju}var ZT=WT();const qT=Jo(ZT);/**
|
|
40
|
+
`+w.stack}return{value:i,source:s,stack:v,digest:null}}function Kf(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Gf(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var dT=typeof WeakMap=="function"?WeakMap:Map;function Sv(i,s,c){c=di(-1,c),c.tag=3,c.payload={element:null};var m=s.value;return c.callback=function(){Mu||(Mu=!0,fh=m),Gf(i,s)},c}function Cv(i,s,c){c=di(-1,c),c.tag=3;var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var v=s.value;c.payload=function(){return m(v)},c.callback=function(){Gf(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(c.callback=function(){Gf(i,s),typeof m!="function"&&(Bi===null?Bi=new Set([this]):Bi.add(this));var T=s.stack;this.componentDidCatch(s.value,{componentStack:T!==null?T:""})}),c}function Ev(i,s,c){var m=i.pingCache;if(m===null){m=i.pingCache=new dT;var v=new Set;m.set(s,v)}else v=m.get(s),v===void 0&&(v=new Set,m.set(s,v));v.has(c)||(v.add(c),i=ET.bind(null,i,s,c),s.then(i,i))}function _v(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Tv(i,s,c,m,v){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=di(-1,1),s.tag=2,$i(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=v,i)}var fT=R.ReactCurrentOwner,An=!1;function gn(i,s,c,m){s.child=i===null?qy(s,null,c,m):ys(s,i.child,c,m)}function Pv(i,s,c,m,v){c=c.render;var w=s.ref;return xs(s,v),m=Bf(i,s,c,m,w,v),c=Uf(),i!==null&&!An?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~v,fi(i,s,v)):(xt&&c&&Ef(s),s.flags|=1,gn(i,s,m,v),s.child)}function Nv(i,s,c,m,v){if(i===null){var w=c.type;return typeof w=="function"&&!xh(w)&&w.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=w,jv(i,s,w,m,v)):(i=Uu(c.type,null,m,s,s.mode,v),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,(i.lanes&v)===0){var T=w.memoizedProps;if(c=c.compare,c=c!==null?c:ja,c(T,m)&&i.ref===s.ref)return fi(i,s,v)}return s.flags|=1,i=Zi(w,m),i.ref=s.ref,i.return=s,s.child=i}function jv(i,s,c,m,v){if(i!==null){var w=i.memoizedProps;if(ja(w,m)&&i.ref===s.ref)if(An=!1,s.pendingProps=m=w,(i.lanes&v)!==0)(i.flags&131072)!==0&&(An=!0);else return s.lanes=i.lanes,fi(i,s,v)}return Xf(i,s,c,m,v)}function Rv(i,s,c){var m=s.pendingProps,v=m.children,w=i!==null?i.memoizedState:null;if(m.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Ss,Qn),Qn|=c;else{if((c&1073741824)===0)return i=w!==null?w.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,mt(Ss,Qn),Qn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=w!==null?w.baseLanes:c,mt(Ss,Qn),Qn|=m}else w!==null?(m=w.baseLanes|c,s.memoizedState=null):m=c,mt(Ss,Qn),Qn|=m;return gn(i,s,v,c),s.child}function Iv(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Xf(i,s,c,m,v){var w=In(c)?xo:ln.current;return w=hs(s,w),xs(s,v),c=Bf(i,s,c,m,w,v),m=Uf(),i!==null&&!An?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~v,fi(i,s,v)):(xt&&m&&Ef(s),s.flags|=1,gn(i,s,c,v),s.child)}function Av(i,s,c,m,v){if(In(c)){var w=!0;pu(s)}else w=!1;if(xs(s,v),s.stateNode===null)Iu(i,s),bv(s,c,m),Yf(s,c,m,v),m=!0;else if(i===null){var T=s.stateNode,z=s.memoizedProps;T.props=z;var H=T.context,oe=c.contextType;typeof oe=="object"&&oe!==null?oe=ir(oe):(oe=In(c)?xo:ln.current,oe=hs(s,oe));var fe=c.getDerivedStateFromProps,he=typeof fe=="function"||typeof T.getSnapshotBeforeUpdate=="function";he||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==m||H!==oe)&&kv(s,T,m,oe),Fi=!1;var de=s.memoizedState;T.state=de,Su(s,m,T,v),H=s.memoizedState,z!==m||de!==H||Rn.current||Fi?(typeof fe=="function"&&(Qf(s,c,fe,m),H=s.memoizedState),(z=Fi||wv(s,c,z,m,de,H,oe))?(he||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(s.flags|=4194308)):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=H),T.props=m,T.state=H,T.context=oe,m=z):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{T=s.stateNode,Yy(i,s),z=s.memoizedProps,oe=s.type===s.elementType?z:Sr(s.type,z),T.props=oe,he=s.pendingProps,de=T.context,H=c.contextType,typeof H=="object"&&H!==null?H=ir(H):(H=In(c)?xo:ln.current,H=hs(s,H));var Te=c.getDerivedStateFromProps;(fe=typeof Te=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==he||de!==H)&&kv(s,T,m,H),Fi=!1,de=s.memoizedState,T.state=de,Su(s,m,T,v);var Ne=s.memoizedState;z!==he||de!==Ne||Rn.current||Fi?(typeof Te=="function"&&(Qf(s,c,Te,m),Ne=s.memoizedState),(oe=Fi||wv(s,c,oe,m,de,Ne,H)||!1)?(fe||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(m,Ne,H),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(m,Ne,H)),typeof T.componentDidUpdate=="function"&&(s.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof T.componentDidUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=Ne),T.props=m,T.state=Ne,T.context=H,m=oe):(typeof T.componentDidUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=1024),m=!1)}return Jf(i,s,c,m,w,v)}function Jf(i,s,c,m,v,w){Iv(i,s);var T=(s.flags&128)!==0;if(!m&&!T)return v&&Ly(s,c,!1),fi(i,s,w);m=s.stateNode,fT.current=s;var z=T&&typeof c.getDerivedStateFromError!="function"?null:m.render();return s.flags|=1,i!==null&&T?(s.child=ys(s,i.child,null,w),s.child=ys(s,null,z,w)):gn(i,s,z,w),s.memoizedState=m.state,v&&Ly(s,c,!0),s.child}function Ov(i){var s=i.stateNode;s.pendingContext?zy(i,s.pendingContext,s.pendingContext!==s.context):s.context&&zy(i,s.context,!1),zf(i,s.containerInfo)}function Dv(i,s,c,m,v){return gs(),Nf(v),s.flags|=256,gn(i,s,c,m),s.child}var eh={dehydrated:null,treeContext:null,retryLane:0};function th(i){return{baseLanes:i,cachePool:null,transitions:null}}function zv(i,s,c){var m=s.pendingProps,v=kt.current,w=!1,T=(s.flags&128)!==0,z;if((z=T)||(z=i!==null&&i.memoizedState===null?!1:(v&2)!==0),z?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(v|=1),mt(kt,v&1),i===null)return Pf(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(T=m.children,i=m.fallback,w?(m=s.mode,w=s.child,T={mode:"hidden",children:T},(m&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=T):w=Hu(T,m,0,null),i=No(i,m,c,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=th(c),s.memoizedState=eh,i):nh(s,T));if(v=i.memoizedState,v!==null&&(z=v.dehydrated,z!==null))return hT(i,s,T,m,z,v,c);if(w){w=m.fallback,T=s.mode,v=i.child,z=v.sibling;var H={mode:"hidden",children:m.children};return(T&1)===0&&s.child!==v?(m=s.child,m.childLanes=0,m.pendingProps=H,s.deletions=null):(m=Zi(v,H),m.subtreeFlags=v.subtreeFlags&14680064),z!==null?w=Zi(z,w):(w=No(w,T,c,null),w.flags|=2),w.return=s,m.return=s,m.sibling=w,s.child=m,m=w,w=s.child,T=i.child.memoizedState,T=T===null?th(c):{baseLanes:T.baseLanes|c,cachePool:null,transitions:T.transitions},w.memoizedState=T,w.childLanes=i.childLanes&~c,s.memoizedState=eh,m}return w=i.child,i=w.sibling,m=Zi(w,{mode:"visible",children:m.children}),(s.mode&1)===0&&(m.lanes=c),m.return=s,m.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=m,s.memoizedState=null,m}function nh(i,s){return s=Hu({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Ru(i,s,c,m){return m!==null&&Nf(m),ys(s,i.child,null,c),i=nh(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function hT(i,s,c,m,v,w,T){if(c)return s.flags&256?(s.flags&=-257,m=Kf(Error(n(422))),Ru(i,s,T,m)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=m.fallback,v=s.mode,m=Hu({mode:"visible",children:m.children},v,0,null),w=No(w,v,T,null),w.flags|=2,m.return=s,w.return=s,m.sibling=w,s.child=m,(s.mode&1)!==0&&ys(s,i.child,null,T),s.child.memoizedState=th(T),s.memoizedState=eh,w);if((s.mode&1)===0)return Ru(i,s,T,null);if(v.data==="$!"){if(m=v.nextSibling&&v.nextSibling.dataset,m)var z=m.dgst;return m=z,w=Error(n(419)),m=Kf(w,m,void 0),Ru(i,s,T,m)}if(z=(T&i.childLanes)!==0,An||z){if(m=Qt,m!==null){switch(T&-T){case 4:v=2;break;case 16:v=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:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(m.suspendedLanes|T))!==0?0:v,v!==0&&v!==w.retryLane&&(w.retryLane=v,ci(i,v),_r(m,i,v,-1))}return vh(),m=Kf(Error(n(421))),Ru(i,s,T,m)}return v.data==="$?"?(s.flags|=128,s.child=i.child,s=_T.bind(null,i),v._reactRetry=s,null):(i=w.treeContext,qn=Di(v.nextSibling),Zn=s,xt=!0,kr=null,i!==null&&(nr[rr++]=li,nr[rr++]=ui,nr[rr++]=wo,li=i.id,ui=i.overflow,wo=s),s=nh(s,m.children),s.flags|=4096,s)}function Mv(i,s,c){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),Af(i.return,s,c)}function rh(i,s,c,m,v){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:v}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=m,w.tail=c,w.tailMode=v)}function Lv(i,s,c){var m=s.pendingProps,v=m.revealOrder,w=m.tail;if(gn(i,s,m.children,c),m=kt.current,(m&2)!==0)m=m&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Mv(i,c,s);else if(i.tag===19)Mv(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}m&=1}if(mt(kt,m),(s.mode&1)===0)s.memoizedState=null;else switch(v){case"forwards":for(c=s.child,v=null;c!==null;)i=c.alternate,i!==null&&Cu(i)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),rh(s,!1,v,c,w);break;case"backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(i=v.alternate,i!==null&&Cu(i)===null){s.child=v;break}i=v.sibling,v.sibling=c,c=v,v=i}rh(s,!0,c,null,w);break;case"together":rh(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Iu(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function fi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Eo|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=Zi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Zi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function pT(i,s,c){switch(s.tag){case 3:Ov(s),gs();break;case 5:Xy(s);break;case 1:In(s.type)&&pu(s);break;case 4:zf(s,s.stateNode.containerInfo);break;case 10:var m=s.type._context,v=s.memoizedProps.value;mt(wu,m._currentValue),m._currentValue=v;break;case 13:if(m=s.memoizedState,m!==null)return m.dehydrated!==null?(mt(kt,kt.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?zv(i,s,c):(mt(kt,kt.current&1),i=fi(i,s,c),i!==null?i.sibling:null);mt(kt,kt.current&1);break;case 19:if(m=(c&s.childLanes)!==0,(i.flags&128)!==0){if(m)return Lv(i,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),mt(kt,kt.current),m)break;return null;case 22:case 23:return s.lanes=0,Rv(i,s,c)}return fi(i,s,c)}var Fv,ih,$v,Vv;Fv=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},ih=function(){},$v=function(i,s,c,m){var v=i.memoizedProps;if(v!==m){i=s.stateNode,So(Ur.current);var w=null;switch(c){case"input":v=It(i,v),m=It(i,m),w=[];break;case"select":v=N({},v,{value:void 0}),m=N({},m,{value:void 0}),w=[];break;case"textarea":v=ee(i,v),m=ee(i,m),w=[];break;default:typeof v.onClick!="function"&&typeof m.onClick=="function"&&(i.onclick=du)}pt(c,m);var T;c=null;for(oe in v)if(!m.hasOwnProperty(oe)&&v.hasOwnProperty(oe)&&v[oe]!=null)if(oe==="style"){var z=v[oe];for(T in z)z.hasOwnProperty(T)&&(c||(c={}),c[T]="")}else oe!=="dangerouslySetInnerHTML"&&oe!=="children"&&oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&oe!=="autoFocus"&&(o.hasOwnProperty(oe)?w||(w=[]):(w=w||[]).push(oe,null));for(oe in m){var H=m[oe];if(z=v!=null?v[oe]:void 0,m.hasOwnProperty(oe)&&H!==z&&(H!=null||z!=null))if(oe==="style")if(z){for(T in z)!z.hasOwnProperty(T)||H&&H.hasOwnProperty(T)||(c||(c={}),c[T]="");for(T in H)H.hasOwnProperty(T)&&z[T]!==H[T]&&(c||(c={}),c[T]=H[T])}else c||(w||(w=[]),w.push(oe,c)),c=H;else oe==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,z=z?z.__html:void 0,H!=null&&z!==H&&(w=w||[]).push(oe,H)):oe==="children"?typeof H!="string"&&typeof H!="number"||(w=w||[]).push(oe,""+H):oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&(o.hasOwnProperty(oe)?(H!=null&&oe==="onScroll"&&yt("scroll",i),w||z===H||(w=[])):(w=w||[]).push(oe,H))}c&&(w=w||[]).push("style",c);var oe=w;(s.updateQueue=oe)&&(s.flags|=4)}},Vv=function(i,s,c,m){c!==m&&(s.flags|=4)};function Wa(i,s){if(!xt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function cn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,m=0;if(s)for(var v=i.child;v!==null;)c|=v.lanes|v.childLanes,m|=v.subtreeFlags&14680064,m|=v.flags&14680064,v.return=i,v=v.sibling;else for(v=i.child;v!==null;)c|=v.lanes|v.childLanes,m|=v.subtreeFlags,m|=v.flags,v.return=i,v=v.sibling;return i.subtreeFlags|=m,i.childLanes=c,s}function mT(i,s,c){var m=s.pendingProps;switch(_f(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cn(s),null;case 1:return In(s.type)&&hu(),cn(s),null;case 3:return m=s.stateNode,ws(),vt(Rn),vt(ln),Ff(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(i===null||i.child===null)&&(vu(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,kr!==null&&(mh(kr),kr=null))),ih(i,s),cn(s),null;case 5:Mf(s);var v=So($a.current);if(c=s.type,i!==null&&s.stateNode!=null)$v(i,s,c,m,v),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!m){if(s.stateNode===null)throw Error(n(166));return cn(s),null}if(i=So(Ur.current),vu(s)){m=s.stateNode,c=s.type;var w=s.memoizedProps;switch(m[Br]=s,m[Da]=w,i=(s.mode&1)!==0,c){case"dialog":yt("cancel",m),yt("close",m);break;case"iframe":case"object":case"embed":yt("load",m);break;case"video":case"audio":for(v=0;v<Ia.length;v++)yt(Ia[v],m);break;case"source":yt("error",m);break;case"img":case"image":case"link":yt("error",m),yt("load",m);break;case"details":yt("toggle",m);break;case"input":sn(m,w),yt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!w.multiple},yt("invalid",m);break;case"textarea":ae(m,w),yt("invalid",m)}pt(c,w),v=null;for(var T in w)if(w.hasOwnProperty(T)){var z=w[T];T==="children"?typeof z=="string"?m.textContent!==z&&(w.suppressHydrationWarning!==!0&&cu(m.textContent,z,i),v=["children",z]):typeof z=="number"&&m.textContent!==""+z&&(w.suppressHydrationWarning!==!0&&cu(m.textContent,z,i),v=["children",""+z]):o.hasOwnProperty(T)&&z!=null&&T==="onScroll"&&yt("scroll",m)}switch(c){case"input":Ae(m),tr(m,w,!0);break;case"textarea":Ae(m),ye(m);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(m.onclick=du)}m=v,s.updateQueue=m,m!==null&&(s.flags|=4)}else{T=v.nodeType===9?v:v.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=B(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=T.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=T.createElement(c,{is:m.is}):(i=T.createElement(c),c==="select"&&(T=i,m.multiple?T.multiple=!0:m.size&&(T.size=m.size))):i=T.createElementNS(i,c),i[Br]=s,i[Da]=m,Fv(i,s,!1,!1),s.stateNode=i;e:{switch(T=pn(c,m),c){case"dialog":yt("cancel",i),yt("close",i),v=m;break;case"iframe":case"object":case"embed":yt("load",i),v=m;break;case"video":case"audio":for(v=0;v<Ia.length;v++)yt(Ia[v],i);v=m;break;case"source":yt("error",i),v=m;break;case"img":case"image":case"link":yt("error",i),yt("load",i),v=m;break;case"details":yt("toggle",i),v=m;break;case"input":sn(i,m),v=It(i,m),yt("invalid",i);break;case"option":v=m;break;case"select":i._wrapperState={wasMultiple:!!m.multiple},v=N({},m,{value:void 0}),yt("invalid",i);break;case"textarea":ae(i,m),v=ee(i,m),yt("invalid",i);break;default:v=m}pt(c,v),z=v;for(w in z)if(z.hasOwnProperty(w)){var H=z[w];w==="style"?$t(i,H):w==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&_e(i,H)):w==="children"?typeof H=="string"?(c!=="textarea"||H!=="")&&ze(i,H):typeof H=="number"&&ze(i,""+H):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(o.hasOwnProperty(w)?H!=null&&w==="onScroll"&&yt("scroll",i):H!=null&&P(i,w,H,T))}switch(c){case"input":Ae(i),tr(i,m,!1);break;case"textarea":Ae(i),ye(i);break;case"option":m.value!=null&&i.setAttribute("value",""+me(m.value));break;case"select":i.multiple=!!m.multiple,w=m.value,w!=null?$(i,!!m.multiple,w,!1):m.defaultValue!=null&&$(i,!!m.multiple,m.defaultValue,!0);break;default:typeof v.onClick=="function"&&(i.onclick=du)}switch(c){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return cn(s),null;case 6:if(i&&s.stateNode!=null)Vv(i,s,i.memoizedProps,m);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(c=So($a.current),So(Ur.current),vu(s)){if(m=s.stateNode,c=s.memoizedProps,m[Br]=s,(w=m.nodeValue!==c)&&(i=Zn,i!==null))switch(i.tag){case 3:cu(m.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&cu(m.nodeValue,c,(i.mode&1)!==0)}w&&(s.flags|=4)}else m=(c.nodeType===9?c:c.ownerDocument).createTextNode(m),m[Br]=s,s.stateNode=m}return cn(s),null;case 13:if(vt(kt),m=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(xt&&qn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Hy(),gs(),s.flags|=98560,w=!1;else if(w=vu(s),m!==null&&m.dehydrated!==null){if(i===null){if(!w)throw Error(n(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[Br]=s}else gs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;cn(s),w=!1}else kr!==null&&(mh(kr),kr=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(m=m!==null,m!==(i!==null&&i.memoizedState!==null)&&m&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(kt.current&1)!==0?Bt===0&&(Bt=3):vh())),s.updateQueue!==null&&(s.flags|=4),cn(s),null);case 4:return ws(),ih(i,s),i===null&&Aa(s.stateNode.containerInfo),cn(s),null;case 10:return If(s.type._context),cn(s),null;case 17:return In(s.type)&&hu(),cn(s),null;case 19:if(vt(kt),w=s.memoizedState,w===null)return cn(s),null;if(m=(s.flags&128)!==0,T=w.rendering,T===null)if(m)Wa(w,!1);else{if(Bt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(T=Cu(i),T!==null){for(s.flags|=128,Wa(w,!1),m=T.updateQueue,m!==null&&(s.updateQueue=m,s.flags|=4),s.subtreeFlags=0,m=c,c=s.child;c!==null;)w=c,i=m,w.flags&=14680066,T=w.alternate,T===null?(w.childLanes=0,w.lanes=i,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=T.childLanes,w.lanes=T.lanes,w.child=T.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=T.memoizedProps,w.memoizedState=T.memoizedState,w.updateQueue=T.updateQueue,w.type=T.type,i=T.dependencies,w.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return mt(kt,kt.current&1|2),s.child}i=i.sibling}w.tail!==null&&jt()>Cs&&(s.flags|=128,m=!0,Wa(w,!1),s.lanes=4194304)}else{if(!m)if(i=Cu(T),i!==null){if(s.flags|=128,m=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Wa(w,!0),w.tail===null&&w.tailMode==="hidden"&&!T.alternate&&!xt)return cn(s),null}else 2*jt()-w.renderingStartTime>Cs&&c!==1073741824&&(s.flags|=128,m=!0,Wa(w,!1),s.lanes=4194304);w.isBackwards?(T.sibling=s.child,s.child=T):(c=w.last,c!==null?c.sibling=T:s.child=T,w.last=T)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=jt(),s.sibling=null,c=kt.current,mt(kt,m?c&1|2:c&1),s):(cn(s),null);case 22:case 23:return yh(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(Qn&1073741824)!==0&&(cn(s),s.subtreeFlags&6&&(s.flags|=8192)):cn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function gT(i,s){switch(_f(s),s.tag){case 1:return In(s.type)&&hu(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ws(),vt(Rn),vt(ln),Ff(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Mf(s),null;case 13:if(vt(kt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));gs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return vt(kt),null;case 4:return ws(),null;case 10:return If(s.type._context),null;case 22:case 23:return yh(),null;case 24:return null;default:return null}}var Au=!1,dn=!1,yT=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function ks(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(m){Tt(i,s,m)}else c.current=null}function oh(i,s,c){try{c()}catch(m){Tt(i,s,m)}}var Bv=!1;function vT(i,s){if(yf=Jl,i=wy(),uf(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var v=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var T=0,z=-1,H=-1,oe=0,fe=0,he=i,de=null;t:for(;;){for(var Te;he!==c||v!==0&&he.nodeType!==3||(z=T+v),he!==w||m!==0&&he.nodeType!==3||(H=T+m),he.nodeType===3&&(T+=he.nodeValue.length),(Te=he.firstChild)!==null;)de=he,he=Te;for(;;){if(he===i)break t;if(de===c&&++oe===v&&(z=T),de===w&&++fe===m&&(H=T),(Te=he.nextSibling)!==null)break;he=de,de=he.parentNode}he=Te}c=z===-1||H===-1?null:{start:z,end:H}}else c=null}c=c||{start:0,end:0}}else c=null;for(vf={focusedElem:i,selectionRange:c},Jl=!1,Pe=s;Pe!==null;)if(s=Pe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Pe=i;else for(;Pe!==null;){s=Pe;try{var Ne=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Ie=Ne.memoizedProps,Rt=Ne.memoizedState,X=s.stateNode,q=X.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:Sr(s.type,Ie),Rt);X.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var te=s.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ge){Tt(s,s.return,ge)}if(i=s.sibling,i!==null){i.return=s.return,Pe=i;break}Pe=s.return}return Ne=Bv,Bv=!1,Ne}function Za(i,s,c){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var v=m=m.next;do{if((v.tag&i)===i){var w=v.destroy;v.destroy=void 0,w!==void 0&&oh(s,c,w)}v=v.next}while(v!==m)}}function Ou(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var m=c.create;c.destroy=m()}c=c.next}while(c!==s)}}function sh(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function Uv(i){var s=i.alternate;s!==null&&(i.alternate=null,Uv(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Br],delete s[Da],delete s[kf],delete s[eT],delete s[tT])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Hv(i){return i.tag===5||i.tag===3||i.tag===4}function Wv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Hv(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ah(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=du));else if(m!==4&&(i=i.child,i!==null))for(ah(i,s,c),i=i.sibling;i!==null;)ah(i,s,c),i=i.sibling}function lh(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(lh(i,s,c),i=i.sibling;i!==null;)lh(i,s,c),i=i.sibling}var en=null,Cr=!1;function Vi(i,s,c){for(c=c.child;c!==null;)Zv(i,s,c),c=c.sibling}function Zv(i,s,c){if(Vr&&typeof Vr.onCommitFiberUnmount=="function")try{Vr.onCommitFiberUnmount(ql,c)}catch{}switch(c.tag){case 5:dn||ks(c,s);case 6:var m=en,v=Cr;en=null,Vi(i,s,c),en=m,Cr=v,en!==null&&(Cr?(i=en,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):en.removeChild(c.stateNode));break;case 18:en!==null&&(Cr?(i=en,c=c.stateNode,i.nodeType===8?bf(i.parentNode,c):i.nodeType===1&&bf(i,c),Ca(i)):bf(en,c.stateNode));break;case 4:m=en,v=Cr,en=c.stateNode.containerInfo,Cr=!0,Vi(i,s,c),en=m,Cr=v;break;case 0:case 11:case 14:case 15:if(!dn&&(m=c.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){v=m=m.next;do{var w=v,T=w.destroy;w=w.tag,T!==void 0&&((w&2)!==0||(w&4)!==0)&&oh(c,s,T),v=v.next}while(v!==m)}Vi(i,s,c);break;case 1:if(!dn&&(ks(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=c.memoizedProps,m.state=c.memoizedState,m.componentWillUnmount()}catch(z){Tt(c,s,z)}Vi(i,s,c);break;case 21:Vi(i,s,c);break;case 22:c.mode&1?(dn=(m=dn)||c.memoizedState!==null,Vi(i,s,c),dn=m):Vi(i,s,c);break;default:Vi(i,s,c)}}function qv(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new yT),s.forEach(function(m){var v=TT.bind(null,i,m);c.has(m)||(c.add(m),m.then(v,v))})}}function Er(i,s){var c=s.deletions;if(c!==null)for(var m=0;m<c.length;m++){var v=c[m];try{var w=i,T=s,z=T;e:for(;z!==null;){switch(z.tag){case 5:en=z.stateNode,Cr=!1;break e;case 3:en=z.stateNode.containerInfo,Cr=!0;break e;case 4:en=z.stateNode.containerInfo,Cr=!0;break e}z=z.return}if(en===null)throw Error(n(160));Zv(w,T,v),en=null,Cr=!1;var H=v.alternate;H!==null&&(H.return=null),v.return=null}catch(oe){Tt(v,s,oe)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Qv(s,i),s=s.sibling}function Qv(i,s){var c=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Er(s,i),Wr(i),m&4){try{Za(3,i,i.return),Ou(3,i)}catch(Ie){Tt(i,i.return,Ie)}try{Za(5,i,i.return)}catch(Ie){Tt(i,i.return,Ie)}}break;case 1:Er(s,i),Wr(i),m&512&&c!==null&&ks(c,c.return);break;case 5:if(Er(s,i),Wr(i),m&512&&c!==null&&ks(c,c.return),i.flags&32){var v=i.stateNode;try{ze(v,"")}catch(Ie){Tt(i,i.return,Ie)}}if(m&4&&(v=i.stateNode,v!=null)){var w=i.memoizedProps,T=c!==null?c.memoizedProps:w,z=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{z==="input"&&w.type==="radio"&&w.name!=null&&Gt(v,w),pn(z,T);var oe=pn(z,w);for(T=0;T<H.length;T+=2){var fe=H[T],he=H[T+1];fe==="style"?$t(v,he):fe==="dangerouslySetInnerHTML"?_e(v,he):fe==="children"?ze(v,he):P(v,fe,he,oe)}switch(z){case"input":an(v,w);break;case"textarea":ke(v,w);break;case"select":var de=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!w.multiple;var Te=w.value;Te!=null?$(v,!!w.multiple,Te,!1):de!==!!w.multiple&&(w.defaultValue!=null?$(v,!!w.multiple,w.defaultValue,!0):$(v,!!w.multiple,w.multiple?[]:"",!1))}v[Da]=w}catch(Ie){Tt(i,i.return,Ie)}}break;case 6:if(Er(s,i),Wr(i),m&4){if(i.stateNode===null)throw Error(n(162));v=i.stateNode,w=i.memoizedProps;try{v.nodeValue=w}catch(Ie){Tt(i,i.return,Ie)}}break;case 3:if(Er(s,i),Wr(i),m&4&&c!==null&&c.memoizedState.isDehydrated)try{Ca(s.containerInfo)}catch(Ie){Tt(i,i.return,Ie)}break;case 4:Er(s,i),Wr(i);break;case 13:Er(s,i),Wr(i),v=i.child,v.flags&8192&&(w=v.memoizedState!==null,v.stateNode.isHidden=w,!w||v.alternate!==null&&v.alternate.memoizedState!==null||(dh=jt())),m&4&&qv(i);break;case 22:if(fe=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(oe=dn)||fe,Er(s,i),dn=oe):Er(s,i),Wr(i),m&8192){if(oe=i.memoizedState!==null,(i.stateNode.isHidden=oe)&&!fe&&(i.mode&1)!==0)for(Pe=i,fe=i.child;fe!==null;){for(he=Pe=fe;Pe!==null;){switch(de=Pe,Te=de.child,de.tag){case 0:case 11:case 14:case 15:Za(4,de,de.return);break;case 1:ks(de,de.return);var Ne=de.stateNode;if(typeof Ne.componentWillUnmount=="function"){m=de,c=de.return;try{s=m,Ne.props=s.memoizedProps,Ne.state=s.memoizedState,Ne.componentWillUnmount()}catch(Ie){Tt(m,c,Ie)}}break;case 5:ks(de,de.return);break;case 22:if(de.memoizedState!==null){Gv(he);continue}}Te!==null?(Te.return=de,Pe=Te):Gv(he)}fe=fe.sibling}e:for(fe=null,he=i;;){if(he.tag===5){if(fe===null){fe=he;try{v=he.stateNode,oe?(w=v.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(z=he.stateNode,H=he.memoizedProps.style,T=H!=null&&H.hasOwnProperty("display")?H.display:null,z.style.display=Zt("display",T))}catch(Ie){Tt(i,i.return,Ie)}}}else if(he.tag===6){if(fe===null)try{he.stateNode.nodeValue=oe?"":he.memoizedProps}catch(Ie){Tt(i,i.return,Ie)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;fe===he&&(fe=null),he=he.return}fe===he&&(fe=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:Er(s,i),Wr(i),m&4&&qv(i);break;case 21:break;default:Er(s,i),Wr(i)}}function Wr(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(Hv(c)){var m=c;break e}c=c.return}throw Error(n(160))}switch(m.tag){case 5:var v=m.stateNode;m.flags&32&&(ze(v,""),m.flags&=-33);var w=Wv(i);lh(i,w,v);break;case 3:case 4:var T=m.stateNode.containerInfo,z=Wv(i);ah(i,z,T);break;default:throw Error(n(161))}}catch(H){Tt(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function xT(i,s,c){Pe=i,Yv(i)}function Yv(i,s,c){for(var m=(i.mode&1)!==0;Pe!==null;){var v=Pe,w=v.child;if(v.tag===22&&m){var T=v.memoizedState!==null||Au;if(!T){var z=v.alternate,H=z!==null&&z.memoizedState!==null||dn;z=Au;var oe=dn;if(Au=T,(dn=H)&&!oe)for(Pe=v;Pe!==null;)T=Pe,H=T.child,T.tag===22&&T.memoizedState!==null?Xv(v):H!==null?(H.return=T,Pe=H):Xv(v);for(;w!==null;)Pe=w,Yv(w),w=w.sibling;Pe=v,Au=z,dn=oe}Kv(i)}else(v.subtreeFlags&8772)!==0&&w!==null?(w.return=v,Pe=w):Kv(i)}}function Kv(i){for(;Pe!==null;){var s=Pe;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||Ou(5,s);break;case 1:var m=s.stateNode;if(s.flags&4&&!dn)if(c===null)m.componentDidMount();else{var v=s.elementType===s.type?c.memoizedProps:Sr(s.type,c.memoizedProps);m.componentDidUpdate(v,c.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Gy(s,w,m);break;case 3:var T=s.updateQueue;if(T!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}Gy(s,T,c)}break;case 5:var z=s.stateNode;if(c===null&&s.flags&4){c=z;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&c.focus();break;case"img":H.src&&(c.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var oe=s.alternate;if(oe!==null){var fe=oe.memoizedState;if(fe!==null){var he=fe.dehydrated;he!==null&&Ca(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&sh(s)}catch(de){Tt(s,s.return,de)}}if(s===i){Pe=null;break}if(c=s.sibling,c!==null){c.return=s.return,Pe=c;break}Pe=s.return}}function Gv(i){for(;Pe!==null;){var s=Pe;if(s===i){Pe=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Pe=c;break}Pe=s.return}}function Xv(i){for(;Pe!==null;){var s=Pe;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{Ou(4,s)}catch(H){Tt(s,c,H)}break;case 1:var m=s.stateNode;if(typeof m.componentDidMount=="function"){var v=s.return;try{m.componentDidMount()}catch(H){Tt(s,v,H)}}var w=s.return;try{sh(s)}catch(H){Tt(s,w,H)}break;case 5:var T=s.return;try{sh(s)}catch(H){Tt(s,T,H)}}}catch(H){Tt(s,s.return,H)}if(s===i){Pe=null;break}var z=s.sibling;if(z!==null){z.return=s.return,Pe=z;break}Pe=s.return}}var wT=Math.ceil,Du=R.ReactCurrentDispatcher,uh=R.ReactCurrentOwner,sr=R.ReactCurrentBatchConfig,Je=0,Qt=null,At=null,tn=0,Qn=0,Ss=zi(0),Bt=0,qa=null,Eo=0,zu=0,ch=0,Qa=null,On=null,dh=0,Cs=1/0,hi=null,Mu=!1,fh=null,Bi=null,Lu=!1,Ui=null,Fu=0,Ya=0,hh=null,$u=-1,Vu=0;function yn(){return(Je&6)!==0?jt():$u!==-1?$u:$u=jt()}function Hi(i){return(i.mode&1)===0?1:(Je&2)!==0&&tn!==0?tn&-tn:rT.transition!==null?(Vu===0&&(Vu=Wg()),Vu):(i=at,i!==0||(i=window.event,i=i===void 0?16:ey(i.type)),i)}function _r(i,s,c,m){if(50<Ya)throw Ya=0,hh=null,Error(n(185));xa(i,c,m),((Je&2)===0||i!==Qt)&&(i===Qt&&((Je&2)===0&&(zu|=c),Bt===4&&Wi(i,tn)),Dn(i,m),c===1&&Je===0&&(s.mode&1)===0&&(Cs=jt()+500,mu&&Li()))}function Dn(i,s){var c=i.callbackNode;r_(i,s);var m=Kl(i,i===Qt?tn:0);if(m===0)c!==null&&Bg(c),i.callbackNode=null,i.callbackPriority=0;else if(s=m&-m,i.callbackPriority!==s){if(c!=null&&Bg(c),s===1)i.tag===0?nT(ex.bind(null,i)):Fy(ex.bind(null,i)),X_(function(){(Je&6)===0&&Li()}),c=null;else{switch(Zg(m)){case 1:c=Wd;break;case 4:c=Ug;break;case 16:c=Zl;break;case 536870912:c=Hg;break;default:c=Zl}c=lx(c,Jv.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function Jv(i,s){if($u=-1,Vu=0,(Je&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Es()&&i.callbackNode!==c)return null;var m=Kl(i,i===Qt?tn:0);if(m===0)return null;if((m&30)!==0||(m&i.expiredLanes)!==0||s)s=Bu(i,m);else{s=m;var v=Je;Je|=2;var w=nx();(Qt!==i||tn!==s)&&(hi=null,Cs=jt()+500,To(i,s));do try{ST();break}catch(z){tx(i,z)}while(!0);Rf(),Du.current=w,Je=v,At!==null?s=0:(Qt=null,tn=0,s=Bt)}if(s!==0){if(s===2&&(v=Zd(i),v!==0&&(m=v,s=ph(i,v))),s===1)throw c=qa,To(i,0),Wi(i,m),Dn(i,jt()),c;if(s===6)Wi(i,m);else{if(v=i.current.alternate,(m&30)===0&&!bT(v)&&(s=Bu(i,m),s===2&&(w=Zd(i),w!==0&&(m=w,s=ph(i,w))),s===1))throw c=qa,To(i,0),Wi(i,m),Dn(i,jt()),c;switch(i.finishedWork=v,i.finishedLanes=m,s){case 0:case 1:throw Error(n(345));case 2:Po(i,On,hi);break;case 3:if(Wi(i,m),(m&130023424)===m&&(s=dh+500-jt(),10<s)){if(Kl(i,0)!==0)break;if(v=i.suspendedLanes,(v&m)!==m){yn(),i.pingedLanes|=i.suspendedLanes&v;break}i.timeoutHandle=wf(Po.bind(null,i,On,hi),s);break}Po(i,On,hi);break;case 4:if(Wi(i,m),(m&4194240)===m)break;for(s=i.eventTimes,v=-1;0<m;){var T=31-wr(m);w=1<<T,T=s[T],T>v&&(v=T),m&=~w}if(m=v,m=jt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*wT(m/1960))-m,10<m){i.timeoutHandle=wf(Po.bind(null,i,On,hi),m);break}Po(i,On,hi);break;case 5:Po(i,On,hi);break;default:throw Error(n(329))}}}return Dn(i,jt()),i.callbackNode===c?Jv.bind(null,i):null}function ph(i,s){var c=Qa;return i.current.memoizedState.isDehydrated&&(To(i,s).flags|=256),i=Bu(i,s),i!==2&&(s=On,On=c,s!==null&&mh(s)),i}function mh(i){On===null?On=i:On.push.apply(On,i)}function bT(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var m=0;m<c.length;m++){var v=c[m],w=v.getSnapshot;v=v.value;try{if(!br(w(),v))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Wi(i,s){for(s&=~ch,s&=~zu,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-wr(s),m=1<<c;i[c]=-1,s&=~m}}function ex(i){if((Je&6)!==0)throw Error(n(327));Es();var s=Kl(i,0);if((s&1)===0)return Dn(i,jt()),null;var c=Bu(i,s);if(i.tag!==0&&c===2){var m=Zd(i);m!==0&&(s=m,c=ph(i,m))}if(c===1)throw c=qa,To(i,0),Wi(i,s),Dn(i,jt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Po(i,On,hi),Dn(i,jt()),null}function gh(i,s){var c=Je;Je|=1;try{return i(s)}finally{Je=c,Je===0&&(Cs=jt()+500,mu&&Li())}}function _o(i){Ui!==null&&Ui.tag===0&&(Je&6)===0&&Es();var s=Je;Je|=1;var c=sr.transition,m=at;try{if(sr.transition=null,at=1,i)return i()}finally{at=m,sr.transition=c,Je=s,(Je&6)===0&&Li()}}function yh(){Qn=Ss.current,vt(Ss)}function To(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,G_(c)),At!==null)for(c=At.return;c!==null;){var m=c;switch(_f(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&hu();break;case 3:ws(),vt(Rn),vt(ln),Ff();break;case 5:Mf(m);break;case 4:ws();break;case 13:vt(kt);break;case 19:vt(kt);break;case 10:If(m.type._context);break;case 22:case 23:yh()}c=c.return}if(Qt=i,At=i=Zi(i.current,null),tn=Qn=s,Bt=0,qa=null,ch=zu=Eo=0,On=Qa=null,ko!==null){for(s=0;s<ko.length;s++)if(c=ko[s],m=c.interleaved,m!==null){c.interleaved=null;var v=m.next,w=c.pending;if(w!==null){var T=w.next;w.next=v,m.next=T}c.pending=m}ko=null}return i}function tx(i,s){do{var c=At;try{if(Rf(),Eu.current=Nu,_u){for(var m=St.memoizedState;m!==null;){var v=m.queue;v!==null&&(v.pending=null),m=m.next}_u=!1}if(Co=0,qt=Vt=St=null,Va=!1,Ba=0,uh.current=null,c===null||c.return===null){Bt=1,qa=s,At=null;break}e:{var w=i,T=c.return,z=c,H=s;if(s=tn,z.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var oe=H,fe=z,he=fe.tag;if((fe.mode&1)===0&&(he===0||he===11||he===15)){var de=fe.alternate;de?(fe.updateQueue=de.updateQueue,fe.memoizedState=de.memoizedState,fe.lanes=de.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var Te=_v(T);if(Te!==null){Te.flags&=-257,Tv(Te,T,z,w,s),Te.mode&1&&Ev(w,oe,s),s=Te,H=oe;var Ne=s.updateQueue;if(Ne===null){var Ie=new Set;Ie.add(H),s.updateQueue=Ie}else Ne.add(H);break e}else{if((s&1)===0){Ev(w,oe,s),vh();break e}H=Error(n(426))}}else if(xt&&z.mode&1){var Rt=_v(T);if(Rt!==null){(Rt.flags&65536)===0&&(Rt.flags|=256),Tv(Rt,T,z,w,s),Nf(bs(H,z));break e}}w=H=bs(H,z),Bt!==4&&(Bt=2),Qa===null?Qa=[w]:Qa.push(w),w=T;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var X=Sv(w,H,s);Ky(w,X);break e;case 1:z=H;var q=w.type,te=w.stateNode;if((w.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Bi===null||!Bi.has(te)))){w.flags|=65536,s&=-s,w.lanes|=s;var ge=Cv(w,z,s);Ky(w,ge);break e}}w=w.return}while(w!==null)}ix(c)}catch(Oe){s=Oe,At===c&&c!==null&&(At=c=c.return);continue}break}while(!0)}function nx(){var i=Du.current;return Du.current=Nu,i===null?Nu:i}function vh(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Qt===null||(Eo&268435455)===0&&(zu&268435455)===0||Wi(Qt,tn)}function Bu(i,s){var c=Je;Je|=2;var m=nx();(Qt!==i||tn!==s)&&(hi=null,To(i,s));do try{kT();break}catch(v){tx(i,v)}while(!0);if(Rf(),Je=c,Du.current=m,At!==null)throw Error(n(261));return Qt=null,tn=0,Bt}function kT(){for(;At!==null;)rx(At)}function ST(){for(;At!==null&&!QE();)rx(At)}function rx(i){var s=ax(i.alternate,i,Qn);i.memoizedProps=i.pendingProps,s===null?ix(i):At=s,uh.current=null}function ix(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=mT(c,s,Qn),c!==null){At=c;return}}else{if(c=gT(c,s),c!==null){c.flags&=32767,At=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Bt=6,At=null;return}}if(s=s.sibling,s!==null){At=s;return}At=s=i}while(s!==null);Bt===0&&(Bt=5)}function Po(i,s,c){var m=at,v=sr.transition;try{sr.transition=null,at=1,CT(i,s,c,m)}finally{sr.transition=v,at=m}return null}function CT(i,s,c,m){do Es();while(Ui!==null);if((Je&6)!==0)throw Error(n(327));c=i.finishedWork;var v=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var w=c.lanes|c.childLanes;if(i_(i,w),i===Qt&&(At=Qt=null,tn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Lu||(Lu=!0,lx(Zl,function(){return Es(),null})),w=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||w){w=sr.transition,sr.transition=null;var T=at;at=1;var z=Je;Je|=4,uh.current=null,vT(i,c),Qv(c,i),H_(vf),Jl=!!yf,vf=yf=null,i.current=c,xT(c),YE(),Je=z,at=T,sr.transition=w}else i.current=c;if(Lu&&(Lu=!1,Ui=i,Fu=v),w=i.pendingLanes,w===0&&(Bi=null),XE(c.stateNode),Dn(i,jt()),s!==null)for(m=i.onRecoverableError,c=0;c<s.length;c++)v=s[c],m(v.value,{componentStack:v.stack,digest:v.digest});if(Mu)throw Mu=!1,i=fh,fh=null,i;return(Fu&1)!==0&&i.tag!==0&&Es(),w=i.pendingLanes,(w&1)!==0?i===hh?Ya++:(Ya=0,hh=i):Ya=0,Li(),null}function Es(){if(Ui!==null){var i=Zg(Fu),s=sr.transition,c=at;try{if(sr.transition=null,at=16>i?16:i,Ui===null)var m=!1;else{if(i=Ui,Ui=null,Fu=0,(Je&6)!==0)throw Error(n(331));var v=Je;for(Je|=4,Pe=i.current;Pe!==null;){var w=Pe,T=w.child;if((Pe.flags&16)!==0){var z=w.deletions;if(z!==null){for(var H=0;H<z.length;H++){var oe=z[H];for(Pe=oe;Pe!==null;){var fe=Pe;switch(fe.tag){case 0:case 11:case 15:Za(8,fe,w)}var he=fe.child;if(he!==null)he.return=fe,Pe=he;else for(;Pe!==null;){fe=Pe;var de=fe.sibling,Te=fe.return;if(Uv(fe),fe===oe){Pe=null;break}if(de!==null){de.return=Te,Pe=de;break}Pe=Te}}}var Ne=w.alternate;if(Ne!==null){var Ie=Ne.child;if(Ie!==null){Ne.child=null;do{var Rt=Ie.sibling;Ie.sibling=null,Ie=Rt}while(Ie!==null)}}Pe=w}}if((w.subtreeFlags&2064)!==0&&T!==null)T.return=w,Pe=T;else e:for(;Pe!==null;){if(w=Pe,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Za(9,w,w.return)}var X=w.sibling;if(X!==null){X.return=w.return,Pe=X;break e}Pe=w.return}}var q=i.current;for(Pe=q;Pe!==null;){T=Pe;var te=T.child;if((T.subtreeFlags&2064)!==0&&te!==null)te.return=T,Pe=te;else e:for(T=q;Pe!==null;){if(z=Pe,(z.flags&2048)!==0)try{switch(z.tag){case 0:case 11:case 15:Ou(9,z)}}catch(Oe){Tt(z,z.return,Oe)}if(z===T){Pe=null;break e}var ge=z.sibling;if(ge!==null){ge.return=z.return,Pe=ge;break e}Pe=z.return}}if(Je=v,Li(),Vr&&typeof Vr.onPostCommitFiberRoot=="function")try{Vr.onPostCommitFiberRoot(ql,i)}catch{}m=!0}return m}finally{at=c,sr.transition=s}}return!1}function ox(i,s,c){s=bs(c,s),s=Sv(i,s,1),i=$i(i,s,1),s=yn(),i!==null&&(xa(i,1,s),Dn(i,s))}function Tt(i,s,c){if(i.tag===3)ox(i,i,c);else for(;s!==null;){if(s.tag===3){ox(s,i,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Bi===null||!Bi.has(m))){i=bs(c,i),i=Cv(s,i,1),s=$i(s,i,1),i=yn(),s!==null&&(xa(s,1,i),Dn(s,i));break}}s=s.return}}function ET(i,s,c){var m=i.pingCache;m!==null&&m.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Qt===i&&(tn&c)===c&&(Bt===4||Bt===3&&(tn&130023424)===tn&&500>jt()-dh?To(i,0):ch|=c),Dn(i,s)}function sx(i,s){s===0&&((i.mode&1)===0?s=1:(s=Yl,Yl<<=1,(Yl&130023424)===0&&(Yl=4194304)));var c=yn();i=ci(i,s),i!==null&&(xa(i,s,c),Dn(i,c))}function _T(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),sx(i,c)}function TT(i,s){var c=0;switch(i.tag){case 13:var m=i.stateNode,v=i.memoizedState;v!==null&&(c=v.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(n(314))}m!==null&&m.delete(s),sx(i,c)}var ax;ax=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Rn.current)An=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return An=!1,pT(i,s,c);An=(i.flags&131072)!==0}else An=!1,xt&&(s.flags&1048576)!==0&&$y(s,yu,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;Iu(i,s),i=s.pendingProps;var v=hs(s,ln.current);xs(s,c),v=Bf(null,s,m,i,v,c);var w=Uf();return s.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,In(m)?(w=!0,pu(s)):w=!1,s.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,Df(s),v.updater=ju,s.stateNode=v,v._reactInternals=s,Yf(s,m,i,c),s=Jf(null,s,m,!0,w,c)):(s.tag=0,xt&&w&&Ef(s),gn(null,s,v,c),s=s.child),s;case 16:m=s.elementType;e:{switch(Iu(i,s),i=s.pendingProps,v=m._init,m=v(m._payload),s.type=m,v=s.tag=NT(m),i=Sr(m,i),v){case 0:s=Xf(null,s,m,i,c);break e;case 1:s=Av(null,s,m,i,c);break e;case 11:s=Pv(null,s,m,i,c);break e;case 14:s=Nv(null,s,m,Sr(m.type,i),c);break e}throw Error(n(306,m,""))}return s;case 0:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Xf(i,s,m,v,c);case 1:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Av(i,s,m,v,c);case 3:e:{if(Ov(s),i===null)throw Error(n(387));m=s.pendingProps,w=s.memoizedState,v=w.element,Yy(i,s),Su(s,m,null,c);var T=s.memoizedState;if(m=T.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){v=bs(Error(n(423)),s),s=Dv(i,s,m,c,v);break e}else if(m!==v){v=bs(Error(n(424)),s),s=Dv(i,s,m,c,v);break e}else for(qn=Di(s.stateNode.containerInfo.firstChild),Zn=s,xt=!0,kr=null,c=qy(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(gs(),m===v){s=fi(i,s,c);break e}gn(i,s,m,c)}s=s.child}return s;case 5:return Xy(s),i===null&&Pf(s),m=s.type,v=s.pendingProps,w=i!==null?i.memoizedProps:null,T=v.children,xf(m,v)?T=null:w!==null&&xf(m,w)&&(s.flags|=32),Iv(i,s),gn(i,s,T,c),s.child;case 6:return i===null&&Pf(s),null;case 13:return zv(i,s,c);case 4:return zf(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=ys(s,null,m,c):gn(i,s,m,c),s.child;case 11:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Pv(i,s,m,v,c);case 7:return gn(i,s,s.pendingProps,c),s.child;case 8:return gn(i,s,s.pendingProps.children,c),s.child;case 12:return gn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(m=s.type._context,v=s.pendingProps,w=s.memoizedProps,T=v.value,mt(wu,m._currentValue),m._currentValue=T,w!==null)if(br(w.value,T)){if(w.children===v.children&&!Rn.current){s=fi(i,s,c);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var z=w.dependencies;if(z!==null){T=w.child;for(var H=z.firstContext;H!==null;){if(H.context===m){if(w.tag===1){H=di(-1,c&-c),H.tag=2;var oe=w.updateQueue;if(oe!==null){oe=oe.shared;var fe=oe.pending;fe===null?H.next=H:(H.next=fe.next,fe.next=H),oe.pending=H}}w.lanes|=c,H=w.alternate,H!==null&&(H.lanes|=c),Af(w.return,c,s),z.lanes|=c;break}H=H.next}}else if(w.tag===10)T=w.type===s.type?null:w.child;else if(w.tag===18){if(T=w.return,T===null)throw Error(n(341));T.lanes|=c,z=T.alternate,z!==null&&(z.lanes|=c),Af(T,c,s),T=w.sibling}else T=w.child;if(T!==null)T.return=w;else for(T=w;T!==null;){if(T===s){T=null;break}if(w=T.sibling,w!==null){w.return=T.return,T=w;break}T=T.return}w=T}gn(i,s,v.children,c),s=s.child}return s;case 9:return v=s.type,m=s.pendingProps.children,xs(s,c),v=ir(v),m=m(v),s.flags|=1,gn(i,s,m,c),s.child;case 14:return m=s.type,v=Sr(m,s.pendingProps),v=Sr(m.type,v),Nv(i,s,m,v,c);case 15:return jv(i,s,s.type,s.pendingProps,c);case 17:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Iu(i,s),s.tag=1,In(m)?(i=!0,pu(s)):i=!1,xs(s,c),bv(s,m,v),Yf(s,m,v,c),Jf(null,s,m,!0,i,c);case 19:return Lv(i,s,c);case 22:return Rv(i,s,c)}throw Error(n(156,s.tag))};function lx(i,s){return Vg(i,s)}function PT(i,s,c,m){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(i,s,c,m){return new PT(i,s,c,m)}function xh(i){return i=i.prototype,!(!i||!i.isReactComponent)}function NT(i){if(typeof i=="function")return xh(i)?1:0;if(i!=null){if(i=i.$$typeof,i===M)return 11;if(i===U)return 14}return 2}function Zi(i,s){var c=i.alternate;return c===null?(c=ar(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function Uu(i,s,c,m,v,w){var T=2;if(m=i,typeof i=="function")xh(i)&&(T=1);else if(typeof i=="string")T=5;else e:switch(i){case F:return No(c.children,v,w,s);case Z:T=8,v|=8;break;case re:return i=ar(12,c,s,v|2),i.elementType=re,i.lanes=w,i;case ne:return i=ar(13,c,s,v),i.elementType=ne,i.lanes=w,i;case W:return i=ar(19,c,s,v),i.elementType=W,i.lanes=w,i;case J:return Hu(c,v,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case O:T=10;break e;case Y:T=9;break e;case M:T=11;break e;case U:T=14;break e;case Q:T=16,m=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ar(T,c,s,v),s.elementType=i,s.type=m,s.lanes=w,s}function No(i,s,c,m){return i=ar(7,i,m,s),i.lanes=c,i}function Hu(i,s,c,m){return i=ar(22,i,m,s),i.elementType=J,i.lanes=c,i.stateNode={isHidden:!1},i}function wh(i,s,c){return i=ar(6,i,null,s),i.lanes=c,i}function bh(i,s,c){return s=ar(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function jT(i,s,c,m,v){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qd(0),this.expirationTimes=qd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qd(0),this.identifierPrefix=m,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function kh(i,s,c,m,v,w,T,z,H){return i=new jT(i,s,c,z,H),s===1?(s=1,w===!0&&(s|=8)):s=0,w=ar(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Df(w),i}function RT(i,s,c){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:m==null?null:""+m,children:i,containerInfo:s,implementation:c}}function ux(i){if(!i)return Mi;i=i._reactInternals;e:{if(yo(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(In(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(In(c))return My(i,c,s)}return s}function cx(i,s,c,m,v,w,T,z,H){return i=kh(c,m,!0,i,v,w,T,z,H),i.context=ux(null),c=i.current,m=yn(),v=Hi(c),w=di(m,v),w.callback=s??null,$i(c,w,v),i.current.lanes=v,xa(i,v,m),Dn(i,m),i}function Wu(i,s,c,m){var v=s.current,w=yn(),T=Hi(v);return c=ux(c),s.context===null?s.context=c:s.pendingContext=c,s=di(w,T),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=$i(v,s,T),i!==null&&(_r(i,v,T,w),ku(i,v,T)),T}function Zu(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function dx(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Sh(i,s){dx(i,s),(i=i.alternate)&&dx(i,s)}function IT(){return null}var fx=typeof reportError=="function"?reportError:function(i){console.error(i)};function Ch(i){this._internalRoot=i}qu.prototype.render=Ch.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Wu(i,s,null,null)},qu.prototype.unmount=Ch.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;_o(function(){Wu(null,i,null,null)}),s[si]=null}};function qu(i){this._internalRoot=i}qu.prototype.unstable_scheduleHydration=function(i){if(i){var s=Yg();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Ii.length&&s!==0&&s<Ii[c].priority;c++);Ii.splice(c,0,i),c===0&&Xg(i)}};function Eh(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Qu(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function hx(){}function AT(i,s,c,m,v){if(v){if(typeof m=="function"){var w=m;m=function(){var oe=Zu(T);w.call(oe)}}var T=cx(s,m,i,0,null,!1,!1,"",hx);return i._reactRootContainer=T,i[si]=T.current,Aa(i.nodeType===8?i.parentNode:i),_o(),T}for(;v=i.lastChild;)i.removeChild(v);if(typeof m=="function"){var z=m;m=function(){var oe=Zu(H);z.call(oe)}}var H=kh(i,0,!1,null,null,!1,!1,"",hx);return i._reactRootContainer=H,i[si]=H.current,Aa(i.nodeType===8?i.parentNode:i),_o(function(){Wu(s,H,c,m)}),H}function Yu(i,s,c,m,v){var w=c._reactRootContainer;if(w){var T=w;if(typeof v=="function"){var z=v;v=function(){var H=Zu(T);z.call(H)}}Wu(s,T,i,v)}else T=AT(c,s,i,v,m);return Zu(T)}qg=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=va(s.pendingLanes);c!==0&&(Qd(s,c|1),Dn(s,jt()),(Je&6)===0&&(Cs=jt()+500,Li()))}break;case 13:_o(function(){var m=ci(i,1);if(m!==null){var v=yn();_r(m,i,1,v)}}),Sh(i,1)}},Yd=function(i){if(i.tag===13){var s=ci(i,134217728);if(s!==null){var c=yn();_r(s,i,134217728,c)}Sh(i,134217728)}},Qg=function(i){if(i.tag===13){var s=Hi(i),c=ci(i,s);if(c!==null){var m=yn();_r(c,i,s,m)}Sh(i,s)}},Yg=function(){return at},Kg=function(i,s){var c=at;try{return at=i,s()}finally{at=c}},rs=function(i,s,c){switch(s){case"input":if(an(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var m=c[s];if(m!==i&&m.form===i.form){var v=fu(m);if(!v)throw Error(n(90));Ve(m),an(m,v)}}}break;case"textarea":ke(i,c);break;case"select":s=c.value,s!=null&&$(i,!!c.multiple,s,!1)}},rt=gh,ft=_o;var OT={usingClientEntryPoint:!1,Events:[za,ds,fu,Ul,He,gh]},Ka={findFiberByHostInstance:vo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},DT={bundleType:Ka.bundleType,version:Ka.version,rendererPackageName:Ka.rendererPackageName,rendererConfig:Ka.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Fg(i),i===null?null:i.stateNode},findFiberByHostInstance:Ka.findFiberByHostInstance||IT,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 Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{ql=Ku.inject(DT),Vr=Ku}catch{}}return zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OT,zn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Eh(s))throw Error(n(200));return RT(i,s,null,c)},zn.createRoot=function(i,s){if(!Eh(i))throw Error(n(299));var c=!1,m="",v=fx;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=kh(i,1,!1,null,null,c,!1,m,v),i[si]=s.current,Aa(i.nodeType===8?i.parentNode:i),new Ch(s)},zn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Fg(s),i=i===null?null:i.stateNode,i},zn.flushSync=function(i){return _o(i)},zn.hydrate=function(i,s,c){if(!Qu(s))throw Error(n(200));return Yu(null,i,s,!0,c)},zn.hydrateRoot=function(i,s,c){if(!Eh(i))throw Error(n(405));var m=c!=null&&c.hydratedSources||null,v=!1,w="",T=fx;if(c!=null&&(c.unstable_strictMode===!0&&(v=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onRecoverableError!==void 0&&(T=c.onRecoverableError)),s=cx(s,null,i,1,c??null,v,!1,w,T),i[si]=s.current,Aa(i),m)for(i=0;i<m.length;i++)c=m[i],v=c._getVersion,v=v(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,v]:s.mutableSourceEagerHydrationData.push(c,v);return new qu(s)},zn.render=function(i,s,c){if(!Qu(s))throw Error(n(200));return Yu(null,i,s,!1,c)},zn.unmountComponentAtNode=function(i){if(!Qu(i))throw Error(n(40));return i._reactRootContainer?(_o(function(){Yu(null,null,i,!1,function(){i._reactRootContainer=null,i[si]=null})}),!0):!1},zn.unstable_batchedUpdates=gh,zn.unstable_renderSubtreeIntoContainer=function(i,s,c,m){if(!Qu(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Yu(i,s,c,!1,m)},zn.version="18.3.1-next-f1338f8080-20240426",zn}var kx;function Cb(){if(kx)return Nh.exports;kx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Nh.exports=UT(),Nh.exports}var Sx;function HT(){if(Sx)return Ju;Sx=1;var e=Cb();return Ju.createRoot=e.createRoot,Ju.hydrateRoot=e.hydrateRoot,Ju}var WT=HT();const ZT=Jo(WT);/**
|
|
41
41
|
* react-router v7.12.0
|
|
42
42
|
*
|
|
43
43
|
* Copyright (c) Remix Software Inc.
|
|
@@ -46,185 +46,185 @@ Error generating stack: `+w.message+`
|
|
|
46
46
|
* LICENSE.md file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @license MIT
|
|
49
|
-
*/var Ex="popstate";function QT(e={}){function t(r,o){let{pathname:a,search:l,hash:u}=r.location;return pp("",{pathname:a,search:l,hash:u},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:hl(o)}return KT(t,n,null,e)}function Et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Dr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function YT(){return Math.random().toString(36).substring(2,10)}function _x(e,t){return{usr:e.state,key:e.key,idx:t}}function pp(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ia(t):t,state:n,key:t&&t.key||r||YT()}}function hl({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ia(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function KT(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:a=!1}=r,l=o.history,u="POP",d=null,f=h();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function h(){return(l.state||{idx:null}).idx}function p(){u="POP";let S=h(),E=S==null?null:S-f;f=S,d&&d({action:u,location:k.location,delta:E})}function x(S,E){u="PUSH";let _=pp(k.location,S,E);f=h()+1;let P=_x(_,f),R=k.createHref(_);try{l.pushState(P,"",R)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;o.location.assign(R)}a&&d&&d({action:u,location:k.location,delta:1})}function g(S,E){u="REPLACE";let _=pp(k.location,S,E);f=h();let P=_x(_,f),R=k.createHref(_);l.replaceState(P,"",R),a&&d&&d({action:u,location:k.location,delta:0})}function C(S){return GT(S)}let k={get action(){return u},get location(){return e(o,l)},listen(S){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(Ex,p),d=S,()=>{o.removeEventListener(Ex,p),d=null}},createHref(S){return t(o,S)},createURL:C,encodeLocation(S){let E=C(S);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:g,go(S){return l.go(S)}};return k}function GT(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Et(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:hl(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function _b(e,t,n="/"){return XT(e,t,n,!1)}function XT(e,t,n,r){let o=typeof t=="string"?ia(t):t,a=Si(o.pathname||"/",n);if(a==null)return null;let l=Tb(e);JT(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let f=cP(a);u=lP(l[d],f,r)}return u}function Tb(e,t=[],n=[],r="",o=!1){let a=(l,u,d=o,f)=>{let h={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&d)return;Et(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let p=bi([r,h.relativePath]),x=n.concat(h);l.children&&l.children.length>0&&(Et(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Tb(l.children,t,x,p,d)),!(l.path==null&&!l.index)&&t.push({path:p,score:sP(p,l.index),routesMeta:x})};return e.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))a(l,u);else for(let f of Pb(l.path))a(l,u,!0,f)}),t}function Pb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let l=Pb(r.join("/")),u=[];return u.push(...l.map(d=>d===""?a:[a,d].join("/"))),o&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function JT(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:aP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var eP=/^:[\w-]+$/,tP=3,nP=2,rP=1,iP=10,oP=-2,Tx=e=>e==="*";function sP(e,t){let n=e.split("/"),r=n.length;return n.some(Tx)&&(r+=oP),t&&(r+=nP),n.filter(o=>!Tx(o)).reduce((o,a)=>o+(eP.test(a)?tP:a===""?rP:iP),r)}function aP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function lP(e,t,n=!1){let{routesMeta:r}=e,o={},a="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,h=a==="/"?t:t.slice(a.length)||"/",p=Pc({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},h),x=d.route;if(!p&&f&&n&&!r[r.length-1].route.index&&(p=Pc({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},h)),!p)return null;Object.assign(o,p.params),l.push({params:o,pathname:bi([a,p.pathname]),pathnameBase:pP(bi([a,p.pathnameBase])),route:x}),p.pathnameBase!=="/"&&(a=bi([a,p.pathnameBase]))}return l}function Pc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=uP(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],l=a.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((f,{paramName:h,isOptional:p},x)=>{if(h==="*"){let C=u[x]||"";l=a.slice(0,a.length-C.length).replace(/(.)\/+$/,"$1")}const g=u[x];return p&&!g?f[h]=void 0:f[h]=(g||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:l,pattern:e}}function uP(e,t=!1,n=!0){Dr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function cP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Dr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Si(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)||"/"}var Nb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dP=e=>Nb.test(e);function fP(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ia(e):e,a;if(n)if(dP(n))a=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Dr(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?a=Px(n.substring(1),"/"):a=Px(n,t)}else a=t;return{pathname:a,search:mP(r),hash:gP(o)}}function Px(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ih(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function hP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function jb(e){let t=hP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Rb(e,t,n,r=!1){let o;typeof e=="string"?o=ia(e):(o={...e},Et(!o.pathname||!o.pathname.includes("?"),Ih("?","pathname","search",o)),Et(!o.pathname||!o.pathname.includes("#"),Ih("#","pathname","hash",o)),Et(!o.search||!o.search.includes("#"),Ih("#","search","hash",o)));let a=e===""||o.pathname==="",l=a?"/":o.pathname,u;if(l==null)u=n;else{let p=t.length-1;if(!r&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),p-=1;o.pathname=x.join("/")}u=p>=0?t[p]:"/"}let d=fP(o,u),f=l&&l!=="/"&&l.endsWith("/"),h=(a||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||h)&&(d.pathname+="/"),d}var bi=e=>e.join("/").replace(/\/\/+/g,"/"),pP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,yP=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function vP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function xP(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ib=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ab(e,t){let n=e;if(typeof n!="string"||!Nb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(Ib)try{let a=new URL(window.location.href),l=n.startsWith("//")?new URL(a.protocol+n):new URL(n),u=Si(l.pathname,t);l.origin===a.origin&&u!=null?n=u+l.search+l.hash:o=!0}catch{Dr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ob=["POST","PUT","PATCH","DELETE"];new Set(Ob);var wP=["GET",...Ob];new Set(wP);var oa=b.createContext(null);oa.displayName="DataRouter";var rd=b.createContext(null);rd.displayName="DataRouterState";var bP=b.createContext(!1),Db=b.createContext({isTransitioning:!1});Db.displayName="ViewTransition";var kP=b.createContext(new Map);kP.displayName="Fetchers";var SP=b.createContext(null);SP.displayName="Await";var mr=b.createContext(null);mr.displayName="Navigation";var Nl=b.createContext(null);Nl.displayName="Location";var _i=b.createContext({outlet:null,matches:[],isDataRoute:!1});_i.displayName="Route";var pm=b.createContext(null);pm.displayName="RouteError";var zb="REACT_ROUTER_ERROR",CP="REDIRECT",EP="ROUTE_ERROR_RESPONSE";function _P(e){if(e.startsWith(`${zb}:${CP}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function TP(e){if(e.startsWith(`${zb}:${EP}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new yP(t.status,t.statusText,t.data)}catch{}}function PP(e,{relative:t}={}){Et(jl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=b.useContext(mr),{hash:o,pathname:a,search:l}=Rl(e,{relative:t}),u=a;return n!=="/"&&(u=a==="/"?n:bi([n,a])),r.createHref({pathname:u,search:l,hash:o})}function jl(){return b.useContext(Nl)!=null}function es(){return Et(jl(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Nl).location}var Mb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Lb(e){b.useContext(mr).static||b.useLayoutEffect(e)}function NP(){let{isDataRoute:e}=b.useContext(_i);return e?BP():jP()}function jP(){Et(jl(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(oa),{basename:t,navigator:n}=b.useContext(mr),{matches:r}=b.useContext(_i),{pathname:o}=es(),a=JSON.stringify(jb(r)),l=b.useRef(!1);return Lb(()=>{l.current=!0}),b.useCallback((d,f={})=>{if(Dr(l.current,Mb),!l.current)return;if(typeof d=="number"){n.go(d);return}let h=Rb(d,JSON.parse(a),o,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:bi([t,h.pathname])),(f.replace?n.replace:n.push)(h,f.state,f)},[t,n,a,o,e])}b.createContext(null);function Rl(e,{relative:t}={}){let{matches:n}=b.useContext(_i),{pathname:r}=es(),o=JSON.stringify(jb(n));return b.useMemo(()=>Rb(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function RP(e,t){return Fb(e,t)}function Fb(e,t,n,r,o){var _;Et(jl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=b.useContext(mr),{matches:l}=b.useContext(_i),u=l[l.length-1],d=u?u.params:{},f=u?u.pathname:"/",h=u?u.pathnameBase:"/",p=u&&u.route;{let P=p&&p.path||"";Vb(f,!p||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${P}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
49
|
+
*/var Cx="popstate";function qT(e={}){function t(r,o){let{pathname:a,search:l,hash:u}=r.location;return pp("",{pathname:a,search:l,hash:u},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:hl(o)}return YT(t,n,null,e)}function Et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Dr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function QT(){return Math.random().toString(36).substring(2,10)}function Ex(e,t){return{usr:e.state,key:e.key,idx:t}}function pp(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ia(t):t,state:n,key:t&&t.key||r||QT()}}function hl({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ia(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function YT(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:a=!1}=r,l=o.history,u="POP",d=null,f=h();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function h(){return(l.state||{idx:null}).idx}function p(){u="POP";let S=h(),E=S==null?null:S-f;f=S,d&&d({action:u,location:k.location,delta:E})}function x(S,E){u="PUSH";let _=pp(k.location,S,E);f=h()+1;let P=Ex(_,f),R=k.createHref(_);try{l.pushState(P,"",R)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;o.location.assign(R)}a&&d&&d({action:u,location:k.location,delta:1})}function g(S,E){u="REPLACE";let _=pp(k.location,S,E);f=h();let P=Ex(_,f),R=k.createHref(_);l.replaceState(P,"",R),a&&d&&d({action:u,location:k.location,delta:0})}function C(S){return KT(S)}let k={get action(){return u},get location(){return e(o,l)},listen(S){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(Cx,p),d=S,()=>{o.removeEventListener(Cx,p),d=null}},createHref(S){return t(o,S)},createURL:C,encodeLocation(S){let E=C(S);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:g,go(S){return l.go(S)}};return k}function KT(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Et(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:hl(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Eb(e,t,n="/"){return GT(e,t,n,!1)}function GT(e,t,n,r){let o=typeof t=="string"?ia(t):t,a=Si(o.pathname||"/",n);if(a==null)return null;let l=_b(e);XT(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let f=uP(a);u=aP(l[d],f,r)}return u}function _b(e,t=[],n=[],r="",o=!1){let a=(l,u,d=o,f)=>{let h={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&d)return;Et(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let p=bi([r,h.relativePath]),x=n.concat(h);l.children&&l.children.length>0&&(Et(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),_b(l.children,t,x,p,d)),!(l.path==null&&!l.index)&&t.push({path:p,score:oP(p,l.index),routesMeta:x})};return e.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))a(l,u);else for(let f of Tb(l.path))a(l,u,!0,f)}),t}function Tb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let l=Tb(r.join("/")),u=[];return u.push(...l.map(d=>d===""?a:[a,d].join("/"))),o&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function XT(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var JT=/^:[\w-]+$/,eP=3,tP=2,nP=1,rP=10,iP=-2,_x=e=>e==="*";function oP(e,t){let n=e.split("/"),r=n.length;return n.some(_x)&&(r+=iP),t&&(r+=tP),n.filter(o=>!_x(o)).reduce((o,a)=>o+(JT.test(a)?eP:a===""?nP:rP),r)}function sP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function aP(e,t,n=!1){let{routesMeta:r}=e,o={},a="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,h=a==="/"?t:t.slice(a.length)||"/",p=Pc({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},h),x=d.route;if(!p&&f&&n&&!r[r.length-1].route.index&&(p=Pc({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},h)),!p)return null;Object.assign(o,p.params),l.push({params:o,pathname:bi([a,p.pathname]),pathnameBase:hP(bi([a,p.pathnameBase])),route:x}),p.pathnameBase!=="/"&&(a=bi([a,p.pathnameBase]))}return l}function Pc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=lP(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],l=a.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((f,{paramName:h,isOptional:p},x)=>{if(h==="*"){let C=u[x]||"";l=a.slice(0,a.length-C.length).replace(/(.)\/+$/,"$1")}const g=u[x];return p&&!g?f[h]=void 0:f[h]=(g||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:l,pattern:e}}function lP(e,t=!1,n=!0){Dr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function uP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Dr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Si(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)||"/"}var Pb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cP=e=>Pb.test(e);function dP(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ia(e):e,a;if(n)if(cP(n))a=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Dr(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?a=Tx(n.substring(1),"/"):a=Tx(n,t)}else a=t;return{pathname:a,search:pP(r),hash:mP(o)}}function Tx(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ih(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function fP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Nb(e){let t=fP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function jb(e,t,n,r=!1){let o;typeof e=="string"?o=ia(e):(o={...e},Et(!o.pathname||!o.pathname.includes("?"),Ih("?","pathname","search",o)),Et(!o.pathname||!o.pathname.includes("#"),Ih("#","pathname","hash",o)),Et(!o.search||!o.search.includes("#"),Ih("#","search","hash",o)));let a=e===""||o.pathname==="",l=a?"/":o.pathname,u;if(l==null)u=n;else{let p=t.length-1;if(!r&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),p-=1;o.pathname=x.join("/")}u=p>=0?t[p]:"/"}let d=dP(o,u),f=l&&l!=="/"&&l.endsWith("/"),h=(a||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||h)&&(d.pathname+="/"),d}var bi=e=>e.join("/").replace(/\/\/+/g,"/"),hP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,gP=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function yP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function vP(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Rb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ib(e,t){let n=e;if(typeof n!="string"||!Pb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(Rb)try{let a=new URL(window.location.href),l=n.startsWith("//")?new URL(a.protocol+n):new URL(n),u=Si(l.pathname,t);l.origin===a.origin&&u!=null?n=u+l.search+l.hash:o=!0}catch{Dr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ab=["POST","PUT","PATCH","DELETE"];new Set(Ab);var xP=["GET",...Ab];new Set(xP);var oa=b.createContext(null);oa.displayName="DataRouter";var rd=b.createContext(null);rd.displayName="DataRouterState";var wP=b.createContext(!1),Ob=b.createContext({isTransitioning:!1});Ob.displayName="ViewTransition";var bP=b.createContext(new Map);bP.displayName="Fetchers";var kP=b.createContext(null);kP.displayName="Await";var mr=b.createContext(null);mr.displayName="Navigation";var Nl=b.createContext(null);Nl.displayName="Location";var _i=b.createContext({outlet:null,matches:[],isDataRoute:!1});_i.displayName="Route";var pm=b.createContext(null);pm.displayName="RouteError";var Db="REACT_ROUTER_ERROR",SP="REDIRECT",CP="ROUTE_ERROR_RESPONSE";function EP(e){if(e.startsWith(`${Db}:${SP}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function _P(e){if(e.startsWith(`${Db}:${CP}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new gP(t.status,t.statusText,t.data)}catch{}}function TP(e,{relative:t}={}){Et(jl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=b.useContext(mr),{hash:o,pathname:a,search:l}=Rl(e,{relative:t}),u=a;return n!=="/"&&(u=a==="/"?n:bi([n,a])),r.createHref({pathname:u,search:l,hash:o})}function jl(){return b.useContext(Nl)!=null}function es(){return Et(jl(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Nl).location}var zb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Mb(e){b.useContext(mr).static||b.useLayoutEffect(e)}function PP(){let{isDataRoute:e}=b.useContext(_i);return e?VP():NP()}function NP(){Et(jl(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(oa),{basename:t,navigator:n}=b.useContext(mr),{matches:r}=b.useContext(_i),{pathname:o}=es(),a=JSON.stringify(Nb(r)),l=b.useRef(!1);return Mb(()=>{l.current=!0}),b.useCallback((d,f={})=>{if(Dr(l.current,zb),!l.current)return;if(typeof d=="number"){n.go(d);return}let h=jb(d,JSON.parse(a),o,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:bi([t,h.pathname])),(f.replace?n.replace:n.push)(h,f.state,f)},[t,n,a,o,e])}b.createContext(null);function Rl(e,{relative:t}={}){let{matches:n}=b.useContext(_i),{pathname:r}=es(),o=JSON.stringify(Nb(n));return b.useMemo(()=>jb(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function jP(e,t){return Lb(e,t)}function Lb(e,t,n,r,o){var _;Et(jl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=b.useContext(mr),{matches:l}=b.useContext(_i),u=l[l.length-1],d=u?u.params:{},f=u?u.pathname:"/",h=u?u.pathnameBase:"/",p=u&&u.route;{let P=p&&p.path||"";$b(f,!p||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${P}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
50
|
|
|
51
|
-
Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let x=es(),g;if(t){let P=typeof t=="string"?ia(t):t;Et(h==="/"||((_=P.pathname)==null?void 0:_.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${P.pathname}" was given in the \`location\` prop.`),g=P}else g=x;let C=g.pathname||"/",k=C;if(h!=="/"){let P=h.replace(/^\//,"").split("/");k="/"+C.replace(/^\//,"").split("/").slice(P.length).join("/")}let S=_b(e,{pathname:k});Dr(p||S!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Dr(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=zP(S&&S.map(P=>Object.assign({},P,{params:Object.assign({},d,P.params),pathname:bi([h,a.encodeLocation?a.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?h:bi([h,a.encodeLocation?a.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),l,n,r,o);return t&&E?b.createElement(Nl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},E):E}function IP(){let e=VP(),t=vP(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:a},"ErrorBoundary")," or"," ",b.createElement("code",{style:a},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:o},n):null,l)}var AP=b.createElement(IP,null),$b=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=TP(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(_i.Provider,{value:this.props.routeContext},b.createElement(pm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(OP,{error:e},t):t}};$b.contextType=bP;var Ah=new WeakMap;function OP({children:e,error:t}){let{basename:n}=b.useContext(mr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=_P(t.digest);if(r){let o=Ah.get(t);if(o)throw o;let a=Ab(r.location,n);if(Ib&&!Ah.get(t))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw Ah.set(t,l),l}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function DP({routeContext:e,match:t,children:n}){let r=b.useContext(oa);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(_i.Provider,{value:e},n)}function zP(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=n==null?void 0:n.errors;if(l!=null){let h=a.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);Et(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let u=!1,d=-1;if(n)for(let h=0;h<a.length;h++){let p=a[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=h),p.route.id){let{loaderData:x,errors:g}=n,C=p.route.loader&&!x.hasOwnProperty(p.route.id)&&(!g||g[p.route.id]===void 0);if(p.route.lazy||C){u=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}let f=n&&r?(h,p)=>{var x,g;r(h,{location:n.location,params:((g=(x=n.matches)==null?void 0:x[0])==null?void 0:g.params)??{},unstable_pattern:xP(n.matches),errorInfo:p})}:void 0;return a.reduceRight((h,p,x)=>{let g,C=!1,k=null,S=null;n&&(g=l&&p.route.id?l[p.route.id]:void 0,k=p.route.errorElement||AP,u&&(d<0&&x===0?(Vb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,S=null):d===x&&(C=!0,S=p.route.hydrateFallbackElement||null)));let E=t.concat(a.slice(0,x+1)),_=()=>{let P;return g?P=k:C?P=S:p.route.Component?P=b.createElement(p.route.Component,null):p.route.element?P=p.route.element:P=h,b.createElement(DP,{match:p,routeContext:{outlet:h,matches:E,isDataRoute:n!=null},children:P})};return n&&(p.route.ErrorBoundary||p.route.errorElement||x===0)?b.createElement($b,{location:n.location,revalidation:n.revalidation,component:k,error:g,children:_(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):_()},null)}function mm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function MP(e){let t=b.useContext(oa);return Et(t,mm(e)),t}function LP(e){let t=b.useContext(rd);return Et(t,mm(e)),t}function FP(e){let t=b.useContext(_i);return Et(t,mm(e)),t}function gm(e){let t=FP(e),n=t.matches[t.matches.length-1];return Et(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function $P(){return gm("useRouteId")}function VP(){var r;let e=b.useContext(pm),t=LP("useRouteError"),n=gm("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function BP(){let{router:e}=MP("useNavigate"),t=gm("useNavigate"),n=b.useRef(!1);return Lb(()=>{n.current=!0}),b.useCallback(async(o,a={})=>{Dr(n.current,Mb),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...a}))},[e,t])}var Nx={};function Vb(e,t,n){!t&&!Nx[e]&&(Nx[e]=!0,Dr(!1,n))}b.memo(UP);function UP({routes:e,future:t,state:n,onError:r}){return Fb(e,void 0,n,r,t)}function vc(e){Et(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function HP({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:l}){Et(!jl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=b.useMemo(()=>({basename:u,navigator:o,static:a,unstable_useTransitions:l,future:{}}),[u,o,a,l]);typeof n=="string"&&(n=ia(n));let{pathname:f="/",search:h="",hash:p="",state:x=null,key:g="default"}=n,C=b.useMemo(()=>{let k=Si(f,u);return k==null?null:{location:{pathname:k,search:h,hash:p,state:x,key:g},navigationType:r}},[u,f,h,p,x,g,r]);return Dr(C!=null,`<Router basename="${u}"> is not able to match the URL "${f}${h}${p}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:b.createElement(mr.Provider,{value:d},b.createElement(Nl.Provider,{children:t,value:C}))}function WP({children:e,location:t}){return RP(mp(e),t)}function mp(e,t=[]){let n=[];return b.Children.forEach(e,(r,o)=>{if(!b.isValidElement(r))return;let a=[...t,o];if(r.type===b.Fragment){n.push.apply(n,mp(r.props.children,a));return}Et(r.type===vc,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Et(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=mp(r.props.children,a)),n.push(l)}),n}var xc="get",wc="application/x-www-form-urlencoded";function id(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ZP(e){return id(e)&&e.tagName.toLowerCase()==="button"}function qP(e){return id(e)&&e.tagName.toLowerCase()==="form"}function QP(e){return id(e)&&e.tagName.toLowerCase()==="input"}function YP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function KP(e,t){return e.button===0&&(!t||t==="_self")&&!YP(e)}var ec=null;function GP(){if(ec===null)try{new FormData(document.createElement("form"),0),ec=!1}catch{ec=!0}return ec}var XP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Oh(e){return e!=null&&!XP.has(e)?(Dr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wc}"`),null):e}function JP(e,t){let n,r,o,a,l;if(qP(e)){let u=e.getAttribute("action");r=u?Si(u,t):null,n=e.getAttribute("method")||xc,o=Oh(e.getAttribute("enctype"))||wc,a=new FormData(e)}else if(ZP(e)||QP(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?Si(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||xc,o=Oh(e.getAttribute("formenctype"))||Oh(u.getAttribute("enctype"))||wc,a=new FormData(u,e),!GP()){let{name:f,type:h,value:p}=e;if(h==="image"){let x=f?`${f}.`:"";a.append(`${x}x`,"0"),a.append(`${x}y`,"0")}else f&&a.append(f,p)}}else{if(id(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=xc,r=null,o=wc,l=e}return a&&o==="text/plain"&&(l=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ym(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function eN(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&Si(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function tN(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function nN(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function rN(e,t,n){let r=await Promise.all(e.map(async o=>{let a=t.routes[o.route.id];if(a){let l=await tN(a,n);return l.links?l.links():[]}return[]}));return aN(r.flat(1).filter(nN).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function jx(e,t,n,r,o,a){let l=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>{var h;return n[f].pathname!==d.pathname||((h=n[f].route.path)==null?void 0:h.endsWith("*"))&&n[f].params["*"]!==d.params["*"]};return a==="assets"?t.filter((d,f)=>l(d,f)||u(d,f)):a==="data"?t.filter((d,f)=>{var p;let h=r.routes[d.route.id];if(!h||!h.hasLoader)return!1;if(l(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let x=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function iN(e,t,{includeHydrateFallback:n}={}){return oN(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function oN(e){return[...new Set(e)]}function sN(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function aN(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let a=JSON.stringify(sN(o));return n.has(a)||(n.add(a),r.push({key:a,link:o})),r},[])}function Bb(){let e=b.useContext(oa);return ym(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function lN(){let e=b.useContext(rd);return ym(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var vm=b.createContext(void 0);vm.displayName="FrameworkContext";function Ub(){let e=b.useContext(vm);return ym(e,"You must render this element inside a <HydratedRouter> element"),e}function uN(e,t){let n=b.useContext(vm),[r,o]=b.useState(!1),[a,l]=b.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:h,onTouchStart:p}=t,x=b.useRef(null);b.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let k=E=>{E.forEach(_=>{l(_.isIntersecting)})},S=new IntersectionObserver(k,{threshold:.5});return x.current&&S.observe(x.current),()=>{S.disconnect()}}},[e]),b.useEffect(()=>{if(r){let k=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(k)}}},[r]);let g=()=>{o(!0)},C=()=>{o(!1),l(!1)};return n?e!=="intent"?[a,x,{}]:[a,x,{onFocus:Xa(u,g),onBlur:Xa(d,C),onMouseEnter:Xa(f,g),onMouseLeave:Xa(h,C),onTouchStart:Xa(p,g)}]:[!1,x,{}]}function Xa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function cN({page:e,...t}){let{router:n}=Bb(),r=b.useMemo(()=>_b(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?b.createElement(fN,{page:e,matches:r,...t}):null}function dN(e){let{manifest:t,routeModules:n}=Ub(),[r,o]=b.useState([]);return b.useEffect(()=>{let a=!1;return rN(e,t,n).then(l=>{a||o(l)}),()=>{a=!0}},[e,t,n]),r}function fN({page:e,matches:t,...n}){let r=es(),{future:o,manifest:a,routeModules:l}=Ub(),{basename:u}=Bb(),{loaderData:d,matches:f}=lN(),h=b.useMemo(()=>jx(e,t,f,a,r,"data"),[e,t,f,a,r]),p=b.useMemo(()=>jx(e,t,f,a,r,"assets"),[e,t,f,a,r]),x=b.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let k=new Set,S=!1;if(t.forEach(_=>{var R;let P=a.routes[_.route.id];!P||!P.hasLoader||(!h.some(A=>A.route.id===_.route.id)&&_.route.id in d&&((R=l[_.route.id])!=null&&R.shouldRevalidate)||P.hasClientLoader?S=!0:k.add(_.route.id))}),k.size===0)return[];let E=eN(e,u,o.unstable_trailingSlashAwareDataRequests,"data");return S&&k.size>0&&E.searchParams.set("_routes",t.filter(_=>k.has(_.route.id)).map(_=>_.route.id).join(",")),[E.pathname+E.search]},[u,o.unstable_trailingSlashAwareDataRequests,d,r,a,h,t,e,l]),g=b.useMemo(()=>iN(p,a),[p,a]),C=dN(p);return b.createElement(b.Fragment,null,x.map(k=>b.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),g.map(k=>b.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),C.map(({key:k,link:S})=>b.createElement("link",{key:k,nonce:n.nonce,...S})))}function hN(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var pN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pN&&(window.__reactRouterVersion="7.12.0")}catch{}function mN({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=b.useRef();o.current==null&&(o.current=QT({window:r,v5Compat:!0}));let a=o.current,[l,u]=b.useState({action:a.action,location:a.location}),d=b.useCallback(f=>{n===!1?u(f):b.startTransition(()=>u(f))},[n]);return b.useLayoutEffect(()=>a.listen(d),[a,d]),b.createElement(HP,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:a,unstable_useTransitions:n})}var Hb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Wb=b.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:a,replace:l,state:u,target:d,to:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x,...g},C){let{basename:k,unstable_useTransitions:S}=b.useContext(mr),E=typeof f=="string"&&Hb.test(f),_=Ab(f,k);f=_.to;let P=PP(f,{relative:o}),[R,A,j]=uN(r,g),F=vN(f,{replace:l,state:u,target:d,preventScrollReset:h,relative:o,viewTransition:p,unstable_defaultShouldRevalidate:x,unstable_useTransitions:S});function Z(O){t&&t(O),O.defaultPrevented||F(O)}let re=b.createElement("a",{...g,...j,href:_.absoluteURL||P,onClick:_.isExternal||a?t:Z,ref:hN(C,A),target:d,"data-discover":!E&&n==="render"?"true":void 0});return R&&!E?b.createElement(b.Fragment,null,re,b.createElement(cN,{page:P})):re});Wb.displayName="Link";var Zb=b.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:a,to:l,viewTransition:u,children:d,...f},h){let p=Rl(l,{relative:f.relative}),x=es(),g=b.useContext(rd),{navigator:C,basename:k}=b.useContext(mr),S=g!=null&&SN(p)&&u===!0,E=C.encodeLocation?C.encodeLocation(p).pathname:p.pathname,_=x.pathname,P=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;n||(_=_.toLowerCase(),P=P?P.toLowerCase():null,E=E.toLowerCase()),P&&k&&(P=Si(P,k)||P);const R=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let A=_===E||!o&&_.startsWith(E)&&_.charAt(R)==="/",j=P!=null&&(P===E||!o&&P.startsWith(E)&&P.charAt(E.length)==="/"),F={isActive:A,isPending:j,isTransitioning:S},Z=A?t:void 0,re;typeof r=="function"?re=r(F):re=[r,A?"active":null,j?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let O=typeof a=="function"?a(F):a;return b.createElement(Wb,{...f,"aria-current":Z,className:re,ref:h,style:O,to:l,viewTransition:u},typeof d=="function"?d(F):d)});Zb.displayName="NavLink";var gN=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:l=xc,action:u,onSubmit:d,relative:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x,...g},C)=>{let{unstable_useTransitions:k}=b.useContext(mr),S=bN(),E=kN(u,{relative:f}),_=l.toLowerCase()==="get"?"get":"post",P=typeof u=="string"&&Hb.test(u),R=A=>{if(d&&d(A),A.defaultPrevented)return;A.preventDefault();let j=A.nativeEvent.submitter,F=(j==null?void 0:j.getAttribute("formmethod"))||l,Z=()=>S(j||A.currentTarget,{fetcherKey:t,method:F,navigate:n,replace:o,state:a,relative:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x});k&&n!==!1?b.startTransition(()=>Z()):Z()};return b.createElement("form",{ref:C,method:_,action:E,onSubmit:r?d:R,...g,"data-discover":!P&&e==="render"?"true":void 0})});gN.displayName="Form";function yN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qb(e){let t=b.useContext(oa);return Et(t,yN(e)),t}function vN(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:d}={}){let f=NP(),h=es(),p=Rl(e,{relative:a});return b.useCallback(x=>{if(KP(x,t)){x.preventDefault();let g=n!==void 0?n:hl(h)===hl(p),C=()=>f(e,{replace:g,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:u});d?b.startTransition(()=>C()):C()}},[h,f,p,n,r,t,e,o,a,l,u,d])}var xN=0,wN=()=>`__${String(++xN)}__`;function bN(){let{router:e}=qb("useSubmit"),{basename:t}=b.useContext(mr),n=$P(),r=e.fetch,o=e.navigate;return b.useCallback(async(a,l={})=>{let{action:u,method:d,encType:f,formData:h,body:p}=JP(a,t);if(l.navigate===!1){let x=l.fetcherKey||wN();await r(x,n,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:h,body:p,formMethod:l.method||d,formEncType:l.encType||f,flushSync:l.flushSync})}else await o(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:h,body:p,formMethod:l.method||d,formEncType:l.encType||f,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function kN(e,{relative:t}={}){let{basename:n}=b.useContext(mr),r=b.useContext(_i);Et(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Rl(e||".",{relative:t})},l=es();if(e==null){a.search=l.search;let u=new URLSearchParams(a.search),d=u.getAll("index");if(d.some(h=>h==="")){u.delete("index"),d.filter(p=>p).forEach(p=>u.append("index",p));let h=u.toString();a.search=h?`?${h}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:bi([n,a.pathname])),hl(a)}function SN(e,{relative:t}={}){let n=b.useContext(Db);Et(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=qb("useViewTransitionState"),o=Rl(e,{relative:t});if(!n.isTransitioning)return!1;let a=Si(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Si(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Pc(o.pathname,l)!=null||Pc(o.pathname,a)!=null}var Il=Eb();const Qb=Jo(Il);var sa=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(){}},CN={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Xi,dm,pb,EN=(pb=class{constructor(){De(this,Xi,CN);De(this,dm,!1)}setTimeoutProvider(e){Ee(this,Xi,e)}setTimeout(e,t){return V(this,Xi).setTimeout(e,t)}clearTimeout(e){V(this,Xi).clearTimeout(e)}setInterval(e,t){return V(this,Xi).setInterval(e,t)}clearInterval(e){V(this,Xi).clearInterval(e)}},Xi=new WeakMap,dm=new WeakMap,pb),Io=new EN;function _N(e){setTimeout(e,0)}var Ho=typeof window>"u"||"Deno"in globalThis;function kn(){}function TN(e,t){return typeof e=="function"?e(t):e}function gp(e){return typeof e=="number"&&e>=0&&e!==1/0}function Yb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ao(e,t){return typeof e=="function"?e(t):e}function ur(e,t){return typeof e=="function"?e(t):e}function Rx(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:a,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==xm(l,t.options))return!1}else if(!pl(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||o&&o!==t.state.fetchStatus||a&&!a(t))}function Ix(e,t){const{exact:n,status:r,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Wo(t.options.mutationKey)!==Wo(a))return!1}else if(!pl(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function xm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Wo)(e)}function Wo(e){return JSON.stringify(e,(t,n)=>yp(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function pl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>pl(e[n],t[n])):!1}var PN=Object.prototype.hasOwnProperty;function Kb(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Ax(e)&&Ax(t);if(!r&&!(yp(e)&&yp(t)))return t;const a=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,d=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const p=r?h:l[h],x=e[p],g=t[p];if(x===g){d[p]=x,(r?h<a:PN.call(e,p))&&f++;continue}if(x===null||g===null||typeof x!="object"||typeof g!="object"){d[p]=g;continue}const C=Kb(x,g,n+1);d[p]=C,C===x&&f++}return a===u&&f===a?e:d}function Nc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ax(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yp(e){if(!Ox(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ox(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ox(e){return Object.prototype.toString.call(e)==="[object Object]"}function NN(e){return new Promise(t=>{Io.setTimeout(t,e)})}function vp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Kb(e,t):t}function jN(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function RN(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var wm=Symbol();function Gb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===wm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bm(e,t){return typeof e=="function"?e(...t):!!e}function IN(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Oo,Ji,$s,mb,AN=(mb=class extends sa{constructor(){super();De(this,Oo);De(this,Ji);De(this,$s);Ee(this,$s,t=>{if(!Ho&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){V(this,Ji)||this.setEventListener(V(this,$s))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,Ji))==null||t.call(this),Ee(this,Ji,void 0))}setEventListener(t){var n;Ee(this,$s,t),(n=V(this,Ji))==null||n.call(this),Ee(this,Ji,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){V(this,Oo)!==t&&(Ee(this,Oo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof V(this,Oo)=="boolean"?V(this,Oo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Oo=new WeakMap,Ji=new WeakMap,$s=new WeakMap,mb),km=new AN;function xp(){let e,t;const n=new Promise((o,a)=>{e=o,t=a});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var ON=_N;function DN(){let e=[],t=0,n=u=>{u()},r=u=>{u()},o=ON;const a=u=>{t?e.push(u):o(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&o(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{a(()=>{u(...d)})},schedule:a,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{o=u}}}var Ht=DN(),Vs,eo,Bs,gb,zN=(gb=class extends sa{constructor(){super();De(this,Vs,!0);De(this,eo);De(this,Bs);Ee(this,Bs,t=>{if(!Ho&&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(){V(this,eo)||this.setEventListener(V(this,Bs))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,eo))==null||t.call(this),Ee(this,eo,void 0))}setEventListener(t){var n;Ee(this,Bs,t),(n=V(this,eo))==null||n.call(this),Ee(this,eo,t(this.setOnline.bind(this)))}setOnline(t){V(this,Vs)!==t&&(Ee(this,Vs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return V(this,Vs)}},Vs=new WeakMap,eo=new WeakMap,Bs=new WeakMap,gb),jc=new zN;function MN(e){return Math.min(1e3*2**e,3e4)}function Xb(e){return(e??"online")==="online"?jc.isOnline():!0}var wp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Jb(e){let t=!1,n=0,r;const o=xp(),a=()=>o.status!=="pending",l=k=>{var S;if(!a()){const E=new wp(k);x(E),(S=e.onCancel)==null||S.call(e,E)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>km.isFocused()&&(e.networkMode==="always"||jc.isOnline())&&e.canRun(),h=()=>Xb(e.networkMode)&&e.canRun(),p=k=>{a()||(r==null||r(),o.resolve(k))},x=k=>{a()||(r==null||r(),o.reject(k))},g=()=>new Promise(k=>{var S;r=E=>{(a()||f())&&k(E)},(S=e.onPause)==null||S.call(e)}).then(()=>{var k;r=void 0,a()||(k=e.onContinue)==null||k.call(e)}),C=()=>{if(a())return;let k;const S=n===0?e.initialPromise:void 0;try{k=S??e.fn()}catch(E){k=Promise.reject(E)}Promise.resolve(k).then(p).catch(E=>{var j;if(a())return;const _=e.retry??(Ho?0:3),P=e.retryDelay??MN,R=typeof P=="function"?P(n,E):P,A=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,E);if(t||!A){x(E);return}n++,(j=e.onFail)==null||j.call(e,n,E),NN(R).then(()=>f()?void 0:g()).then(()=>{t?x(E):C()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r==null||r(),o),cancelRetry:u,continueRetry:d,canStart:h,start:()=>(h()?C():g().then(C),o)}}var Do,yb,ek=(yb=class{constructor(){De(this,Do)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gp(this.gcTime)&&Ee(this,Do,Io.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ho?1/0:300*1e3))}clearGcTimeout(){V(this,Do)&&(Io.clearTimeout(V(this,Do)),Ee(this,Do,void 0))}},Do=new WeakMap,yb),zo,Us,lr,Mo,Kt,Cl,Lo,Nr,gi,vb,LN=(vb=class extends ek{constructor(t){super();De(this,Nr);De(this,zo);De(this,Us);De(this,lr);De(this,Mo);De(this,Kt);De(this,Cl);De(this,Lo);Ee(this,Lo,!1),Ee(this,Cl,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ee(this,Mo,t.client),Ee(this,lr,V(this,Mo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ee(this,zo,zx(this.options)),this.state=t.state??V(this,zo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=V(this,Kt))==null?void 0:t.promise}setOptions(t){if(this.options={...V(this,Cl),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=zx(this.options);n.data!==void 0&&(this.setState(Dx(n.data,n.dataUpdatedAt)),Ee(this,zo,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&V(this,lr).remove(this)}setData(t,n){const r=vp(this.state.data,t,this.options);return Ze(this,Nr,gi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ze(this,Nr,gi).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=V(this,Kt))==null?void 0:r.promise;return(o=V(this,Kt))==null||o.cancel(t),n?n.then(kn).catch(kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(V(this,zo))}isActive(){return this.observers.some(t=>ur(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ao(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:!Yb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=V(this,Kt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=V(this,Kt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),V(this,lr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(V(this,Kt)&&(V(this,Lo)?V(this,Kt).cancel({revert:!0}):V(this,Kt).cancelRetry()),this.scheduleGc()),V(this,lr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ze(this,Nr,gi).call(this,{type:"invalidate"})}async fetch(t,n){var d,f,h,p,x,g,C,k,S,E,_,P;if(this.state.fetchStatus!=="idle"&&((d=V(this,Kt))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(V(this,Kt))return V(this,Kt).continueRetry(),V(this,Kt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(A=>A.options.queryFn);R&&this.setOptions(R.options)}const r=new AbortController,o=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(Ee(this,Lo,!0),r.signal)})},a=()=>{const R=Gb(this.options,n),j=(()=>{const F={client:V(this,Mo),queryKey:this.queryKey,meta:this.meta};return o(F),F})();return Ee(this,Lo,!1),this.options.persister?this.options.persister(R,j,this):R(j)},u=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:V(this,Mo),state:this.state,fetchFn:a};return o(R),R})();(f=this.options.behavior)==null||f.onFetch(u,this),Ee(this,Us,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&Ze(this,Nr,gi).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),Ee(this,Kt,Jb({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:R=>{R instanceof wp&&R.revert&&this.setState({...V(this,Us),fetchStatus:"idle"}),r.abort()},onFail:(R,A)=>{Ze(this,Nr,gi).call(this,{type:"failed",failureCount:R,error:A})},onPause:()=>{Ze(this,Nr,gi).call(this,{type:"pause"})},onContinue:()=>{Ze(this,Nr,gi).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const R=await V(this,Kt).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(g=(x=V(this,lr).config).onSuccess)==null||g.call(x,R,this),(k=(C=V(this,lr).config).onSettled)==null||k.call(C,R,this.state.error,this),R}catch(R){if(R instanceof wp){if(R.silent)return V(this,Kt).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw Ze(this,Nr,gi).call(this,{type:"error",error:R}),(E=(S=V(this,lr).config).onError)==null||E.call(S,R,this),(P=(_=V(this,lr).config).onSettled)==null||P.call(_,this.state.data,R,this),R}finally{this.scheduleGc()}}},zo=new WeakMap,Us=new WeakMap,lr=new WeakMap,Mo=new WeakMap,Kt=new WeakMap,Cl=new WeakMap,Lo=new WeakMap,Nr=new WeakSet,gi=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,...tk(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...Dx(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ee(this,Us,t.manual?o:void 0),o;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),V(this,lr).notify({query:this,type:"updated",action:t})})},vb);function tk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Dx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zx(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 Ln,Ge,El,xn,Fo,Hs,yi,to,_l,Ws,Zs,$o,Vo,no,qs,st,ol,bp,kp,Sp,Cp,Ep,_p,Tp,nk,xb,FN=(xb=class extends sa{constructor(t,n){super();De(this,st);De(this,Ln);De(this,Ge);De(this,El);De(this,xn);De(this,Fo);De(this,Hs);De(this,yi);De(this,to);De(this,_l);De(this,Ws);De(this,Zs);De(this,$o);De(this,Vo);De(this,no);De(this,qs,new Set);this.options=n,Ee(this,Ln,t),Ee(this,to,null),Ee(this,yi,xp()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(V(this,Ge).addObserver(this),Mx(V(this,Ge),this.options)?Ze(this,st,ol).call(this):this.updateResult(),Ze(this,st,Cp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pp(V(this,Ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pp(V(this,Ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ze(this,st,Ep).call(this),Ze(this,st,_p).call(this),V(this,Ge).removeObserver(this)}setOptions(t){const n=this.options,r=V(this,Ge);if(this.options=V(this,Ln).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ur(this.options.enabled,V(this,Ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ze(this,st,Tp).call(this),V(this,Ge).setOptions(this.options),n._defaulted&&!Nc(this.options,n)&&V(this,Ln).getQueryCache().notify({type:"observerOptionsUpdated",query:V(this,Ge),observer:this});const o=this.hasListeners();o&&Lx(V(this,Ge),r,this.options,n)&&Ze(this,st,ol).call(this),this.updateResult(),o&&(V(this,Ge)!==r||ur(this.options.enabled,V(this,Ge))!==ur(n.enabled,V(this,Ge))||ao(this.options.staleTime,V(this,Ge))!==ao(n.staleTime,V(this,Ge)))&&Ze(this,st,bp).call(this);const a=Ze(this,st,kp).call(this);o&&(V(this,Ge)!==r||ur(this.options.enabled,V(this,Ge))!==ur(n.enabled,V(this,Ge))||a!==V(this,no))&&Ze(this,st,Sp).call(this,a)}getOptimisticResult(t){const n=V(this,Ln).getQueryCache().build(V(this,Ln),t),r=this.createResult(n,t);return VN(this,r)&&(Ee(this,xn,r),Ee(this,Hs,this.options),Ee(this,Fo,V(this,Ge).state)),r}getCurrentResult(){return V(this,xn)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&V(this,yi).status==="pending"&&V(this,yi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){V(this,qs).add(t)}getCurrentQuery(){return V(this,Ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=V(this,Ln).defaultQueryOptions(t),r=V(this,Ln).getQueryCache().build(V(this,Ln),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ze(this,st,ol).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),V(this,xn)))}createResult(t,n){var re;const r=V(this,Ge),o=this.options,a=V(this,xn),l=V(this,Fo),u=V(this,Hs),f=t!==r?t.state:V(this,El),{state:h}=t;let p={...h},x=!1,g;if(n._optimisticResults){const O=this.hasListeners(),Y=!O&&Mx(t,n),M=O&&Lx(t,r,n,o);(Y||M)&&(p={...p,...tk(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:S}=p;g=p.data;let E=!1;if(n.placeholderData!==void 0&&g===void 0&&S==="pending"){let O;a!=null&&a.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(O=a.data,E=!0):O=typeof n.placeholderData=="function"?n.placeholderData((re=V(this,Zs))==null?void 0:re.state.data,V(this,Zs)):n.placeholderData,O!==void 0&&(S="success",g=vp(a==null?void 0:a.data,O,n),x=!0)}if(n.select&&g!==void 0&&!E)if(a&&g===(l==null?void 0:l.data)&&n.select===V(this,_l))g=V(this,Ws);else try{Ee(this,_l,n.select),g=n.select(g),g=vp(a==null?void 0:a.data,g,n),Ee(this,Ws,g),Ee(this,to,null)}catch(O){Ee(this,to,O)}V(this,to)&&(C=V(this,to),g=V(this,Ws),k=Date.now(),S="error");const _=p.fetchStatus==="fetching",P=S==="pending",R=S==="error",A=P&&_,j=g!==void 0,Z={status:S,fetchStatus:p.fetchStatus,isPending:P,isSuccess:S==="success",isError:R,isInitialLoading:A,isLoading:A,data:g,dataUpdatedAt:p.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:_,isRefetching:_&&!P,isLoadingError:R&&!j,isPaused:p.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:R&&j,isStale:Sm(t,n),refetch:this.refetch,promise:V(this,yi),isEnabled:ur(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const O=Z.data!==void 0,Y=Z.status==="error"&&!O,M=U=>{Y?U.reject(Z.error):O&&U.resolve(Z.data)},ne=()=>{const U=Ee(this,yi,Z.promise=xp());M(U)},W=V(this,yi);switch(W.status){case"pending":t.queryHash===r.queryHash&&M(W);break;case"fulfilled":(Y||Z.data!==W.value)&&ne();break;case"rejected":(!Y||Z.error!==W.reason)&&ne();break}}return Z}updateResult(){const t=V(this,xn),n=this.createResult(V(this,Ge),this.options);if(Ee(this,Fo,V(this,Ge).state),Ee(this,Hs,this.options),V(this,Fo).data!==void 0&&Ee(this,Zs,V(this,Ge)),Nc(n,t))return;Ee(this,xn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!V(this,qs).size)return!0;const l=new Set(a??V(this,qs));return this.options.throwOnError&&l.add("error"),Object.keys(V(this,xn)).some(u=>{const d=u;return V(this,xn)[d]!==t[d]&&l.has(d)})};Ze(this,st,nk).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ze(this,st,Cp).call(this)}},Ln=new WeakMap,Ge=new WeakMap,El=new WeakMap,xn=new WeakMap,Fo=new WeakMap,Hs=new WeakMap,yi=new WeakMap,to=new WeakMap,_l=new WeakMap,Ws=new WeakMap,Zs=new WeakMap,$o=new WeakMap,Vo=new WeakMap,no=new WeakMap,qs=new WeakMap,st=new WeakSet,ol=function(t){Ze(this,st,Tp).call(this);let n=V(this,Ge).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kn)),n},bp=function(){Ze(this,st,Ep).call(this);const t=ao(this.options.staleTime,V(this,Ge));if(Ho||V(this,xn).isStale||!gp(t))return;const r=Yb(V(this,xn).dataUpdatedAt,t)+1;Ee(this,$o,Io.setTimeout(()=>{V(this,xn).isStale||this.updateResult()},r))},kp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(V(this,Ge)):this.options.refetchInterval)??!1},Sp=function(t){Ze(this,st,_p).call(this),Ee(this,no,t),!(Ho||ur(this.options.enabled,V(this,Ge))===!1||!gp(V(this,no))||V(this,no)===0)&&Ee(this,Vo,Io.setInterval(()=>{(this.options.refetchIntervalInBackground||km.isFocused())&&Ze(this,st,ol).call(this)},V(this,no)))},Cp=function(){Ze(this,st,bp).call(this),Ze(this,st,Sp).call(this,Ze(this,st,kp).call(this))},Ep=function(){V(this,$o)&&(Io.clearTimeout(V(this,$o)),Ee(this,$o,void 0))},_p=function(){V(this,Vo)&&(Io.clearInterval(V(this,Vo)),Ee(this,Vo,void 0))},Tp=function(){const t=V(this,Ln).getQueryCache().build(V(this,Ln),this.options);if(t===V(this,Ge))return;const n=V(this,Ge);Ee(this,Ge,t),Ee(this,El,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},nk=function(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(V(this,xn))}),V(this,Ln).getQueryCache().notify({query:V(this,Ge),type:"observerResultsUpdated"})})},xb);function $N(e,t){return ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Mx(e,t){return $N(e,t)||e.state.data!==void 0&&Pp(e,t,t.refetchOnMount)}function Pp(e,t,n){if(ur(t.enabled,e)!==!1&&ao(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Sm(e,t)}return!1}function Lx(e,t,n,r){return(e!==t||ur(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Sm(e,n)}function Sm(e,t){return ur(t.enabled,e)!==!1&&e.isStaleByTime(ao(t.staleTime,e))}function VN(e,t){return!Nc(e.getCurrentResult(),t)}function Fx(e){return{onFetch:(t,n)=>{var h,p,x,g,C;const r=t.options,o=(x=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:x.direction,a=((g=t.state.data)==null?void 0:g.pages)||[],l=((C=t.state.data)==null?void 0:C.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let k=!1;const S=P=>{IN(P,()=>t.signal,()=>k=!0)},E=Gb(t.options,t.fetchOptions),_=async(P,R,A)=>{if(k)return Promise.reject();if(R==null&&P.pages.length)return Promise.resolve(P);const F=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:R,direction:A?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),Z=await E(F),{maxPages:re}=t.options,O=A?RN:jN;return{pages:O(P.pages,Z,re),pageParams:O(P.pageParams,R,re)}};if(o&&a.length){const P=o==="backward",R=P?BN:$x,A={pages:a,pageParams:l},j=R(r,A);u=await _(A,j,P)}else{const P=e??a.length;do{const R=d===0?l[0]??r.initialPageParam:$x(r,u);if(d>0&&R==null)break;u=await _(u,R),d++}while(d<P)}return u};t.options.persister?t.fetchFn=()=>{var k,S;return(S=(k=t.options).persister)==null?void 0:S.call(k,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function $x(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 BN(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 Tl,qr,wn,Bo,Qr,Ki,wb,UN=(wb=class extends ek{constructor(t){super();De(this,Qr);De(this,Tl);De(this,qr);De(this,wn);De(this,Bo);Ee(this,Tl,t.client),this.mutationId=t.mutationId,Ee(this,wn,t.mutationCache),Ee(this,qr,[]),this.state=t.state||rk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){V(this,qr).includes(t)||(V(this,qr).push(t),this.clearGcTimeout(),V(this,wn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ee(this,qr,V(this,qr).filter(n=>n!==t)),this.scheduleGc(),V(this,wn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){V(this,qr).length||(this.state.status==="pending"?this.scheduleGc():V(this,wn).remove(this))}continue(){var t;return((t=V(this,Bo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,u,d,f,h,p,x,g,C,k,S,E,_,P,R,A,j,F,Z,re;const n=()=>{Ze(this,Qr,Ki).call(this,{type:"continue"})},r={client:V(this,Tl),meta:this.options.meta,mutationKey:this.options.mutationKey};Ee(this,Bo,Jb({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,Y)=>{Ze(this,Qr,Ki).call(this,{type:"failed",failureCount:O,error:Y})},onPause:()=>{Ze(this,Qr,Ki).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>V(this,wn).canRun(this)}));const o=this.state.status==="pending",a=!V(this,Bo).canStart();try{if(o)n();else{Ze(this,Qr,Ki).call(this,{type:"pending",variables:t,isPaused:a}),await((u=(l=V(this,wn).config).onMutate)==null?void 0:u.call(l,t,this,r));const Y=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,t,r));Y!==this.state.context&&Ze(this,Qr,Ki).call(this,{type:"pending",context:Y,variables:t,isPaused:a})}const O=await V(this,Bo).start();return await((p=(h=V(this,wn).config).onSuccess)==null?void 0:p.call(h,O,t,this.state.context,this,r)),await((g=(x=this.options).onSuccess)==null?void 0:g.call(x,O,t,this.state.context,r)),await((k=(C=V(this,wn).config).onSettled)==null?void 0:k.call(C,O,null,this.state.variables,this.state.context,this,r)),await((E=(S=this.options).onSettled)==null?void 0:E.call(S,O,null,t,this.state.context,r)),Ze(this,Qr,Ki).call(this,{type:"success",data:O}),O}catch(O){try{await((P=(_=V(this,wn).config).onError)==null?void 0:P.call(_,O,t,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((A=(R=this.options).onError)==null?void 0:A.call(R,O,t,this.state.context,r))}catch(Y){Promise.reject(Y)}try{await((F=(j=V(this,wn).config).onSettled)==null?void 0:F.call(j,void 0,O,this.state.variables,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((re=(Z=this.options).onSettled)==null?void 0:re.call(Z,void 0,O,t,this.state.context,r))}catch(Y){Promise.reject(Y)}throw Ze(this,Qr,Ki).call(this,{type:"error",error:O}),O}finally{V(this,wn).runNext(this)}}},Tl=new WeakMap,qr=new WeakMap,wn=new WeakMap,Bo=new WeakMap,Qr=new WeakSet,Ki=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),Ht.batch(()=>{V(this,qr).forEach(r=>{r.onMutationUpdate(t)}),V(this,wn).notify({mutation:this,type:"updated",action:t})})},wb);function rk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vi,jr,Pl,bb,HN=(bb=class extends sa{constructor(t={}){super();De(this,vi);De(this,jr);De(this,Pl);this.config=t,Ee(this,vi,new Set),Ee(this,jr,new Map),Ee(this,Pl,0)}build(t,n,r){const o=new UN({client:t,mutationCache:this,mutationId:++Gu(this,Pl)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){V(this,vi).add(t);const n=tc(t);if(typeof n=="string"){const r=V(this,jr).get(n);r?r.push(t):V(this,jr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(V(this,vi).delete(t)){const n=tc(t);if(typeof n=="string"){const r=V(this,jr).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&V(this,jr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=tc(t);if(typeof n=="string"){const r=V(this,jr).get(n),o=r==null?void 0:r.find(a=>a.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=tc(t);if(typeof n=="string"){const o=(r=V(this,jr).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{V(this,vi).forEach(t=>{this.notify({type:"removed",mutation:t})}),V(this,vi).clear(),V(this,jr).clear()})}getAll(){return Array.from(V(this,vi))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ix(n,r))}findAll(t={}){return this.getAll().filter(n=>Ix(t,n))}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ht.batch(()=>Promise.all(t.map(n=>n.continue().catch(kn))))}},vi=new WeakMap,jr=new WeakMap,Pl=new WeakMap,bb);function tc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var xi,ro,Fn,wi,ki,bc,Np,kb,WN=(kb=class extends sa{constructor(n,r){super();De(this,ki);De(this,xi);De(this,ro);De(this,Fn);De(this,wi);Ee(this,xi,n),this.setOptions(r),this.bindMethods(),Ze(this,ki,bc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=V(this,xi).defaultMutationOptions(n),Nc(this.options,r)||V(this,xi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:V(this,Fn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Wo(r.mutationKey)!==Wo(this.options.mutationKey)?this.reset():((o=V(this,Fn))==null?void 0:o.state.status)==="pending"&&V(this,Fn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=V(this,Fn))==null||n.removeObserver(this)}onMutationUpdate(n){Ze(this,ki,bc).call(this),Ze(this,ki,Np).call(this,n)}getCurrentResult(){return V(this,ro)}reset(){var n;(n=V(this,Fn))==null||n.removeObserver(this),Ee(this,Fn,void 0),Ze(this,ki,bc).call(this),Ze(this,ki,Np).call(this)}mutate(n,r){var o;return Ee(this,wi,r),(o=V(this,Fn))==null||o.removeObserver(this),Ee(this,Fn,V(this,xi).getMutationCache().build(V(this,xi),this.options)),V(this,Fn).addObserver(this),V(this,Fn).execute(n)}},xi=new WeakMap,ro=new WeakMap,Fn=new WeakMap,wi=new WeakMap,ki=new WeakSet,bc=function(){var r;const n=((r=V(this,Fn))==null?void 0:r.state)??rk();Ee(this,ro,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Np=function(n){Ht.batch(()=>{var r,o,a,l,u,d,f,h;if(V(this,wi)&&this.hasListeners()){const p=V(this,ro).variables,x=V(this,ro).context,g={client:V(this,xi),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=V(this,wi)).onSuccess)==null||o.call(r,n.data,p,x,g)}catch(C){Promise.reject(C)}try{(l=(a=V(this,wi)).onSettled)==null||l.call(a,n.data,null,p,x,g)}catch(C){Promise.reject(C)}}else if((n==null?void 0:n.type)==="error"){try{(d=(u=V(this,wi)).onError)==null||d.call(u,n.error,p,x,g)}catch(C){Promise.reject(C)}try{(h=(f=V(this,wi)).onSettled)==null||h.call(f,void 0,n.error,p,x,g)}catch(C){Promise.reject(C)}}}this.listeners.forEach(p=>{p(V(this,ro))})})},kb),Yr,Sb,ZN=(Sb=class extends sa{constructor(t={}){super();De(this,Yr);this.config=t,Ee(this,Yr,new Map)}build(t,n,r){const o=n.queryKey,a=n.queryHash??xm(o,n);let l=this.get(a);return l||(l=new LN({client:t,queryKey:o,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){V(this,Yr).has(t.queryHash)||(V(this,Yr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=V(this,Yr).get(t.queryHash);n&&(t.destroy(),n===t&&V(this,Yr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return V(this,Yr).get(t)}getAll(){return[...V(this,Yr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rx(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rx(t,r)):n}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yr=new WeakMap,Sb),Pt,io,oo,Qs,Ys,so,Ks,Gs,Cb,qN=(Cb=class{constructor(e={}){De(this,Pt);De(this,io);De(this,oo);De(this,Qs);De(this,Ys);De(this,so);De(this,Ks);De(this,Gs);Ee(this,Pt,e.queryCache||new ZN),Ee(this,io,e.mutationCache||new HN),Ee(this,oo,e.defaultOptions||{}),Ee(this,Qs,new Map),Ee(this,Ys,new Map),Ee(this,so,0)}mount(){Gu(this,so)._++,V(this,so)===1&&(Ee(this,Ks,km.subscribe(async e=>{e&&(await this.resumePausedMutations(),V(this,Pt).onFocus())})),Ee(this,Gs,jc.subscribe(async e=>{e&&(await this.resumePausedMutations(),V(this,Pt).onOnline())})))}unmount(){var e,t;Gu(this,so)._--,V(this,so)===0&&((e=V(this,Ks))==null||e.call(this),Ee(this,Ks,void 0),(t=V(this,Gs))==null||t.call(this),Ee(this,Gs,void 0))}isFetching(e){return V(this,Pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return V(this,io).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=V(this,Pt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=V(this,Pt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ao(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return V(this,Pt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=V(this,Pt).get(r.queryHash),a=o==null?void 0:o.state.data,l=TN(t,a);if(l!==void 0)return V(this,Pt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Ht.batch(()=>V(this,Pt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=V(this,Pt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=V(this,Pt);Ht.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=V(this,Pt);return Ht.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ht.batch(()=>V(this,Pt).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(kn).catch(kn)}invalidateQueries(e,t={}){return Ht.batch(()=>(V(this,Pt).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=Ht.batch(()=>V(this,Pt).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,n);return n.throwOnError||(a=a.catch(kn)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=V(this,Pt).build(this,t);return n.isStaleByTime(ao(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kn).catch(kn)}fetchInfiniteQuery(e){return e.behavior=Fx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kn).catch(kn)}ensureInfiniteQueryData(e){return e.behavior=Fx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jc.isOnline()?V(this,io).resumePausedMutations():Promise.resolve()}getQueryCache(){return V(this,Pt)}getMutationCache(){return V(this,io)}getDefaultOptions(){return V(this,oo)}setDefaultOptions(e){Ee(this,oo,e)}setQueryDefaults(e,t){V(this,Qs).set(Wo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...V(this,Qs).values()],n={};return t.forEach(r=>{pl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){V(this,Ys).set(Wo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...V(this,Ys).values()],n={};return t.forEach(r=>{pl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...V(this,oo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xm(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===wm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...V(this,oo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){V(this,Pt).clear(),V(this,io).clear()}},Pt=new WeakMap,io=new WeakMap,oo=new WeakMap,Qs=new WeakMap,Ys=new WeakMap,so=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,Cb),ik=b.createContext(void 0),od=e=>{const t=b.useContext(ik);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},QN=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(ik.Provider,{value:e,children:t})),ok=b.createContext(!1),YN=()=>b.useContext(ok);ok.Provider;function KN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var GN=b.createContext(KN()),XN=()=>b.useContext(GN),JN=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?bm(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ej=e=>{b.useEffect(()=>{e.clearReset()},[e])},tj=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||bm(n,[e.error,r])),nj=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},rj=(e,t)=>e.isLoading&&e.isFetching&&!t,ij=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Vx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function oj(e,t,n){var x,g,C,k;const r=YN(),o=XN(),a=od(),l=a.defaultQueryOptions(e);(g=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||g.call(x,l);const u=a.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",nj(l),JN(l,o,u),ej(o);const d=!a.getQueryCache().get(l.queryHash),[f]=b.useState(()=>new t(a,l)),h=f.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(S=>{const E=p?f.subscribe(Ht.batchCalls(S)):kn;return f.updateResult(),E},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),b.useEffect(()=>{f.setOptions(l)},[l,f]),ij(l,h))throw Vx(l,f,o);if(tj({result:h,errorResetBoundary:o,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw h.error;if((k=(C=a.getDefaultOptions().queries)==null?void 0:C._experimental_afterQuery)==null||k.call(C,l,h),l.experimental_prefetchInRender&&!Ho&&rj(h,r)){const S=d?Vx(l,f,o):u==null?void 0:u.promise;S==null||S.catch(kn).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?h:f.trackResult(h)}function Al(e,t){return oj(e,FN)}function sj(e,t){const n=od(),[r]=b.useState(()=>new WN(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const o=b.useSyncExternalStore(b.useCallback(l=>r.subscribe(Ht.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((l,u)=>{r.mutate(l,u).catch(kn)},[r]);if(o.error&&bm(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}async function aj(){const e=await fetch("/api/tasks");if(!e.ok)throw new Error("Failed to fetch tasks");return e.json()}async function lj(){const e=await fetch("/api/epics");if(!e.ok)throw new Error("Failed to fetch epics");return e.json()}async function uj(){const e=await fetch("/api/project");return e.ok?e.json():null}function cj(){return Al({queryKey:["tasks"],queryFn:aj})}function dj(){return Al({queryKey:["epics"],queryFn:lj})}function fj(){return Al({queryKey:["project"],queryFn:uj})}function sd(){const e=cj(),t=dj(),n=fj();return{tasks:e.data??[],epics:t.data??[],project:n.data??null,isLoading:e.isLoading||t.isLoading,error:e.error||t.error,refetch:()=>{e.refetch(),t.refetch(),n.refetch()}}}function hj(){const e=od();return sj({mutationFn:async()=>{const t=await fetch("/api/bulk-archive-completed",{method:"POST"});if(!t.ok){const n=await t.json();throw new Error(n.error||"Failed to archive completed items")}return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["epics"]})}})}const Bx=e=>{let t;const n=new Set,r=(f,h)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const x=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(g=>g(t,x))}},o=()=>t,u={setState:r,getState:o,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,o,u);return u},pj=(e=>e?Bx(e):Bx),mj=e=>e;function gj(e,t=mj){const n=le.useSyncExternalStore(e.subscribe,le.useCallback(()=>t(e.getState()),[e,t]),le.useCallback(()=>t(e.getInitialState()),[e,t]));return le.useDebugValue(n),n}const Ux=e=>{const t=pj(e),n=r=>gj(t,r);return Object.assign(n,t),n},yj=(e=>e?Ux(e):Ux),Xs=yj(e=>({selectedTaskId:null,selectedEpicId:null,showCreateModal:!1,createModalDefaults:{},connectionStatus:"disconnected",openTaskDetail:t=>e({selectedTaskId:t,selectedEpicId:null}),openEpicDetail:t=>e({selectedEpicId:t,selectedTaskId:null}),openCreateModal:(t={})=>e({showCreateModal:!0,createModalDefaults:t}),closeTaskDetail:()=>e({selectedTaskId:null}),closeEpicDetail:()=>e({selectedEpicId:null}),closeCreateModal:()=>e({showCreateModal:!1,createModalDefaults:{}}),closeAllModals:()=>e({selectedTaskId:null,selectedEpicId:null,showCreateModal:!1,createModalDefaults:{}}),setConnectionStatus:t=>e({connectionStatus:t})}));/**
|
|
51
|
+
Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let x=es(),g;if(t){let P=typeof t=="string"?ia(t):t;Et(h==="/"||((_=P.pathname)==null?void 0:_.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${P.pathname}" was given in the \`location\` prop.`),g=P}else g=x;let C=g.pathname||"/",k=C;if(h!=="/"){let P=h.replace(/^\//,"").split("/");k="/"+C.replace(/^\//,"").split("/").slice(P.length).join("/")}let S=Eb(e,{pathname:k});Dr(p||S!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Dr(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=DP(S&&S.map(P=>Object.assign({},P,{params:Object.assign({},d,P.params),pathname:bi([h,a.encodeLocation?a.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?h:bi([h,a.encodeLocation?a.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),l,n,r,o);return t&&E?b.createElement(Nl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},E):E}function RP(){let e=$P(),t=yP(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:a},"ErrorBoundary")," or"," ",b.createElement("code",{style:a},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:o},n):null,l)}var IP=b.createElement(RP,null),Fb=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=_P(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(_i.Provider,{value:this.props.routeContext},b.createElement(pm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(AP,{error:e},t):t}};Fb.contextType=wP;var Ah=new WeakMap;function AP({children:e,error:t}){let{basename:n}=b.useContext(mr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=EP(t.digest);if(r){let o=Ah.get(t);if(o)throw o;let a=Ib(r.location,n);if(Rb&&!Ah.get(t))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw Ah.set(t,l),l}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function OP({routeContext:e,match:t,children:n}){let r=b.useContext(oa);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(_i.Provider,{value:e},n)}function DP(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=n==null?void 0:n.errors;if(l!=null){let h=a.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);Et(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let u=!1,d=-1;if(n)for(let h=0;h<a.length;h++){let p=a[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=h),p.route.id){let{loaderData:x,errors:g}=n,C=p.route.loader&&!x.hasOwnProperty(p.route.id)&&(!g||g[p.route.id]===void 0);if(p.route.lazy||C){u=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}let f=n&&r?(h,p)=>{var x,g;r(h,{location:n.location,params:((g=(x=n.matches)==null?void 0:x[0])==null?void 0:g.params)??{},unstable_pattern:vP(n.matches),errorInfo:p})}:void 0;return a.reduceRight((h,p,x)=>{let g,C=!1,k=null,S=null;n&&(g=l&&p.route.id?l[p.route.id]:void 0,k=p.route.errorElement||IP,u&&(d<0&&x===0?($b("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,S=null):d===x&&(C=!0,S=p.route.hydrateFallbackElement||null)));let E=t.concat(a.slice(0,x+1)),_=()=>{let P;return g?P=k:C?P=S:p.route.Component?P=b.createElement(p.route.Component,null):p.route.element?P=p.route.element:P=h,b.createElement(OP,{match:p,routeContext:{outlet:h,matches:E,isDataRoute:n!=null},children:P})};return n&&(p.route.ErrorBoundary||p.route.errorElement||x===0)?b.createElement(Fb,{location:n.location,revalidation:n.revalidation,component:k,error:g,children:_(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):_()},null)}function mm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zP(e){let t=b.useContext(oa);return Et(t,mm(e)),t}function MP(e){let t=b.useContext(rd);return Et(t,mm(e)),t}function LP(e){let t=b.useContext(_i);return Et(t,mm(e)),t}function gm(e){let t=LP(e),n=t.matches[t.matches.length-1];return Et(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function FP(){return gm("useRouteId")}function $P(){var r;let e=b.useContext(pm),t=MP("useRouteError"),n=gm("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function VP(){let{router:e}=zP("useNavigate"),t=gm("useNavigate"),n=b.useRef(!1);return Mb(()=>{n.current=!0}),b.useCallback(async(o,a={})=>{Dr(n.current,zb),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...a}))},[e,t])}var Px={};function $b(e,t,n){!t&&!Px[e]&&(Px[e]=!0,Dr(!1,n))}b.memo(BP);function BP({routes:e,future:t,state:n,onError:r}){return Lb(e,void 0,n,r,t)}function vc(e){Et(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function UP({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:l}){Et(!jl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=b.useMemo(()=>({basename:u,navigator:o,static:a,unstable_useTransitions:l,future:{}}),[u,o,a,l]);typeof n=="string"&&(n=ia(n));let{pathname:f="/",search:h="",hash:p="",state:x=null,key:g="default"}=n,C=b.useMemo(()=>{let k=Si(f,u);return k==null?null:{location:{pathname:k,search:h,hash:p,state:x,key:g},navigationType:r}},[u,f,h,p,x,g,r]);return Dr(C!=null,`<Router basename="${u}"> is not able to match the URL "${f}${h}${p}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:b.createElement(mr.Provider,{value:d},b.createElement(Nl.Provider,{children:t,value:C}))}function HP({children:e,location:t}){return jP(mp(e),t)}function mp(e,t=[]){let n=[];return b.Children.forEach(e,(r,o)=>{if(!b.isValidElement(r))return;let a=[...t,o];if(r.type===b.Fragment){n.push.apply(n,mp(r.props.children,a));return}Et(r.type===vc,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Et(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=mp(r.props.children,a)),n.push(l)}),n}var xc="get",wc="application/x-www-form-urlencoded";function id(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function WP(e){return id(e)&&e.tagName.toLowerCase()==="button"}function ZP(e){return id(e)&&e.tagName.toLowerCase()==="form"}function qP(e){return id(e)&&e.tagName.toLowerCase()==="input"}function QP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function YP(e,t){return e.button===0&&(!t||t==="_self")&&!QP(e)}var ec=null;function KP(){if(ec===null)try{new FormData(document.createElement("form"),0),ec=!1}catch{ec=!0}return ec}var GP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Oh(e){return e!=null&&!GP.has(e)?(Dr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wc}"`),null):e}function XP(e,t){let n,r,o,a,l;if(ZP(e)){let u=e.getAttribute("action");r=u?Si(u,t):null,n=e.getAttribute("method")||xc,o=Oh(e.getAttribute("enctype"))||wc,a=new FormData(e)}else if(WP(e)||qP(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?Si(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||xc,o=Oh(e.getAttribute("formenctype"))||Oh(u.getAttribute("enctype"))||wc,a=new FormData(u,e),!KP()){let{name:f,type:h,value:p}=e;if(h==="image"){let x=f?`${f}.`:"";a.append(`${x}x`,"0"),a.append(`${x}y`,"0")}else f&&a.append(f,p)}}else{if(id(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=xc,r=null,o=wc,l=e}return a&&o==="text/plain"&&(l=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ym(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function JP(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&Si(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function eN(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function tN(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function nN(e,t,n){let r=await Promise.all(e.map(async o=>{let a=t.routes[o.route.id];if(a){let l=await eN(a,n);return l.links?l.links():[]}return[]}));return sN(r.flat(1).filter(tN).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Nx(e,t,n,r,o,a){let l=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>{var h;return n[f].pathname!==d.pathname||((h=n[f].route.path)==null?void 0:h.endsWith("*"))&&n[f].params["*"]!==d.params["*"]};return a==="assets"?t.filter((d,f)=>l(d,f)||u(d,f)):a==="data"?t.filter((d,f)=>{var p;let h=r.routes[d.route.id];if(!h||!h.hasLoader)return!1;if(l(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let x=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function rN(e,t,{includeHydrateFallback:n}={}){return iN(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function iN(e){return[...new Set(e)]}function oN(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function sN(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let a=JSON.stringify(oN(o));return n.has(a)||(n.add(a),r.push({key:a,link:o})),r},[])}function Vb(){let e=b.useContext(oa);return ym(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function aN(){let e=b.useContext(rd);return ym(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var vm=b.createContext(void 0);vm.displayName="FrameworkContext";function Bb(){let e=b.useContext(vm);return ym(e,"You must render this element inside a <HydratedRouter> element"),e}function lN(e,t){let n=b.useContext(vm),[r,o]=b.useState(!1),[a,l]=b.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:h,onTouchStart:p}=t,x=b.useRef(null);b.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let k=E=>{E.forEach(_=>{l(_.isIntersecting)})},S=new IntersectionObserver(k,{threshold:.5});return x.current&&S.observe(x.current),()=>{S.disconnect()}}},[e]),b.useEffect(()=>{if(r){let k=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(k)}}},[r]);let g=()=>{o(!0)},C=()=>{o(!1),l(!1)};return n?e!=="intent"?[a,x,{}]:[a,x,{onFocus:Xa(u,g),onBlur:Xa(d,C),onMouseEnter:Xa(f,g),onMouseLeave:Xa(h,C),onTouchStart:Xa(p,g)}]:[!1,x,{}]}function Xa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function uN({page:e,...t}){let{router:n}=Vb(),r=b.useMemo(()=>Eb(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?b.createElement(dN,{page:e,matches:r,...t}):null}function cN(e){let{manifest:t,routeModules:n}=Bb(),[r,o]=b.useState([]);return b.useEffect(()=>{let a=!1;return nN(e,t,n).then(l=>{a||o(l)}),()=>{a=!0}},[e,t,n]),r}function dN({page:e,matches:t,...n}){let r=es(),{future:o,manifest:a,routeModules:l}=Bb(),{basename:u}=Vb(),{loaderData:d,matches:f}=aN(),h=b.useMemo(()=>Nx(e,t,f,a,r,"data"),[e,t,f,a,r]),p=b.useMemo(()=>Nx(e,t,f,a,r,"assets"),[e,t,f,a,r]),x=b.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let k=new Set,S=!1;if(t.forEach(_=>{var R;let P=a.routes[_.route.id];!P||!P.hasLoader||(!h.some(A=>A.route.id===_.route.id)&&_.route.id in d&&((R=l[_.route.id])!=null&&R.shouldRevalidate)||P.hasClientLoader?S=!0:k.add(_.route.id))}),k.size===0)return[];let E=JP(e,u,o.unstable_trailingSlashAwareDataRequests,"data");return S&&k.size>0&&E.searchParams.set("_routes",t.filter(_=>k.has(_.route.id)).map(_=>_.route.id).join(",")),[E.pathname+E.search]},[u,o.unstable_trailingSlashAwareDataRequests,d,r,a,h,t,e,l]),g=b.useMemo(()=>rN(p,a),[p,a]),C=cN(p);return b.createElement(b.Fragment,null,x.map(k=>b.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),g.map(k=>b.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),C.map(({key:k,link:S})=>b.createElement("link",{key:k,nonce:n.nonce,...S})))}function fN(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var hN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hN&&(window.__reactRouterVersion="7.12.0")}catch{}function pN({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=b.useRef();o.current==null&&(o.current=qT({window:r,v5Compat:!0}));let a=o.current,[l,u]=b.useState({action:a.action,location:a.location}),d=b.useCallback(f=>{n===!1?u(f):b.startTransition(()=>u(f))},[n]);return b.useLayoutEffect(()=>a.listen(d),[a,d]),b.createElement(UP,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:a,unstable_useTransitions:n})}var Ub=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hb=b.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:a,replace:l,state:u,target:d,to:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x,...g},C){let{basename:k,unstable_useTransitions:S}=b.useContext(mr),E=typeof f=="string"&&Ub.test(f),_=Ib(f,k);f=_.to;let P=TP(f,{relative:o}),[R,A,j]=lN(r,g),F=yN(f,{replace:l,state:u,target:d,preventScrollReset:h,relative:o,viewTransition:p,unstable_defaultShouldRevalidate:x,unstable_useTransitions:S});function Z(O){t&&t(O),O.defaultPrevented||F(O)}let re=b.createElement("a",{...g,...j,href:_.absoluteURL||P,onClick:_.isExternal||a?t:Z,ref:fN(C,A),target:d,"data-discover":!E&&n==="render"?"true":void 0});return R&&!E?b.createElement(b.Fragment,null,re,b.createElement(uN,{page:P})):re});Hb.displayName="Link";var Wb=b.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:a,to:l,viewTransition:u,children:d,...f},h){let p=Rl(l,{relative:f.relative}),x=es(),g=b.useContext(rd),{navigator:C,basename:k}=b.useContext(mr),S=g!=null&&kN(p)&&u===!0,E=C.encodeLocation?C.encodeLocation(p).pathname:p.pathname,_=x.pathname,P=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;n||(_=_.toLowerCase(),P=P?P.toLowerCase():null,E=E.toLowerCase()),P&&k&&(P=Si(P,k)||P);const R=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let A=_===E||!o&&_.startsWith(E)&&_.charAt(R)==="/",j=P!=null&&(P===E||!o&&P.startsWith(E)&&P.charAt(E.length)==="/"),F={isActive:A,isPending:j,isTransitioning:S},Z=A?t:void 0,re;typeof r=="function"?re=r(F):re=[r,A?"active":null,j?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let O=typeof a=="function"?a(F):a;return b.createElement(Hb,{...f,"aria-current":Z,className:re,ref:h,style:O,to:l,viewTransition:u},typeof d=="function"?d(F):d)});Wb.displayName="NavLink";var mN=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:l=xc,action:u,onSubmit:d,relative:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x,...g},C)=>{let{unstable_useTransitions:k}=b.useContext(mr),S=wN(),E=bN(u,{relative:f}),_=l.toLowerCase()==="get"?"get":"post",P=typeof u=="string"&&Ub.test(u),R=A=>{if(d&&d(A),A.defaultPrevented)return;A.preventDefault();let j=A.nativeEvent.submitter,F=(j==null?void 0:j.getAttribute("formmethod"))||l,Z=()=>S(j||A.currentTarget,{fetcherKey:t,method:F,navigate:n,replace:o,state:a,relative:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x});k&&n!==!1?b.startTransition(()=>Z()):Z()};return b.createElement("form",{ref:C,method:_,action:E,onSubmit:r?d:R,...g,"data-discover":!P&&e==="render"?"true":void 0})});mN.displayName="Form";function gN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zb(e){let t=b.useContext(oa);return Et(t,gN(e)),t}function yN(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:d}={}){let f=PP(),h=es(),p=Rl(e,{relative:a});return b.useCallback(x=>{if(YP(x,t)){x.preventDefault();let g=n!==void 0?n:hl(h)===hl(p),C=()=>f(e,{replace:g,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:u});d?b.startTransition(()=>C()):C()}},[h,f,p,n,r,t,e,o,a,l,u,d])}var vN=0,xN=()=>`__${String(++vN)}__`;function wN(){let{router:e}=Zb("useSubmit"),{basename:t}=b.useContext(mr),n=FP(),r=e.fetch,o=e.navigate;return b.useCallback(async(a,l={})=>{let{action:u,method:d,encType:f,formData:h,body:p}=XP(a,t);if(l.navigate===!1){let x=l.fetcherKey||xN();await r(x,n,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:h,body:p,formMethod:l.method||d,formEncType:l.encType||f,flushSync:l.flushSync})}else await o(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:h,body:p,formMethod:l.method||d,formEncType:l.encType||f,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function bN(e,{relative:t}={}){let{basename:n}=b.useContext(mr),r=b.useContext(_i);Et(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Rl(e||".",{relative:t})},l=es();if(e==null){a.search=l.search;let u=new URLSearchParams(a.search),d=u.getAll("index");if(d.some(h=>h==="")){u.delete("index"),d.filter(p=>p).forEach(p=>u.append("index",p));let h=u.toString();a.search=h?`?${h}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:bi([n,a.pathname])),hl(a)}function kN(e,{relative:t}={}){let n=b.useContext(Ob);Et(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Zb("useViewTransitionState"),o=Rl(e,{relative:t});if(!n.isTransitioning)return!1;let a=Si(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Si(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Pc(o.pathname,l)!=null||Pc(o.pathname,a)!=null}var Il=Cb();const qb=Jo(Il);var sa=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(){}},SN={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Xi,dm,hb,CN=(hb=class{constructor(){De(this,Xi,SN);De(this,dm,!1)}setTimeoutProvider(e){Ee(this,Xi,e)}setTimeout(e,t){return V(this,Xi).setTimeout(e,t)}clearTimeout(e){V(this,Xi).clearTimeout(e)}setInterval(e,t){return V(this,Xi).setInterval(e,t)}clearInterval(e){V(this,Xi).clearInterval(e)}},Xi=new WeakMap,dm=new WeakMap,hb),Io=new CN;function EN(e){setTimeout(e,0)}var Ho=typeof window>"u"||"Deno"in globalThis;function kn(){}function _N(e,t){return typeof e=="function"?e(t):e}function gp(e){return typeof e=="number"&&e>=0&&e!==1/0}function Qb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ao(e,t){return typeof e=="function"?e(t):e}function ur(e,t){return typeof e=="function"?e(t):e}function jx(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:a,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==xm(l,t.options))return!1}else if(!pl(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||o&&o!==t.state.fetchStatus||a&&!a(t))}function Rx(e,t){const{exact:n,status:r,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Wo(t.options.mutationKey)!==Wo(a))return!1}else if(!pl(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function xm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Wo)(e)}function Wo(e){return JSON.stringify(e,(t,n)=>yp(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function pl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>pl(e[n],t[n])):!1}var TN=Object.prototype.hasOwnProperty;function Yb(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Ix(e)&&Ix(t);if(!r&&!(yp(e)&&yp(t)))return t;const a=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,d=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const p=r?h:l[h],x=e[p],g=t[p];if(x===g){d[p]=x,(r?h<a:TN.call(e,p))&&f++;continue}if(x===null||g===null||typeof x!="object"||typeof g!="object"){d[p]=g;continue}const C=Yb(x,g,n+1);d[p]=C,C===x&&f++}return a===u&&f===a?e:d}function Nc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ix(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yp(e){if(!Ax(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ax(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ax(e){return Object.prototype.toString.call(e)==="[object Object]"}function PN(e){return new Promise(t=>{Io.setTimeout(t,e)})}function vp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Yb(e,t):t}function NN(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function jN(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var wm=Symbol();function Kb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===wm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bm(e,t){return typeof e=="function"?e(...t):!!e}function RN(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Oo,Ji,$s,pb,IN=(pb=class extends sa{constructor(){super();De(this,Oo);De(this,Ji);De(this,$s);Ee(this,$s,t=>{if(!Ho&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){V(this,Ji)||this.setEventListener(V(this,$s))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,Ji))==null||t.call(this),Ee(this,Ji,void 0))}setEventListener(t){var n;Ee(this,$s,t),(n=V(this,Ji))==null||n.call(this),Ee(this,Ji,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){V(this,Oo)!==t&&(Ee(this,Oo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof V(this,Oo)=="boolean"?V(this,Oo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Oo=new WeakMap,Ji=new WeakMap,$s=new WeakMap,pb),km=new IN;function xp(){let e,t;const n=new Promise((o,a)=>{e=o,t=a});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var AN=EN;function ON(){let e=[],t=0,n=u=>{u()},r=u=>{u()},o=AN;const a=u=>{t?e.push(u):o(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&o(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{a(()=>{u(...d)})},schedule:a,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{o=u}}}var Ht=ON(),Vs,eo,Bs,mb,DN=(mb=class extends sa{constructor(){super();De(this,Vs,!0);De(this,eo);De(this,Bs);Ee(this,Bs,t=>{if(!Ho&&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(){V(this,eo)||this.setEventListener(V(this,Bs))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,eo))==null||t.call(this),Ee(this,eo,void 0))}setEventListener(t){var n;Ee(this,Bs,t),(n=V(this,eo))==null||n.call(this),Ee(this,eo,t(this.setOnline.bind(this)))}setOnline(t){V(this,Vs)!==t&&(Ee(this,Vs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return V(this,Vs)}},Vs=new WeakMap,eo=new WeakMap,Bs=new WeakMap,mb),jc=new DN;function zN(e){return Math.min(1e3*2**e,3e4)}function Gb(e){return(e??"online")==="online"?jc.isOnline():!0}var wp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xb(e){let t=!1,n=0,r;const o=xp(),a=()=>o.status!=="pending",l=k=>{var S;if(!a()){const E=new wp(k);x(E),(S=e.onCancel)==null||S.call(e,E)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>km.isFocused()&&(e.networkMode==="always"||jc.isOnline())&&e.canRun(),h=()=>Gb(e.networkMode)&&e.canRun(),p=k=>{a()||(r==null||r(),o.resolve(k))},x=k=>{a()||(r==null||r(),o.reject(k))},g=()=>new Promise(k=>{var S;r=E=>{(a()||f())&&k(E)},(S=e.onPause)==null||S.call(e)}).then(()=>{var k;r=void 0,a()||(k=e.onContinue)==null||k.call(e)}),C=()=>{if(a())return;let k;const S=n===0?e.initialPromise:void 0;try{k=S??e.fn()}catch(E){k=Promise.reject(E)}Promise.resolve(k).then(p).catch(E=>{var j;if(a())return;const _=e.retry??(Ho?0:3),P=e.retryDelay??zN,R=typeof P=="function"?P(n,E):P,A=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,E);if(t||!A){x(E);return}n++,(j=e.onFail)==null||j.call(e,n,E),PN(R).then(()=>f()?void 0:g()).then(()=>{t?x(E):C()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r==null||r(),o),cancelRetry:u,continueRetry:d,canStart:h,start:()=>(h()?C():g().then(C),o)}}var Do,gb,Jb=(gb=class{constructor(){De(this,Do)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gp(this.gcTime)&&Ee(this,Do,Io.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ho?1/0:300*1e3))}clearGcTimeout(){V(this,Do)&&(Io.clearTimeout(V(this,Do)),Ee(this,Do,void 0))}},Do=new WeakMap,gb),zo,Us,lr,Mo,Kt,Cl,Lo,Nr,gi,yb,MN=(yb=class extends Jb{constructor(t){super();De(this,Nr);De(this,zo);De(this,Us);De(this,lr);De(this,Mo);De(this,Kt);De(this,Cl);De(this,Lo);Ee(this,Lo,!1),Ee(this,Cl,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ee(this,Mo,t.client),Ee(this,lr,V(this,Mo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ee(this,zo,Dx(this.options)),this.state=t.state??V(this,zo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=V(this,Kt))==null?void 0:t.promise}setOptions(t){if(this.options={...V(this,Cl),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Dx(this.options);n.data!==void 0&&(this.setState(Ox(n.data,n.dataUpdatedAt)),Ee(this,zo,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&V(this,lr).remove(this)}setData(t,n){const r=vp(this.state.data,t,this.options);return Ze(this,Nr,gi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ze(this,Nr,gi).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=V(this,Kt))==null?void 0:r.promise;return(o=V(this,Kt))==null||o.cancel(t),n?n.then(kn).catch(kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(V(this,zo))}isActive(){return this.observers.some(t=>ur(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ao(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:!Qb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=V(this,Kt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=V(this,Kt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),V(this,lr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(V(this,Kt)&&(V(this,Lo)?V(this,Kt).cancel({revert:!0}):V(this,Kt).cancelRetry()),this.scheduleGc()),V(this,lr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ze(this,Nr,gi).call(this,{type:"invalidate"})}async fetch(t,n){var d,f,h,p,x,g,C,k,S,E,_,P;if(this.state.fetchStatus!=="idle"&&((d=V(this,Kt))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(V(this,Kt))return V(this,Kt).continueRetry(),V(this,Kt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(A=>A.options.queryFn);R&&this.setOptions(R.options)}const r=new AbortController,o=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(Ee(this,Lo,!0),r.signal)})},a=()=>{const R=Kb(this.options,n),j=(()=>{const F={client:V(this,Mo),queryKey:this.queryKey,meta:this.meta};return o(F),F})();return Ee(this,Lo,!1),this.options.persister?this.options.persister(R,j,this):R(j)},u=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:V(this,Mo),state:this.state,fetchFn:a};return o(R),R})();(f=this.options.behavior)==null||f.onFetch(u,this),Ee(this,Us,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&Ze(this,Nr,gi).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),Ee(this,Kt,Xb({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:R=>{R instanceof wp&&R.revert&&this.setState({...V(this,Us),fetchStatus:"idle"}),r.abort()},onFail:(R,A)=>{Ze(this,Nr,gi).call(this,{type:"failed",failureCount:R,error:A})},onPause:()=>{Ze(this,Nr,gi).call(this,{type:"pause"})},onContinue:()=>{Ze(this,Nr,gi).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const R=await V(this,Kt).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(g=(x=V(this,lr).config).onSuccess)==null||g.call(x,R,this),(k=(C=V(this,lr).config).onSettled)==null||k.call(C,R,this.state.error,this),R}catch(R){if(R instanceof wp){if(R.silent)return V(this,Kt).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw Ze(this,Nr,gi).call(this,{type:"error",error:R}),(E=(S=V(this,lr).config).onError)==null||E.call(S,R,this),(P=(_=V(this,lr).config).onSettled)==null||P.call(_,this.state.data,R,this),R}finally{this.scheduleGc()}}},zo=new WeakMap,Us=new WeakMap,lr=new WeakMap,Mo=new WeakMap,Kt=new WeakMap,Cl=new WeakMap,Lo=new WeakMap,Nr=new WeakSet,gi=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,...ek(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...Ox(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ee(this,Us,t.manual?o:void 0),o;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),V(this,lr).notify({query:this,type:"updated",action:t})})},yb);function ek(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ox(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Dx(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 Ln,Ge,El,xn,Fo,Hs,yi,to,_l,Ws,Zs,$o,Vo,no,qs,st,ol,bp,kp,Sp,Cp,Ep,_p,Tp,tk,vb,LN=(vb=class extends sa{constructor(t,n){super();De(this,st);De(this,Ln);De(this,Ge);De(this,El);De(this,xn);De(this,Fo);De(this,Hs);De(this,yi);De(this,to);De(this,_l);De(this,Ws);De(this,Zs);De(this,$o);De(this,Vo);De(this,no);De(this,qs,new Set);this.options=n,Ee(this,Ln,t),Ee(this,to,null),Ee(this,yi,xp()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(V(this,Ge).addObserver(this),zx(V(this,Ge),this.options)?Ze(this,st,ol).call(this):this.updateResult(),Ze(this,st,Cp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pp(V(this,Ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pp(V(this,Ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ze(this,st,Ep).call(this),Ze(this,st,_p).call(this),V(this,Ge).removeObserver(this)}setOptions(t){const n=this.options,r=V(this,Ge);if(this.options=V(this,Ln).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ur(this.options.enabled,V(this,Ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ze(this,st,Tp).call(this),V(this,Ge).setOptions(this.options),n._defaulted&&!Nc(this.options,n)&&V(this,Ln).getQueryCache().notify({type:"observerOptionsUpdated",query:V(this,Ge),observer:this});const o=this.hasListeners();o&&Mx(V(this,Ge),r,this.options,n)&&Ze(this,st,ol).call(this),this.updateResult(),o&&(V(this,Ge)!==r||ur(this.options.enabled,V(this,Ge))!==ur(n.enabled,V(this,Ge))||ao(this.options.staleTime,V(this,Ge))!==ao(n.staleTime,V(this,Ge)))&&Ze(this,st,bp).call(this);const a=Ze(this,st,kp).call(this);o&&(V(this,Ge)!==r||ur(this.options.enabled,V(this,Ge))!==ur(n.enabled,V(this,Ge))||a!==V(this,no))&&Ze(this,st,Sp).call(this,a)}getOptimisticResult(t){const n=V(this,Ln).getQueryCache().build(V(this,Ln),t),r=this.createResult(n,t);return $N(this,r)&&(Ee(this,xn,r),Ee(this,Hs,this.options),Ee(this,Fo,V(this,Ge).state)),r}getCurrentResult(){return V(this,xn)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&V(this,yi).status==="pending"&&V(this,yi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){V(this,qs).add(t)}getCurrentQuery(){return V(this,Ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=V(this,Ln).defaultQueryOptions(t),r=V(this,Ln).getQueryCache().build(V(this,Ln),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ze(this,st,ol).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),V(this,xn)))}createResult(t,n){var re;const r=V(this,Ge),o=this.options,a=V(this,xn),l=V(this,Fo),u=V(this,Hs),f=t!==r?t.state:V(this,El),{state:h}=t;let p={...h},x=!1,g;if(n._optimisticResults){const O=this.hasListeners(),Y=!O&&zx(t,n),M=O&&Mx(t,r,n,o);(Y||M)&&(p={...p,...ek(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:S}=p;g=p.data;let E=!1;if(n.placeholderData!==void 0&&g===void 0&&S==="pending"){let O;a!=null&&a.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(O=a.data,E=!0):O=typeof n.placeholderData=="function"?n.placeholderData((re=V(this,Zs))==null?void 0:re.state.data,V(this,Zs)):n.placeholderData,O!==void 0&&(S="success",g=vp(a==null?void 0:a.data,O,n),x=!0)}if(n.select&&g!==void 0&&!E)if(a&&g===(l==null?void 0:l.data)&&n.select===V(this,_l))g=V(this,Ws);else try{Ee(this,_l,n.select),g=n.select(g),g=vp(a==null?void 0:a.data,g,n),Ee(this,Ws,g),Ee(this,to,null)}catch(O){Ee(this,to,O)}V(this,to)&&(C=V(this,to),g=V(this,Ws),k=Date.now(),S="error");const _=p.fetchStatus==="fetching",P=S==="pending",R=S==="error",A=P&&_,j=g!==void 0,Z={status:S,fetchStatus:p.fetchStatus,isPending:P,isSuccess:S==="success",isError:R,isInitialLoading:A,isLoading:A,data:g,dataUpdatedAt:p.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:_,isRefetching:_&&!P,isLoadingError:R&&!j,isPaused:p.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:R&&j,isStale:Sm(t,n),refetch:this.refetch,promise:V(this,yi),isEnabled:ur(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const O=Z.data!==void 0,Y=Z.status==="error"&&!O,M=U=>{Y?U.reject(Z.error):O&&U.resolve(Z.data)},ne=()=>{const U=Ee(this,yi,Z.promise=xp());M(U)},W=V(this,yi);switch(W.status){case"pending":t.queryHash===r.queryHash&&M(W);break;case"fulfilled":(Y||Z.data!==W.value)&&ne();break;case"rejected":(!Y||Z.error!==W.reason)&&ne();break}}return Z}updateResult(){const t=V(this,xn),n=this.createResult(V(this,Ge),this.options);if(Ee(this,Fo,V(this,Ge).state),Ee(this,Hs,this.options),V(this,Fo).data!==void 0&&Ee(this,Zs,V(this,Ge)),Nc(n,t))return;Ee(this,xn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!V(this,qs).size)return!0;const l=new Set(a??V(this,qs));return this.options.throwOnError&&l.add("error"),Object.keys(V(this,xn)).some(u=>{const d=u;return V(this,xn)[d]!==t[d]&&l.has(d)})};Ze(this,st,tk).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ze(this,st,Cp).call(this)}},Ln=new WeakMap,Ge=new WeakMap,El=new WeakMap,xn=new WeakMap,Fo=new WeakMap,Hs=new WeakMap,yi=new WeakMap,to=new WeakMap,_l=new WeakMap,Ws=new WeakMap,Zs=new WeakMap,$o=new WeakMap,Vo=new WeakMap,no=new WeakMap,qs=new WeakMap,st=new WeakSet,ol=function(t){Ze(this,st,Tp).call(this);let n=V(this,Ge).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kn)),n},bp=function(){Ze(this,st,Ep).call(this);const t=ao(this.options.staleTime,V(this,Ge));if(Ho||V(this,xn).isStale||!gp(t))return;const r=Qb(V(this,xn).dataUpdatedAt,t)+1;Ee(this,$o,Io.setTimeout(()=>{V(this,xn).isStale||this.updateResult()},r))},kp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(V(this,Ge)):this.options.refetchInterval)??!1},Sp=function(t){Ze(this,st,_p).call(this),Ee(this,no,t),!(Ho||ur(this.options.enabled,V(this,Ge))===!1||!gp(V(this,no))||V(this,no)===0)&&Ee(this,Vo,Io.setInterval(()=>{(this.options.refetchIntervalInBackground||km.isFocused())&&Ze(this,st,ol).call(this)},V(this,no)))},Cp=function(){Ze(this,st,bp).call(this),Ze(this,st,Sp).call(this,Ze(this,st,kp).call(this))},Ep=function(){V(this,$o)&&(Io.clearTimeout(V(this,$o)),Ee(this,$o,void 0))},_p=function(){V(this,Vo)&&(Io.clearInterval(V(this,Vo)),Ee(this,Vo,void 0))},Tp=function(){const t=V(this,Ln).getQueryCache().build(V(this,Ln),this.options);if(t===V(this,Ge))return;const n=V(this,Ge);Ee(this,Ge,t),Ee(this,El,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},tk=function(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(V(this,xn))}),V(this,Ln).getQueryCache().notify({query:V(this,Ge),type:"observerResultsUpdated"})})},vb);function FN(e,t){return ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zx(e,t){return FN(e,t)||e.state.data!==void 0&&Pp(e,t,t.refetchOnMount)}function Pp(e,t,n){if(ur(t.enabled,e)!==!1&&ao(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Sm(e,t)}return!1}function Mx(e,t,n,r){return(e!==t||ur(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Sm(e,n)}function Sm(e,t){return ur(t.enabled,e)!==!1&&e.isStaleByTime(ao(t.staleTime,e))}function $N(e,t){return!Nc(e.getCurrentResult(),t)}function Lx(e){return{onFetch:(t,n)=>{var h,p,x,g,C;const r=t.options,o=(x=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:x.direction,a=((g=t.state.data)==null?void 0:g.pages)||[],l=((C=t.state.data)==null?void 0:C.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let k=!1;const S=P=>{RN(P,()=>t.signal,()=>k=!0)},E=Kb(t.options,t.fetchOptions),_=async(P,R,A)=>{if(k)return Promise.reject();if(R==null&&P.pages.length)return Promise.resolve(P);const F=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:R,direction:A?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),Z=await E(F),{maxPages:re}=t.options,O=A?jN:NN;return{pages:O(P.pages,Z,re),pageParams:O(P.pageParams,R,re)}};if(o&&a.length){const P=o==="backward",R=P?VN:Fx,A={pages:a,pageParams:l},j=R(r,A);u=await _(A,j,P)}else{const P=e??a.length;do{const R=d===0?l[0]??r.initialPageParam:Fx(r,u);if(d>0&&R==null)break;u=await _(u,R),d++}while(d<P)}return u};t.options.persister?t.fetchFn=()=>{var k,S;return(S=(k=t.options).persister)==null?void 0:S.call(k,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function Fx(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 VN(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 Tl,qr,wn,Bo,Qr,Ki,xb,BN=(xb=class extends Jb{constructor(t){super();De(this,Qr);De(this,Tl);De(this,qr);De(this,wn);De(this,Bo);Ee(this,Tl,t.client),this.mutationId=t.mutationId,Ee(this,wn,t.mutationCache),Ee(this,qr,[]),this.state=t.state||nk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){V(this,qr).includes(t)||(V(this,qr).push(t),this.clearGcTimeout(),V(this,wn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ee(this,qr,V(this,qr).filter(n=>n!==t)),this.scheduleGc(),V(this,wn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){V(this,qr).length||(this.state.status==="pending"?this.scheduleGc():V(this,wn).remove(this))}continue(){var t;return((t=V(this,Bo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,u,d,f,h,p,x,g,C,k,S,E,_,P,R,A,j,F,Z,re;const n=()=>{Ze(this,Qr,Ki).call(this,{type:"continue"})},r={client:V(this,Tl),meta:this.options.meta,mutationKey:this.options.mutationKey};Ee(this,Bo,Xb({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,Y)=>{Ze(this,Qr,Ki).call(this,{type:"failed",failureCount:O,error:Y})},onPause:()=>{Ze(this,Qr,Ki).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>V(this,wn).canRun(this)}));const o=this.state.status==="pending",a=!V(this,Bo).canStart();try{if(o)n();else{Ze(this,Qr,Ki).call(this,{type:"pending",variables:t,isPaused:a}),await((u=(l=V(this,wn).config).onMutate)==null?void 0:u.call(l,t,this,r));const Y=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,t,r));Y!==this.state.context&&Ze(this,Qr,Ki).call(this,{type:"pending",context:Y,variables:t,isPaused:a})}const O=await V(this,Bo).start();return await((p=(h=V(this,wn).config).onSuccess)==null?void 0:p.call(h,O,t,this.state.context,this,r)),await((g=(x=this.options).onSuccess)==null?void 0:g.call(x,O,t,this.state.context,r)),await((k=(C=V(this,wn).config).onSettled)==null?void 0:k.call(C,O,null,this.state.variables,this.state.context,this,r)),await((E=(S=this.options).onSettled)==null?void 0:E.call(S,O,null,t,this.state.context,r)),Ze(this,Qr,Ki).call(this,{type:"success",data:O}),O}catch(O){try{await((P=(_=V(this,wn).config).onError)==null?void 0:P.call(_,O,t,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((A=(R=this.options).onError)==null?void 0:A.call(R,O,t,this.state.context,r))}catch(Y){Promise.reject(Y)}try{await((F=(j=V(this,wn).config).onSettled)==null?void 0:F.call(j,void 0,O,this.state.variables,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((re=(Z=this.options).onSettled)==null?void 0:re.call(Z,void 0,O,t,this.state.context,r))}catch(Y){Promise.reject(Y)}throw Ze(this,Qr,Ki).call(this,{type:"error",error:O}),O}finally{V(this,wn).runNext(this)}}},Tl=new WeakMap,qr=new WeakMap,wn=new WeakMap,Bo=new WeakMap,Qr=new WeakSet,Ki=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),Ht.batch(()=>{V(this,qr).forEach(r=>{r.onMutationUpdate(t)}),V(this,wn).notify({mutation:this,type:"updated",action:t})})},xb);function nk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vi,jr,Pl,wb,UN=(wb=class extends sa{constructor(t={}){super();De(this,vi);De(this,jr);De(this,Pl);this.config=t,Ee(this,vi,new Set),Ee(this,jr,new Map),Ee(this,Pl,0)}build(t,n,r){const o=new BN({client:t,mutationCache:this,mutationId:++Gu(this,Pl)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){V(this,vi).add(t);const n=tc(t);if(typeof n=="string"){const r=V(this,jr).get(n);r?r.push(t):V(this,jr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(V(this,vi).delete(t)){const n=tc(t);if(typeof n=="string"){const r=V(this,jr).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&V(this,jr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=tc(t);if(typeof n=="string"){const r=V(this,jr).get(n),o=r==null?void 0:r.find(a=>a.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=tc(t);if(typeof n=="string"){const o=(r=V(this,jr).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{V(this,vi).forEach(t=>{this.notify({type:"removed",mutation:t})}),V(this,vi).clear(),V(this,jr).clear()})}getAll(){return Array.from(V(this,vi))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rx(n,r))}findAll(t={}){return this.getAll().filter(n=>Rx(t,n))}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ht.batch(()=>Promise.all(t.map(n=>n.continue().catch(kn))))}},vi=new WeakMap,jr=new WeakMap,Pl=new WeakMap,wb);function tc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var xi,ro,Fn,wi,ki,bc,Np,bb,HN=(bb=class extends sa{constructor(n,r){super();De(this,ki);De(this,xi);De(this,ro);De(this,Fn);De(this,wi);Ee(this,xi,n),this.setOptions(r),this.bindMethods(),Ze(this,ki,bc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=V(this,xi).defaultMutationOptions(n),Nc(this.options,r)||V(this,xi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:V(this,Fn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Wo(r.mutationKey)!==Wo(this.options.mutationKey)?this.reset():((o=V(this,Fn))==null?void 0:o.state.status)==="pending"&&V(this,Fn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=V(this,Fn))==null||n.removeObserver(this)}onMutationUpdate(n){Ze(this,ki,bc).call(this),Ze(this,ki,Np).call(this,n)}getCurrentResult(){return V(this,ro)}reset(){var n;(n=V(this,Fn))==null||n.removeObserver(this),Ee(this,Fn,void 0),Ze(this,ki,bc).call(this),Ze(this,ki,Np).call(this)}mutate(n,r){var o;return Ee(this,wi,r),(o=V(this,Fn))==null||o.removeObserver(this),Ee(this,Fn,V(this,xi).getMutationCache().build(V(this,xi),this.options)),V(this,Fn).addObserver(this),V(this,Fn).execute(n)}},xi=new WeakMap,ro=new WeakMap,Fn=new WeakMap,wi=new WeakMap,ki=new WeakSet,bc=function(){var r;const n=((r=V(this,Fn))==null?void 0:r.state)??nk();Ee(this,ro,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Np=function(n){Ht.batch(()=>{var r,o,a,l,u,d,f,h;if(V(this,wi)&&this.hasListeners()){const p=V(this,ro).variables,x=V(this,ro).context,g={client:V(this,xi),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=V(this,wi)).onSuccess)==null||o.call(r,n.data,p,x,g)}catch(C){Promise.reject(C)}try{(l=(a=V(this,wi)).onSettled)==null||l.call(a,n.data,null,p,x,g)}catch(C){Promise.reject(C)}}else if((n==null?void 0:n.type)==="error"){try{(d=(u=V(this,wi)).onError)==null||d.call(u,n.error,p,x,g)}catch(C){Promise.reject(C)}try{(h=(f=V(this,wi)).onSettled)==null||h.call(f,void 0,n.error,p,x,g)}catch(C){Promise.reject(C)}}}this.listeners.forEach(p=>{p(V(this,ro))})})},bb),Yr,kb,WN=(kb=class extends sa{constructor(t={}){super();De(this,Yr);this.config=t,Ee(this,Yr,new Map)}build(t,n,r){const o=n.queryKey,a=n.queryHash??xm(o,n);let l=this.get(a);return l||(l=new MN({client:t,queryKey:o,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){V(this,Yr).has(t.queryHash)||(V(this,Yr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=V(this,Yr).get(t.queryHash);n&&(t.destroy(),n===t&&V(this,Yr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return V(this,Yr).get(t)}getAll(){return[...V(this,Yr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jx(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>jx(t,r)):n}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yr=new WeakMap,kb),Pt,io,oo,Qs,Ys,so,Ks,Gs,Sb,ZN=(Sb=class{constructor(e={}){De(this,Pt);De(this,io);De(this,oo);De(this,Qs);De(this,Ys);De(this,so);De(this,Ks);De(this,Gs);Ee(this,Pt,e.queryCache||new WN),Ee(this,io,e.mutationCache||new UN),Ee(this,oo,e.defaultOptions||{}),Ee(this,Qs,new Map),Ee(this,Ys,new Map),Ee(this,so,0)}mount(){Gu(this,so)._++,V(this,so)===1&&(Ee(this,Ks,km.subscribe(async e=>{e&&(await this.resumePausedMutations(),V(this,Pt).onFocus())})),Ee(this,Gs,jc.subscribe(async e=>{e&&(await this.resumePausedMutations(),V(this,Pt).onOnline())})))}unmount(){var e,t;Gu(this,so)._--,V(this,so)===0&&((e=V(this,Ks))==null||e.call(this),Ee(this,Ks,void 0),(t=V(this,Gs))==null||t.call(this),Ee(this,Gs,void 0))}isFetching(e){return V(this,Pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return V(this,io).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=V(this,Pt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=V(this,Pt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ao(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return V(this,Pt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=V(this,Pt).get(r.queryHash),a=o==null?void 0:o.state.data,l=_N(t,a);if(l!==void 0)return V(this,Pt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Ht.batch(()=>V(this,Pt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=V(this,Pt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=V(this,Pt);Ht.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=V(this,Pt);return Ht.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ht.batch(()=>V(this,Pt).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(kn).catch(kn)}invalidateQueries(e,t={}){return Ht.batch(()=>(V(this,Pt).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=Ht.batch(()=>V(this,Pt).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,n);return n.throwOnError||(a=a.catch(kn)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=V(this,Pt).build(this,t);return n.isStaleByTime(ao(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kn).catch(kn)}fetchInfiniteQuery(e){return e.behavior=Lx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kn).catch(kn)}ensureInfiniteQueryData(e){return e.behavior=Lx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jc.isOnline()?V(this,io).resumePausedMutations():Promise.resolve()}getQueryCache(){return V(this,Pt)}getMutationCache(){return V(this,io)}getDefaultOptions(){return V(this,oo)}setDefaultOptions(e){Ee(this,oo,e)}setQueryDefaults(e,t){V(this,Qs).set(Wo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...V(this,Qs).values()],n={};return t.forEach(r=>{pl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){V(this,Ys).set(Wo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...V(this,Ys).values()],n={};return t.forEach(r=>{pl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...V(this,oo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xm(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===wm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...V(this,oo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){V(this,Pt).clear(),V(this,io).clear()}},Pt=new WeakMap,io=new WeakMap,oo=new WeakMap,Qs=new WeakMap,Ys=new WeakMap,so=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,Sb),rk=b.createContext(void 0),od=e=>{const t=b.useContext(rk);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qN=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(rk.Provider,{value:e,children:t})),ik=b.createContext(!1),QN=()=>b.useContext(ik);ik.Provider;function YN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var KN=b.createContext(YN()),GN=()=>b.useContext(KN),XN=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?bm(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},JN=e=>{b.useEffect(()=>{e.clearReset()},[e])},ej=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||bm(n,[e.error,r])),tj=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},nj=(e,t)=>e.isLoading&&e.isFetching&&!t,rj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,$x=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ij(e,t,n){var x,g,C,k;const r=QN(),o=GN(),a=od(),l=a.defaultQueryOptions(e);(g=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||g.call(x,l);const u=a.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",tj(l),XN(l,o,u),JN(o);const d=!a.getQueryCache().get(l.queryHash),[f]=b.useState(()=>new t(a,l)),h=f.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(S=>{const E=p?f.subscribe(Ht.batchCalls(S)):kn;return f.updateResult(),E},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),b.useEffect(()=>{f.setOptions(l)},[l,f]),rj(l,h))throw $x(l,f,o);if(ej({result:h,errorResetBoundary:o,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw h.error;if((k=(C=a.getDefaultOptions().queries)==null?void 0:C._experimental_afterQuery)==null||k.call(C,l,h),l.experimental_prefetchInRender&&!Ho&&nj(h,r)){const S=d?$x(l,f,o):u==null?void 0:u.promise;S==null||S.catch(kn).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?h:f.trackResult(h)}function Al(e,t){return ij(e,LN)}function oj(e,t){const n=od(),[r]=b.useState(()=>new HN(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const o=b.useSyncExternalStore(b.useCallback(l=>r.subscribe(Ht.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((l,u)=>{r.mutate(l,u).catch(kn)},[r]);if(o.error&&bm(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}async function sj(){const e=await fetch("/api/tasks");if(!e.ok)throw new Error("Failed to fetch tasks");return e.json()}async function aj(){const e=await fetch("/api/epics");if(!e.ok)throw new Error("Failed to fetch epics");return e.json()}async function lj(){const e=await fetch("/api/project");return e.ok?e.json():null}function uj(){return Al({queryKey:["tasks"],queryFn:sj})}function cj(){return Al({queryKey:["epics"],queryFn:aj})}function dj(){return Al({queryKey:["project"],queryFn:lj})}function sd(){const e=uj(),t=cj(),n=dj();return{tasks:e.data??[],epics:t.data??[],project:n.data??null,isLoading:e.isLoading||t.isLoading,error:e.error||t.error,refetch:()=>{e.refetch(),t.refetch(),n.refetch()}}}function fj(){const e=od();return oj({mutationFn:async()=>{const t=await fetch("/api/bulk-archive-completed",{method:"POST"});if(!t.ok){const n=await t.json();throw new Error(n.error||"Failed to archive completed items")}return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["epics"]})}})}const Vx=e=>{let t;const n=new Set,r=(f,h)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const x=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(g=>g(t,x))}},o=()=>t,u={setState:r,getState:o,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,o,u);return u},hj=(e=>e?Vx(e):Vx),pj=e=>e;function mj(e,t=pj){const n=le.useSyncExternalStore(e.subscribe,le.useCallback(()=>t(e.getState()),[e,t]),le.useCallback(()=>t(e.getInitialState()),[e,t]));return le.useDebugValue(n),n}const Bx=e=>{const t=hj(e),n=r=>mj(t,r);return Object.assign(n,t),n},gj=(e=>e?Bx(e):Bx),Xs=gj(e=>({selectedTaskId:null,selectedEpicId:null,showCreateModal:!1,createModalDefaults:{},connectionStatus:"disconnected",openTaskDetail:t=>e({selectedTaskId:t,selectedEpicId:null}),openEpicDetail:t=>e({selectedEpicId:t,selectedTaskId:null}),openCreateModal:(t={})=>e({showCreateModal:!0,createModalDefaults:t}),closeTaskDetail:()=>e({selectedTaskId:null}),closeEpicDetail:()=>e({selectedEpicId:null}),closeCreateModal:()=>e({showCreateModal:!1,createModalDefaults:{}}),closeAllModals:()=>e({selectedTaskId:null,selectedEpicId:null,showCreateModal:!1,createModalDefaults:{}}),setConnectionStatus:t=>e({connectionStatus:t})}));/**
|
|
52
52
|
* @license lucide-react v0.562.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const yj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vj=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Ux=e=>{const t=vj(e);return t.charAt(0).toUpperCase()+t.slice(1)},ok=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),xj=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
57
57
|
* @license lucide-react v0.562.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/var
|
|
61
|
+
*/var wj={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"};/**
|
|
62
62
|
* @license lucide-react v0.562.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const bj=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:l,...u},d)=>b.createElement("svg",{ref:d,...wj,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ok("lucide",o),...!a&&!xj(u)&&{"aria-hidden":"true"},...u},[...l.map(([f,h])=>b.createElement(f,h)),...Array.isArray(a)?a:[a]]));/**
|
|
67
67
|
* @license lucide-react v0.562.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const ot=(e,t)=>{const n=b.forwardRef(({className:r,...o},a)=>b.createElement(
|
|
71
|
+
*/const ot=(e,t)=>{const n=b.forwardRef(({className:r,...o},a)=>b.createElement(bj,{ref:a,iconNode:t,className:ok(`lucide-${yj(Ux(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Ux(e),n};/**
|
|
72
72
|
* @license lucide-react v0.562.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const kj=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],sk=ot("archive",kj);/**
|
|
77
77
|
* @license lucide-react v0.562.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
81
|
+
*/const Sj=[["path",{d:"M3 19V5",key:"rwsyhb"}],["path",{d:"m13 6-6 6 6 6",key:"1yhaz7"}],["path",{d:"M7 12h14",key:"uoisry"}]],ak=ot("arrow-left-to-line",Sj);/**
|
|
82
82
|
* @license lucide-react v0.562.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const Cj=[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M21 12H7",key:"13ipq5"}],["path",{d:"m15 18 6-6-6-6",key:"6tx3qv"}]],lk=ot("arrow-right-from-line",Cj);/**
|
|
87
87
|
* @license lucide-react v0.562.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
91
|
+
*/const Ej=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],_j=ot("bell-off",Ej);/**
|
|
92
92
|
* @license lucide-react v0.562.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const Tj=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],Pj=ot("bell-ring",Tj);/**
|
|
97
97
|
* @license lucide-react v0.562.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const Nj=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Hx=ot("bell",Nj);/**
|
|
102
102
|
* @license lucide-react v0.562.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const jj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],uk=ot("check",jj);/**
|
|
107
107
|
* @license lucide-react v0.562.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const Rj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ck=ot("chevron-down",Rj);/**
|
|
112
112
|
* @license lucide-react v0.562.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const Ij=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],dk=ot("chevron-left",Ij);/**
|
|
117
117
|
* @license lucide-react v0.562.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const Aj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ad=ot("chevron-right",Aj);/**
|
|
122
122
|
* @license lucide-react v0.562.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const Oj=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Dj=ot("chevron-up",Oj);/**
|
|
127
127
|
* @license lucide-react v0.562.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
131
|
+
*/const zj=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Mj=ot("chevrons-up-down",zj);/**
|
|
132
132
|
* @license lucide-react v0.562.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
136
|
+
*/const Lj=[["path",{d:"M6 3v12",key:"qpgusn"}],["path",{d:"M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"1d02ji"}],["path",{d:"M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"chk6ph"}],["path",{d:"M15 6a9 9 0 0 0-9 9",key:"or332x"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]],Fj=ot("git-branch-plus",Lj);/**
|
|
137
137
|
* @license lucide-react v0.562.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const $j=[["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"}]],fk=ot("git-branch",$j);/**
|
|
142
142
|
* @license lucide-react v0.562.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const Vj=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],hk=ot("history",Vj);/**
|
|
147
147
|
* @license lucide-react v0.562.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
151
|
+
*/const Bj=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],Uj=ot("kanban",Bj);/**
|
|
152
152
|
* @license lucide-react v0.562.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const Hj=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],ld=ot("layers",Hj);/**
|
|
157
157
|
* @license lucide-react v0.562.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
161
|
+
*/const Wj=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Zj=ot("list",Wj);/**
|
|
162
162
|
* @license lucide-react v0.562.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const
|
|
166
|
+
*/const qj=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Qj=ot("message-square",qj);/**
|
|
167
167
|
* @license lucide-react v0.562.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
171
|
+
*/const Yj=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Kj=ot("moon",Yj);/**
|
|
172
172
|
* @license lucide-react v0.562.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const
|
|
176
|
+
*/const Gj=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Xj=ot("package",Gj);/**
|
|
177
177
|
* @license lucide-react v0.562.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
181
|
+
*/const Jj=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Cm=ot("pencil",Jj);/**
|
|
182
182
|
* @license lucide-react v0.562.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
186
|
+
*/const eR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ud=ot("plus",eR);/**
|
|
187
187
|
* @license lucide-react v0.562.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const
|
|
191
|
+
*/const tR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],nR=ot("search",tR);/**
|
|
192
192
|
* @license lucide-react v0.562.0 - ISC
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
195
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const
|
|
196
|
+
*/const rR=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],iR=ot("sliders-horizontal",rR);/**
|
|
197
197
|
* @license lucide-react v0.562.0 - ISC
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
200
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const
|
|
201
|
+
*/const oR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ol=ot("square-check",oR);/**
|
|
202
202
|
* @license lucide-react v0.562.0 - ISC
|
|
203
203
|
*
|
|
204
204
|
* This source code is licensed under the ISC license.
|
|
205
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const
|
|
206
|
+
*/const sR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aR=ot("square-x",sR);/**
|
|
207
207
|
* @license lucide-react v0.562.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const
|
|
211
|
+
*/const lR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],uR=ot("square",lR);/**
|
|
212
212
|
* @license lucide-react v0.562.0 - ISC
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the ISC license.
|
|
215
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const
|
|
216
|
+
*/const cR=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],dR=ot("sun",cR);/**
|
|
217
217
|
* @license lucide-react v0.562.0 - ISC
|
|
218
218
|
*
|
|
219
219
|
* This source code is licensed under the ISC license.
|
|
220
220
|
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const
|
|
221
|
+
*/const fR=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Em=ot("trash-2",fR);/**
|
|
222
222
|
* @license lucide-react v0.562.0 - ISC
|
|
223
223
|
*
|
|
224
224
|
* This source code is licensed under the ISC license.
|
|
225
225
|
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const pR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cd=ot("x",pR);function Zx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function aa(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Zx(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Zx(e[o],null)}}}}function ct(...e){return b.useCallback(aa(...e),e)}var mR=Symbol.for("react.lazy"),Rc=hm[" use ".trim().toString()];function gR(e){return typeof e=="object"&&e!==null&&"then"in e}function mk(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===mR&&"_payload"in e&&gR(e._payload)}function _m(e){const t=yR(e),n=b.forwardRef((r,o)=>{let{children:a,...l}=r;mk(a)&&typeof Rc=="function"&&(a=Rc(a._payload));const u=b.Children.toArray(a),d=u.find(xR);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var gk=_m("Slot");function yR(e){const t=b.forwardRef((n,r)=>{let{children:o,...a}=n;if(mk(o)&&typeof Rc=="function"&&(o=Rc(o._payload)),b.isValidElement(o)){const l=bR(o),u=wR(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vR=Symbol("radix.slottable");function xR(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vR}function wR(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function bR(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=yk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function vk(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=yk(e))&&(r&&(r+=" "),r+=t);return r}const qx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Qx=vk,xk=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Qx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,l=Object.keys(o).map(f=>{const h=n==null?void 0:n[f],p=a==null?void 0:a[f];if(h===null)return null;const x=qx(h)||qx(p);return o[f][x]}),u=n&&Object.entries(n).reduce((f,h)=>{let[p,x]=h;return x===void 0||(f[p]=x),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:p,className:x,...g}=h;return Object.entries(g).every(C=>{let[k,S]=C;return Array.isArray(S)?S.includes({...a,...u}[k]):{...a,...u}[k]===S})?[...f,p,x]:f},[]);return Qx(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},kR=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},SR=(e,t)=>({classGroupId:e,validator:t}),wk=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ic="-",Yx=[],CR="arbitrary..",ER=e=>{const t=TR(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return _R(l);const u=l.split(Ic),d=u[0]===""&&u.length>1?1:0;return bk(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?kR(f,d):d:f||Yx}return n[l]||Yx}}},bk=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const f=bk(e,t+1,a);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(Ic):e.slice(t).join(Ic),d=l.length;for(let f=0;f<d;f++){const h=l[f];if(h.validator(u))return h.classGroupId}},_R=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?CR+r:void 0})(),TR=e=>{const{theme:t,classGroups:n}=e;return PR(n,t)},PR=(e,t)=>{const n=wk();for(const r in e){const o=e[r];Tm(o,n,r,t)}return n},Tm=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const l=e[a];NR(l,t,n,r)}},NR=(e,t,n,r)=>{if(typeof e=="string"){jR(e,t,n);return}if(typeof e=="function"){RR(e,t,n,r);return}IR(e,t,n,r)},jR=(e,t,n)=>{const r=e===""?t:kk(t,e);r.classGroupId=n},RR=(e,t,n,r)=>{if(AR(e)){Tm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(SR(n,e))},IR=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let l=0;l<a;l++){const[u,d]=o[l];Tm(d,kk(t,u),n,r)}},kk=(e,t)=>{let n=e;const r=t.split(Ic),o=r.length;for(let a=0;a<o;a++){const l=r[a];let u=n.nextPart.get(l);u||(u=wk(),n.nextPart.set(l,u)),n=u}return n},AR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,OR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(a,l)=>{n[a]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return o(a,l),l},set(a,l){a in n?n[a]=l:o(a,l)}}},jp="!",Kx=":",DR=[],Gx=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),zR=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let l=0,u=0,d=0,f;const h=o.length;for(let k=0;k<h;k++){const S=o[k];if(l===0&&u===0){if(S===Kx){a.push(o.slice(d,k)),d=k+1;continue}if(S==="/"){f=k;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const p=a.length===0?o:o.slice(d);let x=p,g=!1;p.endsWith(jp)?(x=p.slice(0,-1),g=!0):p.startsWith(jp)&&(x=p.slice(1),g=!0);const C=f&&f>d?f-d:void 0;return Gx(a,g,x,C)};if(t){const o=t+Kx,a=r;r=l=>l.startsWith(o)?a(l.slice(o.length)):Gx(DR,!1,l,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},MR=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const l=n[a],u=l[0]==="[",d=t.has(l);u||d?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},LR=e=>({cache:OR(e.cacheSize),parseClassName:zR(e),sortModifiers:MR(e),...ER(e)}),FR=/\s+/,$R=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,l=[],u=e.trim().split(FR);let d="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{isExternal:p,modifiers:x,hasImportantModifier:g,baseClassName:C,maybePostfixModifierPosition:k}=n(h);if(p){d=h+(d.length>0?" "+d:d);continue}let S=!!k,E=r(S?C.substring(0,k):C);if(!E){if(!S){d=h+(d.length>0?" "+d:d);continue}if(E=r(C),!E){d=h+(d.length>0?" "+d:d);continue}S=!1}const _=x.length===0?"":x.length===1?x[0]:a(x).join(":"),P=g?_+jp:_,R=P+E;if(l.indexOf(R)>-1)continue;l.push(R);const A=o(E,S);for(let j=0;j<A.length;++j){const F=A[j];l.push(P+F)}d=h+(d.length>0?" "+d:d)}return d},VR=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Sk(n))&&(o&&(o+=" "),o+=r);return o},Sk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Sk(e[r]))&&(n&&(n+=" "),n+=t);return n},BR=(e,...t)=>{let n,r,o,a;const l=d=>{const f=t.reduce((h,p)=>p(h),e());return n=LR(f),r=n.cache.get,o=n.cache.set,a=u,u(d)},u=d=>{const f=r(d);if(f)return f;const h=$R(d,n);return o(d,h),h};return a=l,(...d)=>a(VR(...d))},UR=[],Ut=e=>{const t=n=>n[e]||UR;return t.isThemeGetter=!0,t},Ck=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ek=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HR=/^\d+\/\d+$/,WR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ZR=/\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$/,qR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,QR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_s=e=>HR.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Qi=e=>!!e&&Number.isInteger(Number(e)),Dh=e=>e.endsWith("%")&&qe(e.slice(0,-1)),pi=e=>WR.test(e),KR=()=>!0,GR=e=>ZR.test(e)&&!qR.test(e),_k=()=>!1,XR=e=>QR.test(e),JR=e=>YR.test(e),e2=e=>!je(e)&&!Re(e),t2=e=>la(e,Nk,_k),je=e=>Ck.test(e),jo=e=>la(e,jk,GR),zh=e=>la(e,s2,qe),Xx=e=>la(e,Tk,_k),n2=e=>la(e,Pk,JR),nc=e=>la(e,Rk,XR),Re=e=>Ek.test(e),Ja=e=>ua(e,jk),r2=e=>ua(e,a2),Jx=e=>ua(e,Tk),i2=e=>ua(e,Nk),o2=e=>ua(e,Pk),rc=e=>ua(e,Rk,!0),la=(e,t,n)=>{const r=Ck.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ua=(e,t,n=!1)=>{const r=Ek.exec(e);return r?r[1]?t(r[1]):n:!1},Tk=e=>e==="position"||e==="percentage",Pk=e=>e==="image"||e==="url",Nk=e=>e==="length"||e==="size"||e==="bg-size",jk=e=>e==="length",s2=e=>e==="number",a2=e=>e==="family-name",Rk=e=>e==="shadow",l2=()=>{const e=Ut("color"),t=Ut("font"),n=Ut("text"),r=Ut("font-weight"),o=Ut("tracking"),a=Ut("leading"),l=Ut("breakpoint"),u=Ut("container"),d=Ut("spacing"),f=Ut("radius"),h=Ut("shadow"),p=Ut("inset-shadow"),x=Ut("text-shadow"),g=Ut("drop-shadow"),C=Ut("blur"),k=Ut("perspective"),S=Ut("aspect"),E=Ut("ease"),_=Ut("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...R(),Re,je],j=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],Z=()=>[Re,je,d],re=()=>[_s,"full","auto",...Z()],O=()=>[Qi,"none","subgrid",Re,je],Y=()=>["auto",{span:["full",Qi,Re,je]},Qi,Re,je],M=()=>[Qi,"auto",Re,je],ne=()=>["auto","min","max","fr",Re,je],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...Z()],J=()=>[_s,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],D=()=>[e,Re,je],G=()=>[...R(),Jx,Xx,{position:[Re,je]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",i2,t2,{size:[Re,je]}],K=()=>[Dh,Ja,jo],I=()=>["","none","full",f,Re,je],ue=()=>["",qe,Ja,jo],ve=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[qe,Dh,Jx,Xx],me=()=>["","none",C,Re,je],Se=()=>["none",qe,Re,je],be=()=>["none",qe,Re,je],Ae=()=>[qe,Re,je],Ve=()=>[_s,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pi],breakpoint:[pi],color:[KR],container:[pi],"drop-shadow":[pi],ease:["in","out","in-out"],font:[e2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pi],shadow:[pi],spacing:["px",qe],text:[pi],"text-shadow":[pi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_s,je,Re,S]}],container:["container"],columns:[{columns:[qe,je,Re,u]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{start:re()}],end:[{end:re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[Qi,"auto",Re,je]}],basis:[{basis:[_s,"full","auto",u,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,_s,"auto","initial","none",je]}],grow:[{grow:["",qe,Re,je]}],shrink:[{shrink:["",qe,Re,je]}],order:[{order:[Qi,"first","last","none",Re,je]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[u,"screen",...J()]}],"min-w":[{"min-w":[u,"screen","none",...J()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",n,Ja,jo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Re,zh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Dh,je]}],"font-family":[{font:[r2,je,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Re,je]}],"line-clamp":[{"line-clamp":[qe,"none",Re,zh]}],leading:[{leading:[a,...Z()]}],"list-image":[{"list-image":["none",Re,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,je]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Re,jo]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[qe,"auto",Re,je]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Re,je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qi,Re,je],radial:["",Re,je],conic:[Qi,Re,je]},o2,n2]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Re,je]}],"outline-w":[{outline:["",qe,Ja,jo]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",h,rc,nc]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",p,rc,nc]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[qe,jo]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",x,rc,nc]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[qe,Re,je]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[Re,je]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,je]}],filter:[{filter:["","none",Re,je]}],blur:[{blur:me()}],brightness:[{brightness:[qe,Re,je]}],contrast:[{contrast:[qe,Re,je]}],"drop-shadow":[{"drop-shadow":["","none",g,rc,nc]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",qe,Re,je]}],"hue-rotate":[{"hue-rotate":[qe,Re,je]}],invert:[{invert:["",qe,Re,je]}],saturate:[{saturate:[qe,Re,je]}],sepia:[{sepia:["",qe,Re,je]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,je]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Re,je]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Re,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Re,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Re,je]}],"backdrop-invert":[{"backdrop-invert":["",qe,Re,je]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Re,je]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Re,je]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Re,je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Re,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Re,je]}],ease:[{ease:["linear","initial",E,Re,je]}],delay:[{delay:[qe,Re,je]}],animate:[{animate:["none",_,Re,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Re,je]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[Re,je,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ve()}],"translate-x":[{"translate-x":Ve()}],"translate-y":[{"translate-y":Ve()}],"translate-z":[{"translate-z":Ve()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Re,je]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",Re,je]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[qe,Ja,jo,zh]}],stroke:[{stroke:["none",...D()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},u2=BR(l2);function Be(...e){return u2(vk(e))}const c2=xk("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),it=b.forwardRef(({className:e,variant:t="default",size:n="default",asChild:r=!1,...o},a)=>{const l=r?gk:"button";return y.jsx(l,{ref:a,"data-slot":"button","data-variant":t,"data-size":n,className:Be(c2({variant:t,size:n,className:e})),...o})});it.displayName="Button";const Ik=b.createContext(void 0),Ak="theme";function Ok(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function d2(){if(typeof window>"u")return"system";const e=localStorage.getItem(Ak);return e==="light"||e==="dark"||e==="system"?e:"system"}function ew(e){return e==="system"?Ok():e}function f2({children:e,defaultTheme:t="system",disableTransitionOnChange:n=!1}){const[r,o]=b.useState(()=>typeof window>"u"?t:d2()),[a,l]=b.useState(()=>ew(r)),u=d=>{o(d),localStorage.setItem(Ak,d)};return b.useEffect(()=>{const d=ew(r);l(d);const f=document.documentElement;n&&f.style.setProperty("transition","none"),f.classList.remove("light","dark"),f.classList.add(d),n&&(f.offsetHeight,f.style.removeProperty("transition"))},[r,n]),b.useEffect(()=>{if(r!=="system")return;const d=window.matchMedia("(prefers-color-scheme: dark)"),f=()=>{l(Ok())};return d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[r]),y.jsx(Ik.Provider,{value:{theme:r,setTheme:u,resolvedTheme:a},children:e})}function h2(){const e=b.useContext(Ik);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function p2(){const{setTheme:e,resolvedTheme:t}=h2(),n=()=>{e(t==="dark"?"light":"dark")};return y.jsxs(it,{variant:"outline",size:"icon",onClick:n,children:[t==="dark"?y.jsx(Gj,{className:"h-4 w-4"}):y.jsx(fR,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Ye(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function m2(e,t){const n=b.createContext(t),r=a=>{const{children:l,...u}=a,d=b.useMemo(()=>u,Object.values(u));return y.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(a){const l=b.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ca(e,t=[]){let n=[];function r(a,l){const u=b.createContext(l),d=n.length;n=[...n,l];const f=p=>{var E;const{scope:x,children:g,...C}=p,k=((E=x==null?void 0:x[e])==null?void 0:E[d])||u,S=b.useMemo(()=>C,Object.values(C));return y.jsx(k.Provider,{value:S,children:g})};f.displayName=a+"Provider";function h(p,x){var k;const g=((k=x==null?void 0:x[e])==null?void 0:k[d])||u,C=b.useContext(g);if(C)return C;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[f,h]}const o=()=>{const a=n.map(l=>b.createContext(l));return function(u){const d=(u==null?void 0:u[e])||a;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,g2(o,...t)]}function g2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(a)[`__scope${f}`];return{...u,...p}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function y2(e){const t=v2(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(w2);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function v2(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=k2(o),u=b2(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var x2=Symbol("radix.slottable");function w2(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===x2}function b2(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function k2(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var S2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tt=S2.reduce((e,t)=>{const n=y2(`Primitive.${t}`),r=b.forwardRef((o,a)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function C2(e,t){e&&Il.flushSync(()=>e.dispatchEvent(t))}function Bn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function E2(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e);b.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _2="DismissableLayer",Rp="dismissableLayer.update",T2="dismissableLayer.pointerDownOutside",P2="dismissableLayer.focusOutside",tw,Dk=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...d}=e,f=b.useContext(Dk),[h,p]=b.useState(null),x=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=b.useState({}),C=ct(t,F=>p(F)),k=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(S),_=h?k.indexOf(h):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,R=_>=E,A=R2(F=>{const Z=F.target,re=[...f.branches].some(O=>O.contains(Z));!R||re||(o==null||o(F),l==null||l(F),F.defaultPrevented||u==null||u())},x),j=I2(F=>{const Z=F.target;[...f.branches].some(O=>O.contains(Z))||(a==null||a(F),l==null||l(F),F.defaultPrevented||u==null||u())},x);return E2(F=>{_===f.layers.size-1&&(r==null||r(F),!F.defaultPrevented&&u&&(F.preventDefault(),u()))},x),b.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(tw=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),nw(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=tw)}},[h,x,n,f]),b.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),nw())},[h,f]),b.useEffect(()=>{const F=()=>g({});return document.addEventListener(Rp,F),()=>document.removeEventListener(Rp,F)},[]),y.jsx(tt.div,{...d,ref:C,style:{pointerEvents:P?R?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,A.onPointerDownCapture)})});dd.displayName=_2;var N2="DismissableLayerBranch",j2=b.forwardRef((e,t)=>{const n=b.useContext(Dk),r=b.useRef(null),o=ct(t,r);return b.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),y.jsx(tt.div,{...e,ref:o})});j2.displayName=N2;function R2(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let d=function(){zk(T2,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function I2(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=b.useRef(!1);return b.useEffect(()=>{const o=a=>{a.target&&!r.current&&zk(P2,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nw(){const e=new CustomEvent(Rp);document.dispatchEvent(e)}function zk(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?C2(o,a):o.dispatchEvent(a)}var rn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},A2=hm[" useId ".trim().toString()]||(()=>{}),O2=0;function Uo(e){const[t,n]=b.useState(A2());return rn(()=>{n(r=>r??String(O2++))},[e]),e||(t?`radix-${t}`:"")}const D2=["top","right","bottom","left"],uo=Math.min,Gn=Math.max,Ac=Math.round,ic=Math.floor,Xr=e=>({x:e,y:e}),z2={left:"right",right:"left",bottom:"top",top:"bottom"},M2={start:"end",end:"start"};function Ip(e,t,n){return Gn(e,uo(t,n))}function Ci(e,t){return typeof e=="function"?e(t):e}function Ei(e){return e.split("-")[0]}function da(e){return e.split("-")[1]}function Pm(e){return e==="x"?"y":"x"}function Nm(e){return e==="y"?"height":"width"}const L2=new Set(["top","bottom"]);function Gr(e){return L2.has(Ei(e))?"y":"x"}function jm(e){return Pm(Gr(e))}function F2(e,t,n){n===void 0&&(n=!1);const r=da(e),o=jm(e),a=Nm(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Oc(l)),[l,Oc(l)]}function $2(e){const t=Oc(e);return[Ap(e),t,Ap(t)]}function Ap(e){return e.replace(/start|end/g,t=>M2[t])}const rw=["left","right"],iw=["right","left"],V2=["top","bottom"],B2=["bottom","top"];function U2(e,t,n){switch(e){case"top":case"bottom":return n?t?iw:rw:t?rw:iw;case"left":case"right":return t?V2:B2;default:return[]}}function H2(e,t,n,r){const o=da(e);let a=U2(Ei(e),n==="start",r);return o&&(a=a.map(l=>l+"-"+o),t&&(a=a.concat(a.map(Ap)))),a}function Oc(e){return e.replace(/left|right|bottom|top/g,t=>z2[t])}function W2(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mk(e){return typeof e!="number"?W2(e):{top:e,right:e,bottom:e,left:e}}function Dc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ow(e,t,n){let{reference:r,floating:o}=e;const a=Gr(t),l=jm(t),u=Nm(l),d=Ei(t),f=a==="y",h=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,x=r[u]/2-o[u]/2;let g;switch(d){case"top":g={x:h,y:r.y-o.height};break;case"bottom":g={x:h,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-o.width,y:p};break;default:g={x:r.x,y:r.y}}switch(da(t)){case"start":g[l]-=x*(n&&f?-1:1);break;case"end":g[l]+=x*(n&&f?-1:1);break}return g}const Z2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,u=a.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:p}=ow(f,r,d),x=r,g={},C=0;for(let k=0;k<u.length;k++){const{name:S,fn:E}=u[k],{x:_,y:P,data:R,reset:A}=await E({x:h,y:p,initialPlacement:r,placement:x,strategy:o,middlewareData:g,rects:f,platform:l,elements:{reference:e,floating:t}});h=_??h,p=P??p,g={...g,[S]:{...g[S],...R}},A&&C<=50&&(C++,typeof A=="object"&&(A.placement&&(x=A.placement),A.rects&&(f=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:h,y:p}=ow(f,x,d)),k=-1)}return{x:h,y:p,placement:x,strategy:o,middlewareData:g}};async function ml(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:x=!1,padding:g=0}=Ci(t,e),C=Mk(g),S=u[x?p==="floating"?"reference":"floating":p],E=Dc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(S)))==null||n?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:d})),_=p==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),R=await(a.isElement==null?void 0:a.isElement(P))?await(a.getScale==null?void 0:a.getScale(P))||{x:1,y:1}:{x:1,y:1},A=Dc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:P,strategy:d}):_);return{top:(E.top-A.top+C.top)/R.y,bottom:(A.bottom-E.bottom+C.bottom)/R.y,left:(E.left-A.left+C.left)/R.x,right:(A.right-E.right+C.right)/R.x}}const q2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:h=0}=Ci(e,t)||{};if(f==null)return{};const p=Mk(h),x={x:n,y:r},g=jm(o),C=Nm(g),k=await l.getDimensions(f),S=g==="y",E=S?"top":"left",_=S?"bottom":"right",P=S?"clientHeight":"clientWidth",R=a.reference[C]+a.reference[g]-x[g]-a.floating[C],A=x[g]-a.reference[g],j=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let F=j?j[P]:0;(!F||!await(l.isElement==null?void 0:l.isElement(j)))&&(F=u.floating[P]||a.floating[C]);const Z=R/2-A/2,re=F/2-k[C]/2-1,O=uo(p[E],re),Y=uo(p[_],re),M=O,ne=F-k[C]-Y,W=F/2-k[C]/2+Z,U=Ip(M,W,ne),Q=!d.arrow&&da(o)!=null&&W!==U&&a.reference[C]/2-(W<M?O:Y)-k[C]/2<0,J=Q?W<M?W-M:W-ne:0;return{[g]:x[g]+J,data:{[g]:U,centerOffset:W-U-J,...Q&&{alignmentOffset:J}},reset:Q}}}),Q2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:x,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:k=!0,...S}=Ci(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=Ei(o),_=Gr(u),P=Ei(u)===u,R=await(d.isRTL==null?void 0:d.isRTL(f.floating)),A=x||(P||!k?[Oc(u)]:$2(u)),j=C!=="none";!x&&j&&A.push(...H2(u,k,C,R));const F=[u,...A],Z=await ml(t,S),re=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&re.push(Z[E]),p){const W=F2(o,l,R);re.push(Z[W[0]],Z[W[1]])}if(O=[...O,{placement:o,overflows:re}],!re.every(W=>W<=0)){var Y,M;const W=(((Y=a.flip)==null?void 0:Y.index)||0)+1,U=F[W];if(U&&(!(p==="alignment"?_!==Gr(U):!1)||O.every(D=>Gr(D.placement)===_?D.overflows[0]>0:!0)))return{data:{index:W,overflows:O},reset:{placement:U}};let Q=(M=O.filter(J=>J.overflows[0]<=0).sort((J,D)=>J.overflows[1]-D.overflows[1])[0])==null?void 0:M.placement;if(!Q)switch(g){case"bestFit":{var ne;const J=(ne=O.filter(D=>{if(j){const G=Gr(D.placement);return G===_||G==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(G=>G>0).reduce((G,N)=>G+N,0)]).sort((D,G)=>D[1]-G[1])[0])==null?void 0:ne[0];J&&(Q=J);break}case"initialPlacement":Q=u;break}if(o!==Q)return{reset:{placement:Q}}}return{}}}};function sw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function aw(e){return D2.some(t=>e[t]>=0)}const Y2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ci(e,t);switch(r){case"referenceHidden":{const a=await ml(t,{...o,elementContext:"reference"}),l=sw(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:aw(l)}}}case"escaped":{const a=await ml(t,{...o,altBoundary:!0}),l=sw(a,n.floating);return{data:{escapedOffsets:l,escaped:aw(l)}}}default:return{}}}}},Lk=new Set(["left","top"]);async function K2(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Ei(n),u=da(n),d=Gr(n)==="y",f=Lk.has(l)?-1:1,h=a&&d?-1:1,p=Ci(t,e);let{mainAxis:x,crossAxis:g,alignmentAxis:C}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof C=="number"&&(g=u==="end"?C*-1:C),d?{x:g*h,y:x*f}:{x:x*f,y:g*h}}const G2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:l,middlewareData:u}=t,d=await K2(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:a+d.y,data:{...d,placement:l}}}}},X2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:S=>{let{x:E,y:_}=S;return{x:E,y:_}}},...d}=Ci(e,t),f={x:n,y:r},h=await ml(t,d),p=Gr(Ei(o)),x=Pm(p);let g=f[x],C=f[p];if(a){const S=x==="y"?"top":"left",E=x==="y"?"bottom":"right",_=g+h[S],P=g-h[E];g=Ip(_,g,P)}if(l){const S=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=C+h[S],P=C-h[E];C=Ip(_,C,P)}const k=u.fn({...t,[x]:g,[p]:C});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[x]:a,[p]:l}}}}}},J2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Ci(e,t),h={x:n,y:r},p=Gr(o),x=Pm(p);let g=h[x],C=h[p];const k=Ci(u,t),S=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(d){const P=x==="y"?"height":"width",R=a.reference[x]-a.floating[P]+S.mainAxis,A=a.reference[x]+a.reference[P]-S.mainAxis;g<R?g=R:g>A&&(g=A)}if(f){var E,_;const P=x==="y"?"width":"height",R=Lk.has(Ei(o)),A=a.reference[p]-a.floating[P]+(R&&((E=l.offset)==null?void 0:E[p])||0)+(R?0:S.crossAxis),j=a.reference[p]+a.reference[P]+(R?0:((_=l.offset)==null?void 0:_[p])||0)-(R?S.crossAxis:0);C<A?C=A:C>j&&(C=j)}return{[x]:g,[p]:C}}}},eI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Ci(e,t),h=await ml(t,f),p=Ei(o),x=da(o),g=Gr(o)==="y",{width:C,height:k}=a.floating;let S,E;p==="top"||p==="bottom"?(S=p,E=x===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(E=p,S=x==="end"?"top":"bottom");const _=k-h.top-h.bottom,P=C-h.left-h.right,R=uo(k-h[S],_),A=uo(C-h[E],P),j=!t.middlewareData.shift;let F=R,Z=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(Z=P),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(F=_),j&&!x){const O=Gn(h.left,0),Y=Gn(h.right,0),M=Gn(h.top,0),ne=Gn(h.bottom,0);g?Z=C-2*(O!==0||Y!==0?O+Y:Gn(h.left,h.right)):F=k-2*(M!==0||ne!==0?M+ne:Gn(h.top,h.bottom))}await d({...t,availableWidth:Z,availableHeight:F});const re=await l.getDimensions(u.floating);return C!==re.width||k!==re.height?{reset:{rects:!0}}:{}}}};function fd(){return typeof window<"u"}function fa(e){return Fk(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ti(e){var t;return(t=(Fk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fk(e){return fd()?e instanceof Node||e instanceof Jn(e).Node:!1}function zr(e){return fd()?e instanceof Element||e instanceof Jn(e).Element:!1}function Jr(e){return fd()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function lw(e){return!fd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}const tI=new Set(["inline","contents"]);function Dl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!tI.has(o)}const nI=new Set(["table","td","th"]);function rI(e){return nI.has(fa(e))}const iI=[":popover-open",":modal"];function hd(e){return iI.some(t=>{try{return e.matches(t)}catch{return!1}})}const oI=["transform","translate","scale","rotate","perspective"],sI=["transform","translate","scale","rotate","perspective","filter"],aI=["paint","layout","strict","content"];function Rm(e){const t=Im(),n=zr(e)?Mr(e):e;return oI.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)||sI.some(r=>(n.willChange||"").includes(r))||aI.some(r=>(n.contain||"").includes(r))}function lI(e){let t=co(e);for(;Jr(t)&&!Js(t);){if(Rm(t))return t;if(hd(t))return null;t=co(t)}return null}function Im(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const uI=new Set(["html","body","#document"]);function Js(e){return uI.has(fa(e))}function Mr(e){return Jn(e).getComputedStyle(e)}function pd(e){return zr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function co(e){if(fa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lw(e)&&e.host||ti(e);return lw(t)?t.host:t}function $k(e){const t=co(e);return Js(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jr(t)&&Dl(t)?t:$k(t)}function gl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=$k(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),l=Jn(o);if(a){const u=Op(l);return t.concat(l,l.visualViewport||[],Dl(o)?o:[],u&&n?gl(u):[])}return t.concat(o,gl(o,[],n))}function Op(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vk(e){const t=Mr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Jr(e),a=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=Ac(n)!==a||Ac(r)!==l;return u&&(n=a,r=l),{width:n,height:r,$:u}}function Am(e){return zr(e)?e:e.contextElement}function zs(e){const t=Am(e);if(!Jr(t))return Xr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Vk(t);let l=(a?Ac(n.width):n.width)/r,u=(a?Ac(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const cI=Xr(0);function Bk(e){const t=Jn(e);return!Im()||!t.visualViewport?cI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function Zo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Am(e);let l=Xr(1);t&&(r?zr(r)&&(l=zs(r)):l=zs(e));const u=dI(a,n,r)?Bk(a):Xr(0);let d=(o.left+u.x)/l.x,f=(o.top+u.y)/l.y,h=o.width/l.x,p=o.height/l.y;if(a){const x=Jn(a),g=r&&zr(r)?Jn(r):r;let C=x,k=Op(C);for(;k&&r&&g!==C;){const S=zs(k),E=k.getBoundingClientRect(),_=Mr(k),P=E.left+(k.clientLeft+parseFloat(_.paddingLeft))*S.x,R=E.top+(k.clientTop+parseFloat(_.paddingTop))*S.y;d*=S.x,f*=S.y,h*=S.x,p*=S.y,d+=P,f+=R,C=Jn(k),k=Op(C)}}return Dc({width:h,height:p,x:d,y:f})}function md(e,t){const n=pd(e).scrollLeft;return t?t.left+n:Zo(ti(e)).left+n}function Uk(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-md(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function fI(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",l=ti(r),u=t?hd(t.floating):!1;if(r===l||u&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Xr(1);const h=Xr(0),p=Jr(r);if((p||!p&&!a)&&((fa(r)!=="body"||Dl(l))&&(d=pd(r)),Jr(r))){const g=Zo(r);f=zs(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const x=l&&!p&&!a?Uk(l,d):Xr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+x.x,y:n.y*f.y-d.scrollTop*f.y+h.y+x.y}}function hI(e){return Array.from(e.getClientRects())}function pI(e){const t=ti(e),n=pd(e),r=e.ownerDocument.body,o=Gn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Gn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+md(e);const u=-n.scrollTop;return Mr(r).direction==="rtl"&&(l+=Gn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:l,y:u}}const uw=25;function mI(e,t){const n=Jn(e),r=ti(e),o=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,u=0,d=0;if(o){a=o.width,l=o.height;const h=Im();(!h||h&&t==="fixed")&&(u=o.offsetLeft,d=o.offsetTop)}const f=md(r);if(f<=0){const h=r.ownerDocument,p=h.body,x=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,C=Math.abs(r.clientWidth-p.clientWidth-g);C<=uw&&(a-=C)}else f<=uw&&(a+=f);return{width:a,height:l,x:u,y:d}}const gI=new Set(["absolute","fixed"]);function yI(e,t){const n=Zo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Jr(e)?zs(e):Xr(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:l,height:u,x:d,y:f}}function cw(e,t,n){let r;if(t==="viewport")r=mI(e,n);else if(t==="document")r=pI(ti(e));else if(zr(t))r=yI(t,n);else{const o=Bk(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dc(r)}function Hk(e,t){const n=co(e);return n===t||!zr(n)||Js(n)?!1:Mr(n).position==="fixed"||Hk(n,t)}function vI(e,t){const n=t.get(e);if(n)return n;let r=gl(e,[],!1).filter(u=>zr(u)&&fa(u)!=="body"),o=null;const a=Mr(e).position==="fixed";let l=a?co(e):e;for(;zr(l)&&!Js(l);){const u=Mr(l),d=Rm(l);!d&&u.position==="fixed"&&(o=null),(a?!d&&!o:!d&&u.position==="static"&&!!o&&gI.has(o.position)||Dl(l)&&!d&&Hk(e,l))?r=r.filter(h=>h!==l):o=u,l=co(l)}return t.set(e,r),r}function xI(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?hd(t)?[]:vI(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,h)=>{const p=cw(t,h,o);return f.top=Gn(p.top,f.top),f.right=uo(p.right,f.right),f.bottom=uo(p.bottom,f.bottom),f.left=Gn(p.left,f.left),f},cw(t,u,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function wI(e){const{width:t,height:n}=Vk(e);return{width:t,height:n}}function bI(e,t,n){const r=Jr(t),o=ti(t),a=n==="fixed",l=Zo(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const d=Xr(0);function f(){d.x=md(o)}if(r||!r&&!a)if((fa(t)!=="body"||Dl(o))&&(u=pd(t)),r){const g=Zo(t,!0,a,t);d.x=g.x+t.clientLeft,d.y=g.y+t.clientTop}else o&&f();a&&!r&&o&&f();const h=o&&!r&&!a?Uk(o,u):Xr(0),p=l.left+u.scrollLeft-d.x-h.x,x=l.top+u.scrollTop-d.y-h.y;return{x:p,y:x,width:l.width,height:l.height}}function Mh(e){return Mr(e).position==="static"}function dw(e,t){if(!Jr(e)||Mr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ti(e)===n&&(n=n.ownerDocument.body),n}function Wk(e,t){const n=Jn(e);if(hd(e))return n;if(!Jr(e)){let o=co(e);for(;o&&!Js(o);){if(zr(o)&&!Mh(o))return o;o=co(o)}return n}let r=dw(e,t);for(;r&&rI(r)&&Mh(r);)r=dw(r,t);return r&&Js(r)&&Mh(r)&&!Rm(r)?n:r||lI(e)||n}const kI=async function(e){const t=this.getOffsetParent||Wk,n=this.getDimensions,r=await n(e.floating);return{reference:bI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function SI(e){return Mr(e).direction==="rtl"}const CI={convertOffsetParentRelativeRectToViewportRelativeRect:fI,getDocumentElement:ti,getClippingRect:xI,getOffsetParent:Wk,getElementRects:kI,getClientRects:hI,getDimensions:wI,getScale:zs,isElement:zr,isRTL:SI};function Zk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function EI(e,t){let n=null,r;const o=ti(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:h,top:p,width:x,height:g}=f;if(u||t(),!x||!g)return;const C=ic(p),k=ic(o.clientWidth-(h+x)),S=ic(o.clientHeight-(p+g)),E=ic(h),P={rootMargin:-C+"px "+-k+"px "+-S+"px "+-E+"px",threshold:Gn(0,uo(1,d))||1};let R=!0;function A(j){const F=j[0].intersectionRatio;if(F!==d){if(!R)return l();F?l(!1,F):r=setTimeout(()=>{l(!1,1e-7)},1e3)}F===1&&!Zk(f,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(A,{...P,root:o.ownerDocument})}catch{n=new IntersectionObserver(A,P)}n.observe(e)}return l(!0),a}function _I(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Am(e),h=o||a?[...f?gl(f):[],...gl(t)]:[];h.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const p=f&&u?EI(f,n):null;let x=-1,g=null;l&&(g=new ResizeObserver(E=>{let[_]=E;_&&_.target===f&&g&&(g.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var P;(P=g)==null||P.observe(t)})),n()}),f&&!d&&g.observe(f),g.observe(t));let C,k=d?Zo(e):null;d&&S();function S(){const E=Zo(e);k&&!Zk(k,E)&&n(),k=E,C=requestAnimationFrame(S)}return n(),()=>{var E;h.forEach(_=>{o&&_.removeEventListener("scroll",n),a&&_.removeEventListener("resize",n)}),p==null||p(),(E=g)==null||E.disconnect(),g=null,d&&cancelAnimationFrame(C)}}const TI=G2,PI=X2,NI=Q2,jI=eI,RI=Y2,fw=q2,II=J2,AI=(e,t,n)=>{const r=new Map,o={platform:CI,...n},a={...o.platform,_c:r};return Z2(e,t,{...o,platform:a})};var OI=typeof document<"u",DI=function(){},kc=OI?b.useLayoutEffect:DI;function zc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!zc(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function qk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hw(e,t){const n=qk(e);return Math.round(t*n)/n}function Lh(e){const t=b.useRef(e);return kc(()=>{t.current=e}),t}function zI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[h,p]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,g]=b.useState(r);zc(x,r)||g(r);const[C,k]=b.useState(null),[S,E]=b.useState(null),_=b.useCallback(D=>{D!==j.current&&(j.current=D,k(D))},[]),P=b.useCallback(D=>{D!==F.current&&(F.current=D,E(D))},[]),R=a||C,A=l||S,j=b.useRef(null),F=b.useRef(null),Z=b.useRef(h),re=d!=null,O=Lh(d),Y=Lh(o),M=Lh(f),ne=b.useCallback(()=>{if(!j.current||!F.current)return;const D={placement:t,strategy:n,middleware:x};Y.current&&(D.platform=Y.current),AI(j.current,F.current,D).then(G=>{const N={...G,isPositioned:M.current!==!1};W.current&&!zc(Z.current,N)&&(Z.current=N,Il.flushSync(()=>{p(N)}))})},[x,t,n,Y,M]);kc(()=>{f===!1&&Z.current.isPositioned&&(Z.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[f]);const W=b.useRef(!1);kc(()=>(W.current=!0,()=>{W.current=!1}),[]),kc(()=>{if(R&&(j.current=R),A&&(F.current=A),R&&A){if(O.current)return O.current(R,A,ne);ne()}},[R,A,ne,O,re]);const U=b.useMemo(()=>({reference:j,floating:F,setReference:_,setFloating:P}),[_,P]),Q=b.useMemo(()=>({reference:R,floating:A}),[R,A]),J=b.useMemo(()=>{const D={position:n,left:0,top:0};if(!Q.floating)return D;const G=hw(Q.floating,h.x),N=hw(Q.floating,h.y);return u?{...D,transform:"translate("+G+"px, "+N+"px)",...qk(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:N}},[n,u,Q.floating,h.x,h.y]);return b.useMemo(()=>({...h,update:ne,refs:U,elements:Q,floatingStyles:J}),[h,ne,U,Q,J])}const MI=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?fw({element:r.current,padding:o}).fn(n):{}:r?fw({element:r,padding:o}).fn(n):{}}}},LI=(e,t)=>({...TI(e),options:[e,t]}),FI=(e,t)=>({...PI(e),options:[e,t]}),$I=(e,t)=>({...II(e),options:[e,t]}),VI=(e,t)=>({...NI(e),options:[e,t]}),BI=(e,t)=>({...jI(e),options:[e,t]}),UI=(e,t)=>({...RI(e),options:[e,t]}),HI=(e,t)=>({...MI(e),options:[e,t]});var WI="Arrow",Qk=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return y.jsx(tt.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qk.displayName=WI;var ZI=Qk;function qI(e){const[t,n]=b.useState(void 0);return rn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,u;if("borderBoxSize"in a){const d=a.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Om="Popper",[Yk,gd]=ca(Om),[QI,Kk]=Yk(Om),Gk=e=>{const{__scopePopper:t,children:n}=e,[r,o]=b.useState(null);return y.jsx(QI,{scope:t,anchor:r,onAnchorChange:o,children:n})};Gk.displayName=Om;var Xk="PopperAnchor",Jk=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Kk(Xk,n),l=b.useRef(null),u=ct(t,l),d=b.useRef(null);return b.useEffect(()=>{const f=d.current;d.current=(r==null?void 0:r.current)||l.current,f!==d.current&&a.onAnchorChange(d.current)}),r?null:y.jsx(tt.div,{...o,ref:u})});Jk.displayName=Xk;var Dm="PopperContent",[YI,KI]=Yk(Dm),e1=b.forwardRef((e,t)=>{var ie,me,Se,be,Ae,Ve;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:x=!1,updatePositionStrategy:g="optimized",onPlaced:C,...k}=e,S=Kk(Dm,n),[E,_]=b.useState(null),P=ct(t,nt=>_(nt)),[R,A]=b.useState(null),j=qI(R),F=(j==null?void 0:j.width)??0,Z=(j==null?void 0:j.height)??0,re=r+(a!=="center"?"-"+a:""),O=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},Y=Array.isArray(f)?f:[f],M=Y.length>0,ne={padding:O,boundary:Y.filter(XI),altBoundary:M},{refs:W,floatingStyles:U,placement:Q,isPositioned:J,middlewareData:D}=zI({strategy:"fixed",placement:re,whileElementsMounted:(...nt)=>_I(...nt,{animationFrame:g==="always"}),elements:{reference:S.anchor},middleware:[LI({mainAxis:o+Z,alignmentAxis:l}),d&&FI({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?$I():void 0,...ne}),d&&VI({...ne}),BI({...ne,apply:({elements:nt,rects:It,availableWidth:sn,availableHeight:Gt})=>{const{width:an,height:tr}=It.reference,_n=nt.floating.style;_n.setProperty("--radix-popper-available-width",`${sn}px`),_n.setProperty("--radix-popper-available-height",`${Gt}px`),_n.setProperty("--radix-popper-anchor-width",`${an}px`),_n.setProperty("--radix-popper-anchor-height",`${tr}px`)}}),R&&HI({element:R,padding:u}),JI({arrowWidth:F,arrowHeight:Z}),x&&UI({strategy:"referenceHidden",...ne})]}),[G,N]=r1(Q),L=Bn(C);rn(()=>{J&&(L==null||L())},[J,L]);const K=(ie=D.arrow)==null?void 0:ie.x,I=(me=D.arrow)==null?void 0:me.y,ue=((Se=D.arrow)==null?void 0:Se.centerOffset)!==0,[ve,xe]=b.useState();return rn(()=>{E&&xe(window.getComputedStyle(E).zIndex)},[E]),y.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:J?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(be=D.transformOrigin)==null?void 0:be.x,(Ae=D.transformOrigin)==null?void 0:Ae.y].join(" "),...((Ve=D.hide)==null?void 0:Ve.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(YI,{scope:n,placedSide:G,onArrowChange:A,arrowX:K,arrowY:I,shouldHideArrow:ue,children:y.jsx(tt.div,{"data-side":G,"data-align":N,...k,ref:P,style:{...k.style,animation:J?void 0:"none"}})})})});e1.displayName=Dm;var t1="PopperArrow",GI={top:"bottom",right:"left",bottom:"top",left:"right"},n1=b.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=KI(t1,r),l=GI[a.placedSide];return y.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:y.jsx(ZI,{...o,ref:n,style:{...o.style,display:"block"}})})});n1.displayName=t1;function XI(e){return e!==null}var JI=e=>({name:"transformOrigin",options:e,fn(t){var S,E,_;const{placement:n,rects:r,middlewareData:o}=t,l=((S=o.arrow)==null?void 0:S.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,h]=r1(n),p={start:"0%",center:"50%",end:"100%"}[h],x=(((E=o.arrow)==null?void 0:E.x)??0)+u/2,g=(((_=o.arrow)==null?void 0:_.y)??0)+d/2;let C="",k="";return f==="bottom"?(C=l?p:`${x}px`,k=`${-d}px`):f==="top"?(C=l?p:`${x}px`,k=`${r.floating.height+d}px`):f==="right"?(C=`${-d}px`,k=l?p:`${g}px`):f==="left"&&(C=`${r.floating.width+d}px`,k=l?p:`${g}px`),{data:{x:C,y:k}}}});function r1(e){const[t,n="center"]=e.split("-");return[t,n]}var i1=Gk,o1=Jk,s1=e1,a1=n1,eA="Portal",yd=b.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,a]=b.useState(!1);rn(()=>a(!0),[]);const l=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?Qb.createPortal(y.jsx(tt.div,{...r,ref:t}),l):null});yd.displayName=eA;function tA(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var ni=e=>{const{present:t,children:n}=e,r=nA(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),a=ct(r.ref,rA(o));return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:a}):null};ni.displayName="Presence";function nA(e){const[t,n]=b.useState(),r=b.useRef(null),o=b.useRef(e),a=b.useRef("none"),l=e?"mounted":"unmounted",[u,d]=tA(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const f=oc(r.current);a.current=u==="mounted"?f:"none"},[u]),rn(()=>{const f=r.current,h=o.current;if(h!==e){const x=a.current,g=oc(f);e?d("MOUNT"):g==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(h&&x!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),rn(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,p=g=>{const k=oc(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&k&&(d("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=g=>{g.target===t&&(a.current=oc(r.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:b.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function oc(e){return(e==null?void 0:e.animationName)||"none"}function rA(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var iA=Symbol("radix.slottable");function oA(e){const t=({children:n})=>y.jsx(y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=iA,t}var sA=hm[" useInsertionEffect ".trim().toString()]||rn;function Mc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,l]=aA({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:o;{const h=b.useRef(e!==void 0);b.useEffect(()=>{const p=h.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"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.`),h.current=u},[u,r])}const f=b.useCallback(h=>{var p;if(u){const x=lA(h)?h(e):h;x!==e&&((p=l.current)==null||p.call(l,x))}else a(h)},[u,e,a,l]);return[d,f]}function aA({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),o=b.useRef(n),a=b.useRef(t);return sA(()=>{a.current=t},[t]),b.useEffect(()=>{var l;o.current!==n&&((l=a.current)==null||l.call(a,n),o.current=n)},[n,o]),[n,r,a]}function lA(e){return typeof e=="function"}var l1=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"}),uA="VisuallyHidden",u1=b.forwardRef((e,t)=>y.jsx(tt.span,{...e,ref:t,style:{...l1,...e.style}}));u1.displayName=uA;var cA=u1,[vd]=ca("Tooltip",[gd]),xd=gd(),c1="TooltipProvider",dA=700,Dp="tooltip.open",[fA,zm]=vd(c1),d1=e=>{const{__scopeTooltip:t,delayDuration:n=dA,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,l=b.useRef(!0),u=b.useRef(!1),d=b.useRef(0);return b.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),y.jsx(fA,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:b.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})};d1.displayName=c1;var yl="Tooltip",[hA,zl]=vd(yl),f1=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:l,delayDuration:u}=e,d=zm(yl,e.__scopeTooltip),f=xd(t),[h,p]=b.useState(null),x=Uo(),g=b.useRef(0),C=l??d.disableHoverableContent,k=u??d.delayDuration,S=b.useRef(!1),[E,_]=Mc({prop:r,defaultProp:o??!1,onChange:F=>{F?(d.onOpen(),document.dispatchEvent(new CustomEvent(Dp))):d.onClose(),a==null||a(F)},caller:yl}),P=b.useMemo(()=>E?S.current?"delayed-open":"instant-open":"closed",[E]),R=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,S.current=!1,_(!0)},[_]),A=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_(!1)},[_]),j=b.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{S.current=!0,_(!0),g.current=0},k)},[k,_]);return b.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),y.jsx(i1,{...f,children:y.jsx(hA,{scope:t,contentId:x,open:E,stateAttribute:P,trigger:h,onTriggerChange:p,onTriggerEnter:b.useCallback(()=>{d.isOpenDelayedRef.current?j():R()},[d.isOpenDelayedRef,j,R]),onTriggerLeave:b.useCallback(()=>{C?A():(window.clearTimeout(g.current),g.current=0)},[A,C]),onOpen:R,onClose:A,disableHoverableContent:C,children:n})})};f1.displayName=yl;var zp="TooltipTrigger",h1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zl(zp,n),a=zm(zp,n),l=xd(n),u=b.useRef(null),d=ct(t,u,o.onTriggerChange),f=b.useRef(!1),h=b.useRef(!1),p=b.useCallback(()=>f.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),y.jsx(o1,{asChild:!0,...l,children:y.jsx(tt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:Ye(e.onPointerMove,x=>{x.pointerType!=="touch"&&!h.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),h.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{o.onTriggerLeave(),h.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Ye(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:Ye(e.onBlur,o.onClose),onClick:Ye(e.onClick,o.onClose)})})});h1.displayName=zp;var Mm="TooltipPortal",[pA,mA]=vd(Mm,{forceMount:void 0}),p1=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=zl(Mm,t);return y.jsx(pA,{scope:t,forceMount:n,children:y.jsx(ni,{present:n||a.open,children:y.jsx(yd,{asChild:!0,container:o,children:r})})})};p1.displayName=Mm;var ea="TooltipContent",m1=b.forwardRef((e,t)=>{const n=mA(ea,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,l=zl(ea,e.__scopeTooltip);return y.jsx(ni,{present:r||l.open,children:l.disableHoverableContent?y.jsx(g1,{side:o,...a,ref:t}):y.jsx(gA,{side:o,...a,ref:t})})}),gA=b.forwardRef((e,t)=>{const n=zl(ea,e.__scopeTooltip),r=zm(ea,e.__scopeTooltip),o=b.useRef(null),a=ct(t,o),[l,u]=b.useState(null),{trigger:d,onClose:f}=n,h=o.current,{onPointerInTransitChange:p}=r,x=b.useCallback(()=>{u(null),p(!1)},[p]),g=b.useCallback((C,k)=>{const S=C.currentTarget,E={x:C.clientX,y:C.clientY},_=wA(E,S.getBoundingClientRect()),P=bA(E,_),R=kA(k.getBoundingClientRect()),A=CA([...P,...R]);u(A),p(!0)},[p]);return b.useEffect(()=>()=>x(),[x]),b.useEffect(()=>{if(d&&h){const C=S=>g(S,h),k=S=>g(S,d);return d.addEventListener("pointerleave",C),h.addEventListener("pointerleave",k),()=>{d.removeEventListener("pointerleave",C),h.removeEventListener("pointerleave",k)}}},[d,h,g,x]),b.useEffect(()=>{if(l){const C=k=>{const S=k.target,E={x:k.clientX,y:k.clientY},_=(d==null?void 0:d.contains(S))||(h==null?void 0:h.contains(S)),P=!SA(E,l);_?x():P&&(x(),f())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[d,h,l,f,x]),y.jsx(g1,{...e,ref:a})}),[yA,vA]=vd(yl,{isInside:!1}),xA=oA("TooltipContent"),g1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=e,d=zl(ea,n),f=xd(n),{onClose:h}=d;return b.useEffect(()=>(document.addEventListener(Dp,h),()=>document.removeEventListener(Dp,h)),[h]),b.useEffect(()=>{if(d.trigger){const p=x=>{const g=x.target;g!=null&&g.contains(d.trigger)&&h()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,h]),y.jsx(dd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:h,children:y.jsxs(s1,{"data-state":d.stateAttribute,...f,...u,ref:t,style:{...u.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:[y.jsx(xA,{children:r}),y.jsx(yA,{scope:n,isInside:!0,children:y.jsx(cA,{id:d.contentId,role:"tooltip",children:o||r})})]})})});m1.displayName=ea;var y1="TooltipArrow",v1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xd(n);return vA(y1,n).isInside?null:y.jsx(a1,{...o,...r,ref:t})});v1.displayName=y1;function wA(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function bA(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 kA(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function SA(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],d=t[l],f=u.x,h=u.y,p=d.x,x=d.y;h>r!=x>r&&n<(p-f)*(r-h)/(x-h)+f&&(o=!o)}return o}function CA(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),EA(t)}function EA(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],l=t[t.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],l=n[n.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}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 _A=d1,TA=f1,PA=h1,NA=p1,jA=m1,RA=v1;function IA({delayDuration:e=0,...t}){return y.jsx(_A,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function AA({...e}){return y.jsx(TA,{"data-slot":"tooltip",...e})}function OA({...e}){return y.jsx(PA,{"data-slot":"tooltip-trigger",...e})}function DA({className:e,sideOffset:t=0,children:n,...r}){return y.jsx(NA,{children:y.jsxs(jA,{"data-slot":"tooltip-content",sideOffset:t,className:Be("bg-foreground text-background 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,y.jsx(RA,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function vl(){return typeof window<"u"&&"Notification"in window}function zA(){return vl()?Notification.permission:"denied"}async function MA(){return vl()?Notification.requestPermission():"denied"}function LA(e){if(!vl()||Notification.permission!=="granted")return null;const t=new Notification(e.title,{body:e.body,icon:e.icon,tag:e.tag});return e.onClick&&(t.onclick=()=>{var n;window.focus(),(n=e.onClick)==null||n.call(e),t.close()}),t}function FA(){const[e,t]=b.useState(!1),[n,r]=b.useState("default");if(b.useEffect(()=>{t(!0),vl()&&r(zA())},[]),!e)return y.jsx(it,{variant:"outline",size:"icon",disabled:!0,children:y.jsx(Wx,{className:"h-4 w-4"})});if(!vl())return null;const o=async()=>{if(n==="granted")return;const u=await MA();r(u)},a=()=>{switch(n){case"granted":return y.jsx(Nj,{className:"h-4 w-4"});case"denied":return y.jsx(Tj,{className:"h-4 w-4"});default:return y.jsx(Wx,{className:"h-4 w-4"})}},l=()=>{switch(n){case"granted":return"Browser notifications enabled. You'll be notified of task and epic changes.";case"denied":return"Notifications blocked. Enable in browser settings.";default:return"Click to enable browser notifications"}};return y.jsxs(AA,{children:[y.jsx(OA,{asChild:!0,children:y.jsxs(it,{variant:"outline",size:"icon",onClick:o,disabled:n==="denied",children:[a(),y.jsx("span",{className:"sr-only",children:l()})]})}),y.jsx(DA,{sideOffset:8,children:y.jsx("p",{children:l()})})]})}const $A=[{to:"/",label:"Kanban",icon:Hj},{to:"/list",label:"List",icon:qj},{to:"/history",label:"History",icon:pk}];function VA({projectName:e,onNewClick:t}){return y.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2 bg-accent/50",children:[y.jsxs("div",{className:"flex items-center gap-6",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx($j,{}),y.jsx("h1",{className:"text-lg font-bold",children:"trekker"})]}),y.jsx("nav",{className:"flex items-center gap-1",children:$A.map(({to:n,label:r,icon:o})=>y.jsxs(Zb,{to:n,end:n==="/",className:({isActive:a})=>Be("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"),children:[y.jsx(o,{className:"h-4 w-4"}),r]},n))})]}),y.jsxs("div",{className:"flex gap-6",children:[e&&y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(Jj,{className:"text-muted-foreground",width:16}),y.jsx("span",{className:"text-sm text-muted-foreground",children:e})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[t&&y.jsxs(it,{size:"sm",onClick:t,children:[y.jsx(ud,{className:"mr-1 h-4 w-4"}),"New"]}),y.jsx(FA,{}),y.jsx(p2,{})]})]})]})}const BA={connected:{color:"bg-green-500",label:"Connected to live updates"},connecting:{color:"bg-yellow-500",label:"Connecting..."},disconnected:{color:"bg-red-500",label:"Disconnected"}};function UA({status:e}){const t=BA[e];return y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:Be("h-2 w-2 rounded-full",t.color)}),y.jsx("span",{className:"text-xs text-muted-foreground",children:t.label})]})}var Fh="focusScope.autoFocusOnMount",$h="focusScope.autoFocusOnUnmount",pw={bubbles:!1,cancelable:!0},HA="FocusScope",Lm=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[u,d]=b.useState(null),f=Bn(o),h=Bn(a),p=b.useRef(null),x=ct(t,k=>d(k)),g=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let k=function(P){if(g.paused||!u)return;const R=P.target;u.contains(R)?p.current=R:Gi(p.current,{select:!0})},S=function(P){if(g.paused||!u)return;const R=P.relatedTarget;R!==null&&(u.contains(R)||Gi(p.current,{select:!0}))},E=function(P){if(document.activeElement===document.body)for(const A of P)A.removedNodes.length>0&&Gi(u)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const _=new MutationObserver(E);return u&&_.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),_.disconnect()}}},[r,u,g.paused]),b.useEffect(()=>{if(u){gw.add(g);const k=document.activeElement;if(!u.contains(k)){const E=new CustomEvent(Fh,pw);u.addEventListener(Fh,f),u.dispatchEvent(E),E.defaultPrevented||(WA(KA(x1(u)),{select:!0}),document.activeElement===k&&Gi(u))}return()=>{u.removeEventListener(Fh,f),setTimeout(()=>{const E=new CustomEvent($h,pw);u.addEventListener($h,h),u.dispatchEvent(E),E.defaultPrevented||Gi(k??document.body,{select:!0}),u.removeEventListener($h,h),gw.remove(g)},0)}}},[u,f,h,g]);const C=b.useCallback(k=>{if(!n&&!r||g.paused)return;const S=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,E=document.activeElement;if(S&&E){const _=k.currentTarget,[P,R]=ZA(_);P&&R?!k.shiftKey&&E===R?(k.preventDefault(),n&&Gi(P,{select:!0})):k.shiftKey&&E===P&&(k.preventDefault(),n&&Gi(R,{select:!0})):E===_&&k.preventDefault()}},[n,r,g.paused]);return y.jsx(tt.div,{tabIndex:-1,...l,ref:x,onKeyDown:C})});Lm.displayName=HA;function WA(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gi(r,{select:t}),document.activeElement!==n)return}function ZA(e){const t=x1(e),n=mw(t,e),r=mw(t.reverse(),e);return[n,r]}function x1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function mw(e,t){for(const n of e)if(!qA(n,{upTo:t}))return n}function qA(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 QA(e){return e instanceof HTMLInputElement&&"select"in e}function Gi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&QA(e)&&t&&e.select()}}var gw=YA();function YA(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=yw(e,t),e.unshift(t)},remove(t){var n;e=yw(e,t),(n=e[0])==null||n.resume()}}}function yw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function KA(e){return e.filter(t=>t.tagName!=="A")}var Vh=0;function w1(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vw()),document.body.insertAdjacentElement("beforeend",e[1]??vw()),Vh++,()=>{Vh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vh--}},[])}function vw(){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 Kr=function(){return Kr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Kr.apply(this,arguments)};function b1(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function GA(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Sc="right-scroll-bar-position",Cc="width-before-scroll-bar",XA="with-scroll-bars-hidden",JA="--removed-body-scroll-bar-size";function Bh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eO(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var tO=typeof window<"u"?b.useLayoutEffect:b.useEffect,xw=new WeakMap;function nO(e,t){var n=eO(null,function(r){return e.forEach(function(o){return Bh(o,r)})});return tO(function(){var r=xw.get(n);if(r){var o=new Set(r),a=new Set(e),l=n.current;o.forEach(function(u){a.has(u)||Bh(u,null)}),a.forEach(function(u){o.has(u)||Bh(u,l)})}xw.set(n,e)},[e]),n}function rO(e){return e}function iO(e,t){t===void 0&&(t=rO);var n=[],r=!1,o={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(a){var l=t(a,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(a){for(r=!0;n.length;){var l=n;n=[],l.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(a),l=n}var d=function(){var h=l;l=[],h.forEach(a)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(h){l.push(h),f()},filter:function(h){return l=l.filter(h),n}}}};return o}function oO(e){e===void 0&&(e={});var t=iO(null);return t.options=Kr({async:!0,ssr:!1},e),t}var k1=function(e){var t=e.sideCar,n=b1(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 b.createElement(r,Kr({},n))};k1.isSideCarExport=!0;function sO(e,t){return e.useMedium(t),k1}var S1=oO(),Uh=function(){},wd=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Uh,onWheelCapture:Uh,onTouchMoveCapture:Uh}),o=r[0],a=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,h=e.enabled,p=e.shards,x=e.sideCar,g=e.noRelative,C=e.noIsolation,k=e.inert,S=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,P=e.gapMode,R=b1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=x,j=nO([n,t]),F=Kr(Kr({},R),o);return b.createElement(b.Fragment,null,h&&b.createElement(A,{sideCar:S1,removeScrollBar:f,shards:p,noRelative:g,noIsolation:C,inert:k,setCallbacks:a,allowPinchZoom:!!S,lockRef:n,gapMode:P}),l?b.cloneElement(b.Children.only(u),Kr(Kr({},F),{ref:j})):b.createElement(_,Kr({},F,{className:d,ref:j}),u))});wd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wd.classNames={fullWidth:Cc,zeroRight:Sc};var aO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=aO();return t&&e.setAttribute("nonce",t),e}function uO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lO())&&(uO(t,n),cO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fO=function(){var e=dO();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},C1=function(){var e=fO(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},hO={left:0,top:0,right:0,gap:0},Hh=function(e){return parseInt(e||"",10)||0},pO=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Hh(n),Hh(r),Hh(o)]},mO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return hO;var t=pO(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])}},gO=C1(),Ms="data-scroll-locked",yO=function(e,t,n,r){var o=e.left,a=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
227
|
-
.`.concat(
|
|
226
|
+
*/const hR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cd=ot("x",hR);function Wx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function aa(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Wx(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Wx(e[o],null)}}}}function ct(...e){return b.useCallback(aa(...e),e)}var pR=Symbol.for("react.lazy"),Rc=hm[" use ".trim().toString()];function mR(e){return typeof e=="object"&&e!==null&&"then"in e}function pk(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===pR&&"_payload"in e&&mR(e._payload)}function _m(e){const t=gR(e),n=b.forwardRef((r,o)=>{let{children:a,...l}=r;pk(a)&&typeof Rc=="function"&&(a=Rc(a._payload));const u=b.Children.toArray(a),d=u.find(vR);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var mk=_m("Slot");function gR(e){const t=b.forwardRef((n,r)=>{let{children:o,...a}=n;if(pk(o)&&typeof Rc=="function"&&(o=Rc(o._payload)),b.isValidElement(o)){const l=wR(o),u=xR(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yR=Symbol("radix.slottable");function vR(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yR}function xR(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function wR(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function gk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=gk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function yk(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=gk(e))&&(r&&(r+=" "),r+=t);return r}const Zx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qx=yk,vk=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return qx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,l=Object.keys(o).map(f=>{const h=n==null?void 0:n[f],p=a==null?void 0:a[f];if(h===null)return null;const x=Zx(h)||Zx(p);return o[f][x]}),u=n&&Object.entries(n).reduce((f,h)=>{let[p,x]=h;return x===void 0||(f[p]=x),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:p,className:x,...g}=h;return Object.entries(g).every(C=>{let[k,S]=C;return Array.isArray(S)?S.includes({...a,...u}[k]):{...a,...u}[k]===S})?[...f,p,x]:f},[]);return qx(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},bR=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},kR=(e,t)=>({classGroupId:e,validator:t}),xk=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ic="-",Qx=[],SR="arbitrary..",CR=e=>{const t=_R(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return ER(l);const u=l.split(Ic),d=u[0]===""&&u.length>1?1:0;return wk(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?bR(f,d):d:f||Qx}return n[l]||Qx}}},wk=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const f=wk(e,t+1,a);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(Ic):e.slice(t).join(Ic),d=l.length;for(let f=0;f<d;f++){const h=l[f];if(h.validator(u))return h.classGroupId}},ER=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?SR+r:void 0})(),_R=e=>{const{theme:t,classGroups:n}=e;return TR(n,t)},TR=(e,t)=>{const n=xk();for(const r in e){const o=e[r];Tm(o,n,r,t)}return n},Tm=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const l=e[a];PR(l,t,n,r)}},PR=(e,t,n,r)=>{if(typeof e=="string"){NR(e,t,n);return}if(typeof e=="function"){jR(e,t,n,r);return}RR(e,t,n,r)},NR=(e,t,n)=>{const r=e===""?t:bk(t,e);r.classGroupId=n},jR=(e,t,n,r)=>{if(IR(e)){Tm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(kR(n,e))},RR=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let l=0;l<a;l++){const[u,d]=o[l];Tm(d,bk(t,u),n,r)}},bk=(e,t)=>{let n=e;const r=t.split(Ic),o=r.length;for(let a=0;a<o;a++){const l=r[a];let u=n.nextPart.get(l);u||(u=xk(),n.nextPart.set(l,u)),n=u}return n},IR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,AR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(a,l)=>{n[a]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return o(a,l),l},set(a,l){a in n?n[a]=l:o(a,l)}}},jp="!",Yx=":",OR=[],Kx=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),DR=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let l=0,u=0,d=0,f;const h=o.length;for(let k=0;k<h;k++){const S=o[k];if(l===0&&u===0){if(S===Yx){a.push(o.slice(d,k)),d=k+1;continue}if(S==="/"){f=k;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const p=a.length===0?o:o.slice(d);let x=p,g=!1;p.endsWith(jp)?(x=p.slice(0,-1),g=!0):p.startsWith(jp)&&(x=p.slice(1),g=!0);const C=f&&f>d?f-d:void 0;return Kx(a,g,x,C)};if(t){const o=t+Yx,a=r;r=l=>l.startsWith(o)?a(l.slice(o.length)):Kx(OR,!1,l,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},zR=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const l=n[a],u=l[0]==="[",d=t.has(l);u||d?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},MR=e=>({cache:AR(e.cacheSize),parseClassName:DR(e),sortModifiers:zR(e),...CR(e)}),LR=/\s+/,FR=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,l=[],u=e.trim().split(LR);let d="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{isExternal:p,modifiers:x,hasImportantModifier:g,baseClassName:C,maybePostfixModifierPosition:k}=n(h);if(p){d=h+(d.length>0?" "+d:d);continue}let S=!!k,E=r(S?C.substring(0,k):C);if(!E){if(!S){d=h+(d.length>0?" "+d:d);continue}if(E=r(C),!E){d=h+(d.length>0?" "+d:d);continue}S=!1}const _=x.length===0?"":x.length===1?x[0]:a(x).join(":"),P=g?_+jp:_,R=P+E;if(l.indexOf(R)>-1)continue;l.push(R);const A=o(E,S);for(let j=0;j<A.length;++j){const F=A[j];l.push(P+F)}d=h+(d.length>0?" "+d:d)}return d},$R=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=kk(n))&&(o&&(o+=" "),o+=r);return o},kk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=kk(e[r]))&&(n&&(n+=" "),n+=t);return n},VR=(e,...t)=>{let n,r,o,a;const l=d=>{const f=t.reduce((h,p)=>p(h),e());return n=MR(f),r=n.cache.get,o=n.cache.set,a=u,u(d)},u=d=>{const f=r(d);if(f)return f;const h=FR(d,n);return o(d,h),h};return a=l,(...d)=>a($R(...d))},BR=[],Ut=e=>{const t=n=>n[e]||BR;return t.isThemeGetter=!0,t},Sk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ck=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UR=/^\d+\/\d+$/,HR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WR=/\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$/,ZR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_s=e=>UR.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Qi=e=>!!e&&Number.isInteger(Number(e)),Dh=e=>e.endsWith("%")&&qe(e.slice(0,-1)),pi=e=>HR.test(e),YR=()=>!0,KR=e=>WR.test(e)&&!ZR.test(e),Ek=()=>!1,GR=e=>qR.test(e),XR=e=>QR.test(e),JR=e=>!je(e)&&!Re(e),e2=e=>la(e,Pk,Ek),je=e=>Sk.test(e),jo=e=>la(e,Nk,KR),zh=e=>la(e,o2,qe),Gx=e=>la(e,_k,Ek),t2=e=>la(e,Tk,XR),nc=e=>la(e,jk,GR),Re=e=>Ck.test(e),Ja=e=>ua(e,Nk),n2=e=>ua(e,s2),Xx=e=>ua(e,_k),r2=e=>ua(e,Pk),i2=e=>ua(e,Tk),rc=e=>ua(e,jk,!0),la=(e,t,n)=>{const r=Sk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ua=(e,t,n=!1)=>{const r=Ck.exec(e);return r?r[1]?t(r[1]):n:!1},_k=e=>e==="position"||e==="percentage",Tk=e=>e==="image"||e==="url",Pk=e=>e==="length"||e==="size"||e==="bg-size",Nk=e=>e==="length",o2=e=>e==="number",s2=e=>e==="family-name",jk=e=>e==="shadow",a2=()=>{const e=Ut("color"),t=Ut("font"),n=Ut("text"),r=Ut("font-weight"),o=Ut("tracking"),a=Ut("leading"),l=Ut("breakpoint"),u=Ut("container"),d=Ut("spacing"),f=Ut("radius"),h=Ut("shadow"),p=Ut("inset-shadow"),x=Ut("text-shadow"),g=Ut("drop-shadow"),C=Ut("blur"),k=Ut("perspective"),S=Ut("aspect"),E=Ut("ease"),_=Ut("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...R(),Re,je],j=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],Z=()=>[Re,je,d],re=()=>[_s,"full","auto",...Z()],O=()=>[Qi,"none","subgrid",Re,je],Y=()=>["auto",{span:["full",Qi,Re,je]},Qi,Re,je],M=()=>[Qi,"auto",Re,je],ne=()=>["auto","min","max","fr",Re,je],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...Z()],J=()=>[_s,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],D=()=>[e,Re,je],G=()=>[...R(),Xx,Gx,{position:[Re,je]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",r2,e2,{size:[Re,je]}],K=()=>[Dh,Ja,jo],I=()=>["","none","full",f,Re,je],ue=()=>["",qe,Ja,jo],ve=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[qe,Dh,Xx,Gx],me=()=>["","none",C,Re,je],Se=()=>["none",qe,Re,je],be=()=>["none",qe,Re,je],Ae=()=>[qe,Re,je],Ve=()=>[_s,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pi],breakpoint:[pi],color:[YR],container:[pi],"drop-shadow":[pi],ease:["in","out","in-out"],font:[JR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pi],shadow:[pi],spacing:["px",qe],text:[pi],"text-shadow":[pi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_s,je,Re,S]}],container:["container"],columns:[{columns:[qe,je,Re,u]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{start:re()}],end:[{end:re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[Qi,"auto",Re,je]}],basis:[{basis:[_s,"full","auto",u,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,_s,"auto","initial","none",je]}],grow:[{grow:["",qe,Re,je]}],shrink:[{shrink:["",qe,Re,je]}],order:[{order:[Qi,"first","last","none",Re,je]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[u,"screen",...J()]}],"min-w":[{"min-w":[u,"screen","none",...J()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",n,Ja,jo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Re,zh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Dh,je]}],"font-family":[{font:[n2,je,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Re,je]}],"line-clamp":[{"line-clamp":[qe,"none",Re,zh]}],leading:[{leading:[a,...Z()]}],"list-image":[{"list-image":["none",Re,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,je]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Re,jo]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[qe,"auto",Re,je]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Re,je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qi,Re,je],radial:["",Re,je],conic:[Qi,Re,je]},i2,t2]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Re,je]}],"outline-w":[{outline:["",qe,Ja,jo]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",h,rc,nc]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",p,rc,nc]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[qe,jo]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",x,rc,nc]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[qe,Re,je]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[Re,je]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,je]}],filter:[{filter:["","none",Re,je]}],blur:[{blur:me()}],brightness:[{brightness:[qe,Re,je]}],contrast:[{contrast:[qe,Re,je]}],"drop-shadow":[{"drop-shadow":["","none",g,rc,nc]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",qe,Re,je]}],"hue-rotate":[{"hue-rotate":[qe,Re,je]}],invert:[{invert:["",qe,Re,je]}],saturate:[{saturate:[qe,Re,je]}],sepia:[{sepia:["",qe,Re,je]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,je]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Re,je]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Re,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Re,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Re,je]}],"backdrop-invert":[{"backdrop-invert":["",qe,Re,je]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Re,je]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Re,je]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Re,je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Re,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Re,je]}],ease:[{ease:["linear","initial",E,Re,je]}],delay:[{delay:[qe,Re,je]}],animate:[{animate:["none",_,Re,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Re,je]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[Re,je,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ve()}],"translate-x":[{"translate-x":Ve()}],"translate-y":[{"translate-y":Ve()}],"translate-z":[{"translate-z":Ve()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Re,je]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",Re,je]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[qe,Ja,jo,zh]}],stroke:[{stroke:["none",...D()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},l2=VR(a2);function Be(...e){return l2(yk(e))}const u2=vk("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),it=b.forwardRef(({className:e,variant:t="default",size:n="default",asChild:r=!1,...o},a)=>{const l=r?mk:"button";return y.jsx(l,{ref:a,"data-slot":"button","data-variant":t,"data-size":n,className:Be(u2({variant:t,size:n,className:e})),...o})});it.displayName="Button";const Rk=b.createContext(void 0),Ik="theme";function Ak(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function c2(){if(typeof window>"u")return"system";const e=localStorage.getItem(Ik);return e==="light"||e==="dark"||e==="system"?e:"system"}function Jx(e){return e==="system"?Ak():e}function d2({children:e,defaultTheme:t="system",disableTransitionOnChange:n=!1}){const[r,o]=b.useState(()=>typeof window>"u"?t:c2()),[a,l]=b.useState(()=>Jx(r)),u=d=>{o(d),localStorage.setItem(Ik,d)};return b.useEffect(()=>{const d=Jx(r);l(d);const f=document.documentElement;n&&f.style.setProperty("transition","none"),f.classList.remove("light","dark"),f.classList.add(d),n&&(f.offsetHeight,f.style.removeProperty("transition"))},[r,n]),b.useEffect(()=>{if(r!=="system")return;const d=window.matchMedia("(prefers-color-scheme: dark)"),f=()=>{l(Ak())};return d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[r]),y.jsx(Rk.Provider,{value:{theme:r,setTheme:u,resolvedTheme:a},children:e})}function f2(){const e=b.useContext(Rk);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function h2(){const{setTheme:e,resolvedTheme:t}=f2(),n=()=>{e(t==="dark"?"light":"dark")};return y.jsxs(it,{variant:"outline",size:"icon",onClick:n,children:[t==="dark"?y.jsx(Kj,{className:"h-4 w-4"}):y.jsx(dR,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Ye(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function p2(e,t){const n=b.createContext(t),r=a=>{const{children:l,...u}=a,d=b.useMemo(()=>u,Object.values(u));return y.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(a){const l=b.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ca(e,t=[]){let n=[];function r(a,l){const u=b.createContext(l),d=n.length;n=[...n,l];const f=p=>{var E;const{scope:x,children:g,...C}=p,k=((E=x==null?void 0:x[e])==null?void 0:E[d])||u,S=b.useMemo(()=>C,Object.values(C));return y.jsx(k.Provider,{value:S,children:g})};f.displayName=a+"Provider";function h(p,x){var k;const g=((k=x==null?void 0:x[e])==null?void 0:k[d])||u,C=b.useContext(g);if(C)return C;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[f,h]}const o=()=>{const a=n.map(l=>b.createContext(l));return function(u){const d=(u==null?void 0:u[e])||a;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,m2(o,...t)]}function m2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(a)[`__scope${f}`];return{...u,...p}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function g2(e){const t=y2(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(x2);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function y2(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=b2(o),u=w2(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var v2=Symbol("radix.slottable");function x2(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===v2}function w2(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function b2(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var k2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tt=k2.reduce((e,t)=>{const n=g2(`Primitive.${t}`),r=b.forwardRef((o,a)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function S2(e,t){e&&Il.flushSync(()=>e.dispatchEvent(t))}function Bn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function C2(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e);b.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var E2="DismissableLayer",Rp="dismissableLayer.update",_2="dismissableLayer.pointerDownOutside",T2="dismissableLayer.focusOutside",ew,Ok=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...d}=e,f=b.useContext(Ok),[h,p]=b.useState(null),x=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=b.useState({}),C=ct(t,F=>p(F)),k=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(S),_=h?k.indexOf(h):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,R=_>=E,A=j2(F=>{const Z=F.target,re=[...f.branches].some(O=>O.contains(Z));!R||re||(o==null||o(F),l==null||l(F),F.defaultPrevented||u==null||u())},x),j=R2(F=>{const Z=F.target;[...f.branches].some(O=>O.contains(Z))||(a==null||a(F),l==null||l(F),F.defaultPrevented||u==null||u())},x);return C2(F=>{_===f.layers.size-1&&(r==null||r(F),!F.defaultPrevented&&u&&(F.preventDefault(),u()))},x),b.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(ew=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),tw(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=ew)}},[h,x,n,f]),b.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),tw())},[h,f]),b.useEffect(()=>{const F=()=>g({});return document.addEventListener(Rp,F),()=>document.removeEventListener(Rp,F)},[]),y.jsx(tt.div,{...d,ref:C,style:{pointerEvents:P?R?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,A.onPointerDownCapture)})});dd.displayName=E2;var P2="DismissableLayerBranch",N2=b.forwardRef((e,t)=>{const n=b.useContext(Ok),r=b.useRef(null),o=ct(t,r);return b.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),y.jsx(tt.div,{...e,ref:o})});N2.displayName=P2;function j2(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let d=function(){Dk(_2,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function R2(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=b.useRef(!1);return b.useEffect(()=>{const o=a=>{a.target&&!r.current&&Dk(T2,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function tw(){const e=new CustomEvent(Rp);document.dispatchEvent(e)}function Dk(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S2(o,a):o.dispatchEvent(a)}var rn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},I2=hm[" useId ".trim().toString()]||(()=>{}),A2=0;function Uo(e){const[t,n]=b.useState(I2());return rn(()=>{n(r=>r??String(A2++))},[e]),e||(t?`radix-${t}`:"")}const O2=["top","right","bottom","left"],uo=Math.min,Gn=Math.max,Ac=Math.round,ic=Math.floor,Xr=e=>({x:e,y:e}),D2={left:"right",right:"left",bottom:"top",top:"bottom"},z2={start:"end",end:"start"};function Ip(e,t,n){return Gn(e,uo(t,n))}function Ci(e,t){return typeof e=="function"?e(t):e}function Ei(e){return e.split("-")[0]}function da(e){return e.split("-")[1]}function Pm(e){return e==="x"?"y":"x"}function Nm(e){return e==="y"?"height":"width"}const M2=new Set(["top","bottom"]);function Gr(e){return M2.has(Ei(e))?"y":"x"}function jm(e){return Pm(Gr(e))}function L2(e,t,n){n===void 0&&(n=!1);const r=da(e),o=jm(e),a=Nm(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Oc(l)),[l,Oc(l)]}function F2(e){const t=Oc(e);return[Ap(e),t,Ap(t)]}function Ap(e){return e.replace(/start|end/g,t=>z2[t])}const nw=["left","right"],rw=["right","left"],$2=["top","bottom"],V2=["bottom","top"];function B2(e,t,n){switch(e){case"top":case"bottom":return n?t?rw:nw:t?nw:rw;case"left":case"right":return t?$2:V2;default:return[]}}function U2(e,t,n,r){const o=da(e);let a=B2(Ei(e),n==="start",r);return o&&(a=a.map(l=>l+"-"+o),t&&(a=a.concat(a.map(Ap)))),a}function Oc(e){return e.replace(/left|right|bottom|top/g,t=>D2[t])}function H2(e){return{top:0,right:0,bottom:0,left:0,...e}}function zk(e){return typeof e!="number"?H2(e):{top:e,right:e,bottom:e,left:e}}function Dc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function iw(e,t,n){let{reference:r,floating:o}=e;const a=Gr(t),l=jm(t),u=Nm(l),d=Ei(t),f=a==="y",h=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,x=r[u]/2-o[u]/2;let g;switch(d){case"top":g={x:h,y:r.y-o.height};break;case"bottom":g={x:h,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-o.width,y:p};break;default:g={x:r.x,y:r.y}}switch(da(t)){case"start":g[l]-=x*(n&&f?-1:1);break;case"end":g[l]+=x*(n&&f?-1:1);break}return g}const W2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,u=a.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:p}=iw(f,r,d),x=r,g={},C=0;for(let k=0;k<u.length;k++){const{name:S,fn:E}=u[k],{x:_,y:P,data:R,reset:A}=await E({x:h,y:p,initialPlacement:r,placement:x,strategy:o,middlewareData:g,rects:f,platform:l,elements:{reference:e,floating:t}});h=_??h,p=P??p,g={...g,[S]:{...g[S],...R}},A&&C<=50&&(C++,typeof A=="object"&&(A.placement&&(x=A.placement),A.rects&&(f=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:h,y:p}=iw(f,x,d)),k=-1)}return{x:h,y:p,placement:x,strategy:o,middlewareData:g}};async function ml(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:x=!1,padding:g=0}=Ci(t,e),C=zk(g),S=u[x?p==="floating"?"reference":"floating":p],E=Dc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(S)))==null||n?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:d})),_=p==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),R=await(a.isElement==null?void 0:a.isElement(P))?await(a.getScale==null?void 0:a.getScale(P))||{x:1,y:1}:{x:1,y:1},A=Dc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:P,strategy:d}):_);return{top:(E.top-A.top+C.top)/R.y,bottom:(A.bottom-E.bottom+C.bottom)/R.y,left:(E.left-A.left+C.left)/R.x,right:(A.right-E.right+C.right)/R.x}}const Z2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:h=0}=Ci(e,t)||{};if(f==null)return{};const p=zk(h),x={x:n,y:r},g=jm(o),C=Nm(g),k=await l.getDimensions(f),S=g==="y",E=S?"top":"left",_=S?"bottom":"right",P=S?"clientHeight":"clientWidth",R=a.reference[C]+a.reference[g]-x[g]-a.floating[C],A=x[g]-a.reference[g],j=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let F=j?j[P]:0;(!F||!await(l.isElement==null?void 0:l.isElement(j)))&&(F=u.floating[P]||a.floating[C]);const Z=R/2-A/2,re=F/2-k[C]/2-1,O=uo(p[E],re),Y=uo(p[_],re),M=O,ne=F-k[C]-Y,W=F/2-k[C]/2+Z,U=Ip(M,W,ne),Q=!d.arrow&&da(o)!=null&&W!==U&&a.reference[C]/2-(W<M?O:Y)-k[C]/2<0,J=Q?W<M?W-M:W-ne:0;return{[g]:x[g]+J,data:{[g]:U,centerOffset:W-U-J,...Q&&{alignmentOffset:J}},reset:Q}}}),q2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:x,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:k=!0,...S}=Ci(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=Ei(o),_=Gr(u),P=Ei(u)===u,R=await(d.isRTL==null?void 0:d.isRTL(f.floating)),A=x||(P||!k?[Oc(u)]:F2(u)),j=C!=="none";!x&&j&&A.push(...U2(u,k,C,R));const F=[u,...A],Z=await ml(t,S),re=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&re.push(Z[E]),p){const W=L2(o,l,R);re.push(Z[W[0]],Z[W[1]])}if(O=[...O,{placement:o,overflows:re}],!re.every(W=>W<=0)){var Y,M;const W=(((Y=a.flip)==null?void 0:Y.index)||0)+1,U=F[W];if(U&&(!(p==="alignment"?_!==Gr(U):!1)||O.every(D=>Gr(D.placement)===_?D.overflows[0]>0:!0)))return{data:{index:W,overflows:O},reset:{placement:U}};let Q=(M=O.filter(J=>J.overflows[0]<=0).sort((J,D)=>J.overflows[1]-D.overflows[1])[0])==null?void 0:M.placement;if(!Q)switch(g){case"bestFit":{var ne;const J=(ne=O.filter(D=>{if(j){const G=Gr(D.placement);return G===_||G==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(G=>G>0).reduce((G,N)=>G+N,0)]).sort((D,G)=>D[1]-G[1])[0])==null?void 0:ne[0];J&&(Q=J);break}case"initialPlacement":Q=u;break}if(o!==Q)return{reset:{placement:Q}}}return{}}}};function ow(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sw(e){return O2.some(t=>e[t]>=0)}const Q2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ci(e,t);switch(r){case"referenceHidden":{const a=await ml(t,{...o,elementContext:"reference"}),l=ow(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:sw(l)}}}case"escaped":{const a=await ml(t,{...o,altBoundary:!0}),l=ow(a,n.floating);return{data:{escapedOffsets:l,escaped:sw(l)}}}default:return{}}}}},Mk=new Set(["left","top"]);async function Y2(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Ei(n),u=da(n),d=Gr(n)==="y",f=Mk.has(l)?-1:1,h=a&&d?-1:1,p=Ci(t,e);let{mainAxis:x,crossAxis:g,alignmentAxis:C}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof C=="number"&&(g=u==="end"?C*-1:C),d?{x:g*h,y:x*f}:{x:x*f,y:g*h}}const K2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:l,middlewareData:u}=t,d=await Y2(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:a+d.y,data:{...d,placement:l}}}}},G2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:S=>{let{x:E,y:_}=S;return{x:E,y:_}}},...d}=Ci(e,t),f={x:n,y:r},h=await ml(t,d),p=Gr(Ei(o)),x=Pm(p);let g=f[x],C=f[p];if(a){const S=x==="y"?"top":"left",E=x==="y"?"bottom":"right",_=g+h[S],P=g-h[E];g=Ip(_,g,P)}if(l){const S=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=C+h[S],P=C-h[E];C=Ip(_,C,P)}const k=u.fn({...t,[x]:g,[p]:C});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[x]:a,[p]:l}}}}}},X2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Ci(e,t),h={x:n,y:r},p=Gr(o),x=Pm(p);let g=h[x],C=h[p];const k=Ci(u,t),S=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(d){const P=x==="y"?"height":"width",R=a.reference[x]-a.floating[P]+S.mainAxis,A=a.reference[x]+a.reference[P]-S.mainAxis;g<R?g=R:g>A&&(g=A)}if(f){var E,_;const P=x==="y"?"width":"height",R=Mk.has(Ei(o)),A=a.reference[p]-a.floating[P]+(R&&((E=l.offset)==null?void 0:E[p])||0)+(R?0:S.crossAxis),j=a.reference[p]+a.reference[P]+(R?0:((_=l.offset)==null?void 0:_[p])||0)-(R?S.crossAxis:0);C<A?C=A:C>j&&(C=j)}return{[x]:g,[p]:C}}}},J2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Ci(e,t),h=await ml(t,f),p=Ei(o),x=da(o),g=Gr(o)==="y",{width:C,height:k}=a.floating;let S,E;p==="top"||p==="bottom"?(S=p,E=x===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(E=p,S=x==="end"?"top":"bottom");const _=k-h.top-h.bottom,P=C-h.left-h.right,R=uo(k-h[S],_),A=uo(C-h[E],P),j=!t.middlewareData.shift;let F=R,Z=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(Z=P),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(F=_),j&&!x){const O=Gn(h.left,0),Y=Gn(h.right,0),M=Gn(h.top,0),ne=Gn(h.bottom,0);g?Z=C-2*(O!==0||Y!==0?O+Y:Gn(h.left,h.right)):F=k-2*(M!==0||ne!==0?M+ne:Gn(h.top,h.bottom))}await d({...t,availableWidth:Z,availableHeight:F});const re=await l.getDimensions(u.floating);return C!==re.width||k!==re.height?{reset:{rects:!0}}:{}}}};function fd(){return typeof window<"u"}function fa(e){return Lk(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ti(e){var t;return(t=(Lk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lk(e){return fd()?e instanceof Node||e instanceof Jn(e).Node:!1}function zr(e){return fd()?e instanceof Element||e instanceof Jn(e).Element:!1}function Jr(e){return fd()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function aw(e){return!fd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}const eI=new Set(["inline","contents"]);function Dl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!eI.has(o)}const tI=new Set(["table","td","th"]);function nI(e){return tI.has(fa(e))}const rI=[":popover-open",":modal"];function hd(e){return rI.some(t=>{try{return e.matches(t)}catch{return!1}})}const iI=["transform","translate","scale","rotate","perspective"],oI=["transform","translate","scale","rotate","perspective","filter"],sI=["paint","layout","strict","content"];function Rm(e){const t=Im(),n=zr(e)?Mr(e):e;return iI.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)||oI.some(r=>(n.willChange||"").includes(r))||sI.some(r=>(n.contain||"").includes(r))}function aI(e){let t=co(e);for(;Jr(t)&&!Js(t);){if(Rm(t))return t;if(hd(t))return null;t=co(t)}return null}function Im(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lI=new Set(["html","body","#document"]);function Js(e){return lI.has(fa(e))}function Mr(e){return Jn(e).getComputedStyle(e)}function pd(e){return zr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function co(e){if(fa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||aw(e)&&e.host||ti(e);return aw(t)?t.host:t}function Fk(e){const t=co(e);return Js(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jr(t)&&Dl(t)?t:Fk(t)}function gl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Fk(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),l=Jn(o);if(a){const u=Op(l);return t.concat(l,l.visualViewport||[],Dl(o)?o:[],u&&n?gl(u):[])}return t.concat(o,gl(o,[],n))}function Op(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $k(e){const t=Mr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Jr(e),a=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=Ac(n)!==a||Ac(r)!==l;return u&&(n=a,r=l),{width:n,height:r,$:u}}function Am(e){return zr(e)?e:e.contextElement}function zs(e){const t=Am(e);if(!Jr(t))return Xr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=$k(t);let l=(a?Ac(n.width):n.width)/r,u=(a?Ac(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const uI=Xr(0);function Vk(e){const t=Jn(e);return!Im()||!t.visualViewport?uI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function Zo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Am(e);let l=Xr(1);t&&(r?zr(r)&&(l=zs(r)):l=zs(e));const u=cI(a,n,r)?Vk(a):Xr(0);let d=(o.left+u.x)/l.x,f=(o.top+u.y)/l.y,h=o.width/l.x,p=o.height/l.y;if(a){const x=Jn(a),g=r&&zr(r)?Jn(r):r;let C=x,k=Op(C);for(;k&&r&&g!==C;){const S=zs(k),E=k.getBoundingClientRect(),_=Mr(k),P=E.left+(k.clientLeft+parseFloat(_.paddingLeft))*S.x,R=E.top+(k.clientTop+parseFloat(_.paddingTop))*S.y;d*=S.x,f*=S.y,h*=S.x,p*=S.y,d+=P,f+=R,C=Jn(k),k=Op(C)}}return Dc({width:h,height:p,x:d,y:f})}function md(e,t){const n=pd(e).scrollLeft;return t?t.left+n:Zo(ti(e)).left+n}function Bk(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-md(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function dI(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",l=ti(r),u=t?hd(t.floating):!1;if(r===l||u&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Xr(1);const h=Xr(0),p=Jr(r);if((p||!p&&!a)&&((fa(r)!=="body"||Dl(l))&&(d=pd(r)),Jr(r))){const g=Zo(r);f=zs(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const x=l&&!p&&!a?Bk(l,d):Xr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+x.x,y:n.y*f.y-d.scrollTop*f.y+h.y+x.y}}function fI(e){return Array.from(e.getClientRects())}function hI(e){const t=ti(e),n=pd(e),r=e.ownerDocument.body,o=Gn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Gn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+md(e);const u=-n.scrollTop;return Mr(r).direction==="rtl"&&(l+=Gn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:l,y:u}}const lw=25;function pI(e,t){const n=Jn(e),r=ti(e),o=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,u=0,d=0;if(o){a=o.width,l=o.height;const h=Im();(!h||h&&t==="fixed")&&(u=o.offsetLeft,d=o.offsetTop)}const f=md(r);if(f<=0){const h=r.ownerDocument,p=h.body,x=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,C=Math.abs(r.clientWidth-p.clientWidth-g);C<=lw&&(a-=C)}else f<=lw&&(a+=f);return{width:a,height:l,x:u,y:d}}const mI=new Set(["absolute","fixed"]);function gI(e,t){const n=Zo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Jr(e)?zs(e):Xr(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:l,height:u,x:d,y:f}}function uw(e,t,n){let r;if(t==="viewport")r=pI(e,n);else if(t==="document")r=hI(ti(e));else if(zr(t))r=gI(t,n);else{const o=Vk(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dc(r)}function Uk(e,t){const n=co(e);return n===t||!zr(n)||Js(n)?!1:Mr(n).position==="fixed"||Uk(n,t)}function yI(e,t){const n=t.get(e);if(n)return n;let r=gl(e,[],!1).filter(u=>zr(u)&&fa(u)!=="body"),o=null;const a=Mr(e).position==="fixed";let l=a?co(e):e;for(;zr(l)&&!Js(l);){const u=Mr(l),d=Rm(l);!d&&u.position==="fixed"&&(o=null),(a?!d&&!o:!d&&u.position==="static"&&!!o&&mI.has(o.position)||Dl(l)&&!d&&Uk(e,l))?r=r.filter(h=>h!==l):o=u,l=co(l)}return t.set(e,r),r}function vI(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?hd(t)?[]:yI(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,h)=>{const p=uw(t,h,o);return f.top=Gn(p.top,f.top),f.right=uo(p.right,f.right),f.bottom=uo(p.bottom,f.bottom),f.left=Gn(p.left,f.left),f},uw(t,u,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function xI(e){const{width:t,height:n}=$k(e);return{width:t,height:n}}function wI(e,t,n){const r=Jr(t),o=ti(t),a=n==="fixed",l=Zo(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const d=Xr(0);function f(){d.x=md(o)}if(r||!r&&!a)if((fa(t)!=="body"||Dl(o))&&(u=pd(t)),r){const g=Zo(t,!0,a,t);d.x=g.x+t.clientLeft,d.y=g.y+t.clientTop}else o&&f();a&&!r&&o&&f();const h=o&&!r&&!a?Bk(o,u):Xr(0),p=l.left+u.scrollLeft-d.x-h.x,x=l.top+u.scrollTop-d.y-h.y;return{x:p,y:x,width:l.width,height:l.height}}function Mh(e){return Mr(e).position==="static"}function cw(e,t){if(!Jr(e)||Mr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ti(e)===n&&(n=n.ownerDocument.body),n}function Hk(e,t){const n=Jn(e);if(hd(e))return n;if(!Jr(e)){let o=co(e);for(;o&&!Js(o);){if(zr(o)&&!Mh(o))return o;o=co(o)}return n}let r=cw(e,t);for(;r&&nI(r)&&Mh(r);)r=cw(r,t);return r&&Js(r)&&Mh(r)&&!Rm(r)?n:r||aI(e)||n}const bI=async function(e){const t=this.getOffsetParent||Hk,n=this.getDimensions,r=await n(e.floating);return{reference:wI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kI(e){return Mr(e).direction==="rtl"}const SI={convertOffsetParentRelativeRectToViewportRelativeRect:dI,getDocumentElement:ti,getClippingRect:vI,getOffsetParent:Hk,getElementRects:bI,getClientRects:fI,getDimensions:xI,getScale:zs,isElement:zr,isRTL:kI};function Wk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CI(e,t){let n=null,r;const o=ti(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:h,top:p,width:x,height:g}=f;if(u||t(),!x||!g)return;const C=ic(p),k=ic(o.clientWidth-(h+x)),S=ic(o.clientHeight-(p+g)),E=ic(h),P={rootMargin:-C+"px "+-k+"px "+-S+"px "+-E+"px",threshold:Gn(0,uo(1,d))||1};let R=!0;function A(j){const F=j[0].intersectionRatio;if(F!==d){if(!R)return l();F?l(!1,F):r=setTimeout(()=>{l(!1,1e-7)},1e3)}F===1&&!Wk(f,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(A,{...P,root:o.ownerDocument})}catch{n=new IntersectionObserver(A,P)}n.observe(e)}return l(!0),a}function EI(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Am(e),h=o||a?[...f?gl(f):[],...gl(t)]:[];h.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const p=f&&u?CI(f,n):null;let x=-1,g=null;l&&(g=new ResizeObserver(E=>{let[_]=E;_&&_.target===f&&g&&(g.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var P;(P=g)==null||P.observe(t)})),n()}),f&&!d&&g.observe(f),g.observe(t));let C,k=d?Zo(e):null;d&&S();function S(){const E=Zo(e);k&&!Wk(k,E)&&n(),k=E,C=requestAnimationFrame(S)}return n(),()=>{var E;h.forEach(_=>{o&&_.removeEventListener("scroll",n),a&&_.removeEventListener("resize",n)}),p==null||p(),(E=g)==null||E.disconnect(),g=null,d&&cancelAnimationFrame(C)}}const _I=K2,TI=G2,PI=q2,NI=J2,jI=Q2,dw=Z2,RI=X2,II=(e,t,n)=>{const r=new Map,o={platform:SI,...n},a={...o.platform,_c:r};return W2(e,t,{...o,platform:a})};var AI=typeof document<"u",OI=function(){},kc=AI?b.useLayoutEffect:OI;function zc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!zc(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Zk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fw(e,t){const n=Zk(e);return Math.round(t*n)/n}function Lh(e){const t=b.useRef(e);return kc(()=>{t.current=e}),t}function DI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[h,p]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,g]=b.useState(r);zc(x,r)||g(r);const[C,k]=b.useState(null),[S,E]=b.useState(null),_=b.useCallback(D=>{D!==j.current&&(j.current=D,k(D))},[]),P=b.useCallback(D=>{D!==F.current&&(F.current=D,E(D))},[]),R=a||C,A=l||S,j=b.useRef(null),F=b.useRef(null),Z=b.useRef(h),re=d!=null,O=Lh(d),Y=Lh(o),M=Lh(f),ne=b.useCallback(()=>{if(!j.current||!F.current)return;const D={placement:t,strategy:n,middleware:x};Y.current&&(D.platform=Y.current),II(j.current,F.current,D).then(G=>{const N={...G,isPositioned:M.current!==!1};W.current&&!zc(Z.current,N)&&(Z.current=N,Il.flushSync(()=>{p(N)}))})},[x,t,n,Y,M]);kc(()=>{f===!1&&Z.current.isPositioned&&(Z.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[f]);const W=b.useRef(!1);kc(()=>(W.current=!0,()=>{W.current=!1}),[]),kc(()=>{if(R&&(j.current=R),A&&(F.current=A),R&&A){if(O.current)return O.current(R,A,ne);ne()}},[R,A,ne,O,re]);const U=b.useMemo(()=>({reference:j,floating:F,setReference:_,setFloating:P}),[_,P]),Q=b.useMemo(()=>({reference:R,floating:A}),[R,A]),J=b.useMemo(()=>{const D={position:n,left:0,top:0};if(!Q.floating)return D;const G=fw(Q.floating,h.x),N=fw(Q.floating,h.y);return u?{...D,transform:"translate("+G+"px, "+N+"px)",...Zk(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:N}},[n,u,Q.floating,h.x,h.y]);return b.useMemo(()=>({...h,update:ne,refs:U,elements:Q,floatingStyles:J}),[h,ne,U,Q,J])}const zI=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?dw({element:r.current,padding:o}).fn(n):{}:r?dw({element:r,padding:o}).fn(n):{}}}},MI=(e,t)=>({..._I(e),options:[e,t]}),LI=(e,t)=>({...TI(e),options:[e,t]}),FI=(e,t)=>({...RI(e),options:[e,t]}),$I=(e,t)=>({...PI(e),options:[e,t]}),VI=(e,t)=>({...NI(e),options:[e,t]}),BI=(e,t)=>({...jI(e),options:[e,t]}),UI=(e,t)=>({...zI(e),options:[e,t]});var HI="Arrow",qk=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return y.jsx(tt.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});qk.displayName=HI;var WI=qk;function ZI(e){const[t,n]=b.useState(void 0);return rn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,u;if("borderBoxSize"in a){const d=a.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Om="Popper",[Qk,gd]=ca(Om),[qI,Yk]=Qk(Om),Kk=e=>{const{__scopePopper:t,children:n}=e,[r,o]=b.useState(null);return y.jsx(qI,{scope:t,anchor:r,onAnchorChange:o,children:n})};Kk.displayName=Om;var Gk="PopperAnchor",Xk=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Yk(Gk,n),l=b.useRef(null),u=ct(t,l),d=b.useRef(null);return b.useEffect(()=>{const f=d.current;d.current=(r==null?void 0:r.current)||l.current,f!==d.current&&a.onAnchorChange(d.current)}),r?null:y.jsx(tt.div,{...o,ref:u})});Xk.displayName=Gk;var Dm="PopperContent",[QI,YI]=Qk(Dm),Jk=b.forwardRef((e,t)=>{var ie,me,Se,be,Ae,Ve;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:x=!1,updatePositionStrategy:g="optimized",onPlaced:C,...k}=e,S=Yk(Dm,n),[E,_]=b.useState(null),P=ct(t,nt=>_(nt)),[R,A]=b.useState(null),j=ZI(R),F=(j==null?void 0:j.width)??0,Z=(j==null?void 0:j.height)??0,re=r+(a!=="center"?"-"+a:""),O=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},Y=Array.isArray(f)?f:[f],M=Y.length>0,ne={padding:O,boundary:Y.filter(GI),altBoundary:M},{refs:W,floatingStyles:U,placement:Q,isPositioned:J,middlewareData:D}=DI({strategy:"fixed",placement:re,whileElementsMounted:(...nt)=>EI(...nt,{animationFrame:g==="always"}),elements:{reference:S.anchor},middleware:[MI({mainAxis:o+Z,alignmentAxis:l}),d&&LI({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?FI():void 0,...ne}),d&&$I({...ne}),VI({...ne,apply:({elements:nt,rects:It,availableWidth:sn,availableHeight:Gt})=>{const{width:an,height:tr}=It.reference,_n=nt.floating.style;_n.setProperty("--radix-popper-available-width",`${sn}px`),_n.setProperty("--radix-popper-available-height",`${Gt}px`),_n.setProperty("--radix-popper-anchor-width",`${an}px`),_n.setProperty("--radix-popper-anchor-height",`${tr}px`)}}),R&&UI({element:R,padding:u}),XI({arrowWidth:F,arrowHeight:Z}),x&&BI({strategy:"referenceHidden",...ne})]}),[G,N]=n1(Q),L=Bn(C);rn(()=>{J&&(L==null||L())},[J,L]);const K=(ie=D.arrow)==null?void 0:ie.x,I=(me=D.arrow)==null?void 0:me.y,ue=((Se=D.arrow)==null?void 0:Se.centerOffset)!==0,[ve,xe]=b.useState();return rn(()=>{E&&xe(window.getComputedStyle(E).zIndex)},[E]),y.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:J?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(be=D.transformOrigin)==null?void 0:be.x,(Ae=D.transformOrigin)==null?void 0:Ae.y].join(" "),...((Ve=D.hide)==null?void 0:Ve.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(QI,{scope:n,placedSide:G,onArrowChange:A,arrowX:K,arrowY:I,shouldHideArrow:ue,children:y.jsx(tt.div,{"data-side":G,"data-align":N,...k,ref:P,style:{...k.style,animation:J?void 0:"none"}})})})});Jk.displayName=Dm;var e1="PopperArrow",KI={top:"bottom",right:"left",bottom:"top",left:"right"},t1=b.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=YI(e1,r),l=KI[a.placedSide];return y.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:y.jsx(WI,{...o,ref:n,style:{...o.style,display:"block"}})})});t1.displayName=e1;function GI(e){return e!==null}var XI=e=>({name:"transformOrigin",options:e,fn(t){var S,E,_;const{placement:n,rects:r,middlewareData:o}=t,l=((S=o.arrow)==null?void 0:S.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,h]=n1(n),p={start:"0%",center:"50%",end:"100%"}[h],x=(((E=o.arrow)==null?void 0:E.x)??0)+u/2,g=(((_=o.arrow)==null?void 0:_.y)??0)+d/2;let C="",k="";return f==="bottom"?(C=l?p:`${x}px`,k=`${-d}px`):f==="top"?(C=l?p:`${x}px`,k=`${r.floating.height+d}px`):f==="right"?(C=`${-d}px`,k=l?p:`${g}px`):f==="left"&&(C=`${r.floating.width+d}px`,k=l?p:`${g}px`),{data:{x:C,y:k}}}});function n1(e){const[t,n="center"]=e.split("-");return[t,n]}var r1=Kk,i1=Xk,o1=Jk,s1=t1,JI="Portal",yd=b.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,a]=b.useState(!1);rn(()=>a(!0),[]);const l=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?qb.createPortal(y.jsx(tt.div,{...r,ref:t}),l):null});yd.displayName=JI;function eA(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var ni=e=>{const{present:t,children:n}=e,r=tA(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),a=ct(r.ref,nA(o));return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:a}):null};ni.displayName="Presence";function tA(e){const[t,n]=b.useState(),r=b.useRef(null),o=b.useRef(e),a=b.useRef("none"),l=e?"mounted":"unmounted",[u,d]=eA(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const f=oc(r.current);a.current=u==="mounted"?f:"none"},[u]),rn(()=>{const f=r.current,h=o.current;if(h!==e){const x=a.current,g=oc(f);e?d("MOUNT"):g==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(h&&x!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),rn(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,p=g=>{const k=oc(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&k&&(d("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=g=>{g.target===t&&(a.current=oc(r.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:b.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function oc(e){return(e==null?void 0:e.animationName)||"none"}function nA(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rA=Symbol("radix.slottable");function iA(e){const t=({children:n})=>y.jsx(y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=rA,t}var oA=hm[" useInsertionEffect ".trim().toString()]||rn;function Mc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,l]=sA({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:o;{const h=b.useRef(e!==void 0);b.useEffect(()=>{const p=h.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"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.`),h.current=u},[u,r])}const f=b.useCallback(h=>{var p;if(u){const x=aA(h)?h(e):h;x!==e&&((p=l.current)==null||p.call(l,x))}else a(h)},[u,e,a,l]);return[d,f]}function sA({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),o=b.useRef(n),a=b.useRef(t);return oA(()=>{a.current=t},[t]),b.useEffect(()=>{var l;o.current!==n&&((l=a.current)==null||l.call(a,n),o.current=n)},[n,o]),[n,r,a]}function aA(e){return typeof e=="function"}var a1=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"}),lA="VisuallyHidden",l1=b.forwardRef((e,t)=>y.jsx(tt.span,{...e,ref:t,style:{...a1,...e.style}}));l1.displayName=lA;var uA=l1,[vd]=ca("Tooltip",[gd]),xd=gd(),u1="TooltipProvider",cA=700,Dp="tooltip.open",[dA,zm]=vd(u1),c1=e=>{const{__scopeTooltip:t,delayDuration:n=cA,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,l=b.useRef(!0),u=b.useRef(!1),d=b.useRef(0);return b.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),y.jsx(dA,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:b.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})};c1.displayName=u1;var yl="Tooltip",[fA,zl]=vd(yl),d1=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:l,delayDuration:u}=e,d=zm(yl,e.__scopeTooltip),f=xd(t),[h,p]=b.useState(null),x=Uo(),g=b.useRef(0),C=l??d.disableHoverableContent,k=u??d.delayDuration,S=b.useRef(!1),[E,_]=Mc({prop:r,defaultProp:o??!1,onChange:F=>{F?(d.onOpen(),document.dispatchEvent(new CustomEvent(Dp))):d.onClose(),a==null||a(F)},caller:yl}),P=b.useMemo(()=>E?S.current?"delayed-open":"instant-open":"closed",[E]),R=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,S.current=!1,_(!0)},[_]),A=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_(!1)},[_]),j=b.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{S.current=!0,_(!0),g.current=0},k)},[k,_]);return b.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),y.jsx(r1,{...f,children:y.jsx(fA,{scope:t,contentId:x,open:E,stateAttribute:P,trigger:h,onTriggerChange:p,onTriggerEnter:b.useCallback(()=>{d.isOpenDelayedRef.current?j():R()},[d.isOpenDelayedRef,j,R]),onTriggerLeave:b.useCallback(()=>{C?A():(window.clearTimeout(g.current),g.current=0)},[A,C]),onOpen:R,onClose:A,disableHoverableContent:C,children:n})})};d1.displayName=yl;var zp="TooltipTrigger",f1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zl(zp,n),a=zm(zp,n),l=xd(n),u=b.useRef(null),d=ct(t,u,o.onTriggerChange),f=b.useRef(!1),h=b.useRef(!1),p=b.useCallback(()=>f.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),y.jsx(i1,{asChild:!0,...l,children:y.jsx(tt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:Ye(e.onPointerMove,x=>{x.pointerType!=="touch"&&!h.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),h.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{o.onTriggerLeave(),h.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Ye(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:Ye(e.onBlur,o.onClose),onClick:Ye(e.onClick,o.onClose)})})});f1.displayName=zp;var Mm="TooltipPortal",[hA,pA]=vd(Mm,{forceMount:void 0}),h1=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=zl(Mm,t);return y.jsx(hA,{scope:t,forceMount:n,children:y.jsx(ni,{present:n||a.open,children:y.jsx(yd,{asChild:!0,container:o,children:r})})})};h1.displayName=Mm;var ea="TooltipContent",p1=b.forwardRef((e,t)=>{const n=pA(ea,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,l=zl(ea,e.__scopeTooltip);return y.jsx(ni,{present:r||l.open,children:l.disableHoverableContent?y.jsx(m1,{side:o,...a,ref:t}):y.jsx(mA,{side:o,...a,ref:t})})}),mA=b.forwardRef((e,t)=>{const n=zl(ea,e.__scopeTooltip),r=zm(ea,e.__scopeTooltip),o=b.useRef(null),a=ct(t,o),[l,u]=b.useState(null),{trigger:d,onClose:f}=n,h=o.current,{onPointerInTransitChange:p}=r,x=b.useCallback(()=>{u(null),p(!1)},[p]),g=b.useCallback((C,k)=>{const S=C.currentTarget,E={x:C.clientX,y:C.clientY},_=xA(E,S.getBoundingClientRect()),P=wA(E,_),R=bA(k.getBoundingClientRect()),A=SA([...P,...R]);u(A),p(!0)},[p]);return b.useEffect(()=>()=>x(),[x]),b.useEffect(()=>{if(d&&h){const C=S=>g(S,h),k=S=>g(S,d);return d.addEventListener("pointerleave",C),h.addEventListener("pointerleave",k),()=>{d.removeEventListener("pointerleave",C),h.removeEventListener("pointerleave",k)}}},[d,h,g,x]),b.useEffect(()=>{if(l){const C=k=>{const S=k.target,E={x:k.clientX,y:k.clientY},_=(d==null?void 0:d.contains(S))||(h==null?void 0:h.contains(S)),P=!kA(E,l);_?x():P&&(x(),f())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[d,h,l,f,x]),y.jsx(m1,{...e,ref:a})}),[gA,yA]=vd(yl,{isInside:!1}),vA=iA("TooltipContent"),m1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=e,d=zl(ea,n),f=xd(n),{onClose:h}=d;return b.useEffect(()=>(document.addEventListener(Dp,h),()=>document.removeEventListener(Dp,h)),[h]),b.useEffect(()=>{if(d.trigger){const p=x=>{const g=x.target;g!=null&&g.contains(d.trigger)&&h()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,h]),y.jsx(dd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:h,children:y.jsxs(o1,{"data-state":d.stateAttribute,...f,...u,ref:t,style:{...u.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:[y.jsx(vA,{children:r}),y.jsx(gA,{scope:n,isInside:!0,children:y.jsx(uA,{id:d.contentId,role:"tooltip",children:o||r})})]})})});p1.displayName=ea;var g1="TooltipArrow",y1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xd(n);return yA(g1,n).isInside?null:y.jsx(s1,{...o,...r,ref:t})});y1.displayName=g1;function xA(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function wA(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 bA(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function kA(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],d=t[l],f=u.x,h=u.y,p=d.x,x=d.y;h>r!=x>r&&n<(p-f)*(r-h)/(x-h)+f&&(o=!o)}return o}function SA(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),CA(t)}function CA(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],l=t[t.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],l=n[n.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}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 EA=c1,_A=d1,TA=f1,PA=h1,NA=p1,jA=y1;function RA({delayDuration:e=0,...t}){return y.jsx(EA,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function IA({...e}){return y.jsx(_A,{"data-slot":"tooltip",...e})}function AA({...e}){return y.jsx(TA,{"data-slot":"tooltip-trigger",...e})}function OA({className:e,sideOffset:t=0,children:n,...r}){return y.jsx(PA,{children:y.jsxs(NA,{"data-slot":"tooltip-content",sideOffset:t,className:Be("bg-foreground text-background 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,y.jsx(jA,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function vl(){return typeof window<"u"&&"Notification"in window}function DA(){return vl()?Notification.permission:"denied"}async function zA(){return vl()?Notification.requestPermission():"denied"}function MA(e){if(!vl()||Notification.permission!=="granted")return null;const t=new Notification(e.title,{body:e.body,icon:e.icon,tag:e.tag});return e.onClick&&(t.onclick=()=>{var n;window.focus(),(n=e.onClick)==null||n.call(e),t.close()}),t}function LA(){const[e,t]=b.useState(!1),[n,r]=b.useState("default");if(b.useEffect(()=>{t(!0),vl()&&r(DA())},[]),!e)return y.jsx(it,{variant:"outline",size:"icon",disabled:!0,children:y.jsx(Hx,{className:"h-4 w-4"})});if(!vl())return null;const o=async()=>{if(n==="granted")return;const u=await zA();r(u)},a=()=>{switch(n){case"granted":return y.jsx(Pj,{className:"h-4 w-4"});case"denied":return y.jsx(_j,{className:"h-4 w-4"});default:return y.jsx(Hx,{className:"h-4 w-4"})}},l=()=>{switch(n){case"granted":return"Browser notifications enabled. You'll be notified of task and epic changes.";case"denied":return"Notifications blocked. Enable in browser settings.";default:return"Click to enable browser notifications"}};return y.jsxs(IA,{children:[y.jsx(AA,{asChild:!0,children:y.jsxs(it,{variant:"outline",size:"icon",onClick:o,disabled:n==="denied",children:[a(),y.jsx("span",{className:"sr-only",children:l()})]})}),y.jsx(OA,{sideOffset:8,children:y.jsx("p",{children:l()})})]})}const FA=[{to:"/",label:"Kanban",icon:Uj},{to:"/list",label:"List",icon:Zj},{to:"/history",label:"History",icon:hk}];function $A({projectName:e,onNewClick:t}){return y.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2 bg-accent/50",children:[y.jsxs("div",{className:"flex items-center gap-6",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Fj,{}),y.jsx("h1",{className:"text-lg font-bold",children:"trekker"})]}),y.jsx("nav",{className:"flex items-center gap-1",children:FA.map(({to:n,label:r,icon:o})=>y.jsxs(Wb,{to:n,end:n==="/",className:({isActive:a})=>Be("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"),children:[y.jsx(o,{className:"h-4 w-4"}),r]},n))})]}),y.jsxs("div",{className:"flex gap-6",children:[e&&y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(Xj,{className:"text-muted-foreground",width:16}),y.jsx("span",{className:"text-sm text-muted-foreground",children:e})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[t&&y.jsxs(it,{size:"sm",onClick:t,children:[y.jsx(ud,{className:"mr-1 h-4 w-4"}),"New"]}),y.jsx(LA,{}),y.jsx(h2,{})]})]})]})}const VA={connected:{color:"bg-green-500",label:"Connected to live updates"},connecting:{color:"bg-yellow-500",label:"Connecting..."},disconnected:{color:"bg-red-500",label:"Disconnected"}};function BA({status:e}){const t=VA[e];return y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:Be("h-2 w-2 rounded-full",t.color)}),y.jsx("span",{className:"text-xs text-muted-foreground",children:t.label})]})}var Fh="focusScope.autoFocusOnMount",$h="focusScope.autoFocusOnUnmount",hw={bubbles:!1,cancelable:!0},UA="FocusScope",Lm=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[u,d]=b.useState(null),f=Bn(o),h=Bn(a),p=b.useRef(null),x=ct(t,k=>d(k)),g=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let k=function(P){if(g.paused||!u)return;const R=P.target;u.contains(R)?p.current=R:Gi(p.current,{select:!0})},S=function(P){if(g.paused||!u)return;const R=P.relatedTarget;R!==null&&(u.contains(R)||Gi(p.current,{select:!0}))},E=function(P){if(document.activeElement===document.body)for(const A of P)A.removedNodes.length>0&&Gi(u)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const _=new MutationObserver(E);return u&&_.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),_.disconnect()}}},[r,u,g.paused]),b.useEffect(()=>{if(u){mw.add(g);const k=document.activeElement;if(!u.contains(k)){const E=new CustomEvent(Fh,hw);u.addEventListener(Fh,f),u.dispatchEvent(E),E.defaultPrevented||(HA(YA(v1(u)),{select:!0}),document.activeElement===k&&Gi(u))}return()=>{u.removeEventListener(Fh,f),setTimeout(()=>{const E=new CustomEvent($h,hw);u.addEventListener($h,h),u.dispatchEvent(E),E.defaultPrevented||Gi(k??document.body,{select:!0}),u.removeEventListener($h,h),mw.remove(g)},0)}}},[u,f,h,g]);const C=b.useCallback(k=>{if(!n&&!r||g.paused)return;const S=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,E=document.activeElement;if(S&&E){const _=k.currentTarget,[P,R]=WA(_);P&&R?!k.shiftKey&&E===R?(k.preventDefault(),n&&Gi(P,{select:!0})):k.shiftKey&&E===P&&(k.preventDefault(),n&&Gi(R,{select:!0})):E===_&&k.preventDefault()}},[n,r,g.paused]);return y.jsx(tt.div,{tabIndex:-1,...l,ref:x,onKeyDown:C})});Lm.displayName=UA;function HA(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gi(r,{select:t}),document.activeElement!==n)return}function WA(e){const t=v1(e),n=pw(t,e),r=pw(t.reverse(),e);return[n,r]}function v1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pw(e,t){for(const n of e)if(!ZA(n,{upTo:t}))return n}function ZA(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 qA(e){return e instanceof HTMLInputElement&&"select"in e}function Gi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&qA(e)&&t&&e.select()}}var mw=QA();function QA(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=gw(e,t),e.unshift(t)},remove(t){var n;e=gw(e,t),(n=e[0])==null||n.resume()}}}function gw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function YA(e){return e.filter(t=>t.tagName!=="A")}var Vh=0;function x1(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??yw()),document.body.insertAdjacentElement("beforeend",e[1]??yw()),Vh++,()=>{Vh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vh--}},[])}function yw(){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 Kr=function(){return Kr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Kr.apply(this,arguments)};function w1(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function KA(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Sc="right-scroll-bar-position",Cc="width-before-scroll-bar",GA="with-scroll-bars-hidden",XA="--removed-body-scroll-bar-size";function Bh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function JA(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var eO=typeof window<"u"?b.useLayoutEffect:b.useEffect,vw=new WeakMap;function tO(e,t){var n=JA(null,function(r){return e.forEach(function(o){return Bh(o,r)})});return eO(function(){var r=vw.get(n);if(r){var o=new Set(r),a=new Set(e),l=n.current;o.forEach(function(u){a.has(u)||Bh(u,null)}),a.forEach(function(u){o.has(u)||Bh(u,l)})}vw.set(n,e)},[e]),n}function nO(e){return e}function rO(e,t){t===void 0&&(t=nO);var n=[],r=!1,o={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(a){var l=t(a,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(a){for(r=!0;n.length;){var l=n;n=[],l.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(a),l=n}var d=function(){var h=l;l=[],h.forEach(a)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(h){l.push(h),f()},filter:function(h){return l=l.filter(h),n}}}};return o}function iO(e){e===void 0&&(e={});var t=rO(null);return t.options=Kr({async:!0,ssr:!1},e),t}var b1=function(e){var t=e.sideCar,n=w1(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 b.createElement(r,Kr({},n))};b1.isSideCarExport=!0;function oO(e,t){return e.useMedium(t),b1}var k1=iO(),Uh=function(){},wd=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Uh,onWheelCapture:Uh,onTouchMoveCapture:Uh}),o=r[0],a=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,h=e.enabled,p=e.shards,x=e.sideCar,g=e.noRelative,C=e.noIsolation,k=e.inert,S=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,P=e.gapMode,R=w1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=x,j=tO([n,t]),F=Kr(Kr({},R),o);return b.createElement(b.Fragment,null,h&&b.createElement(A,{sideCar:k1,removeScrollBar:f,shards:p,noRelative:g,noIsolation:C,inert:k,setCallbacks:a,allowPinchZoom:!!S,lockRef:n,gapMode:P}),l?b.cloneElement(b.Children.only(u),Kr(Kr({},F),{ref:j})):b.createElement(_,Kr({},F,{className:d,ref:j}),u))});wd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wd.classNames={fullWidth:Cc,zeroRight:Sc};var sO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sO();return t&&e.setAttribute("nonce",t),e}function lO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function uO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=aO())&&(lO(t,n),uO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dO=function(){var e=cO();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},S1=function(){var e=dO(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},fO={left:0,top:0,right:0,gap:0},Hh=function(e){return parseInt(e||"",10)||0},hO=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Hh(n),Hh(r),Hh(o)]},pO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fO;var t=hO(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])}},mO=S1(),Ms="data-scroll-locked",gO=function(e,t,n,r){var o=e.left,a=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
227
|
+
.`.concat(GA,` {
|
|
228
228
|
overflow: hidden `).concat(r,`;
|
|
229
229
|
padding-right: `).concat(u,"px ").concat(r,`;
|
|
230
230
|
}
|
|
@@ -258,18 +258,18 @@ Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
body[`).concat(Ms,`] {
|
|
261
|
-
`).concat(
|
|
261
|
+
`).concat(XA,": ").concat(u,`px;
|
|
262
262
|
}
|
|
263
|
-
`)},
|
|
263
|
+
`)},xw=function(){var e=parseInt(document.body.getAttribute(Ms)||"0",10);return isFinite(e)?e:0},yO=function(){b.useEffect(function(){return document.body.setAttribute(Ms,(xw()+1).toString()),function(){var e=xw()-1;e<=0?document.body.removeAttribute(Ms):document.body.setAttribute(Ms,e.toString())}},[])},vO=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;yO();var a=b.useMemo(function(){return pO(o)},[o]);return b.createElement(mO,{styles:gO(a,!t,o,n?"":"!important")})},Mp=!1;if(typeof window<"u")try{var sc=Object.defineProperty({},"passive",{get:function(){return Mp=!0,!0}});window.addEventListener("test",sc,sc),window.removeEventListener("test",sc,sc)}catch{Mp=!1}var Ts=Mp?{passive:!1}:!1,xO=function(e){return e.tagName==="TEXTAREA"},C1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!xO(e)&&n[t]==="visible")},wO=function(e){return C1(e,"overflowY")},bO=function(e){return C1(e,"overflowX")},ww=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=E1(e,r);if(o){var a=_1(e,r),l=a[1],u=a[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kO=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},SO=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},E1=function(e,t){return e==="v"?wO(t):bO(t)},_1=function(e,t){return e==="v"?kO(t):SO(t)},CO=function(e,t){return e==="h"&&t==="rtl"?-1:1},EO=function(e,t,n,r,o){var a=CO(e,window.getComputedStyle(t).direction),l=a*r,u=n.target,d=t.contains(u),f=!1,h=l>0,p=0,x=0;do{if(!u)break;var g=_1(e,u),C=g[0],k=g[1],S=g[2],E=k-S-a*C;(C||E)&&E1(e,u)&&(p+=E,x+=C);var _=u.parentNode;u=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(h&&Math.abs(p)<1||!h&&Math.abs(x)<1)&&(f=!0),f},ac=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bw=function(e){return[e.deltaX,e.deltaY]},kw=function(e){return e&&"current"in e?e.current:e},_O=function(e,t){return e[0]===t[0]&&e[1]===t[1]},TO=function(e){return`
|
|
264
264
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
265
265
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
266
|
-
`)},NO=0,Ps=[];function jO(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(NO++)[0],a=b.useState(C1)[0],l=b.useRef(e);b.useEffect(function(){l.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var k=GA([e.lockRef.current],(e.shards||[]).map(Sw),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=b.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!l.current.allowPinchZoom;var E=ac(k),_=n.current,P="deltaX"in k?k.deltaX:_[0]-E[0],R="deltaY"in k?k.deltaY:_[1]-E[1],A,j=k.target,F=Math.abs(P)>Math.abs(R)?"h":"v";if("touches"in k&&F==="h"&&j.type==="range")return!1;var Z=window.getSelection(),re=Z&&Z.anchorNode,O=re?re===j||re.contains(j):!1;if(O)return!1;var Y=bw(F,j);if(!Y)return!0;if(Y?A=F:(A=F==="v"?"h":"v",Y=bw(F,j)),!Y)return!1;if(!r.current&&"changedTouches"in k&&(P||R)&&(r.current=A),!A)return!0;var M=r.current||A;return _O(M,S,k,M==="h"?P:R)},[]),d=b.useCallback(function(k){var S=k;if(!(!Ps.length||Ps[Ps.length-1]!==a)){var E="deltaY"in S?kw(S):ac(S),_=t.current.filter(function(A){return A.name===S.type&&(A.target===S.target||S.target===A.shadowParent)&&TO(A.delta,E)})[0];if(_&&_.should){S.cancelable&&S.preventDefault();return}if(!_){var P=(l.current.shards||[]).map(Sw).filter(Boolean).filter(function(A){return A.contains(S.target)}),R=P.length>0?u(S,P[0]):!l.current.noIsolation;R&&S.cancelable&&S.preventDefault()}}},[]),f=b.useCallback(function(k,S,E,_){var P={name:k,delta:S,target:E,should:_,shadowParent:RO(E)};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(R){return R!==P})},1)},[]),h=b.useCallback(function(k){n.current=ac(k),r.current=void 0},[]),p=b.useCallback(function(k){f(k.type,kw(k),k.target,u(k,e.lockRef.current))},[]),x=b.useCallback(function(k){f(k.type,ac(k),k.target,u(k,e.lockRef.current))},[]);b.useEffect(function(){return Ps.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:x}),document.addEventListener("wheel",d,Ts),document.addEventListener("touchmove",d,Ts),document.addEventListener("touchstart",h,Ts),function(){Ps=Ps.filter(function(k){return k!==a}),document.removeEventListener("wheel",d,Ts),document.removeEventListener("touchmove",d,Ts),document.removeEventListener("touchstart",h,Ts)}},[]);var g=e.removeScrollBar,C=e.inert;return b.createElement(b.Fragment,null,C?b.createElement(a,{styles:PO(o)}):null,g?b.createElement(xO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function RO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const IO=sO(S1,jO);var Fm=b.forwardRef(function(e,t){return b.createElement(wd,Kr({},e,{ref:t,sideCar:IO}))});Fm.classNames=wd.classNames;var AO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ns=new WeakMap,lc=new WeakMap,uc={},Wh=0,P1=function(e){return e&&(e.host||P1(e.parentNode))},OO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=P1(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})},DO=function(e,t,n,r){var o=OO(t,Array.isArray(e)?e:[e]);uc[n]||(uc[n]=new WeakMap);var a=uc[n],l=[],u=new Set,d=new Set(o),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};o.forEach(f);var h=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(x){if(u.has(x))h(x);else try{var g=x.getAttribute(r),C=g!==null&&g!=="false",k=(Ns.get(x)||0)+1,S=(a.get(x)||0)+1;Ns.set(x,k),a.set(x,S),l.push(x),k===1&&C&&lc.set(x,!0),S===1&&x.setAttribute(n,"true"),C||x.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",x,E)}})};return h(t),u.clear(),Wh++,function(){l.forEach(function(p){var x=Ns.get(p)-1,g=a.get(p)-1;Ns.set(p,x),a.set(p,g),x||(lc.has(p)||p.removeAttribute(r),lc.delete(p)),g||p.removeAttribute(n)}),Wh--,Wh||(Ns=new WeakMap,Ns=new WeakMap,lc=new WeakMap,uc={})}},N1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=AO(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),DO(r,o,n,"aria-hidden")):function(){return null}};function zO(e){const t=MO(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(FO);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function MO(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=VO(o),u=$O(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var LO=Symbol("radix.slottable");function FO(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LO}function $O(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function VO(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bd="Dialog",[j1]=ca(bd),[BO,Lr]=j1(bd),R1=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,u=b.useRef(null),d=b.useRef(null),[f,h]=Mc({prop:r,defaultProp:o??!1,onChange:a,caller:bd});return y.jsx(BO,{scope:t,triggerRef:u,contentRef:d,contentId:Uo(),titleId:Uo(),descriptionId:Uo(),open:f,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),modal:l,children:n})};R1.displayName=bd;var I1="DialogTrigger",UO=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr(I1,n),a=ct(t,o.triggerRef);return y.jsx(tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Bm(o.open),...r,ref:a,onClick:Ye(e.onClick,o.onOpenToggle)})});UO.displayName=I1;var $m="DialogPortal",[HO,A1]=j1($m,{forceMount:void 0}),O1=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Lr($m,t);return y.jsx(HO,{scope:t,forceMount:n,children:b.Children.map(r,l=>y.jsx(ni,{present:n||a.open,children:y.jsx(yd,{asChild:!0,container:o,children:l})}))})};O1.displayName=$m;var Lc="DialogOverlay",D1=b.forwardRef((e,t)=>{const n=A1(Lc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Lr(Lc,e.__scopeDialog);return a.modal?y.jsx(ni,{present:r||a.open,children:y.jsx(ZO,{...o,ref:t})}):null});D1.displayName=Lc;var WO=zO("DialogOverlay.RemoveScroll"),ZO=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr(Lc,n);return y.jsx(Fm,{as:WO,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(tt.div,{"data-state":Bm(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),qo="DialogContent",z1=b.forwardRef((e,t)=>{const n=A1(qo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Lr(qo,e.__scopeDialog);return y.jsx(ni,{present:r||a.open,children:a.modal?y.jsx(qO,{...o,ref:t}):y.jsx(QO,{...o,ref:t})})});z1.displayName=qo;var qO=b.forwardRef((e,t)=>{const n=Lr(qo,e.__scopeDialog),r=b.useRef(null),o=ct(t,n.contentRef,r);return b.useEffect(()=>{const a=r.current;if(a)return N1(a)},[]),y.jsx(M1,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&a.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault())})}),QO=b.forwardRef((e,t)=>{const n=Lr(qo,e.__scopeDialog),r=b.useRef(!1),o=b.useRef(!1);return y.jsx(M1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=a.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),M1=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...l}=e,u=Lr(qo,n),d=b.useRef(null),f=ct(t,d);return w1(),y.jsxs(y.Fragment,{children:[y.jsx(Lm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:y.jsx(dd,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Bm(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(YO,{titleId:u.titleId}),y.jsx(GO,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Vm="DialogTitle",L1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr(Vm,n);return y.jsx(tt.h2,{id:o.titleId,...r,ref:t})});L1.displayName=Vm;var F1="DialogDescription",$1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr(F1,n);return y.jsx(tt.p,{id:o.descriptionId,...r,ref:t})});$1.displayName=F1;var V1="DialogClose",B1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr(V1,n);return y.jsx(tt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>o.onOpenChange(!1))})});B1.displayName=V1;function Bm(e){return e?"open":"closed"}var U1="DialogTitleWarning",[q8,H1]=m2(U1,{contentName:qo,titleName:Vm,docsSlug:"dialog"}),YO=({titleId:e})=>{const t=H1(U1),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
266
|
+
`)},PO=0,Ps=[];function NO(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(PO++)[0],a=b.useState(S1)[0],l=b.useRef(e);b.useEffect(function(){l.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var k=KA([e.lockRef.current],(e.shards||[]).map(kw),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=b.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!l.current.allowPinchZoom;var E=ac(k),_=n.current,P="deltaX"in k?k.deltaX:_[0]-E[0],R="deltaY"in k?k.deltaY:_[1]-E[1],A,j=k.target,F=Math.abs(P)>Math.abs(R)?"h":"v";if("touches"in k&&F==="h"&&j.type==="range")return!1;var Z=window.getSelection(),re=Z&&Z.anchorNode,O=re?re===j||re.contains(j):!1;if(O)return!1;var Y=ww(F,j);if(!Y)return!0;if(Y?A=F:(A=F==="v"?"h":"v",Y=ww(F,j)),!Y)return!1;if(!r.current&&"changedTouches"in k&&(P||R)&&(r.current=A),!A)return!0;var M=r.current||A;return EO(M,S,k,M==="h"?P:R)},[]),d=b.useCallback(function(k){var S=k;if(!(!Ps.length||Ps[Ps.length-1]!==a)){var E="deltaY"in S?bw(S):ac(S),_=t.current.filter(function(A){return A.name===S.type&&(A.target===S.target||S.target===A.shadowParent)&&_O(A.delta,E)})[0];if(_&&_.should){S.cancelable&&S.preventDefault();return}if(!_){var P=(l.current.shards||[]).map(kw).filter(Boolean).filter(function(A){return A.contains(S.target)}),R=P.length>0?u(S,P[0]):!l.current.noIsolation;R&&S.cancelable&&S.preventDefault()}}},[]),f=b.useCallback(function(k,S,E,_){var P={name:k,delta:S,target:E,should:_,shadowParent:jO(E)};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(R){return R!==P})},1)},[]),h=b.useCallback(function(k){n.current=ac(k),r.current=void 0},[]),p=b.useCallback(function(k){f(k.type,bw(k),k.target,u(k,e.lockRef.current))},[]),x=b.useCallback(function(k){f(k.type,ac(k),k.target,u(k,e.lockRef.current))},[]);b.useEffect(function(){return Ps.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:x}),document.addEventListener("wheel",d,Ts),document.addEventListener("touchmove",d,Ts),document.addEventListener("touchstart",h,Ts),function(){Ps=Ps.filter(function(k){return k!==a}),document.removeEventListener("wheel",d,Ts),document.removeEventListener("touchmove",d,Ts),document.removeEventListener("touchstart",h,Ts)}},[]);var g=e.removeScrollBar,C=e.inert;return b.createElement(b.Fragment,null,C?b.createElement(a,{styles:TO(o)}):null,g?b.createElement(vO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function jO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const RO=oO(k1,NO);var Fm=b.forwardRef(function(e,t){return b.createElement(wd,Kr({},e,{ref:t,sideCar:RO}))});Fm.classNames=wd.classNames;var IO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ns=new WeakMap,lc=new WeakMap,uc={},Wh=0,T1=function(e){return e&&(e.host||T1(e.parentNode))},AO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=T1(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})},OO=function(e,t,n,r){var o=AO(t,Array.isArray(e)?e:[e]);uc[n]||(uc[n]=new WeakMap);var a=uc[n],l=[],u=new Set,d=new Set(o),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};o.forEach(f);var h=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(x){if(u.has(x))h(x);else try{var g=x.getAttribute(r),C=g!==null&&g!=="false",k=(Ns.get(x)||0)+1,S=(a.get(x)||0)+1;Ns.set(x,k),a.set(x,S),l.push(x),k===1&&C&&lc.set(x,!0),S===1&&x.setAttribute(n,"true"),C||x.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",x,E)}})};return h(t),u.clear(),Wh++,function(){l.forEach(function(p){var x=Ns.get(p)-1,g=a.get(p)-1;Ns.set(p,x),a.set(p,g),x||(lc.has(p)||p.removeAttribute(r),lc.delete(p)),g||p.removeAttribute(n)}),Wh--,Wh||(Ns=new WeakMap,Ns=new WeakMap,lc=new WeakMap,uc={})}},P1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=IO(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),OO(r,o,n,"aria-hidden")):function(){return null}};function DO(e){const t=zO(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(LO);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function zO(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=$O(o),u=FO(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var MO=Symbol("radix.slottable");function LO(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MO}function FO(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function $O(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bd="Dialog",[N1]=ca(bd),[VO,Lr]=N1(bd),j1=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,u=b.useRef(null),d=b.useRef(null),[f,h]=Mc({prop:r,defaultProp:o??!1,onChange:a,caller:bd});return y.jsx(VO,{scope:t,triggerRef:u,contentRef:d,contentId:Uo(),titleId:Uo(),descriptionId:Uo(),open:f,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),modal:l,children:n})};j1.displayName=bd;var R1="DialogTrigger",BO=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr(R1,n),a=ct(t,o.triggerRef);return y.jsx(tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Bm(o.open),...r,ref:a,onClick:Ye(e.onClick,o.onOpenToggle)})});BO.displayName=R1;var $m="DialogPortal",[UO,I1]=N1($m,{forceMount:void 0}),A1=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Lr($m,t);return y.jsx(UO,{scope:t,forceMount:n,children:b.Children.map(r,l=>y.jsx(ni,{present:n||a.open,children:y.jsx(yd,{asChild:!0,container:o,children:l})}))})};A1.displayName=$m;var Lc="DialogOverlay",O1=b.forwardRef((e,t)=>{const n=I1(Lc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Lr(Lc,e.__scopeDialog);return a.modal?y.jsx(ni,{present:r||a.open,children:y.jsx(WO,{...o,ref:t})}):null});O1.displayName=Lc;var HO=DO("DialogOverlay.RemoveScroll"),WO=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr(Lc,n);return y.jsx(Fm,{as:HO,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(tt.div,{"data-state":Bm(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),qo="DialogContent",D1=b.forwardRef((e,t)=>{const n=I1(qo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Lr(qo,e.__scopeDialog);return y.jsx(ni,{present:r||a.open,children:a.modal?y.jsx(ZO,{...o,ref:t}):y.jsx(qO,{...o,ref:t})})});D1.displayName=qo;var ZO=b.forwardRef((e,t)=>{const n=Lr(qo,e.__scopeDialog),r=b.useRef(null),o=ct(t,n.contentRef,r);return b.useEffect(()=>{const a=r.current;if(a)return P1(a)},[]),y.jsx(z1,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&a.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault())})}),qO=b.forwardRef((e,t)=>{const n=Lr(qo,e.__scopeDialog),r=b.useRef(!1),o=b.useRef(!1);return y.jsx(z1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=a.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),z1=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...l}=e,u=Lr(qo,n),d=b.useRef(null),f=ct(t,d);return x1(),y.jsxs(y.Fragment,{children:[y.jsx(Lm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:y.jsx(dd,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Bm(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(QO,{titleId:u.titleId}),y.jsx(KO,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Vm="DialogTitle",M1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr(Vm,n);return y.jsx(tt.h2,{id:o.titleId,...r,ref:t})});M1.displayName=Vm;var L1="DialogDescription",F1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr(L1,n);return y.jsx(tt.p,{id:o.descriptionId,...r,ref:t})});F1.displayName=L1;var $1="DialogClose",V1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lr($1,n);return y.jsx(tt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>o.onOpenChange(!1))})});V1.displayName=$1;function Bm(e){return e?"open":"closed"}var B1="DialogTitleWarning",[q8,U1]=p2(B1,{contentName:qo,titleName:Vm,docsSlug:"dialog"}),QO=({titleId:e})=>{const t=U1(B1),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
267
267
|
|
|
268
268
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
269
269
|
|
|
270
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},KO="DialogDescriptionWarning",GO=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${H1(KO).contentName}}.`;return b.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},W1=R1,Z1=O1,q1=D1,Q1=z1,Y1=L1,XO=$1,K1=B1;function JO({...e}){return y.jsx(W1,{"data-slot":"sheet",...e})}function eD({...e}){return y.jsx(Z1,{"data-slot":"sheet-portal",...e})}function tD({className:e,...t}){return y.jsx(q1,{"data-slot":"sheet-overlay",className:Be("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function nD({className:e,children:t,side:n="right",...r}){return y.jsxs(eD,{children:[y.jsx(tD,{}),y.jsxs(Q1,{"data-slot":"sheet-content",className:Be("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,y.jsxs(K1,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[y.jsx(cd,{className:"size-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function rD({className:e,...t}){return y.jsx("div",{"data-slot":"sheet-header",className:Be("flex flex-col gap-1.5 p-4",e),...t})}function iD({className:e,...t}){return y.jsx("div",{"data-slot":"sheet-footer",className:Be("mt-auto flex flex-col gap-2 p-4",e),...t})}function oD({className:e,...t}){return y.jsx(Y1,{"data-slot":"sheet-title",className:Be("text-foreground font-semibold",e),...t})}var sD=b.createContext(void 0);function G1(e){const t=b.useContext(sD);return e||t||"ltr"}function Lp(e,[t,n]){return Math.min(n,Math.max(t,e))}function aD(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Um="ScrollArea",[X1]=ca(Um),[lD,gr]=X1(Um),J1=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...l}=e,[u,d]=b.useState(null),[f,h]=b.useState(null),[p,x]=b.useState(null),[g,C]=b.useState(null),[k,S]=b.useState(null),[E,_]=b.useState(0),[P,R]=b.useState(0),[A,j]=b.useState(!1),[F,Z]=b.useState(!1),re=ct(t,Y=>d(Y)),O=G1(o);return y.jsx(lD,{scope:n,type:r,dir:O,scrollHideDelay:a,scrollArea:u,viewport:f,onViewportChange:h,content:p,onContentChange:x,scrollbarX:g,onScrollbarXChange:C,scrollbarXEnabled:A,onScrollbarXEnabledChange:j,scrollbarY:k,onScrollbarYChange:S,scrollbarYEnabled:F,onScrollbarYEnabledChange:Z,onCornerWidthChange:_,onCornerHeightChange:R,children:y.jsx(tt.div,{dir:O,...l,ref:re,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":P+"px",...e.style}})})});J1.displayName=Um;var eS="ScrollAreaViewport",tS=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,l=gr(eS,n),u=b.useRef(null),d=ct(t,u,l.onViewportChange);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),y.jsx(tt.div,{"data-radix-scroll-area-viewport":"",...a,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:y.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});tS.displayName=eS;var ri="ScrollAreaScrollbar",nS=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gr(ri,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:l}=o,u=e.orientation==="horizontal";return b.useEffect(()=>(u?a(!0):l(!0),()=>{u?a(!1):l(!1)}),[u,a,l]),o.type==="hover"?y.jsx(uD,{...r,ref:t,forceMount:n}):o.type==="scroll"?y.jsx(cD,{...r,ref:t,forceMount:n}):o.type==="auto"?y.jsx(rS,{...r,ref:t,forceMount:n}):o.type==="always"?y.jsx(Hm,{...r,ref:t}):null});nS.displayName=ri;var uD=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gr(ri,e.__scopeScrollArea),[a,l]=b.useState(!1);return b.useEffect(()=>{const u=o.scrollArea;let d=0;if(u){const f=()=>{window.clearTimeout(d),l(!0)},h=()=>{d=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",h),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",h)}}},[o.scrollArea,o.scrollHideDelay]),y.jsx(ni,{present:n||a,children:y.jsx(rS,{"data-state":a?"visible":"hidden",...r,ref:t})})}),cD=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gr(ri,e.__scopeScrollArea),a=e.orientation==="horizontal",l=Sd(()=>d("SCROLL_END"),100),[u,d]=aD("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,o.scrollHideDelay,d]),b.useEffect(()=>{const f=o.viewport,h=a?"scrollLeft":"scrollTop";if(f){let p=f[h];const x=()=>{const g=f[h];p!==g&&(d("SCROLL"),l()),p=g};return f.addEventListener("scroll",x),()=>f.removeEventListener("scroll",x)}},[o.viewport,a,d,l]),y.jsx(ni,{present:n||u!=="hidden",children:y.jsx(Hm,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),rS=b.forwardRef((e,t)=>{const n=gr(ri,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,l]=b.useState(!1),u=e.orientation==="horizontal",d=Sd(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?f:h)}},10);return ta(n.viewport,d),ta(n.content,d),y.jsx(ni,{present:r||a,children:y.jsx(Hm,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Hm=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=gr(ri,e.__scopeScrollArea),a=b.useRef(null),l=b.useRef(0),[u,d]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=lS(u.viewport,u.content),h={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:x=>a.current=x,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:x=>l.current=x};function p(x,g){return gD(x,l.current,u,g)}return n==="horizontal"?y.jsx(dD,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const x=o.viewport.scrollLeft,g=Cw(x,u,o.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollLeft=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollLeft=p(x,o.dir))}}):n==="vertical"?y.jsx(fD,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const x=o.viewport.scrollTop,g=Cw(x,u);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollTop=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollTop=p(x))}}):null}),dD=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=gr(ri,e.__scopeScrollArea),[l,u]=b.useState(),d=b.useRef(null),f=ct(t,d,a.onScrollbarXChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(oS,{"data-orientation":"horizontal",...o,ref:f,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":kd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,p)=>{if(a.viewport){const x=a.viewport.scrollLeft+h.deltaX;e.onWheelScroll(x),cS(x,p)&&h.preventDefault()}},onResize:()=>{d.current&&a.viewport&&l&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:$c(l.paddingLeft),paddingEnd:$c(l.paddingRight)}})}})}),fD=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=gr(ri,e.__scopeScrollArea),[l,u]=b.useState(),d=b.useRef(null),f=ct(t,d,a.onScrollbarYChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(oS,{"data-orientation":"vertical",...o,ref:f,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":kd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,p)=>{if(a.viewport){const x=a.viewport.scrollTop+h.deltaY;e.onWheelScroll(x),cS(x,p)&&h.preventDefault()}},onResize:()=>{d.current&&a.viewport&&l&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:$c(l.paddingTop),paddingEnd:$c(l.paddingBottom)}})}})}),[hD,iS]=X1(ri),oS=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:h,onResize:p,...x}=e,g=gr(ri,n),[C,k]=b.useState(null),S=ct(t,re=>k(re)),E=b.useRef(null),_=b.useRef(""),P=g.viewport,R=r.content-r.viewport,A=Bn(h),j=Bn(d),F=Sd(p,10);function Z(re){if(E.current){const O=re.clientX-E.current.left,Y=re.clientY-E.current.top;f({x:O,y:Y})}}return b.useEffect(()=>{const re=O=>{const Y=O.target;(C==null?void 0:C.contains(Y))&&A(O,R)};return document.addEventListener("wheel",re,{passive:!1}),()=>document.removeEventListener("wheel",re,{passive:!1})},[P,C,R,A]),b.useEffect(j,[r,j]),ta(C,F),ta(g.content,F),y.jsx(hD,{scope:n,scrollbar:C,hasThumb:o,onThumbChange:Bn(a),onThumbPointerUp:Bn(l),onThumbPositionChange:j,onThumbPointerDown:Bn(u),children:y.jsx(tt.div,{...x,ref:S,style:{position:"absolute",...x.style},onPointerDown:Ye(e.onPointerDown,re=>{re.button===0&&(re.target.setPointerCapture(re.pointerId),E.current=C.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),Z(re))}),onPointerMove:Ye(e.onPointerMove,Z),onPointerUp:Ye(e.onPointerUp,re=>{const O=re.target;O.hasPointerCapture(re.pointerId)&&O.releasePointerCapture(re.pointerId),document.body.style.webkitUserSelect=_.current,g.viewport&&(g.viewport.style.scrollBehavior=""),E.current=null})})})}),Fc="ScrollAreaThumb",sS=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=iS(Fc,e.__scopeScrollArea);return y.jsx(ni,{present:n||o.hasThumb,children:y.jsx(pD,{ref:t,...r})})}),pD=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=gr(Fc,n),l=iS(Fc,n),{onThumbPositionChange:u}=l,d=ct(t,p=>l.onThumbChange(p)),f=b.useRef(void 0),h=Sd(()=>{f.current&&(f.current(),f.current=void 0)},100);return b.useEffect(()=>{const p=a.viewport;if(p){const x=()=>{if(h(),!f.current){const g=yD(p,u);f.current=g,u()}};return u(),p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[a.viewport,h,u]),y.jsx(tt.div,{"data-state":l.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,p=>{const g=p.target.getBoundingClientRect(),C=p.clientX-g.left,k=p.clientY-g.top;l.onThumbPointerDown({x:C,y:k})}),onPointerUp:Ye(e.onPointerUp,l.onThumbPointerUp)})});sS.displayName=Fc;var Wm="ScrollAreaCorner",aS=b.forwardRef((e,t)=>{const n=gr(Wm,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?y.jsx(mD,{...e,ref:t}):null});aS.displayName=Wm;var mD=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=gr(Wm,n),[a,l]=b.useState(0),[u,d]=b.useState(0),f=!!(a&&u);return ta(o.scrollbarX,()=>{var p;const h=((p=o.scrollbarX)==null?void 0:p.offsetHeight)||0;o.onCornerHeightChange(h),d(h)}),ta(o.scrollbarY,()=>{var p;const h=((p=o.scrollbarY)==null?void 0:p.offsetWidth)||0;o.onCornerWidthChange(h),l(h)}),f?y.jsx(tt.div,{...r,ref:t,style:{width:a,height:u,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function $c(e){return e?parseInt(e,10):0}function lS(e,t){const n=e/t;return isNaN(n)?0:n}function kd(e){const t=lS(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function gD(e,t,n,r="ltr"){const o=kd(n),a=o/2,l=t||a,u=o-l,d=n.scrollbar.paddingStart+l,f=n.scrollbar.size-n.scrollbar.paddingEnd-u,h=n.content-n.viewport,p=r==="ltr"?[0,h]:[h*-1,0];return uS([d,f],p)(e)}function Cw(e,t,n="ltr"){const r=kd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,l=t.content-t.viewport,u=a-r,d=n==="ltr"?[0,l]:[l*-1,0],f=Lp(e,d);return uS([0,l],[0,u])(f)}function uS(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function cS(e,t){return e>0&&e<t}var yD=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},l=n.left!==a.left,u=n.top!==a.top;(l||u)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function Sd(e,t){const n=Bn(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ta(e,t){const n=Bn(t);rn(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var vD=J1,xD=tS,wD=aS;function Zm({className:e,children:t,showScrollbar:n=!1,...r}){return y.jsxs(vD,{"data-slot":"scroll-area",className:Be("relative overflow-hidden",e),...r,children:[y.jsx(xD,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),y.jsx(bD,{forceMount:n?!0:void 0,className:n?"opacity-100":void 0}),y.jsx(wD,{})]})}function bD({className:e,orientation:t="vertical",...n}){return y.jsx(nS,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Be("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:y.jsx(sS,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var kD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],SD=kD.reduce((e,t)=>{const n=_m(`Primitive.${t}`),r=b.forwardRef((o,a)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),CD="Label",dS=b.forwardRef((e,t)=>y.jsx(SD.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));dS.displayName=CD;var ED=dS;function Wt({className:e,...t}){return y.jsx(ED,{"data-slot":"label",className:Be("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Ew(e){const t=_D(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(PD);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function _D(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=jD(o),u=ND(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TD=Symbol("radix.slottable");function PD(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TD}function ND(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jD(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function RD(e){const t=e+"CollectionProvider",[n,r]=ca(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=k=>{const{scope:S,children:E}=k,_=le.useRef(null),P=le.useRef(new Map).current;return y.jsx(o,{scope:S,itemMap:P,collectionRef:_,children:E})};l.displayName=t;const u=e+"CollectionSlot",d=Ew(u),f=le.forwardRef((k,S)=>{const{scope:E,children:_}=k,P=a(u,E),R=ct(S,P.collectionRef);return y.jsx(d,{ref:R,children:_})});f.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",x=Ew(h),g=le.forwardRef((k,S)=>{const{scope:E,children:_,...P}=k,R=le.useRef(null),A=ct(S,R),j=a(h,E);return le.useEffect(()=>(j.itemMap.set(R,{ref:R,...P}),()=>void j.itemMap.delete(R))),y.jsx(x,{[p]:"",ref:A,children:_})});g.displayName=h;function C(k){const S=a(e+"CollectionConsumer",k);return le.useCallback(()=>{const _=S.collectionRef.current;if(!_)return[];const P=Array.from(_.querySelectorAll(`[${p}]`));return Array.from(S.itemMap.values()).sort((j,F)=>P.indexOf(j.ref.current)-P.indexOf(F.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:l,Slot:f,ItemSlot:g},C,r]}function ID(e){const t=AD(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(DD);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function AD(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=MD(o),u=zD(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var OD=Symbol("radix.slottable");function DD(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===OD}function zD(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function MD(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function LD(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var FD=[" ","Enter","ArrowUp","ArrowDown"],$D=[" ","Enter"],Qo="Select",[Cd,Ed,VD]=RD(Qo),[ha]=ca(Qo,[VD,gd]),_d=gd(),[BD,fo]=ha(Qo),[UD,HD]=ha(Qo),fS=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:l,defaultValue:u,onValueChange:d,dir:f,name:h,autoComplete:p,disabled:x,required:g,form:C}=e,k=_d(t),[S,E]=b.useState(null),[_,P]=b.useState(null),[R,A]=b.useState(!1),j=G1(f),[F,Z]=Mc({prop:r,defaultProp:o??!1,onChange:a,caller:Qo}),[re,O]=Mc({prop:l,defaultProp:u,onChange:d,caller:Qo}),Y=b.useRef(null),M=S?C||!!S.closest("form"):!0,[ne,W]=b.useState(new Set),U=Array.from(ne).map(Q=>Q.props.value).join(";");return y.jsx(i1,{...k,children:y.jsxs(BD,{required:g,scope:t,trigger:S,onTriggerChange:E,valueNode:_,onValueNodeChange:P,valueNodeHasChildren:R,onValueNodeHasChildrenChange:A,contentId:Uo(),value:re,onValueChange:O,open:F,onOpenChange:Z,dir:j,triggerPointerDownPosRef:Y,disabled:x,children:[y.jsx(Cd.Provider,{scope:t,children:y.jsx(UD,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(Q=>{W(J=>new Set(J).add(Q))},[]),onNativeOptionRemove:b.useCallback(Q=>{W(J=>{const D=new Set(J);return D.delete(Q),D})},[]),children:n})}),M?y.jsxs(OS,{"aria-hidden":!0,required:g,tabIndex:-1,name:h,autoComplete:p,value:re,onChange:Q=>O(Q.target.value),disabled:x,form:C,children:[re===void 0?y.jsx("option",{value:""}):null,Array.from(ne)]},U):null]})})};fS.displayName=Qo;var hS="SelectTrigger",pS=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=_d(n),l=fo(hS,n),u=l.disabled||r,d=ct(t,l.onTriggerChange),f=Ed(n),h=b.useRef("touch"),[p,x,g]=zS(k=>{const S=f().filter(P=>!P.disabled),E=S.find(P=>P.value===l.value),_=MS(S,k,E);_!==void 0&&l.onValueChange(_.value)}),C=k=>{u||(l.onOpenChange(!0),g()),k&&(l.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})};return y.jsx(o1,{asChild:!0,...a,children:y.jsx(tt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":DS(l.value)?"":void 0,...o,ref:d,onClick:Ye(o.onClick,k=>{k.currentTarget.focus(),h.current!=="mouse"&&C(k)}),onPointerDown:Ye(o.onPointerDown,k=>{h.current=k.pointerType;const S=k.target;S.hasPointerCapture(k.pointerId)&&S.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(C(k),k.preventDefault())}),onKeyDown:Ye(o.onKeyDown,k=>{const S=p.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&x(k.key),!(S&&k.key===" ")&&FD.includes(k.key)&&(C(),k.preventDefault())})})})});pS.displayName=hS;var mS="SelectValue",gS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:l="",...u}=e,d=fo(mS,n),{onValueNodeHasChildrenChange:f}=d,h=a!==void 0,p=ct(t,d.onValueNodeChange);return rn(()=>{f(h)},[f,h]),y.jsx(tt.span,{...u,ref:p,style:{pointerEvents:"none"},children:DS(d.value)?y.jsx(y.Fragment,{children:l}):a})});gS.displayName=mS;var WD="SelectIcon",yS=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return y.jsx(tt.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});yS.displayName=WD;var ZD="SelectPortal",vS=e=>y.jsx(yd,{asChild:!0,...e});vS.displayName=ZD;var Yo="SelectContent",xS=b.forwardRef((e,t)=>{const n=fo(Yo,e.__scopeSelect),[r,o]=b.useState();if(rn(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Il.createPortal(y.jsx(wS,{scope:e.__scopeSelect,children:y.jsx(Cd.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),a):null}return y.jsx(bS,{...e,ref:t})});xS.displayName=Yo;var Pr=10,[wS,ho]=ha(Yo),qD="SelectContentImpl",QD=ID("SelectContent.RemoveScroll"),bS=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:x,collisionPadding:g,sticky:C,hideWhenDetached:k,avoidCollisions:S,...E}=e,_=fo(Yo,n),[P,R]=b.useState(null),[A,j]=b.useState(null),F=ct(t,ie=>R(ie)),[Z,re]=b.useState(null),[O,Y]=b.useState(null),M=Ed(n),[ne,W]=b.useState(!1),U=b.useRef(!1);b.useEffect(()=>{if(P)return N1(P)},[P]),w1();const Q=b.useCallback(ie=>{const[me,...Se]=M().map(Ve=>Ve.ref.current),[be]=Se.slice(-1),Ae=document.activeElement;for(const Ve of ie)if(Ve===Ae||(Ve==null||Ve.scrollIntoView({block:"nearest"}),Ve===me&&A&&(A.scrollTop=0),Ve===be&&A&&(A.scrollTop=A.scrollHeight),Ve==null||Ve.focus(),document.activeElement!==Ae))return},[M,A]),J=b.useCallback(()=>Q([Z,P]),[Q,Z,P]);b.useEffect(()=>{ne&&J()},[ne,J]);const{onOpenChange:D,triggerPointerDownPosRef:G}=_;b.useEffect(()=>{if(P){let ie={x:0,y:0};const me=be=>{var Ae,Ve;ie={x:Math.abs(Math.round(be.pageX)-(((Ae=G.current)==null?void 0:Ae.x)??0)),y:Math.abs(Math.round(be.pageY)-(((Ve=G.current)==null?void 0:Ve.y)??0))}},Se=be=>{ie.x<=10&&ie.y<=10?be.preventDefault():P.contains(be.target)||D(!1),document.removeEventListener("pointermove",me),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",Se,{capture:!0})}}},[P,D,G]),b.useEffect(()=>{const ie=()=>D(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[D]);const[N,L]=zS(ie=>{const me=M().filter(Ae=>!Ae.disabled),Se=me.find(Ae=>Ae.ref.current===document.activeElement),be=MS(me,ie,Se);be&&setTimeout(()=>be.ref.current.focus())}),K=b.useCallback((ie,me,Se)=>{const be=!U.current&&!Se;(_.value!==void 0&&_.value===me||be)&&(re(ie),be&&(U.current=!0))},[_.value]),I=b.useCallback(()=>P==null?void 0:P.focus(),[P]),ue=b.useCallback((ie,me,Se)=>{const be=!U.current&&!Se;(_.value!==void 0&&_.value===me||be)&&Y(ie)},[_.value]),ve=r==="popper"?Fp:kS,xe=ve===Fp?{side:u,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:x,collisionPadding:g,sticky:C,hideWhenDetached:k,avoidCollisions:S}:{};return y.jsx(wS,{scope:n,content:P,viewport:A,onViewportChange:j,itemRefCallback:K,selectedItem:Z,onItemLeave:I,itemTextRefCallback:ue,focusSelectedItem:J,selectedItemText:O,position:r,isPositioned:ne,searchRef:N,children:y.jsx(Fm,{as:QD,allowPinchZoom:!0,children:y.jsx(Lm,{asChild:!0,trapped:_.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:Ye(o,ie=>{var me;(me=_.trigger)==null||me.focus({preventScroll:!0}),ie.preventDefault()}),children:y.jsx(dd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:y.jsx(ve,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:ie=>ie.preventDefault(),...E,...xe,onPlaced:()=>W(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Ye(E.onKeyDown,ie=>{const me=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!me&&ie.key.length===1&&L(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let be=M().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const Ae=ie.target,Ve=be.indexOf(Ae);be=be.slice(Ve+1)}setTimeout(()=>Q(be)),ie.preventDefault()}})})})})})})});bS.displayName=qD;var YD="SelectItemAlignedPosition",kS=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=fo(Yo,n),l=ho(Yo,n),[u,d]=b.useState(null),[f,h]=b.useState(null),p=ct(t,F=>h(F)),x=Ed(n),g=b.useRef(!1),C=b.useRef(!0),{viewport:k,selectedItem:S,selectedItemText:E,focusSelectedItem:_}=l,P=b.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&f&&k&&S&&E){const F=a.trigger.getBoundingClientRect(),Z=f.getBoundingClientRect(),re=a.valueNode.getBoundingClientRect(),O=E.getBoundingClientRect();if(a.dir!=="rtl"){const Ae=O.left-Z.left,Ve=re.left-Ae,nt=F.left-Ve,It=F.width+nt,sn=Math.max(It,Z.width),Gt=window.innerWidth-Pr,an=Lp(Ve,[Pr,Math.max(Pr,Gt-sn)]);u.style.minWidth=It+"px",u.style.left=an+"px"}else{const Ae=Z.right-O.right,Ve=window.innerWidth-re.right-Ae,nt=window.innerWidth-F.right-Ve,It=F.width+nt,sn=Math.max(It,Z.width),Gt=window.innerWidth-Pr,an=Lp(Ve,[Pr,Math.max(Pr,Gt-sn)]);u.style.minWidth=It+"px",u.style.right=an+"px"}const Y=x(),M=window.innerHeight-Pr*2,ne=k.scrollHeight,W=window.getComputedStyle(f),U=parseInt(W.borderTopWidth,10),Q=parseInt(W.paddingTop,10),J=parseInt(W.borderBottomWidth,10),D=parseInt(W.paddingBottom,10),G=U+Q+ne+D+J,N=Math.min(S.offsetHeight*5,G),L=window.getComputedStyle(k),K=parseInt(L.paddingTop,10),I=parseInt(L.paddingBottom,10),ue=F.top+F.height/2-Pr,ve=M-ue,xe=S.offsetHeight/2,ie=S.offsetTop+xe,me=U+Q+ie,Se=G-me;if(me<=ue){const Ae=Y.length>0&&S===Y[Y.length-1].ref.current;u.style.bottom="0px";const Ve=f.clientHeight-k.offsetTop-k.offsetHeight,nt=Math.max(ve,xe+(Ae?I:0)+Ve+J),It=me+nt;u.style.height=It+"px"}else{const Ae=Y.length>0&&S===Y[0].ref.current;u.style.top="0px";const nt=Math.max(ue,U+k.offsetTop+(Ae?K:0)+xe)+Se;u.style.height=nt+"px",k.scrollTop=me-ue+k.offsetTop}u.style.margin=`${Pr}px 0`,u.style.minHeight=N+"px",u.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[x,a.trigger,a.valueNode,u,f,k,S,E,a.dir,r]);rn(()=>P(),[P]);const[R,A]=b.useState();rn(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);const j=b.useCallback(F=>{F&&C.current===!0&&(P(),_==null||_(),C.current=!1)},[P,_]);return y.jsx(GD,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:y.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:y.jsx(tt.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});kS.displayName=YD;var KD="SelectPopperPosition",Fp=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Pr,...a}=e,l=_d(n);return y.jsx(s1,{...l,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});Fp.displayName=KD;var[GD,qm]=ha(Yo,{}),$p="SelectViewport",SS=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=ho($p,n),l=qm($p,n),u=ct(t,a.onViewportChange),d=b.useRef(0);return y.jsxs(y.Fragment,{children:[y.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}),y.jsx(Cd.Slot,{scope:n,children:y.jsx(tt.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Ye(o.onScroll,f=>{const h=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&p){const g=Math.abs(d.current-h.scrollTop);if(g>0){const C=window.innerHeight-Pr*2,k=parseFloat(p.style.minHeight),S=parseFloat(p.style.height),E=Math.max(k,S);if(E<C){const _=E+g,P=Math.min(C,_),R=_-P;p.style.height=P+"px",p.style.bottom==="0px"&&(h.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}d.current=h.scrollTop})})})]})});SS.displayName=$p;var CS="SelectGroup",[XD,JD]=ha(CS),ez=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Uo();return y.jsx(XD,{scope:n,id:o,children:y.jsx(tt.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ez.displayName=CS;var ES="SelectLabel",tz=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=JD(ES,n);return y.jsx(tt.div,{id:o.id,...r,ref:t})});tz.displayName=ES;var Vc="SelectItem",[nz,_S]=ha(Vc),TS=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...l}=e,u=fo(Vc,n),d=ho(Vc,n),f=u.value===r,[h,p]=b.useState(a??""),[x,g]=b.useState(!1),C=ct(t,_=>{var P;return(P=d.itemRefCallback)==null?void 0:P.call(d,_,r,o)}),k=Uo(),S=b.useRef("touch"),E=()=>{o||(u.onValueChange(r),u.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 y.jsx(nz,{scope:n,value:r,disabled:o,textId:k,isSelected:f,onItemTextChange:b.useCallback(_=>{p(P=>P||((_==null?void 0:_.textContent)??"").trim())},[]),children:y.jsx(Cd.ItemSlot,{scope:n,value:r,disabled:o,textValue:h,children:y.jsx(tt.div,{role:"option","aria-labelledby":k,"data-highlighted":x?"":void 0,"aria-selected":f&&x,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:C,onFocus:Ye(l.onFocus,()=>g(!0)),onBlur:Ye(l.onBlur,()=>g(!1)),onClick:Ye(l.onClick,()=>{S.current!=="mouse"&&E()}),onPointerUp:Ye(l.onPointerUp,()=>{S.current==="mouse"&&E()}),onPointerDown:Ye(l.onPointerDown,_=>{S.current=_.pointerType}),onPointerMove:Ye(l.onPointerMove,_=>{var P;S.current=_.pointerType,o?(P=d.onItemLeave)==null||P.call(d):S.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(l.onPointerLeave,_=>{var P;_.currentTarget===document.activeElement&&((P=d.onItemLeave)==null||P.call(d))}),onKeyDown:Ye(l.onKeyDown,_=>{var R;((R=d.searchRef)==null?void 0:R.current)!==""&&_.key===" "||($D.includes(_.key)&&E(),_.key===" "&&_.preventDefault())})})})})});TS.displayName=Vc;var sl="SelectItemText",PS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,l=fo(sl,n),u=ho(sl,n),d=_S(sl,n),f=HD(sl,n),[h,p]=b.useState(null),x=ct(t,E=>p(E),d.onItemTextChange,E=>{var _;return(_=u.itemTextRefCallback)==null?void 0:_.call(u,E,d.value,d.disabled)}),g=h==null?void 0:h.textContent,C=b.useMemo(()=>y.jsx("option",{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:k,onNativeOptionRemove:S}=f;return rn(()=>(k(C),()=>S(C)),[k,S,C]),y.jsxs(y.Fragment,{children:[y.jsx(tt.span,{id:d.textId,...a,ref:x}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Il.createPortal(a.children,l.valueNode):null]})});PS.displayName=sl;var NS="SelectItemIndicator",jS=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _S(NS,n).isSelected?y.jsx(tt.span,{"aria-hidden":!0,...r,ref:t}):null});jS.displayName=NS;var Vp="SelectScrollUpButton",RS=b.forwardRef((e,t)=>{const n=ho(Vp,e.__scopeSelect),r=qm(Vp,e.__scopeSelect),[o,a]=b.useState(!1),l=ct(t,r.onScrollButtonChange);return rn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;a(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(AS,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});RS.displayName=Vp;var Bp="SelectScrollDownButton",IS=b.forwardRef((e,t)=>{const n=ho(Bp,e.__scopeSelect),r=qm(Bp,e.__scopeSelect),[o,a]=b.useState(!1),l=ct(t,r.onScrollButtonChange);return rn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,h=Math.ceil(d.scrollTop)<f;a(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(AS,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});IS.displayName=Bp;var AS=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=ho("SelectScrollButton",n),l=b.useRef(null),u=Ed(n),d=b.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return b.useEffect(()=>()=>d(),[d]),rn(()=>{var h;const f=u().find(p=>p.ref.current===document.activeElement);(h=f==null?void 0:f.ref.current)==null||h.scrollIntoView({block:"nearest"})},[u]),y.jsx(tt.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ye(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ye(o.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ye(o.onPointerLeave,()=>{d()})})}),rz="SelectSeparator",iz=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(tt.div,{"aria-hidden":!0,...r,ref:t})});iz.displayName=rz;var Up="SelectArrow",oz=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=_d(n),a=fo(Up,n),l=ho(Up,n);return a.open&&l.position==="popper"?y.jsx(a1,{...o,...r,ref:t}):null});oz.displayName=Up;var sz="SelectBubbleInput",OS=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=b.useRef(null),a=ct(r,o),l=LD(t);return b.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&h){const p=new Event("change",{bubbles:!0});h.call(u,t),u.dispatchEvent(p)}},[l,t]),y.jsx(tt.select,{...n,style:{...l1,...n.style},ref:a,defaultValue:t})});OS.displayName=sz;function DS(e){return e===""||e===void 0}function zS(e){const t=Bn(e),n=b.useRef(""),r=b.useRef(0),o=b.useCallback(l=>{const u=n.current+l;t(u),(function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(u)},[t]),a=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function MS(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=az(e,Math.max(a,0));o.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function az(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lz=fS,uz=pS,cz=gS,dz=yS,fz=vS,hz=xS,pz=SS,mz=TS,gz=PS,yz=jS,vz=RS,xz=IS;function dr({...e}){return y.jsx(lz,{"data-slot":"select",...e})}function fr({...e}){return y.jsx(cz,{"data-slot":"select-value",...e})}function hr({className:e,size:t="default",children:n,...r}){return y.jsxs(uz,{"data-slot":"select-trigger","data-size":t,className:Be("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,y.jsx(dz,{asChild:!0,children:y.jsx(dk,{className:"size-4 opacity-50"})})]})}function pr({className:e,children:t,position:n="item-aligned",align:r="center",...o}){return y.jsx(fz,{children:y.jsxs(hz,{"data-slot":"select-content",className:Be("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",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,align:r,...o,children:[y.jsx(wz,{}),y.jsx(pz,{className:Be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),y.jsx(bz,{})]})})}function nn({className:e,children:t,...n}){return y.jsxs(mz,{"data-slot":"select-item",className:Be("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[y.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:y.jsx(yz,{children:y.jsx(ck,{className:"size-4"})})}),y.jsx(gz,{children:t})]})}function wz({className:e,...t}){return y.jsx(vz,{"data-slot":"select-scroll-up-button",className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(zj,{className:"size-4"})})}function bz({className:e,...t}){return y.jsx(xz,{"data-slot":"select-scroll-down-button",className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(dk,{className:"size-4"})})}var Ml=e=>e.type==="checkbox",Ao=e=>e instanceof Date,Vn=e=>e==null;const LS=e=>typeof e=="object";var Mt=e=>!Vn(e)&&!Array.isArray(e)&&LS(e)&&!Ao(e),FS=e=>Mt(e)&&e.target?Ml(e.target)?e.target.checked:e.target.value:e,kz=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,$S=(e,t)=>e.has(kz(t)),Sz=e=>{const t=e.constructor&&e.constructor.prototype;return Mt(t)&&t.hasOwnProperty("isPrototypeOf")},Qm=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ot(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Qm&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Mt(e)&&Sz(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Ot(e[o]));return r}var Td=e=>/^\w*$/.test(e),wt=e=>e===void 0,Ym=e=>Array.isArray(e)?e.filter(Boolean):[],Km=e=>Ym(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ce=(e,t,n)=>{if(!t||!Mt(e))return n;const r=(Td(t)?[t]:Km(t)).reduce((o,a)=>Vn(o)?o:o[a],e);return wt(r)||r===e?wt(e[t])?n:e[t]:r},Kn=e=>typeof e=="boolean",Sn=e=>typeof e=="function",lt=(e,t,n)=>{let r=-1;const o=Td(t)?[t]:Km(t),a=o.length,l=a-1;for(;++r<a;){const u=o[r];let d=n;if(r!==l){const f=e[u];d=Mt(f)||Array.isArray(f)?f:isNaN(+o[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Bc={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ir={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},mi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},VS=le.createContext(null);VS.displayName="HookFormControlContext";const Gm=()=>le.useContext(VS);var BS=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const l=a;return t._proxyFormState[l]!==Ir.all&&(t._proxyFormState[l]=!r||Ir.all),n&&(n[l]=!0),e[l]}});return o};const Xm=typeof window<"u"?le.useLayoutEffect:le.useEffect;function Cz(e){const t=Gm(),{control:n=t,disabled:r,name:o,exact:a}=e||{},[l,u]=le.useState(n._formState),d=le.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Xm(()=>n._subscribe({name:o,formState:d.current,exact:a,callback:f=>{!r&&u({...n._formState,...f})}}),[o,r,a]),le.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),le.useMemo(()=>BS(l,n,d.current,!1),[l,n])}var Xn=e=>typeof e=="string",Hp=(e,t,n,r,o)=>Xn(e)?(r&&t.watch.add(e),Ce(n,e,o)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),Ce(n,a))):(r&&(t.watchAll=!0),n),Wp=e=>Vn(e)||!LS(e);function Ar(e,t,n=new WeakSet){if(Wp(e)||Wp(t))return Object.is(e,t);if(Ao(e)&&Ao(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const a of r){const l=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const u=t[a];if(Ao(l)&&Ao(u)||Mt(l)&&Mt(u)||Array.isArray(l)&&Array.isArray(u)?!Ar(l,u,n):!Object.is(l,u))return!1}}return!0}function Ez(e){const t=Gm(),{control:n=t,name:r,defaultValue:o,disabled:a,exact:l,compute:u}=e||{},d=le.useRef(o),f=le.useRef(u),h=le.useRef(void 0),p=le.useRef(n),x=le.useRef(r);f.current=u;const[g,C]=le.useState(()=>{const R=n._getWatch(r,d.current);return f.current?f.current(R):R}),k=le.useCallback(R=>{const A=Hp(r,n._names,R||n._formValues,!1,d.current);return f.current?f.current(A):A},[n._formValues,n._names,r]),S=le.useCallback(R=>{if(!a){const A=Hp(r,n._names,R||n._formValues,!1,d.current);if(f.current){const j=f.current(A);Ar(j,h.current)||(C(j),h.current=j)}else C(A)}},[n._formValues,n._names,a,r]);Xm(()=>((p.current!==n||!Ar(x.current,r))&&(p.current=n,x.current=r,S()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:R=>{S(R.values)}})),[n,l,r,S]),le.useEffect(()=>n._removeUnmounted());const E=p.current!==n,_=x.current,P=le.useMemo(()=>{if(a)return null;const R=!E&&!Ar(_,r);return E||R?k():null},[a,E,r,_,k]);return P!==null?P:g}function _z(e){const t=Gm(),{name:n,disabled:r,control:o=t,shouldUnregister:a,defaultValue:l,exact:u=!0}=e,d=$S(o._names.array,n),f=le.useMemo(()=>Ce(o._formValues,n,Ce(o._defaultValues,n,l)),[o,n,l]),h=Ez({control:o,name:n,defaultValue:f,exact:u}),p=Cz({control:o,name:n,exact:u}),x=le.useRef(e),g=le.useRef(void 0),C=le.useRef(o.register(n,{...e.rules,value:h,...Kn(e.disabled)?{disabled:e.disabled}:{}}));x.current=e;const k=le.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ce(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ce(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ce(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ce(p.validatingFields,n)},error:{enumerable:!0,get:()=>Ce(p.errors,n)}}),[p,n]),S=le.useCallback(R=>C.current.onChange({target:{value:FS(R),name:n},type:Bc.CHANGE}),[n]),E=le.useCallback(()=>C.current.onBlur({target:{value:Ce(o._formValues,n),name:n},type:Bc.BLUR}),[n,o._formValues]),_=le.useCallback(R=>{const A=Ce(o._fields,n);A&&A._f&&R&&(A._f.ref={focus:()=>Sn(R.focus)&&R.focus(),select:()=>Sn(R.select)&&R.select(),setCustomValidity:j=>Sn(R.setCustomValidity)&&R.setCustomValidity(j),reportValidity:()=>Sn(R.reportValidity)&&R.reportValidity()})},[o._fields,n]),P=le.useMemo(()=>({name:n,value:h,...Kn(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:S,onBlur:E,ref:_}),[n,r,p.disabled,S,E,_,h]);return le.useEffect(()=>{const R=o._options.shouldUnregister||a,A=g.current;A&&A!==n&&!d&&o.unregister(A),o.register(n,{...x.current.rules,...Kn(x.current.disabled)?{disabled:x.current.disabled}:{}});const j=(F,Z)=>{const re=Ce(o._fields,F);re&&re._f&&(re._f.mount=Z)};if(j(n,!0),R){const F=Ot(Ce(o._options.defaultValues,n,x.current.defaultValue));lt(o._defaultValues,n,F),wt(Ce(o._formValues,n))&<(o._formValues,n,F)}return!d&&o.register(n),g.current=n,()=>{(d?R&&!o._state.action:R)?o.unregister(n):j(n,!1)}},[n,o,d,a]),le.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),le.useMemo(()=>({field:P,formState:p,fieldState:k}),[P,p,k])}const Uc=e=>e.render(_z(e)),Tz=le.createContext(null);Tz.displayName="HookFormContext";var Jm=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},ll=e=>Array.isArray(e)?e:[e],_w=()=>{let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}};function US(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],a=t[r];if(o&&Mt(o)&&a){const l=US(o,a);Mt(l)&&(n[r]=l)}else e[r]&&(n[r]=a)}return n}var bn=e=>Mt(e)&&!Object.keys(e).length,eg=e=>e.type==="file",Hc=e=>{if(!Qm)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},HS=e=>e.type==="select-multiple",tg=e=>e.type==="radio",Pz=e=>tg(e)||Ml(e),Zh=e=>Hc(e)&&e.isConnected;function Nz(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=wt(e)?r++:e[t[r++]];return e}function jz(e){for(const t in e)if(e.hasOwnProperty(t)&&!wt(e[t]))return!1;return!0}function Dt(e,t){const n=Array.isArray(t)?t:Td(t)?[t]:Km(t),r=n.length===1?e:Nz(e,n),o=n.length-1,a=n[o];return r&&delete r[a],o!==0&&(Mt(r)&&bn(r)||Array.isArray(r)&&jz(r))&&Dt(e,n.slice(0,-1)),e}var Rz=e=>{for(const t in e)if(Sn(e[t]))return!0;return!1};function WS(e){return Array.isArray(e)||Mt(e)&&!Rz(e)}function Zp(e,t={}){for(const n in e){const r=e[n];WS(r)?(t[n]=Array.isArray(r)?[]:{},Zp(r,t[n])):wt(r)||(t[n]=!0)}return t}function As(e,t,n){n||(n=Zp(t));for(const r in e){const o=e[r];if(WS(o))wt(t)||Wp(n[r])?n[r]=Zp(o,Array.isArray(o)?[]:{}):As(o,Vn(t)?{}:t[r],n[r]);else{const a=t[r];n[r]=!Ar(o,a)}}return n}const Tw={value:!1,isValid:!1},Pw={value:!0,isValid:!0};var ZS=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&&!wt(e[0].attributes.value)?wt(e[0].value)||e[0].value===""?Pw:{value:e[0].value,isValid:!0}:Pw:Tw}return Tw},qS=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>wt(e)?e:t?e===""?NaN:e&&+e:n&&Xn(e)?new Date(e):r?r(e):e;const Nw={isValid:!1,value:null};var QS=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Nw):Nw;function jw(e){const t=e.ref;return eg(t)?t.files:tg(t)?QS(e.refs).value:HS(t)?[...t.selectedOptions].map(({value:n})=>n):Ml(t)?ZS(e.refs).value:qS(wt(t.value)?e.ref.value:t.value,e)}var Iz=(e,t,n,r)=>{const o={};for(const a of e){const l=Ce(t,a);l&<(o,a,l._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Wc=e=>e instanceof RegExp,el=e=>wt(e)?e:Wc(e)?e.source:Mt(e)?Wc(e.value)?e.value.source:e.value:e,Rw=e=>({isOnSubmit:!e||e===Ir.onSubmit,isOnBlur:e===Ir.onBlur,isOnChange:e===Ir.onChange,isOnAll:e===Ir.all,isOnTouch:e===Ir.onTouched});const Iw="AsyncFunction";var Az=e=>!!e&&!!e.validate&&!!(Sn(e.validate)&&e.validate.constructor.name===Iw||Mt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Iw)),Oz=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Aw=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ul=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const a=Ce(e,o);if(a){const{_f:l,...u}=a;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],o)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(ul(u,t))break}else if(Mt(u)&&ul(u,t))break}}};function Ow(e,t,n){const r=Ce(e,n);if(r||Td(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const a=o.join("."),l=Ce(t,a),u=Ce(e,a);if(l&&!Array.isArray(l)&&n!==a)return{name:n};if(u&&u.type)return{name:a,error:u};if(u&&u.root&&u.root.type)return{name:`${a}.root`,error:u.root};o.pop()}return{name:n}}var Dz=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return bn(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(l=>t[l]===(!r||Ir.all))},zz=(e,t,n)=>!e||!t||e===t||ll(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),Mz=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,Lz=(e,t)=>!Ym(Ce(e,t)).length&&Dt(e,t),Fz=(e,t,n)=>{const r=ll(Ce(e,n));return lt(r,"root",t[n]),lt(e,n,r),e};function Dw(e,t,n="validate"){if(Xn(e)||Array.isArray(e)&&e.every(Xn)||Kn(e)&&!e)return{type:n,message:Xn(e)?e:"",ref:t}}var js=e=>Mt(e)&&!Wc(e)?e:{value:e,message:""},zw=async(e,t,n,r,o,a)=>{const{ref:l,refs:u,required:d,maxLength:f,minLength:h,min:p,max:x,pattern:g,validate:C,name:k,valueAsNumber:S,mount:E}=e._f,_=Ce(n,k);if(!E||t.has(k))return{};const P=u?u[0]:l,R=M=>{o&&P.reportValidity&&(P.setCustomValidity(Kn(M)?"":M||""),P.reportValidity())},A={},j=tg(l),F=Ml(l),Z=j||F,re=(S||eg(l))&&wt(l.value)&&wt(_)||Hc(l)&&l.value===""||_===""||Array.isArray(_)&&!_.length,O=Jm.bind(null,k,r,A),Y=(M,ne,W,U=mi.maxLength,Q=mi.minLength)=>{const J=M?ne:W;A[k]={type:M?U:Q,message:J,ref:l,...O(M?U:Q,J)}};if(a?!Array.isArray(_)||!_.length:d&&(!Z&&(re||Vn(_))||Kn(_)&&!_||F&&!ZS(u).isValid||j&&!QS(u).isValid)){const{value:M,message:ne}=Xn(d)?{value:!!d,message:d}:js(d);if(M&&(A[k]={type:mi.required,message:ne,ref:P,...O(mi.required,ne)},!r))return R(ne),A}if(!re&&(!Vn(p)||!Vn(x))){let M,ne;const W=js(x),U=js(p);if(!Vn(_)&&!isNaN(_)){const Q=l.valueAsNumber||_&&+_;Vn(W.value)||(M=Q>W.value),Vn(U.value)||(ne=Q<U.value)}else{const Q=l.valueAsDate||new Date(_),J=N=>new Date(new Date().toDateString()+" "+N),D=l.type=="time",G=l.type=="week";Xn(W.value)&&_&&(M=D?J(_)>J(W.value):G?_>W.value:Q>new Date(W.value)),Xn(U.value)&&_&&(ne=D?J(_)<J(U.value):G?_<U.value:Q<new Date(U.value))}if((M||ne)&&(Y(!!M,W.message,U.message,mi.max,mi.min),!r))return R(A[k].message),A}if((f||h)&&!re&&(Xn(_)||a&&Array.isArray(_))){const M=js(f),ne=js(h),W=!Vn(M.value)&&_.length>+M.value,U=!Vn(ne.value)&&_.length<+ne.value;if((W||U)&&(Y(W,M.message,ne.message),!r))return R(A[k].message),A}if(g&&!re&&Xn(_)){const{value:M,message:ne}=js(g);if(Wc(M)&&!_.match(M)&&(A[k]={type:mi.pattern,message:ne,ref:l,...O(mi.pattern,ne)},!r))return R(ne),A}if(C){if(Sn(C)){const M=await C(_,n),ne=Dw(M,P);if(ne&&(A[k]={...ne,...O(mi.validate,ne.message)},!r))return R(ne.message),A}else if(Mt(C)){let M={};for(const ne in C){if(!bn(M)&&!r)break;const W=Dw(await C[ne](_,n),P,ne);W&&(M={...W,...O(ne,W.message)},R(W.message),r&&(A[k]=M))}if(!bn(M)&&(A[k]={ref:P,...M},!r))return A}}return R(!0),A};const $z={mode:Ir.onSubmit,reValidateMode:Ir.onChange,shouldFocusError:!0};function Vz(e={}){let t={...$z,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Sn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Mt(t.defaultValues)||Mt(t.values)?Ot(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Ot(o),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...h};let x={...p};const g={array:_w(),state:_w()},C=t.criteriaMode===Ir.all,k=$=>ee=>{clearTimeout(f),f=setTimeout($,ee)},S=async $=>{if(!l.keepIsValid&&!t.disabled&&(p.isValid||x.isValid||$)){let ee;t.resolver?(ee=bn((await Z()).errors),E()):ee=await O(r,!0),ee!==n.isValid&&g.state.next({isValid:ee})}},E=($,ee)=>{!t.disabled&&(p.isValidating||p.validatingFields||x.isValidating||x.validatingFields)&&(($||Array.from(u.mount)).forEach(ae=>{ae&&(ee?lt(n.validatingFields,ae,ee):Dt(n.validatingFields,ae))}),g.state.next({validatingFields:n.validatingFields,isValidating:!bn(n.validatingFields)}))},_=($,ee=[],ae,ke,ye=!0,B=!0)=>{if(ke&&ae&&!t.disabled){if(l.action=!0,B&&Array.isArray(Ce(r,$))){const se=ae(Ce(r,$),ke.argA,ke.argB);ye&<(r,$,se)}if(B&&Array.isArray(Ce(n.errors,$))){const se=ae(Ce(n.errors,$),ke.argA,ke.argB);ye&<(n.errors,$,se),Lz(n.errors,$)}if((p.touchedFields||x.touchedFields)&&B&&Array.isArray(Ce(n.touchedFields,$))){const se=ae(Ce(n.touchedFields,$),ke.argA,ke.argB);ye&<(n.touchedFields,$,se)}(p.dirtyFields||x.dirtyFields)&&(n.dirtyFields=As(o,a)),g.state.next({name:$,isDirty:M($,ee),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else lt(a,$,ee)},P=($,ee)=>{lt(n.errors,$,ee),g.state.next({errors:n.errors})},R=$=>{n.errors=$,g.state.next({errors:n.errors,isValid:!1})},A=($,ee,ae,ke)=>{const ye=Ce(r,$);if(ye){const B=Ce(a,$,wt(ae)?Ce(o,$):ae);wt(B)||ke&&ke.defaultChecked||ee?lt(a,$,ee?B:jw(ye._f)):U($,B),l.mount&&!l.action&&S()}},j=($,ee,ae,ke,ye)=>{let B=!1,se=!1;const we={name:$};if(!t.disabled){if(!ae||ke){(p.isDirty||x.isDirty)&&(se=n.isDirty,n.isDirty=we.isDirty=M(),B=se!==we.isDirty);const _e=Ar(Ce(o,$),ee);se=!!Ce(n.dirtyFields,$),_e?Dt(n.dirtyFields,$):lt(n.dirtyFields,$,!0),we.dirtyFields=n.dirtyFields,B=B||(p.dirtyFields||x.dirtyFields)&&se!==!_e}if(ae){const _e=Ce(n.touchedFields,$);_e||(lt(n.touchedFields,$,ae),we.touchedFields=n.touchedFields,B=B||(p.touchedFields||x.touchedFields)&&_e!==ae)}B&&ye&&g.state.next(we)}return B?we:{}},F=($,ee,ae,ke)=>{const ye=Ce(n.errors,$),B=(p.isValid||x.isValid)&&Kn(ee)&&n.isValid!==ee;if(t.delayError&&ae?(d=k(()=>P($,ae)),d(t.delayError)):(clearTimeout(f),d=null,ae?lt(n.errors,$,ae):Dt(n.errors,$)),(ae?!Ar(ye,ae):ye)||!bn(ke)||B){const se={...ke,...B&&Kn(ee)?{isValid:ee}:{},errors:n.errors,name:$};n={...n,...se},g.state.next(se)}},Z=async $=>(E($,!0),await t.resolver(a,t.context,Iz($||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),re=async $=>{const{errors:ee}=await Z($);if(E($),$)for(const ae of $){const ke=Ce(ee,ae);ke?lt(n.errors,ae,ke):Dt(n.errors,ae)}else n.errors=ee;return ee},O=async($,ee,ae={valid:!0})=>{for(const ke in $){const ye=$[ke];if(ye){const{_f:B,...se}=ye;if(B){const we=u.array.has(B.name),_e=ye._f&&Az(ye._f);_e&&p.validatingFields&&E([B.name],!0);const ze=await zw(ye,u.disabled,a,C,t.shouldUseNativeValidation&&!ee,we);if(_e&&p.validatingFields&&E([B.name]),ze[B.name]&&(ae.valid=!1,ee||e.shouldUseNativeValidation))break;!ee&&(Ce(ze,B.name)?we?Fz(n.errors,ze,B.name):lt(n.errors,B.name,ze[B.name]):Dt(n.errors,B.name))}!bn(se)&&await O(se,ee,ae)}}return ae.valid},Y=()=>{for(const $ of u.unMount){const ee=Ce(r,$);ee&&(ee._f.refs?ee._f.refs.every(ae=>!Zh(ae)):!Zh(ee._f.ref))&&me($)}u.unMount=new Set},M=($,ee)=>!t.disabled&&($&&ee&<(a,$,ee),!Ar(L(),o)),ne=($,ee,ae)=>Hp($,u,{...l.mount?a:wt(ee)?o:Xn($)?{[$]:ee}:ee},ae,ee),W=$=>Ym(Ce(l.mount?a:o,$,t.shouldUnregister?Ce(o,$,[]):[])),U=($,ee,ae={})=>{const ke=Ce(r,$);let ye=ee;if(ke){const B=ke._f;B&&(!B.disabled&<(a,$,qS(ee,B)),ye=Hc(B.ref)&&Vn(ee)?"":ee,HS(B.ref)?[...B.ref.options].forEach(se=>se.selected=ye.includes(se.value)):B.refs?Ml(B.ref)?B.refs.forEach(se=>{(!se.defaultChecked||!se.disabled)&&(Array.isArray(ye)?se.checked=!!ye.find(we=>we===se.value):se.checked=ye===se.value||!!ye)}):B.refs.forEach(se=>se.checked=se.value===ye):eg(B.ref)?B.ref.value="":(B.ref.value=ye,B.ref.type||g.state.next({name:$,values:Ot(a)})))}(ae.shouldDirty||ae.shouldTouch)&&j($,ye,ae.shouldTouch,ae.shouldDirty,!0),ae.shouldValidate&&N($)},Q=($,ee,ae)=>{for(const ke in ee){if(!ee.hasOwnProperty(ke))return;const ye=ee[ke],B=$+"."+ke,se=Ce(r,B);(u.array.has($)||Mt(ye)||se&&!se._f)&&!Ao(ye)?Q(B,ye,ae):U(B,ye,ae)}},J=($,ee,ae={})=>{const ke=Ce(r,$),ye=u.array.has($),B=Ot(ee);lt(a,$,B),ye?(g.array.next({name:$,values:Ot(a)}),(p.isDirty||p.dirtyFields||x.isDirty||x.dirtyFields)&&ae.shouldDirty&&g.state.next({name:$,dirtyFields:As(o,a),isDirty:M($,B)})):ke&&!ke._f&&!Vn(B)?Q($,B,ae):U($,B,ae),Aw($,u)?g.state.next({...n,name:$,values:Ot(a)}):g.state.next({name:l.mount?$:void 0,values:Ot(a)})},D=async $=>{l.mount=!0;const ee=$.target;let ae=ee.name,ke=!0;const ye=Ce(r,ae),B=_e=>{ke=Number.isNaN(_e)||Ao(_e)&&isNaN(_e.getTime())||Ar(_e,Ce(a,ae,_e))},se=Rw(t.mode),we=Rw(t.reValidateMode);if(ye){let _e,ze;const dt=ee.type?jw(ye._f):FS($),Nt=$.type===Bc.BLUR||$.type===Bc.FOCUS_OUT,Zt=!Oz(ye._f)&&!t.resolver&&!Ce(n.errors,ae)&&!ye._f.deps||Mz(Nt,Ce(n.touchedFields,ae),n.isSubmitted,we,se),$t=Aw(ae,u,Nt);lt(a,ae,dt),Nt?(!ee||!ee.readOnly)&&(ye._f.onBlur&&ye._f.onBlur($),d&&d(0)):ye._f.onChange&&ye._f.onChange($);const Pn=j(ae,dt,Nt),pt=!bn(Pn)||$t;if(!Nt&&g.state.next({name:ae,type:$.type,values:Ot(a)}),Zt)return(p.isValid||x.isValid)&&(t.mode==="onBlur"?Nt&&S():Nt||S()),pt&&g.state.next({name:ae,...$t?{}:Pn});if(!Nt&&$t&&g.state.next({...n}),t.resolver){const{errors:pn}=await Z([ae]);if(E([ae]),B(dt),ke){const Xt=Ow(n.errors,r,ae),oi=Ow(pn,r,Xt.name||ae);_e=oi.error,ae=oi.name,ze=bn(pn)}}else E([ae],!0),_e=(await zw(ye,u.disabled,a,C,t.shouldUseNativeValidation))[ae],E([ae]),B(dt),ke&&(_e?ze=!1:(p.isValid||x.isValid)&&(ze=await O(r,!0)));ke&&(ye._f.deps&&(!Array.isArray(ye._f.deps)||ye._f.deps.length>0)&&N(ye._f.deps),F(ae,ze,_e,Pn))}},G=($,ee)=>{if(Ce(n.errors,ee)&&$.focus)return $.focus(),1},N=async($,ee={})=>{let ae,ke;const ye=ll($);if(t.resolver){const B=await re(wt($)?$:ye);ae=bn(B),ke=$?!ye.some(se=>Ce(B,se)):ae}else $?(ke=(await Promise.all(ye.map(async B=>{const se=Ce(r,B);return await O(se&&se._f?{[B]:se}:se)}))).every(Boolean),!(!ke&&!n.isValid)&&S()):ke=ae=await O(r);return g.state.next({...!Xn($)||(p.isValid||x.isValid)&&ae!==n.isValid?{}:{name:$},...t.resolver||!$?{isValid:ae}:{},errors:n.errors}),ee.shouldFocus&&!ke&&ul(r,G,$?ye:u.mount),ke},L=($,ee)=>{let ae={...l.mount?a:o};return ee&&(ae=US(ee.dirtyFields?n.dirtyFields:n.touchedFields,ae)),wt($)?ae:Xn($)?Ce(ae,$):$.map(ke=>Ce(ae,ke))},K=($,ee)=>({invalid:!!Ce((ee||n).errors,$),isDirty:!!Ce((ee||n).dirtyFields,$),error:Ce((ee||n).errors,$),isValidating:!!Ce(n.validatingFields,$),isTouched:!!Ce((ee||n).touchedFields,$)}),I=$=>{$&&ll($).forEach(ee=>Dt(n.errors,ee)),g.state.next({errors:$?n.errors:{}})},ue=($,ee,ae)=>{const ke=(Ce(r,$,{_f:{}})._f||{}).ref,ye=Ce(n.errors,$)||{},{ref:B,message:se,type:we,..._e}=ye;lt(n.errors,$,{..._e,...ee,ref:ke}),g.state.next({name:$,errors:n.errors,isValid:!1}),ae&&ae.shouldFocus&&ke&&ke.focus&&ke.focus()},ve=($,ee)=>Sn($)?g.state.subscribe({next:ae=>"values"in ae&&$(ne(void 0,ee),ae)}):ne($,ee,!0),xe=$=>g.state.subscribe({next:ee=>{zz($.name,ee.name,$.exact)&&Dz(ee,$.formState||p,tr,$.reRenderRoot)&&$.callback({values:{...a},...n,...ee,defaultValues:o})}}).unsubscribe,ie=$=>(l.mount=!0,x={...x,...$.formState},xe({...$,formState:{...h,...$.formState}})),me=($,ee={})=>{for(const ae of $?ll($):u.mount)u.mount.delete(ae),u.array.delete(ae),ee.keepValue||(Dt(r,ae),Dt(a,ae)),!ee.keepError&&Dt(n.errors,ae),!ee.keepDirty&&Dt(n.dirtyFields,ae),!ee.keepTouched&&Dt(n.touchedFields,ae),!ee.keepIsValidating&&Dt(n.validatingFields,ae),!t.shouldUnregister&&!ee.keepDefaultValue&&Dt(o,ae);g.state.next({values:Ot(a)}),g.state.next({...n,...ee.keepDirty?{isDirty:M()}:{}}),!ee.keepIsValid&&S()},Se=({disabled:$,name:ee})=>{if(Kn($)&&l.mount||$||u.disabled.has(ee)){const ye=u.disabled.has(ee)!==!!$;$?u.disabled.add(ee):u.disabled.delete(ee),ye&&l.mount&&!l.action&&S()}},be=($,ee={})=>{let ae=Ce(r,$);const ke=Kn(ee.disabled)||Kn(t.disabled);return lt(r,$,{...ae||{},_f:{...ae&&ae._f?ae._f:{ref:{name:$}},name:$,mount:!0,...ee}}),u.mount.add($),ae?Se({disabled:Kn(ee.disabled)?ee.disabled:t.disabled,name:$}):A($,!0,ee.value),{...ke?{disabled:ee.disabled||t.disabled}:{},...t.progressive?{required:!!ee.required,min:el(ee.min),max:el(ee.max),minLength:el(ee.minLength),maxLength:el(ee.maxLength),pattern:el(ee.pattern)}:{},name:$,onChange:D,onBlur:D,ref:ye=>{if(ye){be($,ee),ae=Ce(r,$);const B=wt(ye.value)&&ye.querySelectorAll&&ye.querySelectorAll("input,select,textarea")[0]||ye,se=Pz(B),we=ae._f.refs||[];if(se?we.find(_e=>_e===B):B===ae._f.ref)return;lt(r,$,{_f:{...ae._f,...se?{refs:[...we.filter(Zh),B,...Array.isArray(Ce(o,$))?[{}]:[]],ref:{type:B.type,name:$}}:{ref:B}}}),A($,!1,void 0,B)}else ae=Ce(r,$,{}),ae._f&&(ae._f.mount=!1),(t.shouldUnregister||ee.shouldUnregister)&&!($S(u.array,$)&&l.action)&&u.unMount.add($)}}},Ae=()=>t.shouldFocusError&&ul(r,G,u.mount),Ve=$=>{Kn($)&&(g.state.next({disabled:$}),ul(r,(ee,ae)=>{const ke=Ce(r,ae);ke&&(ee.disabled=ke._f.disabled||$,Array.isArray(ke._f.refs)&&ke._f.refs.forEach(ye=>{ye.disabled=ke._f.disabled||$}))},0,!1))},nt=($,ee)=>async ae=>{let ke;ae&&(ae.preventDefault&&ae.preventDefault(),ae.persist&&ae.persist());let ye=Ot(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:B,values:se}=await Z();E(),n.errors=B,ye=Ot(se)}else await O(r);if(u.disabled.size)for(const B of u.disabled)Dt(ye,B);if(Dt(n.errors,"root"),bn(n.errors)){g.state.next({errors:{}});try{await $(ye,ae)}catch(B){ke=B}}else ee&&await ee({...n.errors},ae),Ae(),setTimeout(Ae);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bn(n.errors)&&!ke,submitCount:n.submitCount+1,errors:n.errors}),ke)throw ke},It=($,ee={})=>{Ce(r,$)&&(wt(ee.defaultValue)?J($,Ot(Ce(o,$))):(J($,ee.defaultValue),lt(o,$,Ot(ee.defaultValue))),ee.keepTouched||Dt(n.touchedFields,$),ee.keepDirty||(Dt(n.dirtyFields,$),n.isDirty=ee.defaultValue?M($,Ot(Ce(o,$))):M()),ee.keepError||(Dt(n.errors,$),p.isValid&&S()),g.state.next({...n}))},sn=($,ee={})=>{const ae=$?Ot($):o,ke=Ot(ae),ye=bn($),B=ye?o:ke;if(ee.keepDefaultValues||(o=ae),!ee.keepValues){if(ee.keepDirtyValues){const se=new Set([...u.mount,...Object.keys(As(o,a))]);for(const we of Array.from(se)){const _e=Ce(n.dirtyFields,we),ze=Ce(a,we),dt=Ce(B,we);_e&&!wt(ze)?lt(B,we,ze):!_e&&!wt(dt)&&J(we,dt)}}else{if(Qm&&wt($))for(const se of u.mount){const we=Ce(r,se);if(we&&we._f){const _e=Array.isArray(we._f.refs)?we._f.refs[0]:we._f.ref;if(Hc(_e)){const ze=_e.closest("form");if(ze){ze.reset();break}}}}if(ee.keepFieldsRef)for(const se of u.mount)J(se,Ce(B,se));else r={}}a=t.shouldUnregister?ee.keepDefaultValues?Ot(o):{}:Ot(B),g.array.next({values:{...B}}),g.state.next({values:{...B}})}u={mount:ee.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!p.isValid||!!ee.keepIsValid||!!ee.keepDirtyValues||!t.shouldUnregister&&!bn(B),l.watch=!!t.shouldUnregister,l.keepIsValid=!!ee.keepIsValid,l.action=!1,ee.keepErrors||(n.errors={}),g.state.next({submitCount:ee.keepSubmitCount?n.submitCount:0,isDirty:ye?!1:ee.keepDirty?n.isDirty:!!(ee.keepDefaultValues&&!Ar($,o)),isSubmitted:ee.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ye?{}:ee.keepDirtyValues?ee.keepDefaultValues&&a?As(o,a):n.dirtyFields:ee.keepDefaultValues&&$?As(o,$):ee.keepDirty?n.dirtyFields:{},touchedFields:ee.keepTouched?n.touchedFields:{},errors:ee.keepErrors?n.errors:{},isSubmitSuccessful:ee.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Gt=($,ee)=>sn(Sn($)?$(a):$,{...t.resetOptions,...ee}),an=($,ee={})=>{const ae=Ce(r,$),ke=ae&&ae._f;if(ke){const ye=ke.refs?ke.refs[0]:ke.ref;ye.focus&&setTimeout(()=>{ye.focus(),ee.shouldSelect&&Sn(ye.select)&&ye.select()})}},tr=$=>{n={...n,...$}},Tn={control:{register:be,unregister:me,getFieldState:K,handleSubmit:nt,setError:ue,_subscribe:xe,_runSchema:Z,_updateIsValidating:E,_focusError:Ae,_getWatch:ne,_getDirty:M,_setValid:S,_setFieldArray:_,_setDisabledField:Se,_setErrors:R,_getFieldArray:W,_reset:sn,_resetDefaultValues:()=>Sn(t.defaultValues)&&t.defaultValues().then($=>{Gt($,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:Y,_disableForm:Ve,_subjects:g,_proxyFormState:p,get _fields(){return r},get _formValues(){return a},get _state(){return l},set _state($){l=$},get _defaultValues(){return o},get _names(){return u},set _names($){u=$},get _formState(){return n},get _options(){return t},set _options($){t={...t,...$}}},subscribe:ie,trigger:N,register:be,handleSubmit:nt,watch:ve,setValue:J,getValues:L,reset:Gt,resetField:It,clearErrors:I,unregister:me,setError:ue,setFocus:an,getFieldState:K};return{...Tn,formControl:Tn}}function ng(e={}){const t=le.useRef(void 0),n=le.useRef(void 0),[r,o]=le.useState({isDirty:!1,isValidating:!1,isLoading:Sn(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:Sn(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Sn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...u}=Vz(e);t.current={...u,formState:r}}const a=t.current.control;return a._options=e,Xm(()=>{const l=a._subscribe({formState:a._proxyFormState,callback:()=>o({...a._formState}),reRenderRoot:!0});return o(u=>({...u,isReady:!0})),a._formState.isReady=!0,l},[a]),le.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),le.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),le.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),le.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),le.useEffect(()=>{if(a._proxyFormState.isDirty){const l=a._getDirty();l!==r.isDirty&&a._subjects.state.next({isDirty:l})}},[a,r.isDirty]),le.useEffect(()=>{var l;e.values&&!Ar(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((l=a._options.resetOptions)===null||l===void 0)&&l.keepIsValid||a._setValid(),n.current=e.values,o(u=>({...u}))):a._resetDefaultValues()},[a,e.values]),le.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=le.useMemo(()=>BS(r,a),[a,r]),t.current}const ei=b.forwardRef(({className:e,type:t,...n},r)=>y.jsx("input",{type:t,"data-slot":"input",className:Be("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),ref:r,...n}));ei.displayName="Input";const Ll=b.forwardRef(({className:e,...t},n)=>y.jsx("textarea",{"data-slot":"textarea",className:Be("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Ll.displayName="Textarea";var qh,Mw;function Bz(){if(Mw)return qh;Mw=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt,d=typeof Xu=="object"&&Xu&&Xu.Object===Object&&Xu,f=typeof self=="object"&&self&&self.Object===Object&&self,h=d||f||Function("return this")(),p=Object.prototype,x=p.toString,g=Math.max,C=Math.min,k=function(){return h.Date.now()};function S(A,j,F){var Z,re,O,Y,M,ne,W=0,U=!1,Q=!1,J=!0;if(typeof A!="function")throw new TypeError(e);j=R(j)||0,E(F)&&(U=!!F.leading,Q="maxWait"in F,O=Q?g(R(F.maxWait)||0,j):O,J="trailing"in F?!!F.trailing:J);function D(ie){var me=Z,Se=re;return Z=re=void 0,W=ie,Y=A.apply(Se,me),Y}function G(ie){return W=ie,M=setTimeout(K,j),U?D(ie):Y}function N(ie){var me=ie-ne,Se=ie-W,be=j-me;return Q?C(be,O-Se):be}function L(ie){var me=ie-ne,Se=ie-W;return ne===void 0||me>=j||me<0||Q&&Se>=O}function K(){var ie=k();if(L(ie))return I(ie);M=setTimeout(K,N(ie))}function I(ie){return M=void 0,J&&Z?D(ie):(Z=re=void 0,Y)}function ue(){M!==void 0&&clearTimeout(M),W=0,Z=ne=re=M=void 0}function ve(){return M===void 0?Y:I(k())}function xe(){var ie=k(),me=L(ie);if(Z=arguments,re=this,ne=ie,me){if(M===void 0)return G(ne);if(Q)return M=setTimeout(K,j),D(ne)}return M===void 0&&(M=setTimeout(K,j)),Y}return xe.cancel=ue,xe.flush=ve,xe}function E(A){var j=typeof A;return!!A&&(j=="object"||j=="function")}function _(A){return!!A&&typeof A=="object"}function P(A){return typeof A=="symbol"||_(A)&&x.call(A)==n}function R(A){if(typeof A=="number")return A;if(P(A))return t;if(E(A)){var j=typeof A.valueOf=="function"?A.valueOf():A;A=E(j)?j+"":j}if(typeof A!="string")return A===0?A:+A;A=A.replace(r,"");var F=a.test(A);return F||l.test(A)?u(A.slice(2),F?2:8):o.test(A)?t:+A}return qh=S,qh}Bz();var Uz=typeof window<"u"?b.useLayoutEffect:b.useEffect;function Hz(e,t,n,r){const o=b.useRef(t);Uz(()=>{o.current=t},[t]),b.useEffect(()=>{const a=window;if(!(a&&a.addEventListener))return;const l=u=>{o.current(u)};return a.addEventListener(e,l,r),()=>{a.removeEventListener(e,l,r)}},[e,n,r])}function YS(e,t,n="mousedown",r={}){Hz(n,o=>{const a=o.target;if(!a||!a.isConnected)return;(Array.isArray(e)?e.filter(u=>!!u.current).every(u=>u.current&&!u.current.contains(a)):e.current&&!e.current.contains(a))&&t(o)},void 0,r)}function KS({options:e,value:t,onValueChange:n,placeholder:r="Select...",emptyText:o="No results found",className:a}){const[l,u]=b.useState(!1),[d,f]=b.useState(""),h=b.useRef(null),p=b.useRef(null),x=b.useMemo(()=>{if(!d)return e;const S=d.toLowerCase();return e.filter(E=>E.label.toLowerCase().includes(S)||E.value.toLowerCase().includes(S))},[e,d]),g=e.find(S=>S.value===t);b.useEffect(()=>{l&&setTimeout(()=>{var S;return(S=p.current)==null?void 0:S.focus()},10)},[l]),YS(h,()=>{u(!1),f("")});const C=S=>{n(S===t?null:S),u(!1),f("")},k=S=>{S.stopPropagation(),n(null),f("")};return y.jsxs("div",{ref:h,className:Be("relative",a),children:[y.jsxs(it,{type:"button",variant:"outline",role:"combobox","aria-expanded":l,className:"w-full justify-between font-normal",onClick:()=>{u(!l)},children:[y.jsx("span",{className:"truncate",children:g?g.label:r}),y.jsxs("div",{className:"flex items-center gap-1 ml-2 shrink-0",children:[t&&y.jsx(cd,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:k}),y.jsx(Lj,{className:"h-4 w-4 opacity-50"})]})]}),l&&y.jsxs("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-md",children:[y.jsx("div",{className:"p-2",children:y.jsx(ei,{ref:p,placeholder:"Search...",value:d,onChange:S=>f(S.target.value),className:"h-8"})}),y.jsx("div",{className:"max-h-[200px] overflow-y-auto p-1",children:x.length===0?y.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o}):x.map(S=>y.jsxs("button",{type:"button",className:Be("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 px-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",t===S.value&&"bg-accent"),onClick:()=>C(S.value),children:[y.jsx(ck,{className:Be("mr-2 h-4 w-4",t===S.value?"opacity-100":"opacity-0")}),y.jsx("span",{className:"truncate",children:S.label})]},S.value))})]})]})}const Pd=["todo","in_progress","completed","wont_fix","archived"],rg=["todo","in_progress","completed","archived"],na={todo:"TODO",in_progress:"In Progress",completed:"Completed",wont_fix:"Won't Fix",archived:"Archived"},Lw={todo:{bg:"#6b7280",text:"#ffffff"},in_progress:{bg:"#3b82f6",text:"#ffffff"},completed:{bg:"#22c55e",text:"#ffffff"},wont_fix:{bg:"#f59e0b",text:"#ffffff"},archived:{bg:"#9ca3af",text:"#ffffff"}},Nd={0:"Critical",1:"High",2:"Medium",3:"Low",4:"Backlog",5:"Someday"},Zc={0:{bg:"#dc2626",text:"#ffffff"},1:{bg:"#ea580c",text:"#ffffff"},2:{bg:"#ca8a04",text:"#ffffff"},3:{bg:"#6b7280",text:"#ffffff"},4:{bg:"#6b7280",text:"#ffffff"},5:{bg:"#9ca3af",text:"#ffffff"}};function Wz({form:e,type:t,epics:n,parentTasks:r}){const{register:o,control:a,formState:{errors:l}}=e,u=t==="epic"?rg:Pd;return y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Wt,{children:["Title ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(ei,{...o("title"),placeholder:`${t.charAt(0).toUpperCase()+t.slice(1)} title`}),l.title&&y.jsx("p",{className:"text-sm text-destructive",children:String(l.title.message)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(Ll,{...o("description"),placeholder:"Optional description",rows:3})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Status"}),y.jsx(Uc,{control:a,name:"status",render:({field:d})=>y.jsxs(dr,{value:d.value,onValueChange:d.onChange,children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsx(pr,{children:u.map(f=>y.jsx(nn,{value:f,children:na[f]},f))})]})})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Uc,{control:a,name:"priority",render:({field:d})=>y.jsxs(dr,{value:String(d.value),onValueChange:f=>d.onChange(parseInt(f,10)),children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsx(pr,{children:Object.entries(Nd).map(([f,h])=>y.jsxs(nn,{value:f,children:["P",f," - ",h]},f))})]})})]})]}),t==="task"&&y.jsx(Zz,{form:e,epics:n}),t==="subtask"&&y.jsx(qz,{form:e,parentTasks:r})]})}function Zz({form:e,epics:t}){const{register:n,control:r}=e,o=b.useMemo(()=>t.map(a=>({value:a.id,label:`${a.id}: ${a.title}`})),[t]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(ei,{...n("tags"),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Epic"}),y.jsx(Uc,{control:r,name:"epicId",render:({field:a})=>y.jsx(KS,{options:o,value:a.value,onValueChange:a.onChange,placeholder:"No Epic",emptyText:"No epics found"})})]})]})}function qz({form:e,parentTasks:t}){const{register:n,control:r,formState:{errors:o}}=e,a=b.useMemo(()=>t.map(l=>({value:l.id,label:`${l.id}: ${l.title}`})),[t]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(ei,{...n("tags"),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Wt,{children:["Parent Task ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(Uc,{control:r,name:"parentTaskId",render:({field:l})=>y.jsx(KS,{options:a,value:l.value||null,onValueChange:u=>l.onChange(u||""),placeholder:"Select a task...",emptyText:"No tasks found"})}),o.parentTaskId&&y.jsx("p",{className:"text-sm text-destructive",children:String(o.parentTaskId.message)})]})]})}const Fw=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ce(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},qp=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Fw(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>Fw(o,n,e))}},$w=(e,t)=>{t.shouldUseNativeValidation&&qp(e,t);const n={};for(const r in e){const o=Ce(t.fields,r),a=Object.assign(e[r]||{},{ref:o&&o.ref});if(Qz(t.names||Object.keys(e),r)){const l=Object.assign({},Ce(n,r));lt(l,"root",a),lt(n,r,l)}else lt(n,r,a)}return n},Qz=(e,t)=>{const n=Vw(t);return e.some(r=>Vw(r).match(`^${n}\\.\\d+`))};function Vw(e){return e.replace(/\]|\[/g,"")}function ce(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=l.prototype,h=Object.keys(f);for(let p=0;p<h.length;p++){const x=h[p];x in u||(u[x]=f[x].bind(u))}}const o=(n==null?void 0:n.Parent)??Object;class a extends o{}Object.defineProperty(a,"name",{value:e});function l(u){var d;const f=n!=null&&n.Parent?new a:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const h of f._zod.deferred)h();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>{var d,f;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(f=(d=u==null?void 0:u._zod)==null?void 0:d.traits)==null?void 0:f.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class Ls extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class GS extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const XS={};function Ko(e){return XS}function JS(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Qp(e,t){return typeof t=="bigint"?t.toString():t}function ig(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function og(e){return e==null}function sg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Yz(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d!=null&&d[1]&&(o=Number.parseInt(d[1]))}const a=n>o?n:o,l=Number.parseInt(e.toFixed(a).replace(".","")),u=Number.parseInt(t.toFixed(a).replace(".",""));return l%u/10**a}const Bw=Symbol("evaluating");function ut(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Bw)return r===void 0&&(r=Bw,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ts(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function po(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Uw(e){return JSON.stringify(e)}function Kz(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const eC="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Gz=ig(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function xl(e){if(qc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(qc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function tC(e){return xl(e)?{...e}:Array.isArray(e)?[...e]:e}const Xz=new Set(["string","number","symbol"]);function jd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Jz(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const eM={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tM(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const a=po(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return ts(this,"shape",l),l},checks:[]});return mo(e,a)}function nM(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const a=po(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return ts(this,"shape",l),l},checks:[]});return mo(e,a)}function rM(e,t){if(!xl(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const a=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(a,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=po(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return ts(this,"shape",a),a}});return mo(e,o)}function iM(e,t){if(!xl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=po(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return ts(this,"shape",r),r}});return mo(e,n)}function oM(e,t){const n=po(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return ts(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return mo(e,n)}function sM(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=po(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return ts(this,"shape",d),d},checks:[]});return mo(t,l)}function aM(e,t,n){const r=po(t._zod.def,{get shape(){const o=t._zod.def.shape,a={...o};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(a[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)a[l]=new e({type:"nonoptional",innerType:o[l]});return ts(this,"shape",a),a}});return mo(t,r)}function Ds(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function nC(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function cc(e){return typeof e=="string"?e:e==null?void 0:e.message}function Go(e,t,n){var o,a,l,u,d,f;const r={...e,path:e.path??[]};if(!e.message){const h=cc((l=(a=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:a.error)==null?void 0:l.call(a,e))??cc((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??cc((d=n.customError)==null?void 0:d.call(n,e))??cc((f=n.localeError)==null?void 0:f.call(n,e))??"Invalid input";r.message=h}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function ag(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function wl(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const rC=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Qp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},lg=ce("$ZodError",rC),Rd=ce("$ZodError",rC,{Parent:Error});function lM(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function uM(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>r({issues:l}));else if(a.code==="invalid_key")r({issues:a.issues});else if(a.code==="invalid_element")r({issues:a.issues});else if(a.path.length===0)n._errors.push(t(a));else{let l=n,u=0;for(;u<a.path.length;){const d=a.path[u];u===a.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return r(e),n}const Id=e=>(t,n,r,o)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise)throw new Ls;if(l.issues.length){const u=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Go(d,a,Ko())));throw eC(u,o==null?void 0:o.callee),u}return l.value},cM=Id(Rd),Ad=e=>async(t,n,r,o)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Go(d,a,Ko())));throw eC(u,o==null?void 0:o.callee),u}return l.value},dM=Ad(Rd),Od=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Ls;return a.issues.length?{success:!1,error:new(e??lg)(a.issues.map(l=>Go(l,o,Ko())))}:{success:!0,data:a.value}},fM=Od(Rd),Dd=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(l=>Go(l,o,Ko())))}:{success:!0,data:a.value}},hM=Dd(Rd),pM=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Id(e)(t,n,o)},mM=e=>(t,n,r)=>Id(e)(t,n,r),gM=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ad(e)(t,n,o)},yM=e=>async(t,n,r)=>Ad(e)(t,n,r),vM=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Od(e)(t,n,o)},xM=e=>(t,n,r)=>Od(e)(t,n,r),wM=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dd(e)(t,n,o)},bM=e=>async(t,n,r)=>Dd(e)(t,n,r),kM=/^[cC][^\s-]{8,}$/,SM=/^[0-9a-z]+$/,CM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,EM=/^[0-9a-vA-V]{20}$/,_M=/^[A-Za-z0-9]{27}$/,TM=/^[a-zA-Z0-9_-]{21}$/,PM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,NM=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Hw=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,jM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,RM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function IM(){return new RegExp(RM,"u")}const AM=/^(?:(?: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])$/,OM=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,DM=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,zM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,MM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,iC=/^[A-Za-z0-9_-]*$/,LM=/^\+[1-9]\d{6,14}$/,oC="(?:(?:\\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])))",FM=new RegExp(`^${oC}$`);function sC(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $M(e){return new RegExp(`^${sC(e)}$`)}function VM(e){const t=sC({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${oC}T(?:${r})$`)}const BM=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},UM=/^-?\d+$/,HM=/^-?\d+(?:\.\d+)?$/,WM=/^[^A-Z]*$/,ZM=/^[^a-z]*$/,Un=ce("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),aC={number:"number",bigint:"bigint",object:"date"},lC=ce("$ZodCheckLessThan",(e,t)=>{Un.init(e,t);const n=aC[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,a=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),uC=ce("$ZodCheckGreaterThan",(e,t)=>{Un.init(e,t);const n=aC[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,a=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qM=ce("$ZodCheckMultipleOf",(e,t)=>{Un.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Yz(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),QM=ce("$ZodCheckNumberFormat",(e,t)=>{var l;Un.init(e,t),t.format=t.format||"float64";const n=(l=t.format)==null?void 0:l.includes("int"),r=n?"int":"number",[o,a]=eM[t.format];e._zod.onattach.push(u=>{const d=u._zod.bag;d.format=t.format,d.minimum=o,d.maximum=a,n&&(d.pattern=UM)}),e._zod.check=u=>{const d=u.value;if(n){if(!Number.isInteger(d)){u.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?u.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):u.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}d<o&&u.issues.push({origin:"number",input:d,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),d>a&&u.issues.push({origin:"number",input:d,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),YM=ce("$ZodCheckMaxLength",(e,t)=>{var n;Un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!og(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const l=ag(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),KM=ce("$ZodCheckMinLength",(e,t)=>{var n;Un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!og(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const l=ag(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),GM=ce("$ZodCheckLengthEquals",(e,t)=>{var n;Un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!og(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,a=o.length;if(a===t.length)return;const l=ag(o),u=a>t.length;r.issues.push({origin:l,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),zd=ce("$ZodCheckStringFormat",(e,t)=>{var n,r;Un.init(e,t),e._zod.onattach.push(o=>{const a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),XM=ce("$ZodCheckRegex",(e,t)=>{zd.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),JM=ce("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=WM),zd.init(e,t)}),eL=ce("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ZM),zd.init(e,t)}),tL=ce("$ZodCheckIncludes",(e,t)=>{Un.init(e,t);const n=jd(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const a=o._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),nL=ce("$ZodCheckStartsWith",(e,t)=>{Un.init(e,t);const n=new RegExp(`^${jd(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),rL=ce("$ZodCheckEndsWith",(e,t)=>{Un.init(e,t);const n=new RegExp(`.*${jd(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),iL=ce("$ZodCheckOverwrite",(e,t)=>{Un.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class oL{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
270
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},YO="DialogDescriptionWarning",KO=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${U1(YO).contentName}}.`;return b.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},H1=j1,W1=A1,Z1=O1,q1=D1,Q1=M1,GO=F1,Y1=V1;function XO({...e}){return y.jsx(H1,{"data-slot":"sheet",...e})}function JO({...e}){return y.jsx(W1,{"data-slot":"sheet-portal",...e})}function eD({className:e,...t}){return y.jsx(Z1,{"data-slot":"sheet-overlay",className:Be("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function tD({className:e,children:t,side:n="right",...r}){return y.jsxs(JO,{children:[y.jsx(eD,{}),y.jsxs(q1,{"data-slot":"sheet-content",className:Be("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,y.jsxs(Y1,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[y.jsx(cd,{className:"size-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function nD({className:e,...t}){return y.jsx("div",{"data-slot":"sheet-header",className:Be("flex flex-col gap-1.5 p-4",e),...t})}function rD({className:e,...t}){return y.jsx("div",{"data-slot":"sheet-footer",className:Be("mt-auto flex flex-col gap-2 p-4",e),...t})}function iD({className:e,...t}){return y.jsx(Q1,{"data-slot":"sheet-title",className:Be("text-foreground font-semibold",e),...t})}var oD=b.createContext(void 0);function K1(e){const t=b.useContext(oD);return e||t||"ltr"}function Lp(e,[t,n]){return Math.min(n,Math.max(t,e))}function sD(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Um="ScrollArea",[G1]=ca(Um),[aD,gr]=G1(Um),X1=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...l}=e,[u,d]=b.useState(null),[f,h]=b.useState(null),[p,x]=b.useState(null),[g,C]=b.useState(null),[k,S]=b.useState(null),[E,_]=b.useState(0),[P,R]=b.useState(0),[A,j]=b.useState(!1),[F,Z]=b.useState(!1),re=ct(t,Y=>d(Y)),O=K1(o);return y.jsx(aD,{scope:n,type:r,dir:O,scrollHideDelay:a,scrollArea:u,viewport:f,onViewportChange:h,content:p,onContentChange:x,scrollbarX:g,onScrollbarXChange:C,scrollbarXEnabled:A,onScrollbarXEnabledChange:j,scrollbarY:k,onScrollbarYChange:S,scrollbarYEnabled:F,onScrollbarYEnabledChange:Z,onCornerWidthChange:_,onCornerHeightChange:R,children:y.jsx(tt.div,{dir:O,...l,ref:re,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":P+"px",...e.style}})})});X1.displayName=Um;var J1="ScrollAreaViewport",eS=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,l=gr(J1,n),u=b.useRef(null),d=ct(t,u,l.onViewportChange);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),y.jsx(tt.div,{"data-radix-scroll-area-viewport":"",...a,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:y.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});eS.displayName=J1;var ri="ScrollAreaScrollbar",tS=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gr(ri,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:l}=o,u=e.orientation==="horizontal";return b.useEffect(()=>(u?a(!0):l(!0),()=>{u?a(!1):l(!1)}),[u,a,l]),o.type==="hover"?y.jsx(lD,{...r,ref:t,forceMount:n}):o.type==="scroll"?y.jsx(uD,{...r,ref:t,forceMount:n}):o.type==="auto"?y.jsx(nS,{...r,ref:t,forceMount:n}):o.type==="always"?y.jsx(Hm,{...r,ref:t}):null});tS.displayName=ri;var lD=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gr(ri,e.__scopeScrollArea),[a,l]=b.useState(!1);return b.useEffect(()=>{const u=o.scrollArea;let d=0;if(u){const f=()=>{window.clearTimeout(d),l(!0)},h=()=>{d=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",h),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",h)}}},[o.scrollArea,o.scrollHideDelay]),y.jsx(ni,{present:n||a,children:y.jsx(nS,{"data-state":a?"visible":"hidden",...r,ref:t})})}),uD=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gr(ri,e.__scopeScrollArea),a=e.orientation==="horizontal",l=Sd(()=>d("SCROLL_END"),100),[u,d]=sD("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,o.scrollHideDelay,d]),b.useEffect(()=>{const f=o.viewport,h=a?"scrollLeft":"scrollTop";if(f){let p=f[h];const x=()=>{const g=f[h];p!==g&&(d("SCROLL"),l()),p=g};return f.addEventListener("scroll",x),()=>f.removeEventListener("scroll",x)}},[o.viewport,a,d,l]),y.jsx(ni,{present:n||u!=="hidden",children:y.jsx(Hm,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),nS=b.forwardRef((e,t)=>{const n=gr(ri,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,l]=b.useState(!1),u=e.orientation==="horizontal",d=Sd(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?f:h)}},10);return ta(n.viewport,d),ta(n.content,d),y.jsx(ni,{present:r||a,children:y.jsx(Hm,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Hm=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=gr(ri,e.__scopeScrollArea),a=b.useRef(null),l=b.useRef(0),[u,d]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=aS(u.viewport,u.content),h={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:x=>a.current=x,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:x=>l.current=x};function p(x,g){return mD(x,l.current,u,g)}return n==="horizontal"?y.jsx(cD,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const x=o.viewport.scrollLeft,g=Sw(x,u,o.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollLeft=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollLeft=p(x,o.dir))}}):n==="vertical"?y.jsx(dD,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const x=o.viewport.scrollTop,g=Sw(x,u);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollTop=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollTop=p(x))}}):null}),cD=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=gr(ri,e.__scopeScrollArea),[l,u]=b.useState(),d=b.useRef(null),f=ct(t,d,a.onScrollbarXChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(iS,{"data-orientation":"horizontal",...o,ref:f,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":kd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,p)=>{if(a.viewport){const x=a.viewport.scrollLeft+h.deltaX;e.onWheelScroll(x),uS(x,p)&&h.preventDefault()}},onResize:()=>{d.current&&a.viewport&&l&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:$c(l.paddingLeft),paddingEnd:$c(l.paddingRight)}})}})}),dD=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=gr(ri,e.__scopeScrollArea),[l,u]=b.useState(),d=b.useRef(null),f=ct(t,d,a.onScrollbarYChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(iS,{"data-orientation":"vertical",...o,ref:f,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":kd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,p)=>{if(a.viewport){const x=a.viewport.scrollTop+h.deltaY;e.onWheelScroll(x),uS(x,p)&&h.preventDefault()}},onResize:()=>{d.current&&a.viewport&&l&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:$c(l.paddingTop),paddingEnd:$c(l.paddingBottom)}})}})}),[fD,rS]=G1(ri),iS=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:h,onResize:p,...x}=e,g=gr(ri,n),[C,k]=b.useState(null),S=ct(t,re=>k(re)),E=b.useRef(null),_=b.useRef(""),P=g.viewport,R=r.content-r.viewport,A=Bn(h),j=Bn(d),F=Sd(p,10);function Z(re){if(E.current){const O=re.clientX-E.current.left,Y=re.clientY-E.current.top;f({x:O,y:Y})}}return b.useEffect(()=>{const re=O=>{const Y=O.target;(C==null?void 0:C.contains(Y))&&A(O,R)};return document.addEventListener("wheel",re,{passive:!1}),()=>document.removeEventListener("wheel",re,{passive:!1})},[P,C,R,A]),b.useEffect(j,[r,j]),ta(C,F),ta(g.content,F),y.jsx(fD,{scope:n,scrollbar:C,hasThumb:o,onThumbChange:Bn(a),onThumbPointerUp:Bn(l),onThumbPositionChange:j,onThumbPointerDown:Bn(u),children:y.jsx(tt.div,{...x,ref:S,style:{position:"absolute",...x.style},onPointerDown:Ye(e.onPointerDown,re=>{re.button===0&&(re.target.setPointerCapture(re.pointerId),E.current=C.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),Z(re))}),onPointerMove:Ye(e.onPointerMove,Z),onPointerUp:Ye(e.onPointerUp,re=>{const O=re.target;O.hasPointerCapture(re.pointerId)&&O.releasePointerCapture(re.pointerId),document.body.style.webkitUserSelect=_.current,g.viewport&&(g.viewport.style.scrollBehavior=""),E.current=null})})})}),Fc="ScrollAreaThumb",oS=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=rS(Fc,e.__scopeScrollArea);return y.jsx(ni,{present:n||o.hasThumb,children:y.jsx(hD,{ref:t,...r})})}),hD=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=gr(Fc,n),l=rS(Fc,n),{onThumbPositionChange:u}=l,d=ct(t,p=>l.onThumbChange(p)),f=b.useRef(void 0),h=Sd(()=>{f.current&&(f.current(),f.current=void 0)},100);return b.useEffect(()=>{const p=a.viewport;if(p){const x=()=>{if(h(),!f.current){const g=gD(p,u);f.current=g,u()}};return u(),p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[a.viewport,h,u]),y.jsx(tt.div,{"data-state":l.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,p=>{const g=p.target.getBoundingClientRect(),C=p.clientX-g.left,k=p.clientY-g.top;l.onThumbPointerDown({x:C,y:k})}),onPointerUp:Ye(e.onPointerUp,l.onThumbPointerUp)})});oS.displayName=Fc;var Wm="ScrollAreaCorner",sS=b.forwardRef((e,t)=>{const n=gr(Wm,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?y.jsx(pD,{...e,ref:t}):null});sS.displayName=Wm;var pD=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=gr(Wm,n),[a,l]=b.useState(0),[u,d]=b.useState(0),f=!!(a&&u);return ta(o.scrollbarX,()=>{var p;const h=((p=o.scrollbarX)==null?void 0:p.offsetHeight)||0;o.onCornerHeightChange(h),d(h)}),ta(o.scrollbarY,()=>{var p;const h=((p=o.scrollbarY)==null?void 0:p.offsetWidth)||0;o.onCornerWidthChange(h),l(h)}),f?y.jsx(tt.div,{...r,ref:t,style:{width:a,height:u,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function $c(e){return e?parseInt(e,10):0}function aS(e,t){const n=e/t;return isNaN(n)?0:n}function kd(e){const t=aS(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function mD(e,t,n,r="ltr"){const o=kd(n),a=o/2,l=t||a,u=o-l,d=n.scrollbar.paddingStart+l,f=n.scrollbar.size-n.scrollbar.paddingEnd-u,h=n.content-n.viewport,p=r==="ltr"?[0,h]:[h*-1,0];return lS([d,f],p)(e)}function Sw(e,t,n="ltr"){const r=kd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,l=t.content-t.viewport,u=a-r,d=n==="ltr"?[0,l]:[l*-1,0],f=Lp(e,d);return lS([0,l],[0,u])(f)}function lS(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function uS(e,t){return e>0&&e<t}var gD=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},l=n.left!==a.left,u=n.top!==a.top;(l||u)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function Sd(e,t){const n=Bn(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ta(e,t){const n=Bn(t);rn(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var yD=X1,vD=eS,xD=sS;function wD({className:e,children:t,showScrollbar:n=!1,...r}){return y.jsxs(yD,{"data-slot":"scroll-area",className:Be("relative overflow-hidden",e),...r,children:[y.jsx(vD,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),y.jsx(bD,{forceMount:n?!0:void 0,className:n?"opacity-100":void 0}),y.jsx(xD,{})]})}function bD({className:e,orientation:t="vertical",...n}){return y.jsx(tS,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Be("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:y.jsx(oS,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var kD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],SD=kD.reduce((e,t)=>{const n=_m(`Primitive.${t}`),r=b.forwardRef((o,a)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),CD="Label",cS=b.forwardRef((e,t)=>y.jsx(SD.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));cS.displayName=CD;var ED=cS;function Wt({className:e,...t}){return y.jsx(ED,{"data-slot":"label",className:Be("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Cw(e){const t=_D(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(PD);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function _D(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=jD(o),u=ND(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TD=Symbol("radix.slottable");function PD(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TD}function ND(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jD(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function RD(e){const t=e+"CollectionProvider",[n,r]=ca(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=k=>{const{scope:S,children:E}=k,_=le.useRef(null),P=le.useRef(new Map).current;return y.jsx(o,{scope:S,itemMap:P,collectionRef:_,children:E})};l.displayName=t;const u=e+"CollectionSlot",d=Cw(u),f=le.forwardRef((k,S)=>{const{scope:E,children:_}=k,P=a(u,E),R=ct(S,P.collectionRef);return y.jsx(d,{ref:R,children:_})});f.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",x=Cw(h),g=le.forwardRef((k,S)=>{const{scope:E,children:_,...P}=k,R=le.useRef(null),A=ct(S,R),j=a(h,E);return le.useEffect(()=>(j.itemMap.set(R,{ref:R,...P}),()=>void j.itemMap.delete(R))),y.jsx(x,{[p]:"",ref:A,children:_})});g.displayName=h;function C(k){const S=a(e+"CollectionConsumer",k);return le.useCallback(()=>{const _=S.collectionRef.current;if(!_)return[];const P=Array.from(_.querySelectorAll(`[${p}]`));return Array.from(S.itemMap.values()).sort((j,F)=>P.indexOf(j.ref.current)-P.indexOf(F.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:l,Slot:f,ItemSlot:g},C,r]}function ID(e){const t=AD(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(DD);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function AD(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=MD(o),u=zD(a,o.props);return o.type!==b.Fragment&&(u.ref=r?aa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var OD=Symbol("radix.slottable");function DD(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===OD}function zD(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function MD(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function LD(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var FD=[" ","Enter","ArrowUp","ArrowDown"],$D=[" ","Enter"],Qo="Select",[Cd,Ed,VD]=RD(Qo),[ha]=ca(Qo,[VD,gd]),_d=gd(),[BD,fo]=ha(Qo),[UD,HD]=ha(Qo),dS=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:l,defaultValue:u,onValueChange:d,dir:f,name:h,autoComplete:p,disabled:x,required:g,form:C}=e,k=_d(t),[S,E]=b.useState(null),[_,P]=b.useState(null),[R,A]=b.useState(!1),j=K1(f),[F,Z]=Mc({prop:r,defaultProp:o??!1,onChange:a,caller:Qo}),[re,O]=Mc({prop:l,defaultProp:u,onChange:d,caller:Qo}),Y=b.useRef(null),M=S?C||!!S.closest("form"):!0,[ne,W]=b.useState(new Set),U=Array.from(ne).map(Q=>Q.props.value).join(";");return y.jsx(r1,{...k,children:y.jsxs(BD,{required:g,scope:t,trigger:S,onTriggerChange:E,valueNode:_,onValueNodeChange:P,valueNodeHasChildren:R,onValueNodeHasChildrenChange:A,contentId:Uo(),value:re,onValueChange:O,open:F,onOpenChange:Z,dir:j,triggerPointerDownPosRef:Y,disabled:x,children:[y.jsx(Cd.Provider,{scope:t,children:y.jsx(UD,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(Q=>{W(J=>new Set(J).add(Q))},[]),onNativeOptionRemove:b.useCallback(Q=>{W(J=>{const D=new Set(J);return D.delete(Q),D})},[]),children:n})}),M?y.jsxs(AS,{"aria-hidden":!0,required:g,tabIndex:-1,name:h,autoComplete:p,value:re,onChange:Q=>O(Q.target.value),disabled:x,form:C,children:[re===void 0?y.jsx("option",{value:""}):null,Array.from(ne)]},U):null]})})};dS.displayName=Qo;var fS="SelectTrigger",hS=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=_d(n),l=fo(fS,n),u=l.disabled||r,d=ct(t,l.onTriggerChange),f=Ed(n),h=b.useRef("touch"),[p,x,g]=DS(k=>{const S=f().filter(P=>!P.disabled),E=S.find(P=>P.value===l.value),_=zS(S,k,E);_!==void 0&&l.onValueChange(_.value)}),C=k=>{u||(l.onOpenChange(!0),g()),k&&(l.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})};return y.jsx(i1,{asChild:!0,...a,children:y.jsx(tt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":OS(l.value)?"":void 0,...o,ref:d,onClick:Ye(o.onClick,k=>{k.currentTarget.focus(),h.current!=="mouse"&&C(k)}),onPointerDown:Ye(o.onPointerDown,k=>{h.current=k.pointerType;const S=k.target;S.hasPointerCapture(k.pointerId)&&S.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(C(k),k.preventDefault())}),onKeyDown:Ye(o.onKeyDown,k=>{const S=p.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&x(k.key),!(S&&k.key===" ")&&FD.includes(k.key)&&(C(),k.preventDefault())})})})});hS.displayName=fS;var pS="SelectValue",mS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:l="",...u}=e,d=fo(pS,n),{onValueNodeHasChildrenChange:f}=d,h=a!==void 0,p=ct(t,d.onValueNodeChange);return rn(()=>{f(h)},[f,h]),y.jsx(tt.span,{...u,ref:p,style:{pointerEvents:"none"},children:OS(d.value)?y.jsx(y.Fragment,{children:l}):a})});mS.displayName=pS;var WD="SelectIcon",gS=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return y.jsx(tt.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});gS.displayName=WD;var ZD="SelectPortal",yS=e=>y.jsx(yd,{asChild:!0,...e});yS.displayName=ZD;var Yo="SelectContent",vS=b.forwardRef((e,t)=>{const n=fo(Yo,e.__scopeSelect),[r,o]=b.useState();if(rn(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Il.createPortal(y.jsx(xS,{scope:e.__scopeSelect,children:y.jsx(Cd.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),a):null}return y.jsx(wS,{...e,ref:t})});vS.displayName=Yo;var Pr=10,[xS,ho]=ha(Yo),qD="SelectContentImpl",QD=ID("SelectContent.RemoveScroll"),wS=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:x,collisionPadding:g,sticky:C,hideWhenDetached:k,avoidCollisions:S,...E}=e,_=fo(Yo,n),[P,R]=b.useState(null),[A,j]=b.useState(null),F=ct(t,ie=>R(ie)),[Z,re]=b.useState(null),[O,Y]=b.useState(null),M=Ed(n),[ne,W]=b.useState(!1),U=b.useRef(!1);b.useEffect(()=>{if(P)return P1(P)},[P]),x1();const Q=b.useCallback(ie=>{const[me,...Se]=M().map(Ve=>Ve.ref.current),[be]=Se.slice(-1),Ae=document.activeElement;for(const Ve of ie)if(Ve===Ae||(Ve==null||Ve.scrollIntoView({block:"nearest"}),Ve===me&&A&&(A.scrollTop=0),Ve===be&&A&&(A.scrollTop=A.scrollHeight),Ve==null||Ve.focus(),document.activeElement!==Ae))return},[M,A]),J=b.useCallback(()=>Q([Z,P]),[Q,Z,P]);b.useEffect(()=>{ne&&J()},[ne,J]);const{onOpenChange:D,triggerPointerDownPosRef:G}=_;b.useEffect(()=>{if(P){let ie={x:0,y:0};const me=be=>{var Ae,Ve;ie={x:Math.abs(Math.round(be.pageX)-(((Ae=G.current)==null?void 0:Ae.x)??0)),y:Math.abs(Math.round(be.pageY)-(((Ve=G.current)==null?void 0:Ve.y)??0))}},Se=be=>{ie.x<=10&&ie.y<=10?be.preventDefault():P.contains(be.target)||D(!1),document.removeEventListener("pointermove",me),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",Se,{capture:!0})}}},[P,D,G]),b.useEffect(()=>{const ie=()=>D(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[D]);const[N,L]=DS(ie=>{const me=M().filter(Ae=>!Ae.disabled),Se=me.find(Ae=>Ae.ref.current===document.activeElement),be=zS(me,ie,Se);be&&setTimeout(()=>be.ref.current.focus())}),K=b.useCallback((ie,me,Se)=>{const be=!U.current&&!Se;(_.value!==void 0&&_.value===me||be)&&(re(ie),be&&(U.current=!0))},[_.value]),I=b.useCallback(()=>P==null?void 0:P.focus(),[P]),ue=b.useCallback((ie,me,Se)=>{const be=!U.current&&!Se;(_.value!==void 0&&_.value===me||be)&&Y(ie)},[_.value]),ve=r==="popper"?Fp:bS,xe=ve===Fp?{side:u,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:x,collisionPadding:g,sticky:C,hideWhenDetached:k,avoidCollisions:S}:{};return y.jsx(xS,{scope:n,content:P,viewport:A,onViewportChange:j,itemRefCallback:K,selectedItem:Z,onItemLeave:I,itemTextRefCallback:ue,focusSelectedItem:J,selectedItemText:O,position:r,isPositioned:ne,searchRef:N,children:y.jsx(Fm,{as:QD,allowPinchZoom:!0,children:y.jsx(Lm,{asChild:!0,trapped:_.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:Ye(o,ie=>{var me;(me=_.trigger)==null||me.focus({preventScroll:!0}),ie.preventDefault()}),children:y.jsx(dd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:y.jsx(ve,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:ie=>ie.preventDefault(),...E,...xe,onPlaced:()=>W(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Ye(E.onKeyDown,ie=>{const me=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!me&&ie.key.length===1&&L(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let be=M().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const Ae=ie.target,Ve=be.indexOf(Ae);be=be.slice(Ve+1)}setTimeout(()=>Q(be)),ie.preventDefault()}})})})})})})});wS.displayName=qD;var YD="SelectItemAlignedPosition",bS=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=fo(Yo,n),l=ho(Yo,n),[u,d]=b.useState(null),[f,h]=b.useState(null),p=ct(t,F=>h(F)),x=Ed(n),g=b.useRef(!1),C=b.useRef(!0),{viewport:k,selectedItem:S,selectedItemText:E,focusSelectedItem:_}=l,P=b.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&f&&k&&S&&E){const F=a.trigger.getBoundingClientRect(),Z=f.getBoundingClientRect(),re=a.valueNode.getBoundingClientRect(),O=E.getBoundingClientRect();if(a.dir!=="rtl"){const Ae=O.left-Z.left,Ve=re.left-Ae,nt=F.left-Ve,It=F.width+nt,sn=Math.max(It,Z.width),Gt=window.innerWidth-Pr,an=Lp(Ve,[Pr,Math.max(Pr,Gt-sn)]);u.style.minWidth=It+"px",u.style.left=an+"px"}else{const Ae=Z.right-O.right,Ve=window.innerWidth-re.right-Ae,nt=window.innerWidth-F.right-Ve,It=F.width+nt,sn=Math.max(It,Z.width),Gt=window.innerWidth-Pr,an=Lp(Ve,[Pr,Math.max(Pr,Gt-sn)]);u.style.minWidth=It+"px",u.style.right=an+"px"}const Y=x(),M=window.innerHeight-Pr*2,ne=k.scrollHeight,W=window.getComputedStyle(f),U=parseInt(W.borderTopWidth,10),Q=parseInt(W.paddingTop,10),J=parseInt(W.borderBottomWidth,10),D=parseInt(W.paddingBottom,10),G=U+Q+ne+D+J,N=Math.min(S.offsetHeight*5,G),L=window.getComputedStyle(k),K=parseInt(L.paddingTop,10),I=parseInt(L.paddingBottom,10),ue=F.top+F.height/2-Pr,ve=M-ue,xe=S.offsetHeight/2,ie=S.offsetTop+xe,me=U+Q+ie,Se=G-me;if(me<=ue){const Ae=Y.length>0&&S===Y[Y.length-1].ref.current;u.style.bottom="0px";const Ve=f.clientHeight-k.offsetTop-k.offsetHeight,nt=Math.max(ve,xe+(Ae?I:0)+Ve+J),It=me+nt;u.style.height=It+"px"}else{const Ae=Y.length>0&&S===Y[0].ref.current;u.style.top="0px";const nt=Math.max(ue,U+k.offsetTop+(Ae?K:0)+xe)+Se;u.style.height=nt+"px",k.scrollTop=me-ue+k.offsetTop}u.style.margin=`${Pr}px 0`,u.style.minHeight=N+"px",u.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[x,a.trigger,a.valueNode,u,f,k,S,E,a.dir,r]);rn(()=>P(),[P]);const[R,A]=b.useState();rn(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);const j=b.useCallback(F=>{F&&C.current===!0&&(P(),_==null||_(),C.current=!1)},[P,_]);return y.jsx(GD,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:y.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:y.jsx(tt.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});bS.displayName=YD;var KD="SelectPopperPosition",Fp=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Pr,...a}=e,l=_d(n);return y.jsx(o1,{...l,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});Fp.displayName=KD;var[GD,Zm]=ha(Yo,{}),$p="SelectViewport",kS=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=ho($p,n),l=Zm($p,n),u=ct(t,a.onViewportChange),d=b.useRef(0);return y.jsxs(y.Fragment,{children:[y.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}),y.jsx(Cd.Slot,{scope:n,children:y.jsx(tt.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Ye(o.onScroll,f=>{const h=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&p){const g=Math.abs(d.current-h.scrollTop);if(g>0){const C=window.innerHeight-Pr*2,k=parseFloat(p.style.minHeight),S=parseFloat(p.style.height),E=Math.max(k,S);if(E<C){const _=E+g,P=Math.min(C,_),R=_-P;p.style.height=P+"px",p.style.bottom==="0px"&&(h.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}d.current=h.scrollTop})})})]})});kS.displayName=$p;var SS="SelectGroup",[XD,JD]=ha(SS),ez=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Uo();return y.jsx(XD,{scope:n,id:o,children:y.jsx(tt.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ez.displayName=SS;var CS="SelectLabel",tz=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=JD(CS,n);return y.jsx(tt.div,{id:o.id,...r,ref:t})});tz.displayName=CS;var Vc="SelectItem",[nz,ES]=ha(Vc),_S=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...l}=e,u=fo(Vc,n),d=ho(Vc,n),f=u.value===r,[h,p]=b.useState(a??""),[x,g]=b.useState(!1),C=ct(t,_=>{var P;return(P=d.itemRefCallback)==null?void 0:P.call(d,_,r,o)}),k=Uo(),S=b.useRef("touch"),E=()=>{o||(u.onValueChange(r),u.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 y.jsx(nz,{scope:n,value:r,disabled:o,textId:k,isSelected:f,onItemTextChange:b.useCallback(_=>{p(P=>P||((_==null?void 0:_.textContent)??"").trim())},[]),children:y.jsx(Cd.ItemSlot,{scope:n,value:r,disabled:o,textValue:h,children:y.jsx(tt.div,{role:"option","aria-labelledby":k,"data-highlighted":x?"":void 0,"aria-selected":f&&x,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:C,onFocus:Ye(l.onFocus,()=>g(!0)),onBlur:Ye(l.onBlur,()=>g(!1)),onClick:Ye(l.onClick,()=>{S.current!=="mouse"&&E()}),onPointerUp:Ye(l.onPointerUp,()=>{S.current==="mouse"&&E()}),onPointerDown:Ye(l.onPointerDown,_=>{S.current=_.pointerType}),onPointerMove:Ye(l.onPointerMove,_=>{var P;S.current=_.pointerType,o?(P=d.onItemLeave)==null||P.call(d):S.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(l.onPointerLeave,_=>{var P;_.currentTarget===document.activeElement&&((P=d.onItemLeave)==null||P.call(d))}),onKeyDown:Ye(l.onKeyDown,_=>{var R;((R=d.searchRef)==null?void 0:R.current)!==""&&_.key===" "||($D.includes(_.key)&&E(),_.key===" "&&_.preventDefault())})})})})});_S.displayName=Vc;var sl="SelectItemText",TS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,l=fo(sl,n),u=ho(sl,n),d=ES(sl,n),f=HD(sl,n),[h,p]=b.useState(null),x=ct(t,E=>p(E),d.onItemTextChange,E=>{var _;return(_=u.itemTextRefCallback)==null?void 0:_.call(u,E,d.value,d.disabled)}),g=h==null?void 0:h.textContent,C=b.useMemo(()=>y.jsx("option",{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:k,onNativeOptionRemove:S}=f;return rn(()=>(k(C),()=>S(C)),[k,S,C]),y.jsxs(y.Fragment,{children:[y.jsx(tt.span,{id:d.textId,...a,ref:x}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Il.createPortal(a.children,l.valueNode):null]})});TS.displayName=sl;var PS="SelectItemIndicator",NS=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ES(PS,n).isSelected?y.jsx(tt.span,{"aria-hidden":!0,...r,ref:t}):null});NS.displayName=PS;var Vp="SelectScrollUpButton",jS=b.forwardRef((e,t)=>{const n=ho(Vp,e.__scopeSelect),r=Zm(Vp,e.__scopeSelect),[o,a]=b.useState(!1),l=ct(t,r.onScrollButtonChange);return rn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;a(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(IS,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});jS.displayName=Vp;var Bp="SelectScrollDownButton",RS=b.forwardRef((e,t)=>{const n=ho(Bp,e.__scopeSelect),r=Zm(Bp,e.__scopeSelect),[o,a]=b.useState(!1),l=ct(t,r.onScrollButtonChange);return rn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,h=Math.ceil(d.scrollTop)<f;a(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(IS,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});RS.displayName=Bp;var IS=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=ho("SelectScrollButton",n),l=b.useRef(null),u=Ed(n),d=b.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return b.useEffect(()=>()=>d(),[d]),rn(()=>{var h;const f=u().find(p=>p.ref.current===document.activeElement);(h=f==null?void 0:f.ref.current)==null||h.scrollIntoView({block:"nearest"})},[u]),y.jsx(tt.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ye(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ye(o.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ye(o.onPointerLeave,()=>{d()})})}),rz="SelectSeparator",iz=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(tt.div,{"aria-hidden":!0,...r,ref:t})});iz.displayName=rz;var Up="SelectArrow",oz=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=_d(n),a=fo(Up,n),l=ho(Up,n);return a.open&&l.position==="popper"?y.jsx(s1,{...o,...r,ref:t}):null});oz.displayName=Up;var sz="SelectBubbleInput",AS=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=b.useRef(null),a=ct(r,o),l=LD(t);return b.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&h){const p=new Event("change",{bubbles:!0});h.call(u,t),u.dispatchEvent(p)}},[l,t]),y.jsx(tt.select,{...n,style:{...a1,...n.style},ref:a,defaultValue:t})});AS.displayName=sz;function OS(e){return e===""||e===void 0}function DS(e){const t=Bn(e),n=b.useRef(""),r=b.useRef(0),o=b.useCallback(l=>{const u=n.current+l;t(u),(function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(u)},[t]),a=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function zS(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=az(e,Math.max(a,0));o.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function az(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lz=dS,uz=hS,cz=mS,dz=gS,fz=yS,hz=vS,pz=kS,mz=_S,gz=TS,yz=NS,vz=jS,xz=RS;function dr({...e}){return y.jsx(lz,{"data-slot":"select",...e})}function fr({...e}){return y.jsx(cz,{"data-slot":"select-value",...e})}function hr({className:e,size:t="default",children:n,...r}){return y.jsxs(uz,{"data-slot":"select-trigger","data-size":t,className:Be("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:min-w-0 *:data-[slot=select-value]:truncate *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,y.jsx(dz,{asChild:!0,children:y.jsx(ck,{className:"size-4 opacity-50"})})]})}function pr({className:e,children:t,position:n="item-aligned",align:r="center",...o}){return y.jsx(fz,{children:y.jsxs(hz,{"data-slot":"select-content",className:Be("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",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,align:r,...o,children:[y.jsx(wz,{}),y.jsx(pz,{className:Be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),y.jsx(bz,{})]})})}function nn({className:e,children:t,...n}){return y.jsxs(mz,{"data-slot":"select-item",className:Be("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[y.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:y.jsx(yz,{children:y.jsx(uk,{className:"size-4"})})}),y.jsx(gz,{children:t})]})}function wz({className:e,...t}){return y.jsx(vz,{"data-slot":"select-scroll-up-button",className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(Dj,{className:"size-4"})})}function bz({className:e,...t}){return y.jsx(xz,{"data-slot":"select-scroll-down-button",className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(ck,{className:"size-4"})})}var Ml=e=>e.type==="checkbox",Ao=e=>e instanceof Date,Vn=e=>e==null;const MS=e=>typeof e=="object";var Mt=e=>!Vn(e)&&!Array.isArray(e)&&MS(e)&&!Ao(e),LS=e=>Mt(e)&&e.target?Ml(e.target)?e.target.checked:e.target.value:e,kz=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,FS=(e,t)=>e.has(kz(t)),Sz=e=>{const t=e.constructor&&e.constructor.prototype;return Mt(t)&&t.hasOwnProperty("isPrototypeOf")},qm=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ot(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(qm&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Mt(e)&&Sz(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Ot(e[o]));return r}var Td=e=>/^\w*$/.test(e),wt=e=>e===void 0,Qm=e=>Array.isArray(e)?e.filter(Boolean):[],Ym=e=>Qm(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ce=(e,t,n)=>{if(!t||!Mt(e))return n;const r=(Td(t)?[t]:Ym(t)).reduce((o,a)=>Vn(o)?o:o[a],e);return wt(r)||r===e?wt(e[t])?n:e[t]:r},Kn=e=>typeof e=="boolean",Sn=e=>typeof e=="function",lt=(e,t,n)=>{let r=-1;const o=Td(t)?[t]:Ym(t),a=o.length,l=a-1;for(;++r<a;){const u=o[r];let d=n;if(r!==l){const f=e[u];d=Mt(f)||Array.isArray(f)?f:isNaN(+o[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Bc={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ir={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},mi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},$S=le.createContext(null);$S.displayName="HookFormControlContext";const Km=()=>le.useContext($S);var VS=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const l=a;return t._proxyFormState[l]!==Ir.all&&(t._proxyFormState[l]=!r||Ir.all),n&&(n[l]=!0),e[l]}});return o};const Gm=typeof window<"u"?le.useLayoutEffect:le.useEffect;function Cz(e){const t=Km(),{control:n=t,disabled:r,name:o,exact:a}=e||{},[l,u]=le.useState(n._formState),d=le.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Gm(()=>n._subscribe({name:o,formState:d.current,exact:a,callback:f=>{!r&&u({...n._formState,...f})}}),[o,r,a]),le.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),le.useMemo(()=>VS(l,n,d.current,!1),[l,n])}var Xn=e=>typeof e=="string",Hp=(e,t,n,r,o)=>Xn(e)?(r&&t.watch.add(e),Ce(n,e,o)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),Ce(n,a))):(r&&(t.watchAll=!0),n),Wp=e=>Vn(e)||!MS(e);function Ar(e,t,n=new WeakSet){if(Wp(e)||Wp(t))return Object.is(e,t);if(Ao(e)&&Ao(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const a of r){const l=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const u=t[a];if(Ao(l)&&Ao(u)||Mt(l)&&Mt(u)||Array.isArray(l)&&Array.isArray(u)?!Ar(l,u,n):!Object.is(l,u))return!1}}return!0}function Ez(e){const t=Km(),{control:n=t,name:r,defaultValue:o,disabled:a,exact:l,compute:u}=e||{},d=le.useRef(o),f=le.useRef(u),h=le.useRef(void 0),p=le.useRef(n),x=le.useRef(r);f.current=u;const[g,C]=le.useState(()=>{const R=n._getWatch(r,d.current);return f.current?f.current(R):R}),k=le.useCallback(R=>{const A=Hp(r,n._names,R||n._formValues,!1,d.current);return f.current?f.current(A):A},[n._formValues,n._names,r]),S=le.useCallback(R=>{if(!a){const A=Hp(r,n._names,R||n._formValues,!1,d.current);if(f.current){const j=f.current(A);Ar(j,h.current)||(C(j),h.current=j)}else C(A)}},[n._formValues,n._names,a,r]);Gm(()=>((p.current!==n||!Ar(x.current,r))&&(p.current=n,x.current=r,S()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:R=>{S(R.values)}})),[n,l,r,S]),le.useEffect(()=>n._removeUnmounted());const E=p.current!==n,_=x.current,P=le.useMemo(()=>{if(a)return null;const R=!E&&!Ar(_,r);return E||R?k():null},[a,E,r,_,k]);return P!==null?P:g}function _z(e){const t=Km(),{name:n,disabled:r,control:o=t,shouldUnregister:a,defaultValue:l,exact:u=!0}=e,d=FS(o._names.array,n),f=le.useMemo(()=>Ce(o._formValues,n,Ce(o._defaultValues,n,l)),[o,n,l]),h=Ez({control:o,name:n,defaultValue:f,exact:u}),p=Cz({control:o,name:n,exact:u}),x=le.useRef(e),g=le.useRef(void 0),C=le.useRef(o.register(n,{...e.rules,value:h,...Kn(e.disabled)?{disabled:e.disabled}:{}}));x.current=e;const k=le.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ce(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ce(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ce(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ce(p.validatingFields,n)},error:{enumerable:!0,get:()=>Ce(p.errors,n)}}),[p,n]),S=le.useCallback(R=>C.current.onChange({target:{value:LS(R),name:n},type:Bc.CHANGE}),[n]),E=le.useCallback(()=>C.current.onBlur({target:{value:Ce(o._formValues,n),name:n},type:Bc.BLUR}),[n,o._formValues]),_=le.useCallback(R=>{const A=Ce(o._fields,n);A&&A._f&&R&&(A._f.ref={focus:()=>Sn(R.focus)&&R.focus(),select:()=>Sn(R.select)&&R.select(),setCustomValidity:j=>Sn(R.setCustomValidity)&&R.setCustomValidity(j),reportValidity:()=>Sn(R.reportValidity)&&R.reportValidity()})},[o._fields,n]),P=le.useMemo(()=>({name:n,value:h,...Kn(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:S,onBlur:E,ref:_}),[n,r,p.disabled,S,E,_,h]);return le.useEffect(()=>{const R=o._options.shouldUnregister||a,A=g.current;A&&A!==n&&!d&&o.unregister(A),o.register(n,{...x.current.rules,...Kn(x.current.disabled)?{disabled:x.current.disabled}:{}});const j=(F,Z)=>{const re=Ce(o._fields,F);re&&re._f&&(re._f.mount=Z)};if(j(n,!0),R){const F=Ot(Ce(o._options.defaultValues,n,x.current.defaultValue));lt(o._defaultValues,n,F),wt(Ce(o._formValues,n))&<(o._formValues,n,F)}return!d&&o.register(n),g.current=n,()=>{(d?R&&!o._state.action:R)?o.unregister(n):j(n,!1)}},[n,o,d,a]),le.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),le.useMemo(()=>({field:P,formState:p,fieldState:k}),[P,p,k])}const Uc=e=>e.render(_z(e)),Tz=le.createContext(null);Tz.displayName="HookFormContext";var Xm=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},ll=e=>Array.isArray(e)?e:[e],Ew=()=>{let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}};function BS(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],a=t[r];if(o&&Mt(o)&&a){const l=BS(o,a);Mt(l)&&(n[r]=l)}else e[r]&&(n[r]=a)}return n}var bn=e=>Mt(e)&&!Object.keys(e).length,Jm=e=>e.type==="file",Hc=e=>{if(!qm)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},US=e=>e.type==="select-multiple",eg=e=>e.type==="radio",Pz=e=>eg(e)||Ml(e),Zh=e=>Hc(e)&&e.isConnected;function Nz(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=wt(e)?r++:e[t[r++]];return e}function jz(e){for(const t in e)if(e.hasOwnProperty(t)&&!wt(e[t]))return!1;return!0}function Dt(e,t){const n=Array.isArray(t)?t:Td(t)?[t]:Ym(t),r=n.length===1?e:Nz(e,n),o=n.length-1,a=n[o];return r&&delete r[a],o!==0&&(Mt(r)&&bn(r)||Array.isArray(r)&&jz(r))&&Dt(e,n.slice(0,-1)),e}var Rz=e=>{for(const t in e)if(Sn(e[t]))return!0;return!1};function HS(e){return Array.isArray(e)||Mt(e)&&!Rz(e)}function Zp(e,t={}){for(const n in e){const r=e[n];HS(r)?(t[n]=Array.isArray(r)?[]:{},Zp(r,t[n])):wt(r)||(t[n]=!0)}return t}function As(e,t,n){n||(n=Zp(t));for(const r in e){const o=e[r];if(HS(o))wt(t)||Wp(n[r])?n[r]=Zp(o,Array.isArray(o)?[]:{}):As(o,Vn(t)?{}:t[r],n[r]);else{const a=t[r];n[r]=!Ar(o,a)}}return n}const _w={value:!1,isValid:!1},Tw={value:!0,isValid:!0};var WS=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&&!wt(e[0].attributes.value)?wt(e[0].value)||e[0].value===""?Tw:{value:e[0].value,isValid:!0}:Tw:_w}return _w},ZS=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>wt(e)?e:t?e===""?NaN:e&&+e:n&&Xn(e)?new Date(e):r?r(e):e;const Pw={isValid:!1,value:null};var qS=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Pw):Pw;function Nw(e){const t=e.ref;return Jm(t)?t.files:eg(t)?qS(e.refs).value:US(t)?[...t.selectedOptions].map(({value:n})=>n):Ml(t)?WS(e.refs).value:ZS(wt(t.value)?e.ref.value:t.value,e)}var Iz=(e,t,n,r)=>{const o={};for(const a of e){const l=Ce(t,a);l&<(o,a,l._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Wc=e=>e instanceof RegExp,el=e=>wt(e)?e:Wc(e)?e.source:Mt(e)?Wc(e.value)?e.value.source:e.value:e,jw=e=>({isOnSubmit:!e||e===Ir.onSubmit,isOnBlur:e===Ir.onBlur,isOnChange:e===Ir.onChange,isOnAll:e===Ir.all,isOnTouch:e===Ir.onTouched});const Rw="AsyncFunction";var Az=e=>!!e&&!!e.validate&&!!(Sn(e.validate)&&e.validate.constructor.name===Rw||Mt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Rw)),Oz=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Iw=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ul=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const a=Ce(e,o);if(a){const{_f:l,...u}=a;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],o)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(ul(u,t))break}else if(Mt(u)&&ul(u,t))break}}};function Aw(e,t,n){const r=Ce(e,n);if(r||Td(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const a=o.join("."),l=Ce(t,a),u=Ce(e,a);if(l&&!Array.isArray(l)&&n!==a)return{name:n};if(u&&u.type)return{name:a,error:u};if(u&&u.root&&u.root.type)return{name:`${a}.root`,error:u.root};o.pop()}return{name:n}}var Dz=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return bn(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(l=>t[l]===(!r||Ir.all))},zz=(e,t,n)=>!e||!t||e===t||ll(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),Mz=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,Lz=(e,t)=>!Qm(Ce(e,t)).length&&Dt(e,t),Fz=(e,t,n)=>{const r=ll(Ce(e,n));return lt(r,"root",t[n]),lt(e,n,r),e};function Ow(e,t,n="validate"){if(Xn(e)||Array.isArray(e)&&e.every(Xn)||Kn(e)&&!e)return{type:n,message:Xn(e)?e:"",ref:t}}var js=e=>Mt(e)&&!Wc(e)?e:{value:e,message:""},Dw=async(e,t,n,r,o,a)=>{const{ref:l,refs:u,required:d,maxLength:f,minLength:h,min:p,max:x,pattern:g,validate:C,name:k,valueAsNumber:S,mount:E}=e._f,_=Ce(n,k);if(!E||t.has(k))return{};const P=u?u[0]:l,R=M=>{o&&P.reportValidity&&(P.setCustomValidity(Kn(M)?"":M||""),P.reportValidity())},A={},j=eg(l),F=Ml(l),Z=j||F,re=(S||Jm(l))&&wt(l.value)&&wt(_)||Hc(l)&&l.value===""||_===""||Array.isArray(_)&&!_.length,O=Xm.bind(null,k,r,A),Y=(M,ne,W,U=mi.maxLength,Q=mi.minLength)=>{const J=M?ne:W;A[k]={type:M?U:Q,message:J,ref:l,...O(M?U:Q,J)}};if(a?!Array.isArray(_)||!_.length:d&&(!Z&&(re||Vn(_))||Kn(_)&&!_||F&&!WS(u).isValid||j&&!qS(u).isValid)){const{value:M,message:ne}=Xn(d)?{value:!!d,message:d}:js(d);if(M&&(A[k]={type:mi.required,message:ne,ref:P,...O(mi.required,ne)},!r))return R(ne),A}if(!re&&(!Vn(p)||!Vn(x))){let M,ne;const W=js(x),U=js(p);if(!Vn(_)&&!isNaN(_)){const Q=l.valueAsNumber||_&&+_;Vn(W.value)||(M=Q>W.value),Vn(U.value)||(ne=Q<U.value)}else{const Q=l.valueAsDate||new Date(_),J=N=>new Date(new Date().toDateString()+" "+N),D=l.type=="time",G=l.type=="week";Xn(W.value)&&_&&(M=D?J(_)>J(W.value):G?_>W.value:Q>new Date(W.value)),Xn(U.value)&&_&&(ne=D?J(_)<J(U.value):G?_<U.value:Q<new Date(U.value))}if((M||ne)&&(Y(!!M,W.message,U.message,mi.max,mi.min),!r))return R(A[k].message),A}if((f||h)&&!re&&(Xn(_)||a&&Array.isArray(_))){const M=js(f),ne=js(h),W=!Vn(M.value)&&_.length>+M.value,U=!Vn(ne.value)&&_.length<+ne.value;if((W||U)&&(Y(W,M.message,ne.message),!r))return R(A[k].message),A}if(g&&!re&&Xn(_)){const{value:M,message:ne}=js(g);if(Wc(M)&&!_.match(M)&&(A[k]={type:mi.pattern,message:ne,ref:l,...O(mi.pattern,ne)},!r))return R(ne),A}if(C){if(Sn(C)){const M=await C(_,n),ne=Ow(M,P);if(ne&&(A[k]={...ne,...O(mi.validate,ne.message)},!r))return R(ne.message),A}else if(Mt(C)){let M={};for(const ne in C){if(!bn(M)&&!r)break;const W=Ow(await C[ne](_,n),P,ne);W&&(M={...W,...O(ne,W.message)},R(W.message),r&&(A[k]=M))}if(!bn(M)&&(A[k]={ref:P,...M},!r))return A}}return R(!0),A};const $z={mode:Ir.onSubmit,reValidateMode:Ir.onChange,shouldFocusError:!0};function Vz(e={}){let t={...$z,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Sn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Mt(t.defaultValues)||Mt(t.values)?Ot(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Ot(o),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...h};let x={...p};const g={array:Ew(),state:Ew()},C=t.criteriaMode===Ir.all,k=$=>ee=>{clearTimeout(f),f=setTimeout($,ee)},S=async $=>{if(!l.keepIsValid&&!t.disabled&&(p.isValid||x.isValid||$)){let ee;t.resolver?(ee=bn((await Z()).errors),E()):ee=await O(r,!0),ee!==n.isValid&&g.state.next({isValid:ee})}},E=($,ee)=>{!t.disabled&&(p.isValidating||p.validatingFields||x.isValidating||x.validatingFields)&&(($||Array.from(u.mount)).forEach(ae=>{ae&&(ee?lt(n.validatingFields,ae,ee):Dt(n.validatingFields,ae))}),g.state.next({validatingFields:n.validatingFields,isValidating:!bn(n.validatingFields)}))},_=($,ee=[],ae,ke,ye=!0,B=!0)=>{if(ke&&ae&&!t.disabled){if(l.action=!0,B&&Array.isArray(Ce(r,$))){const se=ae(Ce(r,$),ke.argA,ke.argB);ye&<(r,$,se)}if(B&&Array.isArray(Ce(n.errors,$))){const se=ae(Ce(n.errors,$),ke.argA,ke.argB);ye&<(n.errors,$,se),Lz(n.errors,$)}if((p.touchedFields||x.touchedFields)&&B&&Array.isArray(Ce(n.touchedFields,$))){const se=ae(Ce(n.touchedFields,$),ke.argA,ke.argB);ye&<(n.touchedFields,$,se)}(p.dirtyFields||x.dirtyFields)&&(n.dirtyFields=As(o,a)),g.state.next({name:$,isDirty:M($,ee),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else lt(a,$,ee)},P=($,ee)=>{lt(n.errors,$,ee),g.state.next({errors:n.errors})},R=$=>{n.errors=$,g.state.next({errors:n.errors,isValid:!1})},A=($,ee,ae,ke)=>{const ye=Ce(r,$);if(ye){const B=Ce(a,$,wt(ae)?Ce(o,$):ae);wt(B)||ke&&ke.defaultChecked||ee?lt(a,$,ee?B:Nw(ye._f)):U($,B),l.mount&&!l.action&&S()}},j=($,ee,ae,ke,ye)=>{let B=!1,se=!1;const we={name:$};if(!t.disabled){if(!ae||ke){(p.isDirty||x.isDirty)&&(se=n.isDirty,n.isDirty=we.isDirty=M(),B=se!==we.isDirty);const _e=Ar(Ce(o,$),ee);se=!!Ce(n.dirtyFields,$),_e?Dt(n.dirtyFields,$):lt(n.dirtyFields,$,!0),we.dirtyFields=n.dirtyFields,B=B||(p.dirtyFields||x.dirtyFields)&&se!==!_e}if(ae){const _e=Ce(n.touchedFields,$);_e||(lt(n.touchedFields,$,ae),we.touchedFields=n.touchedFields,B=B||(p.touchedFields||x.touchedFields)&&_e!==ae)}B&&ye&&g.state.next(we)}return B?we:{}},F=($,ee,ae,ke)=>{const ye=Ce(n.errors,$),B=(p.isValid||x.isValid)&&Kn(ee)&&n.isValid!==ee;if(t.delayError&&ae?(d=k(()=>P($,ae)),d(t.delayError)):(clearTimeout(f),d=null,ae?lt(n.errors,$,ae):Dt(n.errors,$)),(ae?!Ar(ye,ae):ye)||!bn(ke)||B){const se={...ke,...B&&Kn(ee)?{isValid:ee}:{},errors:n.errors,name:$};n={...n,...se},g.state.next(se)}},Z=async $=>(E($,!0),await t.resolver(a,t.context,Iz($||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),re=async $=>{const{errors:ee}=await Z($);if(E($),$)for(const ae of $){const ke=Ce(ee,ae);ke?lt(n.errors,ae,ke):Dt(n.errors,ae)}else n.errors=ee;return ee},O=async($,ee,ae={valid:!0})=>{for(const ke in $){const ye=$[ke];if(ye){const{_f:B,...se}=ye;if(B){const we=u.array.has(B.name),_e=ye._f&&Az(ye._f);_e&&p.validatingFields&&E([B.name],!0);const ze=await Dw(ye,u.disabled,a,C,t.shouldUseNativeValidation&&!ee,we);if(_e&&p.validatingFields&&E([B.name]),ze[B.name]&&(ae.valid=!1,ee||e.shouldUseNativeValidation))break;!ee&&(Ce(ze,B.name)?we?Fz(n.errors,ze,B.name):lt(n.errors,B.name,ze[B.name]):Dt(n.errors,B.name))}!bn(se)&&await O(se,ee,ae)}}return ae.valid},Y=()=>{for(const $ of u.unMount){const ee=Ce(r,$);ee&&(ee._f.refs?ee._f.refs.every(ae=>!Zh(ae)):!Zh(ee._f.ref))&&me($)}u.unMount=new Set},M=($,ee)=>!t.disabled&&($&&ee&<(a,$,ee),!Ar(L(),o)),ne=($,ee,ae)=>Hp($,u,{...l.mount?a:wt(ee)?o:Xn($)?{[$]:ee}:ee},ae,ee),W=$=>Qm(Ce(l.mount?a:o,$,t.shouldUnregister?Ce(o,$,[]):[])),U=($,ee,ae={})=>{const ke=Ce(r,$);let ye=ee;if(ke){const B=ke._f;B&&(!B.disabled&<(a,$,ZS(ee,B)),ye=Hc(B.ref)&&Vn(ee)?"":ee,US(B.ref)?[...B.ref.options].forEach(se=>se.selected=ye.includes(se.value)):B.refs?Ml(B.ref)?B.refs.forEach(se=>{(!se.defaultChecked||!se.disabled)&&(Array.isArray(ye)?se.checked=!!ye.find(we=>we===se.value):se.checked=ye===se.value||!!ye)}):B.refs.forEach(se=>se.checked=se.value===ye):Jm(B.ref)?B.ref.value="":(B.ref.value=ye,B.ref.type||g.state.next({name:$,values:Ot(a)})))}(ae.shouldDirty||ae.shouldTouch)&&j($,ye,ae.shouldTouch,ae.shouldDirty,!0),ae.shouldValidate&&N($)},Q=($,ee,ae)=>{for(const ke in ee){if(!ee.hasOwnProperty(ke))return;const ye=ee[ke],B=$+"."+ke,se=Ce(r,B);(u.array.has($)||Mt(ye)||se&&!se._f)&&!Ao(ye)?Q(B,ye,ae):U(B,ye,ae)}},J=($,ee,ae={})=>{const ke=Ce(r,$),ye=u.array.has($),B=Ot(ee);lt(a,$,B),ye?(g.array.next({name:$,values:Ot(a)}),(p.isDirty||p.dirtyFields||x.isDirty||x.dirtyFields)&&ae.shouldDirty&&g.state.next({name:$,dirtyFields:As(o,a),isDirty:M($,B)})):ke&&!ke._f&&!Vn(B)?Q($,B,ae):U($,B,ae),Iw($,u)?g.state.next({...n,name:$,values:Ot(a)}):g.state.next({name:l.mount?$:void 0,values:Ot(a)})},D=async $=>{l.mount=!0;const ee=$.target;let ae=ee.name,ke=!0;const ye=Ce(r,ae),B=_e=>{ke=Number.isNaN(_e)||Ao(_e)&&isNaN(_e.getTime())||Ar(_e,Ce(a,ae,_e))},se=jw(t.mode),we=jw(t.reValidateMode);if(ye){let _e,ze;const dt=ee.type?Nw(ye._f):LS($),Nt=$.type===Bc.BLUR||$.type===Bc.FOCUS_OUT,Zt=!Oz(ye._f)&&!t.resolver&&!Ce(n.errors,ae)&&!ye._f.deps||Mz(Nt,Ce(n.touchedFields,ae),n.isSubmitted,we,se),$t=Iw(ae,u,Nt);lt(a,ae,dt),Nt?(!ee||!ee.readOnly)&&(ye._f.onBlur&&ye._f.onBlur($),d&&d(0)):ye._f.onChange&&ye._f.onChange($);const Pn=j(ae,dt,Nt),pt=!bn(Pn)||$t;if(!Nt&&g.state.next({name:ae,type:$.type,values:Ot(a)}),Zt)return(p.isValid||x.isValid)&&(t.mode==="onBlur"?Nt&&S():Nt||S()),pt&&g.state.next({name:ae,...$t?{}:Pn});if(!Nt&&$t&&g.state.next({...n}),t.resolver){const{errors:pn}=await Z([ae]);if(E([ae]),B(dt),ke){const Xt=Aw(n.errors,r,ae),oi=Aw(pn,r,Xt.name||ae);_e=oi.error,ae=oi.name,ze=bn(pn)}}else E([ae],!0),_e=(await Dw(ye,u.disabled,a,C,t.shouldUseNativeValidation))[ae],E([ae]),B(dt),ke&&(_e?ze=!1:(p.isValid||x.isValid)&&(ze=await O(r,!0)));ke&&(ye._f.deps&&(!Array.isArray(ye._f.deps)||ye._f.deps.length>0)&&N(ye._f.deps),F(ae,ze,_e,Pn))}},G=($,ee)=>{if(Ce(n.errors,ee)&&$.focus)return $.focus(),1},N=async($,ee={})=>{let ae,ke;const ye=ll($);if(t.resolver){const B=await re(wt($)?$:ye);ae=bn(B),ke=$?!ye.some(se=>Ce(B,se)):ae}else $?(ke=(await Promise.all(ye.map(async B=>{const se=Ce(r,B);return await O(se&&se._f?{[B]:se}:se)}))).every(Boolean),!(!ke&&!n.isValid)&&S()):ke=ae=await O(r);return g.state.next({...!Xn($)||(p.isValid||x.isValid)&&ae!==n.isValid?{}:{name:$},...t.resolver||!$?{isValid:ae}:{},errors:n.errors}),ee.shouldFocus&&!ke&&ul(r,G,$?ye:u.mount),ke},L=($,ee)=>{let ae={...l.mount?a:o};return ee&&(ae=BS(ee.dirtyFields?n.dirtyFields:n.touchedFields,ae)),wt($)?ae:Xn($)?Ce(ae,$):$.map(ke=>Ce(ae,ke))},K=($,ee)=>({invalid:!!Ce((ee||n).errors,$),isDirty:!!Ce((ee||n).dirtyFields,$),error:Ce((ee||n).errors,$),isValidating:!!Ce(n.validatingFields,$),isTouched:!!Ce((ee||n).touchedFields,$)}),I=$=>{$&&ll($).forEach(ee=>Dt(n.errors,ee)),g.state.next({errors:$?n.errors:{}})},ue=($,ee,ae)=>{const ke=(Ce(r,$,{_f:{}})._f||{}).ref,ye=Ce(n.errors,$)||{},{ref:B,message:se,type:we,..._e}=ye;lt(n.errors,$,{..._e,...ee,ref:ke}),g.state.next({name:$,errors:n.errors,isValid:!1}),ae&&ae.shouldFocus&&ke&&ke.focus&&ke.focus()},ve=($,ee)=>Sn($)?g.state.subscribe({next:ae=>"values"in ae&&$(ne(void 0,ee),ae)}):ne($,ee,!0),xe=$=>g.state.subscribe({next:ee=>{zz($.name,ee.name,$.exact)&&Dz(ee,$.formState||p,tr,$.reRenderRoot)&&$.callback({values:{...a},...n,...ee,defaultValues:o})}}).unsubscribe,ie=$=>(l.mount=!0,x={...x,...$.formState},xe({...$,formState:{...h,...$.formState}})),me=($,ee={})=>{for(const ae of $?ll($):u.mount)u.mount.delete(ae),u.array.delete(ae),ee.keepValue||(Dt(r,ae),Dt(a,ae)),!ee.keepError&&Dt(n.errors,ae),!ee.keepDirty&&Dt(n.dirtyFields,ae),!ee.keepTouched&&Dt(n.touchedFields,ae),!ee.keepIsValidating&&Dt(n.validatingFields,ae),!t.shouldUnregister&&!ee.keepDefaultValue&&Dt(o,ae);g.state.next({values:Ot(a)}),g.state.next({...n,...ee.keepDirty?{isDirty:M()}:{}}),!ee.keepIsValid&&S()},Se=({disabled:$,name:ee})=>{if(Kn($)&&l.mount||$||u.disabled.has(ee)){const ye=u.disabled.has(ee)!==!!$;$?u.disabled.add(ee):u.disabled.delete(ee),ye&&l.mount&&!l.action&&S()}},be=($,ee={})=>{let ae=Ce(r,$);const ke=Kn(ee.disabled)||Kn(t.disabled);return lt(r,$,{...ae||{},_f:{...ae&&ae._f?ae._f:{ref:{name:$}},name:$,mount:!0,...ee}}),u.mount.add($),ae?Se({disabled:Kn(ee.disabled)?ee.disabled:t.disabled,name:$}):A($,!0,ee.value),{...ke?{disabled:ee.disabled||t.disabled}:{},...t.progressive?{required:!!ee.required,min:el(ee.min),max:el(ee.max),minLength:el(ee.minLength),maxLength:el(ee.maxLength),pattern:el(ee.pattern)}:{},name:$,onChange:D,onBlur:D,ref:ye=>{if(ye){be($,ee),ae=Ce(r,$);const B=wt(ye.value)&&ye.querySelectorAll&&ye.querySelectorAll("input,select,textarea")[0]||ye,se=Pz(B),we=ae._f.refs||[];if(se?we.find(_e=>_e===B):B===ae._f.ref)return;lt(r,$,{_f:{...ae._f,...se?{refs:[...we.filter(Zh),B,...Array.isArray(Ce(o,$))?[{}]:[]],ref:{type:B.type,name:$}}:{ref:B}}}),A($,!1,void 0,B)}else ae=Ce(r,$,{}),ae._f&&(ae._f.mount=!1),(t.shouldUnregister||ee.shouldUnregister)&&!(FS(u.array,$)&&l.action)&&u.unMount.add($)}}},Ae=()=>t.shouldFocusError&&ul(r,G,u.mount),Ve=$=>{Kn($)&&(g.state.next({disabled:$}),ul(r,(ee,ae)=>{const ke=Ce(r,ae);ke&&(ee.disabled=ke._f.disabled||$,Array.isArray(ke._f.refs)&&ke._f.refs.forEach(ye=>{ye.disabled=ke._f.disabled||$}))},0,!1))},nt=($,ee)=>async ae=>{let ke;ae&&(ae.preventDefault&&ae.preventDefault(),ae.persist&&ae.persist());let ye=Ot(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:B,values:se}=await Z();E(),n.errors=B,ye=Ot(se)}else await O(r);if(u.disabled.size)for(const B of u.disabled)Dt(ye,B);if(Dt(n.errors,"root"),bn(n.errors)){g.state.next({errors:{}});try{await $(ye,ae)}catch(B){ke=B}}else ee&&await ee({...n.errors},ae),Ae(),setTimeout(Ae);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bn(n.errors)&&!ke,submitCount:n.submitCount+1,errors:n.errors}),ke)throw ke},It=($,ee={})=>{Ce(r,$)&&(wt(ee.defaultValue)?J($,Ot(Ce(o,$))):(J($,ee.defaultValue),lt(o,$,Ot(ee.defaultValue))),ee.keepTouched||Dt(n.touchedFields,$),ee.keepDirty||(Dt(n.dirtyFields,$),n.isDirty=ee.defaultValue?M($,Ot(Ce(o,$))):M()),ee.keepError||(Dt(n.errors,$),p.isValid&&S()),g.state.next({...n}))},sn=($,ee={})=>{const ae=$?Ot($):o,ke=Ot(ae),ye=bn($),B=ye?o:ke;if(ee.keepDefaultValues||(o=ae),!ee.keepValues){if(ee.keepDirtyValues){const se=new Set([...u.mount,...Object.keys(As(o,a))]);for(const we of Array.from(se)){const _e=Ce(n.dirtyFields,we),ze=Ce(a,we),dt=Ce(B,we);_e&&!wt(ze)?lt(B,we,ze):!_e&&!wt(dt)&&J(we,dt)}}else{if(qm&&wt($))for(const se of u.mount){const we=Ce(r,se);if(we&&we._f){const _e=Array.isArray(we._f.refs)?we._f.refs[0]:we._f.ref;if(Hc(_e)){const ze=_e.closest("form");if(ze){ze.reset();break}}}}if(ee.keepFieldsRef)for(const se of u.mount)J(se,Ce(B,se));else r={}}a=t.shouldUnregister?ee.keepDefaultValues?Ot(o):{}:Ot(B),g.array.next({values:{...B}}),g.state.next({values:{...B}})}u={mount:ee.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!p.isValid||!!ee.keepIsValid||!!ee.keepDirtyValues||!t.shouldUnregister&&!bn(B),l.watch=!!t.shouldUnregister,l.keepIsValid=!!ee.keepIsValid,l.action=!1,ee.keepErrors||(n.errors={}),g.state.next({submitCount:ee.keepSubmitCount?n.submitCount:0,isDirty:ye?!1:ee.keepDirty?n.isDirty:!!(ee.keepDefaultValues&&!Ar($,o)),isSubmitted:ee.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ye?{}:ee.keepDirtyValues?ee.keepDefaultValues&&a?As(o,a):n.dirtyFields:ee.keepDefaultValues&&$?As(o,$):ee.keepDirty?n.dirtyFields:{},touchedFields:ee.keepTouched?n.touchedFields:{},errors:ee.keepErrors?n.errors:{},isSubmitSuccessful:ee.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Gt=($,ee)=>sn(Sn($)?$(a):$,{...t.resetOptions,...ee}),an=($,ee={})=>{const ae=Ce(r,$),ke=ae&&ae._f;if(ke){const ye=ke.refs?ke.refs[0]:ke.ref;ye.focus&&setTimeout(()=>{ye.focus(),ee.shouldSelect&&Sn(ye.select)&&ye.select()})}},tr=$=>{n={...n,...$}},Tn={control:{register:be,unregister:me,getFieldState:K,handleSubmit:nt,setError:ue,_subscribe:xe,_runSchema:Z,_updateIsValidating:E,_focusError:Ae,_getWatch:ne,_getDirty:M,_setValid:S,_setFieldArray:_,_setDisabledField:Se,_setErrors:R,_getFieldArray:W,_reset:sn,_resetDefaultValues:()=>Sn(t.defaultValues)&&t.defaultValues().then($=>{Gt($,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:Y,_disableForm:Ve,_subjects:g,_proxyFormState:p,get _fields(){return r},get _formValues(){return a},get _state(){return l},set _state($){l=$},get _defaultValues(){return o},get _names(){return u},set _names($){u=$},get _formState(){return n},get _options(){return t},set _options($){t={...t,...$}}},subscribe:ie,trigger:N,register:be,handleSubmit:nt,watch:ve,setValue:J,getValues:L,reset:Gt,resetField:It,clearErrors:I,unregister:me,setError:ue,setFocus:an,getFieldState:K};return{...Tn,formControl:Tn}}function tg(e={}){const t=le.useRef(void 0),n=le.useRef(void 0),[r,o]=le.useState({isDirty:!1,isValidating:!1,isLoading:Sn(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:Sn(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Sn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...u}=Vz(e);t.current={...u,formState:r}}const a=t.current.control;return a._options=e,Gm(()=>{const l=a._subscribe({formState:a._proxyFormState,callback:()=>o({...a._formState}),reRenderRoot:!0});return o(u=>({...u,isReady:!0})),a._formState.isReady=!0,l},[a]),le.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),le.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),le.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),le.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),le.useEffect(()=>{if(a._proxyFormState.isDirty){const l=a._getDirty();l!==r.isDirty&&a._subjects.state.next({isDirty:l})}},[a,r.isDirty]),le.useEffect(()=>{var l;e.values&&!Ar(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((l=a._options.resetOptions)===null||l===void 0)&&l.keepIsValid||a._setValid(),n.current=e.values,o(u=>({...u}))):a._resetDefaultValues()},[a,e.values]),le.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=le.useMemo(()=>VS(r,a),[a,r]),t.current}const ei=b.forwardRef(({className:e,type:t,...n},r)=>y.jsx("input",{type:t,"data-slot":"input",className:Be("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),ref:r,...n}));ei.displayName="Input";const Ll=b.forwardRef(({className:e,...t},n)=>y.jsx("textarea",{"data-slot":"textarea",className:Be("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Ll.displayName="Textarea";var qh,zw;function Bz(){if(zw)return qh;zw=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt,d=typeof Xu=="object"&&Xu&&Xu.Object===Object&&Xu,f=typeof self=="object"&&self&&self.Object===Object&&self,h=d||f||Function("return this")(),p=Object.prototype,x=p.toString,g=Math.max,C=Math.min,k=function(){return h.Date.now()};function S(A,j,F){var Z,re,O,Y,M,ne,W=0,U=!1,Q=!1,J=!0;if(typeof A!="function")throw new TypeError(e);j=R(j)||0,E(F)&&(U=!!F.leading,Q="maxWait"in F,O=Q?g(R(F.maxWait)||0,j):O,J="trailing"in F?!!F.trailing:J);function D(ie){var me=Z,Se=re;return Z=re=void 0,W=ie,Y=A.apply(Se,me),Y}function G(ie){return W=ie,M=setTimeout(K,j),U?D(ie):Y}function N(ie){var me=ie-ne,Se=ie-W,be=j-me;return Q?C(be,O-Se):be}function L(ie){var me=ie-ne,Se=ie-W;return ne===void 0||me>=j||me<0||Q&&Se>=O}function K(){var ie=k();if(L(ie))return I(ie);M=setTimeout(K,N(ie))}function I(ie){return M=void 0,J&&Z?D(ie):(Z=re=void 0,Y)}function ue(){M!==void 0&&clearTimeout(M),W=0,Z=ne=re=M=void 0}function ve(){return M===void 0?Y:I(k())}function xe(){var ie=k(),me=L(ie);if(Z=arguments,re=this,ne=ie,me){if(M===void 0)return G(ne);if(Q)return M=setTimeout(K,j),D(ne)}return M===void 0&&(M=setTimeout(K,j)),Y}return xe.cancel=ue,xe.flush=ve,xe}function E(A){var j=typeof A;return!!A&&(j=="object"||j=="function")}function _(A){return!!A&&typeof A=="object"}function P(A){return typeof A=="symbol"||_(A)&&x.call(A)==n}function R(A){if(typeof A=="number")return A;if(P(A))return t;if(E(A)){var j=typeof A.valueOf=="function"?A.valueOf():A;A=E(j)?j+"":j}if(typeof A!="string")return A===0?A:+A;A=A.replace(r,"");var F=a.test(A);return F||l.test(A)?u(A.slice(2),F?2:8):o.test(A)?t:+A}return qh=S,qh}Bz();var Uz=typeof window<"u"?b.useLayoutEffect:b.useEffect;function Hz(e,t,n,r){const o=b.useRef(t);Uz(()=>{o.current=t},[t]),b.useEffect(()=>{const a=window;if(!(a&&a.addEventListener))return;const l=u=>{o.current(u)};return a.addEventListener(e,l,r),()=>{a.removeEventListener(e,l,r)}},[e,n,r])}function QS(e,t,n="mousedown",r={}){Hz(n,o=>{const a=o.target;if(!a||!a.isConnected)return;(Array.isArray(e)?e.filter(u=>!!u.current).every(u=>u.current&&!u.current.contains(a)):e.current&&!e.current.contains(a))&&t(o)},void 0,r)}function YS({options:e,value:t,onValueChange:n,placeholder:r="Select...",emptyText:o="No results found",className:a}){const[l,u]=b.useState(!1),[d,f]=b.useState(""),h=b.useRef(null),p=b.useRef(null),x=b.useMemo(()=>{if(!d)return e;const S=d.toLowerCase();return e.filter(E=>E.label.toLowerCase().includes(S)||E.value.toLowerCase().includes(S))},[e,d]),g=e.find(S=>S.value===t);b.useEffect(()=>{l&&setTimeout(()=>{var S;return(S=p.current)==null?void 0:S.focus()},10)},[l]),QS(h,()=>{u(!1),f("")});const C=S=>{n(S===t?null:S),u(!1),f("")},k=S=>{S.stopPropagation(),n(null),f("")};return y.jsxs("div",{ref:h,className:Be("relative",a),children:[y.jsxs(it,{type:"button",variant:"outline",role:"combobox","aria-expanded":l,className:"w-full justify-between font-normal",onClick:()=>{u(!l)},children:[y.jsx("span",{className:"truncate",children:g?g.label:r}),y.jsxs("div",{className:"flex items-center gap-1 ml-2 shrink-0",children:[t&&y.jsx(cd,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:k}),y.jsx(Mj,{className:"h-4 w-4 opacity-50"})]})]}),l&&y.jsxs("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-md",children:[y.jsx("div",{className:"p-2",children:y.jsx(ei,{ref:p,placeholder:"Search...",value:d,onChange:S=>f(S.target.value),className:"h-8"})}),y.jsx("div",{className:"max-h-[200px] overflow-y-auto p-1",children:x.length===0?y.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o}):x.map(S=>y.jsxs("button",{type:"button",className:Be("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 px-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",t===S.value&&"bg-accent"),onClick:()=>C(S.value),children:[y.jsx(uk,{className:Be("mr-2 h-4 w-4",t===S.value?"opacity-100":"opacity-0")}),y.jsx("span",{className:"truncate",children:S.label})]},S.value))})]})]})}const Pd=["todo","in_progress","completed","wont_fix","archived"],ng=["todo","in_progress","completed","archived"],na={todo:"TODO",in_progress:"In Progress",completed:"Completed",wont_fix:"Won't Fix",archived:"Archived"},Mw={todo:{bg:"#6b7280",text:"#ffffff"},in_progress:{bg:"#3b82f6",text:"#ffffff"},completed:{bg:"#22c55e",text:"#ffffff"},wont_fix:{bg:"#f59e0b",text:"#ffffff"},archived:{bg:"#9ca3af",text:"#ffffff"}},Nd={0:"Critical",1:"High",2:"Medium",3:"Low",4:"Backlog",5:"Someday"},Zc={0:{bg:"#dc2626",text:"#ffffff"},1:{bg:"#ea580c",text:"#ffffff"},2:{bg:"#ca8a04",text:"#ffffff"},3:{bg:"#6b7280",text:"#ffffff"},4:{bg:"#6b7280",text:"#ffffff"},5:{bg:"#9ca3af",text:"#ffffff"}};function Wz({form:e,type:t,epics:n,parentTasks:r}){const{register:o,control:a,formState:{errors:l}}=e,u=t==="epic"?ng:Pd;return y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Wt,{children:["Title ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(ei,{...o("title"),placeholder:`${t.charAt(0).toUpperCase()+t.slice(1)} title`}),l.title&&y.jsx("p",{className:"text-sm text-destructive",children:String(l.title.message)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(Ll,{...o("description"),placeholder:"Optional description",rows:3})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Status"}),y.jsx(Uc,{control:a,name:"status",render:({field:d})=>y.jsxs(dr,{value:d.value,onValueChange:d.onChange,children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsx(pr,{children:u.map(f=>y.jsx(nn,{value:f,children:na[f]},f))})]})})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Uc,{control:a,name:"priority",render:({field:d})=>y.jsxs(dr,{value:String(d.value),onValueChange:f=>d.onChange(parseInt(f,10)),children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsx(pr,{children:Object.entries(Nd).map(([f,h])=>y.jsxs(nn,{value:f,children:["P",f," - ",h]},f))})]})})]})]}),t==="task"&&y.jsx(Zz,{form:e,epics:n}),t==="subtask"&&y.jsx(qz,{form:e,parentTasks:r})]})}function Zz({form:e,epics:t}){const{register:n,control:r}=e,o=b.useMemo(()=>t.map(a=>({value:a.id,label:`${a.id}: ${a.title}`})),[t]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(ei,{...n("tags"),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Epic"}),y.jsx(Uc,{control:r,name:"epicId",render:({field:a})=>y.jsx(YS,{options:o,value:a.value,onValueChange:a.onChange,placeholder:"No Epic",emptyText:"No epics found"})})]})]})}function qz({form:e,parentTasks:t}){const{register:n,control:r,formState:{errors:o}}=e,a=b.useMemo(()=>t.map(l=>({value:l.id,label:`${l.id}: ${l.title}`})),[t]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(ei,{...n("tags"),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Wt,{children:["Parent Task ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(Uc,{control:r,name:"parentTaskId",render:({field:l})=>y.jsx(YS,{options:a,value:l.value||null,onValueChange:u=>l.onChange(u||""),placeholder:"Select a task...",emptyText:"No tasks found"})}),o.parentTaskId&&y.jsx("p",{className:"text-sm text-destructive",children:String(o.parentTaskId.message)})]})]})}const Lw=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ce(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},qp=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Lw(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>Lw(o,n,e))}},Fw=(e,t)=>{t.shouldUseNativeValidation&&qp(e,t);const n={};for(const r in e){const o=Ce(t.fields,r),a=Object.assign(e[r]||{},{ref:o&&o.ref});if(Qz(t.names||Object.keys(e),r)){const l=Object.assign({},Ce(n,r));lt(l,"root",a),lt(n,r,l)}else lt(n,r,a)}return n},Qz=(e,t)=>{const n=$w(t);return e.some(r=>$w(r).match(`^${n}\\.\\d+`))};function $w(e){return e.replace(/\]|\[/g,"")}function ce(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=l.prototype,h=Object.keys(f);for(let p=0;p<h.length;p++){const x=h[p];x in u||(u[x]=f[x].bind(u))}}const o=(n==null?void 0:n.Parent)??Object;class a extends o{}Object.defineProperty(a,"name",{value:e});function l(u){var d;const f=n!=null&&n.Parent?new a:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const h of f._zod.deferred)h();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>{var d,f;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(f=(d=u==null?void 0:u._zod)==null?void 0:d.traits)==null?void 0:f.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class Ls extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class KS extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const GS={};function Ko(e){return GS}function XS(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Qp(e,t){return typeof t=="bigint"?t.toString():t}function rg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ig(e){return e==null}function og(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Yz(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d!=null&&d[1]&&(o=Number.parseInt(d[1]))}const a=n>o?n:o,l=Number.parseInt(e.toFixed(a).replace(".","")),u=Number.parseInt(t.toFixed(a).replace(".",""));return l%u/10**a}const Vw=Symbol("evaluating");function ut(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Vw)return r===void 0&&(r=Vw,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ts(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function po(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Bw(e){return JSON.stringify(e)}function Kz(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const JS="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Gz=rg(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function xl(e){if(qc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(qc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function eC(e){return xl(e)?{...e}:Array.isArray(e)?[...e]:e}const Xz=new Set(["string","number","symbol"]);function jd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Jz(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const eM={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tM(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const a=po(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return ts(this,"shape",l),l},checks:[]});return mo(e,a)}function nM(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const a=po(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return ts(this,"shape",l),l},checks:[]});return mo(e,a)}function rM(e,t){if(!xl(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const a=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(a,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=po(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return ts(this,"shape",a),a}});return mo(e,o)}function iM(e,t){if(!xl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=po(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return ts(this,"shape",r),r}});return mo(e,n)}function oM(e,t){const n=po(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return ts(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return mo(e,n)}function sM(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=po(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return ts(this,"shape",d),d},checks:[]});return mo(t,l)}function aM(e,t,n){const r=po(t._zod.def,{get shape(){const o=t._zod.def.shape,a={...o};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(a[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)a[l]=new e({type:"nonoptional",innerType:o[l]});return ts(this,"shape",a),a}});return mo(t,r)}function Ds(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function tC(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function cc(e){return typeof e=="string"?e:e==null?void 0:e.message}function Go(e,t,n){var o,a,l,u,d,f;const r={...e,path:e.path??[]};if(!e.message){const h=cc((l=(a=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:a.error)==null?void 0:l.call(a,e))??cc((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??cc((d=n.customError)==null?void 0:d.call(n,e))??cc((f=n.localeError)==null?void 0:f.call(n,e))??"Invalid input";r.message=h}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function sg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function wl(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const nC=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Qp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ag=ce("$ZodError",nC),Rd=ce("$ZodError",nC,{Parent:Error});function lM(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function uM(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>r({issues:l}));else if(a.code==="invalid_key")r({issues:a.issues});else if(a.code==="invalid_element")r({issues:a.issues});else if(a.path.length===0)n._errors.push(t(a));else{let l=n,u=0;for(;u<a.path.length;){const d=a.path[u];u===a.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return r(e),n}const Id=e=>(t,n,r,o)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise)throw new Ls;if(l.issues.length){const u=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Go(d,a,Ko())));throw JS(u,o==null?void 0:o.callee),u}return l.value},cM=Id(Rd),Ad=e=>async(t,n,r,o)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Go(d,a,Ko())));throw JS(u,o==null?void 0:o.callee),u}return l.value},dM=Ad(Rd),Od=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Ls;return a.issues.length?{success:!1,error:new(e??ag)(a.issues.map(l=>Go(l,o,Ko())))}:{success:!0,data:a.value}},fM=Od(Rd),Dd=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(l=>Go(l,o,Ko())))}:{success:!0,data:a.value}},hM=Dd(Rd),pM=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Id(e)(t,n,o)},mM=e=>(t,n,r)=>Id(e)(t,n,r),gM=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ad(e)(t,n,o)},yM=e=>async(t,n,r)=>Ad(e)(t,n,r),vM=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Od(e)(t,n,o)},xM=e=>(t,n,r)=>Od(e)(t,n,r),wM=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dd(e)(t,n,o)},bM=e=>async(t,n,r)=>Dd(e)(t,n,r),kM=/^[cC][^\s-]{8,}$/,SM=/^[0-9a-z]+$/,CM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,EM=/^[0-9a-vA-V]{20}$/,_M=/^[A-Za-z0-9]{27}$/,TM=/^[a-zA-Z0-9_-]{21}$/,PM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,NM=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Uw=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,jM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,RM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function IM(){return new RegExp(RM,"u")}const AM=/^(?:(?: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])$/,OM=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,DM=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,zM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,MM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,rC=/^[A-Za-z0-9_-]*$/,LM=/^\+[1-9]\d{6,14}$/,iC="(?:(?:\\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])))",FM=new RegExp(`^${iC}$`);function oC(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $M(e){return new RegExp(`^${oC(e)}$`)}function VM(e){const t=oC({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${iC}T(?:${r})$`)}const BM=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},UM=/^-?\d+$/,HM=/^-?\d+(?:\.\d+)?$/,WM=/^[^A-Z]*$/,ZM=/^[^a-z]*$/,Un=ce("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),sC={number:"number",bigint:"bigint",object:"date"},aC=ce("$ZodCheckLessThan",(e,t)=>{Un.init(e,t);const n=sC[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,a=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lC=ce("$ZodCheckGreaterThan",(e,t)=>{Un.init(e,t);const n=sC[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,a=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qM=ce("$ZodCheckMultipleOf",(e,t)=>{Un.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Yz(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),QM=ce("$ZodCheckNumberFormat",(e,t)=>{var l;Un.init(e,t),t.format=t.format||"float64";const n=(l=t.format)==null?void 0:l.includes("int"),r=n?"int":"number",[o,a]=eM[t.format];e._zod.onattach.push(u=>{const d=u._zod.bag;d.format=t.format,d.minimum=o,d.maximum=a,n&&(d.pattern=UM)}),e._zod.check=u=>{const d=u.value;if(n){if(!Number.isInteger(d)){u.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?u.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):u.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}d<o&&u.issues.push({origin:"number",input:d,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),d>a&&u.issues.push({origin:"number",input:d,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),YM=ce("$ZodCheckMaxLength",(e,t)=>{var n;Un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ig(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const l=sg(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),KM=ce("$ZodCheckMinLength",(e,t)=>{var n;Un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ig(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const l=sg(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),GM=ce("$ZodCheckLengthEquals",(e,t)=>{var n;Un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ig(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,a=o.length;if(a===t.length)return;const l=sg(o),u=a>t.length;r.issues.push({origin:l,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),zd=ce("$ZodCheckStringFormat",(e,t)=>{var n,r;Un.init(e,t),e._zod.onattach.push(o=>{const a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),XM=ce("$ZodCheckRegex",(e,t)=>{zd.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),JM=ce("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=WM),zd.init(e,t)}),eL=ce("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ZM),zd.init(e,t)}),tL=ce("$ZodCheckIncludes",(e,t)=>{Un.init(e,t);const n=jd(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const a=o._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),nL=ce("$ZodCheckStartsWith",(e,t)=>{Un.init(e,t);const n=new RegExp(`^${jd(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),rL=ce("$ZodCheckEndsWith",(e,t)=>{Un.init(e,t);const n=new RegExp(`.*${jd(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),iL=ce("$ZodCheckOverwrite",(e,t)=>{Un.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class oL{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
271
271
|
`).filter(l=>l),o=Math.min(...r.map(l=>l.length-l.trimStart().length)),a=r.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of a)this.content.push(l)}compile(){const t=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(a=>` ${a}`)];return new t(...n,o.join(`
|
|
272
|
-
`))}}const sL={major:4,minor:3,patch:5},Lt=ce("$ZodType",(e,t)=>{var o;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sL;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const a of r)for(const l of a._zod.onattach)l(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const a=(u,d,f)=>{let h=Ds(u),p;for(const x of d){if(x._zod.def.when){if(!x._zod.def.when(u))continue}else if(h)continue;const g=u.issues.length,C=x._zod.check(u);if(C instanceof Promise&&(f==null?void 0:f.async)===!1)throw new Ls;if(p||C instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await C,u.issues.length!==g&&(h||(h=Ds(u,g)))});else{if(u.issues.length===g)continue;h||(h=Ds(u,g))}}return p?p.then(()=>u):u},l=(u,d,f)=>{if(Ds(u))return u.aborted=!0,u;const h=a(d,r,f);if(h instanceof Promise){if(f.async===!1)throw new Ls;return h.then(p=>e._zod.parse(p,f))}return e._zod.parse(h,f)};e._zod.run=(u,d)=>{if(d.skipChecks)return e._zod.parse(u,d);if(d.direction==="backward"){const h=e._zod.parse({value:u.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(p=>l(p,u,d)):l(h,u,d)}const f=e._zod.parse(u,d);if(f instanceof Promise){if(d.async===!1)throw new Ls;return f.then(h=>a(h,r,d))}return a(f,r,d)}}ut(e,"~standard",()=>({validate:a=>{var l;try{const u=fM(e,a);return u.success?{value:u.data}:{issues:(l=u.error)==null?void 0:l.issues}}catch{return hM(e,a).then(d=>{var f;return d.success?{value:d.data}:{issues:(f=d.error)==null?void 0:f.issues}})}},vendor:"zod",version:1}))}),
|
|
272
|
+
`))}}const sL={major:4,minor:3,patch:5},Lt=ce("$ZodType",(e,t)=>{var o;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sL;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const a of r)for(const l of a._zod.onattach)l(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const a=(u,d,f)=>{let h=Ds(u),p;for(const x of d){if(x._zod.def.when){if(!x._zod.def.when(u))continue}else if(h)continue;const g=u.issues.length,C=x._zod.check(u);if(C instanceof Promise&&(f==null?void 0:f.async)===!1)throw new Ls;if(p||C instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await C,u.issues.length!==g&&(h||(h=Ds(u,g)))});else{if(u.issues.length===g)continue;h||(h=Ds(u,g))}}return p?p.then(()=>u):u},l=(u,d,f)=>{if(Ds(u))return u.aborted=!0,u;const h=a(d,r,f);if(h instanceof Promise){if(f.async===!1)throw new Ls;return h.then(p=>e._zod.parse(p,f))}return e._zod.parse(h,f)};e._zod.run=(u,d)=>{if(d.skipChecks)return e._zod.parse(u,d);if(d.direction==="backward"){const h=e._zod.parse({value:u.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(p=>l(p,u,d)):l(h,u,d)}const f=e._zod.parse(u,d);if(f instanceof Promise){if(d.async===!1)throw new Ls;return f.then(h=>a(h,r,d))}return a(f,r,d)}}ut(e,"~standard",()=>({validate:a=>{var l;try{const u=fM(e,a);return u.success?{value:u.data}:{issues:(l=u.error)==null?void 0:l.issues}}catch{return hM(e,a).then(d=>{var f;return d.success?{value:d.data}:{issues:(f=d.error)==null?void 0:f.issues}})}},vendor:"zod",version:1}))}),lg=ce("$ZodString",(e,t)=>{var n;Lt.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??BM(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),bt=ce("$ZodStringFormat",(e,t)=>{zd.init(e,t),lg.init(e,t)}),aL=ce("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=NM),bt.init(e,t)}),lL=ce("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Uw(r))}else t.pattern??(t.pattern=Uw());bt.init(e,t)}),uL=ce("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=jM),bt.init(e,t)}),cL=ce("$ZodURL",(e,t)=>{bt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),dL=ce("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=IM()),bt.init(e,t)}),fL=ce("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=TM),bt.init(e,t)}),hL=ce("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=kM),bt.init(e,t)}),pL=ce("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=SM),bt.init(e,t)}),mL=ce("$ZodULID",(e,t)=>{t.pattern??(t.pattern=CM),bt.init(e,t)}),gL=ce("$ZodXID",(e,t)=>{t.pattern??(t.pattern=EM),bt.init(e,t)}),yL=ce("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=_M),bt.init(e,t)}),vL=ce("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=VM(t)),bt.init(e,t)}),xL=ce("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=FM),bt.init(e,t)}),wL=ce("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=$M(t)),bt.init(e,t)}),bL=ce("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=PM),bt.init(e,t)}),kL=ce("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=AM),bt.init(e,t),e._zod.bag.format="ipv4"}),SL=ce("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=OM),bt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),CL=ce("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=DM),bt.init(e,t)}),EL=ce("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=zM),bt.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,a]=r;if(!a)throw new Error;const l=Number(a);if(`${l}`!==a)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function uC(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const _L=ce("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=MM),bt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{uC(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function TL(e){if(!rC.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return uC(n)}const PL=ce("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rC),bt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{TL(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),NL=ce("$ZodE164",(e,t)=>{t.pattern??(t.pattern=LM),bt.init(e,t)});function jL(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const RL=ce("$ZodJWT",(e,t)=>{bt.init(e,t),e._zod.check=n=>{jL(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),cC=ce("$ZodNumber",(e,t)=>{Lt.init(e,t),e._zod.pattern=e._zod.bag.pattern??HM,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const a=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...a?{received:a}:{}}),n}}),IL=ce("$ZodNumberFormat",(e,t)=>{QM.init(e,t),cC.init(e,t)}),AL=ce("$ZodUnknown",(e,t)=>{Lt.init(e,t),e._zod.parse=n=>n}),OL=ce("$ZodNever",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Hw(e,t,n){e.issues.length&&t.issues.push(...tC(n,e.issues)),t.value[n]=e.value}const DL=ce("$ZodArray",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const a=[];for(let l=0;l<o.length;l++){const u=o[l],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?a.push(d.then(f=>Hw(f,n,l))):Hw(d,n,l)}return a.length?Promise.all(a).then(()=>n):n}});function Qc(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...tC(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function dC(e){var r,o,a,l;const t=Object.keys(e.shape);for(const u of t)if(!((l=(a=(o=(r=e.shape)==null?void 0:r[u])==null?void 0:o._zod)==null?void 0:a.traits)!=null&&l.has("$ZodType")))throw new Error(`Invalid element at key "${u}": expected a Zod schema`);const n=Jz(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function fC(e,t,n,r,o,a){const l=[],u=o.keySet,d=o.catchall._zod,f=d.def.type,h=d.optout==="optional";for(const p in t){if(u.has(p))continue;if(f==="never"){l.push(p);continue}const x=d.run({value:t[p],issues:[]},r);x instanceof Promise?e.push(x.then(g=>Qc(g,n,p,t,h))):Qc(x,n,p,t,h)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const zL=ce("$ZodObject",(e,t)=>{Lt.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...u};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=rg(()=>dC(t));ut(e._zod,"propValues",()=>{const u=t.shape,d={};for(const f in u){const h=u[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(const p of h.values)d[f].add(p)}}return d});const o=qc,a=t.catchall;let l;e._zod.parse=(u,d)=>{l??(l=r.value);const f=u.value;if(!o(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};const h=[],p=l.shape;for(const x of l.keys){const g=p[x],C=g._zod.optout==="optional",k=g._zod.run({value:f[x],issues:[]},d);k instanceof Promise?h.push(k.then(S=>Qc(S,u,x,f,C))):Qc(k,u,x,f,C)}return a?fC(h,f,u,d,r.value,e):h.length?Promise.all(h).then(()=>u):u}}),ML=ce("$ZodObjectJIT",(e,t)=>{zL.init(e,t);const n=e._zod.parse,r=rg(()=>dC(t)),o=x=>{var P;const g=new oL(["shape","payload","ctx"]),C=r.value,k=R=>{const A=Bw(R);return`shape[${A}]._zod.run({ value: input[${A}], issues: [] }, ctx)`};g.write("const input = payload.value;");const S=Object.create(null);let E=0;for(const R of C.keys)S[R]=`key_${E++}`;g.write("const newResult = {};");for(const R of C.keys){const A=S[R],j=Bw(R),F=x[R],Z=((P=F==null?void 0:F._zod)==null?void 0:P.optout)==="optional";g.write(`const ${A} = ${k(R)};`),Z?g.write(`
|
|
273
273
|
if (${A}.issues.length) {
|
|
274
274
|
if (${j} in input) {
|
|
275
275
|
payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
|
|
@@ -303,40 +303,40 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
303
303
|
newResult[${j}] = ${A}.value;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
`)}g.write("payload.value = newResult;"),g.write("return payload;");const _=g.compile();return(R,A)=>_(x,R,A)};let a;const l=qc,u=!XS.jitless,f=u&&Gz.value,h=t.catchall;let p;e._zod.parse=(x,g)=>{p??(p=r.value);const C=x.value;return l(C)?u&&f&&(g==null?void 0:g.async)===!1&&g.jitless!==!0?(a||(a=o(t.shape)),x=a(x,g),h?hC([],C,x,g,p,e):x):n(x,g):(x.issues.push({expected:"object",code:"invalid_type",input:C,inst:e}),x)}});function Zw(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const o=e.filter(a=>!Ds(a));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(l=>Go(l,r,Ko())))}),t)}const LL=ce("$ZodUnion",(e,t)=>{Lt.init(e,t),ut(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ut(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ut(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ut(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>sg(a.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(n)return r(o,a);let l=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:o.value,issues:[]},a);if(f instanceof Promise)u.push(f),l=!0;else{if(f.issues.length===0)return f;u.push(f)}}return l?Promise.all(u).then(d=>Zw(d,o,e,a)):Zw(u,o,e,a)}}),FL=ce("$ZodIntersection",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,a=t.left._zod.run({value:o,issues:[]},r),l=t.right._zod.run({value:o,issues:[]},r);return a instanceof Promise||l instanceof Promise?Promise.all([a,l]).then(([d,f])=>qw(n,d,f)):qw(n,a,l)}});function Yp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(xl(e)&&xl(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),o={...e,...t};for(const a of r){const l=Yp(e[a],t[a]);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};o[a]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],a=t[r],l=Yp(o,a);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function qw(e,t,n){const r=new Map;let o;for(const u of t.issues)if(u.code==="unrecognized_keys"){o??(o=u);for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(u);const a=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length&&o&&e.issues.push({...o,keys:a}),Ds(e))return e;const l=Yp(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const $L=ce("$ZodEnum",(e,t)=>{Lt.init(e,t);const n=JS(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Xz.has(typeof o)).map(o=>typeof o=="string"?jd(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{const l=o.value;return r.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),VL=ce("$ZodTransform",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new GS(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new Ls;return n.value=o,n}});function Qw(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const pC=ce("$ZodOptional",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ut(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${sg(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>Qw(a,n.value)):Qw(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),BL=ce("$ZodExactOptional",(e,t)=>{pC.init(e,t),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),UL=ce("$ZodNullable",(e,t)=>{Lt.init(e,t),ut(e._zod,"optin",()=>t.innerType._zod.optin),ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${sg(n.source)}|null)$`):void 0}),ut(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),HL=ce("$ZodDefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>Yw(a,t)):Yw(o,t)}});function Yw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const WL=ce("$ZodPrefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),ZL=ce("$ZodNonOptional",(e,t)=>{Lt.init(e,t),ut(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>Kw(a,e)):Kw(o,e)}});function Kw(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const qL=ce("$ZodCatch",(e,t)=>{Lt.init(e,t),ut(e._zod,"optin",()=>t.innerType._zod.optin),ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(l=>Go(l,r,Ko()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>Go(a,r,Ko()))},input:n.value}),n.issues=[]),n)}}),QL=ce("$ZodPipe",(e,t)=>{Lt.init(e,t),ut(e._zod,"values",()=>t.in._zod.values),ut(e._zod,"optin",()=>t.in._zod.optin),ut(e._zod,"optout",()=>t.out._zod.optout),ut(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(l=>dc(l,t.in,r)):dc(a,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(a=>dc(a,t.out,r)):dc(o,t.out,r)}});function dc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const YL=ce("$ZodReadonly",(e,t)=>{Lt.init(e,t),ut(e._zod,"propValues",()=>t.innerType._zod.propValues),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),ut(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Gw):Gw(o)}});function Gw(e){return e.value=Object.freeze(e.value),e}const KL=ce("$ZodCustom",(e,t)=>{Un.init(e,t),Lt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(a=>Xw(a,n,r,e));Xw(o,n,r,e)}});function Xw(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(wl(o))}}var Jw;class GL{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function XL(){return new GL}(Jw=globalThis).__zod_globalRegistry??(Jw.__zod_globalRegistry=XL());const al=globalThis.__zod_globalRegistry;function JL(e,t){return new e({type:"string",...Me(t)})}function eF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Me(t)})}function e0(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Me(t)})}function tF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Me(t)})}function nF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Me(t)})}function rF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Me(t)})}function iF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Me(t)})}function oF(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Me(t)})}function sF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Me(t)})}function aF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Me(t)})}function lF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Me(t)})}function uF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Me(t)})}function cF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Me(t)})}function dF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Me(t)})}function fF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Me(t)})}function hF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Me(t)})}function pF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Me(t)})}function mF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Me(t)})}function gF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Me(t)})}function yF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Me(t)})}function vF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Me(t)})}function xF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Me(t)})}function wF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Me(t)})}function bF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Me(t)})}function kF(e,t){return new e({type:"string",format:"date",check:"string_format",...Me(t)})}function SF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Me(t)})}function CF(e,t){return new e({type:"string",format:"duration",check:"string_format",...Me(t)})}function EF(e,t){return new e({type:"number",checks:[],...Me(t)})}function _F(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Me(t)})}function TF(e){return new e({type:"unknown"})}function PF(e,t){return new e({type:"never",...Me(t)})}function t0(e,t){return new lC({check:"less_than",...Me(t),value:e,inclusive:!1})}function Qh(e,t){return new lC({check:"less_than",...Me(t),value:e,inclusive:!0})}function n0(e,t){return new uC({check:"greater_than",...Me(t),value:e,inclusive:!1})}function Yh(e,t){return new uC({check:"greater_than",...Me(t),value:e,inclusive:!0})}function r0(e,t){return new qM({check:"multiple_of",...Me(t),value:e})}function mC(e,t){return new YM({check:"max_length",...Me(t),maximum:e})}function Yc(e,t){return new KM({check:"min_length",...Me(t),minimum:e})}function gC(e,t){return new GM({check:"length_equals",...Me(t),length:e})}function NF(e,t){return new XM({check:"string_format",format:"regex",...Me(t),pattern:e})}function jF(e){return new JM({check:"string_format",format:"lowercase",...Me(e)})}function RF(e){return new eL({check:"string_format",format:"uppercase",...Me(e)})}function IF(e,t){return new tL({check:"string_format",format:"includes",...Me(t),includes:e})}function AF(e,t){return new nL({check:"string_format",format:"starts_with",...Me(t),prefix:e})}function OF(e,t){return new rL({check:"string_format",format:"ends_with",...Me(t),suffix:e})}function pa(e){return new iL({check:"overwrite",tx:e})}function DF(e){return pa(t=>t.normalize(e))}function zF(){return pa(e=>e.trim())}function MF(){return pa(e=>e.toLowerCase())}function LF(){return pa(e=>e.toUpperCase())}function FF(){return pa(e=>Kz(e))}function $F(e,t,n){return new e({type:"array",element:t,...Me(n)})}function VF(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Me(n)})}function BF(e){const t=UF(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(wl(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(wl(o))}},e(n.value,n)));return t}function UF(e,t){const n=new Un({check:"custom",...Me(t)});return n._zod.check=e,n}function yC(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??al,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function on(e,t,n={path:[],schemaPath:[]}){var h,p;var r;const o=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const u=(p=(h=e._zod).toJSONSchema)==null?void 0:p.call(h);if(u)l.schema=u;else{const x={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,x);else{const C=l.schema,k=t.processors[o.type];if(!k)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);k(e,t,C,x)}const g=e._zod.parent;g&&(l.ref||(l.ref=g),on(g,t,x),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&vn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function vC(e,t){var l,u,d,f;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const h of e.seen.entries()){const p=(l=e.metadataRegistry.get(h[0]))==null?void 0:l.id;if(p){const x=r.get(p);if(x&&x!==h[0])throw new Error(`Duplicate schema id "${p}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(p,h[0])}}const o=h=>{var k;const p=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const S=(k=e.external.registry.get(h[0]))==null?void 0:k.id,E=e.external.uri??(P=>P);if(S)return{ref:E(S)};const _=h[1].defId??h[1].schema.id??`schema${e.counter++}`;return h[1].defId=_,{defId:_,ref:`${E("__shared")}#/${p}/${_}`}}if(h[1]===n)return{ref:"#"};const g=`#/${p}/`,C=h[1].schema.id??`__schema${e.counter++}`;return{defId:C,ref:g+C}},a=h=>{if(h[1].schema.$ref)return;const p=h[1],{ref:x,defId:g}=o(h);p.def={...p.schema},g&&(p.defId=g);const C=p.schema;for(const k in C)delete C[k];C.$ref=x};if(e.cycles==="throw")for(const h of e.seen.entries()){const p=h[1];if(p.cycle)throw new Error(`Cycle detected: #/${(u=p.cycle)==null?void 0:u.join("/")}/<root>
|
|
306
|
+
`)}g.write("payload.value = newResult;"),g.write("return payload;");const _=g.compile();return(R,A)=>_(x,R,A)};let a;const l=qc,u=!GS.jitless,f=u&&Gz.value,h=t.catchall;let p;e._zod.parse=(x,g)=>{p??(p=r.value);const C=x.value;return l(C)?u&&f&&(g==null?void 0:g.async)===!1&&g.jitless!==!0?(a||(a=o(t.shape)),x=a(x,g),h?fC([],C,x,g,p,e):x):n(x,g):(x.issues.push({expected:"object",code:"invalid_type",input:C,inst:e}),x)}});function Ww(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const o=e.filter(a=>!Ds(a));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(l=>Go(l,r,Ko())))}),t)}const LL=ce("$ZodUnion",(e,t)=>{Lt.init(e,t),ut(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ut(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ut(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ut(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>og(a.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(n)return r(o,a);let l=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:o.value,issues:[]},a);if(f instanceof Promise)u.push(f),l=!0;else{if(f.issues.length===0)return f;u.push(f)}}return l?Promise.all(u).then(d=>Ww(d,o,e,a)):Ww(u,o,e,a)}}),FL=ce("$ZodIntersection",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,a=t.left._zod.run({value:o,issues:[]},r),l=t.right._zod.run({value:o,issues:[]},r);return a instanceof Promise||l instanceof Promise?Promise.all([a,l]).then(([d,f])=>Zw(n,d,f)):Zw(n,a,l)}});function Yp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(xl(e)&&xl(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),o={...e,...t};for(const a of r){const l=Yp(e[a],t[a]);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};o[a]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],a=t[r],l=Yp(o,a);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Zw(e,t,n){const r=new Map;let o;for(const u of t.issues)if(u.code==="unrecognized_keys"){o??(o=u);for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(u);const a=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length&&o&&e.issues.push({...o,keys:a}),Ds(e))return e;const l=Yp(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const $L=ce("$ZodEnum",(e,t)=>{Lt.init(e,t);const n=XS(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Xz.has(typeof o)).map(o=>typeof o=="string"?jd(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{const l=o.value;return r.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),VL=ce("$ZodTransform",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new KS(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new Ls;return n.value=o,n}});function qw(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const hC=ce("$ZodOptional",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ut(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${og(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>qw(a,n.value)):qw(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),BL=ce("$ZodExactOptional",(e,t)=>{hC.init(e,t),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),UL=ce("$ZodNullable",(e,t)=>{Lt.init(e,t),ut(e._zod,"optin",()=>t.innerType._zod.optin),ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${og(n.source)}|null)$`):void 0}),ut(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),HL=ce("$ZodDefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>Qw(a,t)):Qw(o,t)}});function Qw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const WL=ce("$ZodPrefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),ZL=ce("$ZodNonOptional",(e,t)=>{Lt.init(e,t),ut(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>Yw(a,e)):Yw(o,e)}});function Yw(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const qL=ce("$ZodCatch",(e,t)=>{Lt.init(e,t),ut(e._zod,"optin",()=>t.innerType._zod.optin),ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(l=>Go(l,r,Ko()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>Go(a,r,Ko()))},input:n.value}),n.issues=[]),n)}}),QL=ce("$ZodPipe",(e,t)=>{Lt.init(e,t),ut(e._zod,"values",()=>t.in._zod.values),ut(e._zod,"optin",()=>t.in._zod.optin),ut(e._zod,"optout",()=>t.out._zod.optout),ut(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(l=>dc(l,t.in,r)):dc(a,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(a=>dc(a,t.out,r)):dc(o,t.out,r)}});function dc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const YL=ce("$ZodReadonly",(e,t)=>{Lt.init(e,t),ut(e._zod,"propValues",()=>t.innerType._zod.propValues),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),ut(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Kw):Kw(o)}});function Kw(e){return e.value=Object.freeze(e.value),e}const KL=ce("$ZodCustom",(e,t)=>{Un.init(e,t),Lt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(a=>Gw(a,n,r,e));Gw(o,n,r,e)}});function Gw(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(wl(o))}}var Xw;class GL{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function XL(){return new GL}(Xw=globalThis).__zod_globalRegistry??(Xw.__zod_globalRegistry=XL());const al=globalThis.__zod_globalRegistry;function JL(e,t){return new e({type:"string",...Me(t)})}function eF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Me(t)})}function Jw(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Me(t)})}function tF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Me(t)})}function nF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Me(t)})}function rF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Me(t)})}function iF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Me(t)})}function oF(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Me(t)})}function sF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Me(t)})}function aF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Me(t)})}function lF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Me(t)})}function uF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Me(t)})}function cF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Me(t)})}function dF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Me(t)})}function fF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Me(t)})}function hF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Me(t)})}function pF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Me(t)})}function mF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Me(t)})}function gF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Me(t)})}function yF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Me(t)})}function vF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Me(t)})}function xF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Me(t)})}function wF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Me(t)})}function bF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Me(t)})}function kF(e,t){return new e({type:"string",format:"date",check:"string_format",...Me(t)})}function SF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Me(t)})}function CF(e,t){return new e({type:"string",format:"duration",check:"string_format",...Me(t)})}function EF(e,t){return new e({type:"number",checks:[],...Me(t)})}function _F(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Me(t)})}function TF(e){return new e({type:"unknown"})}function PF(e,t){return new e({type:"never",...Me(t)})}function e0(e,t){return new aC({check:"less_than",...Me(t),value:e,inclusive:!1})}function Qh(e,t){return new aC({check:"less_than",...Me(t),value:e,inclusive:!0})}function t0(e,t){return new lC({check:"greater_than",...Me(t),value:e,inclusive:!1})}function Yh(e,t){return new lC({check:"greater_than",...Me(t),value:e,inclusive:!0})}function n0(e,t){return new qM({check:"multiple_of",...Me(t),value:e})}function pC(e,t){return new YM({check:"max_length",...Me(t),maximum:e})}function Yc(e,t){return new KM({check:"min_length",...Me(t),minimum:e})}function mC(e,t){return new GM({check:"length_equals",...Me(t),length:e})}function NF(e,t){return new XM({check:"string_format",format:"regex",...Me(t),pattern:e})}function jF(e){return new JM({check:"string_format",format:"lowercase",...Me(e)})}function RF(e){return new eL({check:"string_format",format:"uppercase",...Me(e)})}function IF(e,t){return new tL({check:"string_format",format:"includes",...Me(t),includes:e})}function AF(e,t){return new nL({check:"string_format",format:"starts_with",...Me(t),prefix:e})}function OF(e,t){return new rL({check:"string_format",format:"ends_with",...Me(t),suffix:e})}function pa(e){return new iL({check:"overwrite",tx:e})}function DF(e){return pa(t=>t.normalize(e))}function zF(){return pa(e=>e.trim())}function MF(){return pa(e=>e.toLowerCase())}function LF(){return pa(e=>e.toUpperCase())}function FF(){return pa(e=>Kz(e))}function $F(e,t,n){return new e({type:"array",element:t,...Me(n)})}function VF(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Me(n)})}function BF(e){const t=UF(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(wl(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(wl(o))}},e(n.value,n)));return t}function UF(e,t){const n=new Un({check:"custom",...Me(t)});return n._zod.check=e,n}function gC(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??al,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function on(e,t,n={path:[],schemaPath:[]}){var h,p;var r;const o=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const u=(p=(h=e._zod).toJSONSchema)==null?void 0:p.call(h);if(u)l.schema=u;else{const x={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,x);else{const C=l.schema,k=t.processors[o.type];if(!k)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);k(e,t,C,x)}const g=e._zod.parent;g&&(l.ref||(l.ref=g),on(g,t,x),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&vn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function yC(e,t){var l,u,d,f;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const h of e.seen.entries()){const p=(l=e.metadataRegistry.get(h[0]))==null?void 0:l.id;if(p){const x=r.get(p);if(x&&x!==h[0])throw new Error(`Duplicate schema id "${p}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(p,h[0])}}const o=h=>{var k;const p=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const S=(k=e.external.registry.get(h[0]))==null?void 0:k.id,E=e.external.uri??(P=>P);if(S)return{ref:E(S)};const _=h[1].defId??h[1].schema.id??`schema${e.counter++}`;return h[1].defId=_,{defId:_,ref:`${E("__shared")}#/${p}/${_}`}}if(h[1]===n)return{ref:"#"};const g=`#/${p}/`,C=h[1].schema.id??`__schema${e.counter++}`;return{defId:C,ref:g+C}},a=h=>{if(h[1].schema.$ref)return;const p=h[1],{ref:x,defId:g}=o(h);p.def={...p.schema},g&&(p.defId=g);const C=p.schema;for(const k in C)delete C[k];C.$ref=x};if(e.cycles==="throw")for(const h of e.seen.entries()){const p=h[1];if(p.cycle)throw new Error(`Cycle detected: #/${(u=p.cycle)==null?void 0:u.join("/")}/<root>
|
|
307
307
|
|
|
308
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const h of e.seen.entries()){const p=h[1];if(t===h[0]){a(h);continue}if(e.external){const g=(d=e.external.registry.get(h[0]))==null?void 0:d.id;if(t!==h[0]&&g){a(h);continue}}if((f=e.metadataRegistry.get(h[0]))==null?void 0:f.id){a(h);continue}if(p.cycle){a(h);continue}if(p.count>1&&e.reused==="ref"){a(h);continue}}}function xC(e,t){var l,u,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=f=>{const h=e.seen.get(f);if(h.ref===null)return;const p=h.def??h.schema,x={...p},g=h.ref;if(h.ref=null,g){r(g);const k=e.seen.get(g),S=k.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(S)):Object.assign(p,S),Object.assign(p,x),f._zod.parent===g)for(const _ in p)_==="$ref"||_==="allOf"||_ in x||delete p[_];if(S.$ref)for(const _ in p)_==="$ref"||_==="allOf"||_ in k.def&&JSON.stringify(p[_])===JSON.stringify(k.def[_])&&delete p[_]}const C=f._zod.parent;if(C&&C!==g){r(C);const k=e.seen.get(C);if(k!=null&&k.schema.$ref&&(p.$ref=k.schema.$ref,k.def))for(const S in p)S==="$ref"||S==="allOf"||S in k.def&&JSON.stringify(p[S])===JSON.stringify(k.def[S])&&delete p[S]}e.override({zodSchema:f,jsonSchema:p,path:h.path??[]})};for(const f of[...e.seen.entries()].reverse())r(f[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(l=e.external)!=null&&l.uri){const f=(u=e.external.registry.get(t))==null?void 0:u.id;if(!f)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(f)}Object.assign(o,n.def??n.schema);const a=((d=e.external)==null?void 0:d.defs)??{};for(const f of e.seen.entries()){const h=f[1];h.def&&h.defId&&(a[h.defId]=h.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{const f=JSON.parse(JSON.stringify(o));return Object.defineProperty(f,"~standard",{value:{...t["~standard"],jsonSchema:{input:Kc(t,"input",e.processors),output:Kc(t,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function vn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return vn(r.element,n);if(r.type==="set")return vn(r.valueType,n);if(r.type==="lazy")return vn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return vn(r.innerType,n);if(r.type==="intersection")return vn(r.left,n)||vn(r.right,n);if(r.type==="record"||r.type==="map")return vn(r.keyType,n)||vn(r.valueType,n);if(r.type==="pipe")return vn(r.in,n)||vn(r.out,n);if(r.type==="object"){for(const o in r.shape)if(vn(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(vn(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(vn(o,n))return!0;return!!(r.rest&&vn(r.rest,n))}return!1}const HF=(e,t={})=>n=>{const r=yC({...n,processors:t});return on(e,r),vC(r,e),xC(r,e)},Kc=(e,t,n={})=>r=>{const{libraryOptions:o,target:a}=r??{},l=yC({...o??{},target:a,io:t,processors:n});return on(e,l),vC(l,e),xC(l,e)},WF={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ZF=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:a,maximum:l,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof a=="number"&&(o.minLength=a),typeof l=="number"&&(o.maxLength=l),u&&(o.format=WF[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),f&&(o.contentEncoding=f),d&&d.size>0){const h=[...d];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},qF=(e,t,n,r)=>{const o=n,{minimum:a,maximum:l,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h),typeof a=="number"&&(o.minimum=a,typeof h=="number"&&t.target!=="draft-04"&&(h>=a?delete o.minimum:delete o.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f),typeof l=="number"&&(o.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete o.maximum:delete o.exclusiveMaximum)),typeof d=="number"&&(o.multipleOf=d)},QF=(e,t,n,r)=>{n.not={}},YF=(e,t,n,r)=>{},KF=(e,t,n,r)=>{const o=e._zod.def,a=JS(o.entries);a.every(l=>typeof l=="number")&&(n.type="number"),a.every(l=>typeof l=="string")&&(n.type="string"),n.enum=a},GF=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},XF=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},JF=(e,t,n,r)=>{const o=n,a=e._zod.def,{minimum:l,maximum:u}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=on(a.element,t,{...r,path:[...r.path,"items"]})},e4=(e,t,n,r)=>{var f;const o=n,a=e._zod.def;o.type="object",o.properties={};const l=a.shape;for(const h in l)o.properties[h]=on(l[h],t,{...r,path:[...r.path,"properties",h]});const u=new Set(Object.keys(l)),d=new Set([...u].filter(h=>{const p=a.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),((f=a.catchall)==null?void 0:f._zod.def.type)==="never"?o.additionalProperties=!1:a.catchall?a.catchall&&(o.additionalProperties=on(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},t4=(e,t,n,r)=>{const o=e._zod.def,a=o.inclusive===!1,l=o.options.map((u,d)=>on(u,t,{...r,path:[...r.path,a?"oneOf":"anyOf",d]}));a?n.oneOf=l:n.anyOf=l},n4=(e,t,n,r)=>{const o=e._zod.def,a=on(o.left,t,{...r,path:[...r.path,"allOf",0]}),l=on(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(a)?a.allOf:[a],...u(l)?l.allOf:[l]];n.allOf=d},r4=(e,t,n,r)=>{const o=e._zod.def,a=on(o.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},i4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType},o4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},s4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},a4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},l4=(e,t,n,r)=>{const o=e._zod.def,a=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;on(a,t,r);const l=t.seen.get(e);l.ref=a},u4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,n.readOnly=!0},wC=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType};function i0(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function c4(e,t){for(var n={};e.length;){var r=e[0],o=r.code,a=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[l]={message:u.message,type:u.code}}else n[l]={message:a,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(h){return h.errors.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=Jm(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function d4(e,t){for(var n={};e.length;){var r=e[0],o=r.code,a=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[l]={message:u.message,type:u.code}}else n[l]={message:a,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(h){return h.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=Jm(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function cg(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,a){try{return Promise.resolve(i0(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return a.shouldUseNativeValidation&&qp({},a),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return Array.isArray(u==null?void 0:u.issues)})(l))return{values:{},errors:$w(c4(l.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,a){try{return Promise.resolve(i0(function(){return Promise.resolve((n.mode==="sync"?cM:dM)(e,r,t)).then(function(l){return a.shouldUseNativeValidation&&qp({},a),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return u instanceof lg})(l))return{values:{},errors:$w(d4(l.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}var f4=e=>{switch(e){case"success":return m4;case"info":return y4;case"warning":return g4;case"error":return v4;default:return null}},h4=Array(12).fill(0),p4=({visible:e,className:t})=>le.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},le.createElement("div",{className:"sonner-spinner"},h4.map((n,r)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),m4=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),g4=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.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"})),y4=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),v4=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),x4=le.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"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),w4=()=>{let[e,t]=le.useState(document.hidden);return le.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Kp=1,b4=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,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Kp++,a=this.toasts.find(u=>u.id===o),l=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...e,id:o,title:n}),{...u,...e,id:o,dismissible:l,title:n}):u):this.addToast({title:n,...r,dismissible:l,id:o}),o},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(),o=n!==void 0,a,l=r.then(async d=>{if(a=["resolve",d],le.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(S4(d)&&!d.ok){o=!1;let f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:n,type:"error",message:f,description:h})}else if(t.success!==void 0){o=!1;let f=typeof t.success=="function"?await t.success(d):t.success,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"success",message:f,description:h})}}).catch(async d=>{if(a=["reject",d],t.error!==void 0){o=!1;let f=typeof t.error=="function"?await t.error(d):t.error,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"error",message:f,description:h})}}).finally(()=>{var d;o&&(this.dismiss(n),n=void 0),(d=t.finally)==null||d.call(t)}),u=()=>new Promise((d,f)=>l.then(()=>a[0]==="reject"?f(a[1]):d(a[1])).catch(f));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Kp++;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}},$n=new b4,k4=(e,t)=>{let n=(t==null?void 0:t.id)||Kp++;return $n.addToast({title:e,...t,id:n}),n},S4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",C4=k4,E4=()=>$n.toasts,_4=()=>$n.getActiveToasts(),Ct=Object.assign(C4,{success:$n.success,info:$n.info,warning:$n.warning,error:$n.error,custom:$n.custom,message:$n.message,promise:$n.promise,dismiss:$n.dismiss,loading:$n.loading},{getHistory:E4,getToasts:_4});function T4(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))}T4(`: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%)}
|
|
309
|
-
`);function fc(e){return e.label!==void 0}var P4=3,N4="32px",j4="16px",o0=4e3,R4=356,I4=14,A4=20,O4=200;function Tr(...e){return e.filter(Boolean).join(" ")}function D4(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var z4=e=>{var t,n,r,o,a,l,u,d,f,h,p;let{invert:x,toast:g,unstyled:C,interacting:k,setHeights:S,visibleToasts:E,heights:_,index:P,toasts:R,expanded:A,removeToast:j,defaultRichColors:F,closeButton:Z,style:re,cancelButtonStyle:O,actionButtonStyle:Y,className:M="",descriptionClassName:ne="",duration:W,position:U,gap:Q,loadingIcon:J,expandByDefault:D,classNames:G,icons:N,closeButtonAriaLabel:L="Close toast",pauseWhenPageIsHidden:K}=e,[I,ue]=le.useState(null),[ve,xe]=le.useState(null),[ie,me]=le.useState(!1),[Se,be]=le.useState(!1),[Ae,Ve]=le.useState(!1),[nt,It]=le.useState(!1),[sn,Gt]=le.useState(!1),[an,tr]=le.useState(0),[_n,Tn]=le.useState(0),$=le.useRef(g.duration||W||o0),ee=le.useRef(null),ae=le.useRef(null),ke=P===0,ye=P+1<=E,B=g.type,se=g.dismissible!==!1,we=g.className||"",_e=g.descriptionClassName||"",ze=le.useMemo(()=>_.findIndex(He=>He.toastId===g.id)||0,[_,g.id]),dt=le.useMemo(()=>{var He;return(He=g.closeButton)!=null?He:Z},[g.closeButton,Z]),Nt=le.useMemo(()=>g.duration||W||o0,[g.duration,W]),Zt=le.useRef(0),$t=le.useRef(0),Pn=le.useRef(0),pt=le.useRef(null),[pn,Xt]=U.split("-"),oi=le.useMemo(()=>_.reduce((He,rt,ft)=>ft>=ze?He:He+rt.height,0),[_,ze]),rs=w4(),Pi=g.invert||x,Fr=B==="loading";$t.current=le.useMemo(()=>ze*Q+oi,[ze,oi]),le.useEffect(()=>{$.current=Nt},[Nt]),le.useEffect(()=>{me(!0)},[]),le.useEffect(()=>{let He=ae.current;if(He){let rt=He.getBoundingClientRect().height;return Tn(rt),S(ft=>[{toastId:g.id,height:rt,position:g.position},...ft]),()=>S(ft=>ft.filter(mn=>mn.toastId!==g.id))}},[S,g.id]),le.useLayoutEffect(()=>{if(!ie)return;let He=ae.current,rt=He.style.height;He.style.height="auto";let ft=He.getBoundingClientRect().height;He.style.height=rt,Tn(ft),S(mn=>mn.find(Nn=>Nn.toastId===g.id)?mn.map(Nn=>Nn.toastId===g.id?{...Nn,height:ft}:Nn):[{toastId:g.id,height:ft,position:g.position},...mn])},[ie,g.title,g.description,S,g.id]);let vr=le.useCallback(()=>{be(!0),tr($t.current),S(He=>He.filter(rt=>rt.toastId!==g.id)),setTimeout(()=>{j(g)},O4)},[g,j,S,$t]);le.useEffect(()=>{if(g.promise&&B==="loading"||g.duration===1/0||g.type==="loading")return;let He;return A||k||K&&rs?(()=>{if(Pn.current<Zt.current){let rt=new Date().getTime()-Zt.current;$.current=$.current-rt}Pn.current=new Date().getTime()})():$.current!==1/0&&(Zt.current=new Date().getTime(),He=setTimeout(()=>{var rt;(rt=g.onAutoClose)==null||rt.call(g,g),vr()},$.current)),()=>clearTimeout(He)},[A,k,g,B,K,rs,vr]),le.useEffect(()=>{g.delete&&vr()},[vr,g.delete]);function Ul(){var He,rt,ft;return N!=null&&N.loading?le.createElement("div",{className:Tr(G==null?void 0:G.loader,(He=g==null?void 0:g.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":B==="loading"},N.loading):J?le.createElement("div",{className:Tr(G==null?void 0:G.loader,(rt=g==null?void 0:g.classNames)==null?void 0:rt.loader,"sonner-loader"),"data-visible":B==="loading"},J):le.createElement(p4,{className:Tr(G==null?void 0:G.loader,(ft=g==null?void 0:g.classNames)==null?void 0:ft.loader),visible:B==="loading"})}return le.createElement("li",{tabIndex:0,ref:ae,className:Tr(M,we,G==null?void 0:G.toast,(t=g==null?void 0:g.classNames)==null?void 0:t.toast,G==null?void 0:G.default,G==null?void 0:G[B],(n=g==null?void 0:g.classNames)==null?void 0:n[B]),"data-sonner-toast":"","data-rich-colors":(r=g.richColors)!=null?r:F,"data-styled":!(g.jsx||g.unstyled||C),"data-mounted":ie,"data-promise":!!g.promise,"data-swiped":sn,"data-removed":Se,"data-visible":ye,"data-y-position":pn,"data-x-position":Xt,"data-index":P,"data-front":ke,"data-swiping":Ae,"data-dismissible":se,"data-type":B,"data-invert":Pi,"data-swipe-out":nt,"data-swipe-direction":ve,"data-expanded":!!(A||D&&ie),style:{"--index":P,"--toasts-before":P,"--z-index":R.length-P,"--offset":`${Se?an:$t.current}px`,"--initial-height":D?"auto":`${_n}px`,...re,...g.style},onDragEnd:()=>{Ve(!1),ue(null),pt.current=null},onPointerDown:He=>{Fr||!se||(ee.current=new Date,tr($t.current),He.target.setPointerCapture(He.pointerId),He.target.tagName!=="BUTTON"&&(Ve(!0),pt.current={x:He.clientX,y:He.clientY}))},onPointerUp:()=>{var He,rt,ft,mn;if(nt||!se)return;pt.current=null;let Nn=Number(((He=ae.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jn=Number(((rt=ae.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xr=new Date().getTime()-((ft=ee.current)==null?void 0:ft.getTime()),Jt=I==="x"?Nn:jn,$r=Math.abs(Jt)/xr;if(Math.abs(Jt)>=A4||$r>.11){tr($t.current),(mn=g.onDismiss)==null||mn.call(g,g),xe(I==="x"?Nn>0?"right":"left":jn>0?"down":"up"),vr(),It(!0),Gt(!1);return}Ve(!1),ue(null)},onPointerMove:He=>{var rt,ft,mn,Nn;if(!pt.current||!se||((rt=window.getSelection())==null?void 0:rt.toString().length)>0)return;let jn=He.clientY-pt.current.y,xr=He.clientX-pt.current.x,Jt=(ft=e.swipeDirections)!=null?ft:D4(U);!I&&(Math.abs(xr)>1||Math.abs(jn)>1)&&ue(Math.abs(xr)>Math.abs(jn)?"x":"y");let $r={x:0,y:0};I==="y"?(Jt.includes("top")||Jt.includes("bottom"))&&(Jt.includes("top")&&jn<0||Jt.includes("bottom")&&jn>0)&&($r.y=jn):I==="x"&&(Jt.includes("left")||Jt.includes("right"))&&(Jt.includes("left")&&xr<0||Jt.includes("right")&&xr>0)&&($r.x=xr),(Math.abs($r.x)>0||Math.abs($r.y)>0)&&Gt(!0),(mn=ae.current)==null||mn.style.setProperty("--swipe-amount-x",`${$r.x}px`),(Nn=ae.current)==null||Nn.style.setProperty("--swipe-amount-y",`${$r.y}px`)}},dt&&!g.jsx?le.createElement("button",{"aria-label":L,"data-disabled":Fr,"data-close-button":!0,onClick:Fr||!se?()=>{}:()=>{var He;vr(),(He=g.onDismiss)==null||He.call(g,g)},className:Tr(G==null?void 0:G.closeButton,(o=g==null?void 0:g.classNames)==null?void 0:o.closeButton)},(a=N==null?void 0:N.close)!=null?a:x4):null,g.jsx||b.isValidElement(g.title)?g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title:le.createElement(le.Fragment,null,B||g.icon||g.promise?le.createElement("div",{"data-icon":"",className:Tr(G==null?void 0:G.icon,(l=g==null?void 0:g.classNames)==null?void 0:l.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Ul():null,g.type!=="loading"?g.icon||(N==null?void 0:N[B])||f4(B):null):null,le.createElement("div",{"data-content":"",className:Tr(G==null?void 0:G.content,(u=g==null?void 0:g.classNames)==null?void 0:u.content)},le.createElement("div",{"data-title":"",className:Tr(G==null?void 0:G.title,(d=g==null?void 0:g.classNames)==null?void 0:d.title)},typeof g.title=="function"?g.title():g.title),g.description?le.createElement("div",{"data-description":"",className:Tr(ne,_e,G==null?void 0:G.description,(f=g==null?void 0:g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),b.isValidElement(g.cancel)?g.cancel:g.cancel&&fc(g.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||O,onClick:He=>{var rt,ft;fc(g.cancel)&&se&&((ft=(rt=g.cancel).onClick)==null||ft.call(rt,He),vr())},className:Tr(G==null?void 0:G.cancelButton,(h=g==null?void 0:g.classNames)==null?void 0:h.cancelButton)},g.cancel.label):null,b.isValidElement(g.action)?g.action:g.action&&fc(g.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||Y,onClick:He=>{var rt,ft;fc(g.action)&&((ft=(rt=g.action).onClick)==null||ft.call(rt,He),!He.defaultPrevented&&vr())},className:Tr(G==null?void 0:G.actionButton,(p=g==null?void 0:g.classNames)==null?void 0:p.actionButton)},g.action.label):null))};function s0(){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 M4(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,l=a?"--mobile-offset":"--offset",u=a?j4:N4;function d(f){["top","right","bottom","left"].forEach(h=>{n[`${l}-${h}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${l}-${f}`]=u:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}var L4=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:u,offset:d,mobileOffset:f,theme:h="light",richColors:p,duration:x,style:g,visibleToasts:C=P4,toastOptions:k,dir:S=s0(),gap:E=I4,loadingIcon:_,icons:P,containerAriaLabel:R="Notifications",pauseWhenPageIsHidden:A}=e,[j,F]=le.useState([]),Z=le.useMemo(()=>Array.from(new Set([r].concat(j.filter(K=>K.position).map(K=>K.position)))),[j,r]),[re,O]=le.useState([]),[Y,M]=le.useState(!1),[ne,W]=le.useState(!1),[U,Q]=le.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),J=le.useRef(null),D=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=le.useRef(null),N=le.useRef(!1),L=le.useCallback(K=>{F(I=>{var ue;return(ue=I.find(ve=>ve.id===K.id))!=null&&ue.delete||$n.dismiss(K.id),I.filter(({id:ve})=>ve!==K.id)})},[]);return le.useEffect(()=>$n.subscribe(K=>{if(K.dismiss){F(I=>I.map(ue=>ue.id===K.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{Qb.flushSync(()=>{F(I=>{let ue=I.findIndex(ve=>ve.id===K.id);return ue!==-1?[...I.slice(0,ue),{...I[ue],...K},...I.slice(ue+1)]:[K,...I]})})})}),[]),le.useEffect(()=>{if(h!=="system"){Q(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;let K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:I})=>{Q(I?"dark":"light")})}catch{K.addListener(({matches:ue})=>{try{Q(ue?"dark":"light")}catch(ve){console.error(ve)}})}},[h]),le.useEffect(()=>{j.length<=1&&M(!1)},[j]),le.useEffect(()=>{let K=I=>{var ue,ve;o.every(xe=>I[xe]||I.code===xe)&&(M(!0),(ue=J.current)==null||ue.focus()),I.code==="Escape"&&(document.activeElement===J.current||(ve=J.current)!=null&&ve.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[o]),le.useEffect(()=>{if(J.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,N.current=!1)}},[J.current]),le.createElement("section",{ref:t,"aria-label":`${R} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Z.map((K,I)=>{var ue;let[ve,xe]=K.split("-");return j.length?le.createElement("ol",{key:K,dir:S==="auto"?s0():S,tabIndex:-1,ref:J,className:u,"data-sonner-toaster":!0,"data-theme":U,"data-y-position":ve,"data-lifted":Y&&j.length>1&&!a,"data-x-position":xe,style:{"--front-toast-height":`${((ue=re[0])==null?void 0:ue.height)||0}px`,"--width":`${R4}px`,"--gap":`${E}px`,...g,...M4(d,f)},onBlur:ie=>{N.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(N.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||N.current||(N.current=!0,G.current=ie.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{ne||M(!1)},onDragEnd:()=>M(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},j.filter(ie=>!ie.position&&I===0||ie.position===K).map((ie,me)=>{var Se,be;return le.createElement(z4,{key:ie.id,icons:P,index:me,toast:ie,defaultRichColors:p,duration:(Se=k==null?void 0:k.duration)!=null?Se:x,className:k==null?void 0:k.className,descriptionClassName:k==null?void 0:k.descriptionClassName,invert:n,visibleToasts:C,closeButton:(be=k==null?void 0:k.closeButton)!=null?be:l,interacting:ne,position:K,style:k==null?void 0:k.style,unstyled:k==null?void 0:k.unstyled,classNames:k==null?void 0:k.classNames,cancelButtonStyle:k==null?void 0:k.cancelButtonStyle,actionButtonStyle:k==null?void 0:k.actionButtonStyle,removeToast:L,toasts:j.filter(Ae=>Ae.position==ie.position),heights:re.filter(Ae=>Ae.position==ie.position),setHeights:O,expandByDefault:a,gap:E,loadingIcon:_,expanded:Y,pauseWhenPageIsHidden:A,swipeDirections:e.swipeDirections})})):null}))});const F4=ce("ZodISODateTime",(e,t)=>{vL.init(e,t),_t.init(e,t)});function $4(e){return bF(F4,e)}const V4=ce("ZodISODate",(e,t)=>{xL.init(e,t),_t.init(e,t)});function B4(e){return kF(V4,e)}const U4=ce("ZodISOTime",(e,t)=>{wL.init(e,t),_t.init(e,t)});function H4(e){return SF(U4,e)}const W4=ce("ZodISODuration",(e,t)=>{bL.init(e,t),_t.init(e,t)});function Z4(e){return CF(W4,e)}const q4=(e,t)=>{lg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>uM(e,n)},flatten:{value:n=>lM(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Qp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Qp,2)}},isEmpty:{get(){return e.issues.length===0}}})},yr=ce("ZodError",q4,{Parent:Error}),Q4=Id(yr),Y4=Ad(yr),K4=Od(yr),G4=Dd(yr),X4=pM(yr),J4=mM(yr),e$=gM(yr),t$=yM(yr),n$=vM(yr),r$=xM(yr),i$=wM(yr),o$=bM(yr),Ft=ce("ZodType",(e,t)=>(Lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Kc(e,"input"),output:Kc(e,"output")}}),e.toJSONSchema=HF(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(po(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>mo(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>Q4(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>K4(e,n,r),e.parseAsync=async(n,r)=>Y4(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>G4(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>X4(e,n,r),e.decode=(n,r)=>J4(e,n,r),e.encodeAsync=async(n,r)=>e$(e,n,r),e.decodeAsync=async(n,r)=>t$(e,n,r),e.safeEncode=(n,r)=>n$(e,n,r),e.safeDecode=(n,r)=>r$(e,n,r),e.safeEncodeAsync=async(n,r)=>i$(e,n,r),e.safeDecodeAsync=async(n,r)=>o$(e,n,r),e.refine=(n,r)=>e.check(X$(n,r)),e.superRefine=n=>e.check(J$(n)),e.overwrite=n=>e.check(pa(n)),e.optional=()=>c0(e),e.exactOptional=()=>F$(e),e.nullable=()=>d0(e),e.nullish=()=>c0(d0(e)),e.nonoptional=n=>W$(e,n),e.array=()=>N$(e),e.or=n=>I$([e,n]),e.and=n=>O$(e,n),e.transform=n=>f0(e,M$(n)),e.default=n=>B$(e,n),e.prefault=n=>H$(e,n),e.catch=n=>q$(e,n),e.pipe=n=>f0(e,n),e.readonly=()=>K$(e),e.describe=n=>{const r=e.clone();return al.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=al.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return al.get(e);const r=e.clone();return al.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),bC=ce("_ZodString",(e,t)=>{ug.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,o,a)=>ZF(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(NF(...r)),e.includes=(...r)=>e.check(IF(...r)),e.startsWith=(...r)=>e.check(AF(...r)),e.endsWith=(...r)=>e.check(OF(...r)),e.min=(...r)=>e.check(Yc(...r)),e.max=(...r)=>e.check(mC(...r)),e.length=(...r)=>e.check(gC(...r)),e.nonempty=(...r)=>e.check(Yc(1,...r)),e.lowercase=r=>e.check(jF(r)),e.uppercase=r=>e.check(RF(r)),e.trim=()=>e.check(zF()),e.normalize=(...r)=>e.check(DF(...r)),e.toLowerCase=()=>e.check(MF()),e.toUpperCase=()=>e.check(LF()),e.slugify=()=>e.check(FF())}),s$=ce("ZodString",(e,t)=>{ug.init(e,t),bC.init(e,t),e.email=n=>e.check(eF(a$,n)),e.url=n=>e.check(oF(l$,n)),e.jwt=n=>e.check(wF(S$,n)),e.emoji=n=>e.check(sF(u$,n)),e.guid=n=>e.check(e0(a0,n)),e.uuid=n=>e.check(tF(hc,n)),e.uuidv4=n=>e.check(nF(hc,n)),e.uuidv6=n=>e.check(rF(hc,n)),e.uuidv7=n=>e.check(iF(hc,n)),e.nanoid=n=>e.check(aF(c$,n)),e.guid=n=>e.check(e0(a0,n)),e.cuid=n=>e.check(lF(d$,n)),e.cuid2=n=>e.check(uF(f$,n)),e.ulid=n=>e.check(cF(h$,n)),e.base64=n=>e.check(yF(w$,n)),e.base64url=n=>e.check(vF(b$,n)),e.xid=n=>e.check(dF(p$,n)),e.ksuid=n=>e.check(fF(m$,n)),e.ipv4=n=>e.check(hF(g$,n)),e.ipv6=n=>e.check(pF(y$,n)),e.cidrv4=n=>e.check(mF(v$,n)),e.cidrv6=n=>e.check(gF(x$,n)),e.e164=n=>e.check(xF(k$,n)),e.datetime=n=>e.check($4(n)),e.date=n=>e.check(B4(n)),e.time=n=>e.check(H4(n)),e.duration=n=>e.check(Z4(n))});function Cn(e){return JL(s$,e)}const _t=ce("ZodStringFormat",(e,t)=>{bt.init(e,t),bC.init(e,t)}),a$=ce("ZodEmail",(e,t)=>{uL.init(e,t),_t.init(e,t)}),a0=ce("ZodGUID",(e,t)=>{aL.init(e,t),_t.init(e,t)}),hc=ce("ZodUUID",(e,t)=>{lL.init(e,t),_t.init(e,t)}),l$=ce("ZodURL",(e,t)=>{cL.init(e,t),_t.init(e,t)}),u$=ce("ZodEmoji",(e,t)=>{dL.init(e,t),_t.init(e,t)}),c$=ce("ZodNanoID",(e,t)=>{fL.init(e,t),_t.init(e,t)}),d$=ce("ZodCUID",(e,t)=>{hL.init(e,t),_t.init(e,t)}),f$=ce("ZodCUID2",(e,t)=>{pL.init(e,t),_t.init(e,t)}),h$=ce("ZodULID",(e,t)=>{mL.init(e,t),_t.init(e,t)}),p$=ce("ZodXID",(e,t)=>{gL.init(e,t),_t.init(e,t)}),m$=ce("ZodKSUID",(e,t)=>{yL.init(e,t),_t.init(e,t)}),g$=ce("ZodIPv4",(e,t)=>{kL.init(e,t),_t.init(e,t)}),y$=ce("ZodIPv6",(e,t)=>{SL.init(e,t),_t.init(e,t)}),v$=ce("ZodCIDRv4",(e,t)=>{CL.init(e,t),_t.init(e,t)}),x$=ce("ZodCIDRv6",(e,t)=>{EL.init(e,t),_t.init(e,t)}),w$=ce("ZodBase64",(e,t)=>{_L.init(e,t),_t.init(e,t)}),b$=ce("ZodBase64URL",(e,t)=>{PL.init(e,t),_t.init(e,t)}),k$=ce("ZodE164",(e,t)=>{NL.init(e,t),_t.init(e,t)}),S$=ce("ZodJWT",(e,t)=>{RL.init(e,t),_t.init(e,t)}),kC=ce("ZodNumber",(e,t)=>{dC.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,o,a)=>qF(e,r,o),e.gt=(r,o)=>e.check(n0(r,o)),e.gte=(r,o)=>e.check(Yh(r,o)),e.min=(r,o)=>e.check(Yh(r,o)),e.lt=(r,o)=>e.check(t0(r,o)),e.lte=(r,o)=>e.check(Qh(r,o)),e.max=(r,o)=>e.check(Qh(r,o)),e.int=r=>e.check(l0(r)),e.safe=r=>e.check(l0(r)),e.positive=r=>e.check(n0(0,r)),e.nonnegative=r=>e.check(Yh(0,r)),e.negative=r=>e.check(t0(0,r)),e.nonpositive=r=>e.check(Qh(0,r)),e.multipleOf=(r,o)=>e.check(r0(r,o)),e.step=(r,o)=>e.check(r0(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function dg(e){return EF(kC,e)}const C$=ce("ZodNumberFormat",(e,t)=>{IL.init(e,t),kC.init(e,t)});function l0(e){return _F(C$,e)}const E$=ce("ZodUnknown",(e,t)=>{AL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>YF()});function u0(){return TF(E$)}const _$=ce("ZodNever",(e,t)=>{OL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>QF(e,n,r)});function T$(e){return PF(_$,e)}const P$=ce("ZodArray",(e,t)=>{DL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>JF(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Yc(n,r)),e.nonempty=n=>e.check(Yc(1,n)),e.max=(n,r)=>e.check(mC(n,r)),e.length=(n,r)=>e.check(gC(n,r)),e.unwrap=()=>e.element});function N$(e,t){return $F(P$,e,t)}const j$=ce("ZodObject",(e,t)=>{ML.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>e4(e,n,r,o),ut(e,"shape",()=>t.shape),e.keyof=()=>D$(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:u0()}),e.loose=()=>e.clone({...e._zod.def,catchall:u0()}),e.strict=()=>e.clone({...e._zod.def,catchall:T$()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>rM(e,n),e.safeExtend=n=>iM(e,n),e.merge=n=>oM(e,n),e.pick=n=>tM(e,n),e.omit=n=>nM(e,n),e.partial=(...n)=>sM(SC,e,n[0]),e.required=(...n)=>aM(CC,e,n[0])});function fg(e,t){const n={type:"object",shape:e??{},...Me(t)};return new j$(n)}const R$=ce("ZodUnion",(e,t)=>{LL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>t4(e,n,r,o),e.options=t.options});function I$(e,t){return new R$({type:"union",options:e,...Me(t)})}const A$=ce("ZodIntersection",(e,t)=>{FL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>n4(e,n,r,o)});function O$(e,t){return new A$({type:"intersection",left:e,right:t})}const Gp=ce("ZodEnum",(e,t)=>{$L.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,o,a)=>KF(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const a={};for(const l of r)if(n.has(l))a[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Gp({...t,checks:[],...Me(o),entries:a})},e.exclude=(r,o)=>{const a={...t.entries};for(const l of r)if(n.has(l))delete a[l];else throw new Error(`Key ${l} not found in enum`);return new Gp({...t,checks:[],...Me(o),entries:a})}});function D$(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Gp({type:"enum",entries:n,...Me(t)})}const z$=ce("ZodTransform",(e,t)=>{VL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>XF(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new GS(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(wl(a,n.value,t));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(wl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(a=>(n.value=a,n)):(n.value=o,n)}});function M$(e){return new z$({type:"transform",transform:e})}const SC=ce("ZodOptional",(e,t)=>{pC.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function c0(e){return new SC({type:"optional",innerType:e})}const L$=ce("ZodExactOptional",(e,t)=>{BL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function F$(e){return new L$({type:"optional",innerType:e})}const $$=ce("ZodNullable",(e,t)=>{UL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>r4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function d0(e){return new $$({type:"nullable",innerType:e})}const V$=ce("ZodDefault",(e,t)=>{HL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>o4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function B$(e,t){return new V$({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():tC(t)}})}const U$=ce("ZodPrefault",(e,t)=>{WL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>s4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function H$(e,t){return new U$({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():tC(t)}})}const CC=ce("ZodNonOptional",(e,t)=>{ZL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>i4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function W$(e,t){return new CC({type:"nonoptional",innerType:e,...Me(t)})}const Z$=ce("ZodCatch",(e,t)=>{qL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>a4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function q$(e,t){return new Z$({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Q$=ce("ZodPipe",(e,t)=>{QL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>l4(e,n,r,o),e.in=t.in,e.out=t.out});function f0(e,t){return new Q$({type:"pipe",in:e,out:t})}const Y$=ce("ZodReadonly",(e,t)=>{YL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>u4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function K$(e){return new Y$({type:"readonly",innerType:e})}const G$=ce("ZodCustom",(e,t)=>{KL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>GF(e,n)});function X$(e,t={}){return VF(G$,e,t)}function J$(e){return BF(e)}const hg=fg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:dg().min(0).max(5)}),e3=hg,t3=hg.extend({tags:Cn(),epicId:Cn().nullable()}),n3=hg.extend({tags:Cn(),parentTaskId:Cn().min(1,"Parent task is required")}),r3=e=>{switch(e){case"epic":return e3;case"subtask":return n3;default:return t3}},h0=(e,t)=>{const n={title:"",description:"",status:t||"todo",priority:2};return e==="epic"?n:e==="subtask"?{...n,tags:"",parentTaskId:""}:{...n,tags:"",epicId:null}};function i3({type:e,defaultStatus:t,onClose:n,onCreated:r}){const o=ng({resolver:cg(r3(e)),defaultValues:h0(e,t)});b.useEffect(()=>{o.reset(h0(e,t))},[e,t,o]);const{formState:{isSubmitting:a}}=o,l=async h=>{const p=await fetch("/api/epics",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:h.title.trim(),description:h.description.trim()||null,status:h.status,priority:h.priority})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create epic")}return p.json()},u=async h=>{const p=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:h.title.trim(),description:h.description.trim()||null,status:h.status,priority:h.priority,tags:h.tags.trim()||null,epicId:h.epicId||null,parentTaskId:null})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create task")}return p.json()},d=async h=>{const p=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:h.title.trim(),description:h.description.trim()||null,status:h.status,priority:h.priority,tags:h.tags.trim()||null,epicId:null,parentTaskId:h.parentTaskId})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create subtask")}return p.json()},f=o.handleSubmit(async h=>{try{let p;e==="epic"?(p=await l(h),Ct.success(`Epic ${p.id} created`)):e==="subtask"?(p=await d(h),Ct.success(`Subtask ${p.id} created`)):(p=await u(h),Ct.success(`Task ${p.id} created`)),n(),r()}catch(p){Ct.error(p instanceof Error?p.message:"Failed to create")}},h=>{const p=Object.values(h)[0];p!=null&&p.message&&typeof p.message=="string"&&Ct.error(p.message)});return{form:o,isSubmitting:a,handleSubmit:f}}const Kh=[{value:"epic",label:"Epic",icon:ld},{value:"task",label:"Task",icon:Ol},{value:"subtask",label:"Subtask",icon:hk}];function o3({open:e,onClose:t,onCreated:n,epics:r,tasks:o,defaultStatus:a,defaultType:l}){var C;const[u,d]=b.useState("task"),f=o.filter(k=>!k.parentTaskId),{form:h,isSubmitting:p,handleSubmit:x}=i3({type:u,defaultStatus:a,onClose:t,onCreated:n});b.useEffect(()=>{e&&d(l||"task")},[e,l]);const g=((C=Kh.find(k=>k.value===u))==null?void 0:C.icon)||Ol;return y.jsx(JO,{open:e,onOpenChange:k=>!k&&t(),children:y.jsxs(nD,{side:"right",className:"p-0 flex flex-col w-full sm:max-w-md gap-0",children:[y.jsx(rD,{className:"shrink-0 border-b p-4",children:y.jsxs(oD,{className:"flex items-center gap-2",children:[y.jsx(g,{className:"h-5 w-5"}),"Create New ",u.charAt(0).toUpperCase()+u.slice(1)]})}),y.jsx(Zm,{className:"flex-1 min-h-0",showScrollbar:!0,children:y.jsxs("form",{id:"create-form",onSubmit:x,className:"p-4 space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Type"}),y.jsxs(dr,{value:u,onValueChange:k=>{Kh.some(S=>S.value===k)&&d(k)},children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsx(pr,{children:Kh.map(({value:k,label:S,icon:E})=>y.jsx(nn,{value:k,children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(E,{className:"h-4 w-4"}),S]})},k))})]})]}),y.jsx(Wz,{form:h,type:u,epics:r,parentTasks:f},u)]})}),y.jsxs(iD,{className:"shrink-0 border-t p-4",children:[y.jsx(it,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),y.jsx(it,{type:"submit",form:"create-form",disabled:p,children:p?"Creating...":"Create"})]})]})})}function s3(e){const t=Xs(r=>r.connectionStatus),n=b.useRef(e);return n.current=e,b.useEffect(()=>{const r=Xs.getState().setConnectionStatus;r("connecting");const o=new EventSource("/api/events");return o.onopen=()=>{r("connected")},o.onmessage=a=>{var l;try{const u=JSON.parse(a.data);if(u.type==="connected"){r("connected");return}let d="",f="";switch(u.type){case"task_created":d=`Task ${u.taskId} created`,f=`"${u.taskTitle}"`;break;case"task_updated":d=`Task ${u.taskId} updated`,f=`"${u.taskTitle}" → ${na[u.status]||u.status}`;break;case"task_deleted":d=`Task ${u.taskId} deleted`,f=`"${u.taskTitle}"`;break;case"epic_created":d=`Epic ${u.epicId} created`,f=`"${u.epicTitle}"`;break;case"epic_updated":d=`Epic ${u.epicId} updated`,f=`"${u.epicTitle}" → ${na[u.status]||u.status}`;break;case"epic_deleted":d=`Epic ${u.epicId} deleted`,f=`"${u.epicTitle}"`;break}Ct.info(d,{description:f}),LA({title:d,body:f,tag:u.type}),(l=n.current)==null||l.call(n)}catch{}},o.onerror=()=>{r("disconnected")},()=>{o.close(),r("disconnected")}},[]),{connectionStatus:t}}const a3=xk("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function lo({className:e,variant:t,asChild:n=!1,...r}){const o=n?gk:"span";return y.jsx(o,{"data-slot":"badge",className:Be(a3({variant:t}),e),...r})}function EC({priority:e}){const t=Zc[e]||Zc[2];return y.jsxs(lo,{className:"font-mono text-xs",title:Nd[e],style:{backgroundColor:t.bg,color:t.text},children:["P",e]})}function l3(e,t=[]){let n=[];function r(a,l){const u=b.createContext(l);u.displayName=a+"Context";const d=n.length;n=[...n,l];const f=p=>{var E;const{scope:x,children:g,...C}=p,k=((E=x==null?void 0:x[e])==null?void 0:E[d])||u,S=b.useMemo(()=>C,Object.values(C));return y.jsx(k.Provider,{value:S,children:g})};f.displayName=a+"Provider";function h(p,x){var k;const g=((k=x==null?void 0:x[e])==null?void 0:k[d])||u,C=b.useContext(g);if(C)return C;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[f,h]}const o=()=>{const a=n.map(l=>b.createContext(l));return function(u){const d=(u==null?void 0:u[e])||a;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,u3(o,...t)]}function u3(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(a)[`__scope${f}`];return{...u,...p}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var c3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_C=c3.reduce((e,t)=>{const n=_m(`Primitive.${t}`),r=b.forwardRef((o,a)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),pg="Progress",mg=100,[d3]=l3(pg),[f3,h3]=d3(pg),TC=b.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=p3,...l}=e;(o||o===0)&&!p0(o)&&console.error(m3(`${o}`,"Progress"));const u=p0(o)?o:mg;r!==null&&!m0(r,u)&&console.error(g3(`${r}`,"Progress"));const d=m0(r,u)?r:null,f=Gc(d)?a(d,u):void 0;return y.jsx(f3,{scope:n,value:d,max:u,children:y.jsx(_C.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Gc(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":jC(d,u),"data-value":d??void 0,"data-max":u,...l,ref:t})})});TC.displayName=pg;var PC="ProgressIndicator",NC=b.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=h3(PC,n);return y.jsx(_C.div,{"data-state":jC(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});NC.displayName=PC;function p3(e,t){return`${Math.round(e/t*100)}%`}function jC(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Gc(e){return typeof e=="number"}function p0(e){return Gc(e)&&!isNaN(e)&&e>0}function m0(e,t){return Gc(e)&&!isNaN(e)&&e<=t&&e>=0}function m3(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${mg}\`.`}function g3(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
308
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const h of e.seen.entries()){const p=h[1];if(t===h[0]){a(h);continue}if(e.external){const g=(d=e.external.registry.get(h[0]))==null?void 0:d.id;if(t!==h[0]&&g){a(h);continue}}if((f=e.metadataRegistry.get(h[0]))==null?void 0:f.id){a(h);continue}if(p.cycle){a(h);continue}if(p.count>1&&e.reused==="ref"){a(h);continue}}}function vC(e,t){var l,u,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=f=>{const h=e.seen.get(f);if(h.ref===null)return;const p=h.def??h.schema,x={...p},g=h.ref;if(h.ref=null,g){r(g);const k=e.seen.get(g),S=k.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(S)):Object.assign(p,S),Object.assign(p,x),f._zod.parent===g)for(const _ in p)_==="$ref"||_==="allOf"||_ in x||delete p[_];if(S.$ref)for(const _ in p)_==="$ref"||_==="allOf"||_ in k.def&&JSON.stringify(p[_])===JSON.stringify(k.def[_])&&delete p[_]}const C=f._zod.parent;if(C&&C!==g){r(C);const k=e.seen.get(C);if(k!=null&&k.schema.$ref&&(p.$ref=k.schema.$ref,k.def))for(const S in p)S==="$ref"||S==="allOf"||S in k.def&&JSON.stringify(p[S])===JSON.stringify(k.def[S])&&delete p[S]}e.override({zodSchema:f,jsonSchema:p,path:h.path??[]})};for(const f of[...e.seen.entries()].reverse())r(f[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(l=e.external)!=null&&l.uri){const f=(u=e.external.registry.get(t))==null?void 0:u.id;if(!f)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(f)}Object.assign(o,n.def??n.schema);const a=((d=e.external)==null?void 0:d.defs)??{};for(const f of e.seen.entries()){const h=f[1];h.def&&h.defId&&(a[h.defId]=h.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{const f=JSON.parse(JSON.stringify(o));return Object.defineProperty(f,"~standard",{value:{...t["~standard"],jsonSchema:{input:Kc(t,"input",e.processors),output:Kc(t,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function vn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return vn(r.element,n);if(r.type==="set")return vn(r.valueType,n);if(r.type==="lazy")return vn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return vn(r.innerType,n);if(r.type==="intersection")return vn(r.left,n)||vn(r.right,n);if(r.type==="record"||r.type==="map")return vn(r.keyType,n)||vn(r.valueType,n);if(r.type==="pipe")return vn(r.in,n)||vn(r.out,n);if(r.type==="object"){for(const o in r.shape)if(vn(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(vn(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(vn(o,n))return!0;return!!(r.rest&&vn(r.rest,n))}return!1}const HF=(e,t={})=>n=>{const r=gC({...n,processors:t});return on(e,r),yC(r,e),vC(r,e)},Kc=(e,t,n={})=>r=>{const{libraryOptions:o,target:a}=r??{},l=gC({...o??{},target:a,io:t,processors:n});return on(e,l),yC(l,e),vC(l,e)},WF={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ZF=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:a,maximum:l,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof a=="number"&&(o.minLength=a),typeof l=="number"&&(o.maxLength=l),u&&(o.format=WF[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),f&&(o.contentEncoding=f),d&&d.size>0){const h=[...d];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},qF=(e,t,n,r)=>{const o=n,{minimum:a,maximum:l,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h),typeof a=="number"&&(o.minimum=a,typeof h=="number"&&t.target!=="draft-04"&&(h>=a?delete o.minimum:delete o.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f),typeof l=="number"&&(o.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete o.maximum:delete o.exclusiveMaximum)),typeof d=="number"&&(o.multipleOf=d)},QF=(e,t,n,r)=>{n.not={}},YF=(e,t,n,r)=>{},KF=(e,t,n,r)=>{const o=e._zod.def,a=XS(o.entries);a.every(l=>typeof l=="number")&&(n.type="number"),a.every(l=>typeof l=="string")&&(n.type="string"),n.enum=a},GF=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},XF=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},JF=(e,t,n,r)=>{const o=n,a=e._zod.def,{minimum:l,maximum:u}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=on(a.element,t,{...r,path:[...r.path,"items"]})},e4=(e,t,n,r)=>{var f;const o=n,a=e._zod.def;o.type="object",o.properties={};const l=a.shape;for(const h in l)o.properties[h]=on(l[h],t,{...r,path:[...r.path,"properties",h]});const u=new Set(Object.keys(l)),d=new Set([...u].filter(h=>{const p=a.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),((f=a.catchall)==null?void 0:f._zod.def.type)==="never"?o.additionalProperties=!1:a.catchall?a.catchall&&(o.additionalProperties=on(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},t4=(e,t,n,r)=>{const o=e._zod.def,a=o.inclusive===!1,l=o.options.map((u,d)=>on(u,t,{...r,path:[...r.path,a?"oneOf":"anyOf",d]}));a?n.oneOf=l:n.anyOf=l},n4=(e,t,n,r)=>{const o=e._zod.def,a=on(o.left,t,{...r,path:[...r.path,"allOf",0]}),l=on(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(a)?a.allOf:[a],...u(l)?l.allOf:[l]];n.allOf=d},r4=(e,t,n,r)=>{const o=e._zod.def,a=on(o.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},i4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType},o4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},s4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},a4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},l4=(e,t,n,r)=>{const o=e._zod.def,a=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;on(a,t,r);const l=t.seen.get(e);l.ref=a},u4=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,n.readOnly=!0},xC=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType};function r0(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function c4(e,t){for(var n={};e.length;){var r=e[0],o=r.code,a=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[l]={message:u.message,type:u.code}}else n[l]={message:a,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(h){return h.errors.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=Xm(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function d4(e,t){for(var n={};e.length;){var r=e[0],o=r.code,a=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[l]={message:u.message,type:u.code}}else n[l]={message:a,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(h){return h.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=Xm(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function ug(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,a){try{return Promise.resolve(r0(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return a.shouldUseNativeValidation&&qp({},a),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return Array.isArray(u==null?void 0:u.issues)})(l))return{values:{},errors:Fw(c4(l.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,a){try{return Promise.resolve(r0(function(){return Promise.resolve((n.mode==="sync"?cM:dM)(e,r,t)).then(function(l){return a.shouldUseNativeValidation&&qp({},a),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return u instanceof ag})(l))return{values:{},errors:Fw(d4(l.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}var f4=e=>{switch(e){case"success":return m4;case"info":return y4;case"warning":return g4;case"error":return v4;default:return null}},h4=Array(12).fill(0),p4=({visible:e,className:t})=>le.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},le.createElement("div",{className:"sonner-spinner"},h4.map((n,r)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),m4=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),g4=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.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"})),y4=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),v4=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),x4=le.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"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),w4=()=>{let[e,t]=le.useState(document.hidden);return le.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Kp=1,b4=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,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Kp++,a=this.toasts.find(u=>u.id===o),l=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...e,id:o,title:n}),{...u,...e,id:o,dismissible:l,title:n}):u):this.addToast({title:n,...r,dismissible:l,id:o}),o},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(),o=n!==void 0,a,l=r.then(async d=>{if(a=["resolve",d],le.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(S4(d)&&!d.ok){o=!1;let f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:n,type:"error",message:f,description:h})}else if(t.success!==void 0){o=!1;let f=typeof t.success=="function"?await t.success(d):t.success,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"success",message:f,description:h})}}).catch(async d=>{if(a=["reject",d],t.error!==void 0){o=!1;let f=typeof t.error=="function"?await t.error(d):t.error,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"error",message:f,description:h})}}).finally(()=>{var d;o&&(this.dismiss(n),n=void 0),(d=t.finally)==null||d.call(t)}),u=()=>new Promise((d,f)=>l.then(()=>a[0]==="reject"?f(a[1]):d(a[1])).catch(f));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Kp++;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}},$n=new b4,k4=(e,t)=>{let n=(t==null?void 0:t.id)||Kp++;return $n.addToast({title:e,...t,id:n}),n},S4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",C4=k4,E4=()=>$n.toasts,_4=()=>$n.getActiveToasts(),Ct=Object.assign(C4,{success:$n.success,info:$n.info,warning:$n.warning,error:$n.error,custom:$n.custom,message:$n.message,promise:$n.promise,dismiss:$n.dismiss,loading:$n.loading},{getHistory:E4,getToasts:_4});function T4(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))}T4(`: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%)}
|
|
309
|
+
`);function fc(e){return e.label!==void 0}var P4=3,N4="32px",j4="16px",i0=4e3,R4=356,I4=14,A4=20,O4=200;function Tr(...e){return e.filter(Boolean).join(" ")}function D4(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var z4=e=>{var t,n,r,o,a,l,u,d,f,h,p;let{invert:x,toast:g,unstyled:C,interacting:k,setHeights:S,visibleToasts:E,heights:_,index:P,toasts:R,expanded:A,removeToast:j,defaultRichColors:F,closeButton:Z,style:re,cancelButtonStyle:O,actionButtonStyle:Y,className:M="",descriptionClassName:ne="",duration:W,position:U,gap:Q,loadingIcon:J,expandByDefault:D,classNames:G,icons:N,closeButtonAriaLabel:L="Close toast",pauseWhenPageIsHidden:K}=e,[I,ue]=le.useState(null),[ve,xe]=le.useState(null),[ie,me]=le.useState(!1),[Se,be]=le.useState(!1),[Ae,Ve]=le.useState(!1),[nt,It]=le.useState(!1),[sn,Gt]=le.useState(!1),[an,tr]=le.useState(0),[_n,Tn]=le.useState(0),$=le.useRef(g.duration||W||i0),ee=le.useRef(null),ae=le.useRef(null),ke=P===0,ye=P+1<=E,B=g.type,se=g.dismissible!==!1,we=g.className||"",_e=g.descriptionClassName||"",ze=le.useMemo(()=>_.findIndex(He=>He.toastId===g.id)||0,[_,g.id]),dt=le.useMemo(()=>{var He;return(He=g.closeButton)!=null?He:Z},[g.closeButton,Z]),Nt=le.useMemo(()=>g.duration||W||i0,[g.duration,W]),Zt=le.useRef(0),$t=le.useRef(0),Pn=le.useRef(0),pt=le.useRef(null),[pn,Xt]=U.split("-"),oi=le.useMemo(()=>_.reduce((He,rt,ft)=>ft>=ze?He:He+rt.height,0),[_,ze]),rs=w4(),Pi=g.invert||x,Fr=B==="loading";$t.current=le.useMemo(()=>ze*Q+oi,[ze,oi]),le.useEffect(()=>{$.current=Nt},[Nt]),le.useEffect(()=>{me(!0)},[]),le.useEffect(()=>{let He=ae.current;if(He){let rt=He.getBoundingClientRect().height;return Tn(rt),S(ft=>[{toastId:g.id,height:rt,position:g.position},...ft]),()=>S(ft=>ft.filter(mn=>mn.toastId!==g.id))}},[S,g.id]),le.useLayoutEffect(()=>{if(!ie)return;let He=ae.current,rt=He.style.height;He.style.height="auto";let ft=He.getBoundingClientRect().height;He.style.height=rt,Tn(ft),S(mn=>mn.find(Nn=>Nn.toastId===g.id)?mn.map(Nn=>Nn.toastId===g.id?{...Nn,height:ft}:Nn):[{toastId:g.id,height:ft,position:g.position},...mn])},[ie,g.title,g.description,S,g.id]);let vr=le.useCallback(()=>{be(!0),tr($t.current),S(He=>He.filter(rt=>rt.toastId!==g.id)),setTimeout(()=>{j(g)},O4)},[g,j,S,$t]);le.useEffect(()=>{if(g.promise&&B==="loading"||g.duration===1/0||g.type==="loading")return;let He;return A||k||K&&rs?(()=>{if(Pn.current<Zt.current){let rt=new Date().getTime()-Zt.current;$.current=$.current-rt}Pn.current=new Date().getTime()})():$.current!==1/0&&(Zt.current=new Date().getTime(),He=setTimeout(()=>{var rt;(rt=g.onAutoClose)==null||rt.call(g,g),vr()},$.current)),()=>clearTimeout(He)},[A,k,g,B,K,rs,vr]),le.useEffect(()=>{g.delete&&vr()},[vr,g.delete]);function Ul(){var He,rt,ft;return N!=null&&N.loading?le.createElement("div",{className:Tr(G==null?void 0:G.loader,(He=g==null?void 0:g.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":B==="loading"},N.loading):J?le.createElement("div",{className:Tr(G==null?void 0:G.loader,(rt=g==null?void 0:g.classNames)==null?void 0:rt.loader,"sonner-loader"),"data-visible":B==="loading"},J):le.createElement(p4,{className:Tr(G==null?void 0:G.loader,(ft=g==null?void 0:g.classNames)==null?void 0:ft.loader),visible:B==="loading"})}return le.createElement("li",{tabIndex:0,ref:ae,className:Tr(M,we,G==null?void 0:G.toast,(t=g==null?void 0:g.classNames)==null?void 0:t.toast,G==null?void 0:G.default,G==null?void 0:G[B],(n=g==null?void 0:g.classNames)==null?void 0:n[B]),"data-sonner-toast":"","data-rich-colors":(r=g.richColors)!=null?r:F,"data-styled":!(g.jsx||g.unstyled||C),"data-mounted":ie,"data-promise":!!g.promise,"data-swiped":sn,"data-removed":Se,"data-visible":ye,"data-y-position":pn,"data-x-position":Xt,"data-index":P,"data-front":ke,"data-swiping":Ae,"data-dismissible":se,"data-type":B,"data-invert":Pi,"data-swipe-out":nt,"data-swipe-direction":ve,"data-expanded":!!(A||D&&ie),style:{"--index":P,"--toasts-before":P,"--z-index":R.length-P,"--offset":`${Se?an:$t.current}px`,"--initial-height":D?"auto":`${_n}px`,...re,...g.style},onDragEnd:()=>{Ve(!1),ue(null),pt.current=null},onPointerDown:He=>{Fr||!se||(ee.current=new Date,tr($t.current),He.target.setPointerCapture(He.pointerId),He.target.tagName!=="BUTTON"&&(Ve(!0),pt.current={x:He.clientX,y:He.clientY}))},onPointerUp:()=>{var He,rt,ft,mn;if(nt||!se)return;pt.current=null;let Nn=Number(((He=ae.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jn=Number(((rt=ae.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xr=new Date().getTime()-((ft=ee.current)==null?void 0:ft.getTime()),Jt=I==="x"?Nn:jn,$r=Math.abs(Jt)/xr;if(Math.abs(Jt)>=A4||$r>.11){tr($t.current),(mn=g.onDismiss)==null||mn.call(g,g),xe(I==="x"?Nn>0?"right":"left":jn>0?"down":"up"),vr(),It(!0),Gt(!1);return}Ve(!1),ue(null)},onPointerMove:He=>{var rt,ft,mn,Nn;if(!pt.current||!se||((rt=window.getSelection())==null?void 0:rt.toString().length)>0)return;let jn=He.clientY-pt.current.y,xr=He.clientX-pt.current.x,Jt=(ft=e.swipeDirections)!=null?ft:D4(U);!I&&(Math.abs(xr)>1||Math.abs(jn)>1)&&ue(Math.abs(xr)>Math.abs(jn)?"x":"y");let $r={x:0,y:0};I==="y"?(Jt.includes("top")||Jt.includes("bottom"))&&(Jt.includes("top")&&jn<0||Jt.includes("bottom")&&jn>0)&&($r.y=jn):I==="x"&&(Jt.includes("left")||Jt.includes("right"))&&(Jt.includes("left")&&xr<0||Jt.includes("right")&&xr>0)&&($r.x=xr),(Math.abs($r.x)>0||Math.abs($r.y)>0)&&Gt(!0),(mn=ae.current)==null||mn.style.setProperty("--swipe-amount-x",`${$r.x}px`),(Nn=ae.current)==null||Nn.style.setProperty("--swipe-amount-y",`${$r.y}px`)}},dt&&!g.jsx?le.createElement("button",{"aria-label":L,"data-disabled":Fr,"data-close-button":!0,onClick:Fr||!se?()=>{}:()=>{var He;vr(),(He=g.onDismiss)==null||He.call(g,g)},className:Tr(G==null?void 0:G.closeButton,(o=g==null?void 0:g.classNames)==null?void 0:o.closeButton)},(a=N==null?void 0:N.close)!=null?a:x4):null,g.jsx||b.isValidElement(g.title)?g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title:le.createElement(le.Fragment,null,B||g.icon||g.promise?le.createElement("div",{"data-icon":"",className:Tr(G==null?void 0:G.icon,(l=g==null?void 0:g.classNames)==null?void 0:l.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Ul():null,g.type!=="loading"?g.icon||(N==null?void 0:N[B])||f4(B):null):null,le.createElement("div",{"data-content":"",className:Tr(G==null?void 0:G.content,(u=g==null?void 0:g.classNames)==null?void 0:u.content)},le.createElement("div",{"data-title":"",className:Tr(G==null?void 0:G.title,(d=g==null?void 0:g.classNames)==null?void 0:d.title)},typeof g.title=="function"?g.title():g.title),g.description?le.createElement("div",{"data-description":"",className:Tr(ne,_e,G==null?void 0:G.description,(f=g==null?void 0:g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),b.isValidElement(g.cancel)?g.cancel:g.cancel&&fc(g.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||O,onClick:He=>{var rt,ft;fc(g.cancel)&&se&&((ft=(rt=g.cancel).onClick)==null||ft.call(rt,He),vr())},className:Tr(G==null?void 0:G.cancelButton,(h=g==null?void 0:g.classNames)==null?void 0:h.cancelButton)},g.cancel.label):null,b.isValidElement(g.action)?g.action:g.action&&fc(g.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||Y,onClick:He=>{var rt,ft;fc(g.action)&&((ft=(rt=g.action).onClick)==null||ft.call(rt,He),!He.defaultPrevented&&vr())},className:Tr(G==null?void 0:G.actionButton,(p=g==null?void 0:g.classNames)==null?void 0:p.actionButton)},g.action.label):null))};function o0(){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 M4(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,l=a?"--mobile-offset":"--offset",u=a?j4:N4;function d(f){["top","right","bottom","left"].forEach(h=>{n[`${l}-${h}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${l}-${f}`]=u:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}var L4=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:u,offset:d,mobileOffset:f,theme:h="light",richColors:p,duration:x,style:g,visibleToasts:C=P4,toastOptions:k,dir:S=o0(),gap:E=I4,loadingIcon:_,icons:P,containerAriaLabel:R="Notifications",pauseWhenPageIsHidden:A}=e,[j,F]=le.useState([]),Z=le.useMemo(()=>Array.from(new Set([r].concat(j.filter(K=>K.position).map(K=>K.position)))),[j,r]),[re,O]=le.useState([]),[Y,M]=le.useState(!1),[ne,W]=le.useState(!1),[U,Q]=le.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),J=le.useRef(null),D=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=le.useRef(null),N=le.useRef(!1),L=le.useCallback(K=>{F(I=>{var ue;return(ue=I.find(ve=>ve.id===K.id))!=null&&ue.delete||$n.dismiss(K.id),I.filter(({id:ve})=>ve!==K.id)})},[]);return le.useEffect(()=>$n.subscribe(K=>{if(K.dismiss){F(I=>I.map(ue=>ue.id===K.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{qb.flushSync(()=>{F(I=>{let ue=I.findIndex(ve=>ve.id===K.id);return ue!==-1?[...I.slice(0,ue),{...I[ue],...K},...I.slice(ue+1)]:[K,...I]})})})}),[]),le.useEffect(()=>{if(h!=="system"){Q(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;let K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:I})=>{Q(I?"dark":"light")})}catch{K.addListener(({matches:ue})=>{try{Q(ue?"dark":"light")}catch(ve){console.error(ve)}})}},[h]),le.useEffect(()=>{j.length<=1&&M(!1)},[j]),le.useEffect(()=>{let K=I=>{var ue,ve;o.every(xe=>I[xe]||I.code===xe)&&(M(!0),(ue=J.current)==null||ue.focus()),I.code==="Escape"&&(document.activeElement===J.current||(ve=J.current)!=null&&ve.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[o]),le.useEffect(()=>{if(J.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,N.current=!1)}},[J.current]),le.createElement("section",{ref:t,"aria-label":`${R} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Z.map((K,I)=>{var ue;let[ve,xe]=K.split("-");return j.length?le.createElement("ol",{key:K,dir:S==="auto"?o0():S,tabIndex:-1,ref:J,className:u,"data-sonner-toaster":!0,"data-theme":U,"data-y-position":ve,"data-lifted":Y&&j.length>1&&!a,"data-x-position":xe,style:{"--front-toast-height":`${((ue=re[0])==null?void 0:ue.height)||0}px`,"--width":`${R4}px`,"--gap":`${E}px`,...g,...M4(d,f)},onBlur:ie=>{N.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(N.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||N.current||(N.current=!0,G.current=ie.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{ne||M(!1)},onDragEnd:()=>M(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},j.filter(ie=>!ie.position&&I===0||ie.position===K).map((ie,me)=>{var Se,be;return le.createElement(z4,{key:ie.id,icons:P,index:me,toast:ie,defaultRichColors:p,duration:(Se=k==null?void 0:k.duration)!=null?Se:x,className:k==null?void 0:k.className,descriptionClassName:k==null?void 0:k.descriptionClassName,invert:n,visibleToasts:C,closeButton:(be=k==null?void 0:k.closeButton)!=null?be:l,interacting:ne,position:K,style:k==null?void 0:k.style,unstyled:k==null?void 0:k.unstyled,classNames:k==null?void 0:k.classNames,cancelButtonStyle:k==null?void 0:k.cancelButtonStyle,actionButtonStyle:k==null?void 0:k.actionButtonStyle,removeToast:L,toasts:j.filter(Ae=>Ae.position==ie.position),heights:re.filter(Ae=>Ae.position==ie.position),setHeights:O,expandByDefault:a,gap:E,loadingIcon:_,expanded:Y,pauseWhenPageIsHidden:A,swipeDirections:e.swipeDirections})})):null}))});const F4=ce("ZodISODateTime",(e,t)=>{vL.init(e,t),_t.init(e,t)});function $4(e){return bF(F4,e)}const V4=ce("ZodISODate",(e,t)=>{xL.init(e,t),_t.init(e,t)});function B4(e){return kF(V4,e)}const U4=ce("ZodISOTime",(e,t)=>{wL.init(e,t),_t.init(e,t)});function H4(e){return SF(U4,e)}const W4=ce("ZodISODuration",(e,t)=>{bL.init(e,t),_t.init(e,t)});function Z4(e){return CF(W4,e)}const q4=(e,t)=>{ag.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>uM(e,n)},flatten:{value:n=>lM(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Qp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Qp,2)}},isEmpty:{get(){return e.issues.length===0}}})},yr=ce("ZodError",q4,{Parent:Error}),Q4=Id(yr),Y4=Ad(yr),K4=Od(yr),G4=Dd(yr),X4=pM(yr),J4=mM(yr),e$=gM(yr),t$=yM(yr),n$=vM(yr),r$=xM(yr),i$=wM(yr),o$=bM(yr),Ft=ce("ZodType",(e,t)=>(Lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Kc(e,"input"),output:Kc(e,"output")}}),e.toJSONSchema=HF(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(po(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>mo(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>Q4(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>K4(e,n,r),e.parseAsync=async(n,r)=>Y4(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>G4(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>X4(e,n,r),e.decode=(n,r)=>J4(e,n,r),e.encodeAsync=async(n,r)=>e$(e,n,r),e.decodeAsync=async(n,r)=>t$(e,n,r),e.safeEncode=(n,r)=>n$(e,n,r),e.safeDecode=(n,r)=>r$(e,n,r),e.safeEncodeAsync=async(n,r)=>i$(e,n,r),e.safeDecodeAsync=async(n,r)=>o$(e,n,r),e.refine=(n,r)=>e.check(X$(n,r)),e.superRefine=n=>e.check(J$(n)),e.overwrite=n=>e.check(pa(n)),e.optional=()=>u0(e),e.exactOptional=()=>F$(e),e.nullable=()=>c0(e),e.nullish=()=>u0(c0(e)),e.nonoptional=n=>W$(e,n),e.array=()=>N$(e),e.or=n=>I$([e,n]),e.and=n=>O$(e,n),e.transform=n=>d0(e,M$(n)),e.default=n=>B$(e,n),e.prefault=n=>H$(e,n),e.catch=n=>q$(e,n),e.pipe=n=>d0(e,n),e.readonly=()=>K$(e),e.describe=n=>{const r=e.clone();return al.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=al.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return al.get(e);const r=e.clone();return al.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),wC=ce("_ZodString",(e,t)=>{lg.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,o,a)=>ZF(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(NF(...r)),e.includes=(...r)=>e.check(IF(...r)),e.startsWith=(...r)=>e.check(AF(...r)),e.endsWith=(...r)=>e.check(OF(...r)),e.min=(...r)=>e.check(Yc(...r)),e.max=(...r)=>e.check(pC(...r)),e.length=(...r)=>e.check(mC(...r)),e.nonempty=(...r)=>e.check(Yc(1,...r)),e.lowercase=r=>e.check(jF(r)),e.uppercase=r=>e.check(RF(r)),e.trim=()=>e.check(zF()),e.normalize=(...r)=>e.check(DF(...r)),e.toLowerCase=()=>e.check(MF()),e.toUpperCase=()=>e.check(LF()),e.slugify=()=>e.check(FF())}),s$=ce("ZodString",(e,t)=>{lg.init(e,t),wC.init(e,t),e.email=n=>e.check(eF(a$,n)),e.url=n=>e.check(oF(l$,n)),e.jwt=n=>e.check(wF(S$,n)),e.emoji=n=>e.check(sF(u$,n)),e.guid=n=>e.check(Jw(s0,n)),e.uuid=n=>e.check(tF(hc,n)),e.uuidv4=n=>e.check(nF(hc,n)),e.uuidv6=n=>e.check(rF(hc,n)),e.uuidv7=n=>e.check(iF(hc,n)),e.nanoid=n=>e.check(aF(c$,n)),e.guid=n=>e.check(Jw(s0,n)),e.cuid=n=>e.check(lF(d$,n)),e.cuid2=n=>e.check(uF(f$,n)),e.ulid=n=>e.check(cF(h$,n)),e.base64=n=>e.check(yF(w$,n)),e.base64url=n=>e.check(vF(b$,n)),e.xid=n=>e.check(dF(p$,n)),e.ksuid=n=>e.check(fF(m$,n)),e.ipv4=n=>e.check(hF(g$,n)),e.ipv6=n=>e.check(pF(y$,n)),e.cidrv4=n=>e.check(mF(v$,n)),e.cidrv6=n=>e.check(gF(x$,n)),e.e164=n=>e.check(xF(k$,n)),e.datetime=n=>e.check($4(n)),e.date=n=>e.check(B4(n)),e.time=n=>e.check(H4(n)),e.duration=n=>e.check(Z4(n))});function Cn(e){return JL(s$,e)}const _t=ce("ZodStringFormat",(e,t)=>{bt.init(e,t),wC.init(e,t)}),a$=ce("ZodEmail",(e,t)=>{uL.init(e,t),_t.init(e,t)}),s0=ce("ZodGUID",(e,t)=>{aL.init(e,t),_t.init(e,t)}),hc=ce("ZodUUID",(e,t)=>{lL.init(e,t),_t.init(e,t)}),l$=ce("ZodURL",(e,t)=>{cL.init(e,t),_t.init(e,t)}),u$=ce("ZodEmoji",(e,t)=>{dL.init(e,t),_t.init(e,t)}),c$=ce("ZodNanoID",(e,t)=>{fL.init(e,t),_t.init(e,t)}),d$=ce("ZodCUID",(e,t)=>{hL.init(e,t),_t.init(e,t)}),f$=ce("ZodCUID2",(e,t)=>{pL.init(e,t),_t.init(e,t)}),h$=ce("ZodULID",(e,t)=>{mL.init(e,t),_t.init(e,t)}),p$=ce("ZodXID",(e,t)=>{gL.init(e,t),_t.init(e,t)}),m$=ce("ZodKSUID",(e,t)=>{yL.init(e,t),_t.init(e,t)}),g$=ce("ZodIPv4",(e,t)=>{kL.init(e,t),_t.init(e,t)}),y$=ce("ZodIPv6",(e,t)=>{SL.init(e,t),_t.init(e,t)}),v$=ce("ZodCIDRv4",(e,t)=>{CL.init(e,t),_t.init(e,t)}),x$=ce("ZodCIDRv6",(e,t)=>{EL.init(e,t),_t.init(e,t)}),w$=ce("ZodBase64",(e,t)=>{_L.init(e,t),_t.init(e,t)}),b$=ce("ZodBase64URL",(e,t)=>{PL.init(e,t),_t.init(e,t)}),k$=ce("ZodE164",(e,t)=>{NL.init(e,t),_t.init(e,t)}),S$=ce("ZodJWT",(e,t)=>{RL.init(e,t),_t.init(e,t)}),bC=ce("ZodNumber",(e,t)=>{cC.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,o,a)=>qF(e,r,o),e.gt=(r,o)=>e.check(t0(r,o)),e.gte=(r,o)=>e.check(Yh(r,o)),e.min=(r,o)=>e.check(Yh(r,o)),e.lt=(r,o)=>e.check(e0(r,o)),e.lte=(r,o)=>e.check(Qh(r,o)),e.max=(r,o)=>e.check(Qh(r,o)),e.int=r=>e.check(a0(r)),e.safe=r=>e.check(a0(r)),e.positive=r=>e.check(t0(0,r)),e.nonnegative=r=>e.check(Yh(0,r)),e.negative=r=>e.check(e0(0,r)),e.nonpositive=r=>e.check(Qh(0,r)),e.multipleOf=(r,o)=>e.check(n0(r,o)),e.step=(r,o)=>e.check(n0(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function cg(e){return EF(bC,e)}const C$=ce("ZodNumberFormat",(e,t)=>{IL.init(e,t),bC.init(e,t)});function a0(e){return _F(C$,e)}const E$=ce("ZodUnknown",(e,t)=>{AL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>YF()});function l0(){return TF(E$)}const _$=ce("ZodNever",(e,t)=>{OL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>QF(e,n,r)});function T$(e){return PF(_$,e)}const P$=ce("ZodArray",(e,t)=>{DL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>JF(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Yc(n,r)),e.nonempty=n=>e.check(Yc(1,n)),e.max=(n,r)=>e.check(pC(n,r)),e.length=(n,r)=>e.check(mC(n,r)),e.unwrap=()=>e.element});function N$(e,t){return $F(P$,e,t)}const j$=ce("ZodObject",(e,t)=>{ML.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>e4(e,n,r,o),ut(e,"shape",()=>t.shape),e.keyof=()=>D$(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:l0()}),e.loose=()=>e.clone({...e._zod.def,catchall:l0()}),e.strict=()=>e.clone({...e._zod.def,catchall:T$()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>rM(e,n),e.safeExtend=n=>iM(e,n),e.merge=n=>oM(e,n),e.pick=n=>tM(e,n),e.omit=n=>nM(e,n),e.partial=(...n)=>sM(kC,e,n[0]),e.required=(...n)=>aM(SC,e,n[0])});function dg(e,t){const n={type:"object",shape:e??{},...Me(t)};return new j$(n)}const R$=ce("ZodUnion",(e,t)=>{LL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>t4(e,n,r,o),e.options=t.options});function I$(e,t){return new R$({type:"union",options:e,...Me(t)})}const A$=ce("ZodIntersection",(e,t)=>{FL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>n4(e,n,r,o)});function O$(e,t){return new A$({type:"intersection",left:e,right:t})}const Gp=ce("ZodEnum",(e,t)=>{$L.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,o,a)=>KF(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const a={};for(const l of r)if(n.has(l))a[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Gp({...t,checks:[],...Me(o),entries:a})},e.exclude=(r,o)=>{const a={...t.entries};for(const l of r)if(n.has(l))delete a[l];else throw new Error(`Key ${l} not found in enum`);return new Gp({...t,checks:[],...Me(o),entries:a})}});function D$(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Gp({type:"enum",entries:n,...Me(t)})}const z$=ce("ZodTransform",(e,t)=>{VL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>XF(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new KS(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(wl(a,n.value,t));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(wl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(a=>(n.value=a,n)):(n.value=o,n)}});function M$(e){return new z$({type:"transform",transform:e})}const kC=ce("ZodOptional",(e,t)=>{hC.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function u0(e){return new kC({type:"optional",innerType:e})}const L$=ce("ZodExactOptional",(e,t)=>{BL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function F$(e){return new L$({type:"optional",innerType:e})}const $$=ce("ZodNullable",(e,t)=>{UL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>r4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function c0(e){return new $$({type:"nullable",innerType:e})}const V$=ce("ZodDefault",(e,t)=>{HL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>o4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function B$(e,t){return new V$({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():eC(t)}})}const U$=ce("ZodPrefault",(e,t)=>{WL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>s4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function H$(e,t){return new U$({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():eC(t)}})}const SC=ce("ZodNonOptional",(e,t)=>{ZL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>i4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function W$(e,t){return new SC({type:"nonoptional",innerType:e,...Me(t)})}const Z$=ce("ZodCatch",(e,t)=>{qL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>a4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function q$(e,t){return new Z$({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Q$=ce("ZodPipe",(e,t)=>{QL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>l4(e,n,r,o),e.in=t.in,e.out=t.out});function d0(e,t){return new Q$({type:"pipe",in:e,out:t})}const Y$=ce("ZodReadonly",(e,t)=>{YL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>u4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function K$(e){return new Y$({type:"readonly",innerType:e})}const G$=ce("ZodCustom",(e,t)=>{KL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>GF(e,n)});function X$(e,t={}){return VF(G$,e,t)}function J$(e){return BF(e)}const fg=dg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:cg().min(0).max(5)}),e3=fg,t3=fg.extend({tags:Cn(),epicId:Cn().nullable()}),n3=fg.extend({tags:Cn(),parentTaskId:Cn().min(1,"Parent task is required")}),r3=e=>{switch(e){case"epic":return e3;case"subtask":return n3;default:return t3}},f0=(e,t)=>{const n={title:"",description:"",status:t||"todo",priority:2};return e==="epic"?n:e==="subtask"?{...n,tags:"",parentTaskId:""}:{...n,tags:"",epicId:null}};function i3({type:e,defaultStatus:t,onClose:n,onCreated:r}){const o=tg({resolver:ug(r3(e)),defaultValues:f0(e,t)});b.useEffect(()=>{o.reset(f0(e,t))},[e,t,o]);const{formState:{isSubmitting:a}}=o,l=async h=>{const p=await fetch("/api/epics",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:h.title.trim(),description:h.description.trim()||null,status:h.status,priority:h.priority})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create epic")}return p.json()},u=async h=>{const p=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:h.title.trim(),description:h.description.trim()||null,status:h.status,priority:h.priority,tags:h.tags.trim()||null,epicId:h.epicId||null,parentTaskId:null})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create task")}return p.json()},d=async h=>{const p=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:h.title.trim(),description:h.description.trim()||null,status:h.status,priority:h.priority,tags:h.tags.trim()||null,epicId:null,parentTaskId:h.parentTaskId})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create subtask")}return p.json()},f=o.handleSubmit(async h=>{try{let p;e==="epic"?(p=await l(h),Ct.success(`Epic ${p.id} created`)):e==="subtask"?(p=await d(h),Ct.success(`Subtask ${p.id} created`)):(p=await u(h),Ct.success(`Task ${p.id} created`)),n(),r()}catch(p){Ct.error(p instanceof Error?p.message:"Failed to create")}},h=>{const p=Object.values(h)[0];p!=null&&p.message&&typeof p.message=="string"&&Ct.error(p.message)});return{form:o,isSubmitting:a,handleSubmit:f}}const Kh=[{value:"epic",label:"Epic",icon:ld},{value:"task",label:"Task",icon:Ol},{value:"subtask",label:"Subtask",icon:fk}];function o3({open:e,onClose:t,onCreated:n,epics:r,tasks:o,defaultStatus:a,defaultType:l}){var C;const[u,d]=b.useState("task"),f=o.filter(k=>!k.parentTaskId),{form:h,isSubmitting:p,handleSubmit:x}=i3({type:u,defaultStatus:a,onClose:t,onCreated:n});b.useEffect(()=>{e&&d(l||"task")},[e,l]);const g=((C=Kh.find(k=>k.value===u))==null?void 0:C.icon)||Ol;return y.jsx(XO,{open:e,onOpenChange:k=>!k&&t(),children:y.jsxs(tD,{side:"right",className:"p-0 flex flex-col w-full sm:max-w-md gap-0",children:[y.jsx(nD,{className:"shrink-0 border-b p-4",children:y.jsxs(iD,{className:"flex items-center gap-2",children:[y.jsx(g,{className:"h-5 w-5"}),"Create New ",u.charAt(0).toUpperCase()+u.slice(1)]})}),y.jsx(wD,{className:"flex-1 min-h-0",showScrollbar:!0,children:y.jsxs("form",{id:"create-form",onSubmit:x,className:"p-4 space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Type"}),y.jsxs(dr,{value:u,onValueChange:k=>{Kh.some(S=>S.value===k)&&d(k)},children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsx(pr,{children:Kh.map(({value:k,label:S,icon:E})=>y.jsx(nn,{value:k,children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(E,{className:"h-4 w-4"}),S]})},k))})]})]}),y.jsx(Wz,{form:h,type:u,epics:r,parentTasks:f},u)]})}),y.jsxs(rD,{className:"shrink-0 border-t p-4",children:[y.jsx(it,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),y.jsx(it,{type:"submit",form:"create-form",disabled:p,children:p?"Creating...":"Create"})]})]})})}function s3(e){const t=Xs(r=>r.connectionStatus),n=b.useRef(e);return n.current=e,b.useEffect(()=>{const r=Xs.getState().setConnectionStatus;r("connecting");const o=new EventSource("/api/events");return o.onopen=()=>{r("connected")},o.onmessage=a=>{var l;try{const u=JSON.parse(a.data);if(u.type==="connected"){r("connected");return}let d="",f="";switch(u.type){case"task_created":d=`Task ${u.taskId} created`,f=`"${u.taskTitle}"`;break;case"task_updated":d=`Task ${u.taskId} updated`,f=`"${u.taskTitle}" → ${na[u.status]||u.status}`;break;case"task_deleted":d=`Task ${u.taskId} deleted`,f=`"${u.taskTitle}"`;break;case"epic_created":d=`Epic ${u.epicId} created`,f=`"${u.epicTitle}"`;break;case"epic_updated":d=`Epic ${u.epicId} updated`,f=`"${u.epicTitle}" → ${na[u.status]||u.status}`;break;case"epic_deleted":d=`Epic ${u.epicId} deleted`,f=`"${u.epicTitle}"`;break}Ct.info(d,{description:f}),MA({title:d,body:f,tag:u.type}),(l=n.current)==null||l.call(n)}catch{}},o.onerror=()=>{r("disconnected")},()=>{o.close(),r("disconnected")}},[]),{connectionStatus:t}}const a3=vk("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function lo({className:e,variant:t,asChild:n=!1,...r}){const o=n?mk:"span";return y.jsx(o,{"data-slot":"badge",className:Be(a3({variant:t}),e),...r})}function CC({priority:e}){const t=Zc[e]||Zc[2];return y.jsxs(lo,{className:"font-mono text-xs",title:Nd[e],style:{backgroundColor:t.bg,color:t.text},children:["P",e]})}function l3(e,t=[]){let n=[];function r(a,l){const u=b.createContext(l);u.displayName=a+"Context";const d=n.length;n=[...n,l];const f=p=>{var E;const{scope:x,children:g,...C}=p,k=((E=x==null?void 0:x[e])==null?void 0:E[d])||u,S=b.useMemo(()=>C,Object.values(C));return y.jsx(k.Provider,{value:S,children:g})};f.displayName=a+"Provider";function h(p,x){var k;const g=((k=x==null?void 0:x[e])==null?void 0:k[d])||u,C=b.useContext(g);if(C)return C;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[f,h]}const o=()=>{const a=n.map(l=>b.createContext(l));return function(u){const d=(u==null?void 0:u[e])||a;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,u3(o,...t)]}function u3(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(a)[`__scope${f}`];return{...u,...p}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var c3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],EC=c3.reduce((e,t)=>{const n=_m(`Primitive.${t}`),r=b.forwardRef((o,a)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),hg="Progress",pg=100,[d3]=l3(hg),[f3,h3]=d3(hg),_C=b.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=p3,...l}=e;(o||o===0)&&!h0(o)&&console.error(m3(`${o}`,"Progress"));const u=h0(o)?o:pg;r!==null&&!p0(r,u)&&console.error(g3(`${r}`,"Progress"));const d=p0(r,u)?r:null,f=Gc(d)?a(d,u):void 0;return y.jsx(f3,{scope:n,value:d,max:u,children:y.jsx(EC.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Gc(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":NC(d,u),"data-value":d??void 0,"data-max":u,...l,ref:t})})});_C.displayName=hg;var TC="ProgressIndicator",PC=b.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=h3(TC,n);return y.jsx(EC.div,{"data-state":NC(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});PC.displayName=TC;function p3(e,t){return`${Math.round(e/t*100)}%`}function NC(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Gc(e){return typeof e=="number"}function h0(e){return Gc(e)&&!isNaN(e)&&e>0}function p0(e,t){return Gc(e)&&!isNaN(e)&&e<=t&&e>=0}function m3(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${pg}\`.`}function g3(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
310
310
|
- a positive number
|
|
311
|
-
- less than the value passed to \`max\` (or ${
|
|
311
|
+
- less than the value passed to \`max\` (or ${pg} if no \`max\` prop is set)
|
|
312
312
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
313
313
|
|
|
314
|
-
Defaulting to \`null\`.`}var y3=TC,v3=NC;function RC({className:e,value:t,...n}){return y.jsx(y3,{"data-slot":"progress",className:Be("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:y.jsx(v3,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function x3({completed:e,total:t}){if(t===0)return null;const n=Math.round(e/t*100),r=o=>o===100?"[&>div]:bg-green-500":o>=67?"[&>div]:bg-blue-500":o>=34?"[&>div]:bg-yellow-500":"[&>div]:bg-red-500";return y.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[y.jsx(RC,{value:n,className:Be("flex-1 h-1.5",r(n))}),y.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[e,"/",t]})]})}var Ec={exports:{}},w3=Ec.exports,g0;function b3(){return g0||(g0=1,(function(e,t){(function(n,r){e.exports=r()})(w3,(function(){var n=1e3,r=6e4,o=36e5,a="millisecond",l="second",u="minute",d="hour",f="day",h="week",p="month",x="quarter",g="year",C="date",k="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var U=["th","st","nd","rd"],Q=W%100;return"["+W+(U[(Q-20)%10]||U[Q]||U[0])+"]"}},P=function(W,U,Q){var J=String(W);return!J||J.length>=U?W:""+Array(U+1-J.length).join(Q)+W},R={s:P,z:function(W){var U=-W.utcOffset(),Q=Math.abs(U),J=Math.floor(Q/60),D=Q%60;return(U<=0?"+":"-")+P(J,2,"0")+":"+P(D,2,"0")},m:function W(U,Q){if(U.date()<Q.date())return-W(Q,U);var J=12*(Q.year()-U.year())+(Q.month()-U.month()),D=U.clone().add(J,p),G=Q-D<0,N=U.clone().add(J+(G?-1:1),p);return+(-(J+(Q-D)/(G?D-N:N-D))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:p,y:g,w:h,d:f,D:C,h:d,m:u,s:l,ms:a,Q:x}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},A="en",j={};j[A]=_;var F="$isDayjsObject",Z=function(W){return W instanceof M||!(!W||!W[F])},re=function W(U,Q,J){var D;if(!U)return A;if(typeof U=="string"){var G=U.toLowerCase();j[G]&&(D=G),Q&&(j[G]=Q,D=G);var N=U.split("-");if(!D&&N.length>1)return W(N[0])}else{var L=U.name;j[L]=U,D=L}return!J&&D&&(A=D),D||!J&&A},O=function(W,U){if(Z(W))return W.clone();var Q=typeof U=="object"?U:{};return Q.date=W,Q.args=arguments,new M(Q)},Y=R;Y.l=re,Y.i=Z,Y.w=function(W,U){return O(W,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var M=(function(){function W(Q){this.$L=re(Q.locale,null,!0),this.parse(Q),this.$x=this.$x||Q.x||{},this[F]=!0}var U=W.prototype;return U.parse=function(Q){this.$d=(function(J){var D=J.date,G=J.utc;if(D===null)return new Date(NaN);if(Y.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var N=D.match(S);if(N){var L=N[2]-1||0,K=(N[7]||"0").substring(0,3);return G?new Date(Date.UTC(N[1],L,N[3]||1,N[4]||0,N[5]||0,N[6]||0,K)):new Date(N[1],L,N[3]||1,N[4]||0,N[5]||0,N[6]||0,K)}}return new Date(D)})(Q),this.init()},U.init=function(){var Q=this.$d;this.$y=Q.getFullYear(),this.$M=Q.getMonth(),this.$D=Q.getDate(),this.$W=Q.getDay(),this.$H=Q.getHours(),this.$m=Q.getMinutes(),this.$s=Q.getSeconds(),this.$ms=Q.getMilliseconds()},U.$utils=function(){return Y},U.isValid=function(){return this.$d.toString()!==k},U.isSame=function(Q,J){var D=O(Q);return this.startOf(J)<=D&&D<=this.endOf(J)},U.isAfter=function(Q,J){return O(Q)<this.startOf(J)},U.isBefore=function(Q,J){return this.endOf(J)<O(Q)},U.$g=function(Q,J,D){return Y.u(Q)?this[J]:this.set(D,Q)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(Q,J){var D=this,G=!!Y.u(J)||J,N=Y.p(Q),L=function(Se,be){var Ae=Y.w(D.$u?Date.UTC(D.$y,be,Se):new Date(D.$y,be,Se),D);return G?Ae:Ae.endOf(f)},K=function(Se,be){return Y.w(D.toDate()[Se].apply(D.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(be)),D)},I=this.$W,ue=this.$M,ve=this.$D,xe="set"+(this.$u?"UTC":"");switch(N){case g:return G?L(1,0):L(31,11);case p:return G?L(1,ue):L(0,ue+1);case h:var ie=this.$locale().weekStart||0,me=(I<ie?I+7:I)-ie;return L(G?ve-me:ve+(6-me),ue);case f:case C:return K(xe+"Hours",0);case d:return K(xe+"Minutes",1);case u:return K(xe+"Seconds",2);case l:return K(xe+"Milliseconds",3);default:return this.clone()}},U.endOf=function(Q){return this.startOf(Q,!1)},U.$set=function(Q,J){var D,G=Y.p(Q),N="set"+(this.$u?"UTC":""),L=(D={},D[f]=N+"Date",D[C]=N+"Date",D[p]=N+"Month",D[g]=N+"FullYear",D[d]=N+"Hours",D[u]=N+"Minutes",D[l]=N+"Seconds",D[a]=N+"Milliseconds",D)[G],K=G===f?this.$D+(J-this.$W):J;if(G===p||G===g){var I=this.clone().set(C,1);I.$d[L](K),I.init(),this.$d=I.set(C,Math.min(this.$D,I.daysInMonth())).$d}else L&&this.$d[L](K);return this.init(),this},U.set=function(Q,J){return this.clone().$set(Q,J)},U.get=function(Q){return this[Y.p(Q)]()},U.add=function(Q,J){var D,G=this;Q=Number(Q);var N=Y.p(J),L=function(ue){var ve=O(G);return Y.w(ve.date(ve.date()+Math.round(ue*Q)),G)};if(N===p)return this.set(p,this.$M+Q);if(N===g)return this.set(g,this.$y+Q);if(N===f)return L(1);if(N===h)return L(7);var K=(D={},D[u]=r,D[d]=o,D[l]=n,D)[N]||1,I=this.$d.getTime()+Q*K;return Y.w(I,this)},U.subtract=function(Q,J){return this.add(-1*Q,J)},U.format=function(Q){var J=this,D=this.$locale();if(!this.isValid())return D.invalidDate||k;var G=Q||"YYYY-MM-DDTHH:mm:ssZ",N=Y.z(this),L=this.$H,K=this.$m,I=this.$M,ue=D.weekdays,ve=D.months,xe=D.meridiem,ie=function(be,Ae,Ve,nt){return be&&(be[Ae]||be(J,G))||Ve[Ae].slice(0,nt)},me=function(be){return Y.s(L%12||12,be,"0")},Se=xe||function(be,Ae,Ve){var nt=be<12?"AM":"PM";return Ve?nt.toLowerCase():nt};return G.replace(E,(function(be,Ae){return Ae||(function(Ve){switch(Ve){case"YY":return String(J.$y).slice(-2);case"YYYY":return Y.s(J.$y,4,"0");case"M":return I+1;case"MM":return Y.s(I+1,2,"0");case"MMM":return ie(D.monthsShort,I,ve,3);case"MMMM":return ie(ve,I);case"D":return J.$D;case"DD":return Y.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return ie(D.weekdaysMin,J.$W,ue,2);case"ddd":return ie(D.weekdaysShort,J.$W,ue,3);case"dddd":return ue[J.$W];case"H":return String(L);case"HH":return Y.s(L,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return Se(L,K,!0);case"A":return Se(L,K,!1);case"m":return String(K);case"mm":return Y.s(K,2,"0");case"s":return String(J.$s);case"ss":return Y.s(J.$s,2,"0");case"SSS":return Y.s(J.$ms,3,"0");case"Z":return N}return null})(be)||N.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(Q,J,D){var G,N=this,L=Y.p(J),K=O(Q),I=(K.utcOffset()-this.utcOffset())*r,ue=this-K,ve=function(){return Y.m(N,K)};switch(L){case g:G=ve()/12;break;case p:G=ve();break;case x:G=ve()/3;break;case h:G=(ue-I)/6048e5;break;case f:G=(ue-I)/864e5;break;case d:G=ue/o;break;case u:G=ue/r;break;case l:G=ue/n;break;default:G=ue}return D?G:Y.a(G)},U.daysInMonth=function(){return this.endOf(p).$D},U.$locale=function(){return j[this.$L]},U.locale=function(Q,J){if(!Q)return this.$L;var D=this.clone(),G=re(Q,J,!0);return G&&(D.$L=G),D},U.clone=function(){return Y.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},W})(),ne=M.prototype;return O.prototype=ne,[["$ms",a],["$s",l],["$m",u],["$H",d],["$W",f],["$M",p],["$y",g],["$D",C]].forEach((function(W){ne[W[1]]=function(U){return this.$g(U,W[0],W[1])}})),O.extend=function(W,U){return W.$i||(W(U,M,O),W.$i=!0),O},O.locale=re,O.isDayjs=Z,O.unix=function(W){return O(1e3*W)},O.en=j[A],O.Ls=j,O.p={},O}))})(Ec)),Ec.exports}var k3=b3();const Rr=Jo(k3);var _c={exports:{}},S3=_c.exports,y0;function C3(){return y0||(y0=1,(function(e,t){(function(n,r){e.exports=r()})(S3,(function(){return function(n,r,o){n=n||{};var a=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(f,h,p,x){return a.fromToBase(f,h,p,x)}o.en.relativeTime=l,a.fromToBase=function(f,h,p,x,g){for(var C,k,S,E=p.$locale().relativeTime||l,_=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],P=_.length,R=0;R<P;R+=1){var A=_[R];A.d&&(C=x?o(f).diff(p,A.d,!0):p.diff(f,A.d,!0));var j=(n.rounding||Math.round)(Math.abs(C));if(S=C>0,j<=A.r||!A.r){j<=1&&R>0&&(A=_[R-1]);var F=E[A.l];g&&(j=g(""+j)),k=typeof F=="string"?F.replace("%d",j):F(j,h,A.l,S);break}}if(h)return k;var Z=S?E.future:E.past;return typeof Z=="function"?Z(k):Z.replace("%s",k)},a.to=function(f,h){return u(f,h,this,!0)},a.from=function(f,h){return u(f,h,this)};var d=function(f){return f.$u?o.utc():o()};a.toNow=function(f){return this.to(d(this),f)},a.fromNow=function(f){return this.from(d(this),f)}}}))})(_c)),_c.exports}var E3=C3();const _3=Jo(E3);Rr.extend(_3);function v0(e){return Rr(e).fromNow()}function T3(e,t="MMM D, YYYY"){return Rr(e).format(t)}function Fl(e){const t=Rr(),n=Rr(e),r=t.diff(n,"minute"),o=t.diff(n,"hour"),a=t.diff(n,"day");return r<1?"just now":r<60?`${r}m ago`:o<24?`${o}h ago`:a<7?`${a}d ago`:n.format("MMM D, YYYY")}function P3({task:e,epicName:t,subtasks:n,onClick:r}){const o=n.filter(a=>a.status==="completed").length;return y.jsxs("div",{"data-task-id":e.id,className:"p-2 cursor-pointer hover:ring bg-accent w-full flex flex-col wrap-break-word",onClick:r,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(Ol,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(EC,{priority:e.priority})]}),y.jsx("h4",{className:"text-sm font-medium mb-1",children:e.title}),e.description&&y.jsx("p",{className:"text-xs text-muted-foreground mb-2 line-clamp-2",children:e.description}),(t||e.tags)&&y.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[t&&y.jsxs("p",{className:"text-xs flex gap-2 items-center",children:[y.jsx(ld,{width:16}),t]}),e.tags&&e.tags.split(",").map(a=>y.jsx(lo,{variant:"outline",className:"text-xs",children:a.trim()},a))]}),(e.dependsOn.length>0||e.blocks.length>0)&&y.jsxs("div",{className:"pt-2 border-t flex flex-wrap gap-1",children:[e.dependsOn.map(a=>y.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono bg-amber-500/10 text-amber-600 dark:text-amber-400",title:`Depends on ${a}`,children:[y.jsx(lk,{className:"h-2.5 w-2.5"}),a]},a)),e.blocks.map(a=>y.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono bg-rose-500/10 text-rose-600 dark:text-rose-400",title:`Blocks ${a}`,children:[y.jsx(uk,{className:"h-2.5 w-2.5"}),a]},a))]}),n.length>0&&y.jsx(x3,{completed:o,total:n.length}),y.jsx("p",{className:"text-[10px] text-muted-foreground mt-1.5",children:Fl(e.createdAt)})]})}function N3({epic:e,taskCount:t,onClick:n}){const r=t.total>0?Math.round(t.completed/t.total*100):0;return y.jsxs("div",{className:"p-2 cursor-pointer bg-blue-50 dark:bg-blue-800 hover:ring wrap-break-word",onClick:n,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(ld,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(EC,{priority:e.priority})]}),y.jsx("h4",{className:"text-sm font-medium mb-2",children:e.title}),y.jsxs("div",{className:"border-t pt-1.5 flex flex-col gap-1.5",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.completed,"/",t.total," tasks"]}),y.jsxs("span",{className:"text-[10px] text-muted-foreground font-mono",children:[r,"%"]})]}),t.total>0&&y.jsx(RC,{value:r,className:"h-1.5"}),y.jsx("p",{className:"text-[10px] text-muted-foreground",children:Fl(e.createdAt)})]})]})}const Xp=[{value:"created:desc",label:"Newest first"},{value:"created:asc",label:"Oldest first"},{value:"updated:desc",label:"Recently updated"},{value:"priority:asc",label:"Priority (high to low)"},{value:"priority:desc",label:"Priority (low to high)"},{value:"title:asc",label:"Title (A-Z)"},{value:"title:desc",label:"Title (Z-A)"}];function x0(e,t,n){switch(n){case"created:desc":return Rr(t.createdAt).valueOf()-Rr(e.createdAt).valueOf();case"created:asc":return Rr(e.createdAt).valueOf()-Rr(t.createdAt).valueOf();case"updated:desc":return Rr(t.updatedAt).valueOf()-Rr(e.updatedAt).valueOf();case"priority:asc":return e.priority-t.priority;case"priority:desc":return t.priority-e.priority;case"title:asc":return e.title.localeCompare(t.title);case"title:desc":return t.title.localeCompare(e.title);default:return 0}}function j3({open:e,onClose:t,children:n,className:r=""}){const o=b.useRef(null);return YS(o,t),e?y.jsx("div",{ref:o,className:`absolute right-0 top-full mt-1 z-50 rounded-md border bg-popover p-3 shadow-md ${r}`,children:n}):null}const w0=[{value:"all",label:"All"},{value:"epic",label:"Epics only"},{value:"task",label:"Tasks only"}],Xc={sort:"created:desc",type:"all"};function R3(e){return e.sort!==Xc.sort||e.type!==Xc.type}const b0="h-8 w-full rounded-md border bg-transparent px-2 text-sm outline-none focus:ring-1 focus:ring-ring";function I3({value:e,onChange:t}){const[n,r]=b.useState(!1),o=R3(e);return y.jsxs("div",{className:"relative",children:[y.jsxs(it,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>r(!n),title:"Sort & filter",children:[y.jsx(oR,{className:"h-4 w-4"}),o&&y.jsx("span",{className:"absolute top-0.5 right-0.5 h-2 w-2 rounded-full bg-blue-500"})]}),y.jsxs(j3,{open:n,onClose:()=>r(!1),className:"w-52 flex flex-col gap-3",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Sort by"}),y.jsx("select",{value:e.sort,onChange:a=>{const l=a.target.value;Xp.some(u=>u.value===l)&&t({...e,sort:l})},className:b0,children:Xp.map(a=>y.jsx("option",{value:a.value,children:a.label},a.value))})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Show"}),y.jsx("select",{value:e.type,onChange:a=>{const l=a.target.value;w0.some(u=>u.value===l)&&t({...e,type:l})},className:b0,children:w0.map(a=>y.jsx("option",{value:a.value,children:a.label},a.value))})]}),o&&y.jsx("button",{onClick:()=>{t(Xc),r(!1)},className:"text-xs text-muted-foreground hover:text-foreground underline self-end",children:"Reset"})]})]})}function A3({label:e,tasks:t,epics:n,allTasks:r,allEpics:o,onAddClick:a,onTaskClick:l,onEpicClick:u,onArchiveAll:d}){const[f,h]=b.useState(Xc),p=b.useMemo(()=>f.type==="task"?[]:[...n].sort((E,_)=>x0(E,_,f.sort)),[n,f]),x=b.useMemo(()=>f.type==="epic"?[]:[...t].sort((E,_)=>x0(E,_,f.sort)),[t,f]),g=x.length+p.length,C=E=>{if(!E)return null;const _=o.find(P=>P.id===E);return(_==null?void 0:_.title)||E},k=E=>r.filter(_=>_.parentTaskId===E),S=E=>{const _=r.filter(R=>R.epicId===E&&!R.parentTaskId),P=_.filter(R=>R.status==="completed").length;return{total:_.length,completed:P}};return y.jsxs("div",{className:"w-[280px] min-w-[280px] max-w-[320px] flex flex-col border rounded-md",children:[y.jsxs("div",{className:"flex items-center justify-between border-b p-2 bg-accent/50",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"font-semibold text-sm",children:e}),y.jsx(lo,{variant:"secondary",className:"text-xs",children:g})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(I3,{value:f,onChange:h}),d&&g>0&&y.jsx(it,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:d,title:"Archive all completed items",children:y.jsx(ak,{className:"h-4 w-4"})}),y.jsx(it,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:`Add task to ${e}`,children:y.jsx(ud,{className:"h-4 w-4"})})]})]}),y.jsx("div",{className:"flex-1 min-h-[100px] overflow-y-auto",children:y.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[p.map(E=>y.jsx(N3,{epic:E,taskCount:S(E.id),onClick:()=>u(E)},E.id)),x.map(E=>y.jsx(P3,{task:E,epicName:C(E.epicId),subtasks:k(E.id),onClick:()=>l(E)},E.id)),g===0&&y.jsx("div",{className:"flex items-center justify-center min-h-[80px] text-sm text-muted-foreground italic",children:"No items"})]})})]})}const O3=[{key:"todo",label:"TODO"},{key:"in_progress",label:"In Progress"},{key:"completed",label:"Completed"},{key:"wont_fix",label:"Won't Fix"}];function D3({tasks:e,epics:t,onAddClick:n,onTaskClick:r,onEpicClick:o,onArchiveAllCompleted:a}){const l=e.filter(f=>!f.parentTaskId),u=f=>l.filter(h=>h.status===f),d=f=>t.filter(h=>h.status===f);return y.jsx("div",{className:"flex gap-4 items-start flex-nowrap min-h-[calc(100vh-180px)]",children:O3.map(f=>y.jsx(A3,{label:f.label,tasks:u(f.key),epics:d(f.key),allTasks:e,allEpics:t,onAddClick:()=>n(f.key),onTaskClick:r,onEpicClick:o,onArchiveAll:f.key==="completed"?a:void 0},f.key))})}function z3({isConfirming:e,entityName:t,onDelete:n,onConfirm:r,onCancel:o}){return e?y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-sm text-destructive",children:"Delete?"}),y.jsx(it,{variant:"destructive",size:"sm",onClick:r,children:"Yes"}),y.jsx(it,{variant:"outline",size:"sm",onClick:o,children:"No"})]}):y.jsxs(it,{variant:"destructive",size:"sm",onClick:n,children:["Delete ",t]})}function bl({children:e,count:t}){return y.jsxs("h4",{className:"text-xs uppercase text-muted-foreground font-semibold mb-3",children:[e,t&&` (${t.current}/${t.total})`]})}function IC({createdAt:e,updatedAt:t}){return y.jsxs("div",{className:"flex gap-3 justify-end",children:[y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Created ",v0(e)]}),y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Updated ",v0(t)]})]})}function AC({status:e,className:t}){const n=Be("h-4 w-4 shrink-0",t);switch(e){case"completed":return y.jsx(Ol,{className:Be(n,"text-green-500")});case"archived":return y.jsx(ak,{className:Be(n,"text-gray-400")});case"wont_fix":return y.jsx(lR,{className:Be(n,"text-amber-500")});default:return y.jsx(cR,{className:Be(n,"opacity-50")})}}const OC={create:{icon:ud,color:"text-green-500"},update:{icon:Cm,color:"text-blue-500"},delete:{icon:Em,color:"text-red-500"}};function DC({action:e,className:t}){const n=OC[e],r=n.icon;return y.jsx(r,{className:Be("h-4 w-4",n.color,t)})}function zC(e){return OC[e].color}function Md({value:e,onChange:t,statuses:n,triggerClassName:r}){return y.jsxs(dr,{value:e,onValueChange:t,children:[y.jsx(hr,{className:r,children:y.jsx(fr,{})}),y.jsx(pr,{children:n.map(o=>y.jsx(nn,{value:o,children:na[o]},o))})]})}function Ld({value:e,onChange:t,triggerClassName:n}){return y.jsxs(dr,{value:e.toString(),onValueChange:r=>t(parseInt(r,10)),children:[y.jsx(hr,{className:n,children:y.jsx(fr,{})}),y.jsx(pr,{children:Object.entries(Nd).map(([r,o])=>y.jsxs(nn,{value:r,children:["P",r," - ",o]},r))})]})}function gg({...e}){return y.jsx(W1,{"data-slot":"dialog",...e})}function M3({...e}){return y.jsx(Z1,{"data-slot":"dialog-portal",...e})}function L3({className:e,...t}){return y.jsx(q1,{"data-slot":"dialog-overlay",className:Be("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function yg({className:e,children:t,showCloseButton:n=!0,...r}){return y.jsxs(M3,{"data-slot":"dialog-portal",children:[y.jsx(L3,{}),y.jsxs(Q1,{"data-slot":"dialog-content",className:Be("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...r,children:[t,n&&y.jsxs(K1,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[y.jsx(cd,{}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function F3({className:e,...t}){return y.jsx("div",{"data-slot":"dialog-header",className:Be("flex flex-col gap-2 text-center sm:text-left",e),...t})}function $3({className:e,...t}){return y.jsx("div",{"data-slot":"dialog-footer",className:Be("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function V3({className:e,...t}){return y.jsx(Y1,{"data-slot":"dialog-title",className:Be("text-lg leading-none font-semibold",e),...t})}function B3({className:e,...t}){return y.jsx(XO,{"data-slot":"dialog-description",className:Be("text-muted-foreground text-sm",e),...t})}const U3={epic:ld,task:Ol,subtask:hk};function MC({items:e}){return y.jsx("nav",{className:"flex items-center gap-1.5",children:e.map((t,n)=>{const r=n===e.length-1,o=!r&&t.onClick,a=U3[t.type];return y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("div",{className:Be("flex items-center gap-1",o&&"cursor-pointer hover:text-foreground"),onClick:o?t.onClick:void 0,title:t.title,children:[y.jsx(a,{className:"h-3.5 w-3.5"}),y.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:t.id})]}),!r&&y.jsx(ad,{className:"h-3 w-3 opacity-50"})]},t.id)})})}function H3(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const W3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Z3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,q3={};function k0(e,t){return(q3.jsx?Z3:W3).test(e)}const Q3=/[ \t\n\f\r]/g;function Y3(e){return typeof e=="object"?e.type==="text"?S0(e.value):!1:S0(e)}function S0(e){return e.replace(Q3,"")===""}class $l{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}$l.prototype.normal={};$l.prototype.property={};$l.prototype.space=void 0;function LC(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new $l(n,r,t)}function Jp(e){return e.toLowerCase()}class Hn{constructor(t,n){this.attribute=n,this.property=t}}Hn.prototype.attribute="";Hn.prototype.booleanish=!1;Hn.prototype.boolean=!1;Hn.prototype.commaOrSpaceSeparated=!1;Hn.prototype.commaSeparated=!1;Hn.prototype.defined=!1;Hn.prototype.mustUseProperty=!1;Hn.prototype.number=!1;Hn.prototype.overloadedBoolean=!1;Hn.prototype.property="";Hn.prototype.spaceSeparated=!1;Hn.prototype.space=void 0;let K3=0;const We=ns(),zt=ns(),em=ns(),pe=ns(),gt=ns(),Fs=ns(),Yn=ns();function ns(){return 2**++K3}const tm=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:zt,commaOrSpaceSeparated:Yn,commaSeparated:Fs,number:pe,overloadedBoolean:em,spaceSeparated:gt},Symbol.toStringTag,{value:"Module"})),Gh=Object.keys(tm);class vg extends Hn{constructor(t,n,r,o){let a=-1;if(super(t,n),C0(this,"space",o),typeof r=="number")for(;++a<Gh.length;){const l=Gh[a];C0(this,Gh[a],(r&tm[l])===tm[l])}}}vg.prototype.defined=!0;function C0(e,t,n){n&&(e[t]=n)}function ma(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new vg(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Jp(r)]=r,n[Jp(a.attribute)]=r}return new $l(t,n,e.space)}const FC=ma({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:gt,ariaCurrent:null,ariaDescribedBy:gt,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:gt,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:gt,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gt,ariaLevel:pe,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:gt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:gt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:zt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function $C(e,t){return t in e?e[t]:t}function VC(e,t){return $C(e,t.toLowerCase())}const G3=ma({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fs,acceptCharset:gt,accessKey:gt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:gt,autoFocus:We,autoPlay:We,blocking:gt,capture:null,charSet:null,checked:We,cite:null,className:gt,cols:pe,colSpan:null,content:null,contentEditable:zt,controls:We,controlsList:gt,coords:pe|Fs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:em,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:gt,height:pe,hidden:em,high:pe,href:null,hrefLang:null,htmlFor:gt,httpEquiv:gt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:gt,itemRef:gt,itemScope:We,itemType:gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:pe,pattern:null,ping:gt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:gt,required:We,reversed:We,rows:pe,rowSpan:pe,sandbox:gt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:zt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:VC}),X3=ma({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:Yn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:gt,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Fs,g2:Fs,glyphName:Fs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Yn,rev:Yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Yn,requiredFeatures:Yn,requiredFonts:Yn,requiredFormats:Yn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Yn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Yn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$C}),BC=ma({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()}}),UC=ma({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:VC}),HC=ma({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),J3={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"},e5=/[A-Z]/g,E0=/-[a-z]/g,t5=/^data[-\w.:]+$/i;function n5(e,t){const n=Jp(t);let r=t,o=Hn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&t5.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(E0,i5);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!E0.test(a)){let l=a.replace(e5,r5);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=vg}return new o(r,t)}function r5(e){return"-"+e.toLowerCase()}function i5(e){return e.charAt(1).toUpperCase()}const o5=LC([FC,G3,BC,UC,HC],"html"),xg=LC([FC,X3,BC,UC,HC],"svg");function s5(e){return e.join(" ").trim()}var Rs={},Xh,_0;function a5(){if(_0)return Xh;_0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
315
|
-
`,f="/",h="*",p="",x="comment",g="declaration";function C(S,E){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];E=E||{};var _=1,P=1;function R(W){var U=W.match(t);U&&(_+=U.length);var Q=W.lastIndexOf(d);P=~Q?W.length-Q:P+W.length}function A(){var W={line:_,column:P};return function(U){return U.position=new j(W),re(),U}}function j(W){this.start=W,this.end={line:_,column:P},this.source=E.source}j.prototype.content=S;function F(W){var U=new Error(E.source+":"+_+":"+P+": "+W);if(U.reason=W,U.filename=E.source,U.line=_,U.column=P,U.source=S,!E.silent)throw U}function Z(W){var U=W.exec(S);if(U){var Q=U[0];return R(Q),S=S.slice(Q.length),U}}function re(){Z(n)}function O(W){var U;for(W=W||[];U=Y();)U!==!1&&W.push(U);return W}function Y(){var W=A();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var U=2;p!=S.charAt(U)&&(h!=S.charAt(U)||f!=S.charAt(U+1));)++U;if(U+=2,p===S.charAt(U-1))return F("End of comment missing");var Q=S.slice(2,U-2);return P+=2,R(Q),S=S.slice(U),P+=2,W({type:x,comment:Q})}}function M(){var W=A(),U=Z(r);if(U){if(Y(),!Z(o))return F("property missing ':'");var Q=Z(a),J=W({type:g,property:k(U[0].replace(e,p)),value:Q?k(Q[0].replace(e,p)):p});return Z(l),J}}function ne(){var W=[];O(W);for(var U;U=M();)U!==!1&&(W.push(U),O(W));return W}return re(),ne()}function k(S){return S?S.replace(u,p):p}return Xh=C,Xh}var T0;function l5(){if(T0)return Rs;T0=1;var e=Rs&&Rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.default=n;const t=e(a5());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),u=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:h}=d;u?o(f,h,d):h&&(a=a||{},a[f]=h)}),a}return Rs}var tl={},P0;function u5(){if(P0)return tl;P0=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},l=function(f,h){return h.toUpperCase()},u=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(o,u):f=f.replace(r,u),f.replace(t,l))};return tl.camelCase=d,tl}var nl,N0;function c5(){if(N0)return nl;N0=1;var e=nl&&nl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(l5()),n=u5();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(l[(0,n.camelCase)(u,a)]=d)}),l}return r.default=r,nl=r,nl}var d5=c5();const f5=Jo(d5),WC=ZC("end"),wg=ZC("start");function ZC(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 h5(e){const t=wg(e),n=WC(e);if(t&&n)return{start:t,end:n}}function cl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?j0(e.position):"start"in e||"end"in e?j0(e):"line"in e||"column"in e?nm(e):""}function nm(e){return R0(e&&e.line)+":"+R0(e&&e.column)}function j0(e){return nm(e&&e.start)+"-"+nm(e&&e.end)}function R0(e){return e&&typeof e=="number"?e:1}class hn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=cl(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}hn.prototype.file="";hn.prototype.name="";hn.prototype.reason="";hn.prototype.message="";hn.prototype.stack="";hn.prototype.column=void 0;hn.prototype.line=void 0;hn.prototype.ancestors=void 0;hn.prototype.cause=void 0;hn.prototype.fatal=void 0;hn.prototype.place=void 0;hn.prototype.ruleId=void 0;hn.prototype.source=void 0;const bg={}.hasOwnProperty,p5=new Map,m5=/[A-Z]/g,g5=new Set(["table","tbody","thead","tfoot","tr"]),y5=new Set(["td","th"]),qC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function v5(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=_5(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=E5(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?xg:o5,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=QC(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function QC(e,t,n){if(t.type==="element")return x5(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return w5(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return k5(e,t,n);if(t.type==="mdxjsEsm")return b5(e,t);if(t.type==="root")return S5(e,t,n);if(t.type==="text")return C5(e,t)}function x5(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=xg,e.schema=o),e.ancestors.push(t);const a=KC(e,t.tagName,!1),l=T5(e,t);let u=Sg(e,t);return g5.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!Y3(d):!0})),YC(e,l,a,t),kg(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function w5(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)}kl(e,t.position)}function b5(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);kl(e,t.position)}function k5(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=xg,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:KC(e,t.name,!0),l=P5(e,t),u=Sg(e,t);return YC(e,l,a,t),kg(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function S5(e,t,n){const r={};return kg(r,Sg(e,t)),e.create(t,e.Fragment,r,n)}function C5(e,t){return t.value}function YC(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function kg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function E5(e,t,n){return r;function r(o,a,l,u){const f=Array.isArray(l.children)?n:t;return u?f(a,l,u):f(a,l)}}function _5(e,t){return n;function n(r,o,a,l){const u=Array.isArray(a.children),d=wg(r);return t(o,a,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function T5(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&bg.call(t.properties,o)){const a=N5(e,o,t.properties[o]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&y5.has(t.tagName)?r=u:n[l]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function P5(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else kl(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else kl(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Sg(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:p5;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=o.get(d)||0;l=d+"-"+f,o.set(d,f+1)}}const u=QC(e,a,l);u!==void 0&&n.push(u)}return n}function N5(e,t,n){const r=n5(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?H3(n):s5(n)),r.property==="style"){let o=typeof n=="object"?n:j5(e,String(n));return e.stylePropertyNameCase==="css"&&(o=R5(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?J3[r.property]||r.property:r.attribute,n]}}function j5(e,t){try{return f5(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=qC+"#cannot-parse-style-attribute",o}}function KC(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const u=k0(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=l}else r=k0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return bg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);kl(e)}function kl(e,t){const n=new hn("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=qC+"#cannot-handle-mdx-estrees-without-createevaluater",n}function R5(e){const t={};let n;for(n in e)bg.call(e,n)&&(t[I5(n)]=e[n]);return t}function I5(e){let t=e.replace(m5,A5);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function A5(e){return"-"+e.toLowerCase()}const Jh={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"]},O5={};function Cg(e,t){const n=O5,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return GC(e,r,o)}function GC(e,t,n){if(D5(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 I0(e.children,t,n)}return Array.isArray(e)?I0(e,t,n):""}function I0(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=GC(e[o],t,n);return r.join("")}function D5(e){return!!(e&&typeof e=="object")}const A0=document.createElement("i");function Eg(e){const t="&"+e+";";A0.innerHTML=t;const n=A0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function er(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function cr(e,t){return e.length>0?(er(e,e.length,0,t),e):t}const O0={}.hasOwnProperty;function XC(e){const t={};let n=-1;for(;++n<e.length;)z5(t,e[n]);return t}function z5(e,t){let n;for(n in t){const o=(O0.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){O0.call(o,l)||(o[l]=[]);const u=a[l];M5(o[l],Array.isArray(u)?u:u?[u]:[])}}}function M5(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);er(e,0,0,r)}function JC(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 Or(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const En=go(/[A-Za-z]/),fn=go(/[\dA-Za-z]/),L5=go(/[#-'*+\--9=?A-Z^-~]/);function Jc(e){return e!==null&&(e<32||e===127)}const rm=go(/\d/),F5=go(/[\dA-Fa-f]/),$5=go(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Fd=go(new RegExp("\\p{P}|\\p{S}","u")),Xo=go(/\s/);function go(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ga(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&fn(e.charCodeAt(n+1))&&fn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Ke(d)?(e.enter(n),u(d)):t(d)}function u(d){return Ke(d)&&a++<o?(e.consume(d),u):(e.exit(n),t(d))}}const V5={tokenize:B5};function B5(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),a(u)}function a(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return $e(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const U5={tokenize:H5},D0={tokenize:W5};function H5(e){const t=this,n=[];let r=0,o,a,l;return u;function u(P){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,d,f)(P)}return f(P)}function d(P){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&_();const R=t.events.length;let A=R,j;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){j=t.events[A][1].end;break}E(r);let F=R;for(;F<t.events.length;)t.events[F][1].end={...j},F++;return er(t.events,A+1,0,t.events.slice(R)),t.events.length=F,f(P)}return u(P)}function f(P){if(r===n.length){if(!o)return x(P);if(o.currentConstruct&&o.currentConstruct.concrete)return C(P);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(D0,h,p)(P)}function h(P){return o&&_(),E(r),x(P)}function p(P){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,C(P)}function x(P){return t.containerState={},e.attempt(D0,g,C)(P)}function g(P){return r++,n.push([t.currentConstruct,t.containerState]),x(P)}function C(P){if(P===null){o&&_(),E(0),e.consume(P);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),k(P)}function k(P){if(P===null){S(e.exit("chunkFlow"),!0),E(0),e.consume(P);return}return $e(P)?(e.consume(P),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(P),k)}function S(P,R){const A=t.sliceStream(P);if(R&&A.push(null),P.previous=a,a&&(a.next=P),a=P,o.defineSkip(P.start),o.write(A),t.parser.lazy[P.start.line]){let j=o.events.length;for(;j--;)if(o.events[j][1].start.offset<l&&(!o.events[j][1].end||o.events[j][1].end.offset>l))return;const F=t.events.length;let Z=F,re,O;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(re){O=t.events[Z][1].end;break}re=!0}for(E(r),j=F;j<t.events.length;)t.events[j][1].end={...O},j++;er(t.events,Z+1,0,t.events.slice(F)),t.events.length=j}}function E(P){let R=n.length;for(;R-- >P;){const A=n[R];t.containerState=A[1],A[0].exit.call(t,e)}n.length=P}function _(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function W5(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ra(e){if(e===null||ht(e)||Xo(e))return 1;if(Fd(e))return 2}function $d(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const im={name:"attention",resolveAll:Z5,tokenize:q5};function Z5(e,t){let n=-1,r,o,a,l,u,d,f,h;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;d=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 p={...e[r][1].end},x={...e[n][1].start};z0(p,-d),z0(x,d),l={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=cr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=cr(f,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",a,t]]),f=cr(f,$d(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=cr(f,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=cr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,er(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function q5(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ra(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===a)return e.consume(d),u;const f=e.exit("attentionSequence"),h=ra(d),p=!h||h===2&&o||n.includes(d),x=!o||o===2&&h||n.includes(r);return f._open=!!(a===42?p:p&&(o||!x)),f._close=!!(a===42?x:x&&(h||!p)),t(d)}}function z0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Q5={name:"autolink",tokenize:Y5};function Y5(e,t,n){let r=0;return o;function o(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(g){return En(g)?(e.consume(g),l):g===64?n(g):f(g)}function l(g){return g===43||g===45||g===46||fn(g)?(r=1,u(g)):f(g)}function u(g){return g===58?(e.consume(g),r=0,d):(g===43||g===45||g===46||fn(g))&&r++<32?(e.consume(g),u):(r=0,f(g))}function d(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||Jc(g)?n(g):(e.consume(g),d)}function f(g){return g===64?(e.consume(g),h):L5(g)?(e.consume(g),f):n(g)}function h(g){return fn(g)?p(g):n(g)}function p(g){return g===46?(e.consume(g),r=0,h):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):x(g)}function x(g){if((g===45||fn(g))&&r++<63){const C=g===45?x:p;return e.consume(g),C}return n(g)}}const Vl={partial:!0,tokenize:K5};function K5(e,t,n){return r;function r(a){return Ke(a)?Xe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||$e(a)?t(a):n(a)}}const eE={continuation:{tokenize:X5},exit:J5,name:"blockQuote",tokenize:G5};function G5(e,t,n){const r=this;return o;function o(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ke(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function X5(e,t,n){const r=this;return o;function o(l){return Ke(l)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(eE,t,n)(l)}}function J5(e){e.exit("blockQuote")}const tE={name:"characterEscape",tokenize:e6};function e6(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return $5(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const nE={name:"characterReference",tokenize:t6};function t6(e,t,n){const r=this;let o=0,a,l;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,l=fn,h(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=F5,h):(e.enter("characterReferenceValue"),a=7,l=rm,h(p))}function h(p){if(p===59&&o){const x=e.exit("characterReferenceValue");return l===fn&&!Eg(r.sliceSerialize(x))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&o++<a?(e.consume(p),h):n(p)}}const M0={partial:!0,tokenize:r6},L0={concrete:!0,name:"codeFenced",tokenize:n6};function n6(e,t,n){const r=this,o={partial:!0,tokenize:A};let a=0,l=0,u;return d;function d(j){return f(j)}function f(j){const F=r.events[r.events.length-1];return a=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,u=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(j)}function h(j){return j===u?(l++,e.consume(j),h):l<3?n(j):(e.exit("codeFencedFenceSequence"),Ke(j)?Xe(e,p,"whitespace")(j):p(j))}function p(j){return j===null||$e(j)?(e.exit("codeFencedFence"),r.interrupt?t(j):e.check(M0,k,R)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(j))}function x(j){return j===null||$e(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(j)):Ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,g,"whitespace")(j)):j===96&&j===u?n(j):(e.consume(j),x)}function g(j){return j===null||$e(j)?p(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(j))}function C(j){return j===null||$e(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(j)):j===96&&j===u?n(j):(e.consume(j),C)}function k(j){return e.attempt(o,R,S)(j)}function S(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),E}function E(j){return a>0&&Ke(j)?Xe(e,_,"linePrefix",a+1)(j):_(j)}function _(j){return j===null||$e(j)?e.check(M0,k,R)(j):(e.enter("codeFlowValue"),P(j))}function P(j){return j===null||$e(j)?(e.exit("codeFlowValue"),_(j)):(e.consume(j),P)}function R(j){return e.exit("codeFenced"),t(j)}function A(j,F,Z){let re=0;return O;function O(U){return j.enter("lineEnding"),j.consume(U),j.exit("lineEnding"),Y}function Y(U){return j.enter("codeFencedFence"),Ke(U)?Xe(j,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):M(U)}function M(U){return U===u?(j.enter("codeFencedFenceSequence"),ne(U)):Z(U)}function ne(U){return U===u?(re++,j.consume(U),ne):re>=l?(j.exit("codeFencedFenceSequence"),Ke(U)?Xe(j,W,"whitespace")(U):W(U)):Z(U)}function W(U){return U===null||$e(U)?(j.exit("codeFencedFence"),F(U)):Z(U)}}}function r6(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const ep={name:"codeIndented",tokenize:o6},i6={partial:!0,tokenize:s6};function o6(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(f)}function a(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):$e(f)?e.attempt(i6,l,d)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||$e(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),u)}function d(f){return e.exit("codeIndented"),t(f)}}function s6(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):$e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Xe(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):$e(l)?o(l):n(l)}}const a6={name:"codeText",previous:u6,resolve:l6,tokenize:c6};function l6(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function u6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function c6(e,t,n){let r=0,o,a;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(a=e.enter("codeTextSequence"),o=0,h(p)):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||$e(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),f)}function h(p){return p===96?(e.consume(p),o++,h):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",f(p))}}class d6{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&rl(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),rl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),rl(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);rl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);rl(this.left,n.reverse())}}}function rl(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 rE(e){const t={};let n=-1,r,o,a,l,u,d,f;const h=new d6(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,f6(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(h.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...h.get(o)[1].start},u=h.slice(o,n),u.unshift(r),h.splice(o,n-o+1,u))}}return er(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function f6(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],f={};let h,p,x=-1,g=n,C=0,k=0;const S=[k];for(;g;){for(;e.get(++o)[1]!==g;);a.push(o),g._tokenizer||(h=r.sliceStream(g),g.next||h.push(null),p&&l.defineSkip(g.start),g._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),g._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=n;++x<u.length;)u[x][0]==="exit"&&u[x-1][0]==="enter"&&u[x][1].type===u[x-1][1].type&&u[x][1].start.line!==u[x][1].end.line&&(k=x+1,S.push(k),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(l.events=[],g?(g._tokenizer=void 0,g.previous=void 0):S.pop(),x=S.length;x--;){const E=u.slice(S[x],S[x+1]),_=a.pop();d.push([_,_+E.length-1]),e.splice(_,2,E)}for(d.reverse(),x=-1;++x<d.length;)f[C+d[x][0]]=C+d[x][1],C+=d[x][1]-d[x][0]-1;return f}const h6={resolve:m6,tokenize:g6},p6={partial:!0,tokenize:y6};function m6(e){return rE(e),e}function g6(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?a(u):$e(u)?e.check(p6,l,a)(u):(e.consume(u),o)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function y6(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(l){if(l===null||$e(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function iE(e,t,n,r,o,a,l,u,d){const f=d||Number.POSITIVE_INFINITY;let h=0;return p;function p(E){return E===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(E),e.exit(a),x):E===null||E===32||E===41||Jc(E)?n(E):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(E))}function x(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===62?(e.exit("chunkString"),e.exit(u),x(E)):E===null||E===60||$e(E)?n(E):(e.consume(E),E===92?C:g)}function C(E){return E===60||E===62||E===92?(e.consume(E),g):g(E)}function k(E){return!h&&(E===null||E===41||ht(E))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(E)):h<f&&E===40?(e.consume(E),h++,k):E===41?(e.consume(E),h--,k):E===null||E===32||E===40||Jc(E)?n(E):(e.consume(E),E===92?S:k)}function S(E){return E===40||E===41||E===92?(e.consume(E),k):k(E)}}function oE(e,t,n,r,o,a){const l=this;let u=0,d;return f;function f(g){return e.enter(r),e.enter(o),e.consume(g),e.exit(o),e.enter(a),h}function h(g){return u>999||g===null||g===91||g===93&&!d||g===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(g):g===93?(e.exit(a),e.enter(o),e.consume(g),e.exit(o),e.exit(r),t):$e(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||$e(g)||u++>999?(e.exit("chunkString"),h(g)):(e.consume(g),d||(d=!Ke(g)),g===92?x:p)}function x(g){return g===91||g===92||g===93?(e.consume(g),u++,p):p(g)}}function sE(e,t,n,r,o,a){let l;return u;function u(x){return x===34||x===39||x===40?(e.enter(r),e.enter(o),e.consume(x),e.exit(o),l=x===40?41:x,d):n(x)}function d(x){return x===l?(e.enter(o),e.consume(x),e.exit(o),e.exit(r),t):(e.enter(a),f(x))}function f(x){return x===l?(e.exit(a),d(l)):x===null?n(x):$e(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Xe(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===l||x===null||$e(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?p:h)}function p(x){return x===l||x===92?(e.consume(x),h):h(x)}}function dl(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ke(o)?Xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const v6={name:"definition",tokenize:w6},x6={partial:!0,tokenize:b6};function w6(e,t,n){const r=this;let o;return a;function a(g){return e.enter("definition"),l(g)}function l(g){return oE.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return o=Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),d):n(g)}function d(g){return ht(g)?dl(e,f)(g):f(g)}function f(g){return iE(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(x6,p,p)(g)}function p(g){return Ke(g)?Xe(e,x,"whitespace")(g):x(g)}function x(g){return g===null||$e(g)?(e.exit("definition"),r.parser.defined.push(o),t(g)):n(g)}}function b6(e,t,n){return r;function r(u){return ht(u)?dl(e,o)(u):n(u)}function o(u){return sE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Ke(u)?Xe(e,l,"whitespace")(u):l(u)}function l(u){return u===null||$e(u)?t(u):n(u)}}const k6={name:"hardBreakEscape",tokenize:S6};function S6(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return $e(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const C6={name:"headingAtx",resolve:E6,tokenize:_6};function E6(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},er(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function _6(e,t,n){let r=0;return o;function o(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&r++<6?(e.consume(h),l):h===null||ht(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||$e(h)?(e.exit("atxHeading"),t(h)):Ke(h)?Xe(e,u,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),u(h))}function f(h){return h===null||h===35||ht(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const T6=["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"],F0=["pre","script","style","textarea"],P6={concrete:!0,name:"htmlFlow",resolveTo:R6,tokenize:I6},N6={partial:!0,tokenize:O6},j6={partial:!0,tokenize:A6};function R6(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 I6(e,t,n){const r=this;let o,a,l,u,d;return f;function f(I){return h(I)}function h(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),p}function p(I){return I===33?(e.consume(I),x):I===47?(e.consume(I),a=!0,k):I===63?(e.consume(I),o=3,r.interrupt?t:N):En(I)?(e.consume(I),l=String.fromCharCode(I),S):n(I)}function x(I){return I===45?(e.consume(I),o=2,g):I===91?(e.consume(I),o=5,u=0,C):En(I)?(e.consume(I),o=4,r.interrupt?t:N):n(I)}function g(I){return I===45?(e.consume(I),r.interrupt?t:N):n(I)}function C(I){const ue="CDATA[";return I===ue.charCodeAt(u++)?(e.consume(I),u===ue.length?r.interrupt?t:M:C):n(I)}function k(I){return En(I)?(e.consume(I),l=String.fromCharCode(I),S):n(I)}function S(I){if(I===null||I===47||I===62||ht(I)){const ue=I===47,ve=l.toLowerCase();return!ue&&!a&&F0.includes(ve)?(o=1,r.interrupt?t(I):M(I)):T6.includes(l.toLowerCase())?(o=6,ue?(e.consume(I),E):r.interrupt?t(I):M(I)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?_(I):P(I))}return I===45||fn(I)?(e.consume(I),l+=String.fromCharCode(I),S):n(I)}function E(I){return I===62?(e.consume(I),r.interrupt?t:M):n(I)}function _(I){return Ke(I)?(e.consume(I),_):O(I)}function P(I){return I===47?(e.consume(I),O):I===58||I===95||En(I)?(e.consume(I),R):Ke(I)?(e.consume(I),P):O(I)}function R(I){return I===45||I===46||I===58||I===95||fn(I)?(e.consume(I),R):A(I)}function A(I){return I===61?(e.consume(I),j):Ke(I)?(e.consume(I),A):P(I)}function j(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,F):Ke(I)?(e.consume(I),j):Z(I)}function F(I){return I===d?(e.consume(I),d=null,re):I===null||$e(I)?n(I):(e.consume(I),F)}function Z(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ht(I)?A(I):(e.consume(I),Z)}function re(I){return I===47||I===62||Ke(I)?P(I):n(I)}function O(I){return I===62?(e.consume(I),Y):n(I)}function Y(I){return I===null||$e(I)?M(I):Ke(I)?(e.consume(I),Y):n(I)}function M(I){return I===45&&o===2?(e.consume(I),Q):I===60&&o===1?(e.consume(I),J):I===62&&o===4?(e.consume(I),L):I===63&&o===3?(e.consume(I),N):I===93&&o===5?(e.consume(I),G):$e(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(N6,K,ne)(I)):I===null||$e(I)?(e.exit("htmlFlowData"),ne(I)):(e.consume(I),M)}function ne(I){return e.check(j6,W,K)(I)}function W(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),U}function U(I){return I===null||$e(I)?ne(I):(e.enter("htmlFlowData"),M(I))}function Q(I){return I===45?(e.consume(I),N):M(I)}function J(I){return I===47?(e.consume(I),l="",D):M(I)}function D(I){if(I===62){const ue=l.toLowerCase();return F0.includes(ue)?(e.consume(I),L):M(I)}return En(I)&&l.length<8?(e.consume(I),l+=String.fromCharCode(I),D):M(I)}function G(I){return I===93?(e.consume(I),N):M(I)}function N(I){return I===62?(e.consume(I),L):I===45&&o===2?(e.consume(I),N):M(I)}function L(I){return I===null||$e(I)?(e.exit("htmlFlowData"),K(I)):(e.consume(I),L)}function K(I){return e.exit("htmlFlow"),t(I)}}function A6(e,t,n){const r=this;return o;function o(l){return $e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function O6(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Vl,t,n)}}const D6={name:"htmlText",tokenize:z6};function z6(e,t,n){const r=this;let o,a,l;return u;function u(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),A):N===63?(e.consume(N),P):En(N)?(e.consume(N),Z):n(N)}function f(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),a=0,C):En(N)?(e.consume(N),_):n(N)}function h(N){return N===45?(e.consume(N),g):n(N)}function p(N){return N===null?n(N):N===45?(e.consume(N),x):$e(N)?(l=p,J(N)):(e.consume(N),p)}function x(N){return N===45?(e.consume(N),g):p(N)}function g(N){return N===62?Q(N):N===45?x(N):p(N)}function C(N){const L="CDATA[";return N===L.charCodeAt(a++)?(e.consume(N),a===L.length?k:C):n(N)}function k(N){return N===null?n(N):N===93?(e.consume(N),S):$e(N)?(l=k,J(N)):(e.consume(N),k)}function S(N){return N===93?(e.consume(N),E):k(N)}function E(N){return N===62?Q(N):N===93?(e.consume(N),E):k(N)}function _(N){return N===null||N===62?Q(N):$e(N)?(l=_,J(N)):(e.consume(N),_)}function P(N){return N===null?n(N):N===63?(e.consume(N),R):$e(N)?(l=P,J(N)):(e.consume(N),P)}function R(N){return N===62?Q(N):P(N)}function A(N){return En(N)?(e.consume(N),j):n(N)}function j(N){return N===45||fn(N)?(e.consume(N),j):F(N)}function F(N){return $e(N)?(l=F,J(N)):Ke(N)?(e.consume(N),F):Q(N)}function Z(N){return N===45||fn(N)?(e.consume(N),Z):N===47||N===62||ht(N)?re(N):n(N)}function re(N){return N===47?(e.consume(N),Q):N===58||N===95||En(N)?(e.consume(N),O):$e(N)?(l=re,J(N)):Ke(N)?(e.consume(N),re):Q(N)}function O(N){return N===45||N===46||N===58||N===95||fn(N)?(e.consume(N),O):Y(N)}function Y(N){return N===61?(e.consume(N),M):$e(N)?(l=Y,J(N)):Ke(N)?(e.consume(N),Y):re(N)}function M(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),o=N,ne):$e(N)?(l=M,J(N)):Ke(N)?(e.consume(N),M):(e.consume(N),W)}function ne(N){return N===o?(e.consume(N),o=void 0,U):N===null?n(N):$e(N)?(l=ne,J(N)):(e.consume(N),ne)}function W(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ht(N)?re(N):(e.consume(N),W)}function U(N){return N===47||N===62||ht(N)?re(N):n(N)}function Q(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function J(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),D}function D(N){return Ke(N)?Xe(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):G(N)}function G(N){return e.enter("htmlTextData"),l(N)}}const _g={name:"labelEnd",resolveAll:$6,resolveTo:V6,tokenize:B6},M6={tokenize:U6},L6={tokenize:H6},F6={tokenize:W6};function $6(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&er(e,0,e.length,n),e}function V6(e,t){let n=e.length,r=0,o,a,l,u;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",f,t]],u=cr(u,e.slice(a+1,a+r+3)),u=cr(u,[["enter",h,t]]),u=cr(u,$d(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),u=cr(u,[["exit",h,t],e[l-2],e[l-1],["exit",f,t]]),u=cr(u,e.slice(l+1)),u=cr(u,[["exit",d,t]]),er(e,a,e.length,u),e}function B6(e,t,n){const r=this;let o=r.events.length,a,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return u;function u(x){return a?a._inactive?p(x):(l=r.parser.defined.includes(Or(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(M6,h,l?h:p)(x):x===91?e.attempt(L6,h,l?f:p)(x):l?h(x):p(x)}function f(x){return e.attempt(F6,h,p)(x)}function h(x){return t(x)}function p(x){return a._balanced=!0,n(x)}}function U6(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return ht(p)?dl(e,a)(p):a(p)}function a(p){return p===41?h(p):iE(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return ht(p)?dl(e,d)(p):h(p)}function u(p){return n(p)}function d(p){return p===34||p===39||p===40?sE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return ht(p)?dl(e,h)(p):h(p)}function h(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function H6(e,t,n){const r=this;return o;function o(u){return oE.call(r,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function W6(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Z6={name:"labelStartImage",resolveAll:_g.resolveAll,tokenize:q6};function q6(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Q6={name:"labelStartLink",resolveAll:_g.resolveAll,tokenize:Y6};function Y6(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const tp={name:"lineEnding",tokenize:K6};function K6(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const Tc={name:"thematicBreak",tokenize:G6};function G6(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),l(f)}function l(f){return o=f,u(f)}function u(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||$e(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ke(f)?Xe(e,u,"whitespace")(f):u(f))}}const Mn={continuation:{tokenize:tV},exit:rV,name:"list",tokenize:eV},X6={partial:!0,tokenize:iV},J6={partial:!0,tokenize:nV};function eV(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return u;function u(g){const C=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:rm(g)){if(r.containerState.type||(r.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Tc,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(g)}return n(g)}function d(g){return rm(g)&&++l<10?(e.consume(g),d):(!r.interrupt||l<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Vl,r.interrupt?n:h,e.attempt(X6,x,p))}function h(g){return r.containerState.initialBlankLine=!0,a++,x(g)}function p(g){return Ke(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),x):n(g)}function x(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function tV(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Vl,o,a);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Ke(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(J6,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(Mn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function nV(e,t,n){const r=this;return Xe(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function rV(e){e.exit(this.containerState.type)}function iV(e,t,n){const r=this;return Xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!Ke(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const $0={name:"setextUnderline",resolveTo:oV,tokenize:sV};function oV(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function sV(e,t,n){const r=this;let o;return a;function a(f){let h=r.events.length,p;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){p=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===o?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),Ke(f)?Xe(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||$e(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const aV={tokenize:lV};function lV(e){const t=this,n=e.attempt(Vl,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(h6,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const uV={resolveAll:lE()},cV=aE("string"),dV=aE("text");function aE(e){return{resolveAll:lE(e==="text"?fV:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,u);return l;function l(h){return f(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const p=o[h];let x=-1;if(p)for(;++x<p.length;){const g=p[x];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function lE(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function fV(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,l=-1,u=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(f===-2)d=!0,u++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const hV={42:Mn,43:Mn,45:Mn,48:Mn,49:Mn,50:Mn,51:Mn,52:Mn,53:Mn,54:Mn,55:Mn,56:Mn,57:Mn,62:eE},pV={91:v6},mV={[-2]:ep,[-1]:ep,32:ep},gV={35:C6,42:Tc,45:[$0,Tc],60:P6,61:$0,95:Tc,96:L0,126:L0},yV={38:nE,92:tE},vV={[-5]:tp,[-4]:tp,[-3]:tp,33:Z6,38:nE,42:im,60:[Q5,D6],91:Q6,92:[k6,tE],93:_g,95:im,96:a6},xV={null:[im,uV]},wV={null:[42,95]},bV={null:[]},kV=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:wV,contentInitial:pV,disable:bV,document:hV,flow:gV,flowInitial:mV,insideSpan:xV,string:yV,text:vV},Symbol.toStringTag,{value:"Module"}));function SV(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let l=[],u=[];const d={attempt:F(A),check:F(j),consume:_,enter:P,exit:R,interrupt:F(j,{interrupt:!0})},f={code:null,containerState:{},defineSkip:k,events:[],now:C,parser:e,previous:null,sliceSerialize:x,sliceStream:g,write:p};let h=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function p(Y){return l=cr(l,Y),S(),l[l.length-1]!==null?[]:(Z(t,0),f.events=$d(a,f.events,f),f.events)}function x(Y,M){return EV(g(Y),M)}function g(Y){return CV(l,Y)}function C(){const{_bufferIndex:Y,_index:M,line:ne,column:W,offset:U}=r;return{_bufferIndex:Y,_index:M,line:ne,column:W,offset:U}}function k(Y){o[Y.line]=Y.column,O()}function S(){let Y;for(;r._index<l.length;){const M=l[r._index];if(typeof M=="string")for(Y=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Y&&r._bufferIndex<M.length;)E(M.charCodeAt(r._bufferIndex));else E(M)}}function E(Y){h=h(Y)}function _(Y){$e(Y)?(r.line++,r.column=1,r.offset+=Y===-3?2:1,O()):Y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=Y}function P(Y,M){const ne=M||{};return ne.type=Y,ne.start=C(),f.events.push(["enter",ne,f]),u.push(ne),ne}function R(Y){const M=u.pop();return M.end=C(),f.events.push(["exit",M,f]),M}function A(Y,M){Z(Y,M.from)}function j(Y,M){M.restore()}function F(Y,M){return ne;function ne(W,U,Q){let J,D,G,N;return Array.isArray(W)?K(W):"tokenize"in W?K([W]):L(W);function L(xe){return ie;function ie(me){const Se=me!==null&&xe[me],be=me!==null&&xe.null,Ae=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(be)?be:be?[be]:[]];return K(Ae)(me)}}function K(xe){return J=xe,D=0,xe.length===0?Q:I(xe[D])}function I(xe){return ie;function ie(me){return N=re(),G=xe,xe.partial||(f.currentConstruct=xe),xe.name&&f.parser.constructs.disable.null.includes(xe.name)?ve():xe.tokenize.call(M?Object.assign(Object.create(f),M):f,d,ue,ve)(me)}}function ue(xe){return Y(G,N),U}function ve(xe){return N.restore(),++D<J.length?I(J[D]):Q}}}function Z(Y,M){Y.resolveAll&&!a.includes(Y)&&a.push(Y),Y.resolve&&er(f.events,M,f.events.length-M,Y.resolve(f.events.slice(M),f)),Y.resolveTo&&(f.events=Y.resolveTo(f.events,f))}function re(){const Y=C(),M=f.previous,ne=f.currentConstruct,W=f.events.length,U=Array.from(u);return{from:W,restore:Q};function Q(){r=Y,f.previous=M,f.currentConstruct=ne,f.events.length=W,u=U,O()}}function O(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function CV(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function EV(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
314
|
+
Defaulting to \`null\`.`}var y3=_C,v3=PC;function jC({className:e,value:t,...n}){return y.jsx(y3,{"data-slot":"progress",className:Be("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:y.jsx(v3,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function x3({completed:e,total:t}){if(t===0)return null;const n=Math.round(e/t*100),r=o=>o===100?"[&>div]:bg-green-500":o>=67?"[&>div]:bg-blue-500":o>=34?"[&>div]:bg-yellow-500":"[&>div]:bg-red-500";return y.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[y.jsx(jC,{value:n,className:Be("flex-1 h-1.5",r(n))}),y.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[e,"/",t]})]})}var Ec={exports:{}},w3=Ec.exports,m0;function b3(){return m0||(m0=1,(function(e,t){(function(n,r){e.exports=r()})(w3,(function(){var n=1e3,r=6e4,o=36e5,a="millisecond",l="second",u="minute",d="hour",f="day",h="week",p="month",x="quarter",g="year",C="date",k="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var U=["th","st","nd","rd"],Q=W%100;return"["+W+(U[(Q-20)%10]||U[Q]||U[0])+"]"}},P=function(W,U,Q){var J=String(W);return!J||J.length>=U?W:""+Array(U+1-J.length).join(Q)+W},R={s:P,z:function(W){var U=-W.utcOffset(),Q=Math.abs(U),J=Math.floor(Q/60),D=Q%60;return(U<=0?"+":"-")+P(J,2,"0")+":"+P(D,2,"0")},m:function W(U,Q){if(U.date()<Q.date())return-W(Q,U);var J=12*(Q.year()-U.year())+(Q.month()-U.month()),D=U.clone().add(J,p),G=Q-D<0,N=U.clone().add(J+(G?-1:1),p);return+(-(J+(Q-D)/(G?D-N:N-D))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:p,y:g,w:h,d:f,D:C,h:d,m:u,s:l,ms:a,Q:x}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},A="en",j={};j[A]=_;var F="$isDayjsObject",Z=function(W){return W instanceof M||!(!W||!W[F])},re=function W(U,Q,J){var D;if(!U)return A;if(typeof U=="string"){var G=U.toLowerCase();j[G]&&(D=G),Q&&(j[G]=Q,D=G);var N=U.split("-");if(!D&&N.length>1)return W(N[0])}else{var L=U.name;j[L]=U,D=L}return!J&&D&&(A=D),D||!J&&A},O=function(W,U){if(Z(W))return W.clone();var Q=typeof U=="object"?U:{};return Q.date=W,Q.args=arguments,new M(Q)},Y=R;Y.l=re,Y.i=Z,Y.w=function(W,U){return O(W,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var M=(function(){function W(Q){this.$L=re(Q.locale,null,!0),this.parse(Q),this.$x=this.$x||Q.x||{},this[F]=!0}var U=W.prototype;return U.parse=function(Q){this.$d=(function(J){var D=J.date,G=J.utc;if(D===null)return new Date(NaN);if(Y.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var N=D.match(S);if(N){var L=N[2]-1||0,K=(N[7]||"0").substring(0,3);return G?new Date(Date.UTC(N[1],L,N[3]||1,N[4]||0,N[5]||0,N[6]||0,K)):new Date(N[1],L,N[3]||1,N[4]||0,N[5]||0,N[6]||0,K)}}return new Date(D)})(Q),this.init()},U.init=function(){var Q=this.$d;this.$y=Q.getFullYear(),this.$M=Q.getMonth(),this.$D=Q.getDate(),this.$W=Q.getDay(),this.$H=Q.getHours(),this.$m=Q.getMinutes(),this.$s=Q.getSeconds(),this.$ms=Q.getMilliseconds()},U.$utils=function(){return Y},U.isValid=function(){return this.$d.toString()!==k},U.isSame=function(Q,J){var D=O(Q);return this.startOf(J)<=D&&D<=this.endOf(J)},U.isAfter=function(Q,J){return O(Q)<this.startOf(J)},U.isBefore=function(Q,J){return this.endOf(J)<O(Q)},U.$g=function(Q,J,D){return Y.u(Q)?this[J]:this.set(D,Q)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(Q,J){var D=this,G=!!Y.u(J)||J,N=Y.p(Q),L=function(Se,be){var Ae=Y.w(D.$u?Date.UTC(D.$y,be,Se):new Date(D.$y,be,Se),D);return G?Ae:Ae.endOf(f)},K=function(Se,be){return Y.w(D.toDate()[Se].apply(D.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(be)),D)},I=this.$W,ue=this.$M,ve=this.$D,xe="set"+(this.$u?"UTC":"");switch(N){case g:return G?L(1,0):L(31,11);case p:return G?L(1,ue):L(0,ue+1);case h:var ie=this.$locale().weekStart||0,me=(I<ie?I+7:I)-ie;return L(G?ve-me:ve+(6-me),ue);case f:case C:return K(xe+"Hours",0);case d:return K(xe+"Minutes",1);case u:return K(xe+"Seconds",2);case l:return K(xe+"Milliseconds",3);default:return this.clone()}},U.endOf=function(Q){return this.startOf(Q,!1)},U.$set=function(Q,J){var D,G=Y.p(Q),N="set"+(this.$u?"UTC":""),L=(D={},D[f]=N+"Date",D[C]=N+"Date",D[p]=N+"Month",D[g]=N+"FullYear",D[d]=N+"Hours",D[u]=N+"Minutes",D[l]=N+"Seconds",D[a]=N+"Milliseconds",D)[G],K=G===f?this.$D+(J-this.$W):J;if(G===p||G===g){var I=this.clone().set(C,1);I.$d[L](K),I.init(),this.$d=I.set(C,Math.min(this.$D,I.daysInMonth())).$d}else L&&this.$d[L](K);return this.init(),this},U.set=function(Q,J){return this.clone().$set(Q,J)},U.get=function(Q){return this[Y.p(Q)]()},U.add=function(Q,J){var D,G=this;Q=Number(Q);var N=Y.p(J),L=function(ue){var ve=O(G);return Y.w(ve.date(ve.date()+Math.round(ue*Q)),G)};if(N===p)return this.set(p,this.$M+Q);if(N===g)return this.set(g,this.$y+Q);if(N===f)return L(1);if(N===h)return L(7);var K=(D={},D[u]=r,D[d]=o,D[l]=n,D)[N]||1,I=this.$d.getTime()+Q*K;return Y.w(I,this)},U.subtract=function(Q,J){return this.add(-1*Q,J)},U.format=function(Q){var J=this,D=this.$locale();if(!this.isValid())return D.invalidDate||k;var G=Q||"YYYY-MM-DDTHH:mm:ssZ",N=Y.z(this),L=this.$H,K=this.$m,I=this.$M,ue=D.weekdays,ve=D.months,xe=D.meridiem,ie=function(be,Ae,Ve,nt){return be&&(be[Ae]||be(J,G))||Ve[Ae].slice(0,nt)},me=function(be){return Y.s(L%12||12,be,"0")},Se=xe||function(be,Ae,Ve){var nt=be<12?"AM":"PM";return Ve?nt.toLowerCase():nt};return G.replace(E,(function(be,Ae){return Ae||(function(Ve){switch(Ve){case"YY":return String(J.$y).slice(-2);case"YYYY":return Y.s(J.$y,4,"0");case"M":return I+1;case"MM":return Y.s(I+1,2,"0");case"MMM":return ie(D.monthsShort,I,ve,3);case"MMMM":return ie(ve,I);case"D":return J.$D;case"DD":return Y.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return ie(D.weekdaysMin,J.$W,ue,2);case"ddd":return ie(D.weekdaysShort,J.$W,ue,3);case"dddd":return ue[J.$W];case"H":return String(L);case"HH":return Y.s(L,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return Se(L,K,!0);case"A":return Se(L,K,!1);case"m":return String(K);case"mm":return Y.s(K,2,"0");case"s":return String(J.$s);case"ss":return Y.s(J.$s,2,"0");case"SSS":return Y.s(J.$ms,3,"0");case"Z":return N}return null})(be)||N.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(Q,J,D){var G,N=this,L=Y.p(J),K=O(Q),I=(K.utcOffset()-this.utcOffset())*r,ue=this-K,ve=function(){return Y.m(N,K)};switch(L){case g:G=ve()/12;break;case p:G=ve();break;case x:G=ve()/3;break;case h:G=(ue-I)/6048e5;break;case f:G=(ue-I)/864e5;break;case d:G=ue/o;break;case u:G=ue/r;break;case l:G=ue/n;break;default:G=ue}return D?G:Y.a(G)},U.daysInMonth=function(){return this.endOf(p).$D},U.$locale=function(){return j[this.$L]},U.locale=function(Q,J){if(!Q)return this.$L;var D=this.clone(),G=re(Q,J,!0);return G&&(D.$L=G),D},U.clone=function(){return Y.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},W})(),ne=M.prototype;return O.prototype=ne,[["$ms",a],["$s",l],["$m",u],["$H",d],["$W",f],["$M",p],["$y",g],["$D",C]].forEach((function(W){ne[W[1]]=function(U){return this.$g(U,W[0],W[1])}})),O.extend=function(W,U){return W.$i||(W(U,M,O),W.$i=!0),O},O.locale=re,O.isDayjs=Z,O.unix=function(W){return O(1e3*W)},O.en=j[A],O.Ls=j,O.p={},O}))})(Ec)),Ec.exports}var k3=b3();const Rr=Jo(k3);var _c={exports:{}},S3=_c.exports,g0;function C3(){return g0||(g0=1,(function(e,t){(function(n,r){e.exports=r()})(S3,(function(){return function(n,r,o){n=n||{};var a=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(f,h,p,x){return a.fromToBase(f,h,p,x)}o.en.relativeTime=l,a.fromToBase=function(f,h,p,x,g){for(var C,k,S,E=p.$locale().relativeTime||l,_=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],P=_.length,R=0;R<P;R+=1){var A=_[R];A.d&&(C=x?o(f).diff(p,A.d,!0):p.diff(f,A.d,!0));var j=(n.rounding||Math.round)(Math.abs(C));if(S=C>0,j<=A.r||!A.r){j<=1&&R>0&&(A=_[R-1]);var F=E[A.l];g&&(j=g(""+j)),k=typeof F=="string"?F.replace("%d",j):F(j,h,A.l,S);break}}if(h)return k;var Z=S?E.future:E.past;return typeof Z=="function"?Z(k):Z.replace("%s",k)},a.to=function(f,h){return u(f,h,this,!0)},a.from=function(f,h){return u(f,h,this)};var d=function(f){return f.$u?o.utc():o()};a.toNow=function(f){return this.to(d(this),f)},a.fromNow=function(f){return this.from(d(this),f)}}}))})(_c)),_c.exports}var E3=C3();const _3=Jo(E3);Rr.extend(_3);function y0(e){return Rr(e).fromNow()}function T3(e,t="MMM D, YYYY"){return Rr(e).format(t)}function Fl(e){const t=Rr(),n=Rr(e),r=t.diff(n,"minute"),o=t.diff(n,"hour"),a=t.diff(n,"day");return r<1?"just now":r<60?`${r}m ago`:o<24?`${o}h ago`:a<7?`${a}d ago`:n.format("MMM D, YYYY")}function P3({task:e,epicName:t,subtasks:n,onClick:r}){const o=n.filter(a=>a.status==="completed").length;return y.jsxs("div",{"data-task-id":e.id,className:"p-2 cursor-pointer hover:ring bg-accent w-full flex flex-col wrap-break-word",onClick:r,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(Ol,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(CC,{priority:e.priority})]}),y.jsx("h4",{className:"text-sm font-medium mb-1",children:e.title}),e.description&&y.jsx("p",{className:"text-xs text-muted-foreground mb-2 line-clamp-2",children:e.description}),(t||e.tags)&&y.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[t&&y.jsxs("p",{className:"text-xs flex gap-2 items-center",children:[y.jsx(ld,{width:16}),t]}),e.tags&&e.tags.split(",").map(a=>y.jsx(lo,{variant:"outline",className:"text-xs",children:a.trim()},a))]}),(e.dependsOn.length>0||e.blocks.length>0)&&y.jsxs("div",{className:"pt-2 border-t flex flex-wrap gap-1",children:[e.dependsOn.map(a=>y.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono bg-amber-500/10 text-amber-600 dark:text-amber-400",title:`Depends on ${a}`,children:[y.jsx(ak,{className:"h-2.5 w-2.5"}),a]},a)),e.blocks.map(a=>y.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono bg-rose-500/10 text-rose-600 dark:text-rose-400",title:`Blocks ${a}`,children:[y.jsx(lk,{className:"h-2.5 w-2.5"}),a]},a))]}),n.length>0&&y.jsx(x3,{completed:o,total:n.length}),y.jsx("p",{className:"text-[10px] text-muted-foreground mt-1.5",children:Fl(e.createdAt)})]})}function N3({epic:e,taskCount:t,onClick:n}){const r=t.total>0?Math.round(t.completed/t.total*100):0;return y.jsxs("div",{className:"p-2 cursor-pointer bg-blue-50 dark:bg-blue-800 hover:ring wrap-break-word",onClick:n,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(ld,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(CC,{priority:e.priority})]}),y.jsx("h4",{className:"text-sm font-medium mb-2",children:e.title}),y.jsxs("div",{className:"border-t pt-1.5 flex flex-col gap-1.5",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.completed,"/",t.total," tasks"]}),y.jsxs("span",{className:"text-[10px] text-muted-foreground font-mono",children:[r,"%"]})]}),t.total>0&&y.jsx(jC,{value:r,className:"h-1.5"}),y.jsx("p",{className:"text-[10px] text-muted-foreground",children:Fl(e.createdAt)})]})]})}const Xp=[{value:"created:desc",label:"Newest first"},{value:"created:asc",label:"Oldest first"},{value:"updated:desc",label:"Recently updated"},{value:"priority:asc",label:"Priority (high to low)"},{value:"priority:desc",label:"Priority (low to high)"},{value:"title:asc",label:"Title (A-Z)"},{value:"title:desc",label:"Title (Z-A)"}];function v0(e,t,n){switch(n){case"created:desc":return Rr(t.createdAt).valueOf()-Rr(e.createdAt).valueOf();case"created:asc":return Rr(e.createdAt).valueOf()-Rr(t.createdAt).valueOf();case"updated:desc":return Rr(t.updatedAt).valueOf()-Rr(e.updatedAt).valueOf();case"priority:asc":return e.priority-t.priority;case"priority:desc":return t.priority-e.priority;case"title:asc":return e.title.localeCompare(t.title);case"title:desc":return t.title.localeCompare(e.title);default:return 0}}function j3({open:e,onClose:t,children:n,className:r=""}){const o=b.useRef(null);return QS(o,t),e?y.jsx("div",{ref:o,className:`absolute right-0 top-full mt-1 z-50 rounded-md border bg-popover p-3 shadow-md ${r}`,children:n}):null}const x0=[{value:"all",label:"All"},{value:"epic",label:"Epics only"},{value:"task",label:"Tasks only"}],Xc={sort:"created:desc",type:"all"};function R3(e){return e.sort!==Xc.sort||e.type!==Xc.type}const w0="h-8 w-full rounded-md border bg-transparent px-2 text-sm outline-none focus:ring-1 focus:ring-ring";function I3({value:e,onChange:t}){const[n,r]=b.useState(!1),o=R3(e);return y.jsxs("div",{className:"relative",children:[y.jsxs(it,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>r(!n),title:"Sort & filter",children:[y.jsx(iR,{className:"h-4 w-4"}),o&&y.jsx("span",{className:"absolute top-0.5 right-0.5 h-2 w-2 rounded-full bg-blue-500"})]}),y.jsxs(j3,{open:n,onClose:()=>r(!1),className:"w-52 flex flex-col gap-3",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Sort by"}),y.jsx("select",{value:e.sort,onChange:a=>{const l=a.target.value;Xp.some(u=>u.value===l)&&t({...e,sort:l})},className:w0,children:Xp.map(a=>y.jsx("option",{value:a.value,children:a.label},a.value))})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Show"}),y.jsx("select",{value:e.type,onChange:a=>{const l=a.target.value;x0.some(u=>u.value===l)&&t({...e,type:l})},className:w0,children:x0.map(a=>y.jsx("option",{value:a.value,children:a.label},a.value))})]}),o&&y.jsx("button",{onClick:()=>{t(Xc),r(!1)},className:"text-xs text-muted-foreground hover:text-foreground underline self-end",children:"Reset"})]})]})}function A3({label:e,tasks:t,epics:n,allTasks:r,allEpics:o,onAddClick:a,onTaskClick:l,onEpicClick:u,onArchiveAll:d}){const[f,h]=b.useState(Xc),p=b.useMemo(()=>f.type==="task"?[]:[...n].sort((E,_)=>v0(E,_,f.sort)),[n,f]),x=b.useMemo(()=>f.type==="epic"?[]:[...t].sort((E,_)=>v0(E,_,f.sort)),[t,f]),g=x.length+p.length,C=E=>{if(!E)return null;const _=o.find(P=>P.id===E);return(_==null?void 0:_.title)||E},k=E=>r.filter(_=>_.parentTaskId===E),S=E=>{const _=r.filter(R=>R.epicId===E&&!R.parentTaskId),P=_.filter(R=>R.status==="completed").length;return{total:_.length,completed:P}};return y.jsxs("div",{className:"w-[280px] min-w-[280px] max-w-[320px] flex flex-col border rounded-md",children:[y.jsxs("div",{className:"flex items-center justify-between border-b p-2 bg-accent/50",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"font-semibold text-sm",children:e}),y.jsx(lo,{variant:"secondary",className:"text-xs",children:g})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(I3,{value:f,onChange:h}),d&&g>0&&y.jsx(it,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:d,title:"Archive all completed items",children:y.jsx(sk,{className:"h-4 w-4"})}),y.jsx(it,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:`Add task to ${e}`,children:y.jsx(ud,{className:"h-4 w-4"})})]})]}),y.jsx("div",{className:"flex-1 min-h-[100px] overflow-y-auto",children:y.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[p.map(E=>y.jsx(N3,{epic:E,taskCount:S(E.id),onClick:()=>u(E)},E.id)),x.map(E=>y.jsx(P3,{task:E,epicName:C(E.epicId),subtasks:k(E.id),onClick:()=>l(E)},E.id)),g===0&&y.jsx("div",{className:"flex items-center justify-center min-h-[80px] text-sm text-muted-foreground italic",children:"No items"})]})})]})}const O3=[{key:"todo",label:"TODO"},{key:"in_progress",label:"In Progress"},{key:"completed",label:"Completed"},{key:"wont_fix",label:"Won't Fix"}];function D3({tasks:e,epics:t,onAddClick:n,onTaskClick:r,onEpicClick:o,onArchiveAllCompleted:a}){const l=e.filter(f=>!f.parentTaskId),u=f=>l.filter(h=>h.status===f),d=f=>t.filter(h=>h.status===f);return y.jsx("div",{className:"flex gap-4 items-start flex-nowrap min-h-[calc(100vh-180px)]",children:O3.map(f=>y.jsx(A3,{label:f.label,tasks:u(f.key),epics:d(f.key),allTasks:e,allEpics:t,onAddClick:()=>n(f.key),onTaskClick:r,onEpicClick:o,onArchiveAll:f.key==="completed"?a:void 0},f.key))})}function z3({isConfirming:e,entityName:t,onDelete:n,onConfirm:r,onCancel:o}){return e?y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-sm text-destructive",children:"Delete?"}),y.jsx(it,{variant:"destructive",size:"sm",onClick:r,children:"Yes"}),y.jsx(it,{variant:"outline",size:"sm",onClick:o,children:"No"})]}):y.jsxs(it,{variant:"destructive",size:"sm",onClick:n,children:["Delete ",t]})}function bl({children:e,count:t}){return y.jsxs("h4",{className:"text-xs uppercase text-muted-foreground font-semibold mb-3",children:[e,t&&` (${t.current}/${t.total})`]})}function RC({createdAt:e,updatedAt:t}){return y.jsxs("div",{className:"flex gap-3 justify-end",children:[y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Created ",y0(e)]}),y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Updated ",y0(t)]})]})}function IC({status:e,className:t}){const n=Be("h-4 w-4 shrink-0",t);switch(e){case"completed":return y.jsx(Ol,{className:Be(n,"text-green-500")});case"archived":return y.jsx(sk,{className:Be(n,"text-gray-400")});case"wont_fix":return y.jsx(aR,{className:Be(n,"text-amber-500")});default:return y.jsx(uR,{className:Be(n,"opacity-50")})}}const AC={create:{icon:ud,color:"text-green-500"},update:{icon:Cm,color:"text-blue-500"},delete:{icon:Em,color:"text-red-500"}};function OC({action:e,className:t}){const n=AC[e],r=n.icon;return y.jsx(r,{className:Be("h-4 w-4",n.color,t)})}function DC(e){return AC[e].color}function Md({value:e,onChange:t,statuses:n,triggerClassName:r}){return y.jsxs(dr,{value:e,onValueChange:t,children:[y.jsx(hr,{className:r,children:y.jsx(fr,{})}),y.jsx(pr,{children:n.map(o=>y.jsx(nn,{value:o,children:na[o]},o))})]})}function Ld({value:e,onChange:t,triggerClassName:n}){return y.jsxs(dr,{value:e.toString(),onValueChange:r=>t(parseInt(r,10)),children:[y.jsx(hr,{className:n,children:y.jsx(fr,{})}),y.jsx(pr,{children:Object.entries(Nd).map(([r,o])=>y.jsxs(nn,{value:r,children:["P",r," - ",o]},r))})]})}function mg({...e}){return y.jsx(H1,{"data-slot":"dialog",...e})}function M3({...e}){return y.jsx(W1,{"data-slot":"dialog-portal",...e})}function L3({className:e,...t}){return y.jsx(Z1,{"data-slot":"dialog-overlay",className:Be("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function gg({className:e,children:t,showCloseButton:n=!0,...r}){return y.jsxs(M3,{"data-slot":"dialog-portal",children:[y.jsx(L3,{}),y.jsxs(q1,{"data-slot":"dialog-content",className:Be("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...r,children:[t,n&&y.jsxs(Y1,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[y.jsx(cd,{}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function F3({className:e,...t}){return y.jsx("div",{"data-slot":"dialog-header",className:Be("flex flex-col gap-2 text-center sm:text-left",e),...t})}function $3({className:e,...t}){return y.jsx("div",{"data-slot":"dialog-footer",className:Be("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function V3({className:e,...t}){return y.jsx(Q1,{"data-slot":"dialog-title",className:Be("text-lg leading-none font-semibold",e),...t})}function B3({className:e,...t}){return y.jsx(GO,{"data-slot":"dialog-description",className:Be("text-muted-foreground text-sm",e),...t})}const U3={epic:ld,task:Ol,subtask:fk};function zC({items:e}){return y.jsx("nav",{className:"flex items-center gap-1.5",children:e.map((t,n)=>{const r=n===e.length-1,o=!r&&t.onClick,a=U3[t.type];return y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("div",{className:Be("flex items-center gap-1",o&&"cursor-pointer hover:text-foreground"),onClick:o?t.onClick:void 0,title:t.title,children:[y.jsx(a,{className:"h-3.5 w-3.5"}),y.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:t.id})]}),!r&&y.jsx(ad,{className:"h-3 w-3 opacity-50"})]},t.id)})})}function H3(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const W3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Z3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,q3={};function b0(e,t){return(q3.jsx?Z3:W3).test(e)}const Q3=/[ \t\n\f\r]/g;function Y3(e){return typeof e=="object"?e.type==="text"?k0(e.value):!1:k0(e)}function k0(e){return e.replace(Q3,"")===""}class $l{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}$l.prototype.normal={};$l.prototype.property={};$l.prototype.space=void 0;function MC(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new $l(n,r,t)}function Jp(e){return e.toLowerCase()}class Hn{constructor(t,n){this.attribute=n,this.property=t}}Hn.prototype.attribute="";Hn.prototype.booleanish=!1;Hn.prototype.boolean=!1;Hn.prototype.commaOrSpaceSeparated=!1;Hn.prototype.commaSeparated=!1;Hn.prototype.defined=!1;Hn.prototype.mustUseProperty=!1;Hn.prototype.number=!1;Hn.prototype.overloadedBoolean=!1;Hn.prototype.property="";Hn.prototype.spaceSeparated=!1;Hn.prototype.space=void 0;let K3=0;const We=ns(),zt=ns(),em=ns(),pe=ns(),gt=ns(),Fs=ns(),Yn=ns();function ns(){return 2**++K3}const tm=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:zt,commaOrSpaceSeparated:Yn,commaSeparated:Fs,number:pe,overloadedBoolean:em,spaceSeparated:gt},Symbol.toStringTag,{value:"Module"})),Gh=Object.keys(tm);class yg extends Hn{constructor(t,n,r,o){let a=-1;if(super(t,n),S0(this,"space",o),typeof r=="number")for(;++a<Gh.length;){const l=Gh[a];S0(this,Gh[a],(r&tm[l])===tm[l])}}}yg.prototype.defined=!0;function S0(e,t,n){n&&(e[t]=n)}function ma(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new yg(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Jp(r)]=r,n[Jp(a.attribute)]=r}return new $l(t,n,e.space)}const LC=ma({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:gt,ariaCurrent:null,ariaDescribedBy:gt,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:gt,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:gt,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gt,ariaLevel:pe,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:gt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:gt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:zt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function FC(e,t){return t in e?e[t]:t}function $C(e,t){return FC(e,t.toLowerCase())}const G3=ma({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fs,acceptCharset:gt,accessKey:gt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:gt,autoFocus:We,autoPlay:We,blocking:gt,capture:null,charSet:null,checked:We,cite:null,className:gt,cols:pe,colSpan:null,content:null,contentEditable:zt,controls:We,controlsList:gt,coords:pe|Fs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:em,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:gt,height:pe,hidden:em,high:pe,href:null,hrefLang:null,htmlFor:gt,httpEquiv:gt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:gt,itemRef:gt,itemScope:We,itemType:gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:pe,pattern:null,ping:gt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:gt,required:We,reversed:We,rows:pe,rowSpan:pe,sandbox:gt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:zt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:$C}),X3=ma({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:Yn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:gt,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Fs,g2:Fs,glyphName:Fs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Yn,rev:Yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Yn,requiredFeatures:Yn,requiredFonts:Yn,requiredFormats:Yn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Yn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Yn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:FC}),VC=ma({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()}}),BC=ma({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$C}),UC=ma({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),J3={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"},e5=/[A-Z]/g,C0=/-[a-z]/g,t5=/^data[-\w.:]+$/i;function n5(e,t){const n=Jp(t);let r=t,o=Hn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&t5.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(C0,i5);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!C0.test(a)){let l=a.replace(e5,r5);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=yg}return new o(r,t)}function r5(e){return"-"+e.toLowerCase()}function i5(e){return e.charAt(1).toUpperCase()}const o5=MC([LC,G3,VC,BC,UC],"html"),vg=MC([LC,X3,VC,BC,UC],"svg");function s5(e){return e.join(" ").trim()}var Rs={},Xh,E0;function a5(){if(E0)return Xh;E0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
315
|
+
`,f="/",h="*",p="",x="comment",g="declaration";function C(S,E){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];E=E||{};var _=1,P=1;function R(W){var U=W.match(t);U&&(_+=U.length);var Q=W.lastIndexOf(d);P=~Q?W.length-Q:P+W.length}function A(){var W={line:_,column:P};return function(U){return U.position=new j(W),re(),U}}function j(W){this.start=W,this.end={line:_,column:P},this.source=E.source}j.prototype.content=S;function F(W){var U=new Error(E.source+":"+_+":"+P+": "+W);if(U.reason=W,U.filename=E.source,U.line=_,U.column=P,U.source=S,!E.silent)throw U}function Z(W){var U=W.exec(S);if(U){var Q=U[0];return R(Q),S=S.slice(Q.length),U}}function re(){Z(n)}function O(W){var U;for(W=W||[];U=Y();)U!==!1&&W.push(U);return W}function Y(){var W=A();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var U=2;p!=S.charAt(U)&&(h!=S.charAt(U)||f!=S.charAt(U+1));)++U;if(U+=2,p===S.charAt(U-1))return F("End of comment missing");var Q=S.slice(2,U-2);return P+=2,R(Q),S=S.slice(U),P+=2,W({type:x,comment:Q})}}function M(){var W=A(),U=Z(r);if(U){if(Y(),!Z(o))return F("property missing ':'");var Q=Z(a),J=W({type:g,property:k(U[0].replace(e,p)),value:Q?k(Q[0].replace(e,p)):p});return Z(l),J}}function ne(){var W=[];O(W);for(var U;U=M();)U!==!1&&(W.push(U),O(W));return W}return re(),ne()}function k(S){return S?S.replace(u,p):p}return Xh=C,Xh}var _0;function l5(){if(_0)return Rs;_0=1;var e=Rs&&Rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.default=n;const t=e(a5());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),u=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:h}=d;u?o(f,h,d):h&&(a=a||{},a[f]=h)}),a}return Rs}var tl={},T0;function u5(){if(T0)return tl;T0=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},l=function(f,h){return h.toUpperCase()},u=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(o,u):f=f.replace(r,u),f.replace(t,l))};return tl.camelCase=d,tl}var nl,P0;function c5(){if(P0)return nl;P0=1;var e=nl&&nl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(l5()),n=u5();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(l[(0,n.camelCase)(u,a)]=d)}),l}return r.default=r,nl=r,nl}var d5=c5();const f5=Jo(d5),HC=WC("end"),xg=WC("start");function WC(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 h5(e){const t=xg(e),n=HC(e);if(t&&n)return{start:t,end:n}}function cl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?N0(e.position):"start"in e||"end"in e?N0(e):"line"in e||"column"in e?nm(e):""}function nm(e){return j0(e&&e.line)+":"+j0(e&&e.column)}function N0(e){return nm(e&&e.start)+"-"+nm(e&&e.end)}function j0(e){return e&&typeof e=="number"?e:1}class hn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=cl(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}hn.prototype.file="";hn.prototype.name="";hn.prototype.reason="";hn.prototype.message="";hn.prototype.stack="";hn.prototype.column=void 0;hn.prototype.line=void 0;hn.prototype.ancestors=void 0;hn.prototype.cause=void 0;hn.prototype.fatal=void 0;hn.prototype.place=void 0;hn.prototype.ruleId=void 0;hn.prototype.source=void 0;const wg={}.hasOwnProperty,p5=new Map,m5=/[A-Z]/g,g5=new Set(["table","tbody","thead","tfoot","tr"]),y5=new Set(["td","th"]),ZC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function v5(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=_5(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=E5(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?vg:o5,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=qC(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function qC(e,t,n){if(t.type==="element")return x5(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return w5(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return k5(e,t,n);if(t.type==="mdxjsEsm")return b5(e,t);if(t.type==="root")return S5(e,t,n);if(t.type==="text")return C5(e,t)}function x5(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=vg,e.schema=o),e.ancestors.push(t);const a=YC(e,t.tagName,!1),l=T5(e,t);let u=kg(e,t);return g5.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!Y3(d):!0})),QC(e,l,a,t),bg(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function w5(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)}kl(e,t.position)}function b5(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);kl(e,t.position)}function k5(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=vg,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:YC(e,t.name,!0),l=P5(e,t),u=kg(e,t);return QC(e,l,a,t),bg(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function S5(e,t,n){const r={};return bg(r,kg(e,t)),e.create(t,e.Fragment,r,n)}function C5(e,t){return t.value}function QC(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function bg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function E5(e,t,n){return r;function r(o,a,l,u){const f=Array.isArray(l.children)?n:t;return u?f(a,l,u):f(a,l)}}function _5(e,t){return n;function n(r,o,a,l){const u=Array.isArray(a.children),d=xg(r);return t(o,a,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function T5(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&wg.call(t.properties,o)){const a=N5(e,o,t.properties[o]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&y5.has(t.tagName)?r=u:n[l]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function P5(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else kl(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else kl(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function kg(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:p5;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=o.get(d)||0;l=d+"-"+f,o.set(d,f+1)}}const u=qC(e,a,l);u!==void 0&&n.push(u)}return n}function N5(e,t,n){const r=n5(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?H3(n):s5(n)),r.property==="style"){let o=typeof n=="object"?n:j5(e,String(n));return e.stylePropertyNameCase==="css"&&(o=R5(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?J3[r.property]||r.property:r.attribute,n]}}function j5(e,t){try{return f5(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=ZC+"#cannot-parse-style-attribute",o}}function YC(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const u=b0(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=l}else r=b0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return wg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);kl(e)}function kl(e,t){const n=new hn("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=ZC+"#cannot-handle-mdx-estrees-without-createevaluater",n}function R5(e){const t={};let n;for(n in e)wg.call(e,n)&&(t[I5(n)]=e[n]);return t}function I5(e){let t=e.replace(m5,A5);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function A5(e){return"-"+e.toLowerCase()}const Jh={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"]},O5={};function Sg(e,t){const n=O5,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return KC(e,r,o)}function KC(e,t,n){if(D5(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 R0(e.children,t,n)}return Array.isArray(e)?R0(e,t,n):""}function R0(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=KC(e[o],t,n);return r.join("")}function D5(e){return!!(e&&typeof e=="object")}const I0=document.createElement("i");function Cg(e){const t="&"+e+";";I0.innerHTML=t;const n=I0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function er(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function cr(e,t){return e.length>0?(er(e,e.length,0,t),e):t}const A0={}.hasOwnProperty;function GC(e){const t={};let n=-1;for(;++n<e.length;)z5(t,e[n]);return t}function z5(e,t){let n;for(n in t){const o=(A0.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){A0.call(o,l)||(o[l]=[]);const u=a[l];M5(o[l],Array.isArray(u)?u:u?[u]:[])}}}function M5(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);er(e,0,0,r)}function XC(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 Or(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const En=go(/[A-Za-z]/),fn=go(/[\dA-Za-z]/),L5=go(/[#-'*+\--9=?A-Z^-~]/);function Jc(e){return e!==null&&(e<32||e===127)}const rm=go(/\d/),F5=go(/[\dA-Fa-f]/),$5=go(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Fd=go(new RegExp("\\p{P}|\\p{S}","u")),Xo=go(/\s/);function go(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ga(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&fn(e.charCodeAt(n+1))&&fn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Ke(d)?(e.enter(n),u(d)):t(d)}function u(d){return Ke(d)&&a++<o?(e.consume(d),u):(e.exit(n),t(d))}}const V5={tokenize:B5};function B5(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),a(u)}function a(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return $e(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const U5={tokenize:H5},O0={tokenize:W5};function H5(e){const t=this,n=[];let r=0,o,a,l;return u;function u(P){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,d,f)(P)}return f(P)}function d(P){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&_();const R=t.events.length;let A=R,j;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){j=t.events[A][1].end;break}E(r);let F=R;for(;F<t.events.length;)t.events[F][1].end={...j},F++;return er(t.events,A+1,0,t.events.slice(R)),t.events.length=F,f(P)}return u(P)}function f(P){if(r===n.length){if(!o)return x(P);if(o.currentConstruct&&o.currentConstruct.concrete)return C(P);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(O0,h,p)(P)}function h(P){return o&&_(),E(r),x(P)}function p(P){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,C(P)}function x(P){return t.containerState={},e.attempt(O0,g,C)(P)}function g(P){return r++,n.push([t.currentConstruct,t.containerState]),x(P)}function C(P){if(P===null){o&&_(),E(0),e.consume(P);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),k(P)}function k(P){if(P===null){S(e.exit("chunkFlow"),!0),E(0),e.consume(P);return}return $e(P)?(e.consume(P),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(P),k)}function S(P,R){const A=t.sliceStream(P);if(R&&A.push(null),P.previous=a,a&&(a.next=P),a=P,o.defineSkip(P.start),o.write(A),t.parser.lazy[P.start.line]){let j=o.events.length;for(;j--;)if(o.events[j][1].start.offset<l&&(!o.events[j][1].end||o.events[j][1].end.offset>l))return;const F=t.events.length;let Z=F,re,O;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(re){O=t.events[Z][1].end;break}re=!0}for(E(r),j=F;j<t.events.length;)t.events[j][1].end={...O},j++;er(t.events,Z+1,0,t.events.slice(F)),t.events.length=j}}function E(P){let R=n.length;for(;R-- >P;){const A=n[R];t.containerState=A[1],A[0].exit.call(t,e)}n.length=P}function _(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function W5(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ra(e){if(e===null||ht(e)||Xo(e))return 1;if(Fd(e))return 2}function $d(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const im={name:"attention",resolveAll:Z5,tokenize:q5};function Z5(e,t){let n=-1,r,o,a,l,u,d,f,h;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;d=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 p={...e[r][1].end},x={...e[n][1].start};D0(p,-d),D0(x,d),l={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=cr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=cr(f,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",a,t]]),f=cr(f,$d(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=cr(f,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=cr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,er(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function q5(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ra(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===a)return e.consume(d),u;const f=e.exit("attentionSequence"),h=ra(d),p=!h||h===2&&o||n.includes(d),x=!o||o===2&&h||n.includes(r);return f._open=!!(a===42?p:p&&(o||!x)),f._close=!!(a===42?x:x&&(h||!p)),t(d)}}function D0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Q5={name:"autolink",tokenize:Y5};function Y5(e,t,n){let r=0;return o;function o(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(g){return En(g)?(e.consume(g),l):g===64?n(g):f(g)}function l(g){return g===43||g===45||g===46||fn(g)?(r=1,u(g)):f(g)}function u(g){return g===58?(e.consume(g),r=0,d):(g===43||g===45||g===46||fn(g))&&r++<32?(e.consume(g),u):(r=0,f(g))}function d(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||Jc(g)?n(g):(e.consume(g),d)}function f(g){return g===64?(e.consume(g),h):L5(g)?(e.consume(g),f):n(g)}function h(g){return fn(g)?p(g):n(g)}function p(g){return g===46?(e.consume(g),r=0,h):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):x(g)}function x(g){if((g===45||fn(g))&&r++<63){const C=g===45?x:p;return e.consume(g),C}return n(g)}}const Vl={partial:!0,tokenize:K5};function K5(e,t,n){return r;function r(a){return Ke(a)?Xe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||$e(a)?t(a):n(a)}}const JC={continuation:{tokenize:X5},exit:J5,name:"blockQuote",tokenize:G5};function G5(e,t,n){const r=this;return o;function o(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ke(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function X5(e,t,n){const r=this;return o;function o(l){return Ke(l)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(JC,t,n)(l)}}function J5(e){e.exit("blockQuote")}const eE={name:"characterEscape",tokenize:e6};function e6(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return $5(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const tE={name:"characterReference",tokenize:t6};function t6(e,t,n){const r=this;let o=0,a,l;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,l=fn,h(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=F5,h):(e.enter("characterReferenceValue"),a=7,l=rm,h(p))}function h(p){if(p===59&&o){const x=e.exit("characterReferenceValue");return l===fn&&!Cg(r.sliceSerialize(x))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&o++<a?(e.consume(p),h):n(p)}}const z0={partial:!0,tokenize:r6},M0={concrete:!0,name:"codeFenced",tokenize:n6};function n6(e,t,n){const r=this,o={partial:!0,tokenize:A};let a=0,l=0,u;return d;function d(j){return f(j)}function f(j){const F=r.events[r.events.length-1];return a=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,u=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(j)}function h(j){return j===u?(l++,e.consume(j),h):l<3?n(j):(e.exit("codeFencedFenceSequence"),Ke(j)?Xe(e,p,"whitespace")(j):p(j))}function p(j){return j===null||$e(j)?(e.exit("codeFencedFence"),r.interrupt?t(j):e.check(z0,k,R)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(j))}function x(j){return j===null||$e(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(j)):Ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,g,"whitespace")(j)):j===96&&j===u?n(j):(e.consume(j),x)}function g(j){return j===null||$e(j)?p(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(j))}function C(j){return j===null||$e(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(j)):j===96&&j===u?n(j):(e.consume(j),C)}function k(j){return e.attempt(o,R,S)(j)}function S(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),E}function E(j){return a>0&&Ke(j)?Xe(e,_,"linePrefix",a+1)(j):_(j)}function _(j){return j===null||$e(j)?e.check(z0,k,R)(j):(e.enter("codeFlowValue"),P(j))}function P(j){return j===null||$e(j)?(e.exit("codeFlowValue"),_(j)):(e.consume(j),P)}function R(j){return e.exit("codeFenced"),t(j)}function A(j,F,Z){let re=0;return O;function O(U){return j.enter("lineEnding"),j.consume(U),j.exit("lineEnding"),Y}function Y(U){return j.enter("codeFencedFence"),Ke(U)?Xe(j,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):M(U)}function M(U){return U===u?(j.enter("codeFencedFenceSequence"),ne(U)):Z(U)}function ne(U){return U===u?(re++,j.consume(U),ne):re>=l?(j.exit("codeFencedFenceSequence"),Ke(U)?Xe(j,W,"whitespace")(U):W(U)):Z(U)}function W(U){return U===null||$e(U)?(j.exit("codeFencedFence"),F(U)):Z(U)}}}function r6(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const ep={name:"codeIndented",tokenize:o6},i6={partial:!0,tokenize:s6};function o6(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(f)}function a(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):$e(f)?e.attempt(i6,l,d)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||$e(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),u)}function d(f){return e.exit("codeIndented"),t(f)}}function s6(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):$e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Xe(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):$e(l)?o(l):n(l)}}const a6={name:"codeText",previous:u6,resolve:l6,tokenize:c6};function l6(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function u6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function c6(e,t,n){let r=0,o,a;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(a=e.enter("codeTextSequence"),o=0,h(p)):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||$e(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),f)}function h(p){return p===96?(e.consume(p),o++,h):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",f(p))}}class d6{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&rl(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),rl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),rl(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);rl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);rl(this.left,n.reverse())}}}function rl(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 nE(e){const t={};let n=-1,r,o,a,l,u,d,f;const h=new d6(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,f6(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(h.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...h.get(o)[1].start},u=h.slice(o,n),u.unshift(r),h.splice(o,n-o+1,u))}}return er(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function f6(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],f={};let h,p,x=-1,g=n,C=0,k=0;const S=[k];for(;g;){for(;e.get(++o)[1]!==g;);a.push(o),g._tokenizer||(h=r.sliceStream(g),g.next||h.push(null),p&&l.defineSkip(g.start),g._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),g._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=n;++x<u.length;)u[x][0]==="exit"&&u[x-1][0]==="enter"&&u[x][1].type===u[x-1][1].type&&u[x][1].start.line!==u[x][1].end.line&&(k=x+1,S.push(k),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(l.events=[],g?(g._tokenizer=void 0,g.previous=void 0):S.pop(),x=S.length;x--;){const E=u.slice(S[x],S[x+1]),_=a.pop();d.push([_,_+E.length-1]),e.splice(_,2,E)}for(d.reverse(),x=-1;++x<d.length;)f[C+d[x][0]]=C+d[x][1],C+=d[x][1]-d[x][0]-1;return f}const h6={resolve:m6,tokenize:g6},p6={partial:!0,tokenize:y6};function m6(e){return nE(e),e}function g6(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?a(u):$e(u)?e.check(p6,l,a)(u):(e.consume(u),o)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function y6(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(l){if(l===null||$e(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function rE(e,t,n,r,o,a,l,u,d){const f=d||Number.POSITIVE_INFINITY;let h=0;return p;function p(E){return E===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(E),e.exit(a),x):E===null||E===32||E===41||Jc(E)?n(E):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(E))}function x(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===62?(e.exit("chunkString"),e.exit(u),x(E)):E===null||E===60||$e(E)?n(E):(e.consume(E),E===92?C:g)}function C(E){return E===60||E===62||E===92?(e.consume(E),g):g(E)}function k(E){return!h&&(E===null||E===41||ht(E))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(E)):h<f&&E===40?(e.consume(E),h++,k):E===41?(e.consume(E),h--,k):E===null||E===32||E===40||Jc(E)?n(E):(e.consume(E),E===92?S:k)}function S(E){return E===40||E===41||E===92?(e.consume(E),k):k(E)}}function iE(e,t,n,r,o,a){const l=this;let u=0,d;return f;function f(g){return e.enter(r),e.enter(o),e.consume(g),e.exit(o),e.enter(a),h}function h(g){return u>999||g===null||g===91||g===93&&!d||g===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(g):g===93?(e.exit(a),e.enter(o),e.consume(g),e.exit(o),e.exit(r),t):$e(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||$e(g)||u++>999?(e.exit("chunkString"),h(g)):(e.consume(g),d||(d=!Ke(g)),g===92?x:p)}function x(g){return g===91||g===92||g===93?(e.consume(g),u++,p):p(g)}}function oE(e,t,n,r,o,a){let l;return u;function u(x){return x===34||x===39||x===40?(e.enter(r),e.enter(o),e.consume(x),e.exit(o),l=x===40?41:x,d):n(x)}function d(x){return x===l?(e.enter(o),e.consume(x),e.exit(o),e.exit(r),t):(e.enter(a),f(x))}function f(x){return x===l?(e.exit(a),d(l)):x===null?n(x):$e(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Xe(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===l||x===null||$e(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?p:h)}function p(x){return x===l||x===92?(e.consume(x),h):h(x)}}function dl(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ke(o)?Xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const v6={name:"definition",tokenize:w6},x6={partial:!0,tokenize:b6};function w6(e,t,n){const r=this;let o;return a;function a(g){return e.enter("definition"),l(g)}function l(g){return iE.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return o=Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),d):n(g)}function d(g){return ht(g)?dl(e,f)(g):f(g)}function f(g){return rE(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(x6,p,p)(g)}function p(g){return Ke(g)?Xe(e,x,"whitespace")(g):x(g)}function x(g){return g===null||$e(g)?(e.exit("definition"),r.parser.defined.push(o),t(g)):n(g)}}function b6(e,t,n){return r;function r(u){return ht(u)?dl(e,o)(u):n(u)}function o(u){return oE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Ke(u)?Xe(e,l,"whitespace")(u):l(u)}function l(u){return u===null||$e(u)?t(u):n(u)}}const k6={name:"hardBreakEscape",tokenize:S6};function S6(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return $e(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const C6={name:"headingAtx",resolve:E6,tokenize:_6};function E6(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},er(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function _6(e,t,n){let r=0;return o;function o(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&r++<6?(e.consume(h),l):h===null||ht(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||$e(h)?(e.exit("atxHeading"),t(h)):Ke(h)?Xe(e,u,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),u(h))}function f(h){return h===null||h===35||ht(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const T6=["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"],L0=["pre","script","style","textarea"],P6={concrete:!0,name:"htmlFlow",resolveTo:R6,tokenize:I6},N6={partial:!0,tokenize:O6},j6={partial:!0,tokenize:A6};function R6(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 I6(e,t,n){const r=this;let o,a,l,u,d;return f;function f(I){return h(I)}function h(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),p}function p(I){return I===33?(e.consume(I),x):I===47?(e.consume(I),a=!0,k):I===63?(e.consume(I),o=3,r.interrupt?t:N):En(I)?(e.consume(I),l=String.fromCharCode(I),S):n(I)}function x(I){return I===45?(e.consume(I),o=2,g):I===91?(e.consume(I),o=5,u=0,C):En(I)?(e.consume(I),o=4,r.interrupt?t:N):n(I)}function g(I){return I===45?(e.consume(I),r.interrupt?t:N):n(I)}function C(I){const ue="CDATA[";return I===ue.charCodeAt(u++)?(e.consume(I),u===ue.length?r.interrupt?t:M:C):n(I)}function k(I){return En(I)?(e.consume(I),l=String.fromCharCode(I),S):n(I)}function S(I){if(I===null||I===47||I===62||ht(I)){const ue=I===47,ve=l.toLowerCase();return!ue&&!a&&L0.includes(ve)?(o=1,r.interrupt?t(I):M(I)):T6.includes(l.toLowerCase())?(o=6,ue?(e.consume(I),E):r.interrupt?t(I):M(I)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?_(I):P(I))}return I===45||fn(I)?(e.consume(I),l+=String.fromCharCode(I),S):n(I)}function E(I){return I===62?(e.consume(I),r.interrupt?t:M):n(I)}function _(I){return Ke(I)?(e.consume(I),_):O(I)}function P(I){return I===47?(e.consume(I),O):I===58||I===95||En(I)?(e.consume(I),R):Ke(I)?(e.consume(I),P):O(I)}function R(I){return I===45||I===46||I===58||I===95||fn(I)?(e.consume(I),R):A(I)}function A(I){return I===61?(e.consume(I),j):Ke(I)?(e.consume(I),A):P(I)}function j(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,F):Ke(I)?(e.consume(I),j):Z(I)}function F(I){return I===d?(e.consume(I),d=null,re):I===null||$e(I)?n(I):(e.consume(I),F)}function Z(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ht(I)?A(I):(e.consume(I),Z)}function re(I){return I===47||I===62||Ke(I)?P(I):n(I)}function O(I){return I===62?(e.consume(I),Y):n(I)}function Y(I){return I===null||$e(I)?M(I):Ke(I)?(e.consume(I),Y):n(I)}function M(I){return I===45&&o===2?(e.consume(I),Q):I===60&&o===1?(e.consume(I),J):I===62&&o===4?(e.consume(I),L):I===63&&o===3?(e.consume(I),N):I===93&&o===5?(e.consume(I),G):$e(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(N6,K,ne)(I)):I===null||$e(I)?(e.exit("htmlFlowData"),ne(I)):(e.consume(I),M)}function ne(I){return e.check(j6,W,K)(I)}function W(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),U}function U(I){return I===null||$e(I)?ne(I):(e.enter("htmlFlowData"),M(I))}function Q(I){return I===45?(e.consume(I),N):M(I)}function J(I){return I===47?(e.consume(I),l="",D):M(I)}function D(I){if(I===62){const ue=l.toLowerCase();return L0.includes(ue)?(e.consume(I),L):M(I)}return En(I)&&l.length<8?(e.consume(I),l+=String.fromCharCode(I),D):M(I)}function G(I){return I===93?(e.consume(I),N):M(I)}function N(I){return I===62?(e.consume(I),L):I===45&&o===2?(e.consume(I),N):M(I)}function L(I){return I===null||$e(I)?(e.exit("htmlFlowData"),K(I)):(e.consume(I),L)}function K(I){return e.exit("htmlFlow"),t(I)}}function A6(e,t,n){const r=this;return o;function o(l){return $e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function O6(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Vl,t,n)}}const D6={name:"htmlText",tokenize:z6};function z6(e,t,n){const r=this;let o,a,l;return u;function u(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),A):N===63?(e.consume(N),P):En(N)?(e.consume(N),Z):n(N)}function f(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),a=0,C):En(N)?(e.consume(N),_):n(N)}function h(N){return N===45?(e.consume(N),g):n(N)}function p(N){return N===null?n(N):N===45?(e.consume(N),x):$e(N)?(l=p,J(N)):(e.consume(N),p)}function x(N){return N===45?(e.consume(N),g):p(N)}function g(N){return N===62?Q(N):N===45?x(N):p(N)}function C(N){const L="CDATA[";return N===L.charCodeAt(a++)?(e.consume(N),a===L.length?k:C):n(N)}function k(N){return N===null?n(N):N===93?(e.consume(N),S):$e(N)?(l=k,J(N)):(e.consume(N),k)}function S(N){return N===93?(e.consume(N),E):k(N)}function E(N){return N===62?Q(N):N===93?(e.consume(N),E):k(N)}function _(N){return N===null||N===62?Q(N):$e(N)?(l=_,J(N)):(e.consume(N),_)}function P(N){return N===null?n(N):N===63?(e.consume(N),R):$e(N)?(l=P,J(N)):(e.consume(N),P)}function R(N){return N===62?Q(N):P(N)}function A(N){return En(N)?(e.consume(N),j):n(N)}function j(N){return N===45||fn(N)?(e.consume(N),j):F(N)}function F(N){return $e(N)?(l=F,J(N)):Ke(N)?(e.consume(N),F):Q(N)}function Z(N){return N===45||fn(N)?(e.consume(N),Z):N===47||N===62||ht(N)?re(N):n(N)}function re(N){return N===47?(e.consume(N),Q):N===58||N===95||En(N)?(e.consume(N),O):$e(N)?(l=re,J(N)):Ke(N)?(e.consume(N),re):Q(N)}function O(N){return N===45||N===46||N===58||N===95||fn(N)?(e.consume(N),O):Y(N)}function Y(N){return N===61?(e.consume(N),M):$e(N)?(l=Y,J(N)):Ke(N)?(e.consume(N),Y):re(N)}function M(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),o=N,ne):$e(N)?(l=M,J(N)):Ke(N)?(e.consume(N),M):(e.consume(N),W)}function ne(N){return N===o?(e.consume(N),o=void 0,U):N===null?n(N):$e(N)?(l=ne,J(N)):(e.consume(N),ne)}function W(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ht(N)?re(N):(e.consume(N),W)}function U(N){return N===47||N===62||ht(N)?re(N):n(N)}function Q(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function J(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),D}function D(N){return Ke(N)?Xe(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):G(N)}function G(N){return e.enter("htmlTextData"),l(N)}}const Eg={name:"labelEnd",resolveAll:$6,resolveTo:V6,tokenize:B6},M6={tokenize:U6},L6={tokenize:H6},F6={tokenize:W6};function $6(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&er(e,0,e.length,n),e}function V6(e,t){let n=e.length,r=0,o,a,l,u;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",f,t]],u=cr(u,e.slice(a+1,a+r+3)),u=cr(u,[["enter",h,t]]),u=cr(u,$d(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),u=cr(u,[["exit",h,t],e[l-2],e[l-1],["exit",f,t]]),u=cr(u,e.slice(l+1)),u=cr(u,[["exit",d,t]]),er(e,a,e.length,u),e}function B6(e,t,n){const r=this;let o=r.events.length,a,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return u;function u(x){return a?a._inactive?p(x):(l=r.parser.defined.includes(Or(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(M6,h,l?h:p)(x):x===91?e.attempt(L6,h,l?f:p)(x):l?h(x):p(x)}function f(x){return e.attempt(F6,h,p)(x)}function h(x){return t(x)}function p(x){return a._balanced=!0,n(x)}}function U6(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return ht(p)?dl(e,a)(p):a(p)}function a(p){return p===41?h(p):rE(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return ht(p)?dl(e,d)(p):h(p)}function u(p){return n(p)}function d(p){return p===34||p===39||p===40?oE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return ht(p)?dl(e,h)(p):h(p)}function h(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function H6(e,t,n){const r=this;return o;function o(u){return iE.call(r,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function W6(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Z6={name:"labelStartImage",resolveAll:Eg.resolveAll,tokenize:q6};function q6(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Q6={name:"labelStartLink",resolveAll:Eg.resolveAll,tokenize:Y6};function Y6(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const tp={name:"lineEnding",tokenize:K6};function K6(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const Tc={name:"thematicBreak",tokenize:G6};function G6(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),l(f)}function l(f){return o=f,u(f)}function u(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||$e(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ke(f)?Xe(e,u,"whitespace")(f):u(f))}}const Mn={continuation:{tokenize:tV},exit:rV,name:"list",tokenize:eV},X6={partial:!0,tokenize:iV},J6={partial:!0,tokenize:nV};function eV(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return u;function u(g){const C=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:rm(g)){if(r.containerState.type||(r.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Tc,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(g)}return n(g)}function d(g){return rm(g)&&++l<10?(e.consume(g),d):(!r.interrupt||l<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Vl,r.interrupt?n:h,e.attempt(X6,x,p))}function h(g){return r.containerState.initialBlankLine=!0,a++,x(g)}function p(g){return Ke(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),x):n(g)}function x(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function tV(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Vl,o,a);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Ke(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(J6,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(Mn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function nV(e,t,n){const r=this;return Xe(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function rV(e){e.exit(this.containerState.type)}function iV(e,t,n){const r=this;return Xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!Ke(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const F0={name:"setextUnderline",resolveTo:oV,tokenize:sV};function oV(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function sV(e,t,n){const r=this;let o;return a;function a(f){let h=r.events.length,p;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){p=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===o?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),Ke(f)?Xe(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||$e(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const aV={tokenize:lV};function lV(e){const t=this,n=e.attempt(Vl,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(h6,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const uV={resolveAll:aE()},cV=sE("string"),dV=sE("text");function sE(e){return{resolveAll:aE(e==="text"?fV:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,u);return l;function l(h){return f(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const p=o[h];let x=-1;if(p)for(;++x<p.length;){const g=p[x];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function aE(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function fV(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,l=-1,u=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(f===-2)d=!0,u++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const hV={42:Mn,43:Mn,45:Mn,48:Mn,49:Mn,50:Mn,51:Mn,52:Mn,53:Mn,54:Mn,55:Mn,56:Mn,57:Mn,62:JC},pV={91:v6},mV={[-2]:ep,[-1]:ep,32:ep},gV={35:C6,42:Tc,45:[F0,Tc],60:P6,61:F0,95:Tc,96:M0,126:M0},yV={38:tE,92:eE},vV={[-5]:tp,[-4]:tp,[-3]:tp,33:Z6,38:tE,42:im,60:[Q5,D6],91:Q6,92:[k6,eE],93:Eg,95:im,96:a6},xV={null:[im,uV]},wV={null:[42,95]},bV={null:[]},kV=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:wV,contentInitial:pV,disable:bV,document:hV,flow:gV,flowInitial:mV,insideSpan:xV,string:yV,text:vV},Symbol.toStringTag,{value:"Module"}));function SV(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let l=[],u=[];const d={attempt:F(A),check:F(j),consume:_,enter:P,exit:R,interrupt:F(j,{interrupt:!0})},f={code:null,containerState:{},defineSkip:k,events:[],now:C,parser:e,previous:null,sliceSerialize:x,sliceStream:g,write:p};let h=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function p(Y){return l=cr(l,Y),S(),l[l.length-1]!==null?[]:(Z(t,0),f.events=$d(a,f.events,f),f.events)}function x(Y,M){return EV(g(Y),M)}function g(Y){return CV(l,Y)}function C(){const{_bufferIndex:Y,_index:M,line:ne,column:W,offset:U}=r;return{_bufferIndex:Y,_index:M,line:ne,column:W,offset:U}}function k(Y){o[Y.line]=Y.column,O()}function S(){let Y;for(;r._index<l.length;){const M=l[r._index];if(typeof M=="string")for(Y=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Y&&r._bufferIndex<M.length;)E(M.charCodeAt(r._bufferIndex));else E(M)}}function E(Y){h=h(Y)}function _(Y){$e(Y)?(r.line++,r.column=1,r.offset+=Y===-3?2:1,O()):Y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=Y}function P(Y,M){const ne=M||{};return ne.type=Y,ne.start=C(),f.events.push(["enter",ne,f]),u.push(ne),ne}function R(Y){const M=u.pop();return M.end=C(),f.events.push(["exit",M,f]),M}function A(Y,M){Z(Y,M.from)}function j(Y,M){M.restore()}function F(Y,M){return ne;function ne(W,U,Q){let J,D,G,N;return Array.isArray(W)?K(W):"tokenize"in W?K([W]):L(W);function L(xe){return ie;function ie(me){const Se=me!==null&&xe[me],be=me!==null&&xe.null,Ae=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(be)?be:be?[be]:[]];return K(Ae)(me)}}function K(xe){return J=xe,D=0,xe.length===0?Q:I(xe[D])}function I(xe){return ie;function ie(me){return N=re(),G=xe,xe.partial||(f.currentConstruct=xe),xe.name&&f.parser.constructs.disable.null.includes(xe.name)?ve():xe.tokenize.call(M?Object.assign(Object.create(f),M):f,d,ue,ve)(me)}}function ue(xe){return Y(G,N),U}function ve(xe){return N.restore(),++D<J.length?I(J[D]):Q}}}function Z(Y,M){Y.resolveAll&&!a.includes(Y)&&a.push(Y),Y.resolve&&er(f.events,M,f.events.length-M,Y.resolve(f.events.slice(M),f)),Y.resolveTo&&(f.events=Y.resolveTo(f.events,f))}function re(){const Y=C(),M=f.previous,ne=f.currentConstruct,W=f.events.length,U=Array.from(u);return{from:W,restore:Q};function Q(){r=Y,f.previous=M,f.currentConstruct=ne,f.events.length=W,u=U,O()}}function O(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function CV(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function EV(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
316
316
|
`;break}case-3:{l=`\r
|
|
317
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(a)}o=a===-2,r.push(l)}return r.join("")}function _V(e){const r={constructs:XC([kV,...(e||{}).extensions||[]]),content:o(V5),defined:[],document:o(U5),flow:o(aV),lazy:{},string:o(cV),text:o(dV)};return r;function o(a){return l;function l(u){return SV(r,a,u)}}}function TV(e){for(;!rE(e););return e}const V0=/[\0\t\n\r]/g;function PV(){let e=1,t="",n=!0,r;return o;function o(a,l,u){const d=[];let f,h,p,x,g;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if(V0.lastIndex=p,f=V0.exec(a),x=f&&f.index!==void 0?f.index:a.length,g=a.charCodeAt(x),!f){t=a.slice(p);break}if(g===10&&p===x&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<x&&(d.push(a.slice(p,x)),e+=x-p),g){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=x+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const NV=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jV(e){return e.replace(NV,RV)}function RV(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return JC(n.slice(a?2:1),a?16:10)}return Eg(n)||e}const uE={}.hasOwnProperty;function IV(e,t,n){return typeof t!="string"&&(n=t,t=void 0),AV(n)(TV(_V(n).document().write(PV()(e,t,!0))))}function AV(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_n),autolinkProtocol:re,autolinkEmail:re,atxHeading:a(sn),blockQuote:a(be),characterEscape:re,characterReference:re,codeFenced:a(Ae),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Ae,l),codeText:a(Ve,l),codeTextData:re,data:re,codeFlowValue:re,definition:a(nt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(It),hardBreakEscape:a(Gt),hardBreakTrailing:a(Gt),htmlFlow:a(an,l),htmlFlowData:re,htmlText:a(an,l),htmlTextData:re,image:a(tr),label:l,link:a(_n),listItem:a($),listItemValue:x,listOrdered:a(Tn,p),listUnordered:a(Tn),paragraph:a(ee),reference:I,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(sn),strong:a(ae),thematicBreak:a(ye)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:Se,autolinkProtocol:me,blockQuote:d(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:xe,characterReference:ie,codeFenced:d(S),codeFencedFence:k,codeFencedFenceInfo:g,codeFencedFenceMeta:C,codeFlowValue:O,codeIndented:d(E),codeText:d(U),codeTextData:O,data:O,definition:d(),definitionDestinationString:R,definitionLabelString:_,definitionTitleString:P,emphasis:d(),hardBreakEscape:d(M),hardBreakTrailing:d(M),htmlFlow:d(ne),htmlFlowData:O,htmlText:d(W),htmlTextData:O,image:d(J),label:G,labelText:D,lineEnding:Y,link:d(Q),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:N,resourceTitleString:L,resource:K,setextHeading:d(Z),setextHeadingLineSequence:F,setextHeadingText:j,strong:d(),thematicBreak:d()}};cE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let se={type:"root",children:[]};const we={stack:[se],tokenStack:[],config:t,enter:u,exit:f,buffer:l,resume:h,data:n},_e=[];let ze=-1;for(;++ze<B.length;)if(B[ze][1].type==="listOrdered"||B[ze][1].type==="listUnordered")if(B[ze][0]==="enter")_e.push(ze);else{const dt=_e.pop();ze=o(B,dt,ze)}for(ze=-1;++ze<B.length;){const dt=t[B[ze][0]];uE.call(dt,B[ze][1].type)&&dt[B[ze][1].type].call(Object.assign({sliceSerialize:B[ze][2].sliceSerialize},we),B[ze][1])}if(we.tokenStack.length>0){const dt=we.tokenStack[we.tokenStack.length-1];(dt[1]||B0).call(we,void 0,dt[0])}for(se.position={start:Yi(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Yi(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze<t.transforms.length;)se=t.transforms[ze](se)||se;return se}function o(B,se,we){let _e=se-1,ze=-1,dt=!1,Nt,Zt,$t,Pn;for(;++_e<=we;){const pt=B[_e];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?ze++:ze--,Pn=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(Nt&&!Pn&&!ze&&!$t&&($t=_e),Pn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pn=void 0}if(!ze&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||ze===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(Nt){let pn=_e;for(Zt=void 0;pn--;){const Xt=B[pn];if(Xt[1].type==="lineEnding"||Xt[1].type==="lineEndingBlank"){if(Xt[0]==="exit")continue;Zt&&(B[Zt][1].type="lineEndingBlank",dt=!0),Xt[1].type="lineEnding",Zt=pn}else if(!(Xt[1].type==="linePrefix"||Xt[1].type==="blockQuotePrefix"||Xt[1].type==="blockQuotePrefixWhitespace"||Xt[1].type==="blockQuoteMarker"||Xt[1].type==="listItemIndent"))break}$t&&(!Zt||$t<Zt)&&(Nt._spread=!0),Nt.end=Object.assign({},Zt?B[Zt][1].start:pt[1].end),B.splice(Zt||_e,0,["exit",Nt,pt[2]]),_e++,we++}if(pt[1].type==="listItemPrefix"){const pn={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};Nt=pn,B.splice(_e,0,["enter",pn,pt[2]]),_e++,we++,$t=void 0,Pn=!0}}}return B[se][1]._spread=dt,we}function a(B,se){return we;function we(_e){u.call(this,B(_e),_e),se&&se.call(this,_e)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(B,se,we){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([se,we||void 0]),B.position={start:Yi(se.start),end:void 0}}function d(B){return se;function se(we){B&&B.call(this,we),f.call(this,we)}}function f(B,se){const we=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==B.type&&(se?se.call(this,B,_e[0]):(_e[1]||B0).call(this,B,_e[0]));else throw new Error("Cannot close `"+B.type+"` ("+cl({start:B.start,end:B.end})+"): it’s not open");we.position.end=Yi(B.end)}function h(){return Cg(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x(B){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function g(){const B=this.resume(),se=this.stack[this.stack.length-1];se.lang=B}function C(){const B=this.resume(),se=this.stack[this.stack.length-1];se.meta=B}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B.replace(/(\r?\n|\r)$/g,"")}function _(B){const se=this.resume(),we=this.stack[this.stack.length-1];we.label=se,we.identifier=Or(this.sliceSerialize(B)).toLowerCase()}function P(){const B=this.resume(),se=this.stack[this.stack.length-1];se.title=B}function R(){const B=this.resume(),se=this.stack[this.stack.length-1];se.url=B}function A(B){const se=this.stack[this.stack.length-1];if(!se.depth){const we=this.sliceSerialize(B).length;se.depth=we}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function F(B){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function re(B){const we=this.stack[this.stack.length-1].children;let _e=we[we.length-1];(!_e||_e.type!=="text")&&(_e=ke(),_e.position={start:Yi(B.start),end:void 0},we.push(_e)),this.stack.push(_e)}function O(B){const se=this.stack.pop();se.value+=this.sliceSerialize(B),se.position.end=Yi(B.end)}function Y(B){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=se.children[se.children.length-1];we.position.end=Yi(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(re.call(this,B),O.call(this,B))}function M(){this.data.atHardBreak=!0}function ne(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B}function W(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B}function U(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B}function Q(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=se,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function J(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=se,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function D(B){const se=this.sliceSerialize(B),we=this.stack[this.stack.length-2];we.label=jV(se),we.identifier=Or(se).toLowerCase()}function G(){const B=this.stack[this.stack.length-1],se=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const _e=B.children;we.children=_e}else we.alt=se}function N(){const B=this.resume(),se=this.stack[this.stack.length-1];se.url=B}function L(){const B=this.resume(),se=this.stack[this.stack.length-1];se.title=B}function K(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ue(B){const se=this.resume(),we=this.stack[this.stack.length-1];we.label=se,we.identifier=Or(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ve(B){this.data.characterReferenceType=B.type}function xe(B){const se=this.sliceSerialize(B),we=this.data.characterReferenceType;let _e;we?(_e=JC(se,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=Eg(se);const ze=this.stack[this.stack.length-1];ze.value+=_e}function ie(B){const se=this.stack.pop();se.position.end=Yi(B.end)}function me(B){O.call(this,B);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(B)}function Se(B){O.call(this,B);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(B)}function be(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function Ve(){return{type:"inlineCode",value:""}}function nt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function It(){return{type:"emphasis",children:[]}}function sn(){return{type:"heading",depth:0,children:[]}}function Gt(){return{type:"break"}}function an(){return{type:"html",value:""}}function tr(){return{type:"image",title:null,url:"",alt:null}}function _n(){return{type:"link",title:null,url:"",children:[]}}function Tn(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function $(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function ee(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function ke(){return{type:"text",value:""}}function ye(){return{type:"thematicBreak"}}}function Yi(e){return{line:e.line,column:e.column,offset:e.offset}}function cE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?cE(e,r):OV(e,r)}}function OV(e,t){let n;for(n in t)if(uE.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 B0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+cl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+cl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+cl({start:t.start,end:t.end})+") is still open")}function DV(e){const t=this;t.parser=n;function n(r){return IV(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zV(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 MV(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
317
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(a)}o=a===-2,r.push(l)}return r.join("")}function _V(e){const r={constructs:GC([kV,...(e||{}).extensions||[]]),content:o(V5),defined:[],document:o(U5),flow:o(aV),lazy:{},string:o(cV),text:o(dV)};return r;function o(a){return l;function l(u){return SV(r,a,u)}}}function TV(e){for(;!nE(e););return e}const $0=/[\0\t\n\r]/g;function PV(){let e=1,t="",n=!0,r;return o;function o(a,l,u){const d=[];let f,h,p,x,g;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if($0.lastIndex=p,f=$0.exec(a),x=f&&f.index!==void 0?f.index:a.length,g=a.charCodeAt(x),!f){t=a.slice(p);break}if(g===10&&p===x&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<x&&(d.push(a.slice(p,x)),e+=x-p),g){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=x+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const NV=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jV(e){return e.replace(NV,RV)}function RV(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return XC(n.slice(a?2:1),a?16:10)}return Cg(n)||e}const lE={}.hasOwnProperty;function IV(e,t,n){return typeof t!="string"&&(n=t,t=void 0),AV(n)(TV(_V(n).document().write(PV()(e,t,!0))))}function AV(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_n),autolinkProtocol:re,autolinkEmail:re,atxHeading:a(sn),blockQuote:a(be),characterEscape:re,characterReference:re,codeFenced:a(Ae),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Ae,l),codeText:a(Ve,l),codeTextData:re,data:re,codeFlowValue:re,definition:a(nt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(It),hardBreakEscape:a(Gt),hardBreakTrailing:a(Gt),htmlFlow:a(an,l),htmlFlowData:re,htmlText:a(an,l),htmlTextData:re,image:a(tr),label:l,link:a(_n),listItem:a($),listItemValue:x,listOrdered:a(Tn,p),listUnordered:a(Tn),paragraph:a(ee),reference:I,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(sn),strong:a(ae),thematicBreak:a(ye)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:Se,autolinkProtocol:me,blockQuote:d(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:xe,characterReference:ie,codeFenced:d(S),codeFencedFence:k,codeFencedFenceInfo:g,codeFencedFenceMeta:C,codeFlowValue:O,codeIndented:d(E),codeText:d(U),codeTextData:O,data:O,definition:d(),definitionDestinationString:R,definitionLabelString:_,definitionTitleString:P,emphasis:d(),hardBreakEscape:d(M),hardBreakTrailing:d(M),htmlFlow:d(ne),htmlFlowData:O,htmlText:d(W),htmlTextData:O,image:d(J),label:G,labelText:D,lineEnding:Y,link:d(Q),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:N,resourceTitleString:L,resource:K,setextHeading:d(Z),setextHeadingLineSequence:F,setextHeadingText:j,strong:d(),thematicBreak:d()}};uE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let se={type:"root",children:[]};const we={stack:[se],tokenStack:[],config:t,enter:u,exit:f,buffer:l,resume:h,data:n},_e=[];let ze=-1;for(;++ze<B.length;)if(B[ze][1].type==="listOrdered"||B[ze][1].type==="listUnordered")if(B[ze][0]==="enter")_e.push(ze);else{const dt=_e.pop();ze=o(B,dt,ze)}for(ze=-1;++ze<B.length;){const dt=t[B[ze][0]];lE.call(dt,B[ze][1].type)&&dt[B[ze][1].type].call(Object.assign({sliceSerialize:B[ze][2].sliceSerialize},we),B[ze][1])}if(we.tokenStack.length>0){const dt=we.tokenStack[we.tokenStack.length-1];(dt[1]||V0).call(we,void 0,dt[0])}for(se.position={start:Yi(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Yi(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze<t.transforms.length;)se=t.transforms[ze](se)||se;return se}function o(B,se,we){let _e=se-1,ze=-1,dt=!1,Nt,Zt,$t,Pn;for(;++_e<=we;){const pt=B[_e];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?ze++:ze--,Pn=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(Nt&&!Pn&&!ze&&!$t&&($t=_e),Pn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pn=void 0}if(!ze&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||ze===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(Nt){let pn=_e;for(Zt=void 0;pn--;){const Xt=B[pn];if(Xt[1].type==="lineEnding"||Xt[1].type==="lineEndingBlank"){if(Xt[0]==="exit")continue;Zt&&(B[Zt][1].type="lineEndingBlank",dt=!0),Xt[1].type="lineEnding",Zt=pn}else if(!(Xt[1].type==="linePrefix"||Xt[1].type==="blockQuotePrefix"||Xt[1].type==="blockQuotePrefixWhitespace"||Xt[1].type==="blockQuoteMarker"||Xt[1].type==="listItemIndent"))break}$t&&(!Zt||$t<Zt)&&(Nt._spread=!0),Nt.end=Object.assign({},Zt?B[Zt][1].start:pt[1].end),B.splice(Zt||_e,0,["exit",Nt,pt[2]]),_e++,we++}if(pt[1].type==="listItemPrefix"){const pn={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};Nt=pn,B.splice(_e,0,["enter",pn,pt[2]]),_e++,we++,$t=void 0,Pn=!0}}}return B[se][1]._spread=dt,we}function a(B,se){return we;function we(_e){u.call(this,B(_e),_e),se&&se.call(this,_e)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(B,se,we){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([se,we||void 0]),B.position={start:Yi(se.start),end:void 0}}function d(B){return se;function se(we){B&&B.call(this,we),f.call(this,we)}}function f(B,se){const we=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==B.type&&(se?se.call(this,B,_e[0]):(_e[1]||V0).call(this,B,_e[0]));else throw new Error("Cannot close `"+B.type+"` ("+cl({start:B.start,end:B.end})+"): it’s not open");we.position.end=Yi(B.end)}function h(){return Sg(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x(B){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function g(){const B=this.resume(),se=this.stack[this.stack.length-1];se.lang=B}function C(){const B=this.resume(),se=this.stack[this.stack.length-1];se.meta=B}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B.replace(/(\r?\n|\r)$/g,"")}function _(B){const se=this.resume(),we=this.stack[this.stack.length-1];we.label=se,we.identifier=Or(this.sliceSerialize(B)).toLowerCase()}function P(){const B=this.resume(),se=this.stack[this.stack.length-1];se.title=B}function R(){const B=this.resume(),se=this.stack[this.stack.length-1];se.url=B}function A(B){const se=this.stack[this.stack.length-1];if(!se.depth){const we=this.sliceSerialize(B).length;se.depth=we}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function F(B){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function re(B){const we=this.stack[this.stack.length-1].children;let _e=we[we.length-1];(!_e||_e.type!=="text")&&(_e=ke(),_e.position={start:Yi(B.start),end:void 0},we.push(_e)),this.stack.push(_e)}function O(B){const se=this.stack.pop();se.value+=this.sliceSerialize(B),se.position.end=Yi(B.end)}function Y(B){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=se.children[se.children.length-1];we.position.end=Yi(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(re.call(this,B),O.call(this,B))}function M(){this.data.atHardBreak=!0}function ne(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B}function W(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B}function U(){const B=this.resume(),se=this.stack[this.stack.length-1];se.value=B}function Q(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=se,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function J(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=se,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function D(B){const se=this.sliceSerialize(B),we=this.stack[this.stack.length-2];we.label=jV(se),we.identifier=Or(se).toLowerCase()}function G(){const B=this.stack[this.stack.length-1],se=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const _e=B.children;we.children=_e}else we.alt=se}function N(){const B=this.resume(),se=this.stack[this.stack.length-1];se.url=B}function L(){const B=this.resume(),se=this.stack[this.stack.length-1];se.title=B}function K(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ue(B){const se=this.resume(),we=this.stack[this.stack.length-1];we.label=se,we.identifier=Or(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ve(B){this.data.characterReferenceType=B.type}function xe(B){const se=this.sliceSerialize(B),we=this.data.characterReferenceType;let _e;we?(_e=XC(se,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=Cg(se);const ze=this.stack[this.stack.length-1];ze.value+=_e}function ie(B){const se=this.stack.pop();se.position.end=Yi(B.end)}function me(B){O.call(this,B);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(B)}function Se(B){O.call(this,B);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(B)}function be(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function Ve(){return{type:"inlineCode",value:""}}function nt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function It(){return{type:"emphasis",children:[]}}function sn(){return{type:"heading",depth:0,children:[]}}function Gt(){return{type:"break"}}function an(){return{type:"html",value:""}}function tr(){return{type:"image",title:null,url:"",alt:null}}function _n(){return{type:"link",title:null,url:"",children:[]}}function Tn(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function $(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function ee(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function ke(){return{type:"text",value:""}}function ye(){return{type:"thematicBreak"}}}function Yi(e){return{line:e.line,column:e.column,offset:e.offset}}function uE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?uE(e,r):OV(e,r)}}function OV(e,t){let n;for(n in t)if(lE.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 V0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+cl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+cl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+cl({start:t.start,end:t.end})+") is still open")}function DV(e){const t=this;t.parser=n;function n(r){return IV(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zV(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 MV(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
318
318
|
`}]}function LV(e,t){const n=t.value?t.value+`
|
|
319
|
-
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function FV(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $V(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VV(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=ga(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function BV(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 UV(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function
|
|
319
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function FV(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $V(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VV(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=ga(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function BV(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 UV(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function cE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function HV(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cE(e,t);const o={src:ga(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function WV(e,t){const n={src:ga(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 ZV(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 qV(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cE(e,t);const o={href:ga(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function QV(e,t){const n={href:ga(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 YV(e,t,n){const r=e.all(t),o=n?KV(n):dE(t),a={},l=[];if(typeof t.checked=="boolean"){const h=r[0];let p;h&&h.type==="element"&&h.tagName==="p"?p=h:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(o||u!==0||h.type!=="element"||h.tagName!=="p")&&l.push({type:"text",value:`
|
|
320
320
|
`}),h.type==="element"&&h.tagName==="p"&&!o?l.push(...h.children):l.push(h)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
321
|
-
`});const f={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,f),e.applyData(t,f)}function KV(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=
|
|
321
|
+
`});const f={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,f),e.applyData(t,f)}function KV(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=dE(n[r])}return t}function dE(e){const t=e.spread;return t??e.children.length>1}function GV(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function XV(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JV(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function eB(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tB(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=xg(t.children[1]),d=HC(t.children[t.children.length-1]);u&&d&&(l.position={start:u,end:d}),o.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function nB(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<u;){const p=t.children[d],x={},g=l?l[d]:void 0;g&&(x.align=g);let C={type:"element",tagName:a,properties:x,children:[]};p&&(C.children=e.all(p),e.patch(p,C),C=e.applyData(p,C)),f.push(C)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function rB(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const B0=9,U0=32;function iB(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(H0(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(H0(t.slice(o),o>0,!1)),a.join("")}function H0(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===B0||a===U0;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===B0||a===U0;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function oB(e,t){const n={type:"text",value:iB(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sB(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const aB={blockquote:zV,break:MV,code:LV,delete:FV,emphasis:$V,footnoteReference:VV,heading:BV,html:UV,imageReference:HV,image:WV,inlineCode:ZV,linkReference:qV,link:QV,listItem:YV,list:GV,paragraph:XV,root:JV,strong:eB,table:tB,tableCell:rB,tableRow:nB,text:oB,thematicBreak:sB,toml:pc,yaml:pc,definition:pc,footnoteDefinition:pc};function pc(){}const fE=-1,Vd=0,fl=1,ed=2,_g=3,Tg=4,Pg=5,Ng=6,hE=7,pE=8,W0=typeof self=="object"?self:globalThis,lB=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,l]=t[o];switch(a){case Vd:case fE:return n(l,o);case fl:{const u=n([],o);for(const d of l)u.push(r(d));return u}case ed:{const u=n({},o);for(const[d,f]of l)u[r(d)]=r(f);return u}case _g:return n(new Date(l),o);case Tg:{const{source:u,flags:d}=l;return n(new RegExp(u,d),o)}case Pg:{const u=n(new Map,o);for(const[d,f]of l)u.set(r(d),r(f));return u}case Ng:{const u=n(new Set,o);for(const d of l)u.add(r(d));return u}case hE:{const{name:u,message:d}=l;return n(new W0[u](d),o)}case pE:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(new W0[a](l),o)};return r},Z0=e=>lB(new Map,e)(0),Is="",{toString:uB}={},{keys:cB}=Object,il=e=>{const t=typeof e;if(t!=="object"||!e)return[Vd,t];const n=uB.call(e).slice(8,-1);switch(n){case"Array":return[fl,Is];case"Object":return[ed,Is];case"Date":return[_g,Is];case"RegExp":return[Tg,Is];case"Map":return[Pg,Is];case"Set":return[Ng,Is];case"DataView":return[fl,n]}return n.includes("Array")?[fl,n]:n.includes("Error")?[hE,n]:[ed,n]},mc=([e,t])=>e===Vd&&(t==="function"||t==="symbol"),dB=(e,t,n,r)=>{const o=(l,u)=>{const d=r.push(l)-1;return n.set(u,d),d},a=l=>{if(n.has(l))return n.get(l);let[u,d]=il(l);switch(u){case Vd:{let h=l;switch(d){case"bigint":u=pE,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return o([fE],l)}return o([u,h],l)}case fl:{if(d){let x=l;return d==="DataView"?x=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(l)),o([d,[...x]],l)}const h=[],p=o([u,h],l);for(const x of l)h.push(a(x));return p}case ed:{if(d)switch(d){case"BigInt":return o([d,l.toString()],l);case"Boolean":case"Number":case"String":return o([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],p=o([u,h],l);for(const x of cB(l))(e||!mc(il(l[x])))&&h.push([a(x),a(l[x])]);return p}case _g:return o([u,l.toISOString()],l);case Tg:{const{source:h,flags:p}=l;return o([u,{source:h,flags:p}],l)}case Pg:{const h=[],p=o([u,h],l);for(const[x,g]of l)(e||!(mc(il(x))||mc(il(g))))&&h.push([a(x),a(g)]);return p}case Ng:{const h=[],p=o([u,h],l);for(const x of l)(e||!mc(il(x)))&&h.push(a(x));return p}}const{message:f}=l;return o([u,{name:d,message:f}],l)};return a},q0=(e,{json:t,lossy:n}={})=>{const r=[];return dB(!(t||n),!!t,new Map,r)(e),r},td=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Z0(q0(e,t)):structuredClone(e):(e,t)=>Z0(q0(e,t));function fB(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 hB(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function pB(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||fB,r=e.options.footnoteBackLabel||hB,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const h=e.all(f),p=String(f.identifier).toUpperCase(),x=ga(p.toLowerCase());let g=0;const C=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++g<=k;){C.length>0&&C.push({type:"text",value:" "});let _=typeof n=="string"?n:n(d,g);typeof _=="string"&&(_={type:"text",value:_}),C.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,g),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const S=h[h.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const _=S.children[S.children.length-1];_&&_.type==="text"?_.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...C)}else h.push(...C);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(h,!0)};e.patch(f,E),u.push(E)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...td(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
322
322
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
323
|
-
`}]}}const Bd=(function(e){if(e==null)return vB;if(typeof e=="function")return Ud(e);if(typeof e=="object")return Array.isArray(e)?mB(e):gB(e);if(typeof e=="string")return yB(e);throw new Error("Expected function, string, or object as test")});function mB(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Bd(e[n]);return Ud(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function gB(e){const t=e;return Ud(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function yB(e){return Ud(t);function t(n){return n&&n.type===e}}function Ud(e){return t;function t(n,r,o){return!!(xB(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function vB(){return!0}function xB(e){return e!==null&&typeof e=="object"&&"type"in e}const
|
|
323
|
+
`}]}}const Bd=(function(e){if(e==null)return vB;if(typeof e=="function")return Ud(e);if(typeof e=="object")return Array.isArray(e)?mB(e):gB(e);if(typeof e=="string")return yB(e);throw new Error("Expected function, string, or object as test")});function mB(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Bd(e[n]);return Ud(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function gB(e){const t=e;return Ud(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function yB(e){return Ud(t);function t(n){return n&&n.type===e}}function Ud(e){return t;function t(n,r,o){return!!(xB(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function vB(){return!0}function xB(e){return e!==null&&typeof e=="object"&&"type"in e}const mE=[],wB=!0,om=!1,bB="skip";function gE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Bd(o),l=r?-1:1;u(e,void 0,[])();function u(d,f,h){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const g=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(g?"<"+g+">":""))+")"})}return x;function x(){let g=mE,C,k,S;if((!t||a(d,f,h[h.length-1]||void 0))&&(g=kB(n(d,h)),g[0]===om))return g;if("children"in d&&d.children){const E=d;if(E.children&&g[0]!==bB)for(k=(r?E.children.length:-1)+l,S=h.concat(E);k>-1&&k<E.children.length;){const _=E.children[k];if(C=u(_,k,S)(),C[0]===om)return C;k=typeof C[1]=="number"?C[1]:k+l}}return g}}}function kB(e){return Array.isArray(e)?e:typeof e=="number"?[wB,e]:e==null?mE:[e]}function jg(e,t,n,r){let o,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,o=n):(a=t,l=n,o=r),gE(e,a,u,o);function u(d,f){const h=f[f.length-1],p=h?h.children.indexOf(d):void 0;return l(d,p,h)}}const sm={}.hasOwnProperty,SB={};function CB(e,t){const n=t||SB,r=new Map,o=new Map,a=new Map,l={...aB,...n.handlers},u={all:f,applyData:_B,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:EB,wrap:PB};return jg(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const p=h.type==="definition"?r:o,x=String(h.identifier).toUpperCase();p.has(x)||p.set(x,h)}}),u;function d(h,p){const x=h.type,g=u.handlers[x];if(sm.call(u.handlers,x)&&g)return g(u,h,p);if(u.options.passThrough&&u.options.passThrough.includes(x)){if("children"in h){const{children:k,...S}=h,E=td(S);return E.children=u.all(h),E}return td(h)}return(u.options.unknownHandler||TB)(u,h,p)}function f(h){const p=[];if("children"in h){const x=h.children;let g=-1;for(;++g<x.length;){const C=u.one(x[g],h);if(C){if(g&&x[g-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=Q0(C.value)),!Array.isArray(C)&&C.type==="element")){const k=C.children[0];k&&k.type==="text"&&(k.value=Q0(k.value))}Array.isArray(C)?p.push(...C):p.push(C)}}}return p}}function EB(e,t){e.position&&(t.position=h5(e))}function _B(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,td(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function TB(e,t){const n=t.data||{},r="value"in t&&!(sm.call(n,"hProperties")||sm.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 PB(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
324
324
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
325
325
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
326
|
-
`}),n}function
|
|
327
|
-
`},o),a}function NB(e,t){return e&&"run"in e?async function(n,r){const o=K0(n,{file:r,...t});await e.run(o,r)}:function(n,r){return K0(n,{file:r,...e||t})}}function G0(e){if(e)throw e}var np,X0;function jB(){if(X0)return np;X0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!p)return!1;var x;for(x in f);return typeof x>"u"||e.call(f,x)},l=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},u=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return np=function d(){var f,h,p,x,g,C,k=arguments[0],S=1,E=arguments.length,_=!1;for(typeof k=="boolean"&&(_=k,k=arguments[1]||{},S=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});S<E;++S)if(f=arguments[S],f!=null)for(h in f)p=u(k,h),x=u(f,h),k!==x&&(_&&x&&(a(x)||(g=o(x)))?(g?(g=!1,C=p&&o(p)?p:[]):C=p&&a(p)?p:{},l(k,{name:h,newValue:d(_,C,x)})):typeof x<"u"&&l(k,{name:h,newValue:x}));return k},np}var RB=jB();const rp=Jo(RB);function am(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 IB(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...o);function u(d,...f){const h=e[++a];let p=-1;if(d){l(d);return}for(;++p<o.length;)(f[p]===null||f[p]===void 0)&&(f[p]=o[p]);o=f,h?AB(h,u)(...f):l(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function AB(e,t){let n;return r;function r(...l){const u=e.length>l.length;let d;u&&l.push(o);try{d=e.apply(this,l)}catch(f){const h=f;if(u&&n)throw h;return o(h)}u||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(l,...u){n||(n=!0,t(l,...u))}function a(l){o(null,l)}}const Zr={basename:OB,dirname:DB,extname:zB,join:MB,sep:"/"};function OB(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Bl(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else l<0&&(a=!0,l=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(r=o):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function DB(e){if(Bl(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 zB(e){Bl(e);let t=e.length,n=-1,r=0,o=-1,a=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function MB(...e){let t=-1,n;for(;++t<e.length;)Bl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":LB(n)}function LB(e){Bl(e);const t=e.codePointAt(0)===47;let n=FB(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function FB(e,t){let n="",r=0,o=-1,a=0,l=-1,u,d;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(o===l-1||a===1))if(o!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=l,a=0;continue}}else if(n.length>0){n="",r=0,o=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,a=0}else u===46&&a>-1?a++:a=-1}return n}function Bl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $B={cwd:VB};function VB(){return"/"}function lm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function BB(e){if(typeof e=="string")e=new URL(e);else if(!lm(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 UB(e)}function UB(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ip=["history","path","basename","stem","extname","dirname"];class vE{constructor(t){let n;t?lm(t)?n={path:t}:typeof t=="string"||HB(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$B.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ip.length;){const a=ip[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)ip.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Zr.basename(this.path):void 0}set basename(t){sp(t,"basename"),op(t,"basename"),this.path=Zr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Zr.dirname(this.path):void 0}set dirname(t){J0(this.basename,"dirname"),this.path=Zr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Zr.extname(this.path):void 0}set extname(t){if(op(t,"extname"),J0(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=Zr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){lm(t)&&(t=BB(t)),sp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Zr.basename(this.path,this.extname):void 0}set stem(t){sp(t,"stem"),op(t,"stem"),this.path=Zr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new hn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function op(e,t){if(e&&e.includes(Zr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Zr.sep+"`")}function sp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function J0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function HB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WB=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),ZB={}.hasOwnProperty;class Ig extends WB{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=IB()}copy(){const t=new Ig;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(rp(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(up("data",this.frozen),this.namespace[t]=n,this):ZB.call(this.namespace,t)&&this.namespace[t]||void 0:t?(up("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=gc(t),r=this.parser||this.Parser;return ap("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ap("process",this.parser||this.Parser),lp("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,l){const u=gc(t),d=r.parse(u);r.run(d,u,function(h,p,x){if(h||!p||!x)return f(h);const g=p,C=r.stringify(g,x);YB(C)?x.value=C:x.result=C,f(h,x)});function f(h,p){h||!p?l(h):a?a(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),ap("processSync",this.parser||this.Parser),lp("processSync",this.compiler||this.Compiler),this.process(t,o),tb("processSync","process",n),r;function o(a,l){n=!0,G0(a),r=l}}run(t,n,r){eb(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,u){const d=gc(n);o.run(t,d,f);function f(h,p,x){const g=p||t;h?u(h):l?l(g):r(void 0,g,x)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),tb("runSync","run",r),o;function a(l,u){G0(l),o=u,r=!0}}stringify(t,n){this.freeze();const r=gc(n),o=this.compiler||this.Compiler;return lp("stringify",o),eb(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(up("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...p]=f;d(h,p)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))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");u(f.plugins),f.settings&&(o.settings=rp(!0,o.settings,f.settings))}function u(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const p=f[h];a(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,h){let p=-1,x=-1;for(;++p<r.length;)if(r[p][0]===f){x=p;break}if(x===-1)r.push([f,...h]);else if(h.length>0){let[g,...C]=h;const k=r[x][1];am(k)&&am(g)&&(g=rp(!0,k,g)),r[x]=[f,g,...C]}}}}const qB=new Ig().freeze();function ap(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function lp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function up(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 eb(e){if(!am(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function tb(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gc(e){return QB(e)?e:new vE(e)}function QB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function YB(e){return typeof e=="string"||KB(e)}function KB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const GB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",nb=[],rb={allowDangerousHtml:!0},XB=/^(https?|ircs?|mailto|xmpp)$/i,JB=[{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 e9(e){const t=t9(e),n=n9(e);return r9(t.runSync(t.parse(n),n),e)}function t9(e){const t=e.rehypePlugins||nb,n=e.remarkPlugins||nb,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rb}:rb;return qB().use(DV).use(n).use(NB,r).use(t)}function n9(e){const t=e.children||"",n=new vE;return typeof t=="string"&&(n.value=t),n}function r9(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||i9;for(const h of JB)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+GB+h.id,void 0);return Rg(e,f),v5(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function f(h,p,x){if(h.type==="raw"&&x&&typeof p=="number")return l?x.children.splice(p,1):x.children[p]={type:"text",value:h.value},p;if(h.type==="element"){let g;for(g in Jh)if(Object.hasOwn(Jh,g)&&Object.hasOwn(h.properties,g)){const C=h.properties[g],k=Jh[g];(k===null||k.includes(h.tagName))&&(h.properties[g]=d(String(C||""),g,h))}}if(h.type==="element"){let g=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!g&&r&&typeof p=="number"&&(g=!r(h,p,x)),g&&x&&typeof p=="number")return u&&h.children?x.children.splice(p,1,...h.children):x.children.splice(p,1),p}}}function i9(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||XB.test(e.slice(0,t))?e:""}function ib(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function o9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function s9(e,t,n){const o=Bd((n||{}).ignore||[]),a=a9(t);let l=-1;for(;++l<a.length;)yE(e,"text",u);function u(f,h){let p=-1,x;for(;++p<h.length;){const g=h[p],C=x?x.children:void 0;if(o(g,C?C.indexOf(g):void 0,x))return;x=g}if(x)return d(f,h)}function d(f,h){const p=h[h.length-1],x=a[l][0],g=a[l][1];let C=0;const S=p.children.indexOf(f);let E=!1,_=[];x.lastIndex=0;let P=x.exec(f.value);for(;P;){const R=P.index,A={index:P.index,input:P.input,stack:[...h,f]};let j=g(...P,A);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?x.lastIndex=R+1:(C!==R&&_.push({type:"text",value:f.value.slice(C,R)}),Array.isArray(j)?_.push(...j):j&&_.push(j),C=R+P[0].length,E=!0),!x.global)break;P=x.exec(f.value)}return E?(C<f.value.length&&_.push({type:"text",value:f.value.slice(C)}),p.children.splice(S,1,..._)):_=[f],S+_.length}}function a9(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([l9(o[0]),u9(o[1])])}return t}function l9(e){return typeof e=="string"?new RegExp(o9(e),"g"):e}function u9(e){return typeof e=="function"?e:function(){return e}}const cp="phrasing",dp=["autolink","link","image","label"];function c9(){return{transforms:[y9],enter:{literalAutolink:f9,literalAutolinkEmail:fp,literalAutolinkHttp:fp,literalAutolinkWww:fp},exit:{literalAutolink:g9,literalAutolinkEmail:m9,literalAutolinkHttp:h9,literalAutolinkWww:p9}}}function d9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:":",before:"[ps]",after:"\\/",inConstruct:cp,notInConstruct:dp}]}}function f9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fp(e){this.config.enter.autolinkProtocol.call(this,e)}function h9(e){this.config.exit.autolinkProtocol.call(this,e)}function p9(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function m9(e){this.config.exit.autolinkEmail.call(this,e)}function g9(e){this.exit(e)}function y9(e){s9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,v9],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),x9]],{ignore:["link","linkReference"]})}function v9(e,t,n,r,o){let a="";if(!xE(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!w9(n)))return!1;const l=b9(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function x9(e,t,n,r){return!xE(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function w9(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function b9(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=ib(e,"(");let a=ib(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function xE(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xo(n)||Fd(n))&&(!t||n!==47)}wE.peek=j9;function k9(){this.buffer()}function S9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function C9(){this.buffer()}function E9(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Or(this.sliceSerialize(e)).toLowerCase(),n.label=t}function T9(e){this.exit(e)}function P9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Or(this.sliceSerialize(e)).toLowerCase(),n.label=t}function N9(e){this.exit(e)}function j9(){return"["}function wE(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),l(),a+=o.move("]"),a}function R9(){return{enter:{gfmFootnoteCallString:k9,gfmFootnoteCall:S9,gfmFootnoteDefinitionLabelString:C9,gfmFootnoteDefinition:E9},exit:{gfmFootnoteCallString:_9,gfmFootnoteCall:T9,gfmFootnoteDefinitionLabelString:P9,gfmFootnoteDefinition:N9}}}function I9(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:wE},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,l){const u=a.createTracker(l);let d=u.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return d+=u.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
|
|
328
|
-
`:" ")+a.indentLines(a.containerFlow(r,u.current()),t?
|
|
329
|
-
`)}function B9(e){return e==null?"":String(e)}function
|
|
326
|
+
`}),n}function Q0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Y0(e,t){const n=CB(e,t),r=n.one(e,void 0),o=pB(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
327
|
+
`},o),a}function NB(e,t){return e&&"run"in e?async function(n,r){const o=Y0(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Y0(n,{file:r,...e||t})}}function K0(e){if(e)throw e}var np,G0;function jB(){if(G0)return np;G0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!p)return!1;var x;for(x in f);return typeof x>"u"||e.call(f,x)},l=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},u=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return np=function d(){var f,h,p,x,g,C,k=arguments[0],S=1,E=arguments.length,_=!1;for(typeof k=="boolean"&&(_=k,k=arguments[1]||{},S=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});S<E;++S)if(f=arguments[S],f!=null)for(h in f)p=u(k,h),x=u(f,h),k!==x&&(_&&x&&(a(x)||(g=o(x)))?(g?(g=!1,C=p&&o(p)?p:[]):C=p&&a(p)?p:{},l(k,{name:h,newValue:d(_,C,x)})):typeof x<"u"&&l(k,{name:h,newValue:x}));return k},np}var RB=jB();const rp=Jo(RB);function am(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 IB(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...o);function u(d,...f){const h=e[++a];let p=-1;if(d){l(d);return}for(;++p<o.length;)(f[p]===null||f[p]===void 0)&&(f[p]=o[p]);o=f,h?AB(h,u)(...f):l(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function AB(e,t){let n;return r;function r(...l){const u=e.length>l.length;let d;u&&l.push(o);try{d=e.apply(this,l)}catch(f){const h=f;if(u&&n)throw h;return o(h)}u||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(l,...u){n||(n=!0,t(l,...u))}function a(l){o(null,l)}}const Zr={basename:OB,dirname:DB,extname:zB,join:MB,sep:"/"};function OB(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Bl(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else l<0&&(a=!0,l=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(r=o):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function DB(e){if(Bl(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 zB(e){Bl(e);let t=e.length,n=-1,r=0,o=-1,a=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function MB(...e){let t=-1,n;for(;++t<e.length;)Bl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":LB(n)}function LB(e){Bl(e);const t=e.codePointAt(0)===47;let n=FB(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function FB(e,t){let n="",r=0,o=-1,a=0,l=-1,u,d;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(o===l-1||a===1))if(o!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=l,a=0;continue}}else if(n.length>0){n="",r=0,o=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,a=0}else u===46&&a>-1?a++:a=-1}return n}function Bl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $B={cwd:VB};function VB(){return"/"}function lm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function BB(e){if(typeof e=="string")e=new URL(e);else if(!lm(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 UB(e)}function UB(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ip=["history","path","basename","stem","extname","dirname"];class yE{constructor(t){let n;t?lm(t)?n={path:t}:typeof t=="string"||HB(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$B.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ip.length;){const a=ip[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)ip.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Zr.basename(this.path):void 0}set basename(t){sp(t,"basename"),op(t,"basename"),this.path=Zr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Zr.dirname(this.path):void 0}set dirname(t){X0(this.basename,"dirname"),this.path=Zr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Zr.extname(this.path):void 0}set extname(t){if(op(t,"extname"),X0(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=Zr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){lm(t)&&(t=BB(t)),sp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Zr.basename(this.path,this.extname):void 0}set stem(t){sp(t,"stem"),op(t,"stem"),this.path=Zr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new hn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function op(e,t){if(e&&e.includes(Zr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Zr.sep+"`")}function sp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function X0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function HB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WB=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),ZB={}.hasOwnProperty;class Rg extends WB{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=IB()}copy(){const t=new Rg;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(rp(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(up("data",this.frozen),this.namespace[t]=n,this):ZB.call(this.namespace,t)&&this.namespace[t]||void 0:t?(up("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=gc(t),r=this.parser||this.Parser;return ap("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ap("process",this.parser||this.Parser),lp("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,l){const u=gc(t),d=r.parse(u);r.run(d,u,function(h,p,x){if(h||!p||!x)return f(h);const g=p,C=r.stringify(g,x);YB(C)?x.value=C:x.result=C,f(h,x)});function f(h,p){h||!p?l(h):a?a(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),ap("processSync",this.parser||this.Parser),lp("processSync",this.compiler||this.Compiler),this.process(t,o),eb("processSync","process",n),r;function o(a,l){n=!0,K0(a),r=l}}run(t,n,r){J0(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,u){const d=gc(n);o.run(t,d,f);function f(h,p,x){const g=p||t;h?u(h):l?l(g):r(void 0,g,x)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),eb("runSync","run",r),o;function a(l,u){K0(l),o=u,r=!0}}stringify(t,n){this.freeze();const r=gc(n),o=this.compiler||this.Compiler;return lp("stringify",o),J0(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(up("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...p]=f;d(h,p)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))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");u(f.plugins),f.settings&&(o.settings=rp(!0,o.settings,f.settings))}function u(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const p=f[h];a(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,h){let p=-1,x=-1;for(;++p<r.length;)if(r[p][0]===f){x=p;break}if(x===-1)r.push([f,...h]);else if(h.length>0){let[g,...C]=h;const k=r[x][1];am(k)&&am(g)&&(g=rp(!0,k,g)),r[x]=[f,g,...C]}}}}const qB=new Rg().freeze();function ap(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function lp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function up(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 J0(e){if(!am(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function eb(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gc(e){return QB(e)?e:new yE(e)}function QB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function YB(e){return typeof e=="string"||KB(e)}function KB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const GB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",tb=[],nb={allowDangerousHtml:!0},XB=/^(https?|ircs?|mailto|xmpp)$/i,JB=[{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 e9(e){const t=t9(e),n=n9(e);return r9(t.runSync(t.parse(n),n),e)}function t9(e){const t=e.rehypePlugins||tb,n=e.remarkPlugins||tb,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...nb}:nb;return qB().use(DV).use(n).use(NB,r).use(t)}function n9(e){const t=e.children||"",n=new yE;return typeof t=="string"&&(n.value=t),n}function r9(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||i9;for(const h of JB)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+GB+h.id,void 0);return jg(e,f),v5(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function f(h,p,x){if(h.type==="raw"&&x&&typeof p=="number")return l?x.children.splice(p,1):x.children[p]={type:"text",value:h.value},p;if(h.type==="element"){let g;for(g in Jh)if(Object.hasOwn(Jh,g)&&Object.hasOwn(h.properties,g)){const C=h.properties[g],k=Jh[g];(k===null||k.includes(h.tagName))&&(h.properties[g]=d(String(C||""),g,h))}}if(h.type==="element"){let g=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!g&&r&&typeof p=="number"&&(g=!r(h,p,x)),g&&x&&typeof p=="number")return u&&h.children?x.children.splice(p,1,...h.children):x.children.splice(p,1),p}}}function i9(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||XB.test(e.slice(0,t))?e:""}function rb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function o9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function s9(e,t,n){const o=Bd((n||{}).ignore||[]),a=a9(t);let l=-1;for(;++l<a.length;)gE(e,"text",u);function u(f,h){let p=-1,x;for(;++p<h.length;){const g=h[p],C=x?x.children:void 0;if(o(g,C?C.indexOf(g):void 0,x))return;x=g}if(x)return d(f,h)}function d(f,h){const p=h[h.length-1],x=a[l][0],g=a[l][1];let C=0;const S=p.children.indexOf(f);let E=!1,_=[];x.lastIndex=0;let P=x.exec(f.value);for(;P;){const R=P.index,A={index:P.index,input:P.input,stack:[...h,f]};let j=g(...P,A);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?x.lastIndex=R+1:(C!==R&&_.push({type:"text",value:f.value.slice(C,R)}),Array.isArray(j)?_.push(...j):j&&_.push(j),C=R+P[0].length,E=!0),!x.global)break;P=x.exec(f.value)}return E?(C<f.value.length&&_.push({type:"text",value:f.value.slice(C)}),p.children.splice(S,1,..._)):_=[f],S+_.length}}function a9(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([l9(o[0]),u9(o[1])])}return t}function l9(e){return typeof e=="string"?new RegExp(o9(e),"g"):e}function u9(e){return typeof e=="function"?e:function(){return e}}const cp="phrasing",dp=["autolink","link","image","label"];function c9(){return{transforms:[y9],enter:{literalAutolink:f9,literalAutolinkEmail:fp,literalAutolinkHttp:fp,literalAutolinkWww:fp},exit:{literalAutolink:g9,literalAutolinkEmail:m9,literalAutolinkHttp:h9,literalAutolinkWww:p9}}}function d9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:":",before:"[ps]",after:"\\/",inConstruct:cp,notInConstruct:dp}]}}function f9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fp(e){this.config.enter.autolinkProtocol.call(this,e)}function h9(e){this.config.exit.autolinkProtocol.call(this,e)}function p9(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function m9(e){this.config.exit.autolinkEmail.call(this,e)}function g9(e){this.exit(e)}function y9(e){s9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,v9],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),x9]],{ignore:["link","linkReference"]})}function v9(e,t,n,r,o){let a="";if(!vE(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!w9(n)))return!1;const l=b9(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function x9(e,t,n,r){return!vE(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function w9(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function b9(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=rb(e,"(");let a=rb(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function vE(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xo(n)||Fd(n))&&(!t||n!==47)}xE.peek=j9;function k9(){this.buffer()}function S9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function C9(){this.buffer()}function E9(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Or(this.sliceSerialize(e)).toLowerCase(),n.label=t}function T9(e){this.exit(e)}function P9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Or(this.sliceSerialize(e)).toLowerCase(),n.label=t}function N9(e){this.exit(e)}function j9(){return"["}function xE(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),l(),a+=o.move("]"),a}function R9(){return{enter:{gfmFootnoteCallString:k9,gfmFootnoteCall:S9,gfmFootnoteDefinitionLabelString:C9,gfmFootnoteDefinition:E9},exit:{gfmFootnoteCallString:_9,gfmFootnoteCall:T9,gfmFootnoteDefinitionLabelString:P9,gfmFootnoteDefinition:N9}}}function I9(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:xE},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,l){const u=a.createTracker(l);let d=u.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return d+=u.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
|
|
328
|
+
`:" ")+a.indentLines(a.containerFlow(r,u.current()),t?wE:A9))),f(),d}}function A9(e,t,n){return t===0?e:wE(e,t,n)}function wE(e,t,n){return(n?"":" ")+e}const O9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];bE.peek=F9;function D9(){return{canContainEols:["delete"],enter:{strikethrough:M9},exit:{strikethrough:L9}}}function z9(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:O9}],handlers:{delete:bE}}}function M9(e){this.enter({type:"delete",children:[]},e)}function L9(e){this.exit(e)}function bE(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let l=o.move("~~");return l+=n.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),a(),l}function F9(){return"~"}function $9(e){return e.length}function V9(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||$9,a=[],l=[],u=[],d=[];let f=0,h=-1;for(;++h<e.length;){const k=[],S=[];let E=-1;for(e[h].length>f&&(f=e[h].length);++E<e[h].length;){const _=B9(e[h][E]);if(n.alignDelimiters!==!1){const P=o(_);S[E]=P,(d[E]===void 0||P>d[E])&&(d[E]=P)}k.push(_)}l[h]=k,u[h]=S}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)a[p]=ib(r[p]);else{const k=ib(r);for(;++p<f;)a[p]=k}p=-1;const x=[],g=[];for(;++p<f;){const k=a[p];let S="",E="";k===99?(S=":",E=":"):k===108?S=":":k===114&&(E=":");let _=n.alignDelimiters===!1?1:Math.max(1,d[p]-S.length-E.length);const P=S+"-".repeat(_)+E;n.alignDelimiters!==!1&&(_=S.length+_+E.length,_>d[p]&&(d[p]=_),g[p]=_),x[p]=P}l.splice(1,0,x),u.splice(1,0,g),h=-1;const C=[];for(;++h<l.length;){const k=l[h],S=u[h];p=-1;const E=[];for(;++p<f;){const _=k[p]||"";let P="",R="";if(n.alignDelimiters!==!1){const A=d[p]-(S[p]||0),j=a[p];j===114?P=" ".repeat(A):j===99?A%2?(P=" ".repeat(A/2+.5),R=" ".repeat(A/2-.5)):(P=" ".repeat(A/2),R=P):R=" ".repeat(A)}n.delimiterStart!==!1&&!p&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||p)&&E.push(" "),n.alignDelimiters!==!1&&E.push(P),E.push(_),n.alignDelimiters!==!1&&E.push(R),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&E.push("|")}C.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return C.join(`
|
|
329
|
+
`)}function B9(e){return e==null?"":String(e)}function ib(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function U9(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),H9);return o(),l}function H9(e,t,n){return">"+(n?"":" ")+e}function W9(e,t){return ob(e,t.inConstruct,!0)&&!ob(e,t.notInConstruct,!1)}function ob(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function sb(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
330
330
|
`&&W9(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
331
331
|
`}function Z9(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>l&&(l=a):a=1,o=r+t.length,r=n.indexOf(t,o);return l}function q9(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Q9(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Y9(e,t,n,r){const o=Q9(n),a=e.value||"",l=o==="`"?"GraveAccent":"Tilde";if(q9(e,n)){const p=n.enter("codeIndented"),x=n.indentLines(a,K9);return p(),x}const u=n.createTracker(r),d=o.repeat(Math.max(Z9(a,o)+1,3)),f=n.enter("codeFenced");let h=u.move(d);if(e.lang){const p=n.enter(`codeFencedLang${l}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${l}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
|
|
332
332
|
`,encode:["`"],...u.current()})),p()}return h+=u.move(`
|
|
333
333
|
`),a&&(h+=u.move(a+`
|
|
334
|
-
`)),h+=u.move(d),f(),h}function K9(e,t,n){return(n?"":" ")+e}function
|
|
335
|
-
`,...d.current()}))),u(),e.title&&(u=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),l(),f}function X9(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Sl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function nd(e,t,n){const r=ra(e),o=ra(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}
|
|
334
|
+
`)),h+=u.move(d),f(),h}function K9(e,t,n){return(n?"":" ")+e}function Ig(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function G9(e,t,n,r){const o=Ig(n),a=o==='"'?"Quote":"Apostrophe",l=n.enter("definition");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
335
|
+
`,...d.current()}))),u(),e.title&&(u=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),l(),f}function X9(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Sl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function nd(e,t,n){const r=ra(e),o=ra(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}kE.peek=J9;function kE(e,t,n,r){const o=X9(n),a=n.enter("emphasis"),l=n.createTracker(r),u=l.move(o);let d=l.move(n.containerPhrasing(e,{after:o,before:u,...l.current()}));const f=d.charCodeAt(0),h=nd(r.before.charCodeAt(r.before.length-1),f,o);h.inside&&(d=Sl(f)+d.slice(1));const p=d.charCodeAt(d.length-1),x=nd(r.after.charCodeAt(0),p,o);x.inside&&(d=d.slice(0,-1)+Sl(p));const g=l.move(o);return a(),n.attentionEncodeSurroundingInfo={after:x.outside,before:h.outside},u+d+g}function J9(e,t,n){return n.options.emphasis||"*"}function eU(e,t){let n=!1;return jg(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,om}),!!((!e.depth||e.depth<3)&&Sg(e)&&(t.options.setext||n))}function tU(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(eU(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),x=n.containerPhrasing(e,{...a.current(),before:`
|
|
336
336
|
`,after:`
|
|
337
337
|
`});return p(),h(),x+`
|
|
338
338
|
`+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
339
339
|
`))+1))}const l="#".repeat(o),u=n.enter("headingAtx"),d=n.enter("phrasing");a.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
340
|
-
`,...a.current()});return/^[\t ]/.test(f)&&(f=Sl(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),u(),f}
|
|
340
|
+
`,...a.current()});return/^[\t ]/.test(f)&&(f=Sl(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),u(),f}SE.peek=nU;function SE(e){return e.value||""}function nU(){return"<"}CE.peek=rU;function CE(e,t,n,r){const o=Ig(n),a=o==='"'?"Quote":"Apostrophe",l=n.enter("image");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),f+=d.move(")"),l(),f}function rU(){return"!"}EE.peek=iU;function EE(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("![");const f=n.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=h,a(),o==="full"||!f||f!==p?d+=u.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function iU(){return"!"}_E.peek=oU;function _E(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],u=n.compilePattern(l);let d;if(l.atBreak)for(;d=u.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function oU(){return"`"}function TE(e,t){const n=Sg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}PE.peek=sU;function PE(e,t,n,r){const o=Ig(n),a=o==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,d;if(TE(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),u(),n.stack=h,p}u=n.enter("link"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${a}`),f+=l.move(" "+o),f+=l.move(n.safe(e.title,{before:f,after:o,...l.current()})),f+=l.move(o),d()),f+=l.move(")"),u(),f}function sU(e,t,n){return TE(e,n)?"<":"["}NE.peek=aU;function NE(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=h,a(),o==="full"||!f||f!==p?d+=u.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function aU(){return"["}function Ag(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function lU(e){const t=Ag(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function uU(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function jE(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cU(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?uU(n):Ag(n);const u=e.ordered?l==="."?")":".":lU(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),jE(n)===l&&h){let p=-1;for(;++p<e.children.length;){const x=e.children[p];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=u),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,o(),f}function dU(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function fU(e,t,n,r){const o=dU(n);let a=n.bulletCurrent||Ag(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(l-a.length)),u.shift(l);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),h);return d(),f;function h(p,x,g){return x?(g?"":" ".repeat(l))+p:(g?a:a+" ".repeat(l-a.length))+p}}function hU(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),o(),l}const pU=Bd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mU(e,t,n,r){return(e.children.some(function(l){return pU(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gU(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}RE.peek=yU;function RE(e,t,n,r){const o=gU(n),a=n.enter("strong"),l=n.createTracker(r),u=l.move(o+o);let d=l.move(n.containerPhrasing(e,{after:o,before:u,...l.current()}));const f=d.charCodeAt(0),h=nd(r.before.charCodeAt(r.before.length-1),f,o);h.inside&&(d=Sl(f)+d.slice(1));const p=d.charCodeAt(d.length-1),x=nd(r.after.charCodeAt(0),p,o);x.inside&&(d=d.slice(0,-1)+Sl(p));const g=l.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:x.outside,before:h.outside},u+d+g}function yU(e,t,n){return n.options.strong||"*"}function vU(e,t,n,r){return n.safe(e.value,r)}function xU(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function wU(e,t,n){const r=(jE(n)+(n.options.ruleSpaces?" ":"")).repeat(xU(n));return n.options.ruleSpaces?r.slice(0,-1):r}const IE={blockquote:U9,break:sb,code:Y9,definition:G9,emphasis:kE,hardBreak:sb,heading:tU,html:SE,image:CE,imageReference:EE,inlineCode:_E,link:PE,linkReference:NE,list:cU,listItem:fU,paragraph:hU,root:mU,strong:RE,text:vU,thematicBreak:wU};function bU(){return{enter:{table:kU,tableData:ab,tableHeader:ab,tableRow:CU},exit:{codeText:EU,table:SU,tableData:hp,tableHeader:hp,tableRow:hp}}}function kU(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function SU(e){this.exit(e),this.data.inTable=void 0}function CU(e){this.enter({type:"tableRow",children:[]},e)}function hp(e){this.exit(e)}function ab(e){this.enter({type:"tableCell",children:[]},e)}function EU(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,_U));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function _U(e,t){return t==="|"?t:e}function TU(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
341
341
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:l,tableCell:d,tableRow:u}};function l(g,C,k,S){return f(h(g,k,S),g.align)}function u(g,C,k,S){const E=p(g,k,S),_=f([E]);return _.slice(0,_.indexOf(`
|
|
342
|
-
`))}function d(g,C,k,S){const E=k.enter("tableCell"),_=k.enter("phrasing"),P=k.containerPhrasing(g,{...S,before:a,after:a});return _(),E(),P}function f(g,C){return V9(g,{align:C,alignDelimiters:r,padding:n,stringLength:o})}function h(g,C,k){const S=g.children;let E=-1;const _=[],P=C.enter("table");for(;++E<S.length;)_[E]=p(S[E],C,k);return P(),_}function p(g,C,k){const S=g.children;let E=-1;const _=[],P=C.enter("tableRow");for(;++E<S.length;)_[E]=d(S[E],g,C,k);return P(),_}function x(g,C,k){let S=AE.inlineCode(g,C,k);return k.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function PU(){return{exit:{taskListCheckValueChecked:ub,taskListCheckValueUnchecked:ub,paragraph:jU}}}function NU(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RU}}}function ub(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function jU(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,l;for(;++a<o.length;){const u=o[a];if(u.type==="paragraph"){l=u;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function RU(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(l);let d=AE.listItem(e,t,n,{...r,...u.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+l}}function IU(){return[c9(),R9(),D9(),bU(),PU()]}function AU(e){return{extensions:[d9(),I9(e),z9(),TU(e),NU()]}}const OU={tokenize:$U,partial:!0},OE={tokenize:VU,partial:!0},DE={tokenize:BU,partial:!0},zE={tokenize:UU,partial:!0},DU={tokenize:HU,partial:!0},ME={name:"wwwAutolink",tokenize:LU,previous:FE},LE={name:"protocolAutolink",tokenize:FU,previous:$E},Ti={name:"emailAutolink",tokenize:MU,previous:VE},ii={};function zU(){return{text:ii}}let Ro=48;for(;Ro<123;)ii[Ro]=Ti,Ro++,Ro===58?Ro=65:Ro===91&&(Ro=97);ii[43]=Ti;ii[45]=Ti;ii[46]=Ti;ii[95]=Ti;ii[72]=[Ti,LE];ii[104]=[Ti,LE];ii[87]=[Ti,ME];ii[119]=[Ti,ME];function MU(e,t,n){const r=this;let o,a;return l;function l(p){return!um(p)||!VE.call(r,r.previous)||Dg(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return um(p)?(e.consume(p),u):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(DU,h,f)(p):p===45||p===95||fn(p)?(a=!0,e.consume(p),d):h(p)}function f(p){return e.consume(p),o=!0,d}function h(p){return a&&o&&En(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function LU(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!FE.call(r,r.previous)||Dg(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(OU,e.attempt(OE,e.attempt(DE,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function FU(e,t,n){const r=this;let o="",a=!1;return l;function l(p){return(p===72||p===104)&&$E.call(r,r.previous)&&!Dg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(En(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const x=o.toLowerCase();if(x==="http"||x==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),a?f:(a=!0,d)):n(p)}function f(p){return p===null||Jc(p)||ht(p)||Xo(p)||Fd(p)?n(p):e.attempt(OE,e.attempt(DE,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function $U(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function VU(e,t,n){let r,o,a;return l;function l(f){return f===46||f===95?e.check(zE,d,u)(f):f===null||ht(f)||Xo(f)||f!==45&&Fd(f)?d(f):(a=!0,e.consume(f),l)}function u(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),l}function d(f){return o||r||!a?n(f):t(f)}}function BU(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(zE,t,a)(l):l===null||ht(l)||Xo(l)?t(l):(e.consume(l),o)}function a(l){return l===41&&r++,e.consume(l),o}}function UU(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),o):u===60||u===null||ht(u)||Xo(u)?t(u):n(u)}function o(u){return u===null||u===40||u===91||ht(u)||Xo(u)?t(u):r(u)}function a(u){return En(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):En(u)?(e.consume(u),l):n(u)}}function HU(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return fn(a)?n(a):t(a)}}function FE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function $E(e){return!En(e)}function VE(e){return!(e===47||um(e))}function um(e){return e===43||e===45||e===46||e===95||fn(e)}function Dg(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const WU={tokenize:JU,partial:!0};function ZU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:KU,continuation:{tokenize:GU},exit:XU}},text:{91:{name:"gfmFootnoteCall",tokenize:YU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:qU,resolveTo:QU}}}}function qU(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!l||!l._balanced)return n(d);const f=Or(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function QU(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function YU(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(a>999||p===93&&!l||p===null||p===91||ht(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return o.includes(Or(r.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return ht(p)||(l=!0),a++,e.consume(p),p===92?h:f}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function KU(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,u;return d;function d(C){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(C){return C===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(C)}function h(C){if(l>999||C===93&&!u||C===null||C===91||ht(C))return n(C);if(C===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=Or(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return ht(C)||(u=!0),l++,e.consume(C),C===92?p:h}function p(C){return C===91||C===92||C===93?(e.consume(C),l++,h):h(C)}function x(C){return C===58?(e.enter("definitionMarker"),e.consume(C),e.exit("definitionMarker"),o.includes(a)||o.push(a),Xe(e,g,"gfmFootnoteDefinitionWhitespace")):n(C)}function g(C){return t(C)}}function GU(e,t,n){return e.check(Vl,t,e.attempt(WU,t,n))}function XU(e){e.exit("gfmFootnoteDefinition")}function JU(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function e8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,u){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},p={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},x=[["enter",h,u],["enter",l[f][1],u],["exit",l[f][1],u],["enter",p,u]],g=u.parser.constructs.insideSpan.null;g&&er(x,x.length,0,$d(g,l.slice(f+1,d),u)),er(x,x.length,0,[["exit",p,u],["enter",l[d][1],u],["exit",l[d][1],u],["exit",h,u]]),er(l,f-1,d-f+3,x),d=f+x.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,u,d){const f=this.previous,h=this.events;let p=0;return x;function x(C){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(C):(l.enter("strikethroughSequenceTemporary"),g(C))}function g(C){const k=ra(f);if(C===126)return p>1?d(C):(l.consume(C),p++,g);if(p<2&&!n)return d(C);const S=l.exit("strikethroughSequenceTemporary"),E=ra(C);return S._open=!E||E===2&&!!k,S._close=!k||k===2&&!!E,u(C)}}}class t8{constructor(){this.map=[]}add(t,n,r){n8(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function n8(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function r8(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function i8(){return{flow:{null:{name:"table",tokenize:o8,resolveAll:s8}}}}function o8(e,t,n){const r=this;let o=0,a=0,l;return u;function u(O){let Y=r.events.length-1;for(;Y>-1;){const W=r.events[Y][1].type;if(W==="lineEnding"||W==="linePrefix")Y--;else break}const M=Y>-1?r.events[Y][1].type:null,ne=M==="tableHead"||M==="tableRow"?j:d;return ne===j&&r.parser.lazy[r.now().line]?n(O):ne(O)}function d(O){return e.enter("tableHead"),e.enter("tableRow"),f(O)}function f(O){return O===124||(l=!0,a+=1),h(O)}function h(O){return O===null?n(O):$e(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),g):n(O):Ke(O)?Xe(e,h,"whitespace")(O):(a+=1,l&&(l=!1,o+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),p(O)))}function p(O){return O===null||O===124||ht(O)?(e.exit("data"),h(O)):(e.consume(O),O===92?x:p)}function x(O){return O===92||O===124?(e.consume(O),p):p(O)}function g(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),l=!1,Ke(O)?Xe(e,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):C(O))}function C(O){return O===45||O===58?S(O):O===124?(l=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),k):A(O)}function k(O){return Ke(O)?Xe(e,S,"whitespace")(O):S(O)}function S(O){return O===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),E):O===45?(a+=1,E(O)):O===null||$e(O)?R(O):A(O)}function E(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):A(O)}function _(O){return O===45?(e.consume(O),_):O===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),P):(e.exit("tableDelimiterFiller"),P(O))}function P(O){return Ke(O)?Xe(e,R,"whitespace")(O):R(O)}function R(O){return O===124?C(O):O===null||$e(O)?!l||o!==a?A(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):A(O)}function A(O){return n(O)}function j(O){return e.enter("tableRow"),F(O)}function F(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),F):O===null||$e(O)?(e.exit("tableRow"),t(O)):Ke(O)?Xe(e,F,"whitespace")(O):(e.enter("data"),Z(O))}function Z(O){return O===null||O===124||ht(O)?(e.exit("data"),F(O)):(e.consume(O),O===92?re:Z)}function re(O){return O===92||O===124?(e.consume(O),Z):Z(O)}}function s8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],l=[0,0,0,0],u=!1,d=0,f,h,p;const x=new t8;for(;++n<e.length;){const g=e[n],C=g[1];g[0]==="enter"?C.type==="tableHead"?(u=!1,d!==0&&(cb(x,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},x.add(n,0,[["enter",f,t]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(r=!0,p=void 0,a=[0,0,0,0],l=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},x.add(n,0,[["enter",h,t]])),o=C.type==="tableDelimiterRow"?2:h?3:1):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],p=yc(x,t,a,o,void 0,p),a=[0,0,0,0]),l[2]=n)):C.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],p=yc(x,t,a,o,void 0,p)),a=l,l=[a[1],n,0,0])):C.type==="tableHead"?(u=!0,d=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],p=yc(x,t,a,o,n,p)):l[1]!==0&&(p=yc(x,t,l,o,n,p)),o=0):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&cb(x,t,d,f,h),x.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=r8(t.events,n))}return e}function yc(e,t,n,r,o,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Os(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Os(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=Os(t.events,n[2]),h=Os(t.events,n[3]),p={type:u,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const x=t.events[n[2]],g=t.events[n[3]];if(x[1].end=Object.assign({},g[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,k=n[3]-n[2]-1;e.add(C,k,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return o!==void 0&&(a.end=Object.assign({},Os(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function cb(e,t,n,r,o){const a=[],l=Os(t.events,n);o&&(o.end=Object.assign({},l),a.push(["exit",o,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function Os(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const a8={name:"tasklistCheck",tokenize:u8};function l8(){return{text:{91:a8}}}function u8(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ht(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return $e(d)?t(d):Ke(d)?e.check({tokenize:c8},t,n)(d):n(d)}}function c8(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function d8(e){return XC([zU(),ZU(),e8(e),i8(),l8()])}const f8={};function h8(e){const t=this,n=e||f8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(d8(n)),a.push(IU()),l.push(AU(n))}function p8({content:e,className:t}){return y.jsx("div",{className:Be("prose prose-sm dark:prose-invert max-w-none break-words","prose-headings:font-semibold prose-headings:text-foreground","prose-p:text-muted-foreground prose-p:leading-relaxed","prose-a:text-primary prose-a:no-underline hover:prose-a:underline","prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-sm prose-code:before:content-none prose-code:after:content-none","prose-pre:bg-muted prose-pre:border prose-pre:overflow-x-auto","prose-ul:text-muted-foreground prose-ol:text-muted-foreground","prose-li:marker:text-muted-foreground","prose-blockquote:border-l-primary prose-blockquote:text-muted-foreground","prose-table:text-sm","prose-th:text-left prose-th:font-semibold","prose-td:border prose-th:border",t),children:y.jsx(e9,{remarkPlugins:[h8],children:e})})}function BE({open:e,onClose:t,breadcrumbItems:n,title:r,description:o,onEdit:a,children:l}){return y.jsx(gg,{open:e,onOpenChange:u=>!u&&t(),children:y.jsxs(yg,{className:"max-w-4xl p-0 gap-0 max-h-[90vh] overflow-hidden",children:[y.jsx("div",{className:"p-4 border-b flex items-center justify-between",children:y.jsx(MC,{items:n})}),y.jsx(Zm,{className:"max-h-[calc(90vh-80px)]",children:y.jsxs("div",{className:"flex flex-col",children:[y.jsxs("div",{className:"px-4 pt-4 pb-2 flex justify-between items-start",children:[y.jsx("h2",{className:"text-xl font-semibold",children:r}),y.jsxs(it,{variant:"ghost",size:"sm",onClick:a,children:[y.jsx(Cm,{className:"mr-1 h-4 w-4"}),"Edit"]})]}),y.jsxs("div",{className:"px-4 pb-4",children:[y.jsx("h4",{className:"text-xs uppercase text-muted-foreground font-semibold mb-2",children:"Description"}),o?y.jsx(p8,{content:o}):y.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No description"})]}),l]})})]})})}function UE({open:e,onClose:t,breadcrumbItems:n,formId:r,isSubmitting:o,isDeleting:a,entityName:l,onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h,children:p}){return y.jsx(gg,{open:e,onOpenChange:x=>!x&&t(),children:y.jsxs(yg,{className:"max-w-lg p-0 gap-0 max-h-[90vh] overflow-hidden",children:[y.jsx("div",{className:"flex items-center border-b p-4",children:y.jsx(MC,{items:n})}),y.jsx(Zm,{className:"max-h-[calc(90vh-140px)]",children:p}),y.jsxs("div",{className:"p-4 border-t flex items-center justify-between",children:[y.jsx(z3,{isConfirming:a,entityName:l,onDelete:d,onConfirm:f,onCancel:h}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(it,{type:"button",variant:"outline",size:"sm",onClick:u,children:"Cancel"}),y.jsx(it,{type:"submit",form:r,size:"sm",disabled:o,children:o?"Saving...":"Save"})]})]})]})})}function m8({task:e,onStatusChange:t,onPriorityChange:n,onEpicClick:r,getEpicById:o}){const a=e.epicId?o(e.epicId):null,l=e.tags?e.tags.split(",").map(d=>d.trim()):[],u=()=>{a&&r&&r(a)};return y.jsxs("div",{children:[y.jsx(bl,{children:"Details"}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Status"}),y.jsx(Md,{value:e.status,onChange:t,statuses:Pd,triggerClassName:"w-auto h-8 text-right"})]}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Priority"}),y.jsx(Ld,{value:e.priority,onChange:n,triggerClassName:"w-auto h-8 text-right"})]}),a&&y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Epic"}),y.jsxs("button",{className:"flex items-center gap-0.5 text-sm text-purple-500 hover:text-purple-600",onClick:u,children:[a.id,y.jsx(ad,{className:"h-3 w-3"})]})]}),l.length>0&&y.jsxs("div",{children:[y.jsx("span",{className:"text-sm text-muted-foreground mb-1 block",children:"Tags"}),y.jsx("div",{className:"flex flex-wrap gap-1",children:l.map(d=>y.jsx(lo,{variant:"secondary",className:"text-xs",children:d},d))})]})]})]})}function db({taskId:e,variant:t,onClick:n}){const r=t==="depends"?lk:uk;return y.jsxs("button",{className:Be("inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-mono","transition-colors hover:ring-1",t==="depends"&&"bg-amber-500/10 text-amber-600 dark:text-amber-400 hover:ring-amber-500/50",t==="blocks"&&"bg-rose-500/10 text-rose-600 dark:text-rose-400 hover:ring-rose-500/50"),onClick:n,title:t==="depends"?"Depends on this task":"Blocks this task",children:[y.jsx(r,{className:"h-3 w-3"}),e]})}function g8({dependsOn:e,blocks:t,onTaskClick:n,getTaskById:r}){if(!(e.length>0||t.length>0))return null;const a=l=>{const u=r(l);u&&n&&n(u)};return y.jsxs("div",{children:[y.jsx(bl,{children:"Dependencies"}),y.jsxs("div",{className:"space-y-2",children:[e.length>0&&y.jsxs("div",{children:[y.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1.5 block",children:"Depends on"}),y.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map(l=>y.jsx(db,{taskId:l,variant:"depends",onClick:()=>a(l)},l))})]}),t.length>0&&y.jsxs("div",{children:[y.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1.5 block",children:"Blocks"}),y.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(l=>y.jsx(db,{taskId:l,variant:"blocks",onClick:()=>a(l)},l))})]})]})]})}const y8=["completed","archived","wont_fix"];function cm(e){return y8.includes(e)}function v8({subtask:e,onClick:t}){const n=cm(e.status);return y.jsxs(it,{variant:"ghost",className:"w-full justify-start h-auto p-1.5 gap-2",onClick:t,children:[y.jsx(AC,{status:e.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:e.id}),y.jsx("span",{className:Be("text-sm flex-1 text-left truncate",n&&"line-through text-muted-foreground"),children:e.title})]})}function x8({subtasks:e,onTaskClick:t}){if(e.length===0)return null;const n=e.filter(r=>r.status==="completed").length;return y.jsxs("div",{children:[y.jsx(bl,{count:{current:n,total:e.length},children:"Subtasks"}),y.jsx("div",{className:"space-y-1",children:e.map(r=>y.jsx(v8,{subtask:r,onClick:()=>t==null?void 0:t(r)},r.id))})]})}function w8({taskId:e}){const[t,n]=b.useState([]),[r,o]=b.useState(!0),[a,l]=b.useState(""),[u,d]=b.useState(""),[f,h]=b.useState(!1);b.useEffect(()=>{const C=localStorage.getItem("trekker-comment-author");C&&l(C)},[]),b.useEffect(()=>{p()},[e]);const p=async()=>{try{const C=await fetch(`/api/tasks/${e}/comments`);if(C.ok){const k=await C.json();n(k)}}catch(C){console.error("Failed to fetch comments:",C)}finally{o(!1)}},x=async()=>{if(!a.trim()||!u.trim()){Ct.error("Author and content are required");return}h(!0);try{localStorage.setItem("trekker-comment-author",a);const C=await fetch(`/api/tasks/${e}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({author:a,content:u})});if(!C.ok){const S=await C.json();throw new Error(S.error||"Failed to add comment")}const k=await C.json();n([...t,k]),d(""),Ct.success("Comment added")}catch(C){Ct.error(C instanceof Error?C.message:"Failed to add comment")}finally{h(!1)}},g=async C=>{try{if(!(await fetch(`/api/comments/${C}`,{method:"DELETE"})).ok)throw new Error("Failed to delete comment");n(t.filter(S=>S.id!==C)),Ct.success("Comment deleted")}catch{Ct.error("Failed to delete comment")}};return y.jsxs("div",{className:"p-4 mt-4 border-t",children:[y.jsxs("h4",{className:"text-sm font-medium mb-3",children:["Comments ",t.length>0&&`(${t.length})`]}),r?y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):y.jsxs(y.Fragment,{children:[t.length>0&&y.jsx("div",{className:"space-y-3 mb-4",children:t.map(C=>y.jsxs("div",{className:"p-3 bg-muted/50 group relative",children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-sm font-medium",children:C.author}),y.jsx("span",{className:"text-xs text-muted-foreground",children:Fl(C.createdAt)})]}),y.jsx(it,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>g(C.id),children:y.jsx(Em,{className:"h-3.5 w-3.5"})})]}),y.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:C.content})]},C.id))}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ei,{placeholder:"Your name",value:a,onChange:C=>l(C.target.value)}),y.jsx(Ll,{placeholder:"Add a comment...",value:u,onChange:C=>d(C.target.value),rows:2}),y.jsx(it,{size:"sm",onClick:x,disabled:f||!a.trim()||!u.trim(),children:f?"Adding...":"Add Comment"})]})]})]})}async function b8(e){var r,o;const t=new URLSearchParams;e.entityId&&t.set("entityId",e.entityId),(r=e.types)!=null&&r.length&&t.set("type",e.types.join(",")),(o=e.actions)!=null&&o.length&&t.set("action",e.actions.join(",")),e.since&&t.set("since",e.since),e.until&&t.set("until",e.until),e.limit&&t.set("limit",e.limit.toString()),e.page&&t.set("page",e.page.toString());const n=await fetch(`/api/history?${t.toString()}`);if(!n.ok){const a=await n.json();throw new Error(a.error||"Failed to fetch history")}return n.json()}function HE(e){return Al({queryKey:["history",e],queryFn:()=>b8(e)})}function k8({event:e}){return y.jsxs("div",{className:"flex gap-2.5 py-2.5 border-b last:border-b-0",children:[y.jsx("div",{className:"mt-0.5",children:y.jsx(DC,{action:e.action,className:"h-3.5 w-3.5"})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[y.jsxs("span",{className:Be("text-xs font-medium capitalize",zC(e.action)),children:[e.action,"d"]}),y.jsx("span",{className:"text-xs text-muted-foreground",children:Fl(e.timestamp)})]}),e.changes&&Object.keys(e.changes).length>0&&y.jsx("div",{className:"text-xs space-y-0.5",children:Object.entries(e.changes).map(([t,n])=>y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsxs("span",{className:"font-medium",children:[t,":"]}),y.jsx("span",{className:"line-through",children:String(n.from)}),y.jsx("span",{children:"→"}),y.jsx("span",{className:"text-foreground",children:String(n.to)})]},t))}),e.action==="create"&&e.snapshot&&y.jsx("p",{className:"text-xs text-muted-foreground",children:"Task created"})]})]})}function S8({taskId:e}){const{data:t,isLoading:n,error:r}=HE({entityId:e,limit:50});return n?y.jsx("div",{className:"p-4",children:y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}):r?y.jsx("div",{className:"p-4",children:y.jsxs("p",{className:"text-sm text-destructive",children:["Error: ",r instanceof Error?r.message:"Unknown error"]})}):t!=null&&t.events.length?y.jsxs("div",{className:"p-4",children:[y.jsxs("h4",{className:"text-sm font-medium mb-3",children:["History (",t.events.length,")"]}),y.jsx("div",{children:t.events.map(o=>y.jsx(k8,{event:o},o.id))})]}):y.jsx("div",{className:"p-4",children:y.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No history"})})}function C8({task:e,subtasks:t,onStatusChange:n,onPriorityChange:r,onTaskClick:o,onEpicClick:a,getEpicById:l,getTaskById:u}){const[d,f]=b.useState("comments");return y.jsxs("div",{className:"bg-muted/50 rounded-b-md",children:[y.jsxs("div",{className:"p-4 space-y-6",children:[y.jsx(m8,{task:e,onStatusChange:n,onPriorityChange:r,onEpicClick:a,getEpicById:l}),y.jsx(g8,{dependsOn:e.dependsOn,blocks:e.blocks,onTaskClick:o,getTaskById:u}),y.jsx(x8,{subtasks:t,onTaskClick:o}),y.jsx(IC,{createdAt:e.createdAt,updatedAt:e.updatedAt})]}),y.jsxs("div",{className:"border-t",children:[y.jsxs("div",{className:"flex border-b",children:[y.jsxs(it,{variant:"ghost",size:"sm",className:Be("flex-1 rounded-none",d==="comments"&&"bg-accent"),onClick:()=>f("comments"),children:[y.jsx(Yj,{className:"h-4 w-4 mr-1.5"}),"Comments"]}),y.jsxs(it,{variant:"ghost",size:"sm",className:Be("flex-1 rounded-none",d==="history"&&"bg-accent"),onClick:()=>f("history"),children:[y.jsx(pk,{className:"h-4 w-4 mr-1.5"}),"History"]})]}),d==="comments"?y.jsx(w8,{taskId:e.id}):y.jsx(S8,{taskId:e.id})]})]})}function E8({task:e,subtasks:t,breadcrumbItems:n,status:r,priority:o,open:a,onClose:l,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:h,onEpicClick:p,getEpicById:x,getTaskById:g}){return y.jsx(BE,{open:a,onClose:l,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(C8,{task:{...e,status:r,priority:o},subtasks:t,onStatusChange:d,onPriorityChange:f,onTaskClick:h,onEpicClick:p,getEpicById:x,getTaskById:g})})}function _8({form:e,epics:t,breadcrumbItems:n,open:r,isDeleting:o,onClose:a,onSubmit:l,onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h}){const{watch:p,setValue:x,handleSubmit:g,formState:{isSubmitting:C,errors:k}}=e,S=p("title"),E=p("description"),_=p("status"),P=p("priority"),R=p("tags"),A=p("epicId"),j=async F=>{await l(F)&&u()};return y.jsx(UE,{open:r,onClose:a,breadcrumbItems:n,formId:"task-edit-form",isSubmitting:C,isDeleting:o,entityName:"Task",onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h,children:y.jsxs("form",{id:"task-edit-form",onSubmit:g(j),className:"space-y-4 p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Title"}),y.jsx(ei,{value:S,onChange:F=>x("title",F.target.value),placeholder:"Task title",className:"text-lg font-semibold"}),k.title&&y.jsx("p",{className:"text-xs text-destructive",children:k.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(Ll,{value:E,onChange:F=>x("description",F.target.value),placeholder:"Task description",rows:4})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Status"}),y.jsx(Md,{value:_,onChange:F=>x("status",F),statuses:Pd})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Ld,{value:P,onChange:F=>x("priority",F)})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(ei,{value:R,onChange:F=>x("tags",F.target.value),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Epic"}),y.jsxs(dr,{value:A||"none",onValueChange:F=>x("epicId",F==="none"?null:F),children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"none",children:"No Epic"}),t.map(F=>y.jsxs(nn,{value:F.id,children:[F.id,": ",F.title]},F.id))]})]})]})]})})}const T8=fg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:dg().min(0).max(5),tags:Cn(),epicId:Cn().nullable()});function P8({task:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const a=od(),[l,u]=b.useState(!1),d=ng({resolver:cg(T8),values:e?{title:e.title,description:e.description||"",status:e.status,priority:e.priority,tags:e.tags||"",epicId:e.epicId}:{title:"",description:"",status:"todo",priority:2,tags:"",epicId:null},resetOptions:{keepDirtyValues:!1}}),{reset:f,formState:{isSubmitting:h}}=d;return b.useEffect(()=>{u(!1)},[t,n]),{form:d,isSubmitting:h,isDeleting:l,setIsDeleting:u,handleSave:async S=>{if(e)try{const E=await fetch(`/api/tasks/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:S.title.trim(),description:S.description.trim()||null,status:S.status,priority:S.priority,tags:S.tags.trim()||null,epicId:S.epicId||null})});if(!E.ok){const _=await E.json();throw new Error(_.error||"Failed to update task")}return Ct.success("Task updated"),o(),a.invalidateQueries({queryKey:["history"]}),!0}catch(E){return Ct.error(E instanceof Error?E.message:"Failed to update task"),!1}},handleDelete:async()=>{if(e)try{const S=await fetch(`/api/tasks/${e.id}`,{method:"DELETE"});if(!S.ok){const E=await S.json();throw new Error(E.error||"Failed to delete task")}Ct.success("Task deleted"),r(),o(),a.invalidateQueries({queryKey:["history"]})}catch(S){Ct.error(S instanceof Error?S.message:"Failed to delete task")}},handleCancel:()=>{e&&f({title:e.title,description:e.description||"",status:e.status,priority:e.priority,tags:e.tags||"",epicId:e.epicId}),u(!1)},handleStatusChange:async S=>{if(!e)return;const E=d.getValues("status");d.setValue("status",S);try{const _=await fetch(`/api/tasks/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:S})});if(!_.ok){const P=await _.json();throw d.setValue("status",E),new Error(P.error||"Failed to update status")}o(),a.invalidateQueries({queryKey:["history"]})}catch(_){Ct.error(_ instanceof Error?_.message:"Failed to update status")}},handlePriorityChange:async S=>{if(!e)return;const E=d.getValues("priority");d.setValue("priority",S);try{const _=await fetch(`/api/tasks/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:S})});if(!_.ok){const P=await _.json();throw d.setValue("priority",E),new Error(P.error||"Failed to update priority")}o(),a.invalidateQueries({queryKey:["history"]})}catch(_){Ct.error(_ instanceof Error?_.message:"Failed to update priority")}}}}function zg({task:e,epics:t,allTasks:n,open:r,onClose:o,onUpdate:a,onTaskClick:l,onEpicClick:u}){const[d,f]=b.useState(!1),{form:h,isDeleting:p,setIsDeleting:x,handleSave:g,handleDelete:C,handleCancel:k,handleStatusChange:S,handlePriorityChange:E}=P8({task:e,open:r,isEditing:d,onClose:o,onUpdate:a}),_=b.useCallback(ne=>t.find(W=>W.id===ne),[t]),P=b.useCallback(ne=>n.find(W=>W.id===ne),[n]),R=b.useCallback(ne=>ne?n.find(W=>W.id===ne):null,[n]),A=()=>{f(!1),o()};if(!e)return null;const j=!!e.parentTaskId,F=n.filter(ne=>ne.parentTaskId===e.id),re=(()=>{const ne=[],W=e.epicId?_(e.epicId):null,U=R(e.parentTaskId);return W&&ne.push({id:W.id,title:W.title,type:"epic",onClick:u?()=>u(W):void 0}),U&&ne.push({id:U.id,title:U.title,type:"task",onClick:l?()=>l(U):void 0}),ne.push({id:e.id,title:e.title,type:j?"subtask":"task"}),ne})(),O=h.watch("status"),Y=h.watch("priority"),M=()=>{k(),f(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(E8,{task:e,subtasks:F,breadcrumbItems:re,status:O,priority:Y,open:r&&!d,onClose:A,onEdit:()=>f(!0),onStatusChange:S,onPriorityChange:E,onTaskClick:l,onEpicClick:u,getEpicById:_,getTaskById:P}),y.jsx(_8,{form:h,epics:t,breadcrumbItems:re,open:r&&d,isDeleting:p,onClose:A,onSubmit:g,onCancel:M,onDelete:()=>x(!0),onDeleteConfirm:C,onDeleteCancel:()=>x(!1)})]})}function N8({status:e,priority:t,tasks:n,createdAt:r,updatedAt:o,onStatusChange:a,onPriorityChange:l,onTaskClick:u}){const d=n.filter(h=>!h.parentTaskId),f=d.filter(h=>cm(h.status)).length;return y.jsx("div",{className:"p-4 bg-muted/30 rounded-b-md",children:y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{children:[y.jsx(bl,{children:"Details"}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Status"}),y.jsx(Md,{value:e,onChange:a,statuses:rg,triggerClassName:"w-auto h-8 text-right"})]}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Priority"}),y.jsx(Ld,{value:t,onChange:l,triggerClassName:"w-auto h-8 text-right"})]})]})]}),d.length>0&&y.jsxs("div",{children:[y.jsx(bl,{count:{current:f,total:d.length},children:"Tasks"}),y.jsx("div",{className:"space-y-1",children:d.map(h=>{const p=cm(h.status);return y.jsxs(it,{variant:"ghost",className:"w-full justify-start h-auto p-1.5 gap-2 whitespace-normal",onClick:()=>u==null?void 0:u(h),children:[y.jsx(AC,{status:h.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground shrink-0",children:h.id}),y.jsx("span",{className:Be("text-sm flex-1 text-left wrap-break-words",p&&"line-through text-muted-foreground"),children:h.title})]},h.id)})})]}),y.jsx(IC,{createdAt:r,updatedAt:o})]})})}function j8({epic:e,tasks:t,breadcrumbItems:n,status:r,priority:o,open:a,onClose:l,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:h}){return y.jsx(BE,{open:a,onClose:l,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(N8,{status:r,priority:o,tasks:t,createdAt:e.createdAt,updatedAt:e.updatedAt,onStatusChange:d,onPriorityChange:f,onTaskClick:h})})}function R8({form:e,breadcrumbItems:t,open:n,isDeleting:r,onClose:o,onSubmit:a,onCancel:l,onDelete:u,onDeleteConfirm:d,onDeleteCancel:f}){const{watch:h,setValue:p,handleSubmit:x,formState:{isSubmitting:g,errors:C}}=e,k=h("title"),S=h("description"),E=h("status"),_=h("priority"),P=async R=>{await a(R)&&l()};return y.jsx(UE,{open:n,onClose:o,breadcrumbItems:t,formId:"epic-edit-form",isSubmitting:g,isDeleting:r,entityName:"Epic",onCancel:l,onDelete:u,onDeleteConfirm:d,onDeleteCancel:f,children:y.jsxs("form",{id:"epic-edit-form",onSubmit:x(P),className:"space-y-4 p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Title"}),y.jsx(ei,{value:k,onChange:R=>p("title",R.target.value),placeholder:"Epic title",className:"text-lg font-semibold"}),C.title&&y.jsx("p",{className:"text-xs text-destructive",children:C.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(Ll,{value:S,onChange:R=>p("description",R.target.value),placeholder:"Epic description",rows:4})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Status"}),y.jsx(Md,{value:E,onChange:R=>p("status",R),statuses:rg})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Ld,{value:_,onChange:R=>p("priority",R)})]})]})]})})}const I8=fg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:dg().min(0).max(5)});function A8({epic:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const[a,l]=b.useState(!1),u=ng({resolver:cg(I8),values:e?{title:e.title,description:e.description||"",status:e.status,priority:e.priority}:{title:"",description:"",status:"todo",priority:2},resetOptions:{keepDirtyValues:!1}}),{reset:d,formState:{isSubmitting:f}}=u;return b.useEffect(()=>{l(!1)},[t,n]),{form:u,isSubmitting:f,isDeleting:a,setIsDeleting:l,handleSave:async k=>{if(e)try{const S=await fetch(`/api/epics/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:k.title.trim(),description:k.description.trim()||null,status:k.status,priority:k.priority})});if(!S.ok){const E=await S.json();throw new Error(E.error||"Failed to update epic")}return Ct.success("Epic updated"),o(),!0}catch(S){return Ct.error(S instanceof Error?S.message:"Failed to update epic"),!1}},handleDelete:async()=>{if(e)try{const k=await fetch(`/api/epics/${e.id}`,{method:"DELETE"});if(!k.ok){const S=await k.json();throw new Error(S.error||"Failed to delete epic")}Ct.success("Epic deleted"),r(),o()}catch(k){Ct.error(k instanceof Error?k.message:"Failed to delete epic")}},handleCancel:()=>{e&&d({title:e.title,description:e.description||"",status:e.status,priority:e.priority}),l(!1)},handleStatusChange:async k=>{if(!e)return;const S=u.getValues("status");u.setValue("status",k);try{const E=await fetch(`/api/epics/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:k})});if(!E.ok){const _=await E.json();throw u.setValue("status",S),new Error(_.error||"Failed to update status")}o()}catch(E){Ct.error(E instanceof Error?E.message:"Failed to update status")}},handlePriorityChange:async k=>{if(!e)return;const S=u.getValues("priority");u.setValue("priority",k);try{const E=await fetch(`/api/epics/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:k})});if(!E.ok){const _=await E.json();throw u.setValue("priority",S),new Error(_.error||"Failed to update priority")}o()}catch(E){Ct.error(E instanceof Error?E.message:"Failed to update priority")}}}}function Mg({epic:e,tasks:t=[],open:n,onClose:r,onUpdate:o,onTaskClick:a}){const[l,u]=b.useState(!1),{form:d,isDeleting:f,setIsDeleting:h,handleSave:p,handleDelete:x,handleCancel:g,handleStatusChange:C,handlePriorityChange:k}=A8({epic:e,open:n,isEditing:l,onClose:r,onUpdate:o}),S=()=>{u(!1),r()};if(!e)return null;const E=[{id:e.id,title:e.title,type:"epic"}],_=d.watch("status"),P=d.watch("priority"),R=()=>{g(),u(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(j8,{epic:e,tasks:t,breadcrumbItems:E,status:_,priority:P,open:n&&!l,onClose:S,onEdit:()=>u(!0),onStatusChange:C,onPriorityChange:k,onTaskClick:a}),y.jsx(R8,{form:d,breadcrumbItems:E,open:n&&l,isDeleting:f,onClose:S,onSubmit:p,onCancel:R,onDelete:()=>h(!0),onDeleteConfirm:x,onDeleteCancel:()=>h(!1)})]})}function O8({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o="Confirm",cancelLabel:a="Cancel",onConfirm:l,variant:u="default"}){const d=()=>{l(),t(!1)};return y.jsx(gg,{open:e,onOpenChange:t,children:y.jsxs(yg,{className:"sm:max-w-[400px]",children:[y.jsxs(F3,{children:[y.jsx(V3,{children:n}),y.jsx(B3,{children:r})]}),y.jsxs($3,{children:[y.jsx(it,{variant:"outline",onClick:()=>t(!1),children:a}),y.jsx(it,{variant:u==="destructive"?"destructive":"default",onClick:d,children:o})]})]})})}function D8(){const{tasks:e,epics:t,isLoading:n,error:r,refetch:o}=sd(),a=hj(),[l,u]=b.useState(!1),{selectedTaskId:d,selectedEpicId:f,openTaskDetail:h,openEpicDetail:p,openCreateModal:x,closeTaskDetail:g,closeEpicDetail:C}=Xs();s3(o);const k=d&&e.find(E=>E.id===d)||null,S=f&&t.find(E=>E.id===f)||null;return n&&e.length===0?y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):r?y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",r instanceof Error?r.message:"Unknown error"]})}):y.jsxs(y.Fragment,{children:[y.jsx("main",{className:"flex-1 p-4 overflow-x-auto",children:y.jsx(D3,{tasks:e,epics:t,onAddClick:E=>x({status:E}),onTaskClick:E=>h(E.id),onEpicClick:E=>p(E.id),onArchiveAllCompleted:()=>u(!0)})}),y.jsx(O8,{open:l,onOpenChange:u,title:"Archive All Completed",description:"This will move all completed tasks and epics to the archived status. This action can be undone by manually changing their status back.",confirmLabel:"Archive All",onConfirm:()=>a.mutate()}),y.jsx(zg,{task:k,epics:t,allTasks:e,open:k!==null,onClose:g,onUpdate:o,onTaskClick:E=>h(E.id),onEpicClick:E=>{g(),p(E.id)}}),y.jsx(Mg,{epic:S,tasks:S?e.filter(E=>E.epicId===S.id):[],open:S!==null,onClose:C,onUpdate:o,onTaskClick:E=>{C();const _=e.find(P=>P.id===E.id);_&&h(_.id)}})]})}async function z8(e){var r,o,a;const t=new URLSearchParams;(r=e.types)!=null&&r.length&&t.set("type",e.types.join(",")),(o=e.statuses)!=null&&o.length&&t.set("status",e.statuses.join(",")),(a=e.priorities)!=null&&a.length&&t.set("priority",e.priorities.join(",")),e.sort&&t.set("sort",e.sort),e.limit&&t.set("limit",e.limit.toString()),e.page&&t.set("page",e.page.toString()),e.since&&t.set("since",e.since),e.until&&t.set("until",e.until);const n=await fetch(`/api/list?${t.toString()}`);if(!n.ok){const l=await n.json();throw new Error(l.error||"Failed to fetch list")}return n.json()}function M8(e){return Al({queryKey:["list",e],queryFn:()=>z8(e)})}const L8=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"}],F8=[20,50,100];function $8(){var F,Z,re,O,Y;const{tasks:e,epics:t,refetch:n}=sd(),{selectedTaskId:r,selectedEpicId:o,openTaskDetail:a,openEpicDetail:l,closeTaskDetail:u,closeEpicDetail:d}=Xs(),[f,h]=b.useState({limit:20,page:1,sort:"created:desc"}),[p,x]=b.useState(""),{data:g,isLoading:C,error:k}=M8(f),S=r&&e.find(M=>M.id===r)||null,E=o&&t.find(M=>M.id===o)||null,_=M=>{M.type==="epic"?l(M.id):a(M.id)},P=M=>{const ne=f.types||[],W=ne.includes(M)?ne.filter(U=>U!==M):[...ne,M];h({...f,types:W.length?W:void 0,page:1})},R=()=>{h({limit:f.limit,page:1,sort:f.sort}),x("")},A=!!((F=f.types)!=null&&F.length||(Z=f.statuses)!=null&&Z.length||(re=f.priorities)!=null&&re.length),j=g?Math.ceil(g.total/(f.limit||20)):0;return y.jsxs(y.Fragment,{children:[y.jsxs("main",{className:"flex-1 p-4 flex flex-col gap-4 overflow-hidden",children:[y.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[y.jsxs("div",{className:"relative w-64",children:[y.jsx(rR,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),y.jsx(ei,{placeholder:"Search...",value:p,onChange:M=>x(M.target.value),className:"pl-9"})]}),y.jsx("div",{className:"flex gap-1",children:L8.map(({value:M,label:ne})=>{var W;return y.jsx(it,{variant:(W=f.types)!=null&&W.includes(M)?"default":"outline",size:"sm",onClick:()=>P(M),children:ne},M)})}),y.jsxs(dr,{value:((O=f.statuses)==null?void 0:O.join(","))||"all",onValueChange:M=>{h(M==="all"?{...f,statuses:void 0,page:1}:{...f,statuses:M.split(","),page:1})},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Status"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Statuses"}),Pd.map(M=>y.jsx(nn,{value:M,children:na[M]},M))]})]}),y.jsxs(dr,{value:((Y=f.priorities)==null?void 0:Y.join(","))||"all",onValueChange:M=>{h(M==="all"?{...f,priorities:void 0,page:1}:{...f,priorities:M.split(",").map(Number),page:1})},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Priority"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Priorities"}),Object.entries(Nd).map(([M,ne])=>y.jsxs(nn,{value:M,children:["P",M," - ",ne]},M))]})]}),y.jsxs(dr,{value:f.sort||"created:desc",onValueChange:M=>h({...f,sort:M,page:1}),children:[y.jsx(hr,{className:"w-[180px]",children:y.jsx(fr,{})}),y.jsx(pr,{children:Xp.map(({value:M,label:ne})=>y.jsx(nn,{value:M,children:ne},M))})]}),A&&y.jsxs(it,{variant:"ghost",size:"sm",onClick:R,children:[y.jsx(cd,{className:"h-4 w-4 mr-1"}),"Clear"]})]}),y.jsx("div",{className:"flex-1 overflow-auto border rounded-lg",children:C?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):k?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",k instanceof Error?k.message:"Unknown error"]})}):g!=null&&g.items.length?y.jsxs("table",{className:"w-full",children:[y.jsx("thead",{className:"bg-muted/50 sticky top-0",children:y.jsxs("tr",{className:"text-left text-sm",children:[y.jsx("th",{className:"px-4 py-3 font-medium",children:"ID"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Type"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Title"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Status"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Priority"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Created"})]})}),y.jsx("tbody",{children:g.items.filter(M=>p?M.title.toLowerCase().includes(p.toLowerCase())||M.id.toLowerCase().includes(p.toLowerCase()):!0).map(M=>{var ne,W,U,Q;return y.jsxs("tr",{className:"border-t hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>_(M),children:[y.jsx("td",{className:"px-4 py-3 font-mono text-sm text-muted-foreground",children:M.id}),y.jsx("td",{className:"px-4 py-3",children:y.jsx(lo,{variant:"outline",className:Be(M.type==="epic"&&"border-purple-500 text-purple-500",M.type==="task"&&"border-blue-500 text-blue-500",M.type==="subtask"&&"border-gray-500 text-gray-500"),children:M.type})}),y.jsx("td",{className:"px-4 py-3 max-w-md truncate",children:M.title}),y.jsx("td",{className:"px-4 py-3",children:y.jsx(lo,{style:{backgroundColor:((ne=Lw[M.status])==null?void 0:ne.bg)||"#6b7280",color:((W=Lw[M.status])==null?void 0:W.text)||"#ffffff"},children:na[M.status]||M.status})}),y.jsx("td",{className:"px-4 py-3",children:y.jsxs(lo,{variant:"outline",style:{borderColor:((U=Zc[M.priority])==null?void 0:U.bg)||"#6b7280",color:((Q=Zc[M.priority])==null?void 0:Q.bg)||"#6b7280"},children:["P",M.priority]})}),y.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:T3(M.createdAt)})]},M.id)})})]}):y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"No items found"})})}),g&&g.total>0&&y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[y.jsxs("span",{children:["Showing ",((f.page||1)-1)*(f.limit||20)+1,"-",Math.min((f.page||1)*(f.limit||20),g.total)," of"," ",g.total]}),y.jsxs(dr,{value:(f.limit||20).toString(),onValueChange:M=>h({...f,limit:parseInt(M,10),page:1}),children:[y.jsx(hr,{className:"w-[80px] h-8",children:y.jsx(fr,{})}),y.jsx(pr,{children:F8.map(M=>y.jsx(nn,{value:M.toString(),children:M},M))})]}),y.jsx("span",{children:"per page"})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)-1}),disabled:(f.page||1)<=1,children:[y.jsx(fk,{className:"h-4 w-4"}),"Prev"]}),y.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",f.page||1," of ",j]}),y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)+1}),disabled:(f.page||1)>=j,children:["Next",y.jsx(ad,{className:"h-4 w-4"})]})]})]})]}),y.jsx(zg,{task:S,epics:t,allTasks:e,open:S!==null,onClose:u,onUpdate:n,onTaskClick:M=>a(M.id),onEpicClick:M=>{u(),l(M.id)}}),y.jsx(Mg,{epic:E,tasks:E?e.filter(M=>M.epicId===E.id):[],open:E!==null,onClose:d,onUpdate:n,onTaskClick:M=>{d();const ne=e.find(W=>W.id===M.id);ne&&a(ne.id)}})]})}function V8({event:e,onEntityClick:t}){var l,u;const n=(l=e.changes)==null?void 0:l.title,r=((u=e.snapshot)==null?void 0:u.title)||(n?n.to||n.from:null),o=r?String(r):null,a=e.action!=="delete"&&["epic","task","subtask"].includes(e.entityType);return y.jsxs("div",{className:"flex gap-3 p-4 border-b last:border-b-0 hover:bg-muted/30 transition-colors",children:[y.jsx("div",{className:"mt-0.5",children:y.jsx(DC,{action:e.action})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("button",{className:Be("font-mono text-sm",a&&"hover:underline cursor-pointer",e.action==="delete"&&"line-through text-muted-foreground"),onClick:()=>a&&t(e.entityType,e.entityId),disabled:!a,children:e.entityId}),y.jsxs("span",{className:Be("text-sm font-medium",zC(e.action)),children:[e.action,"d"]}),y.jsx(lo,{variant:"outline",className:"text-xs",children:e.entityType})]}),o&&y.jsx("p",{className:Be("text-sm mb-2",e.action==="delete"&&"line-through text-muted-foreground"),children:o}),e.changes&&Object.keys(e.changes).length>0&&y.jsx("div",{className:"text-xs space-y-1",children:Object.entries(e.changes).map(([d,f])=>y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsxs("span",{className:"font-medium",children:[d,":"]}),y.jsx("span",{className:"line-through",children:String(f.from)}),y.jsx("span",{children:"→"}),y.jsx("span",{className:"text-foreground",children:String(f.to)})]},d))})]}),y.jsx("div",{className:"text-xs text-muted-foreground whitespace-nowrap",children:Fl(e.timestamp)})]})}const fb=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"},{value:"comment",label:"Comment"},{value:"dependency",label:"Dependency"}],hb=[{value:"create",label:"Created",icon:ud},{value:"update",label:"Updated",icon:Cm},{value:"delete",label:"Deleted",icon:Em}];function B8(){var _,P,R,A;const{tasks:e,epics:t,refetch:n}=sd(),{selectedTaskId:r,selectedEpicId:o,openTaskDetail:a,openEpicDetail:l,closeTaskDetail:u,closeEpicDetail:d}=Xs(),[f,h]=b.useState({limit:50,page:1}),{data:p,isLoading:x,error:g}=HE(f),C=r&&e.find(j=>j.id===r)||null,k=o&&t.find(j=>j.id===o)||null,S=(j,F)=>{j==="epic"?l(F):(j==="task"||j==="subtask")&&a(F)},E=p?Math.ceil(p.total/(f.limit||50)):0;return y.jsxs(y.Fragment,{children:[y.jsxs("main",{className:"flex-1 p-4 flex flex-col gap-4 overflow-hidden",children:[y.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[y.jsxs(dr,{value:((_=f.types)==null?void 0:_.join(","))||"all",onValueChange:j=>{if(j==="all")h({...f,types:void 0,page:1});else{const F=j.split(",").filter(Z=>fb.some(re=>re.value===Z));h({...f,types:F,page:1})}},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Type"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Types"}),fb.map(({value:j,label:F})=>y.jsx(nn,{value:j,children:F},j))]})]}),y.jsxs(dr,{value:((P=f.actions)==null?void 0:P.join(","))||"all",onValueChange:j=>{if(j==="all")h({...f,actions:void 0,page:1});else{const F=j.split(",").filter(Z=>hb.some(re=>re.value===Z));h({...f,actions:F,page:1})}},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Action"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Actions"}),hb.map(({value:j,label:F})=>y.jsx(nn,{value:j,children:F},j))]})]}),y.jsx("input",{type:"date",className:"h-9 px-3 text-sm border rounded-md bg-background",value:((R=f.since)==null?void 0:R.split("T")[0])||"",onChange:j=>h({...f,since:j.target.value?`${j.target.value}T00:00:00Z`:void 0,page:1}),placeholder:"Since"}),y.jsx("input",{type:"date",className:"h-9 px-3 text-sm border rounded-md bg-background",value:((A=f.until)==null?void 0:A.split("T")[0])||"",onChange:j=>h({...f,until:j.target.value?`${j.target.value}T23:59:59Z`:void 0,page:1}),placeholder:"Until"})]}),y.jsx("div",{className:"flex-1 overflow-auto border rounded-lg",children:x?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):g?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",g instanceof Error?g.message:"Unknown error"]})}):p!=null&&p.events.length?y.jsx("div",{children:p.events.map(j=>y.jsx(V8,{event:j,onEntityClick:S},j.id))}):y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"No events found"})})}),p&&p.total>0&&y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",((f.page||1)-1)*(f.limit||50)+1,"-",Math.min((f.page||1)*(f.limit||50),p.total)," of ",p.total," ","events"]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)-1}),disabled:(f.page||1)<=1,children:[y.jsx(fk,{className:"h-4 w-4"}),"Prev"]}),y.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",f.page||1," of ",E]}),y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)+1}),disabled:(f.page||1)>=E,children:["Next",y.jsx(ad,{className:"h-4 w-4"})]})]})]})]}),y.jsx(zg,{task:C,epics:t,allTasks:e,open:C!==null,onClose:u,onUpdate:n,onTaskClick:j=>a(j.id),onEpicClick:j=>{u(),l(j.id)}}),y.jsx(Mg,{epic:k,tasks:k?e.filter(j=>j.epicId===k.id):[],open:k!==null,onClose:d,onUpdate:n,onTaskClick:j=>{d();const F=e.find(Z=>Z.id===j.id);F&&a(F.id)}})]})}function U8(){const{tasks:e,epics:t,project:n,refetch:r}=sd(),{connectionStatus:o,showCreateModal:a,createModalDefaults:l,openCreateModal:u,closeCreateModal:d}=Xs();return y.jsxs("div",{className:"min-h-screen flex flex-col",children:[y.jsx(VA,{projectName:n==null?void 0:n.name,onNewClick:()=>u({status:"todo"})}),y.jsxs(WP,{children:[y.jsx(vc,{path:"/",element:y.jsx(D8,{})}),y.jsx(vc,{path:"/list",element:y.jsx($8,{})}),y.jsx(vc,{path:"/history",element:y.jsx(B8,{})})]}),y.jsx("footer",{className:"px-4 py-2 border-t",children:y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.length," tasks across ",t.length," epics"]}),y.jsx(UA,{status:o})]})}),y.jsx(o3,{open:a,onClose:d,onCreated:r,epics:t,tasks:e,defaultStatus:l.status||"todo"})]})}function H8({children:e}){const[t]=b.useState(()=>new qN({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1}}}));return y.jsx(QN,{client:t,children:y.jsxs(f2,{defaultTheme:"system",disableTransitionOnChange:!0,children:[y.jsx(IA,{delayDuration:300,children:e}),y.jsx(L4,{position:"bottom-right",richColors:!0})]})})}qT.createRoot(document.getElementById("root")).render(y.jsx(le.StrictMode,{children:y.jsx(mN,{children:y.jsx(H8,{children:y.jsx(U8,{})})})}));
|
|
342
|
+
`))}function d(g,C,k,S){const E=k.enter("tableCell"),_=k.enter("phrasing"),P=k.containerPhrasing(g,{...S,before:a,after:a});return _(),E(),P}function f(g,C){return V9(g,{align:C,alignDelimiters:r,padding:n,stringLength:o})}function h(g,C,k){const S=g.children;let E=-1;const _=[],P=C.enter("table");for(;++E<S.length;)_[E]=p(S[E],C,k);return P(),_}function p(g,C,k){const S=g.children;let E=-1;const _=[],P=C.enter("tableRow");for(;++E<S.length;)_[E]=d(S[E],g,C,k);return P(),_}function x(g,C,k){let S=IE.inlineCode(g,C,k);return k.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function PU(){return{exit:{taskListCheckValueChecked:lb,taskListCheckValueUnchecked:lb,paragraph:jU}}}function NU(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RU}}}function lb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function jU(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,l;for(;++a<o.length;){const u=o[a];if(u.type==="paragraph"){l=u;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function RU(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(l);let d=IE.listItem(e,t,n,{...r,...u.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+l}}function IU(){return[c9(),R9(),D9(),bU(),PU()]}function AU(e){return{extensions:[d9(),I9(e),z9(),TU(e),NU()]}}const OU={tokenize:$U,partial:!0},AE={tokenize:VU,partial:!0},OE={tokenize:BU,partial:!0},DE={tokenize:UU,partial:!0},DU={tokenize:HU,partial:!0},zE={name:"wwwAutolink",tokenize:LU,previous:LE},ME={name:"protocolAutolink",tokenize:FU,previous:FE},Ti={name:"emailAutolink",tokenize:MU,previous:$E},ii={};function zU(){return{text:ii}}let Ro=48;for(;Ro<123;)ii[Ro]=Ti,Ro++,Ro===58?Ro=65:Ro===91&&(Ro=97);ii[43]=Ti;ii[45]=Ti;ii[46]=Ti;ii[95]=Ti;ii[72]=[Ti,ME];ii[104]=[Ti,ME];ii[87]=[Ti,zE];ii[119]=[Ti,zE];function MU(e,t,n){const r=this;let o,a;return l;function l(p){return!um(p)||!$E.call(r,r.previous)||Og(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return um(p)?(e.consume(p),u):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(DU,h,f)(p):p===45||p===95||fn(p)?(a=!0,e.consume(p),d):h(p)}function f(p){return e.consume(p),o=!0,d}function h(p){return a&&o&&En(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function LU(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!LE.call(r,r.previous)||Og(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(OU,e.attempt(AE,e.attempt(OE,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function FU(e,t,n){const r=this;let o="",a=!1;return l;function l(p){return(p===72||p===104)&&FE.call(r,r.previous)&&!Og(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(En(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const x=o.toLowerCase();if(x==="http"||x==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),a?f:(a=!0,d)):n(p)}function f(p){return p===null||Jc(p)||ht(p)||Xo(p)||Fd(p)?n(p):e.attempt(AE,e.attempt(OE,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function $U(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function VU(e,t,n){let r,o,a;return l;function l(f){return f===46||f===95?e.check(DE,d,u)(f):f===null||ht(f)||Xo(f)||f!==45&&Fd(f)?d(f):(a=!0,e.consume(f),l)}function u(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),l}function d(f){return o||r||!a?n(f):t(f)}}function BU(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(DE,t,a)(l):l===null||ht(l)||Xo(l)?t(l):(e.consume(l),o)}function a(l){return l===41&&r++,e.consume(l),o}}function UU(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),o):u===60||u===null||ht(u)||Xo(u)?t(u):n(u)}function o(u){return u===null||u===40||u===91||ht(u)||Xo(u)?t(u):r(u)}function a(u){return En(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):En(u)?(e.consume(u),l):n(u)}}function HU(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return fn(a)?n(a):t(a)}}function LE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function FE(e){return!En(e)}function $E(e){return!(e===47||um(e))}function um(e){return e===43||e===45||e===46||e===95||fn(e)}function Og(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const WU={tokenize:JU,partial:!0};function ZU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:KU,continuation:{tokenize:GU},exit:XU}},text:{91:{name:"gfmFootnoteCall",tokenize:YU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:qU,resolveTo:QU}}}}function qU(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!l||!l._balanced)return n(d);const f=Or(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function QU(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function YU(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(a>999||p===93&&!l||p===null||p===91||ht(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return o.includes(Or(r.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return ht(p)||(l=!0),a++,e.consume(p),p===92?h:f}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function KU(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,u;return d;function d(C){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(C){return C===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(C)}function h(C){if(l>999||C===93&&!u||C===null||C===91||ht(C))return n(C);if(C===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=Or(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return ht(C)||(u=!0),l++,e.consume(C),C===92?p:h}function p(C){return C===91||C===92||C===93?(e.consume(C),l++,h):h(C)}function x(C){return C===58?(e.enter("definitionMarker"),e.consume(C),e.exit("definitionMarker"),o.includes(a)||o.push(a),Xe(e,g,"gfmFootnoteDefinitionWhitespace")):n(C)}function g(C){return t(C)}}function GU(e,t,n){return e.check(Vl,t,e.attempt(WU,t,n))}function XU(e){e.exit("gfmFootnoteDefinition")}function JU(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function e8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,u){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},p={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},x=[["enter",h,u],["enter",l[f][1],u],["exit",l[f][1],u],["enter",p,u]],g=u.parser.constructs.insideSpan.null;g&&er(x,x.length,0,$d(g,l.slice(f+1,d),u)),er(x,x.length,0,[["exit",p,u],["enter",l[d][1],u],["exit",l[d][1],u],["exit",h,u]]),er(l,f-1,d-f+3,x),d=f+x.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,u,d){const f=this.previous,h=this.events;let p=0;return x;function x(C){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(C):(l.enter("strikethroughSequenceTemporary"),g(C))}function g(C){const k=ra(f);if(C===126)return p>1?d(C):(l.consume(C),p++,g);if(p<2&&!n)return d(C);const S=l.exit("strikethroughSequenceTemporary"),E=ra(C);return S._open=!E||E===2&&!!k,S._close=!k||k===2&&!!E,u(C)}}}class t8{constructor(){this.map=[]}add(t,n,r){n8(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function n8(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function r8(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function i8(){return{flow:{null:{name:"table",tokenize:o8,resolveAll:s8}}}}function o8(e,t,n){const r=this;let o=0,a=0,l;return u;function u(O){let Y=r.events.length-1;for(;Y>-1;){const W=r.events[Y][1].type;if(W==="lineEnding"||W==="linePrefix")Y--;else break}const M=Y>-1?r.events[Y][1].type:null,ne=M==="tableHead"||M==="tableRow"?j:d;return ne===j&&r.parser.lazy[r.now().line]?n(O):ne(O)}function d(O){return e.enter("tableHead"),e.enter("tableRow"),f(O)}function f(O){return O===124||(l=!0,a+=1),h(O)}function h(O){return O===null?n(O):$e(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),g):n(O):Ke(O)?Xe(e,h,"whitespace")(O):(a+=1,l&&(l=!1,o+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),p(O)))}function p(O){return O===null||O===124||ht(O)?(e.exit("data"),h(O)):(e.consume(O),O===92?x:p)}function x(O){return O===92||O===124?(e.consume(O),p):p(O)}function g(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),l=!1,Ke(O)?Xe(e,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):C(O))}function C(O){return O===45||O===58?S(O):O===124?(l=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),k):A(O)}function k(O){return Ke(O)?Xe(e,S,"whitespace")(O):S(O)}function S(O){return O===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),E):O===45?(a+=1,E(O)):O===null||$e(O)?R(O):A(O)}function E(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):A(O)}function _(O){return O===45?(e.consume(O),_):O===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),P):(e.exit("tableDelimiterFiller"),P(O))}function P(O){return Ke(O)?Xe(e,R,"whitespace")(O):R(O)}function R(O){return O===124?C(O):O===null||$e(O)?!l||o!==a?A(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):A(O)}function A(O){return n(O)}function j(O){return e.enter("tableRow"),F(O)}function F(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),F):O===null||$e(O)?(e.exit("tableRow"),t(O)):Ke(O)?Xe(e,F,"whitespace")(O):(e.enter("data"),Z(O))}function Z(O){return O===null||O===124||ht(O)?(e.exit("data"),F(O)):(e.consume(O),O===92?re:Z)}function re(O){return O===92||O===124?(e.consume(O),Z):Z(O)}}function s8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],l=[0,0,0,0],u=!1,d=0,f,h,p;const x=new t8;for(;++n<e.length;){const g=e[n],C=g[1];g[0]==="enter"?C.type==="tableHead"?(u=!1,d!==0&&(ub(x,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},x.add(n,0,[["enter",f,t]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(r=!0,p=void 0,a=[0,0,0,0],l=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},x.add(n,0,[["enter",h,t]])),o=C.type==="tableDelimiterRow"?2:h?3:1):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],p=yc(x,t,a,o,void 0,p),a=[0,0,0,0]),l[2]=n)):C.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],p=yc(x,t,a,o,void 0,p)),a=l,l=[a[1],n,0,0])):C.type==="tableHead"?(u=!0,d=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],p=yc(x,t,a,o,n,p)):l[1]!==0&&(p=yc(x,t,l,o,n,p)),o=0):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&ub(x,t,d,f,h),x.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=r8(t.events,n))}return e}function yc(e,t,n,r,o,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Os(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Os(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=Os(t.events,n[2]),h=Os(t.events,n[3]),p={type:u,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const x=t.events[n[2]],g=t.events[n[3]];if(x[1].end=Object.assign({},g[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,k=n[3]-n[2]-1;e.add(C,k,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return o!==void 0&&(a.end=Object.assign({},Os(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function ub(e,t,n,r,o){const a=[],l=Os(t.events,n);o&&(o.end=Object.assign({},l),a.push(["exit",o,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function Os(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const a8={name:"tasklistCheck",tokenize:u8};function l8(){return{text:{91:a8}}}function u8(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ht(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return $e(d)?t(d):Ke(d)?e.check({tokenize:c8},t,n)(d):n(d)}}function c8(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function d8(e){return GC([zU(),ZU(),e8(e),i8(),l8()])}const f8={};function h8(e){const t=this,n=e||f8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(d8(n)),a.push(IU()),l.push(AU(n))}function p8({content:e,className:t}){return y.jsx("div",{className:Be("prose prose-sm dark:prose-invert max-w-none break-words","prose-headings:font-semibold prose-headings:text-foreground","prose-p:text-muted-foreground prose-p:leading-relaxed","prose-a:text-primary prose-a:no-underline hover:prose-a:underline","prose-code:bg-muted prose-code:text-foreground prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-sm prose-code:before:content-none prose-code:after:content-none","prose-pre:bg-muted prose-pre:text-foreground prose-pre:border prose-pre:overflow-x-auto","prose-ul:text-muted-foreground prose-ol:text-muted-foreground","prose-li:marker:text-muted-foreground","prose-blockquote:border-l-primary prose-blockquote:text-muted-foreground","prose-table:text-sm","prose-th:text-left prose-th:font-semibold","prose-td:border prose-th:border",t),children:y.jsx(e9,{remarkPlugins:[h8],children:e})})}function VE({open:e,onClose:t,breadcrumbItems:n,title:r,description:o,onEdit:a,children:l}){return y.jsx(mg,{open:e,onOpenChange:u=>!u&&t(),children:y.jsxs(gg,{className:"max-w-4xl p-0 gap-0 max-h-[90vh] overflow-hidden",children:[y.jsx("div",{className:"p-4 border-b flex items-center justify-between",children:y.jsx(zC,{items:n})}),y.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)]",children:y.jsxs("div",{className:"flex flex-col min-w-0",children:[y.jsxs("div",{className:"px-4 pt-4 pb-2 flex justify-between items-start",children:[y.jsx("h2",{className:"text-xl font-semibold",children:r}),y.jsxs(it,{variant:"ghost",size:"sm",onClick:a,children:[y.jsx(Cm,{className:"mr-1 h-4 w-4"}),"Edit"]})]}),y.jsxs("div",{className:"px-4 pb-4",children:[y.jsx("h4",{className:"text-xs uppercase text-muted-foreground font-semibold mb-2",children:"Description"}),o?y.jsx(p8,{content:o}):y.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No description"})]}),l]})})]})})}function BE({open:e,onClose:t,breadcrumbItems:n,formId:r,isSubmitting:o,isDeleting:a,entityName:l,onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h,children:p}){return y.jsx(mg,{open:e,onOpenChange:x=>!x&&t(),children:y.jsxs(gg,{className:"max-w-lg p-0 gap-0 max-h-[90vh] overflow-hidden",children:[y.jsx("div",{className:"flex items-center border-b p-4",children:y.jsx(zC,{items:n})}),y.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-140px)]",children:p}),y.jsxs("div",{className:"p-4 border-t flex items-center justify-between",children:[y.jsx(z3,{isConfirming:a,entityName:l,onDelete:d,onConfirm:f,onCancel:h}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(it,{type:"button",variant:"outline",size:"sm",onClick:u,children:"Cancel"}),y.jsx(it,{type:"submit",form:r,size:"sm",disabled:o,children:o?"Saving...":"Save"})]})]})]})})}function m8({task:e,onStatusChange:t,onPriorityChange:n,onEpicClick:r,getEpicById:o}){const a=e.epicId?o(e.epicId):null,l=e.tags?e.tags.split(",").map(d=>d.trim()):[],u=()=>{a&&r&&r(a)};return y.jsxs("div",{children:[y.jsx(bl,{children:"Details"}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Status"}),y.jsx(Md,{value:e.status,onChange:t,statuses:Pd,triggerClassName:"w-auto h-8 text-right"})]}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Priority"}),y.jsx(Ld,{value:e.priority,onChange:n,triggerClassName:"w-auto h-8 text-right"})]}),a&&y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Epic"}),y.jsxs("button",{className:"flex items-center gap-0.5 text-sm text-purple-500 hover:text-purple-600",onClick:u,children:[a.id,y.jsx(ad,{className:"h-3 w-3"})]})]}),l.length>0&&y.jsxs("div",{children:[y.jsx("span",{className:"text-sm text-muted-foreground mb-1 block",children:"Tags"}),y.jsx("div",{className:"flex flex-wrap gap-1",children:l.map(d=>y.jsx(lo,{variant:"secondary",className:"text-xs",children:d},d))})]})]})]})}function cb({taskId:e,variant:t,onClick:n}){const r=t==="depends"?ak:lk;return y.jsxs("button",{className:Be("inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-mono","transition-colors hover:ring-1",t==="depends"&&"bg-amber-500/10 text-amber-600 dark:text-amber-400 hover:ring-amber-500/50",t==="blocks"&&"bg-rose-500/10 text-rose-600 dark:text-rose-400 hover:ring-rose-500/50"),onClick:n,title:t==="depends"?"Depends on this task":"Blocks this task",children:[y.jsx(r,{className:"h-3 w-3"}),e]})}function g8({dependsOn:e,blocks:t,onTaskClick:n,getTaskById:r}){if(!(e.length>0||t.length>0))return null;const a=l=>{const u=r(l);u&&n&&n(u)};return y.jsxs("div",{children:[y.jsx(bl,{children:"Dependencies"}),y.jsxs("div",{className:"space-y-2",children:[e.length>0&&y.jsxs("div",{children:[y.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1.5 block",children:"Depends on"}),y.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map(l=>y.jsx(cb,{taskId:l,variant:"depends",onClick:()=>a(l)},l))})]}),t.length>0&&y.jsxs("div",{children:[y.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1.5 block",children:"Blocks"}),y.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(l=>y.jsx(cb,{taskId:l,variant:"blocks",onClick:()=>a(l)},l))})]})]})]})}const y8=["completed","archived","wont_fix"];function cm(e){return y8.includes(e)}function v8({subtask:e,onClick:t}){const n=cm(e.status);return y.jsxs(it,{variant:"ghost",className:"w-full justify-start h-auto p-1.5 gap-2",onClick:t,children:[y.jsx(IC,{status:e.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:e.id}),y.jsx("span",{className:Be("text-sm flex-1 text-left truncate",n&&"line-through text-muted-foreground"),children:e.title})]})}function x8({subtasks:e,onTaskClick:t}){if(e.length===0)return null;const n=e.filter(r=>r.status==="completed").length;return y.jsxs("div",{children:[y.jsx(bl,{count:{current:n,total:e.length},children:"Subtasks"}),y.jsx("div",{className:"space-y-1",children:e.map(r=>y.jsx(v8,{subtask:r,onClick:()=>t==null?void 0:t(r)},r.id))})]})}function w8({taskId:e}){const[t,n]=b.useState([]),[r,o]=b.useState(!0),[a,l]=b.useState(""),[u,d]=b.useState(""),[f,h]=b.useState(!1);b.useEffect(()=>{const C=localStorage.getItem("trekker-comment-author");C&&l(C)},[]),b.useEffect(()=>{p()},[e]);const p=async()=>{try{const C=await fetch(`/api/tasks/${e}/comments`);if(C.ok){const k=await C.json();n(k)}}catch(C){console.error("Failed to fetch comments:",C)}finally{o(!1)}},x=async()=>{if(!a.trim()||!u.trim()){Ct.error("Author and content are required");return}h(!0);try{localStorage.setItem("trekker-comment-author",a);const C=await fetch(`/api/tasks/${e}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({author:a,content:u})});if(!C.ok){const S=await C.json();throw new Error(S.error||"Failed to add comment")}const k=await C.json();n([...t,k]),d(""),Ct.success("Comment added")}catch(C){Ct.error(C instanceof Error?C.message:"Failed to add comment")}finally{h(!1)}},g=async C=>{try{if(!(await fetch(`/api/comments/${C}`,{method:"DELETE"})).ok)throw new Error("Failed to delete comment");n(t.filter(S=>S.id!==C)),Ct.success("Comment deleted")}catch{Ct.error("Failed to delete comment")}};return y.jsxs("div",{className:"p-4 mt-4 border-t",children:[y.jsxs("h4",{className:"text-sm font-medium mb-3",children:["Comments ",t.length>0&&`(${t.length})`]}),r?y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):y.jsxs(y.Fragment,{children:[t.length>0&&y.jsx("div",{className:"space-y-3 mb-4",children:t.map(C=>y.jsxs("div",{className:"p-3 bg-muted/50 group relative",children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-sm font-medium",children:C.author}),y.jsx("span",{className:"text-xs text-muted-foreground",children:Fl(C.createdAt)})]}),y.jsx(it,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>g(C.id),children:y.jsx(Em,{className:"h-3.5 w-3.5"})})]}),y.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:C.content})]},C.id))}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ei,{placeholder:"Your name",value:a,onChange:C=>l(C.target.value)}),y.jsx(Ll,{placeholder:"Add a comment...",value:u,onChange:C=>d(C.target.value),rows:2}),y.jsx(it,{size:"sm",onClick:x,disabled:f||!a.trim()||!u.trim(),children:f?"Adding...":"Add Comment"})]})]})]})}async function b8(e){var r,o;const t=new URLSearchParams;e.entityId&&t.set("entityId",e.entityId),(r=e.types)!=null&&r.length&&t.set("type",e.types.join(",")),(o=e.actions)!=null&&o.length&&t.set("action",e.actions.join(",")),e.since&&t.set("since",e.since),e.until&&t.set("until",e.until),e.limit&&t.set("limit",e.limit.toString()),e.page&&t.set("page",e.page.toString());const n=await fetch(`/api/history?${t.toString()}`);if(!n.ok){const a=await n.json();throw new Error(a.error||"Failed to fetch history")}return n.json()}function UE(e){return Al({queryKey:["history",e],queryFn:()=>b8(e)})}function k8({event:e}){return y.jsxs("div",{className:"flex gap-2.5 py-2.5 border-b last:border-b-0",children:[y.jsx("div",{className:"mt-0.5",children:y.jsx(OC,{action:e.action,className:"h-3.5 w-3.5"})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[y.jsxs("span",{className:Be("text-xs font-medium capitalize",DC(e.action)),children:[e.action,"d"]}),y.jsx("span",{className:"text-xs text-muted-foreground",children:Fl(e.timestamp)})]}),e.changes&&Object.keys(e.changes).length>0&&y.jsx("div",{className:"text-xs space-y-0.5",children:Object.entries(e.changes).map(([t,n])=>y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsxs("span",{className:"font-medium",children:[t,":"]}),y.jsx("span",{className:"line-through",children:String(n.from)}),y.jsx("span",{children:"→"}),y.jsx("span",{className:"text-foreground",children:String(n.to)})]},t))}),e.action==="create"&&e.snapshot&&y.jsx("p",{className:"text-xs text-muted-foreground",children:"Task created"})]})]})}function S8({taskId:e}){const{data:t,isLoading:n,error:r}=UE({entityId:e,limit:50});return n?y.jsx("div",{className:"p-4",children:y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}):r?y.jsx("div",{className:"p-4",children:y.jsxs("p",{className:"text-sm text-destructive",children:["Error: ",r instanceof Error?r.message:"Unknown error"]})}):t!=null&&t.events.length?y.jsxs("div",{className:"p-4",children:[y.jsxs("h4",{className:"text-sm font-medium mb-3",children:["History (",t.events.length,")"]}),y.jsx("div",{children:t.events.map(o=>y.jsx(k8,{event:o},o.id))})]}):y.jsx("div",{className:"p-4",children:y.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No history"})})}function C8({task:e,subtasks:t,onStatusChange:n,onPriorityChange:r,onTaskClick:o,onEpicClick:a,getEpicById:l,getTaskById:u}){const[d,f]=b.useState("comments");return y.jsxs("div",{className:"bg-muted/50 rounded-b-md",children:[y.jsxs("div",{className:"p-4 space-y-6",children:[y.jsx(m8,{task:e,onStatusChange:n,onPriorityChange:r,onEpicClick:a,getEpicById:l}),y.jsx(g8,{dependsOn:e.dependsOn,blocks:e.blocks,onTaskClick:o,getTaskById:u}),y.jsx(x8,{subtasks:t,onTaskClick:o}),y.jsx(RC,{createdAt:e.createdAt,updatedAt:e.updatedAt})]}),y.jsxs("div",{className:"border-t",children:[y.jsxs("div",{className:"flex border-b",children:[y.jsxs(it,{variant:"ghost",size:"sm",className:Be("flex-1 rounded-none",d==="comments"&&"bg-accent"),onClick:()=>f("comments"),children:[y.jsx(Qj,{className:"h-4 w-4 mr-1.5"}),"Comments"]}),y.jsxs(it,{variant:"ghost",size:"sm",className:Be("flex-1 rounded-none",d==="history"&&"bg-accent"),onClick:()=>f("history"),children:[y.jsx(hk,{className:"h-4 w-4 mr-1.5"}),"History"]})]}),d==="comments"?y.jsx(w8,{taskId:e.id}):y.jsx(S8,{taskId:e.id})]})]})}function E8({task:e,subtasks:t,breadcrumbItems:n,status:r,priority:o,open:a,onClose:l,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:h,onEpicClick:p,getEpicById:x,getTaskById:g}){return y.jsx(VE,{open:a,onClose:l,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(C8,{task:{...e,status:r,priority:o},subtasks:t,onStatusChange:d,onPriorityChange:f,onTaskClick:h,onEpicClick:p,getEpicById:x,getTaskById:g})})}function _8({form:e,epics:t,breadcrumbItems:n,open:r,isDeleting:o,onClose:a,onSubmit:l,onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h}){const{watch:p,setValue:x,handleSubmit:g,formState:{isSubmitting:C,errors:k}}=e,S=p("title"),E=p("description"),_=p("status"),P=p("priority"),R=p("tags"),A=p("epicId"),j=async F=>{await l(F)&&u()};return y.jsx(BE,{open:r,onClose:a,breadcrumbItems:n,formId:"task-edit-form",isSubmitting:C,isDeleting:o,entityName:"Task",onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h,children:y.jsxs("form",{id:"task-edit-form",onSubmit:g(j),className:"space-y-4 p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Title"}),y.jsx(ei,{value:S,onChange:F=>x("title",F.target.value),placeholder:"Task title",className:"text-lg font-semibold"}),k.title&&y.jsx("p",{className:"text-xs text-destructive",children:k.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(Ll,{value:E,onChange:F=>x("description",F.target.value),placeholder:"Task description",rows:4})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Status"}),y.jsx(Md,{value:_,onChange:F=>x("status",F),statuses:Pd})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Ld,{value:P,onChange:F=>x("priority",F)})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(ei,{value:R,onChange:F=>x("tags",F.target.value),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Epic"}),y.jsxs(dr,{value:A||"none",onValueChange:F=>x("epicId",F==="none"?null:F),children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"none",children:"No Epic"}),t.map(F=>y.jsxs(nn,{value:F.id,children:[F.id,": ",F.title]},F.id))]})]})]})]})})}const T8=dg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:cg().min(0).max(5),tags:Cn(),epicId:Cn().nullable()});function P8({task:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const a=od(),[l,u]=b.useState(!1),d=tg({resolver:ug(T8),values:e?{title:e.title,description:e.description||"",status:e.status,priority:e.priority,tags:e.tags||"",epicId:e.epicId}:{title:"",description:"",status:"todo",priority:2,tags:"",epicId:null},resetOptions:{keepDirtyValues:!1}}),{reset:f,formState:{isSubmitting:h}}=d;return b.useEffect(()=>{u(!1)},[t,n]),{form:d,isSubmitting:h,isDeleting:l,setIsDeleting:u,handleSave:async S=>{if(e)try{const E=await fetch(`/api/tasks/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:S.title.trim(),description:S.description.trim()||null,status:S.status,priority:S.priority,tags:S.tags.trim()||null,epicId:S.epicId||null})});if(!E.ok){const _=await E.json();throw new Error(_.error||"Failed to update task")}return Ct.success("Task updated"),o(),a.invalidateQueries({queryKey:["history"]}),!0}catch(E){return Ct.error(E instanceof Error?E.message:"Failed to update task"),!1}},handleDelete:async()=>{if(e)try{const S=await fetch(`/api/tasks/${e.id}`,{method:"DELETE"});if(!S.ok){const E=await S.json();throw new Error(E.error||"Failed to delete task")}Ct.success("Task deleted"),r(),o(),a.invalidateQueries({queryKey:["history"]})}catch(S){Ct.error(S instanceof Error?S.message:"Failed to delete task")}},handleCancel:()=>{e&&f({title:e.title,description:e.description||"",status:e.status,priority:e.priority,tags:e.tags||"",epicId:e.epicId}),u(!1)},handleStatusChange:async S=>{if(!e)return;const E=d.getValues("status");d.setValue("status",S);try{const _=await fetch(`/api/tasks/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:S})});if(!_.ok){const P=await _.json();throw d.setValue("status",E),new Error(P.error||"Failed to update status")}o(),a.invalidateQueries({queryKey:["history"]})}catch(_){Ct.error(_ instanceof Error?_.message:"Failed to update status")}},handlePriorityChange:async S=>{if(!e)return;const E=d.getValues("priority");d.setValue("priority",S);try{const _=await fetch(`/api/tasks/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:S})});if(!_.ok){const P=await _.json();throw d.setValue("priority",E),new Error(P.error||"Failed to update priority")}o(),a.invalidateQueries({queryKey:["history"]})}catch(_){Ct.error(_ instanceof Error?_.message:"Failed to update priority")}}}}function Dg({task:e,epics:t,allTasks:n,open:r,onClose:o,onUpdate:a,onTaskClick:l,onEpicClick:u}){const[d,f]=b.useState(!1),{form:h,isDeleting:p,setIsDeleting:x,handleSave:g,handleDelete:C,handleCancel:k,handleStatusChange:S,handlePriorityChange:E}=P8({task:e,open:r,isEditing:d,onClose:o,onUpdate:a}),_=b.useCallback(ne=>t.find(W=>W.id===ne),[t]),P=b.useCallback(ne=>n.find(W=>W.id===ne),[n]),R=b.useCallback(ne=>ne?n.find(W=>W.id===ne):null,[n]),A=()=>{f(!1),o()};if(!e)return null;const j=!!e.parentTaskId,F=n.filter(ne=>ne.parentTaskId===e.id),re=(()=>{const ne=[],W=e.epicId?_(e.epicId):null,U=R(e.parentTaskId);return W&&ne.push({id:W.id,title:W.title,type:"epic",onClick:u?()=>u(W):void 0}),U&&ne.push({id:U.id,title:U.title,type:"task",onClick:l?()=>l(U):void 0}),ne.push({id:e.id,title:e.title,type:j?"subtask":"task"}),ne})(),O=h.watch("status"),Y=h.watch("priority"),M=()=>{k(),f(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(E8,{task:e,subtasks:F,breadcrumbItems:re,status:O,priority:Y,open:r&&!d,onClose:A,onEdit:()=>f(!0),onStatusChange:S,onPriorityChange:E,onTaskClick:l,onEpicClick:u,getEpicById:_,getTaskById:P}),y.jsx(_8,{form:h,epics:t,breadcrumbItems:re,open:r&&d,isDeleting:p,onClose:A,onSubmit:g,onCancel:M,onDelete:()=>x(!0),onDeleteConfirm:C,onDeleteCancel:()=>x(!1)})]})}function N8({status:e,priority:t,tasks:n,createdAt:r,updatedAt:o,onStatusChange:a,onPriorityChange:l,onTaskClick:u}){const d=n.filter(h=>!h.parentTaskId),f=d.filter(h=>cm(h.status)).length;return y.jsx("div",{className:"p-4 bg-muted/30 rounded-b-md",children:y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{children:[y.jsx(bl,{children:"Details"}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Status"}),y.jsx(Md,{value:e,onChange:a,statuses:ng,triggerClassName:"w-auto h-8 text-right"})]}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Priority"}),y.jsx(Ld,{value:t,onChange:l,triggerClassName:"w-auto h-8 text-right"})]})]})]}),d.length>0&&y.jsxs("div",{children:[y.jsx(bl,{count:{current:f,total:d.length},children:"Tasks"}),y.jsx("div",{className:"space-y-1",children:d.map(h=>{const p=cm(h.status);return y.jsxs(it,{variant:"ghost",className:"w-full justify-start h-auto p-1.5 gap-2 whitespace-normal",onClick:()=>u==null?void 0:u(h),children:[y.jsx(IC,{status:h.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground shrink-0",children:h.id}),y.jsx("span",{className:Be("text-sm flex-1 text-left wrap-break-words",p&&"line-through text-muted-foreground"),children:h.title})]},h.id)})})]}),y.jsx(RC,{createdAt:r,updatedAt:o})]})})}function j8({epic:e,tasks:t,breadcrumbItems:n,status:r,priority:o,open:a,onClose:l,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:h}){return y.jsx(VE,{open:a,onClose:l,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(N8,{status:r,priority:o,tasks:t,createdAt:e.createdAt,updatedAt:e.updatedAt,onStatusChange:d,onPriorityChange:f,onTaskClick:h})})}function R8({form:e,breadcrumbItems:t,open:n,isDeleting:r,onClose:o,onSubmit:a,onCancel:l,onDelete:u,onDeleteConfirm:d,onDeleteCancel:f}){const{watch:h,setValue:p,handleSubmit:x,formState:{isSubmitting:g,errors:C}}=e,k=h("title"),S=h("description"),E=h("status"),_=h("priority"),P=async R=>{await a(R)&&l()};return y.jsx(BE,{open:n,onClose:o,breadcrumbItems:t,formId:"epic-edit-form",isSubmitting:g,isDeleting:r,entityName:"Epic",onCancel:l,onDelete:u,onDeleteConfirm:d,onDeleteCancel:f,children:y.jsxs("form",{id:"epic-edit-form",onSubmit:x(P),className:"space-y-4 p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Title"}),y.jsx(ei,{value:k,onChange:R=>p("title",R.target.value),placeholder:"Epic title",className:"text-lg font-semibold"}),C.title&&y.jsx("p",{className:"text-xs text-destructive",children:C.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(Ll,{value:S,onChange:R=>p("description",R.target.value),placeholder:"Epic description",rows:4})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Status"}),y.jsx(Md,{value:E,onChange:R=>p("status",R),statuses:ng})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Ld,{value:_,onChange:R=>p("priority",R)})]})]})]})})}const I8=dg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:cg().min(0).max(5)});function A8({epic:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const[a,l]=b.useState(!1),u=tg({resolver:ug(I8),values:e?{title:e.title,description:e.description||"",status:e.status,priority:e.priority}:{title:"",description:"",status:"todo",priority:2},resetOptions:{keepDirtyValues:!1}}),{reset:d,formState:{isSubmitting:f}}=u;return b.useEffect(()=>{l(!1)},[t,n]),{form:u,isSubmitting:f,isDeleting:a,setIsDeleting:l,handleSave:async k=>{if(e)try{const S=await fetch(`/api/epics/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:k.title.trim(),description:k.description.trim()||null,status:k.status,priority:k.priority})});if(!S.ok){const E=await S.json();throw new Error(E.error||"Failed to update epic")}return Ct.success("Epic updated"),o(),!0}catch(S){return Ct.error(S instanceof Error?S.message:"Failed to update epic"),!1}},handleDelete:async()=>{if(e)try{const k=await fetch(`/api/epics/${e.id}`,{method:"DELETE"});if(!k.ok){const S=await k.json();throw new Error(S.error||"Failed to delete epic")}Ct.success("Epic deleted"),r(),o()}catch(k){Ct.error(k instanceof Error?k.message:"Failed to delete epic")}},handleCancel:()=>{e&&d({title:e.title,description:e.description||"",status:e.status,priority:e.priority}),l(!1)},handleStatusChange:async k=>{if(!e)return;const S=u.getValues("status");u.setValue("status",k);try{const E=await fetch(`/api/epics/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:k})});if(!E.ok){const _=await E.json();throw u.setValue("status",S),new Error(_.error||"Failed to update status")}o()}catch(E){Ct.error(E instanceof Error?E.message:"Failed to update status")}},handlePriorityChange:async k=>{if(!e)return;const S=u.getValues("priority");u.setValue("priority",k);try{const E=await fetch(`/api/epics/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:k})});if(!E.ok){const _=await E.json();throw u.setValue("priority",S),new Error(_.error||"Failed to update priority")}o()}catch(E){Ct.error(E instanceof Error?E.message:"Failed to update priority")}}}}function zg({epic:e,tasks:t=[],open:n,onClose:r,onUpdate:o,onTaskClick:a}){const[l,u]=b.useState(!1),{form:d,isDeleting:f,setIsDeleting:h,handleSave:p,handleDelete:x,handleCancel:g,handleStatusChange:C,handlePriorityChange:k}=A8({epic:e,open:n,isEditing:l,onClose:r,onUpdate:o}),S=()=>{u(!1),r()};if(!e)return null;const E=[{id:e.id,title:e.title,type:"epic"}],_=d.watch("status"),P=d.watch("priority"),R=()=>{g(),u(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(j8,{epic:e,tasks:t,breadcrumbItems:E,status:_,priority:P,open:n&&!l,onClose:S,onEdit:()=>u(!0),onStatusChange:C,onPriorityChange:k,onTaskClick:a}),y.jsx(R8,{form:d,breadcrumbItems:E,open:n&&l,isDeleting:f,onClose:S,onSubmit:p,onCancel:R,onDelete:()=>h(!0),onDeleteConfirm:x,onDeleteCancel:()=>h(!1)})]})}function O8({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o="Confirm",cancelLabel:a="Cancel",onConfirm:l,variant:u="default"}){const d=()=>{l(),t(!1)};return y.jsx(mg,{open:e,onOpenChange:t,children:y.jsxs(gg,{className:"sm:max-w-[400px]",children:[y.jsxs(F3,{children:[y.jsx(V3,{children:n}),y.jsx(B3,{children:r})]}),y.jsxs($3,{children:[y.jsx(it,{variant:"outline",onClick:()=>t(!1),children:a}),y.jsx(it,{variant:u==="destructive"?"destructive":"default",onClick:d,children:o})]})]})})}function D8(){const{tasks:e,epics:t,isLoading:n,error:r,refetch:o}=sd(),a=fj(),[l,u]=b.useState(!1),{selectedTaskId:d,selectedEpicId:f,openTaskDetail:h,openEpicDetail:p,openCreateModal:x,closeTaskDetail:g,closeEpicDetail:C}=Xs();s3(o);const k=d&&e.find(E=>E.id===d)||null,S=f&&t.find(E=>E.id===f)||null;return n&&e.length===0?y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):r?y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",r instanceof Error?r.message:"Unknown error"]})}):y.jsxs(y.Fragment,{children:[y.jsx("main",{className:"flex-1 p-4 overflow-x-auto",children:y.jsx(D3,{tasks:e,epics:t,onAddClick:E=>x({status:E}),onTaskClick:E=>h(E.id),onEpicClick:E=>p(E.id),onArchiveAllCompleted:()=>u(!0)})}),y.jsx(O8,{open:l,onOpenChange:u,title:"Archive All Completed",description:"This will move all completed tasks and epics to the archived status. This action can be undone by manually changing their status back.",confirmLabel:"Archive All",onConfirm:()=>a.mutate()}),y.jsx(Dg,{task:k,epics:t,allTasks:e,open:k!==null,onClose:g,onUpdate:o,onTaskClick:E=>h(E.id),onEpicClick:E=>{g(),p(E.id)}}),y.jsx(zg,{epic:S,tasks:S?e.filter(E=>E.epicId===S.id):[],open:S!==null,onClose:C,onUpdate:o,onTaskClick:E=>{C();const _=e.find(P=>P.id===E.id);_&&h(_.id)}})]})}async function z8(e){var r,o,a;const t=new URLSearchParams;(r=e.types)!=null&&r.length&&t.set("type",e.types.join(",")),(o=e.statuses)!=null&&o.length&&t.set("status",e.statuses.join(",")),(a=e.priorities)!=null&&a.length&&t.set("priority",e.priorities.join(",")),e.sort&&t.set("sort",e.sort),e.limit&&t.set("limit",e.limit.toString()),e.page&&t.set("page",e.page.toString()),e.since&&t.set("since",e.since),e.until&&t.set("until",e.until);const n=await fetch(`/api/list?${t.toString()}`);if(!n.ok){const l=await n.json();throw new Error(l.error||"Failed to fetch list")}return n.json()}function M8(e){return Al({queryKey:["list",e],queryFn:()=>z8(e)})}const L8=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"}],F8=[20,50,100];function $8(){var F,Z,re,O,Y;const{tasks:e,epics:t,refetch:n}=sd(),{selectedTaskId:r,selectedEpicId:o,openTaskDetail:a,openEpicDetail:l,closeTaskDetail:u,closeEpicDetail:d}=Xs(),[f,h]=b.useState({limit:20,page:1,sort:"created:desc"}),[p,x]=b.useState(""),{data:g,isLoading:C,error:k}=M8(f),S=r&&e.find(M=>M.id===r)||null,E=o&&t.find(M=>M.id===o)||null,_=M=>{M.type==="epic"?l(M.id):a(M.id)},P=M=>{const ne=f.types||[],W=ne.includes(M)?ne.filter(U=>U!==M):[...ne,M];h({...f,types:W.length?W:void 0,page:1})},R=()=>{h({limit:f.limit,page:1,sort:f.sort}),x("")},A=!!((F=f.types)!=null&&F.length||(Z=f.statuses)!=null&&Z.length||(re=f.priorities)!=null&&re.length),j=g?Math.ceil(g.total/(f.limit||20)):0;return y.jsxs(y.Fragment,{children:[y.jsxs("main",{className:"flex-1 p-4 flex flex-col gap-4 overflow-hidden",children:[y.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[y.jsxs("div",{className:"relative w-64",children:[y.jsx(nR,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),y.jsx(ei,{placeholder:"Search...",value:p,onChange:M=>x(M.target.value),className:"pl-9"})]}),y.jsx("div",{className:"flex gap-1",children:L8.map(({value:M,label:ne})=>{var W;return y.jsx(it,{variant:(W=f.types)!=null&&W.includes(M)?"default":"outline",size:"sm",onClick:()=>P(M),children:ne},M)})}),y.jsxs(dr,{value:((O=f.statuses)==null?void 0:O.join(","))||"all",onValueChange:M=>{h(M==="all"?{...f,statuses:void 0,page:1}:{...f,statuses:M.split(","),page:1})},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Status"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Statuses"}),Pd.map(M=>y.jsx(nn,{value:M,children:na[M]},M))]})]}),y.jsxs(dr,{value:((Y=f.priorities)==null?void 0:Y.join(","))||"all",onValueChange:M=>{h(M==="all"?{...f,priorities:void 0,page:1}:{...f,priorities:M.split(",").map(Number),page:1})},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Priority"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Priorities"}),Object.entries(Nd).map(([M,ne])=>y.jsxs(nn,{value:M,children:["P",M," - ",ne]},M))]})]}),y.jsxs(dr,{value:f.sort||"created:desc",onValueChange:M=>h({...f,sort:M,page:1}),children:[y.jsx(hr,{className:"w-[180px]",children:y.jsx(fr,{})}),y.jsx(pr,{children:Xp.map(({value:M,label:ne})=>y.jsx(nn,{value:M,children:ne},M))})]}),A&&y.jsxs(it,{variant:"ghost",size:"sm",onClick:R,children:[y.jsx(cd,{className:"h-4 w-4 mr-1"}),"Clear"]})]}),y.jsx("div",{className:"flex-1 overflow-auto border rounded-lg",children:C?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):k?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",k instanceof Error?k.message:"Unknown error"]})}):g!=null&&g.items.length?y.jsxs("table",{className:"w-full",children:[y.jsx("thead",{className:"bg-muted/50 sticky top-0",children:y.jsxs("tr",{className:"text-left text-sm",children:[y.jsx("th",{className:"px-4 py-3 font-medium",children:"ID"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Type"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Title"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Status"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Priority"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Created"})]})}),y.jsx("tbody",{children:g.items.filter(M=>p?M.title.toLowerCase().includes(p.toLowerCase())||M.id.toLowerCase().includes(p.toLowerCase()):!0).map(M=>{var ne,W,U,Q;return y.jsxs("tr",{className:"border-t hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>_(M),children:[y.jsx("td",{className:"px-4 py-3 font-mono text-sm text-muted-foreground",children:M.id}),y.jsx("td",{className:"px-4 py-3",children:y.jsx(lo,{variant:"outline",className:Be(M.type==="epic"&&"border-purple-500 text-purple-500",M.type==="task"&&"border-blue-500 text-blue-500",M.type==="subtask"&&"border-gray-500 text-gray-500"),children:M.type})}),y.jsx("td",{className:"px-4 py-3 max-w-md truncate",children:M.title}),y.jsx("td",{className:"px-4 py-3",children:y.jsx(lo,{style:{backgroundColor:((ne=Mw[M.status])==null?void 0:ne.bg)||"#6b7280",color:((W=Mw[M.status])==null?void 0:W.text)||"#ffffff"},children:na[M.status]||M.status})}),y.jsx("td",{className:"px-4 py-3",children:y.jsxs(lo,{variant:"outline",style:{borderColor:((U=Zc[M.priority])==null?void 0:U.bg)||"#6b7280",color:((Q=Zc[M.priority])==null?void 0:Q.bg)||"#6b7280"},children:["P",M.priority]})}),y.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:T3(M.createdAt)})]},M.id)})})]}):y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"No items found"})})}),g&&g.total>0&&y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[y.jsxs("span",{children:["Showing ",((f.page||1)-1)*(f.limit||20)+1,"-",Math.min((f.page||1)*(f.limit||20),g.total)," of"," ",g.total]}),y.jsxs(dr,{value:(f.limit||20).toString(),onValueChange:M=>h({...f,limit:parseInt(M,10),page:1}),children:[y.jsx(hr,{className:"w-[80px] h-8",children:y.jsx(fr,{})}),y.jsx(pr,{children:F8.map(M=>y.jsx(nn,{value:M.toString(),children:M},M))})]}),y.jsx("span",{children:"per page"})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)-1}),disabled:(f.page||1)<=1,children:[y.jsx(dk,{className:"h-4 w-4"}),"Prev"]}),y.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",f.page||1," of ",j]}),y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)+1}),disabled:(f.page||1)>=j,children:["Next",y.jsx(ad,{className:"h-4 w-4"})]})]})]})]}),y.jsx(Dg,{task:S,epics:t,allTasks:e,open:S!==null,onClose:u,onUpdate:n,onTaskClick:M=>a(M.id),onEpicClick:M=>{u(),l(M.id)}}),y.jsx(zg,{epic:E,tasks:E?e.filter(M=>M.epicId===E.id):[],open:E!==null,onClose:d,onUpdate:n,onTaskClick:M=>{d();const ne=e.find(W=>W.id===M.id);ne&&a(ne.id)}})]})}function V8({event:e,onEntityClick:t}){var l,u;const n=(l=e.changes)==null?void 0:l.title,r=((u=e.snapshot)==null?void 0:u.title)||(n?n.to||n.from:null),o=r?String(r):null,a=e.action!=="delete"&&["epic","task","subtask"].includes(e.entityType);return y.jsxs("div",{className:"flex gap-3 p-4 border-b last:border-b-0 hover:bg-muted/30 transition-colors",children:[y.jsx("div",{className:"mt-0.5",children:y.jsx(OC,{action:e.action})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("button",{className:Be("font-mono text-sm",a&&"hover:underline cursor-pointer",e.action==="delete"&&"line-through text-muted-foreground"),onClick:()=>a&&t(e.entityType,e.entityId),disabled:!a,children:e.entityId}),y.jsxs("span",{className:Be("text-sm font-medium",DC(e.action)),children:[e.action,"d"]}),y.jsx(lo,{variant:"outline",className:"text-xs",children:e.entityType})]}),o&&y.jsx("p",{className:Be("text-sm mb-2",e.action==="delete"&&"line-through text-muted-foreground"),children:o}),e.changes&&Object.keys(e.changes).length>0&&y.jsx("div",{className:"text-xs space-y-1",children:Object.entries(e.changes).map(([d,f])=>y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsxs("span",{className:"font-medium",children:[d,":"]}),y.jsx("span",{className:"line-through",children:String(f.from)}),y.jsx("span",{children:"→"}),y.jsx("span",{className:"text-foreground",children:String(f.to)})]},d))})]}),y.jsx("div",{className:"text-xs text-muted-foreground whitespace-nowrap",children:Fl(e.timestamp)})]})}const db=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"},{value:"comment",label:"Comment"},{value:"dependency",label:"Dependency"}],fb=[{value:"create",label:"Created",icon:ud},{value:"update",label:"Updated",icon:Cm},{value:"delete",label:"Deleted",icon:Em}];function B8(){var _,P,R,A;const{tasks:e,epics:t,refetch:n}=sd(),{selectedTaskId:r,selectedEpicId:o,openTaskDetail:a,openEpicDetail:l,closeTaskDetail:u,closeEpicDetail:d}=Xs(),[f,h]=b.useState({limit:50,page:1}),{data:p,isLoading:x,error:g}=UE(f),C=r&&e.find(j=>j.id===r)||null,k=o&&t.find(j=>j.id===o)||null,S=(j,F)=>{j==="epic"?l(F):(j==="task"||j==="subtask")&&a(F)},E=p?Math.ceil(p.total/(f.limit||50)):0;return y.jsxs(y.Fragment,{children:[y.jsxs("main",{className:"flex-1 p-4 flex flex-col gap-4 overflow-hidden",children:[y.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[y.jsxs(dr,{value:((_=f.types)==null?void 0:_.join(","))||"all",onValueChange:j=>{if(j==="all")h({...f,types:void 0,page:1});else{const F=j.split(",").filter(Z=>db.some(re=>re.value===Z));h({...f,types:F,page:1})}},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Type"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Types"}),db.map(({value:j,label:F})=>y.jsx(nn,{value:j,children:F},j))]})]}),y.jsxs(dr,{value:((P=f.actions)==null?void 0:P.join(","))||"all",onValueChange:j=>{if(j==="all")h({...f,actions:void 0,page:1});else{const F=j.split(",").filter(Z=>fb.some(re=>re.value===Z));h({...f,actions:F,page:1})}},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Action"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Actions"}),fb.map(({value:j,label:F})=>y.jsx(nn,{value:j,children:F},j))]})]}),y.jsx("input",{type:"date",className:"h-9 px-3 text-sm border rounded-md bg-background",value:((R=f.since)==null?void 0:R.split("T")[0])||"",onChange:j=>h({...f,since:j.target.value?`${j.target.value}T00:00:00Z`:void 0,page:1}),placeholder:"Since"}),y.jsx("input",{type:"date",className:"h-9 px-3 text-sm border rounded-md bg-background",value:((A=f.until)==null?void 0:A.split("T")[0])||"",onChange:j=>h({...f,until:j.target.value?`${j.target.value}T23:59:59Z`:void 0,page:1}),placeholder:"Until"})]}),y.jsx("div",{className:"flex-1 overflow-auto border rounded-lg",children:x?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):g?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",g instanceof Error?g.message:"Unknown error"]})}):p!=null&&p.events.length?y.jsx("div",{children:p.events.map(j=>y.jsx(V8,{event:j,onEntityClick:S},j.id))}):y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"No events found"})})}),p&&p.total>0&&y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",((f.page||1)-1)*(f.limit||50)+1,"-",Math.min((f.page||1)*(f.limit||50),p.total)," of ",p.total," ","events"]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)-1}),disabled:(f.page||1)<=1,children:[y.jsx(dk,{className:"h-4 w-4"}),"Prev"]}),y.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",f.page||1," of ",E]}),y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)+1}),disabled:(f.page||1)>=E,children:["Next",y.jsx(ad,{className:"h-4 w-4"})]})]})]})]}),y.jsx(Dg,{task:C,epics:t,allTasks:e,open:C!==null,onClose:u,onUpdate:n,onTaskClick:j=>a(j.id),onEpicClick:j=>{u(),l(j.id)}}),y.jsx(zg,{epic:k,tasks:k?e.filter(j=>j.epicId===k.id):[],open:k!==null,onClose:d,onUpdate:n,onTaskClick:j=>{d();const F=e.find(Z=>Z.id===j.id);F&&a(F.id)}})]})}function U8(){const{tasks:e,epics:t,project:n,refetch:r}=sd(),{connectionStatus:o,showCreateModal:a,createModalDefaults:l,openCreateModal:u,closeCreateModal:d}=Xs();return y.jsxs("div",{className:"min-h-screen flex flex-col",children:[y.jsx($A,{projectName:n==null?void 0:n.name,onNewClick:()=>u({status:"todo"})}),y.jsxs(HP,{children:[y.jsx(vc,{path:"/",element:y.jsx(D8,{})}),y.jsx(vc,{path:"/list",element:y.jsx($8,{})}),y.jsx(vc,{path:"/history",element:y.jsx(B8,{})})]}),y.jsx("footer",{className:"px-4 py-2 border-t",children:y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.length," tasks across ",t.length," epics"]}),y.jsx(BA,{status:o})]})}),y.jsx(o3,{open:a,onClose:d,onCreated:r,epics:t,tasks:e,defaultStatus:l.status||"todo"})]})}function H8({children:e}){const[t]=b.useState(()=>new ZN({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1}}}));return y.jsx(qN,{client:t,children:y.jsxs(d2,{defaultTheme:"system",disableTransitionOnChange:!0,children:[y.jsx(RA,{delayDuration:300,children:e}),y.jsx(L4,{position:"bottom-right",richColors:!0})]})})}ZT.createRoot(document.getElementById("root")).render(y.jsx(le.StrictMode,{children:y.jsx(pN,{children:y.jsx(H8,{children:y.jsx(U8,{})})})}));
|