certimate/ui/dist/assets/index-oeLp_5KR.js
2024-08-23 13:58:42 +08:00

229 lines
595 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var bT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var n3=bT((p3,gu)=>{function pw(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 s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{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 s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function mw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gw={exports:{}},gd={},vw={exports:{}},Pe={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Fl=Symbol.for("react.element"),CT=Symbol.for("react.portal"),kT=Symbol.for("react.fragment"),ET=Symbol.for("react.strict_mode"),TT=Symbol.for("react.profiler"),RT=Symbol.for("react.provider"),NT=Symbol.for("react.context"),PT=Symbol.for("react.forward_ref"),jT=Symbol.for("react.suspense"),DT=Symbol.for("react.memo"),MT=Symbol.for("react.lazy"),Av=Symbol.iterator;function OT(e){return e===null||typeof e!="object"?null:(e=Av&&e[Av]||e["@@iterator"],typeof e=="function"?e:null)}var yw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xw=Object.assign,ww={};function Gi(e,t,n){this.props=e,this.context=t,this.refs=ww,this.updater=n||yw}Gi.prototype.isReactComponent={};Gi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Gi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sw(){}Sw.prototype=Gi.prototype;function tm(e,t,n){this.props=e,this.context=t,this.refs=ww,this.updater=n||yw}var nm=tm.prototype=new Sw;nm.constructor=tm;xw(nm,Gi.prototype);nm.isPureReactComponent=!0;var Iv=Array.isArray,_w=Object.prototype.hasOwnProperty,rm={current:null},bw={key:!0,ref:!0,__self:!0,__source:!0};function Cw(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)_w.call(t,r)&&!bw.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Fl,type:e,key:s,ref:i,props:o,_owner:rm.current}}function AT(e,t){return{$$typeof:Fl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function om(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fl}function IT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Lv=/\/+/g;function kf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?IT(""+e.key):t.toString(36)}function Kc(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Fl:case CT:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+kf(i,0):r,Iv(o)?(n="",e!=null&&(n=e.replace(Lv,"$&/")+"/"),Kc(o,t,n,"",function(u){return u})):o!=null&&(om(o)&&(o=AT(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Lv,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",Iv(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+kf(s,a);i+=Kc(s,t,n,l,o)}else if(l=OT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+kf(s,a++),i+=Kc(s,t,n,l,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function yc(e,t,n){if(e==null)return e;var r=[],o=0;return Kc(e,r,"","",function(s){return t.call(n,s,o++)}),r}function LT(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var un={current:null},Zc={transition:null},FT={ReactCurrentDispatcher:un,ReactCurrentBatchConfig:Zc,ReactCurrentOwner:rm};function kw(){throw Error("act(...) is not supported in production builds of React.")}Pe.Children={map:yc,forEach:function(e,t,n){yc(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return yc(e,function(){t++}),t},toArray:function(e){return yc(e,function(t){return t})||[]},only:function(e){if(!om(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Pe.Component=Gi;Pe.Fragment=kT;Pe.Profiler=TT;Pe.PureComponent=tm;Pe.StrictMode=ET;Pe.Suspense=jT;Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FT;Pe.act=kw;Pe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=xw({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=rm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)_w.call(t,l)&&!bw.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Fl,type:e.type,key:o,ref:s,props:r,_owner:i}};Pe.createContext=function(e){return e={$$typeof:NT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:RT,_context:e},e.Consumer=e};Pe.createElement=Cw;Pe.createFactory=function(e){var t=Cw.bind(null,e);return t.type=e,t};Pe.createRef=function(){return{current:null}};Pe.forwardRef=function(e){return{$$typeof:PT,render:e}};Pe.isValidElement=om;Pe.lazy=function(e){return{$$typeof:MT,_payload:{_status:-1,_result:e},_init:LT}};Pe.memo=function(e,t){return{$$typeof:DT,type:e,compare:t===void 0?null:t}};Pe.startTransition=function(e){var t=Zc.transition;Zc.transition={};try{e()}finally{Zc.transition=t}};Pe.unstable_act=kw;Pe.useCallback=function(e,t){return un.current.useCallback(e,t)};Pe.useContext=function(e){return un.current.useContext(e)};Pe.useDebugValue=function(){};Pe.useDeferredValue=function(e){return un.current.useDeferredValue(e)};Pe.useEffect=function(e,t){return un.current.useEffect(e,t)};Pe.useId=function(){return un.current.useId()};Pe.useImperativeHandle=function(e,t,n){return un.current.useImperativeHandle(e,t,n)};Pe.useInsertionEffect=function(e,t){return un.current.useInsertionEffect(e,t)};Pe.useLayoutEffect=function(e,t){return un.current.useLayoutEffect(e,t)};Pe.useMemo=function(e,t){return un.current.useMemo(e,t)};Pe.useReducer=function(e,t,n){return un.current.useReducer(e,t,n)};Pe.useRef=function(e){return un.current.useRef(e)};Pe.useState=function(e){return un.current.useState(e)};Pe.useSyncExternalStore=function(e,t,n){return un.current.useSyncExternalStore(e,t,n)};Pe.useTransition=function(){return un.current.useTransition()};Pe.version="18.3.1";vw.exports=Pe;var h=vw.exports;const Oe=mw(h),Ew=pw({__proto__:null,default:Oe},[h]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var UT=h,$T=Symbol.for("react.element"),VT=Symbol.for("react.fragment"),zT=Object.prototype.hasOwnProperty,WT=UT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,YT={key:!0,ref:!0,__self:!0,__source:!0};function Tw(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)zT.call(t,r)&&!YT.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:$T,type:e,key:s,ref:i,props:o,_owner:WT.current}}gd.Fragment=VT;gd.jsx=Tw;gd.jsxs=Tw;gw.exports=gd;var c=gw.exports,Sh={},Rw={exports:{}},An={},Nw={exports:{}},Pw={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(F,M){var X=F.length;F.push(M);e:for(;0<X;){var le=X-1>>>1,me=F[le];if(0<o(me,M))F[le]=M,F[X]=me,X=le;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var M=F[0],X=F.pop();if(X!==M){F[0]=X;e:for(var le=0,me=F.length,rt=me>>>1;le<rt;){var je=2*(le+1)-1,gt=F[je],Ue=je+1,ce=F[Ue];if(0>o(gt,X))Ue<me&&0>o(ce,gt)?(F[le]=ce,F[Ue]=X,le=Ue):(F[le]=gt,F[je]=X,le=je);else if(Ue<me&&0>o(ce,X))F[le]=ce,F[Ue]=X,le=Ue;else break e}}return M}function o(F,M){var X=F.sortIndex-M.sortIndex;return X!==0?X:F.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],d=1,f=null,p=3,x=!1,g=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(F){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=F)r(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=n(u)}}function b(F){if(y=!1,w(F),!g)if(n(l)!==null)g=!0,ne(C);else{var M=n(u);M!==null&&W(b,M.startTime-F)}}function C(F,M){g=!1,y&&(y=!1,v(N),N=-1),x=!0;var X=p;try{for(w(M),f=n(l);f!==null&&(!(f.expirationTime>M)||F&&!B());){var le=f.callback;if(typeof le=="function"){f.callback=null,p=f.priorityLevel;var me=le(f.expirationTime<=M);M=e.unstable_now(),typeof me=="function"?f.callback=me:f===n(l)&&r(l),w(M)}else r(l);f=n(l)}if(f!==null)var rt=!0;else{var je=n(u);je!==null&&W(b,je.startTime-M),rt=!1}return rt}finally{f=null,p=X,x=!1}}var _=!1,R=null,N=-1,D=5,O=-1;function B(){return!(e.unstable_now()-O<D)}function A(){if(R!==null){var F=e.unstable_now();O=F;var M=!0;try{M=R(!0,F)}finally{M?H():(_=!1,R=null)}}else _=!1}var H;if(typeof m=="function")H=function(){m(A)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,K=L.port2;L.port1.onmessage=A,H=function(){K.postMessage(null)}}else H=function(){S(A,0)};function ne(F){R=F,_||(_=!0,H())}function W(F,M){N=S(function(){F(e.unstable_now())},M)}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(F){F.callback=null},e.unstable_continueExecution=function(){g||x||(g=!0,ne(C))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(F){switch(p){case 1:case 2:case 3:var M=3;break;default:M=p}var X=p;p=M;try{return F()}finally{p=X}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,M){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var X=p;p=F;try{return M()}finally{p=X}},e.unstable_scheduleCallback=function(F,M,X){var le=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?le+X:le):X=le,F){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=X+me,F={id:d++,callback:M,priorityLevel:F,startTime:X,expirationTime:me,sortIndex:-1},X>le?(F.sortIndex=X,t(u,F),n(l)===null&&F===n(u)&&(y?(v(N),N=-1):y=!0,W(b,X-le))):(F.sortIndex=me,t(l,F),g||x||(g=!0,ne(C))),F},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(F){var M=p;return function(){var X=p;p=M;try{return F.apply(this,arguments)}finally{p=X}}}})(Pw);Nw.exports=Pw;var HT=Nw.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var BT=h,On=HT;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var jw=new Set,Ka={};function Us(e,t){Oi(e,t),Oi(e+"Capture",t)}function Oi(e,t){for(Ka[e]=t,e=0;e<t.length;e++)jw.add(t[e])}var eo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_h=Object.prototype.hasOwnProperty,GT=/^[: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]*$/,Fv={},Uv={};function KT(e){return _h.call(Uv,e)?!0:_h.call(Fv,e)?!1:GT.test(e)?Uv[e]=!0:(Fv[e]=!0,!1)}function ZT(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qT(e,t,n,r){if(t===null||typeof t>"u"||ZT(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function dn(e,t,n,r,o,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var Gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Gt[e]=new dn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Gt[t]=new dn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Gt[e]=new dn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Gt[e]=new dn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Gt[e]=new dn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Gt[e]=new dn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Gt[e]=new dn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Gt[e]=new dn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Gt[e]=new dn(e,5,!1,e.toLowerCase(),null,!1,!1)});var sm=/[\-:]([a-z])/g;function im(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(sm,im);Gt[t]=new dn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(sm,im);Gt[t]=new dn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(sm,im);Gt[t]=new dn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Gt[e]=new dn(e,1,!1,e.toLowerCase(),null,!1,!1)});Gt.xlinkHref=new dn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Gt[e]=new dn(e,1,!1,e.toLowerCase(),null,!0,!0)});function am(e,t,n,r){var o=Gt.hasOwnProperty(t)?Gt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(qT(t,n,o,r)&&(n=null),r||o===null?KT(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var uo=BT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,xc=Symbol.for("react.element"),oi=Symbol.for("react.portal"),si=Symbol.for("react.fragment"),lm=Symbol.for("react.strict_mode"),bh=Symbol.for("react.profiler"),Dw=Symbol.for("react.provider"),Mw=Symbol.for("react.context"),cm=Symbol.for("react.forward_ref"),Ch=Symbol.for("react.suspense"),kh=Symbol.for("react.suspense_list"),um=Symbol.for("react.memo"),Ro=Symbol.for("react.lazy"),Ow=Symbol.for("react.offscreen"),$v=Symbol.iterator;function ca(e){return e===null||typeof e!="object"?null:(e=$v&&e[$v]||e["@@iterator"],typeof e=="function"?e:null)}var Ct=Object.assign,Ef;function ka(e){if(Ef===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ef=t&&t[1]||""}return`
`+Ef+e}var Tf=!1;function Rf(e,t){if(!e||Tf)return"";Tf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
`),s=r.stack.split(`
`),i=o.length-1,a=s.length-1;1<=i&&0<=a&&o[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==s[a]){var l=`
`+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Tf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ka(e):""}function XT(e){switch(e.tag){case 5:return ka(e.type);case 16:return ka("Lazy");case 13:return ka("Suspense");case 19:return ka("SuspenseList");case 0:case 2:case 15:return e=Rf(e.type,!1),e;case 11:return e=Rf(e.type.render,!1),e;case 1:return e=Rf(e.type,!0),e;default:return""}}function Eh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case si:return"Fragment";case oi:return"Portal";case bh:return"Profiler";case lm:return"StrictMode";case Ch:return"Suspense";case kh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mw:return(e.displayName||"Context")+".Consumer";case Dw:return(e._context.displayName||"Context")+".Provider";case cm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case um:return t=e.displayName||null,t!==null?t:Eh(e.type)||"Memo";case Ro:t=e._payload,e=e._init;try{return Eh(e(t))}catch{}}return null}function QT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Eh(t);case 8:return t===lm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Go(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Aw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function JT(e){var t=Aw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wc(e){e._valueTracker||(e._valueTracker=JT(e))}function Iw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Aw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Th(e,t){var n=t.checked;return Ct({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Go(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lw(e,t){t=t.checked,t!=null&&am(e,"checked",t,!1)}function Rh(e,t){Lw(e,t);var n=Go(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Nh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Nh(e,t.type,Go(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Nh(e,t,n){(t!=="number"||vu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ea=Array.isArray;function wi(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Go(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ph(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return Ct({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Wv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error($(92));if(Ea(n)){if(1<n.length)throw Error($(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Go(n)}}function Fw(e,t){var n=Go(t.value),r=Go(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Yv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Uw(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Uw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Sc,$w=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Sc=Sc||document.createElement("div"),Sc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Sc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Za(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Oa={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},eR=["Webkit","ms","Moz","O"];Object.keys(Oa).forEach(function(e){eR.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Oa[t]=Oa[e]})});function Vw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Oa.hasOwnProperty(e)&&Oa[e]?(""+t).trim():t+"px"}function zw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Vw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var tR=Ct({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 Dh(e,t){if(t){if(tR[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function Mh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Oh=null;function dm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ah=null,Si=null,_i=null;function Hv(e){if(e=Vl(e)){if(typeof Ah!="function")throw Error($(280));var t=e.stateNode;t&&(t=Sd(t),Ah(e.stateNode,e.type,t))}}function Ww(e){Si?_i?_i.push(e):_i=[e]:Si=e}function Yw(){if(Si){var e=Si,t=_i;if(_i=Si=null,Hv(e),t)for(e=0;e<t.length;e++)Hv(t[e])}}function Hw(e,t){return e(t)}function Bw(){}var Nf=!1;function Gw(e,t,n){if(Nf)return e(t,n);Nf=!0;try{return Hw(e,t,n)}finally{Nf=!1,(Si!==null||_i!==null)&&(Bw(),Yw())}}function qa(e,t){var n=e.stateNode;if(n===null)return null;var r=Sd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error($(231,t,typeof n));return n}var Ih=!1;if(eo)try{var ua={};Object.defineProperty(ua,"passive",{get:function(){Ih=!0}}),window.addEventListener("test",ua,ua),window.removeEventListener("test",ua,ua)}catch{Ih=!1}function nR(e,t,n,r,o,s,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Aa=!1,yu=null,xu=!1,Lh=null,rR={onError:function(e){Aa=!0,yu=e}};function oR(e,t,n,r,o,s,i,a,l){Aa=!1,yu=null,nR.apply(rR,arguments)}function sR(e,t,n,r,o,s,i,a,l){if(oR.apply(this,arguments),Aa){if(Aa){var u=yu;Aa=!1,yu=null}else throw Error($(198));xu||(xu=!0,Lh=u)}}function $s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Kw(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Bv(e){if($s(e)!==e)throw Error($(188))}function iR(e){var t=e.alternate;if(!t){if(t=$s(e),t===null)throw Error($(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Bv(o),e;if(s===r)return Bv(o),t;s=s.sibling}throw Error($(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)throw Error($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?e:t}function Zw(e){return e=iR(e),e!==null?qw(e):null}function qw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=qw(e);if(t!==null)return t;e=e.sibling}return null}var Xw=On.unstable_scheduleCallback,Gv=On.unstable_cancelCallback,aR=On.unstable_shouldYield,lR=On.unstable_requestPaint,Nt=On.unstable_now,cR=On.unstable_getCurrentPriorityLevel,fm=On.unstable_ImmediatePriority,Qw=On.unstable_UserBlockingPriority,wu=On.unstable_NormalPriority,uR=On.unstable_LowPriority,Jw=On.unstable_IdlePriority,vd=null,kr=null;function dR(e){if(kr&&typeof kr.onCommitFiberRoot=="function")try{kr.onCommitFiberRoot(vd,e,void 0,(e.current.flags&128)===128)}catch{}}var sr=Math.clz32?Math.clz32:pR,fR=Math.log,hR=Math.LN2;function pR(e){return e>>>=0,e===0?32:31-(fR(e)/hR|0)|0}var _c=64,bc=4194304;function Ta(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Su(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=Ta(a):(s&=i,s!==0&&(r=Ta(s)))}else i=n&~o,i!==0?r=Ta(i):s!==0&&(r=Ta(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-sr(t),o=1<<n,r|=e[n],t&=~o;return r}function mR(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-sr(s),a=1<<i,l=o[i];l===-1?(!(a&n)||a&r)&&(o[i]=mR(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Fh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function e0(){var e=_c;return _c<<=1,!(_c&4194240)&&(_c=64),e}function Pf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ul(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-sr(t),e[t]=n}function vR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-sr(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function hm(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-sr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Je=0;function t0(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var n0,pm,r0,o0,s0,Uh=!1,Cc=[],Fo=null,Uo=null,$o=null,Xa=new Map,Qa=new Map,Po=[],yR="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 Kv(e,t){switch(e){case"focusin":case"focusout":Fo=null;break;case"dragenter":case"dragleave":Uo=null;break;case"mouseover":case"mouseout":$o=null;break;case"pointerover":case"pointerout":Xa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qa.delete(t.pointerId)}}function da(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Vl(t),t!==null&&pm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function xR(e,t,n,r,o){switch(t){case"focusin":return Fo=da(Fo,e,t,n,r,o),!0;case"dragenter":return Uo=da(Uo,e,t,n,r,o),!0;case"mouseover":return $o=da($o,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Xa.set(s,da(Xa.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Qa.set(s,da(Qa.get(s)||null,e,t,n,r,o)),!0}return!1}function i0(e){var t=ps(e.target);if(t!==null){var n=$s(t);if(n!==null){if(t=n.tag,t===13){if(t=Kw(n),t!==null){e.blockedOn=t,s0(e.priority,function(){r0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=$h(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Oh=r,n.target.dispatchEvent(r),Oh=null}else return t=Vl(n),t!==null&&pm(t),e.blockedOn=n,!1;t.shift()}return!0}function Zv(e,t,n){qc(e)&&n.delete(t)}function wR(){Uh=!1,Fo!==null&&qc(Fo)&&(Fo=null),Uo!==null&&qc(Uo)&&(Uo=null),$o!==null&&qc($o)&&($o=null),Xa.forEach(Zv),Qa.forEach(Zv)}function fa(e,t){e.blockedOn===t&&(e.blockedOn=null,Uh||(Uh=!0,On.unstable_scheduleCallback(On.unstable_NormalPriority,wR)))}function Ja(e){function t(o){return fa(o,e)}if(0<Cc.length){fa(Cc[0],e);for(var n=1;n<Cc.length;n++){var r=Cc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Fo!==null&&fa(Fo,e),Uo!==null&&fa(Uo,e),$o!==null&&fa($o,e),Xa.forEach(t),Qa.forEach(t),n=0;n<Po.length;n++)r=Po[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Po.length&&(n=Po[0],n.blockedOn===null);)i0(n),n.blockedOn===null&&Po.shift()}var bi=uo.ReactCurrentBatchConfig,_u=!0;function SR(e,t,n,r){var o=Je,s=bi.transition;bi.transition=null;try{Je=1,mm(e,t,n,r)}finally{Je=o,bi.transition=s}}function _R(e,t,n,r){var o=Je,s=bi.transition;bi.transition=null;try{Je=4,mm(e,t,n,r)}finally{Je=o,bi.transition=s}}function mm(e,t,n,r){if(_u){var o=$h(e,t,n,r);if(o===null)$f(e,t,r,bu,n),Kv(e,r);else if(xR(o,e,t,n,r))r.stopPropagation();else if(Kv(e,r),t&4&&-1<yR.indexOf(e)){for(;o!==null;){var s=Vl(o);if(s!==null&&n0(s),s=$h(e,t,n,r),s===null&&$f(e,t,r,bu,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else $f(e,t,r,null,n)}}var bu=null;function $h(e,t,n,r){if(bu=null,e=dm(r),e=ps(e),e!==null)if(t=$s(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Kw(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return bu=e,null}function a0(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(cR()){case fm:return 1;case Qw:return 4;case wu:case uR:return 16;case Jw:return 536870912;default:return 16}default:return 16}}var Mo=null,gm=null,Xc=null;function l0(){if(Xc)return Xc;var e,t=gm,n=t.length,r,o="value"in Mo?Mo.value:Mo.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return Xc=o.slice(e,1<r?1-r:void 0)}function Qc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function kc(){return!0}function qv(){return!1}function In(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?kc:qv,this.isPropagationStopped=qv,this}return Ct(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=kc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=kc)},persist:function(){},isPersistent:kc}),t}var Ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vm=In(Ki),$l=Ct({},Ki,{view:0,detail:0}),bR=In($l),jf,Df,ha,yd=Ct({},$l,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ym,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ha&&(ha&&e.type==="mousemove"?(jf=e.screenX-ha.screenX,Df=e.screenY-ha.screenY):Df=jf=0,ha=e),jf)},movementY:function(e){return"movementY"in e?e.movementY:Df}}),Xv=In(yd),CR=Ct({},yd,{dataTransfer:0}),kR=In(CR),ER=Ct({},$l,{relatedTarget:0}),Mf=In(ER),TR=Ct({},Ki,{animationName:0,elapsedTime:0,pseudoElement:0}),RR=In(TR),NR=Ct({},Ki,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),PR=In(NR),jR=Ct({},Ki,{data:0}),Qv=In(jR),DR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MR={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"},OR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=OR[e])?!!t[e]:!1}function ym(){return AR}var IR=Ct({},$l,{key:function(e){if(e.key){var t=DR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?MR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ym,charCode:function(e){return e.type==="keypress"?Qc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),LR=In(IR),FR=Ct({},yd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jv=In(FR),UR=Ct({},$l,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ym}),$R=In(UR),VR=Ct({},Ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),zR=In(VR),WR=Ct({},yd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),YR=In(WR),HR=[9,13,27,32],xm=eo&&"CompositionEvent"in window,Ia=null;eo&&"documentMode"in document&&(Ia=document.documentMode);var BR=eo&&"TextEvent"in window&&!Ia,c0=eo&&(!xm||Ia&&8<Ia&&11>=Ia),ey=" ",ty=!1;function u0(e,t){switch(e){case"keyup":return HR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function d0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ii=!1;function GR(e,t){switch(e){case"compositionend":return d0(t);case"keypress":return t.which!==32?null:(ty=!0,ey);case"textInput":return e=t.data,e===ey&&ty?null:e;default:return null}}function KR(e,t){if(ii)return e==="compositionend"||!xm&&u0(e,t)?(e=l0(),Xc=gm=Mo=null,ii=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return c0&&t.locale!=="ko"?null:t.data;default:return null}}var ZR={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 ny(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ZR[e.type]:t==="textarea"}function f0(e,t,n,r){Ww(r),t=Cu(t,"onChange"),0<t.length&&(n=new vm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var La=null,el=null;function qR(e){b0(e,0)}function xd(e){var t=ci(e);if(Iw(t))return e}function XR(e,t){if(e==="change")return t}var h0=!1;if(eo){var Of;if(eo){var Af="oninput"in document;if(!Af){var ry=document.createElement("div");ry.setAttribute("oninput","return;"),Af=typeof ry.oninput=="function"}Of=Af}else Of=!1;h0=Of&&(!document.documentMode||9<document.documentMode)}function oy(){La&&(La.detachEvent("onpropertychange",p0),el=La=null)}function p0(e){if(e.propertyName==="value"&&xd(el)){var t=[];f0(t,el,e,dm(e)),Gw(qR,t)}}function QR(e,t,n){e==="focusin"?(oy(),La=t,el=n,La.attachEvent("onpropertychange",p0)):e==="focusout"&&oy()}function JR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xd(el)}function eN(e,t){if(e==="click")return xd(t)}function tN(e,t){if(e==="input"||e==="change")return xd(t)}function nN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lr=typeof Object.is=="function"?Object.is:nN;function tl(e,t){if(lr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!_h.call(t,o)||!lr(e[o],t[o]))return!1}return!0}function sy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function iy(e,t){var n=sy(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sy(n)}}function m0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?m0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function g0(){for(var e=window,t=vu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vu(e.document)}return t}function wm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function rN(e){var t=g0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&m0(n.ownerDocument.documentElement,n)){if(r!==null&&wm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=iy(n,s);var i=iy(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var oN=eo&&"documentMode"in document&&11>=document.documentMode,ai=null,Vh=null,Fa=null,zh=!1;function ay(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zh||ai==null||ai!==vu(r)||(r=ai,"selectionStart"in r&&wm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fa&&tl(Fa,r)||(Fa=r,r=Cu(Vh,"onSelect"),0<r.length&&(t=new vm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ai)))}function Ec(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var li={animationend:Ec("Animation","AnimationEnd"),animationiteration:Ec("Animation","AnimationIteration"),animationstart:Ec("Animation","AnimationStart"),transitionend:Ec("Transition","TransitionEnd")},If={},v0={};eo&&(v0=document.createElement("div").style,"AnimationEvent"in window||(delete li.animationend.animation,delete li.animationiteration.animation,delete li.animationstart.animation),"TransitionEvent"in window||delete li.transitionend.transition);function wd(e){if(If[e])return If[e];if(!li[e])return e;var t=li[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in v0)return If[e]=t[n];return e}var y0=wd("animationend"),x0=wd("animationiteration"),w0=wd("animationstart"),S0=wd("transitionend"),_0=new Map,ly="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 ns(e,t){_0.set(e,t),Us(t,[e])}for(var Lf=0;Lf<ly.length;Lf++){var Ff=ly[Lf],sN=Ff.toLowerCase(),iN=Ff[0].toUpperCase()+Ff.slice(1);ns(sN,"on"+iN)}ns(y0,"onAnimationEnd");ns(x0,"onAnimationIteration");ns(w0,"onAnimationStart");ns("dblclick","onDoubleClick");ns("focusin","onFocus");ns("focusout","onBlur");ns(S0,"onTransitionEnd");Oi("onMouseEnter",["mouseout","mouseover"]);Oi("onMouseLeave",["mouseout","mouseover"]);Oi("onPointerEnter",["pointerout","pointerover"]);Oi("onPointerLeave",["pointerout","pointerover"]);Us("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Us("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Us("onBeforeInput",["compositionend","keypress","textInput","paste"]);Us("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Us("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Us("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ra="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(" "),aN=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ra));function cy(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,sR(r,t,void 0,e),e.currentTarget=null}function b0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;cy(o,a,u),s=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;cy(o,a,u),s=l}}}if(xu)throw e=Lh,xu=!1,Lh=null,e}function lt(e,t){var n=t[Gh];n===void 0&&(n=t[Gh]=new Set);var r=e+"__bubble";n.has(r)||(C0(t,e,2,!1),n.add(r))}function Uf(e,t,n){var r=0;t&&(r|=4),C0(n,e,r,t)}var Tc="_reactListening"+Math.random().toString(36).slice(2);function nl(e){if(!e[Tc]){e[Tc]=!0,jw.forEach(function(n){n!=="selectionchange"&&(aN.has(n)||Uf(n,!1,e),Uf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Tc]||(t[Tc]=!0,Uf("selectionchange",!1,t))}}function C0(e,t,n,r){switch(a0(t)){case 1:var o=SR;break;case 4:o=_R;break;default:o=mm}n=o.bind(null,t,n,e),o=void 0,!Ih||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function $f(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=ps(a),i===null)return;if(l=i.tag,l===5||l===6){r=s=i;continue e}a=a.parentNode}}r=r.return}Gw(function(){var u=s,d=dm(n),f=[];e:{var p=_0.get(e);if(p!==void 0){var x=vm,g=e;switch(e){case"keypress":if(Qc(n)===0)break e;case"keydown":case"keyup":x=LR;break;case"focusin":g="focus",x=Mf;break;case"focusout":g="blur",x=Mf;break;case"beforeblur":case"afterblur":x=Mf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=Xv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=kR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=$R;break;case y0:case x0:case w0:x=RR;break;case S0:x=zR;break;case"scroll":x=bR;break;case"wheel":x=YR;break;case"copy":case"cut":case"paste":x=PR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=Jv}var y=(t&4)!==0,S=!y&&e==="scroll",v=y?p!==null?p+"Capture":null:p;y=[];for(var m=u,w;m!==null;){w=m;var b=w.stateNode;if(w.tag===5&&b!==null&&(w=b,v!==null&&(b=qa(m,v),b!=null&&y.push(rl(m,b,w)))),S)break;m=m.return}0<y.length&&(p=new x(p,g,null,n,d),f.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",p&&n!==Oh&&(g=n.relatedTarget||n.fromElement)&&(ps(g)||g[to]))break e;if((x||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,x?(g=n.relatedTarget||n.toElement,x=u,g=g?ps(g):null,g!==null&&(S=$s(g),g!==S||g.tag!==5&&g.tag!==6)&&(g=null)):(x=null,g=u),x!==g)){if(y=Xv,b="onMouseLeave",v="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(y=Jv,b="onPointerLeave",v="onPointerEnter",m="pointer"),S=x==null?p:ci(x),w=g==null?p:ci(g),p=new y(b,m+"leave",x,n,d),p.target=S,p.relatedTarget=w,b=null,ps(d)===u&&(y=new y(v,m+"enter",g,n,d),y.target=w,y.relatedTarget=S,b=y),S=b,x&&g)t:{for(y=x,v=g,m=0,w=y;w;w=Zs(w))m++;for(w=0,b=v;b;b=Zs(b))w++;for(;0<m-w;)y=Zs(y),m--;for(;0<w-m;)v=Zs(v),w--;for(;m--;){if(y===v||v!==null&&y===v.alternate)break t;y=Zs(y),v=Zs(v)}y=null}else y=null;x!==null&&uy(f,p,x,y,!1),g!==null&&S!==null&&uy(f,S,g,y,!0)}}e:{if(p=u?ci(u):window,x=p.nodeName&&p.nodeName.toLowerCase(),x==="select"||x==="input"&&p.type==="file")var C=XR;else if(ny(p))if(h0)C=tN;else{C=JR;var _=QR}else(x=p.nodeName)&&x.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=eN);if(C&&(C=C(e,u))){f0(f,C,n,d);break e}_&&_(e,p,u),e==="focusout"&&(_=p._wrapperState)&&_.controlled&&p.type==="number"&&Nh(p,"number",p.value)}switch(_=u?ci(u):window,e){case"focusin":(ny(_)||_.contentEditable==="true")&&(ai=_,Vh=u,Fa=null);break;case"focusout":Fa=Vh=ai=null;break;case"mousedown":zh=!0;break;case"contextmenu":case"mouseup":case"dragend":zh=!1,ay(f,n,d);break;case"selectionchange":if(oN)break;case"keydown":case"keyup":ay(f,n,d)}var R;if(xm)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else ii?u0(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(c0&&n.locale!=="ko"&&(ii||N!=="onCompositionStart"?N==="onCompositionEnd"&&ii&&(R=l0()):(Mo=d,gm="value"in Mo?Mo.value:Mo.textContent,ii=!0)),_=Cu(u,N),0<_.length&&(N=new Qv(N,e,null,n,d),f.push({event:N,listeners:_}),R?N.data=R:(R=d0(n),R!==null&&(N.data=R)))),(R=BR?GR(e,n):KR(e,n))&&(u=Cu(u,"onBeforeInput"),0<u.length&&(d=new Qv("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=R))}b0(f,t)})}function rl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Cu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=qa(e,n),s!=null&&r.unshift(rl(e,s,o)),s=qa(e,t),s!=null&&r.push(rl(e,s,o))),e=e.return}return r}function Zs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function uy(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,o?(l=qa(n,s),l!=null&&i.unshift(rl(n,l,a))):o||(l=qa(n,s),l!=null&&i.push(rl(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var lN=/\r\n?/g,cN=/\u0000|\uFFFD/g;function dy(e){return(typeof e=="string"?e:""+e).replace(lN,`
`).replace(cN,"")}function Rc(e,t,n){if(t=dy(t),dy(e)!==t&&n)throw Error($(425))}function ku(){}var Wh=null,Yh=null;function Hh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bh=typeof setTimeout=="function"?setTimeout:void 0,uN=typeof clearTimeout=="function"?clearTimeout:void 0,fy=typeof Promise=="function"?Promise:void 0,dN=typeof queueMicrotask=="function"?queueMicrotask:typeof fy<"u"?function(e){return fy.resolve(null).then(e).catch(fN)}:Bh;function fN(e){setTimeout(function(){throw e})}function Vf(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Ja(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Ja(t)}function Vo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function hy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Zi=Math.random().toString(36).slice(2),xr="__reactFiber$"+Zi,ol="__reactProps$"+Zi,to="__reactContainer$"+Zi,Gh="__reactEvents$"+Zi,hN="__reactListeners$"+Zi,pN="__reactHandles$"+Zi;function ps(e){var t=e[xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[to]||n[xr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hy(e);e!==null;){if(n=e[xr])return n;e=hy(e)}return t}e=n,n=e.parentNode}return null}function Vl(e){return e=e[xr]||e[to],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ci(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function Sd(e){return e[ol]||null}var Kh=[],ui=-1;function rs(e){return{current:e}}function ut(e){0>ui||(e.current=Kh[ui],Kh[ui]=null,ui--)}function it(e,t){ui++,Kh[ui]=e.current,e.current=t}var Ko={},en=rs(Ko),xn=rs(!1),Ts=Ko;function Ai(e,t){var n=e.type.contextTypes;if(!n)return Ko;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function wn(e){return e=e.childContextTypes,e!=null}function Eu(){ut(xn),ut(en)}function py(e,t,n){if(en.current!==Ko)throw Error($(168));it(en,t),it(xn,n)}function k0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error($(108,QT(e)||"Unknown",o));return Ct({},n,r)}function Tu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ko,Ts=en.current,it(en,e),it(xn,xn.current),!0}function my(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=k0(e,t,Ts),r.__reactInternalMemoizedMergedChildContext=e,ut(xn),ut(en),it(en,e)):ut(xn),it(xn,n)}var Hr=null,_d=!1,zf=!1;function E0(e){Hr===null?Hr=[e]:Hr.push(e)}function mN(e){_d=!0,E0(e)}function os(){if(!zf&&Hr!==null){zf=!0;var e=0,t=Je;try{var n=Hr;for(Je=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Hr=null,_d=!1}catch(o){throw Hr!==null&&(Hr=Hr.slice(e+1)),Xw(fm,os),o}finally{Je=t,zf=!1}}return null}var di=[],fi=0,Ru=null,Nu=0,Fn=[],Un=0,Rs=null,Br=1,Gr="";function ds(e,t){di[fi++]=Nu,di[fi++]=Ru,Ru=e,Nu=t}function T0(e,t,n){Fn[Un++]=Br,Fn[Un++]=Gr,Fn[Un++]=Rs,Rs=e;var r=Br;e=Gr;var o=32-sr(r)-1;r&=~(1<<o),n+=1;var s=32-sr(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Br=1<<32-sr(t)+o|n<<o|r,Gr=s+e}else Br=1<<s|n<<o|r,Gr=e}function Sm(e){e.return!==null&&(ds(e,1),T0(e,1,0))}function _m(e){for(;e===Ru;)Ru=di[--fi],di[fi]=null,Nu=di[--fi],di[fi]=null;for(;e===Rs;)Rs=Fn[--Un],Fn[Un]=null,Gr=Fn[--Un],Fn[Un]=null,Br=Fn[--Un],Fn[Un]=null}var Pn=null,Nn=null,mt=!1,tr=null;function R0(e,t){var n=Vn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function gy(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Pn=e,Nn=Vo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Pn=e,Nn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Rs!==null?{id:Br,overflow:Gr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Vn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Pn=e,Nn=null,!0):!1;default:return!1}}function Zh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qh(e){if(mt){var t=Nn;if(t){var n=t;if(!gy(e,t)){if(Zh(e))throw Error($(418));t=Vo(n.nextSibling);var r=Pn;t&&gy(e,t)?R0(r,n):(e.flags=e.flags&-4097|2,mt=!1,Pn=e)}}else{if(Zh(e))throw Error($(418));e.flags=e.flags&-4097|2,mt=!1,Pn=e}}}function vy(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Pn=e}function Nc(e){if(e!==Pn)return!1;if(!mt)return vy(e),mt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Hh(e.type,e.memoizedProps)),t&&(t=Nn)){if(Zh(e))throw N0(),Error($(418));for(;t;)R0(e,t),t=Vo(t.nextSibling)}if(vy(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nn=Vo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nn=null}}else Nn=Pn?Vo(e.stateNode.nextSibling):null;return!0}function N0(){for(var e=Nn;e;)e=Vo(e.nextSibling)}function Ii(){Nn=Pn=null,mt=!1}function bm(e){tr===null?tr=[e]:tr.push(e)}var gN=uo.ReactCurrentBatchConfig;function pa(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error($(309));var r=n.stateNode}if(!r)throw Error($(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error($(284));if(!n._owner)throw Error($(290,e))}return e}function Pc(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yy(e){var t=e._init;return t(e._payload)}function P0(e){function t(v,m){if(e){var w=v.deletions;w===null?(v.deletions=[m],v.flags|=16):w.push(m)}}function n(v,m){if(!e)return null;for(;m!==null;)t(v,m),m=m.sibling;return null}function r(v,m){for(v=new Map;m!==null;)m.key!==null?v.set(m.key,m):v.set(m.index,m),m=m.sibling;return v}function o(v,m){return v=Ho(v,m),v.index=0,v.sibling=null,v}function s(v,m,w){return v.index=w,e?(w=v.alternate,w!==null?(w=w.index,w<m?(v.flags|=2,m):w):(v.flags|=2,m)):(v.flags|=1048576,m)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,m,w,b){return m===null||m.tag!==6?(m=Zf(w,v.mode,b),m.return=v,m):(m=o(m,w),m.return=v,m)}function l(v,m,w,b){var C=w.type;return C===si?d(v,m,w.props.children,b,w.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ro&&yy(C)===m.type)?(b=o(m,w.props),b.ref=pa(v,m,w),b.return=v,b):(b=su(w.type,w.key,w.props,null,v.mode,b),b.ref=pa(v,m,w),b.return=v,b)}function u(v,m,w,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=qf(w,v.mode,b),m.return=v,m):(m=o(m,w.children||[]),m.return=v,m)}function d(v,m,w,b,C){return m===null||m.tag!==7?(m=bs(w,v.mode,b,C),m.return=v,m):(m=o(m,w),m.return=v,m)}function f(v,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Zf(""+m,v.mode,w),m.return=v,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case xc:return w=su(m.type,m.key,m.props,null,v.mode,w),w.ref=pa(v,null,m),w.return=v,w;case oi:return m=qf(m,v.mode,w),m.return=v,m;case Ro:var b=m._init;return f(v,b(m._payload),w)}if(Ea(m)||ca(m))return m=bs(m,v.mode,w,null),m.return=v,m;Pc(v,m)}return null}function p(v,m,w,b){var C=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:a(v,m,""+w,b);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case xc:return w.key===C?l(v,m,w,b):null;case oi:return w.key===C?u(v,m,w,b):null;case Ro:return C=w._init,p(v,m,C(w._payload),b)}if(Ea(w)||ca(w))return C!==null?null:d(v,m,w,b,null);Pc(v,w)}return null}function x(v,m,w,b,C){if(typeof b=="string"&&b!==""||typeof b=="number")return v=v.get(w)||null,a(m,v,""+b,C);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case xc:return v=v.get(b.key===null?w:b.key)||null,l(m,v,b,C);case oi:return v=v.get(b.key===null?w:b.key)||null,u(m,v,b,C);case Ro:var _=b._init;return x(v,m,w,_(b._payload),C)}if(Ea(b)||ca(b))return v=v.get(w)||null,d(m,v,b,C,null);Pc(m,b)}return null}function g(v,m,w,b){for(var C=null,_=null,R=m,N=m=0,D=null;R!==null&&N<w.length;N++){R.index>N?(D=R,R=null):D=R.sibling;var O=p(v,R,w[N],b);if(O===null){R===null&&(R=D);break}e&&R&&O.alternate===null&&t(v,R),m=s(O,m,N),_===null?C=O:_.sibling=O,_=O,R=D}if(N===w.length)return n(v,R),mt&&ds(v,N),C;if(R===null){for(;N<w.length;N++)R=f(v,w[N],b),R!==null&&(m=s(R,m,N),_===null?C=R:_.sibling=R,_=R);return mt&&ds(v,N),C}for(R=r(v,R);N<w.length;N++)D=x(R,v,N,w[N],b),D!==null&&(e&&D.alternate!==null&&R.delete(D.key===null?N:D.key),m=s(D,m,N),_===null?C=D:_.sibling=D,_=D);return e&&R.forEach(function(B){return t(v,B)}),mt&&ds(v,N),C}function y(v,m,w,b){var C=ca(w);if(typeof C!="function")throw Error($(150));if(w=C.call(w),w==null)throw Error($(151));for(var _=C=null,R=m,N=m=0,D=null,O=w.next();R!==null&&!O.done;N++,O=w.next()){R.index>N?(D=R,R=null):D=R.sibling;var B=p(v,R,O.value,b);if(B===null){R===null&&(R=D);break}e&&R&&B.alternate===null&&t(v,R),m=s(B,m,N),_===null?C=B:_.sibling=B,_=B,R=D}if(O.done)return n(v,R),mt&&ds(v,N),C;if(R===null){for(;!O.done;N++,O=w.next())O=f(v,O.value,b),O!==null&&(m=s(O,m,N),_===null?C=O:_.sibling=O,_=O);return mt&&ds(v,N),C}for(R=r(v,R);!O.done;N++,O=w.next())O=x(R,v,N,O.value,b),O!==null&&(e&&O.alternate!==null&&R.delete(O.key===null?N:O.key),m=s(O,m,N),_===null?C=O:_.sibling=O,_=O);return e&&R.forEach(function(A){return t(v,A)}),mt&&ds(v,N),C}function S(v,m,w,b){if(typeof w=="object"&&w!==null&&w.type===si&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case xc:e:{for(var C=w.key,_=m;_!==null;){if(_.key===C){if(C=w.type,C===si){if(_.tag===7){n(v,_.sibling),m=o(_,w.props.children),m.return=v,v=m;break e}}else if(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ro&&yy(C)===_.type){n(v,_.sibling),m=o(_,w.props),m.ref=pa(v,_,w),m.return=v,v=m;break e}n(v,_);break}else t(v,_);_=_.sibling}w.type===si?(m=bs(w.props.children,v.mode,b,w.key),m.return=v,v=m):(b=su(w.type,w.key,w.props,null,v.mode,b),b.ref=pa(v,m,w),b.return=v,v=b)}return i(v);case oi:e:{for(_=w.key;m!==null;){if(m.key===_)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){n(v,m.sibling),m=o(m,w.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=qf(w,v.mode,b),m.return=v,v=m}return i(v);case Ro:return _=w._init,S(v,m,_(w._payload),b)}if(Ea(w))return g(v,m,w,b);if(ca(w))return y(v,m,w,b);Pc(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(v,m.sibling),m=o(m,w),m.return=v,v=m):(n(v,m),m=Zf(w,v.mode,b),m.return=v,v=m),i(v)):n(v,m)}return S}var Li=P0(!0),j0=P0(!1),Pu=rs(null),ju=null,hi=null,Cm=null;function km(){Cm=hi=ju=null}function Em(e){var t=Pu.current;ut(Pu),e._currentValue=t}function Xh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ci(e,t){ju=e,Cm=hi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(yn=!0),e.firstContext=null)}function Yn(e){var t=e._currentValue;if(Cm!==e)if(e={context:e,memoizedValue:t,next:null},hi===null){if(ju===null)throw Error($(308));hi=e,ju.dependencies={lanes:0,firstContext:e}}else hi=hi.next=e;return t}var ms=null;function Tm(e){ms===null?ms=[e]:ms.push(e)}function D0(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Tm(t)):(n.next=o.next,o.next=n),t.interleaved=n,no(e,r)}function no(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var No=!1;function Rm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function M0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ze&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,no(e,n)}return o=r.interleaved,o===null?(t.next=t,Tm(r)):(t.next=o.next,o.next=t),r.interleaved=t,no(e,n)}function Jc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hm(e,n)}}function xy(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Du(e,t,n,r){var o=e.updateQueue;No=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?s=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(s!==null){var f=o.baseState;i=0,d=u=l=null,a=s;do{var p=a.lane,x=a.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,y=a;switch(p=t,x=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){f=g.call(x,f,p);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,p=typeof g=="function"?g.call(x,f,p):g,p==null)break e;f=Ct({},f,p);break e;case 2:No=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[a]:p.push(a))}else x={eventTime:x,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=x,l=f):d=d.next=x,i|=p;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;p=a,a=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(d===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);Ps|=i,e.lanes=i,e.memoizedState=f}}function wy(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error($(191,o));o.call(r)}}}var zl={},Er=rs(zl),sl=rs(zl),il=rs(zl);function gs(e){if(e===zl)throw Error($(174));return e}function Nm(e,t){switch(it(il,t),it(sl,e),it(Er,zl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jh(t,e)}ut(Er),it(Er,t)}function Fi(){ut(Er),ut(sl),ut(il)}function O0(e){gs(il.current);var t=gs(Er.current),n=jh(t,e.type);t!==n&&(it(sl,e),it(Er,n))}function Pm(e){sl.current===e&&(ut(Er),ut(sl))}var St=rs(0);function Mu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wf=[];function jm(){for(var e=0;e<Wf.length;e++)Wf[e]._workInProgressVersionPrimary=null;Wf.length=0}var eu=uo.ReactCurrentDispatcher,Yf=uo.ReactCurrentBatchConfig,Ns=0,bt=null,At=null,Ut=null,Ou=!1,Ua=!1,al=0,vN=0;function qt(){throw Error($(321))}function Dm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function Mm(e,t,n,r,o,s){if(Ns=s,bt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,eu.current=e===null||e.memoizedState===null?SN:_N,e=n(r,o),Ua){s=0;do{if(Ua=!1,al=0,25<=s)throw Error($(301));s+=1,Ut=At=null,t.updateQueue=null,eu.current=bN,e=n(r,o)}while(Ua)}if(eu.current=Au,t=At!==null&&At.next!==null,Ns=0,Ut=At=bt=null,Ou=!1,t)throw Error($(300));return e}function Om(){var e=al!==0;return al=0,e}function yr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?bt.memoizedState=Ut=e:Ut=Ut.next=e,Ut}function Hn(){if(At===null){var e=bt.alternate;e=e!==null?e.memoizedState:null}else e=At.next;var t=Ut===null?bt.memoizedState:Ut.next;if(t!==null)Ut=t,At=e;else{if(e===null)throw Error($(310));At=e,e={memoizedState:At.memoizedState,baseState:At.baseState,baseQueue:At.baseQueue,queue:At.queue,next:null},Ut===null?bt.memoizedState=Ut=e:Ut=Ut.next=e}return Ut}function ll(e,t){return typeof t=="function"?t(e):t}function Hf(e){var t=Hn(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=At,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,l=null,u=s;do{var d=u.lane;if((Ns&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,i=r):l=l.next=f,bt.lanes|=d,Ps|=d}u=u.next}while(u!==null&&u!==s);l===null?i=r:l.next=a,lr(r,t.memoizedState)||(yn=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,bt.lanes|=s,Ps|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Bf(e){var t=Hn(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);lr(s,t.memoizedState)||(yn=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function A0(){}function I0(e,t){var n=bt,r=Hn(),o=t(),s=!lr(r.memoizedState,o);if(s&&(r.memoizedState=o,yn=!0),r=r.queue,Am(U0.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ut!==null&&Ut.memoizedState.tag&1){if(n.flags|=2048,cl(9,F0.bind(null,n,r,o,t),void 0,null),$t===null)throw Error($(349));Ns&30||L0(n,t,o)}return o}function L0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=bt.updateQueue,t===null?(t={lastEffect:null,stores:null},bt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function F0(e,t,n,r){t.value=n,t.getSnapshot=r,$0(t)&&V0(e)}function U0(e,t,n){return n(function(){$0(t)&&V0(e)})}function $0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch{return!0}}function V0(e){var t=no(e,1);t!==null&&ir(t,e,1,-1)}function Sy(e){var t=yr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:e},t.queue=e,e=e.dispatch=wN.bind(null,bt,e),[t.memoizedState,e]}function cl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=bt.updateQueue,t===null?(t={lastEffect:null,stores:null},bt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function z0(){return Hn().memoizedState}function tu(e,t,n,r){var o=yr();bt.flags|=e,o.memoizedState=cl(1|t,n,void 0,r===void 0?null:r)}function bd(e,t,n,r){var o=Hn();r=r===void 0?null:r;var s=void 0;if(At!==null){var i=At.memoizedState;if(s=i.destroy,r!==null&&Dm(r,i.deps)){o.memoizedState=cl(t,n,s,r);return}}bt.flags|=e,o.memoizedState=cl(1|t,n,s,r)}function _y(e,t){return tu(8390656,8,e,t)}function Am(e,t){return bd(2048,8,e,t)}function W0(e,t){return bd(4,2,e,t)}function Y0(e,t){return bd(4,4,e,t)}function H0(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function B0(e,t,n){return n=n!=null?n.concat([e]):null,bd(4,4,H0.bind(null,t,e),n)}function Im(){}function G0(e,t){var n=Hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Dm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function K0(e,t){var n=Hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Dm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Z0(e,t,n){return Ns&21?(lr(n,t)||(n=e0(),bt.lanes|=n,Ps|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,yn=!0),e.memoizedState=n)}function yN(e,t){var n=Je;Je=n!==0&&4>n?n:4,e(!0);var r=Yf.transition;Yf.transition={};try{e(!1),t()}finally{Je=n,Yf.transition=r}}function q0(){return Hn().memoizedState}function xN(e,t,n){var r=Yo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},X0(e))Q0(t,n);else if(n=D0(e,t,n,r),n!==null){var o=ln();ir(n,e,r,o),J0(n,t,r)}}function wN(e,t,n){var r=Yo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(X0(e))Q0(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,lr(a,i)){var l=t.interleaved;l===null?(o.next=o,Tm(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=D0(e,t,o,r),n!==null&&(o=ln(),ir(n,e,r,o),J0(n,t,r))}}function X0(e){var t=e.alternate;return e===bt||t!==null&&t===bt}function Q0(e,t){Ua=Ou=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function J0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hm(e,n)}}var Au={readContext:Yn,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useInsertionEffect:qt,useLayoutEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useMutableSource:qt,useSyncExternalStore:qt,useId:qt,unstable_isNewReconciler:!1},SN={readContext:Yn,useCallback:function(e,t){return yr().memoizedState=[e,t===void 0?null:t],e},useContext:Yn,useEffect:_y,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,tu(4194308,4,H0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return tu(4194308,4,e,t)},useInsertionEffect:function(e,t){return tu(4,2,e,t)},useMemo:function(e,t){var n=yr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=xN.bind(null,bt,e),[r.memoizedState,e]},useRef:function(e){var t=yr();return e={current:e},t.memoizedState=e},useState:Sy,useDebugValue:Im,useDeferredValue:function(e){return yr().memoizedState=e},useTransition:function(){var e=Sy(!1),t=e[0];return e=yN.bind(null,e[1]),yr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=bt,o=yr();if(mt){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),$t===null)throw Error($(349));Ns&30||L0(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,_y(U0.bind(null,r,s,e),[e]),r.flags|=2048,cl(9,F0.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=yr(),t=$t.identifierPrefix;if(mt){var n=Gr,r=Br;n=(r&~(1<<32-sr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=al++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=vN++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_N={readContext:Yn,useCallback:G0,useContext:Yn,useEffect:Am,useImperativeHandle:B0,useInsertionEffect:W0,useLayoutEffect:Y0,useMemo:K0,useReducer:Hf,useRef:z0,useState:function(){return Hf(ll)},useDebugValue:Im,useDeferredValue:function(e){var t=Hn();return Z0(t,At.memoizedState,e)},useTransition:function(){var e=Hf(ll)[0],t=Hn().memoizedState;return[e,t]},useMutableSource:A0,useSyncExternalStore:I0,useId:q0,unstable_isNewReconciler:!1},bN={readContext:Yn,useCallback:G0,useContext:Yn,useEffect:Am,useImperativeHandle:B0,useInsertionEffect:W0,useLayoutEffect:Y0,useMemo:K0,useReducer:Bf,useRef:z0,useState:function(){return Bf(ll)},useDebugValue:Im,useDeferredValue:function(e){var t=Hn();return At===null?t.memoizedState=e:Z0(t,At.memoizedState,e)},useTransition:function(){var e=Bf(ll)[0],t=Hn().memoizedState;return[e,t]},useMutableSource:A0,useSyncExternalStore:I0,useId:q0,unstable_isNewReconciler:!1};function Qn(e,t){if(e&&e.defaultProps){t=Ct({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Qh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ct({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Cd={isMounted:function(e){return(e=e._reactInternals)?$s(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ln(),o=Yo(e),s=qr(r,o);s.payload=t,n!=null&&(s.callback=n),t=zo(e,s,o),t!==null&&(ir(t,e,o,r),Jc(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ln(),o=Yo(e),s=qr(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=zo(e,s,o),t!==null&&(ir(t,e,o,r),Jc(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ln(),r=Yo(e),o=qr(n,r);o.tag=2,t!=null&&(o.callback=t),t=zo(e,o,r),t!==null&&(ir(t,e,r,n),Jc(t,e,r))}};function by(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!tl(n,r)||!tl(o,s):!0}function eS(e,t,n){var r=!1,o=Ko,s=t.contextType;return typeof s=="object"&&s!==null?s=Yn(s):(o=wn(t)?Ts:en.current,r=t.contextTypes,s=(r=r!=null)?Ai(e,o):Ko),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Cd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function Cy(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Cd.enqueueReplaceState(t,t.state,null)}function Jh(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Rm(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Yn(s):(s=wn(t)?Ts:en.current,o.context=Ai(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Qh(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Cd.enqueueReplaceState(o,o.state,null),Du(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Ui(e,t){try{var n="",r=t;do n+=XT(r),r=r.return;while(r);var o=n}catch(s){o=`
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function Gf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ep(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var CN=typeof WeakMap=="function"?WeakMap:Map;function tS(e,t,n){n=qr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Lu||(Lu=!0,up=r),ep(e,t)},n}function nS(e,t,n){n=qr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ep(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ep(e,t),typeof r!="function"&&(Wo===null?Wo=new Set([this]):Wo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function ky(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new CN;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=FN.bind(null,e,t,n),t.then(e,e))}function Ey(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ty(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=qr(-1,1),t.tag=2,zo(n,t,1))),n.lanes|=1),e)}var kN=uo.ReactCurrentOwner,yn=!1;function sn(e,t,n,r){t.child=e===null?j0(t,null,n,r):Li(t,e.child,n,r)}function Ry(e,t,n,r,o){n=n.render;var s=t.ref;return Ci(t,o),r=Mm(e,t,n,r,s,o),n=Om(),e!==null&&!yn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ro(e,t,o)):(mt&&n&&Sm(t),t.flags|=1,sn(e,t,r,o),t.child)}function Ny(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Ym(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,rS(e,t,s,r,o)):(e=su(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:tl,n(i,r)&&e.ref===t.ref)return ro(e,t,o)}return t.flags|=1,e=Ho(s,r),e.ref=t.ref,e.return=t,t.child=e}function rS(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(tl(s,r)&&e.ref===t.ref)if(yn=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(yn=!0);else return t.lanes=e.lanes,ro(e,t,o)}return tp(e,t,n,r,o)}function oS(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},it(mi,En),En|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,it(mi,En),En|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,it(mi,En),En|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,it(mi,En),En|=r;return sn(e,t,o,n),t.child}function sS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tp(e,t,n,r,o){var s=wn(n)?Ts:en.current;return s=Ai(t,s),Ci(t,o),n=Mm(e,t,n,r,s,o),r=Om(),e!==null&&!yn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ro(e,t,o)):(mt&&r&&Sm(t),t.flags|=1,sn(e,t,n,o),t.child)}function Py(e,t,n,r,o){if(wn(n)){var s=!0;Tu(t)}else s=!1;if(Ci(t,o),t.stateNode===null)nu(e,t),eS(t,n,r),Jh(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Yn(u):(u=wn(n)?Ts:en.current,u=Ai(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Cy(t,i,r,u),No=!1;var p=t.memoizedState;i.state=p,Du(t,r,i,o),l=t.memoizedState,a!==r||p!==l||xn.current||No?(typeof d=="function"&&(Qh(t,n,d,r),l=t.memoizedState),(a=No||by(t,n,a,r,p,l,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,M0(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Qn(t.type,a),i.props=u,f=t.pendingProps,p=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Yn(l):(l=wn(n)?Ts:en.current,l=Ai(t,l));var x=n.getDerivedStateFromProps;(d=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||p!==l)&&Cy(t,i,r,l),No=!1,p=t.memoizedState,i.state=p,Du(t,r,i,o);var g=t.memoizedState;a!==f||p!==g||xn.current||No?(typeof x=="function"&&(Qh(t,n,x,r),g=t.memoizedState),(u=No||by(t,n,u,r,p,g,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,g,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,g,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),i.props=r,i.state=g,i.context=l,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return np(e,t,n,r,s,o)}function np(e,t,n,r,o,s){sS(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&my(t,n,!1),ro(e,t,s);r=t.stateNode,kN.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Li(t,e.child,null,s),t.child=Li(t,null,a,s)):sn(e,t,a,s),t.memoizedState=r.state,o&&my(t,n,!0),t.child}function iS(e){var t=e.stateNode;t.pendingContext?py(e,t.pendingContext,t.pendingContext!==t.context):t.context&&py(e,t.context,!1),Nm(e,t.containerInfo)}function jy(e,t,n,r,o){return Ii(),bm(o),t.flags|=256,sn(e,t,n,r),t.child}var rp={dehydrated:null,treeContext:null,retryLane:0};function op(e){return{baseLanes:e,cachePool:null,transitions:null}}function aS(e,t,n){var r=t.pendingProps,o=St.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),it(St,o&1),e===null)return qh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Td(i,r,0,null),e=bs(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=op(n),t.memoizedState=rp,e):Lm(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return EN(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Ho(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=Ho(a,s):(s=bs(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?op(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=rp,r}return s=e.child,e=s.sibling,r=Ho(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Lm(e,t){return t=Td({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function jc(e,t,n,r){return r!==null&&bm(r),Li(t,e.child,null,n),e=Lm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function EN(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Gf(Error($(422))),jc(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Td({mode:"visible",children:r.children},o,0,null),s=bs(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Li(t,e.child,null,i),t.child.memoizedState=op(i),t.memoizedState=rp,s);if(!(t.mode&1))return jc(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error($(419)),r=Gf(s,r,void 0),jc(e,t,i,r)}if(a=(i&e.childLanes)!==0,yn||a){if(r=$t,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,no(e,o),ir(r,e,o,-1))}return Wm(),r=Gf(Error($(421))),jc(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=UN.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,Nn=Vo(o.nextSibling),Pn=t,mt=!0,tr=null,e!==null&&(Fn[Un++]=Br,Fn[Un++]=Gr,Fn[Un++]=Rs,Br=e.id,Gr=e.overflow,Rs=t),t=Lm(t,r.children),t.flags|=4096,t)}function Dy(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xh(e.return,t,n)}function Kf(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function lS(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(sn(e,t,r.children,n),r=St.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dy(e,n,t);else if(e.tag===19)Dy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(it(St,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Mu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Kf(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Mu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Kf(t,!0,n,null,s);break;case"together":Kf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function nu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ro(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ps|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=Ho(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ho(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function TN(e,t,n){switch(t.tag){case 3:iS(t),Ii();break;case 5:O0(t);break;case 1:wn(t.type)&&Tu(t);break;case 4:Nm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;it(Pu,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(it(St,St.current&1),t.flags|=128,null):n&t.child.childLanes?aS(e,t,n):(it(St,St.current&1),e=ro(e,t,n),e!==null?e.sibling:null);it(St,St.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return lS(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),it(St,St.current),r)break;return null;case 22:case 23:return t.lanes=0,oS(e,t,n)}return ro(e,t,n)}var cS,sp,uS,dS;cS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};sp=function(){};uS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,gs(Er.current);var s=null;switch(n){case"input":o=Th(e,o),r=Th(e,r),s=[];break;case"select":o=Ct({},o,{value:void 0}),r=Ct({},r,{value:void 0}),s=[];break;case"textarea":o=Ph(e,o),r=Ph(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ku)}Dh(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ka.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ka.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&lt("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};dS=function(e,t,n,r){n!==r&&(t.flags|=4)};function ma(e,t){if(!mt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function RN(e,t,n){var r=t.pendingProps;switch(_m(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return wn(t.type)&&Eu(),Xt(t),null;case 3:return r=t.stateNode,Fi(),ut(xn),ut(en),jm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Nc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,tr!==null&&(hp(tr),tr=null))),sp(e,t),Xt(t),null;case 5:Pm(t);var o=gs(il.current);if(n=t.type,e!==null&&t.stateNode!=null)uS(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error($(166));return Xt(t),null}if(e=gs(Er.current),Nc(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[xr]=t,r[ol]=s,e=(t.mode&1)!==0,n){case"dialog":lt("cancel",r),lt("close",r);break;case"iframe":case"object":case"embed":lt("load",r);break;case"video":case"audio":for(o=0;o<Ra.length;o++)lt(Ra[o],r);break;case"source":lt("error",r);break;case"img":case"image":case"link":lt("error",r),lt("load",r);break;case"details":lt("toggle",r);break;case"input":Vv(r,s),lt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},lt("invalid",r);break;case"textarea":Wv(r,s),lt("invalid",r)}Dh(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Rc(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Rc(r.textContent,a,e),o=["children",""+a]):Ka.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&lt("scroll",r)}switch(n){case"input":wc(r),zv(r,s,!0);break;case"textarea":wc(r),Yv(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ku)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Uw(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[xr]=t,e[ol]=r,cS(e,t,!1,!1),t.stateNode=e;e:{switch(i=Mh(n,r),n){case"dialog":lt("cancel",e),lt("close",e),o=r;break;case"iframe":case"object":case"embed":lt("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ra.length;o++)lt(Ra[o],e);o=r;break;case"source":lt("error",e),o=r;break;case"img":case"image":case"link":lt("error",e),lt("load",e),o=r;break;case"details":lt("toggle",e),o=r;break;case"input":Vv(e,r),o=Th(e,r),lt("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ct({},r,{value:void 0}),lt("invalid",e);break;case"textarea":Wv(e,r),o=Ph(e,r),lt("invalid",e);break;default:o=r}Dh(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?zw(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&$w(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Za(e,l):typeof l=="number"&&Za(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ka.hasOwnProperty(s)?l!=null&&s==="onScroll"&&lt("scroll",e):l!=null&&am(e,s,l,i))}switch(n){case"input":wc(e),zv(e,r,!1);break;case"textarea":wc(e),Yv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Go(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?wi(e,!!r.multiple,s,!1):r.defaultValue!=null&&wi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ku)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xt(t),null;case 6:if(e&&t.stateNode!=null)dS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error($(166));if(n=gs(il.current),gs(Er.current),Nc(t)){if(r=t.stateNode,n=t.memoizedProps,r[xr]=t,(s=r.nodeValue!==n)&&(e=Pn,e!==null))switch(e.tag){case 3:Rc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Rc(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[xr]=t,t.stateNode=r}return Xt(t),null;case 13:if(ut(St),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(mt&&Nn!==null&&t.mode&1&&!(t.flags&128))N0(),Ii(),t.flags|=98560,s=!1;else if(s=Nc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error($(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error($(317));s[xr]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),s=!1}else tr!==null&&(hp(tr),tr=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||St.current&1?It===0&&(It=3):Wm())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return Fi(),sp(e,t),e===null&&nl(t.stateNode.containerInfo),Xt(t),null;case 10:return Em(t.type._context),Xt(t),null;case 17:return wn(t.type)&&Eu(),Xt(t),null;case 19:if(ut(St),s=t.memoizedState,s===null)return Xt(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)ma(s,!1);else{if(It!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Mu(e),i!==null){for(t.flags|=128,ma(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return it(St,St.current&1|2),t.child}e=e.sibling}s.tail!==null&&Nt()>$i&&(t.flags|=128,r=!0,ma(s,!1),t.lanes=4194304)}else{if(!r)if(e=Mu(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ma(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!mt)return Xt(t),null}else 2*Nt()-s.renderingStartTime>$i&&n!==1073741824&&(t.flags|=128,r=!0,ma(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Nt(),t.sibling=null,n=St.current,it(St,r?n&1|2:n&1),t):(Xt(t),null);case 22:case 23:return zm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?En&1073741824&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function NN(e,t){switch(_m(t),t.tag){case 1:return wn(t.type)&&Eu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fi(),ut(xn),ut(en),jm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pm(t),null;case 13:if(ut(St),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ut(St),null;case 4:return Fi(),null;case 10:return Em(t.type._context),null;case 22:case 23:return zm(),null;case 24:return null;default:return null}}var Dc=!1,Qt=!1,PN=typeof WeakSet=="function"?WeakSet:Set,ae=null;function pi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Et(e,t,r)}else n.current=null}function ip(e,t,n){try{n()}catch(r){Et(e,t,r)}}var My=!1;function jN(e,t){if(Wh=_u,e=g0(),wm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var x;f!==n||o!==0&&f.nodeType!==3||(a=i+o),f!==s||r!==0&&f.nodeType!==3||(l=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(x=f.firstChild)!==null;)p=f,f=x;for(;;){if(f===e)break t;if(p===n&&++u===o&&(a=i),p===s&&++d===r&&(l=i),(x=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=x}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yh={focusedElem:e,selectionRange:n},_u=!1,ae=t;ae!==null;)if(t=ae,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ae=e;else for(;ae!==null;){t=ae;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,S=g.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:Qn(t.type,y),S);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(b){Et(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,ae=e;break}ae=t.return}return g=My,My=!1,g}function $a(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&ip(t,n,s)}o=o.next}while(o!==r)}}function kd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ap(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function fS(e){var t=e.alternate;t!==null&&(e.alternate=null,fS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[xr],delete t[ol],delete t[Gh],delete t[hN],delete t[pN])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hS(e){return e.tag===5||e.tag===3||e.tag===4}function Oy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ku));else if(r!==4&&(e=e.child,e!==null))for(lp(e,t,n),e=e.sibling;e!==null;)lp(e,t,n),e=e.sibling}function cp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(cp(e,t,n),e=e.sibling;e!==null;)cp(e,t,n),e=e.sibling}var Yt=null,Jn=!1;function bo(e,t,n){for(n=n.child;n!==null;)pS(e,t,n),n=n.sibling}function pS(e,t,n){if(kr&&typeof kr.onCommitFiberUnmount=="function")try{kr.onCommitFiberUnmount(vd,n)}catch{}switch(n.tag){case 5:Qt||pi(n,t);case 6:var r=Yt,o=Jn;Yt=null,bo(e,t,n),Yt=r,Jn=o,Yt!==null&&(Jn?(e=Yt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Yt.removeChild(n.stateNode));break;case 18:Yt!==null&&(Jn?(e=Yt,n=n.stateNode,e.nodeType===8?Vf(e.parentNode,n):e.nodeType===1&&Vf(e,n),Ja(e)):Vf(Yt,n.stateNode));break;case 4:r=Yt,o=Jn,Yt=n.stateNode.containerInfo,Jn=!0,bo(e,t,n),Yt=r,Jn=o;break;case 0:case 11:case 14:case 15:if(!Qt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&ip(n,t,i),o=o.next}while(o!==r)}bo(e,t,n);break;case 1:if(!Qt&&(pi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Et(n,t,a)}bo(e,t,n);break;case 21:bo(e,t,n);break;case 22:n.mode&1?(Qt=(r=Qt)||n.memoizedState!==null,bo(e,t,n),Qt=r):bo(e,t,n);break;default:bo(e,t,n)}}function Ay(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new PN),t.forEach(function(r){var o=$N.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Xn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Yt=a.stateNode,Jn=!1;break e;case 3:Yt=a.stateNode.containerInfo,Jn=!0;break e;case 4:Yt=a.stateNode.containerInfo,Jn=!0;break e}a=a.return}if(Yt===null)throw Error($(160));pS(s,i,o),Yt=null,Jn=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(u){Et(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)mS(t,e),t=t.sibling}function mS(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Xn(t,e),vr(e),r&4){try{$a(3,e,e.return),kd(3,e)}catch(y){Et(e,e.return,y)}try{$a(5,e,e.return)}catch(y){Et(e,e.return,y)}}break;case 1:Xn(t,e),vr(e),r&512&&n!==null&&pi(n,n.return);break;case 5:if(Xn(t,e),vr(e),r&512&&n!==null&&pi(n,n.return),e.flags&32){var o=e.stateNode;try{Za(o,"")}catch(y){Et(e,e.return,y)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Lw(o,s),Mh(a,i);var u=Mh(a,s);for(i=0;i<l.length;i+=2){var d=l[i],f=l[i+1];d==="style"?zw(o,f):d==="dangerouslySetInnerHTML"?$w(o,f):d==="children"?Za(o,f):am(o,d,f,u)}switch(a){case"input":Rh(o,s);break;case"textarea":Fw(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var x=s.value;x!=null?wi(o,!!s.multiple,x,!1):p!==!!s.multiple&&(s.defaultValue!=null?wi(o,!!s.multiple,s.defaultValue,!0):wi(o,!!s.multiple,s.multiple?[]:"",!1))}o[ol]=s}catch(y){Et(e,e.return,y)}}break;case 6:if(Xn(t,e),vr(e),r&4){if(e.stateNode===null)throw Error($(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(y){Et(e,e.return,y)}}break;case 3:if(Xn(t,e),vr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ja(t.containerInfo)}catch(y){Et(e,e.return,y)}break;case 4:Xn(t,e),vr(e);break;case 13:Xn(t,e),vr(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||($m=Nt())),r&4&&Ay(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Qt=(u=Qt)||d,Xn(t,e),Qt=u):Xn(t,e),vr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(ae=e,d=e.child;d!==null;){for(f=ae=d;ae!==null;){switch(p=ae,x=p.child,p.tag){case 0:case 11:case 14:case 15:$a(4,p,p.return);break;case 1:pi(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(y){Et(r,n,y)}}break;case 5:pi(p,p.return);break;case 22:if(p.memoizedState!==null){Ly(f);continue}}x!==null?(x.return=p,ae=x):Ly(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{o=f.stateNode,u?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Vw("display",i))}catch(y){Et(e,e.return,y)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){Et(e,e.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Xn(t,e),vr(e),r&4&&Ay(e);break;case 21:break;default:Xn(t,e),vr(e)}}function vr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(hS(n)){var r=n;break e}n=n.return}throw Error($(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Za(o,""),r.flags&=-33);var s=Oy(e);cp(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=Oy(e);lp(e,a,i);break;default:throw Error($(161))}}catch(l){Et(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function DN(e,t,n){ae=e,gS(e)}function gS(e,t,n){for(var r=(e.mode&1)!==0;ae!==null;){var o=ae,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Dc;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||Qt;a=Dc;var u=Qt;if(Dc=i,(Qt=l)&&!u)for(ae=o;ae!==null;)i=ae,l=i.child,i.tag===22&&i.memoizedState!==null?Fy(o):l!==null?(l.return=i,ae=l):Fy(o);for(;s!==null;)ae=s,gS(s),s=s.sibling;ae=o,Dc=a,Qt=u}Iy(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,ae=s):Iy(e)}}function Iy(e){for(;ae!==null;){var t=ae;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Qt||kd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Qt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Qn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&wy(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}wy(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Ja(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}Qt||t.flags&512&&ap(t)}catch(p){Et(t,t.return,p)}}if(t===e){ae=null;break}if(n=t.sibling,n!==null){n.return=t.return,ae=n;break}ae=t.return}}function Ly(e){for(;ae!==null;){var t=ae;if(t===e){ae=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ae=n;break}ae=t.return}}function Fy(e){for(;ae!==null;){var t=ae;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{kd(4,t)}catch(l){Et(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Et(t,o,l)}}var s=t.return;try{ap(t)}catch(l){Et(t,s,l)}break;case 5:var i=t.return;try{ap(t)}catch(l){Et(t,i,l)}}}catch(l){Et(t,t.return,l)}if(t===e){ae=null;break}var a=t.sibling;if(a!==null){a.return=t.return,ae=a;break}ae=t.return}}var MN=Math.ceil,Iu=uo.ReactCurrentDispatcher,Fm=uo.ReactCurrentOwner,zn=uo.ReactCurrentBatchConfig,ze=0,$t=null,Mt=null,Bt=0,En=0,mi=rs(0),It=0,ul=null,Ps=0,Ed=0,Um=0,Va=null,vn=null,$m=0,$i=1/0,zr=null,Lu=!1,up=null,Wo=null,Mc=!1,Oo=null,Fu=0,za=0,dp=null,ru=-1,ou=0;function ln(){return ze&6?Nt():ru!==-1?ru:ru=Nt()}function Yo(e){return e.mode&1?ze&2&&Bt!==0?Bt&-Bt:gN.transition!==null?(ou===0&&(ou=e0()),ou):(e=Je,e!==0||(e=window.event,e=e===void 0?16:a0(e.type)),e):1}function ir(e,t,n,r){if(50<za)throw za=0,dp=null,Error($(185));Ul(e,n,r),(!(ze&2)||e!==$t)&&(e===$t&&(!(ze&2)&&(Ed|=n),It===4&&jo(e,Bt)),Sn(e,r),n===1&&ze===0&&!(t.mode&1)&&($i=Nt()+500,_d&&os()))}function Sn(e,t){var n=e.callbackNode;gR(e,t);var r=Su(e,e===$t?Bt:0);if(r===0)n!==null&&Gv(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Gv(n),t===1)e.tag===0?mN(Uy.bind(null,e)):E0(Uy.bind(null,e)),dN(function(){!(ze&6)&&os()}),n=null;else{switch(t0(r)){case 1:n=fm;break;case 4:n=Qw;break;case 16:n=wu;break;case 536870912:n=Jw;break;default:n=wu}n=CS(n,vS.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function vS(e,t){if(ru=-1,ou=0,ze&6)throw Error($(327));var n=e.callbackNode;if(ki()&&e.callbackNode!==n)return null;var r=Su(e,e===$t?Bt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Uu(e,r);else{t=r;var o=ze;ze|=2;var s=xS();($t!==e||Bt!==t)&&(zr=null,$i=Nt()+500,_s(e,t));do try{IN();break}catch(a){yS(e,a)}while(!0);km(),Iu.current=s,ze=o,Mt!==null?t=0:($t=null,Bt=0,t=It)}if(t!==0){if(t===2&&(o=Fh(e),o!==0&&(r=o,t=fp(e,o))),t===1)throw n=ul,_s(e,0),jo(e,r),Sn(e,Nt()),n;if(t===6)jo(e,r);else{if(o=e.current.alternate,!(r&30)&&!ON(o)&&(t=Uu(e,r),t===2&&(s=Fh(e),s!==0&&(r=s,t=fp(e,s))),t===1))throw n=ul,_s(e,0),jo(e,r),Sn(e,Nt()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error($(345));case 2:fs(e,vn,zr);break;case 3:if(jo(e,r),(r&130023424)===r&&(t=$m+500-Nt(),10<t)){if(Su(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ln(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Bh(fs.bind(null,e,vn,zr),t);break}fs(e,vn,zr);break;case 4:if(jo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-sr(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Nt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*MN(r/1960))-r,10<r){e.timeoutHandle=Bh(fs.bind(null,e,vn,zr),r);break}fs(e,vn,zr);break;case 5:fs(e,vn,zr);break;default:throw Error($(329))}}}return Sn(e,Nt()),e.callbackNode===n?vS.bind(null,e):null}function fp(e,t){var n=Va;return e.current.memoizedState.isDehydrated&&(_s(e,t).flags|=256),e=Uu(e,t),e!==2&&(t=vn,vn=n,t!==null&&hp(t)),e}function hp(e){vn===null?vn=e:vn.push.apply(vn,e)}function ON(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!lr(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function jo(e,t){for(t&=~Um,t&=~Ed,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-sr(t),r=1<<n;e[n]=-1,t&=~r}}function Uy(e){if(ze&6)throw Error($(327));ki();var t=Su(e,0);if(!(t&1))return Sn(e,Nt()),null;var n=Uu(e,t);if(e.tag!==0&&n===2){var r=Fh(e);r!==0&&(t=r,n=fp(e,r))}if(n===1)throw n=ul,_s(e,0),jo(e,t),Sn(e,Nt()),n;if(n===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fs(e,vn,zr),Sn(e,Nt()),null}function Vm(e,t){var n=ze;ze|=1;try{return e(t)}finally{ze=n,ze===0&&($i=Nt()+500,_d&&os())}}function js(e){Oo!==null&&Oo.tag===0&&!(ze&6)&&ki();var t=ze;ze|=1;var n=zn.transition,r=Je;try{if(zn.transition=null,Je=1,e)return e()}finally{Je=r,zn.transition=n,ze=t,!(ze&6)&&os()}}function zm(){En=mi.current,ut(mi)}function _s(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,uN(n)),Mt!==null)for(n=Mt.return;n!==null;){var r=n;switch(_m(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Eu();break;case 3:Fi(),ut(xn),ut(en),jm();break;case 5:Pm(r);break;case 4:Fi();break;case 13:ut(St);break;case 19:ut(St);break;case 10:Em(r.type._context);break;case 22:case 23:zm()}n=n.return}if($t=e,Mt=e=Ho(e.current,null),Bt=En=t,It=0,ul=null,Um=Ed=Ps=0,vn=Va=null,ms!==null){for(t=0;t<ms.length;t++)if(n=ms[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}ms=null}return e}function yS(e,t){do{var n=Mt;try{if(km(),eu.current=Au,Ou){for(var r=bt.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ou=!1}if(Ns=0,Ut=At=bt=null,Ua=!1,al=0,Fm.current=null,n===null||n.return===null){It=1,ul=t,Mt=null;break}e:{var s=e,i=n.return,a=n,l=t;if(t=Bt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var x=Ey(i);if(x!==null){x.flags&=-257,Ty(x,i,a,s,t),x.mode&1&&ky(s,u,t),t=x,l=u;var g=t.updateQueue;if(g===null){var y=new Set;y.add(l),t.updateQueue=y}else g.add(l);break e}else{if(!(t&1)){ky(s,u,t),Wm();break e}l=Error($(426))}}else if(mt&&a.mode&1){var S=Ey(i);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Ty(S,i,a,s,t),bm(Ui(l,a));break e}}s=l=Ui(l,a),It!==4&&(It=2),Va===null?Va=[s]:Va.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var v=tS(s,l,t);xy(s,v);break e;case 1:a=l;var m=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Wo===null||!Wo.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=nS(s,a,t);xy(s,b);break e}}s=s.return}while(s!==null)}SS(n)}catch(C){t=C,Mt===n&&n!==null&&(Mt=n=n.return);continue}break}while(!0)}function xS(){var e=Iu.current;return Iu.current=Au,e===null?Au:e}function Wm(){(It===0||It===3||It===2)&&(It=4),$t===null||!(Ps&268435455)&&!(Ed&268435455)||jo($t,Bt)}function Uu(e,t){var n=ze;ze|=2;var r=xS();($t!==e||Bt!==t)&&(zr=null,_s(e,t));do try{AN();break}catch(o){yS(e,o)}while(!0);if(km(),ze=n,Iu.current=r,Mt!==null)throw Error($(261));return $t=null,Bt=0,It}function AN(){for(;Mt!==null;)wS(Mt)}function IN(){for(;Mt!==null&&!aR();)wS(Mt)}function wS(e){var t=bS(e.alternate,e,En);e.memoizedProps=e.pendingProps,t===null?SS(e):Mt=t,Fm.current=null}function SS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=NN(n,t),n!==null){n.flags&=32767,Mt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{It=6,Mt=null;return}}else if(n=RN(n,t,En),n!==null){Mt=n;return}if(t=t.sibling,t!==null){Mt=t;return}Mt=t=e}while(t!==null);It===0&&(It=5)}function fs(e,t,n){var r=Je,o=zn.transition;try{zn.transition=null,Je=1,LN(e,t,n,r)}finally{zn.transition=o,Je=r}return null}function LN(e,t,n,r){do ki();while(Oo!==null);if(ze&6)throw Error($(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(vR(e,s),e===$t&&(Mt=$t=null,Bt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Mc||(Mc=!0,CS(wu,function(){return ki(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=zn.transition,zn.transition=null;var i=Je;Je=1;var a=ze;ze|=4,Fm.current=null,jN(e,n),mS(n,e),rN(Yh),_u=!!Wh,Yh=Wh=null,e.current=n,DN(n),lR(),ze=a,Je=i,zn.transition=s}else e.current=n;if(Mc&&(Mc=!1,Oo=e,Fu=o),s=e.pendingLanes,s===0&&(Wo=null),dR(n.stateNode),Sn(e,Nt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Lu)throw Lu=!1,e=up,up=null,e;return Fu&1&&e.tag!==0&&ki(),s=e.pendingLanes,s&1?e===dp?za++:(za=0,dp=e):za=0,os(),null}function ki(){if(Oo!==null){var e=t0(Fu),t=zn.transition,n=Je;try{if(zn.transition=null,Je=16>e?16:e,Oo===null)var r=!1;else{if(e=Oo,Oo=null,Fu=0,ze&6)throw Error($(331));var o=ze;for(ze|=4,ae=e.current;ae!==null;){var s=ae,i=s.child;if(ae.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(ae=u;ae!==null;){var d=ae;switch(d.tag){case 0:case 11:case 15:$a(8,d,s)}var f=d.child;if(f!==null)f.return=d,ae=f;else for(;ae!==null;){d=ae;var p=d.sibling,x=d.return;if(fS(d),d===u){ae=null;break}if(p!==null){p.return=x,ae=p;break}ae=x}}}var g=s.alternate;if(g!==null){var y=g.child;if(y!==null){g.child=null;do{var S=y.sibling;y.sibling=null,y=S}while(y!==null)}}ae=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,ae=i;else e:for(;ae!==null;){if(s=ae,s.flags&2048)switch(s.tag){case 0:case 11:case 15:$a(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,ae=v;break e}ae=s.return}}var m=e.current;for(ae=m;ae!==null;){i=ae;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,ae=w;else e:for(i=m;ae!==null;){if(a=ae,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:kd(9,a)}}catch(C){Et(a,a.return,C)}if(a===i){ae=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,ae=b;break e}ae=a.return}}if(ze=o,os(),kr&&typeof kr.onPostCommitFiberRoot=="function")try{kr.onPostCommitFiberRoot(vd,e)}catch{}r=!0}return r}finally{Je=n,zn.transition=t}}return!1}function $y(e,t,n){t=Ui(n,t),t=tS(e,t,1),e=zo(e,t,1),t=ln(),e!==null&&(Ul(e,1,t),Sn(e,t))}function Et(e,t,n){if(e.tag===3)$y(e,e,n);else for(;t!==null;){if(t.tag===3){$y(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Wo===null||!Wo.has(r))){e=Ui(n,e),e=nS(t,e,1),t=zo(t,e,1),e=ln(),t!==null&&(Ul(t,1,e),Sn(t,e));break}}t=t.return}}function FN(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ln(),e.pingedLanes|=e.suspendedLanes&n,$t===e&&(Bt&n)===n&&(It===4||It===3&&(Bt&130023424)===Bt&&500>Nt()-$m?_s(e,0):Um|=n),Sn(e,t)}function _S(e,t){t===0&&(e.mode&1?(t=bc,bc<<=1,!(bc&130023424)&&(bc=4194304)):t=1);var n=ln();e=no(e,t),e!==null&&(Ul(e,t,n),Sn(e,n))}function UN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_S(e,n)}function $N(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),_S(e,n)}var bS;bS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xn.current)yn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return yn=!1,TN(e,t,n);yn=!!(e.flags&131072)}else yn=!1,mt&&t.flags&1048576&&T0(t,Nu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nu(e,t),e=t.pendingProps;var o=Ai(t,en.current);Ci(t,n),o=Mm(null,t,r,e,o,n);var s=Om();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,wn(r)?(s=!0,Tu(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Rm(t),o.updater=Cd,t.stateNode=o,o._reactInternals=t,Jh(t,r,e,n),t=np(null,t,r,!0,s,n)):(t.tag=0,mt&&s&&Sm(t),sn(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nu(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=zN(r),e=Qn(r,e),o){case 0:t=tp(null,t,r,e,n);break e;case 1:t=Py(null,t,r,e,n);break e;case 11:t=Ry(null,t,r,e,n);break e;case 14:t=Ny(null,t,r,Qn(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qn(r,o),tp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qn(r,o),Py(e,t,r,o,n);case 3:e:{if(iS(t),e===null)throw Error($(387));r=t.pendingProps,s=t.memoizedState,o=s.element,M0(e,t),Du(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Ui(Error($(423)),t),t=jy(e,t,r,n,o);break e}else if(r!==o){o=Ui(Error($(424)),t),t=jy(e,t,r,n,o);break e}else for(Nn=Vo(t.stateNode.containerInfo.firstChild),Pn=t,mt=!0,tr=null,n=j0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ii(),r===o){t=ro(e,t,n);break e}sn(e,t,r,n)}t=t.child}return t;case 5:return O0(t),e===null&&qh(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Hh(r,o)?i=null:s!==null&&Hh(r,s)&&(t.flags|=32),sS(e,t),sn(e,t,i,n),t.child;case 6:return e===null&&qh(t),null;case 13:return aS(e,t,n);case 4:return Nm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Li(t,null,r,n):sn(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qn(r,o),Ry(e,t,r,o,n);case 7:return sn(e,t,t.pendingProps,n),t.child;case 8:return sn(e,t,t.pendingProps.children,n),t.child;case 12:return sn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,it(Pu,r._currentValue),r._currentValue=i,s!==null)if(lr(s.value,i)){if(s.children===o.children&&!xn.current){t=ro(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=qr(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Xh(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error($(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Xh(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}sn(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ci(t,n),o=Yn(o),r=r(o),t.flags|=1,sn(e,t,r,n),t.child;case 14:return r=t.type,o=Qn(r,t.pendingProps),o=Qn(r.type,o),Ny(e,t,r,o,n);case 15:return rS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qn(r,o),nu(e,t),t.tag=1,wn(r)?(e=!0,Tu(t)):e=!1,Ci(t,n),eS(t,r,o),Jh(t,r,o,n),np(null,t,r,!0,e,n);case 19:return lS(e,t,n);case 22:return oS(e,t,n)}throw Error($(156,t.tag))};function CS(e,t){return Xw(e,t)}function VN(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vn(e,t,n,r){return new VN(e,t,n,r)}function Ym(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zN(e){if(typeof e=="function")return Ym(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cm)return 11;if(e===um)return 14}return 2}function Ho(e,t){var n=e.alternate;return n===null?(n=Vn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function su(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Ym(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case si:return bs(n.children,o,s,t);case lm:i=8,o|=8;break;case bh:return e=Vn(12,n,t,o|2),e.elementType=bh,e.lanes=s,e;case Ch:return e=Vn(13,n,t,o),e.elementType=Ch,e.lanes=s,e;case kh:return e=Vn(19,n,t,o),e.elementType=kh,e.lanes=s,e;case Ow:return Td(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Dw:i=10;break e;case Mw:i=9;break e;case cm:i=11;break e;case um:i=14;break e;case Ro:i=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Vn(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function bs(e,t,n,r){return e=Vn(7,e,r,t),e.lanes=n,e}function Td(e,t,n,r){return e=Vn(22,e,r,t),e.elementType=Ow,e.lanes=n,e.stateNode={isHidden:!1},e}function Zf(e,t,n){return e=Vn(6,e,null,t),e.lanes=n,e}function qf(e,t,n){return t=Vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function WN(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pf(0),this.expirationTimes=Pf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pf(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hm(e,t,n,r,o,s,i,a,l){return e=new WN(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Vn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rm(s),e}function YN(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:oi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function kS(e){if(!e)return Ko;e=e._reactInternals;e:{if($s(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(wn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var n=e.type;if(wn(n))return k0(e,n,t)}return t}function ES(e,t,n,r,o,s,i,a,l){return e=Hm(n,r,!0,e,o,s,i,a,l),e.context=kS(null),n=e.current,r=ln(),o=Yo(n),s=qr(r,o),s.callback=t??null,zo(n,s,o),e.current.lanes=o,Ul(e,o,r),Sn(e,r),e}function Rd(e,t,n,r){var o=t.current,s=ln(),i=Yo(o);return n=kS(n),t.context===null?t.context=n:t.pendingContext=n,t=qr(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=zo(o,t,i),e!==null&&(ir(e,o,i,s),Jc(e,o,i)),i}function $u(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Vy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Bm(e,t){Vy(e,t),(e=e.alternate)&&Vy(e,t)}function HN(){return null}var TS=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gm(e){this._internalRoot=e}Nd.prototype.render=Gm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));Rd(e,t,null,null)};Nd.prototype.unmount=Gm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;js(function(){Rd(null,e,null,null)}),t[to]=null}};function Nd(e){this._internalRoot=e}Nd.prototype.unstable_scheduleHydration=function(e){if(e){var t=o0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Po.length&&t!==0&&t<Po[n].priority;n++);Po.splice(n,0,e),n===0&&i0(e)}};function Km(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Pd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zy(){}function BN(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=$u(i);s.call(u)}}var i=ES(t,r,e,0,null,!1,!1,"",zy);return e._reactRootContainer=i,e[to]=i.current,nl(e.nodeType===8?e.parentNode:e),js(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var u=$u(l);a.call(u)}}var l=Hm(e,0,!1,null,null,!1,!1,"",zy);return e._reactRootContainer=l,e[to]=l.current,nl(e.nodeType===8?e.parentNode:e),js(function(){Rd(t,l,n,r)}),l}function jd(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=$u(i);a.call(l)}}Rd(t,i,e,o)}else i=BN(n,t,e,o,r);return $u(i)}n0=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ta(t.pendingLanes);n!==0&&(hm(t,n|1),Sn(t,Nt()),!(ze&6)&&($i=Nt()+500,os()))}break;case 13:js(function(){var r=no(e,1);if(r!==null){var o=ln();ir(r,e,1,o)}}),Bm(e,1)}};pm=function(e){if(e.tag===13){var t=no(e,134217728);if(t!==null){var n=ln();ir(t,e,134217728,n)}Bm(e,134217728)}};r0=function(e){if(e.tag===13){var t=Yo(e),n=no(e,t);if(n!==null){var r=ln();ir(n,e,t,r)}Bm(e,t)}};o0=function(){return Je};s0=function(e,t){var n=Je;try{return Je=e,t()}finally{Je=n}};Ah=function(e,t,n){switch(t){case"input":if(Rh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Sd(r);if(!o)throw Error($(90));Iw(r),Rh(r,o)}}}break;case"textarea":Fw(e,n);break;case"select":t=n.value,t!=null&&wi(e,!!n.multiple,t,!1)}};Hw=Vm;Bw=js;var GN={usingClientEntryPoint:!1,Events:[Vl,ci,Sd,Ww,Yw,Vm]},ga={findFiberByHostInstance:ps,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},KN={bundleType:ga.bundleType,version:ga.version,rendererPackageName:ga.rendererPackageName,rendererConfig:ga.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:uo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zw(e),e===null?null:e.stateNode},findFiberByHostInstance:ga.findFiberByHostInstance||HN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oc.isDisabled&&Oc.supportsFiber)try{vd=Oc.inject(KN),kr=Oc}catch{}}An.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=GN;An.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Km(t))throw Error($(200));return YN(e,t,null,n)};An.createRoot=function(e,t){if(!Km(e))throw Error($(299));var n=!1,r="",o=TS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Hm(e,1,!1,null,null,n,!1,r,o),e[to]=t.current,nl(e.nodeType===8?e.parentNode:e),new Gm(t)};An.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=Zw(t),e=e===null?null:e.stateNode,e};An.flushSync=function(e){return js(e)};An.hydrate=function(e,t,n){if(!Pd(t))throw Error($(200));return jd(null,e,t,!0,n)};An.hydrateRoot=function(e,t,n){if(!Km(e))throw Error($(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=TS;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=ES(t,null,e,1,n??null,o,!1,s,i),e[to]=t.current,nl(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Nd(t)};An.render=function(e,t,n){if(!Pd(t))throw Error($(200));return jd(null,e,t,!1,n)};An.unmountComponentAtNode=function(e){if(!Pd(e))throw Error($(40));return e._reactRootContainer?(js(function(){jd(null,null,e,!1,function(){e._reactRootContainer=null,e[to]=null})}),!0):!1};An.unstable_batchedUpdates=Vm;An.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Pd(n))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return jd(e,t,n,!1,r)};An.version="18.3.1-next-f1338f8080-20240426";function RS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(RS)}catch(e){console.error(e)}}RS(),Rw.exports=An;var fo=Rw.exports;const NS=mw(fo),ZN=pw({__proto__:null,default:NS},[fo]);var Wy=fo;Sh.createRoot=Wy.createRoot,Sh.hydrateRoot=Wy.hydrateRoot;/**
* @remix-run/router v1.18.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function wt(){return wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wt.apply(this,arguments)}var jt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(jt||(jt={}));const Yy="popstate";function qN(e){e===void 0&&(e={});function t(o,s){let{pathname:i="/",search:a="",hash:l=""}=ho(o.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),dl("",{pathname:i,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(o,s){let i=o.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let l=o.location.href,u=l.indexOf("#");a=u===-1?l:l.slice(0,u)}return a+"#"+(typeof s=="string"?s:Ms(s))}function r(o,s){Ds(o.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(s)+")")}return QN(t,n,r,e)}function Ne(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ds(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function XN(){return Math.random().toString(36).substr(2,8)}function Hy(e,t){return{usr:e.state,key:e.key,idx:t}}function dl(e,t,n,r){return n===void 0&&(n=null),wt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ho(t):t,{state:n,key:t&&t.key||r||XN()})}function Ms(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ho(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function QN(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:s=!1}=r,i=o.history,a=jt.Pop,l=null,u=d();u==null&&(u=0,i.replaceState(wt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=jt.Pop;let S=d(),v=S==null?null:S-u;u=S,l&&l({action:a,location:y.location,delta:v})}function p(S,v){a=jt.Push;let m=dl(y.location,S,v);n&&n(m,S),u=d()+1;let w=Hy(m,u),b=y.createHref(m);try{i.pushState(w,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(b)}s&&l&&l({action:a,location:y.location,delta:1})}function x(S,v){a=jt.Replace;let m=dl(y.location,S,v);n&&n(m,S),u=d();let w=Hy(m,u),b=y.createHref(m);i.replaceState(w,"",b),s&&l&&l({action:a,location:y.location,delta:0})}function g(S){let v=o.location.origin!=="null"?o.location.origin:o.location.href,m=typeof S=="string"?S:Ms(S);return m=m.replace(/ $/,"%20"),Ne(v,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,v)}let y={get action(){return a},get location(){return e(o,i)},listen(S){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Yy,f),l=S,()=>{o.removeEventListener(Yy,f),l=null}},createHref(S){return t(o,S)},createURL:g,encodeLocation(S){let v=g(S);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:x,go(S){return i.go(S)}};return y}var st;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(st||(st={}));const JN=new Set(["lazy","caseSensitive","path","id","index","children"]);function eP(e){return e.index===!0}function fl(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,s)=>{let i=[...n,String(s)],a=typeof o.id=="string"?o.id:i.join("-");if(Ne(o.index!==!0||!o.children,"Cannot specify children on an index route"),Ne(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),eP(o)){let l=wt({},o,t(o),{id:a});return r[a]=l,l}else{let l=wt({},o,t(o),{id:a,children:void 0});return r[a]=l,o.children&&(l.children=fl(o.children,t,i,r)),l}})}function hs(e,t,n){return n===void 0&&(n="/"),iu(e,t,n,!1)}function iu(e,t,n,r){let o=typeof t=="string"?ho(t):t,s=qi(o.pathname||"/",n);if(s==null)return null;let i=PS(e);nP(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let u=hP(s);a=dP(i[l],u,r)}return a}function tP(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function PS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(s,i,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};l.relativePath.startsWith("/")&&(Ne(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Xr([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Ne(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),PS(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:cP(u,s.index),routesMeta:d})};return e.forEach((s,i)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))o(s,i);else for(let l of jS(s.path))o(s,i,l)}),t}function jS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let i=jS(r.join("/")),a=[];return a.push(...i.map(l=>l===""?s:[s,l].join("/"))),o&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function nP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:uP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const rP=/^:[\w-]+$/,oP=3,sP=2,iP=1,aP=10,lP=-2,By=e=>e==="*";function cP(e,t){let n=e.split("/"),r=n.length;return n.some(By)&&(r+=lP),t&&(r+=sP),n.filter(o=>!By(o)).reduce((o,s)=>o+(rP.test(s)?oP:s===""?iP:aP),r)}function uP(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 dP(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},s="/",i=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",f=Gy({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),p=l.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=Gy({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(o,f.params),i.push({params:o,pathname:Xr([s,f.pathname]),pathnameBase:gP(Xr([s,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(s=Xr([s,f.pathnameBase]))}return i}function Gy(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=fP(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let s=o[0],i=s.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:p,isOptional:x}=d;if(p==="*"){let y=a[f]||"";i=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const g=a[f];return x&&!g?u[p]=void 0:u[p]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:i,pattern:e}}function fP(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ds(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,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function hP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ds(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function qi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function pP(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ho(e):e;return{pathname:n?n.startsWith("/")?n:mP(n,t):t,search:vP(r),hash:yP(o)}}function mP(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 Xf(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 DS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Dd(e,t){let n=DS(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Md(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=ho(e):(o=wt({},e),Ne(!o.pathname||!o.pathname.includes("?"),Xf("?","pathname","search",o)),Ne(!o.pathname||!o.pathname.includes("#"),Xf("#","pathname","hash",o)),Ne(!o.search||!o.search.includes("#"),Xf("#","search","hash",o)));let s=e===""||o.pathname==="",i=s?"/":o.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),f-=1;o.pathname=p.join("/")}a=f>=0?t[f]:"/"}let l=pP(o,a),u=i&&i!=="/"&&i.endsWith("/"),d=(s||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Xr=e=>e.join("/").replace(/\/\/+/g,"/"),gP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),vP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Zm{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Od(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const MS=["post","put","patch","delete"],xP=new Set(MS),wP=["get",...MS],SP=new Set(wP),_P=new Set([301,302,303,307,308]),bP=new Set([307,308]),Qf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},CP={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},va={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},qm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kP=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),OS="remix-router-transitions";function EP(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Ne(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let E=e.detectErrorBoundary;o=T=>({hasErrorBoundary:E(T)})}else o=kP;let s={},i=fl(e.routes,o,void 0,s),a,l=e.basename||"/",u=e.unstable_dataStrategy||jP,d=e.unstable_patchRoutesOnMiss,f=wt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),p=null,x=new Set,g=null,y=null,S=null,v=e.hydrationData!=null,m=hs(i,e.history.location,l),w=null;if(m==null&&!d){let E=on(404,{pathname:e.history.location.pathname}),{matches:T,route:j}=rx(i);m=T,w={[j.id]:E}}m&&d&&!e.hydrationData&&Cf(m,i,e.history.location.pathname).active&&(m=null);let b;if(!m)b=!1,m=[];else if(m.some(E=>E.route.lazy))b=!1;else if(!m.some(E=>E.route.loader))b=!0;else if(f.v7_partialHydration){let E=e.hydrationData?e.hydrationData.loaderData:null,T=e.hydrationData?e.hydrationData.errors:null,j=U=>U.route.loader?typeof U.route.loader=="function"&&U.route.loader.hydrate===!0?!1:E&&E[U.route.id]!==void 0||T&&T[U.route.id]!==void 0:!0;if(T){let U=m.findIndex(re=>T[re.route.id]!==void 0);b=m.slice(0,U+1).every(j)}else b=m.every(j)}else b=e.hydrationData!=null;let C,_={historyAction:e.history.action,location:e.history.location,matches:m,initialized:b,navigation:Qf,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},R=jt.Pop,N=!1,D,O=!1,B=new Map,A=null,H=!1,L=!1,K=[],ne=[],W=new Map,F=0,M=-1,X=new Map,le=new Set,me=new Map,rt=new Map,je=new Set,gt=new Map,Ue=new Map,ce=new Map,De=!1;function He(){if(p=e.history.listen(E=>{let{action:T,location:j,delta:U}=E;if(De){De=!1;return}Ds(Ue.size===0||U!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let re=jv({currentLocation:_.location,nextLocation:j,historyAction:T});if(re&&U!=null){De=!0,e.history.go(U*-1),fc(re,{state:"blocked",location:j,proceed(){fc(re,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),e.history.go(U)},reset(){let de=new Map(_.blockers);de.set(re,va),Se({blockers:de})}});return}return pn(T,j)}),n){YP(t,B);let E=()=>HP(t,B);t.addEventListener("pagehide",E),A=()=>t.removeEventListener("pagehide",E)}return _.initialized||pn(jt.Pop,_.location,{initialHydration:!0}),C}function $e(){p&&p(),A&&A(),x.clear(),D&&D.abort(),_.fetchers.forEach((E,T)=>So(T)),_.blockers.forEach((E,T)=>Pv(T))}function Ve(E){return x.add(E),()=>x.delete(E)}function Se(E,T){T===void 0&&(T={}),_=wt({},_,E);let j=[],U=[];f.v7_fetcherPersist&&_.fetchers.forEach((re,de)=>{re.state==="idle"&&(je.has(de)?U.push(de):j.push(de))}),[...x].forEach(re=>re(_,{deletedFetchers:U,unstable_viewTransitionOpts:T.viewTransitionOpts,unstable_flushSync:T.flushSync===!0})),f.v7_fetcherPersist&&(j.forEach(re=>_.fetchers.delete(re)),U.forEach(re=>So(re)))}function vt(E,T,j){var U,re;let{flushSync:de}=j===void 0?{}:j,xe=_.actionData!=null&&_.navigation.formMethod!=null&&er(_.navigation.formMethod)&&_.navigation.state==="loading"&&((U=E.state)==null?void 0:U._isRedirect)!==!0,q;T.actionData?Object.keys(T.actionData).length>0?q=T.actionData:q=null:xe?q=_.actionData:q=null;let Ce=T.loaderData?tx(_.loaderData,T.loaderData,T.matches||[],T.errors):_.loaderData,pe=_.blockers;pe.size>0&&(pe=new Map(pe),pe.forEach((Ze,ot)=>pe.set(ot,va)));let ge=N===!0||_.navigation.formMethod!=null&&er(_.navigation.formMethod)&&((re=E.state)==null?void 0:re._isRedirect)!==!0;a&&(i=a,a=void 0),H||R===jt.Pop||(R===jt.Push?e.history.push(E,E.state):R===jt.Replace&&e.history.replace(E,E.state));let et;if(R===jt.Pop){let Ze=B.get(_.location.pathname);Ze&&Ze.has(E.pathname)?et={currentLocation:_.location,nextLocation:E}:B.has(E.pathname)&&(et={currentLocation:E,nextLocation:_.location})}else if(O){let Ze=B.get(_.location.pathname);Ze?Ze.add(E.pathname):(Ze=new Set([E.pathname]),B.set(_.location.pathname,Ze)),et={currentLocation:_.location,nextLocation:E}}Se(wt({},T,{actionData:q,loaderData:Ce,historyAction:R,location:E,initialized:!0,navigation:Qf,revalidation:"idle",restoreScrollPosition:Mv(E,T.matches||_.matches),preventScrollReset:ge,blockers:pe}),{viewTransitionOpts:et,flushSync:de===!0}),R=jt.Pop,N=!1,O=!1,H=!1,L=!1,K=[],ne=[]}async function Zt(E,T){if(typeof E=="number"){e.history.go(E);return}let j=pp(_.location,_.matches,l,f.v7_prependBasename,E,f.v7_relativeSplatPath,T==null?void 0:T.fromRouteId,T==null?void 0:T.relative),{path:U,submission:re,error:de}=Ky(f.v7_normalizeFormMethod,!1,j,T),xe=_.location,q=dl(_.location,U,T&&T.state);q=wt({},q,e.history.encodeLocation(q));let Ce=T&&T.replace!=null?T.replace:void 0,pe=jt.Push;Ce===!0?pe=jt.Replace:Ce===!1||re!=null&&er(re.formMethod)&&re.formAction===_.location.pathname+_.location.search&&(pe=jt.Replace);let ge=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,et=(T&&T.unstable_flushSync)===!0,Ze=jv({currentLocation:xe,nextLocation:q,historyAction:pe});if(Ze){fc(Ze,{state:"blocked",location:q,proceed(){fc(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),Zt(E,T)},reset(){let ot=new Map(_.blockers);ot.set(Ze,va),Se({blockers:ot})}});return}return await pn(pe,q,{submission:re,pendingError:de,preventScrollReset:ge,replace:T&&T.replace,enableViewTransition:T&&T.unstable_viewTransition,flushSync:et})}function xo(){if(zt(),Se({revalidation:"loading"}),_.navigation.state!=="submitting"){if(_.navigation.state==="idle"){pn(_.historyAction,_.location,{startUninterruptedRevalidation:!0});return}pn(R||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation})}}async function pn(E,T,j){D&&D.abort(),D=null,R=E,H=(j&&j.startUninterruptedRevalidation)===!0,xT(_.location,_.matches),N=(j&&j.preventScrollReset)===!0,O=(j&&j.enableViewTransition)===!0;let U=a||i,re=j&&j.overrideNavigation,de=hs(U,T,l),xe=(j&&j.flushSync)===!0,q=Cf(de,U,T.pathname);if(q.active&&q.matches&&(de=q.matches),!de){let{error:Ge,notFoundMatches:Wt,route:Pt}=_f(T.pathname);vt(T,{matches:Wt,loaderData:{},errors:{[Pt.id]:Ge}},{flushSync:xe});return}if(_.initialized&&!L&&LP(_.location,T)&&!(j&&j.submission&&er(j.submission.formMethod))){vt(T,{matches:de},{flushSync:xe});return}D=new AbortController;let Ce=qs(e.history,T,D.signal,j&&j.submission),pe;if(j&&j.pendingError)pe=[gi(de).route.id,{type:st.error,error:j.pendingError}];else if(j&&j.submission&&er(j.submission.formMethod)){let Ge=await wo(Ce,T,j.submission,de,q.active,{replace:j.replace,flushSync:xe});if(Ge.shortCircuited)return;if(Ge.pendingActionResult){let[Wt,Pt]=Ge.pendingActionResult;if(Tn(Pt)&&Od(Pt.error)&&Pt.error.status===404){D=null,vt(T,{matches:Ge.matches,loaderData:{},errors:{[Wt]:Pt.error}});return}}de=Ge.matches||de,pe=Ge.pendingActionResult,re=Jf(T,j.submission),xe=!1,q.active=!1,Ce=qs(e.history,Ce.url,Ce.signal)}let{shortCircuited:ge,matches:et,loaderData:Ze,errors:ot}=await k(Ce,T,de,q.active,re,j&&j.submission,j&&j.fetcherSubmission,j&&j.replace,j&&j.initialHydration===!0,xe,pe);ge||(D=null,vt(T,wt({matches:et||de},nx(pe),{loaderData:Ze,errors:ot})))}async function wo(E,T,j,U,re,de){de===void 0&&(de={}),zt();let xe=zP(T,j);if(Se({navigation:xe},{flushSync:de.flushSync===!0}),re){let pe=await pc(U,T.pathname,E.signal);if(pe.type==="aborted")return{shortCircuited:!0};if(pe.type==="error"){let{boundaryId:ge,error:et}=hc(T.pathname,pe);return{matches:pe.partialMatches,pendingActionResult:[ge,{type:st.error,error:et}]}}else if(pe.matches)U=pe.matches;else{let{notFoundMatches:ge,error:et,route:Ze}=_f(T.pathname);return{matches:ge,pendingActionResult:[Ze.id,{type:st.error,error:et}]}}}let q,Ce=Na(U,T);if(!Ce.route.action&&!Ce.route.lazy)q={type:st.error,error:on(405,{method:E.method,pathname:T.pathname,routeId:Ce.route.id})};else if(q=(await Me("action",E,[Ce],U))[0],E.signal.aborted)return{shortCircuited:!0};if(ys(q)){let pe;return de&&de.replace!=null?pe=de.replace:pe=Qy(q.response.headers.get("Location"),new URL(E.url),l)===_.location.pathname+_.location.search,await ue(E,q,{submission:j,replace:pe}),{shortCircuited:!0}}if(vs(q))throw on(400,{type:"defer-action"});if(Tn(q)){let pe=gi(U,Ce.route.id);return(de&&de.replace)!==!0&&(R=jt.Push),{matches:U,pendingActionResult:[pe.route.id,q]}}return{matches:U,pendingActionResult:[Ce.route.id,q]}}async function k(E,T,j,U,re,de,xe,q,Ce,pe,ge){let et=re||Jf(T,de),Ze=de||xe||ix(et),ot=!H&&(!f.v7_partialHydration||!Ce);if(U){if(ot){let kt=P(ge);Se(wt({navigation:et},kt!==void 0?{actionData:kt}:{}),{flushSync:pe})}let Te=await pc(j,T.pathname,E.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){let{boundaryId:kt,error:bn}=hc(T.pathname,Te);return{matches:Te.partialMatches,loaderData:{},errors:{[kt]:bn}}}else if(Te.matches)j=Te.matches;else{let{error:kt,notFoundMatches:bn,route:ht}=_f(T.pathname);return{matches:bn,loaderData:{},errors:{[ht.id]:kt}}}}let Ge=a||i,[Wt,Pt]=Zy(e.history,_,j,Ze,T,f.v7_partialHydration&&Ce===!0,f.v7_skipActionErrorRevalidation,L,K,ne,je,me,le,Ge,l,ge);if(bf(Te=>!(j&&j.some(kt=>kt.route.id===Te))||Wt&&Wt.some(kt=>kt.route.id===Te)),M=++F,Wt.length===0&&Pt.length===0){let Te=aa();return vt(T,wt({matches:j,loaderData:{},errors:ge&&Tn(ge[1])?{[ge[0]]:ge[1].error}:null},nx(ge),Te?{fetchers:new Map(_.fetchers)}:{}),{flushSync:pe}),{shortCircuited:!0}}if(ot){let Te={};if(!U){Te.navigation=et;let kt=P(ge);kt!==void 0&&(Te.actionData=kt)}Pt.length>0&&(Te.fetchers=I(Pt)),Se(Te,{flushSync:pe})}Pt.forEach(Te=>{W.has(Te.key)&&qn(Te.key),Te.controller&&W.set(Te.key,Te.controller)});let la=()=>Pt.forEach(Te=>qn(Te.key));D&&D.signal.addEventListener("abort",la);let{loaderResults:_o,fetcherResults:Bs}=await yt(_.matches,j,Wt,Pt,E);if(E.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",la),Pt.forEach(Te=>W.delete(Te.key));let Gs=ox([..._o,...Bs]);if(Gs){if(Gs.idx>=Wt.length){let Te=Pt[Gs.idx-Wt.length].key;le.add(Te)}return await ue(E,Gs.result,{replace:q}),{shortCircuited:!0}}let{loaderData:Ks,errors:gr}=ex(_,j,Wt,_o,ge,Pt,Bs,gt);gt.forEach((Te,kt)=>{Te.subscribe(bn=>{(bn||Te.done)&&gt.delete(kt)})}),f.v7_partialHydration&&Ce&&_.errors&&Object.entries(_.errors).filter(Te=>{let[kt]=Te;return!Wt.some(bn=>bn.route.id===kt)}).forEach(Te=>{let[kt,bn]=Te;gr=Object.assign(gr||{},{[kt]:bn})});let mc=aa(),gc=Nv(M),vc=mc||gc||Pt.length>0;return wt({matches:j,loaderData:Ks,errors:gr},vc?{fetchers:new Map(_.fetchers)}:{})}function P(E){if(E&&!Tn(E[1]))return{[E[0]]:E[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function I(E){return E.forEach(T=>{let j=_.fetchers.get(T.key),U=ya(void 0,j?j.data:void 0);_.fetchers.set(T.key,U)}),new Map(_.fetchers)}function J(E,T,j,U){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");W.has(E)&&qn(E);let re=(U&&U.unstable_flushSync)===!0,de=a||i,xe=pp(_.location,_.matches,l,f.v7_prependBasename,j,f.v7_relativeSplatPath,T,U==null?void 0:U.relative),q=hs(de,xe,l),Ce=Cf(q,de,xe);if(Ce.active&&Ce.matches&&(q=Ce.matches),!q){Zn(E,T,on(404,{pathname:xe}),{flushSync:re});return}let{path:pe,submission:ge,error:et}=Ky(f.v7_normalizeFormMethod,!0,xe,U);if(et){Zn(E,T,et,{flushSync:re});return}let Ze=Na(q,pe);if(N=(U&&U.preventScrollReset)===!0,ge&&er(ge.formMethod)){Q(E,T,pe,Ze,q,Ce.active,re,ge);return}me.set(E,{routeId:T,path:pe}),Y(E,T,pe,Ze,q,Ce.active,re,ge)}async function Q(E,T,j,U,re,de,xe,q){zt(),me.delete(E);function Ce(ht){if(!ht.route.action&&!ht.route.lazy){let Ir=on(405,{method:q.formMethod,pathname:j,routeId:T});return Zn(E,T,Ir,{flushSync:xe}),!0}return!1}if(!de&&Ce(U))return;let pe=_.fetchers.get(E);rn(E,WP(q,pe),{flushSync:xe});let ge=new AbortController,et=qs(e.history,j,ge.signal,q);if(de){let ht=await pc(re,j,et.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:Ir}=hc(j,ht);Zn(E,T,Ir,{flushSync:xe});return}else if(ht.matches){if(re=ht.matches,U=Na(re,j),Ce(U))return}else{Zn(E,T,on(404,{pathname:j}),{flushSync:xe});return}}W.set(E,ge);let Ze=F,Ge=(await Me("action",et,[U],re))[0];if(et.signal.aborted){W.get(E)===ge&&W.delete(E);return}if(f.v7_fetcherPersist&&je.has(E)){if(ys(Ge)||Tn(Ge)){rn(E,Eo(void 0));return}}else{if(ys(Ge))if(W.delete(E),M>Ze){rn(E,Eo(void 0));return}else return le.add(E),rn(E,ya(q)),ue(et,Ge,{fetcherSubmission:q});if(Tn(Ge)){Zn(E,T,Ge.error);return}}if(vs(Ge))throw on(400,{type:"defer-action"});let Wt=_.navigation.location||_.location,Pt=qs(e.history,Wt,ge.signal),la=a||i,_o=_.navigation.state!=="idle"?hs(la,_.navigation.location,l):_.matches;Ne(_o,"Didn't find any matches after fetcher action");let Bs=++F;X.set(E,Bs);let Gs=ya(q,Ge.data);_.fetchers.set(E,Gs);let[Ks,gr]=Zy(e.history,_,_o,q,Wt,!1,f.v7_skipActionErrorRevalidation,L,K,ne,je,me,le,la,l,[U.route.id,Ge]);gr.filter(ht=>ht.key!==E).forEach(ht=>{let Ir=ht.key,Ov=_.fetchers.get(Ir),_T=ya(void 0,Ov?Ov.data:void 0);_.fetchers.set(Ir,_T),W.has(Ir)&&qn(Ir),ht.controller&&W.set(Ir,ht.controller)}),Se({fetchers:new Map(_.fetchers)});let mc=()=>gr.forEach(ht=>qn(ht.key));ge.signal.addEventListener("abort",mc);let{loaderResults:gc,fetcherResults:vc}=await yt(_.matches,_o,Ks,gr,Pt);if(ge.signal.aborted)return;ge.signal.removeEventListener("abort",mc),X.delete(E),W.delete(E),gr.forEach(ht=>W.delete(ht.key));let Te=ox([...gc,...vc]);if(Te){if(Te.idx>=Ks.length){let ht=gr[Te.idx-Ks.length].key;le.add(ht)}return ue(Pt,Te.result)}let{loaderData:kt,errors:bn}=ex(_,_.matches,Ks,gc,void 0,gr,vc,gt);if(_.fetchers.has(E)){let ht=Eo(Ge.data);_.fetchers.set(E,ht)}Nv(Bs),_.navigation.state==="loading"&&Bs>M?(Ne(R,"Expected pending action"),D&&D.abort(),vt(_.navigation.location,{matches:_o,loaderData:kt,errors:bn,fetchers:new Map(_.fetchers)})):(Se({errors:bn,loaderData:tx(_.loaderData,kt,_o,bn),fetchers:new Map(_.fetchers)}),L=!1)}async function Y(E,T,j,U,re,de,xe,q){let Ce=_.fetchers.get(E);rn(E,ya(q,Ce?Ce.data:void 0),{flushSync:xe});let pe=new AbortController,ge=qs(e.history,j,pe.signal);if(de){let Ge=await pc(re,j,ge.signal);if(Ge.type==="aborted")return;if(Ge.type==="error"){let{error:Wt}=hc(j,Ge);Zn(E,T,Wt,{flushSync:xe});return}else if(Ge.matches)re=Ge.matches,U=Na(re,j);else{Zn(E,T,on(404,{pathname:j}),{flushSync:xe});return}}W.set(E,pe);let et=F,ot=(await Me("loader",ge,[U],re))[0];if(vs(ot)&&(ot=await US(ot,ge.signal,!0)||ot),W.get(E)===pe&&W.delete(E),!ge.signal.aborted){if(je.has(E)){rn(E,Eo(void 0));return}if(ys(ot))if(M>et){rn(E,Eo(void 0));return}else{le.add(E),await ue(ge,ot);return}if(Tn(ot)){Zn(E,T,ot.error);return}Ne(!vs(ot),"Unhandled fetcher deferred data"),rn(E,Eo(ot.data))}}async function ue(E,T,j){let{submission:U,fetcherSubmission:re,replace:de}=j===void 0?{}:j;T.response.headers.has("X-Remix-Revalidate")&&(L=!0);let xe=T.response.headers.get("Location");Ne(xe,"Expected a Location header on the redirect Response"),xe=Qy(xe,new URL(E.url),l);let q=dl(_.location,xe,{_isRedirect:!0});if(n){let ot=!1;if(T.response.headers.has("X-Remix-Reload-Document"))ot=!0;else if(qm.test(xe)){const Ge=e.history.createURL(xe);ot=Ge.origin!==t.location.origin||qi(Ge.pathname,l)==null}if(ot){de?t.location.replace(xe):t.location.assign(xe);return}}D=null;let Ce=de===!0?jt.Replace:jt.Push,{formMethod:pe,formAction:ge,formEncType:et}=_.navigation;!U&&!re&&pe&&ge&&et&&(U=ix(_.navigation));let Ze=U||re;if(bP.has(T.response.status)&&Ze&&er(Ze.formMethod))await pn(Ce,q,{submission:wt({},Ze,{formAction:xe}),preventScrollReset:N});else{let ot=Jf(q,U);await pn(Ce,q,{overrideNavigation:ot,fetcherSubmission:re,preventScrollReset:N})}}async function Me(E,T,j,U){try{let re=await DP(u,E,T,j,U,s,o);return await Promise.all(re.map((de,xe)=>{if(UP(de)){let q=de.result;return{type:st.redirect,response:AP(q,T,j[xe].route.id,U,l,f.v7_relativeSplatPath)}}return OP(de)}))}catch(re){return j.map(()=>({type:st.error,error:re}))}}async function yt(E,T,j,U,re){let[de,...xe]=await Promise.all([j.length?Me("loader",re,j,T):[],...U.map(q=>{if(q.matches&&q.match&&q.controller){let Ce=qs(e.history,q.path,q.controller.signal);return Me("loader",Ce,[q.match],q.matches).then(pe=>pe[0])}else return Promise.resolve({type:st.error,error:on(404,{pathname:q.path})})})]);return await Promise.all([sx(E,j,de,de.map(()=>re.signal),!1,_.loaderData),sx(E,U.map(q=>q.match),xe,U.map(q=>q.controller?q.controller.signal:null),!0)]),{loaderResults:de,fetcherResults:xe}}function zt(){L=!0,K.push(...bf()),me.forEach((E,T)=>{W.has(T)&&(ne.push(T),qn(T))})}function rn(E,T,j){j===void 0&&(j={}),_.fetchers.set(E,T),Se({fetchers:new Map(_.fetchers)},{flushSync:(j&&j.flushSync)===!0})}function Zn(E,T,j,U){U===void 0&&(U={});let re=gi(_.matches,T);So(E),Se({errors:{[re.route.id]:j},fetchers:new Map(_.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function Hs(E){return f.v7_fetcherPersist&&(rt.set(E,(rt.get(E)||0)+1),je.has(E)&&je.delete(E)),_.fetchers.get(E)||CP}function So(E){let T=_.fetchers.get(E);W.has(E)&&!(T&&T.state==="loading"&&X.has(E))&&qn(E),me.delete(E),X.delete(E),le.delete(E),je.delete(E),_.fetchers.delete(E)}function Sf(E){if(f.v7_fetcherPersist){let T=(rt.get(E)||0)-1;T<=0?(rt.delete(E),je.add(E)):rt.set(E,T)}else So(E);Se({fetchers:new Map(_.fetchers)})}function qn(E){let T=W.get(E);Ne(T,"Expected fetch controller: "+E),T.abort(),W.delete(E)}function dc(E){for(let T of E){let j=Hs(T),U=Eo(j.data);_.fetchers.set(T,U)}}function aa(){let E=[],T=!1;for(let j of le){let U=_.fetchers.get(j);Ne(U,"Expected fetcher: "+j),U.state==="loading"&&(le.delete(j),E.push(j),T=!0)}return dc(E),T}function Nv(E){let T=[];for(let[j,U]of X)if(U<E){let re=_.fetchers.get(j);Ne(re,"Expected fetcher: "+j),re.state==="loading"&&(qn(j),X.delete(j),T.push(j))}return dc(T),T.length>0}function vT(E,T){let j=_.blockers.get(E)||va;return Ue.get(E)!==T&&Ue.set(E,T),j}function Pv(E){_.blockers.delete(E),Ue.delete(E)}function fc(E,T){let j=_.blockers.get(E)||va;Ne(j.state==="unblocked"&&T.state==="blocked"||j.state==="blocked"&&T.state==="blocked"||j.state==="blocked"&&T.state==="proceeding"||j.state==="blocked"&&T.state==="unblocked"||j.state==="proceeding"&&T.state==="unblocked","Invalid blocker state transition: "+j.state+" -> "+T.state);let U=new Map(_.blockers);U.set(E,T),Se({blockers:U})}function jv(E){let{currentLocation:T,nextLocation:j,historyAction:U}=E;if(Ue.size===0)return;Ue.size>1&&Ds(!1,"A router only supports one blocker at a time");let re=Array.from(Ue.entries()),[de,xe]=re[re.length-1],q=_.blockers.get(de);if(!(q&&q.state==="proceeding")&&xe({currentLocation:T,nextLocation:j,historyAction:U}))return de}function _f(E){let T=on(404,{pathname:E}),j=a||i,{matches:U,route:re}=rx(j);return bf(),{notFoundMatches:U,route:re,error:T}}function hc(E,T){return{boundaryId:gi(T.partialMatches).route.id,error:on(400,{type:"route-discovery",pathname:E,message:T.error!=null&&"message"in T.error?T.error:String(T.error)})}}function bf(E){let T=[];return gt.forEach((j,U)=>{(!E||E(U))&&(j.cancel(),T.push(U),gt.delete(U))}),T}function yT(E,T,j){if(g=E,S=T,y=j||null,!v&&_.navigation===Qf){v=!0;let U=Mv(_.location,_.matches);U!=null&&Se({restoreScrollPosition:U})}return()=>{g=null,S=null,y=null}}function Dv(E,T){return y&&y(E,T.map(U=>tP(U,_.loaderData)))||E.key}function xT(E,T){if(g&&S){let j=Dv(E,T);g[j]=S()}}function Mv(E,T){if(g){let j=Dv(E,T),U=g[j];if(typeof U=="number")return U}return null}function Cf(E,T,j){if(d)if(E){let U=E[E.length-1].route;if(U.path&&(U.path==="*"||U.path.endsWith("/*")))return{active:!0,matches:iu(T,j,l,!0)}}else return{active:!0,matches:iu(T,j,l,!0)||[]};return{active:!1,matches:null}}async function pc(E,T,j){let U=E,re=U.length>0?U[U.length-1].route:null;for(;;){let de=a==null,xe=a||i;try{await PP(d,T,U,xe,s,o,ce,j)}catch(ge){return{type:"error",error:ge,partialMatches:U}}finally{de&&(i=[...i])}if(j.aborted)return{type:"aborted"};let q=hs(xe,T,l),Ce=!1;if(q){let ge=q[q.length-1].route;if(ge.index)return{type:"success",matches:q};if(ge.path&&ge.path.length>0)if(ge.path==="*")Ce=!0;else return{type:"success",matches:q}}let pe=iu(xe,T,l,!0);if(!pe||U.map(ge=>ge.route.id).join("-")===pe.map(ge=>ge.route.id).join("-"))return{type:"success",matches:Ce?q:null};if(U=pe,re=U[U.length-1].route,re.path==="*")return{type:"success",matches:U}}}function wT(E){s={},a=fl(E,o,void 0,s)}function ST(E,T){let j=a==null;IS(E,T,a||i,s,o),j&&(i=[...i],Se({}))}return C={get basename(){return l},get future(){return f},get state(){return _},get routes(){return i},get window(){return t},initialize:He,subscribe:Ve,enableScrollRestoration:yT,navigate:Zt,fetch:J,revalidate:xo,createHref:E=>e.history.createHref(E),encodeLocation:E=>e.history.encodeLocation(E),getFetcher:Hs,deleteFetcher:Sf,dispose:$e,getBlocker:vT,deleteBlocker:Pv,patchRoutes:ST,_internalFetchControllers:W,_internalActiveDeferreds:gt,_internalSetRoutes:wT},C}function TP(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function pp(e,t,n,r,o,s,i,a){let l,u;if(i){l=[];for(let f of t)if(l.push(f),f.route.id===i){u=f;break}}else l=t,u=t[t.length-1];let d=Md(o||".",Dd(l,s),qi(e.pathname,n)||e.pathname,a==="path");return o==null&&(d.search=e.search,d.hash=e.hash),(o==null||o===""||o===".")&&u&&u.route.index&&!Xm(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Xr([n,d.pathname])),Ms(d)}function Ky(e,t,n,r){if(!r||!TP(r))return{path:n};if(r.formMethod&&!VP(r.formMethod))return{path:n,error:on(405,{method:r.formMethod})};let o=()=>({path:n,error:on(400,{type:"invalid-body"})}),s=r.formMethod||"get",i=e?s.toUpperCase():s.toLowerCase(),a=LS(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!er(i))return o();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((x,g)=>{let[y,S]=g;return""+x+y+"="+S+`
`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!er(i))return o();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return o()}}}Ne(typeof FormData=="function","FormData is not available in this environment");let l,u;if(r.formData)l=mp(r.formData),u=r.formData;else if(r.body instanceof FormData)l=mp(r.body),u=r.body;else if(r.body instanceof URLSearchParams)l=r.body,u=Jy(l);else if(r.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(r.body),u=Jy(l)}catch{return o()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(er(d.formMethod))return{path:n,submission:d};let f=ho(n);return t&&f.search&&Xm(f.search)&&l.append("index",""),f.search="?"+l,{path:Ms(f),submission:d}}function RP(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Zy(e,t,n,r,o,s,i,a,l,u,d,f,p,x,g,y){let S=y?Tn(y[1])?y[1].error:y[1].data:void 0,v=e.createURL(t.location),m=e.createURL(o),w=y&&Tn(y[1])?y[0]:void 0,b=w?RP(n,w):n,C=y?y[1].statusCode:void 0,_=i&&C&&C>=400,R=b.filter((D,O)=>{let{route:B}=D;if(B.lazy)return!0;if(B.loader==null)return!1;if(s)return typeof B.loader!="function"||B.loader.hydrate?!0:t.loaderData[B.id]===void 0&&(!t.errors||t.errors[B.id]===void 0);if(NP(t.loaderData,t.matches[O],D)||l.some(L=>L===D.route.id))return!0;let A=t.matches[O],H=D;return qy(D,wt({currentUrl:v,currentParams:A.params,nextUrl:m,nextParams:H.params},r,{actionResult:S,actionStatus:C,defaultShouldRevalidate:_?!1:a||v.pathname+v.search===m.pathname+m.search||v.search!==m.search||AS(A,H)}))}),N=[];return f.forEach((D,O)=>{if(s||!n.some(K=>K.route.id===D.routeId)||d.has(O))return;let B=hs(x,D.path,g);if(!B){N.push({key:O,routeId:D.routeId,path:D.path,matches:null,match:null,controller:null});return}let A=t.fetchers.get(O),H=Na(B,D.path),L=!1;p.has(O)?L=!1:u.includes(O)?L=!0:A&&A.state!=="idle"&&A.data===void 0?L=a:L=qy(H,wt({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:S,actionStatus:C,defaultShouldRevalidate:_?!1:a})),L&&N.push({key:O,routeId:D.routeId,path:D.path,matches:B,match:H,controller:new AbortController})}),[R,N]}function NP(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function AS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function qy(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function PP(e,t,n,r,o,s,i,a){let l=[t,...n.map(u=>u.route.id)].join("-");try{let u=i.get(l);u||(u=e({path:t,matches:n,patch:(d,f)=>{a.aborted||IS(d,f,r,o,s)}}),i.set(l,u)),u&&FP(u)&&await u}finally{i.delete(l)}}function IS(e,t,n,r,o){if(e){var s;let i=r[e];Ne(i,"No route found to patch children into: routeId = "+e);let a=fl(t,o,[e,"patch",String(((s=i.children)==null?void 0:s.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=fl(t,o,["patch",String(n.length||"0")],r);n.push(...i)}}async function Xy(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Ne(o,"No route found in manifest");let s={};for(let i in r){let l=o[i]!==void 0&&i!=="hasErrorBoundary";Ds(!l,'Route "'+o.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!l&&!JN.has(i)&&(s[i]=r[i])}Object.assign(o,s),Object.assign(o,wt({},t(o),{lazy:void 0}))}function jP(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function DP(e,t,n,r,o,s,i,a){let l=r.reduce((f,p)=>f.add(p.route.id),new Set),u=new Set,d=await e({matches:o.map(f=>{let p=l.has(f.route.id);return wt({},f,{shouldLoad:p,resolve:g=>(u.add(f.route.id),p?MP(t,n,f,s,i,g,a):Promise.resolve({type:st.data,result:void 0}))})}),request:n,params:o[0].params,context:a});return o.forEach(f=>Ne(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,p)=>l.has(o[p].route.id))}async function MP(e,t,n,r,o,s,i){let a,l,u=d=>{let f,p=new Promise((y,S)=>f=S);l=()=>f(),t.signal.addEventListener("abort",l);let x=y=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...y!==void 0?[y]:[]),g;return s?g=s(y=>x(y)):g=(async()=>{try{return{type:"data",result:await x()}}catch(y){return{type:"error",result:y}}})(),Promise.race([g,p])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[p]=await Promise.all([u(d).catch(x=>{f=x}),Xy(n.route,o,r)]);if(f!==void 0)throw f;a=p}else if(await Xy(n.route,o,r),d=n.route[e],d)a=await u(d);else if(e==="action"){let f=new URL(t.url),p=f.pathname+f.search;throw on(405,{method:t.method,pathname:p,routeId:n.route.id})}else return{type:st.data,result:void 0};else if(d)a=await u(d);else{let f=new URL(t.url),p=f.pathname+f.search;throw on(404,{pathname:p})}Ne(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:st.error,result:d}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function OP(e){let{result:t,type:n,status:r}=e;if(FS(t)){let i;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(a){return{type:st.error,error:a}}return n===st.error?{type:st.error,error:new Zm(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:st.data,data:i,statusCode:t.status,headers:t.headers}}if(n===st.error)return{type:st.error,error:t,statusCode:Od(t)?t.status:r};if($P(t)){var o,s;return{type:st.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((s=t.init)==null?void 0:s.headers)&&new Headers(t.init.headers)}}return{type:st.data,data:t,statusCode:r}}function AP(e,t,n,r,o,s){let i=e.headers.get("Location");if(Ne(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!qm.test(i)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);i=pp(new URL(t.url),a,o,!0,i,s),e.headers.set("Location",i)}return e}function Qy(e,t,n){if(qm.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),s=qi(o.pathname,n)!=null;if(o.origin===t.origin&&s)return o.pathname+o.search+o.hash}return e}function qs(e,t,n,r){let o=e.createURL(LS(t)).toString(),s={signal:n};if(r&&er(r.formMethod)){let{formMethod:i,formEncType:a}=r;s.method=i.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(r.json)):a==="text/plain"?s.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?s.body=mp(r.formData):s.body=r.formData}return new Request(o,s)}function mp(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Jy(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function IP(e,t,n,r,o,s){let i={},a=null,l,u=!1,d={},f=r&&Tn(r[1])?r[1].error:void 0;return n.forEach((p,x)=>{let g=t[x].route.id;if(Ne(!ys(p),"Cannot handle redirect results in processLoaderData"),Tn(p)){let y=p.error;f!==void 0&&(y=f,f=void 0),a=a||{};{let S=gi(e,g);a[S.route.id]==null&&(a[S.route.id]=y)}i[g]=void 0,u||(u=!0,l=Od(p.error)?p.error.status:500),p.headers&&(d[g]=p.headers)}else vs(p)?(o.set(g,p.deferredData),i[g]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!u&&(l=p.statusCode),p.headers&&(d[g]=p.headers)):(i[g]=p.data,p.statusCode&&p.statusCode!==200&&!u&&(l=p.statusCode),p.headers&&(d[g]=p.headers))}),f!==void 0&&r&&(a={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:d}}function ex(e,t,n,r,o,s,i,a){let{loaderData:l,errors:u}=IP(t,n,r,o,a);for(let d=0;d<s.length;d++){let{key:f,match:p,controller:x}=s[d];Ne(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let g=i[d];if(!(x&&x.signal.aborted))if(Tn(g)){let y=gi(e.matches,p==null?void 0:p.route.id);u&&u[y.route.id]||(u=wt({},u,{[y.route.id]:g.error})),e.fetchers.delete(f)}else if(ys(g))Ne(!1,"Unhandled fetcher revalidation redirect");else if(vs(g))Ne(!1,"Unhandled fetcher deferred data");else{let y=Eo(g.data);e.fetchers.set(f,y)}}return{loaderData:l,errors:u}}function tx(e,t,n,r){let o=wt({},t);for(let s of n){let i=s.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(o[i]=t[i]):e[i]!==void 0&&s.route.loader&&(o[i]=e[i]),r&&r.hasOwnProperty(i))break}return o}function nx(e){return e?Tn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function gi(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function rx(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function on(e,t){let{pathname:n,routeId:r,method:o,type:s,message:i}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",s==="route-discovery"?l='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+i):o&&n&&r?l="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":s==="defer-action"?l="defer() is not supported in actions":s==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",l='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new Zm(e||500,a,new Error(l),!0)}function ox(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(ys(n))return{result:n,idx:t}}}function LS(e){let t=typeof e=="string"?ho(e):e;return Ms(wt({},t,{hash:""}))}function LP(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function FP(e){return typeof e=="object"&&e!=null&&"then"in e}function UP(e){return FS(e.result)&&_P.has(e.result.status)}function vs(e){return e.type===st.deferred}function Tn(e){return e.type===st.error}function ys(e){return(e&&e.type)===st.redirect}function $P(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function FS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function VP(e){return SP.has(e.toLowerCase())}function er(e){return xP.has(e.toLowerCase())}async function sx(e,t,n,r,o,s){for(let i=0;i<n.length;i++){let a=n[i],l=t[i];if(!l)continue;let u=e.find(f=>f.route.id===l.route.id),d=u!=null&&!AS(u,l)&&(s&&s[l.route.id])!==void 0;if(vs(a)&&(o||d)){let f=r[i];Ne(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await US(a,f,o).then(p=>{p&&(n[i]=p||n[i])})}}}async function US(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:st.data,data:e.deferredData.unwrappedData}}catch(o){return{type:st.error,error:o}}return{type:st.data,data:e.deferredData.data}}}function Xm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Na(e,t){let n=typeof t=="string"?ho(t).search:t.search;if(e[e.length-1].route.index&&Xm(n||""))return e[e.length-1];let r=DS(e);return r[r.length-1]}function ix(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:s,json:i}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Jf(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function zP(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ya(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function WP(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Eo(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function YP(e,t){try{let n=e.sessionStorage.getItem(OS);if(n){let r=JSON.parse(n);for(let[o,s]of Object.entries(r||{}))s&&Array.isArray(s)&&t.set(o,new Set(s||[]))}}catch{}}function HP(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(OS,JSON.stringify(n))}catch(r){Ds(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
* React Router v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Vu(){return Vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vu.apply(this,arguments)}const Ad=h.createContext(null),$S=h.createContext(null),ss=h.createContext(null),Qm=h.createContext(null),po=h.createContext({outlet:null,matches:[],isDataRoute:!1}),VS=h.createContext(null);function BP(e,t){let{relative:n}=t===void 0?{}:t;Xi()||Ne(!1);let{basename:r,navigator:o}=h.useContext(ss),{hash:s,pathname:i,search:a}=WS(e,{relative:n}),l=i;return r!=="/"&&(l=i==="/"?r:Xr([r,i])),o.createHref({pathname:l,search:a,hash:s})}function Xi(){return h.useContext(Qm)!=null}function is(){return Xi()||Ne(!1),h.useContext(Qm).location}function zS(e){h.useContext(ss).static||h.useLayoutEffect(e)}function as(){let{isDataRoute:e}=h.useContext(po);return e?ij():GP()}function GP(){Xi()||Ne(!1);let e=h.useContext(Ad),{basename:t,future:n,navigator:r}=h.useContext(ss),{matches:o}=h.useContext(po),{pathname:s}=is(),i=JSON.stringify(Dd(o,n.v7_relativeSplatPath)),a=h.useRef(!1);return zS(()=>{a.current=!0}),h.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=Md(u,JSON.parse(i),s,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Xr([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,s,e])}const KP=h.createContext(null);function ZP(e){let t=h.useContext(po).outlet;return t&&h.createElement(KP.Provider,{value:e},t)}function WS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=h.useContext(ss),{matches:o}=h.useContext(po),{pathname:s}=is(),i=JSON.stringify(Dd(o,r.v7_relativeSplatPath));return h.useMemo(()=>Md(e,JSON.parse(i),s,n==="path"),[e,i,s,n])}function qP(e,t,n,r){Xi()||Ne(!1);let{navigator:o}=h.useContext(ss),{matches:s}=h.useContext(po),i=s[s.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=is(),d;d=u;let f=d.pathname||"/",p=f;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let x=hs(e,{pathname:p});return tj(x&&x.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Xr([l,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Xr([l,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,n,r)}function XP(){let e=sj(),t=Od(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),n?h.createElement("pre",{style:o},n):null,null)}const QP=h.createElement(XP,null);class JP extends h.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?h.createElement(po.Provider,{value:this.props.routeContext},h.createElement(VS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ej(e){let{routeContext:t,match:n,children:r}=e,o=h.useContext(Ad);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),h.createElement(po.Provider,{value:t},r)}function tj(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let i=e,a=(o=n)==null?void 0:o.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Ne(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:p,errors:x}=n,g=f.route.loader&&p[f.route.id]===void 0&&(!x||x[f.route.id]===void 0);if(f.route.lazy||g){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,p)=>{let x,g=!1,y=null,S=null;n&&(x=a&&f.route.id?a[f.route.id]:void 0,y=f.route.errorElement||QP,l&&(u<0&&p===0?(aj("route-fallback"),g=!0,S=null):u===p&&(g=!0,S=f.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,p+1)),m=()=>{let w;return x?w=y:g?w=S:f.route.Component?w=h.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,h.createElement(ej,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?h.createElement(JP,{location:n.location,revalidation:n.revalidation,component:y,error:x,children:m(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):m()},null)}var YS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(YS||{}),zu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(zu||{});function nj(e){let t=h.useContext(Ad);return t||Ne(!1),t}function rj(e){let t=h.useContext($S);return t||Ne(!1),t}function oj(e){let t=h.useContext(po);return t||Ne(!1),t}function HS(e){let t=oj(),n=t.matches[t.matches.length-1];return n.route.id||Ne(!1),n.route.id}function sj(){var e;let t=h.useContext(VS),n=rj(zu.UseRouteError),r=HS(zu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ij(){let{router:e}=nj(YS.UseNavigateStable),t=HS(zu.UseNavigateStable),n=h.useRef(!1);return zS(()=>{n.current=!0}),h.useCallback(function(o,s){s===void 0&&(s={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Vu({fromRouteId:t},s)))},[e,t])}const ax={};function aj(e,t,n){ax[e]||(ax[e]=!0)}function BS(e){let{to:t,replace:n,state:r,relative:o}=e;Xi()||Ne(!1);let{future:s,static:i}=h.useContext(ss),{matches:a}=h.useContext(po),{pathname:l}=is(),u=as(),d=Md(t,Dd(a,s.v7_relativeSplatPath),l,o==="path"),f=JSON.stringify(d);return h.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:o}),[u,f,o,n,r]),null}function GS(e){return ZP(e.context)}function lj(e){let{basename:t="/",children:n=null,location:r,navigationType:o=jt.Pop,navigator:s,static:i=!1,future:a}=e;Xi()&&Ne(!1);let l=t.replace(/^\/*/,"/"),u=h.useMemo(()=>({basename:l,navigator:s,static:i,future:Vu({v7_relativeSplatPath:!1},a)}),[l,a,s,i]);typeof r=="string"&&(r=ho(r));let{pathname:d="/",search:f="",hash:p="",state:x=null,key:g="default"}=r,y=h.useMemo(()=>{let S=qi(d,l);return S==null?null:{location:{pathname:S,search:f,hash:p,state:x,key:g},navigationType:o}},[l,d,f,p,x,g,o]);return y==null?null:h.createElement(ss.Provider,{value:u},h.createElement(Qm.Provider,{children:n,value:y}))}new Promise(()=>{});function cj(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:h.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:h.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:h.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
* React Router DOM v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hl.apply(this,arguments)}function uj(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function dj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fj(e,t){return e.button===0&&(!t||t==="_self")&&!dj(e)}function gp(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function hj(e,t){let n=gp(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(s=>{n.append(o,s)})}),n}const pj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],mj="6";try{window.__reactRouterVersion=mj}catch{}function gj(e,t){return EP({basename:void 0,future:hl({},void 0,{v7_prependBasename:!0}),history:qN({window:void 0}),hydrationData:vj(),routes:e,mapRouteProperties:cj,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function vj(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=hl({},t,{errors:yj(t.errors)})),t}function yj(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new Zm(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let s=window[o.__subType];if(typeof s=="function")try{let i=new s(o.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let s=new Error(o.message);s.stack="",n[r]=s}}else n[r]=o;return n}const xj=h.createContext({isTransitioning:!1}),wj=h.createContext(new Map),Sj="startTransition",lx=Ew[Sj],_j="flushSync",cx=ZN[_j];function bj(e){lx?lx(e):e()}function xa(e){cx?cx(e):e()}class Cj{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function kj(e){let{fallbackElement:t,router:n,future:r}=e,[o,s]=h.useState(n.state),[i,a]=h.useState(),[l,u]=h.useState({isTransitioning:!1}),[d,f]=h.useState(),[p,x]=h.useState(),[g,y]=h.useState(),S=h.useRef(new Map),{v7_startTransition:v}=r||{},m=h.useCallback(N=>{v?bj(N):N()},[v]),w=h.useCallback((N,D)=>{let{deletedFetchers:O,unstable_flushSync:B,unstable_viewTransitionOpts:A}=D;O.forEach(L=>S.current.delete(L)),N.fetchers.forEach((L,K)=>{L.data!==void 0&&S.current.set(K,L.data)});let H=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!A||H){B?xa(()=>s(N)):m(()=>s(N));return}if(B){xa(()=>{p&&(d&&d.resolve(),p.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:A.currentLocation,nextLocation:A.nextLocation})});let L=n.window.document.startViewTransition(()=>{xa(()=>s(N))});L.finished.finally(()=>{xa(()=>{f(void 0),x(void 0),a(void 0),u({isTransitioning:!1})})}),xa(()=>x(L));return}p?(d&&d.resolve(),p.skipTransition(),y({state:N,currentLocation:A.currentLocation,nextLocation:A.nextLocation})):(a(N),u({isTransitioning:!0,flushSync:!1,currentLocation:A.currentLocation,nextLocation:A.nextLocation}))},[n.window,p,d,S,m]);h.useLayoutEffect(()=>n.subscribe(w),[n,w]),h.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new Cj)},[l]),h.useEffect(()=>{if(d&&i&&n.window){let N=i,D=d.promise,O=n.window.document.startViewTransition(async()=>{m(()=>s(N)),await D});O.finished.finally(()=>{f(void 0),x(void 0),a(void 0),u({isTransitioning:!1})}),x(O)}},[m,i,d,n.window]),h.useEffect(()=>{d&&i&&o.location.key===i.location.key&&d.resolve()},[d,p,o.location,i]),h.useEffect(()=>{!l.isTransitioning&&g&&(a(g.state),u({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),y(void 0))},[l.isTransitioning,g]),h.useEffect(()=>{},[]);let b=h.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:N=>n.navigate(N),push:(N,D,O)=>n.navigate(N,{state:D,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(N,D,O)=>n.navigate(N,{replace:!0,state:D,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),C=n.basename||"/",_=h.useMemo(()=>({router:n,navigator:b,static:!1,basename:C}),[n,b,C]),R=h.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return h.createElement(h.Fragment,null,h.createElement(Ad.Provider,{value:_},h.createElement($S.Provider,{value:o},h.createElement(wj.Provider,{value:S.current},h.createElement(xj.Provider,{value:l},h.createElement(lj,{basename:C,location:o.location,navigationType:o.historyAction,navigator:b,future:R},o.initialized||n.future.v7_partialHydration?h.createElement(Ej,{routes:n.routes,future:n.future,state:o}):t))))),null)}const Ej=h.memo(Tj);function Tj(e){let{routes:t,future:n,state:r}=e;return qP(t,void 0,r,n)}const Rj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Nj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$r=h.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:s,replace:i,state:a,target:l,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,p=uj(t,pj),{basename:x}=h.useContext(ss),g,y=!1;if(typeof u=="string"&&Nj.test(u)&&(g=u,Rj))try{let w=new URL(window.location.href),b=u.startsWith("//")?new URL(w.protocol+u):new URL(u),C=qi(b.pathname,x);b.origin===w.origin&&C!=null?u=C+b.search+b.hash:y=!0}catch{}let S=BP(u,{relative:o}),v=Pj(u,{replace:i,state:a,target:l,preventScrollReset:d,relative:o,unstable_viewTransition:f});function m(w){r&&r(w),w.defaultPrevented||v(w)}return h.createElement("a",hl({},p,{href:g||S,onClick:y||s?r:m,ref:n,target:l}))});var ux;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ux||(ux={}));var dx;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dx||(dx={}));function Pj(e,t){let{target:n,replace:r,state:o,preventScrollReset:s,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,l=as(),u=is(),d=WS(e,{relative:i});return h.useCallback(f=>{if(fj(f,n)){f.preventDefault();let p=r!==void 0?r:Ms(u)===Ms(d);l(e,{replace:p,state:o,preventScrollReset:s,relative:i,unstable_viewTransition:a})}},[u,l,d,r,o,n,e,s,i,a])}function jj(e){let t=h.useRef(gp(e)),n=h.useRef(!1),r=is(),o=h.useMemo(()=>hj(r.search,n.current?null:t.current),[r.search]),s=as(),i=h.useCallback((a,l)=>{const u=gp(typeof a=="function"?a(o):a);n.current=!0,s("?"+u,l)},[s,o]);return[o,i]}/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),KS=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var Mj={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Oj=h.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>h.createElement("svg",{ref:l,...Mj,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:KS("lucide",o),...a},[...i.map(([u,d])=>h.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nn=(e,t)=>{const n=h.forwardRef(({className:r,...o},s)=>h.createElement(Oj,{ref:s,iconNode:t,className:KS(`lucide-${Dj(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZS=nn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qS=nn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Aj=nn("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ij=nn("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const XS=nn("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lj=nn("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QS=nn("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JS=nn("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vp=nn("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fx=nn("History",[["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"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fj=nn("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Uj=nn("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hx=nn("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const px=nn("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $j=nn("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jm=nn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Vj(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Id(...e){return t=>e.forEach(n=>Vj(n,t))}function be(...e){return h.useCallback(Id(...e),e)}var oo=h.forwardRef((e,t)=>{const{children:n,...r}=e,o=h.Children.toArray(n),s=o.find(zj);if(s){const i=s.props.children,a=o.map(l=>l===s?h.Children.count(i)>1?h.Children.only(null):h.isValidElement(i)?i.props.children:null:l);return c.jsx(yp,{...r,ref:t,children:h.isValidElement(i)?h.cloneElement(i,void 0,a):null})}return c.jsx(yp,{...r,ref:t,children:n})});oo.displayName="Slot";var yp=h.forwardRef((e,t)=>{const{children:n,...r}=e;if(h.isValidElement(n)){const o=Yj(n);return h.cloneElement(n,{...Wj(r,n.props),ref:t?Id(t,o):o})}return h.Children.count(n)>1?h.Children.only(null):null});yp.displayName="SlotClone";var eg=({children:e})=>c.jsx(c.Fragment,{children:e});function zj(e){return h.isValidElement(e)&&e.type===eg}function Wj(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Yj(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 e_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=e_(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Hj(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=e_(e))&&(r&&(r+=" "),r+=t);return r}const mx=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,gx=Hj,Wl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],f=s==null?void 0:s[u];if(d===null)return null;const p=mx(d)||mx(f);return o[u][p]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,p]=d;return p===void 0||(u[f]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:p,...x}=d;return Object.entries(x).every(g=>{let[y,S]=g;return Array.isArray(S)?S.includes({...s,...a}[y]):{...s,...a}[y]===S})?[...u,f,p]:u},[]);return gx(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function t_(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=t_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bj(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=t_(e))&&(r&&(r+=" "),r+=t);return r}const tg="-";function Gj(e){const t=Zj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(tg);return a[0]===""&&a.length!==1&&a.shift(),n_(a,t)||Kj(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function n_(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?n_(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(tg);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const vx=/^\[(.+)\]$/;function Kj(e){if(vx.test(e)){const t=vx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Zj(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Xj(Object.entries(e.classGroups),n).forEach(([s,i])=>{xp(i,r,s,t)}),r}function xp(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:yx(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(qj(o)){xp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{xp(i,yx(t,s),n,r)})})}function yx(e,t){let n=e;return t.split(tg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function qj(e){return e.isThemeGetter}function Xj(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function Qj(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const r_="!";function Jj(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let u=0,d=0,f;for(let S=0;S<a.length;S++){let v=a[S];if(u===0){if(v===o&&(r||a.slice(S,S+s)===t)){l.push(a.slice(d,S)),d=S+s;continue}if(v==="/"){f=S;continue}}v==="["?u++:v==="]"&&u--}const p=l.length===0?a:a.substring(d),x=p.startsWith(r_),g=x?p.substring(1):p,y=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:x,baseClassName:g,maybePostfixModifierPosition:y}}return n?function(l){return n({className:l,parseClassName:i})}:i}function eD(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function tD(e){return{cache:Qj(e.cacheSize),parseClassName:Jj(e),...Gj(e)}}const nD=/\s+/;function rD(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(nD).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(i);let f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f)return{isTailwindClass:!1,originalClassName:i};if(p=r(u),!p)return{isTailwindClass:!1,originalClassName:i};f=!1}const x=eD(a).join(":");return{isTailwindClass:!0,modifierId:l?x+r_:x,classGroupId:p,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=i,d=a+l;return s.has(d)?!1:(s.add(d),o(l,u).forEach(f=>s.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function oD(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=o_(t))&&(r&&(r+=" "),r+=n);return r}function o_(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=o_(e[r]))&&(n&&(n+=" "),n+=t);return n}function sD(e,...t){let n,r,o,s=i;function i(l){const u=t.reduce((d,f)=>f(d),e());return n=tD(u),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=rD(l,n);return o(l,d),d}return function(){return s(oD.apply(null,arguments))}}function at(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const s_=/^\[(?:([a-z-]+):)?(.+)\]$/i,iD=/^\d+\/\d+$/,aD=new Set(["px","full","screen"]),lD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cD=/\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$/,uD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,dD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Lr(e){return xs(e)||aD.has(e)||iD.test(e)}function Co(e){return Qi(e,"length",wD)}function xs(e){return!!e&&!Number.isNaN(Number(e))}function Ac(e){return Qi(e,"number",xs)}function wa(e){return!!e&&Number.isInteger(Number(e))}function hD(e){return e.endsWith("%")&&xs(e.slice(0,-1))}function ke(e){return s_.test(e)}function ko(e){return lD.test(e)}const pD=new Set(["length","size","percentage"]);function mD(e){return Qi(e,pD,i_)}function gD(e){return Qi(e,"position",i_)}const vD=new Set(["image","url"]);function yD(e){return Qi(e,vD,_D)}function xD(e){return Qi(e,"",SD)}function Sa(){return!0}function Qi(e,t,n){const r=s_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function wD(e){return cD.test(e)&&!uD.test(e)}function i_(){return!1}function SD(e){return dD.test(e)}function _D(e){return fD.test(e)}function bD(){const e=at("colors"),t=at("spacing"),n=at("blur"),r=at("brightness"),o=at("borderColor"),s=at("borderRadius"),i=at("borderSpacing"),a=at("borderWidth"),l=at("contrast"),u=at("grayscale"),d=at("hueRotate"),f=at("invert"),p=at("gap"),x=at("gradientColorStops"),g=at("gradientColorStopPositions"),y=at("inset"),S=at("margin"),v=at("opacity"),m=at("padding"),w=at("saturate"),b=at("scale"),C=at("sepia"),_=at("skew"),R=at("space"),N=at("translate"),D=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",ke,t],A=()=>[ke,t],H=()=>["",Lr,Co],L=()=>["auto",xs,ke],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",ke],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[xs,Ac],me=()=>[xs,ke];return{cacheSize:500,separator:":",theme:{colors:[Sa],spacing:[Lr,Co],blur:["none","",ko,ke],brightness:le(),borderColor:[e],borderRadius:["none","","full",ko,ke],borderSpacing:A(),borderWidth:H(),contrast:le(),grayscale:M(),hueRotate:me(),invert:M(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[hD,Co],inset:B(),margin:B(),opacity:le(),padding:A(),saturate:le(),scale:le(),sepia:M(),skew:me(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",ke]}],container:["container"],columns:[{columns:[ko]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...K(),ke]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wa,ke]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ke]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",wa,ke]}],"grid-cols":[{"grid-cols":[Sa]}],"col-start-end":[{col:["auto",{span:["full",wa,ke]},ke]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Sa]}],"row-start-end":[{row:["auto",{span:[wa,ke]},ke]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ke]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ke,t]}],"min-w":[{"min-w":[ke,t,"min","max","fit"]}],"max-w":[{"max-w":[ke,t,"none","full","min","max","fit","prose",{screen:[ko]},ko]}],h:[{h:[ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ko,Co]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ac]}],"font-family":[{font:[Sa]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ke]}],"line-clamp":[{"line-clamp":["none",xs,Ac]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Lr,ke]}],"list-image":[{"list-image":["none",ke]}],"list-style-type":[{list:["none","disc","decimal",ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Lr,Co]}],"underline-offset":[{"underline-offset":["auto",Lr,ke]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),gD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...ne(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:ne()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[Lr,ke]}],"outline-w":[{outline:[Lr,Co]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Lr,Co]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ko,xD]}],"shadow-color":[{shadow:[Sa]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ko,ke]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ke]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",ke]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[wa,ke]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ke]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Lr,Co,Ac]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const CD=sD(bD);function se(...e){return CD(Bj(e))}const ng=Wl("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Dt=h.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?oo:"button";return c.jsx(i,{className:se(ng({variant:t,size:n,className:e})),ref:s,...o})});Dt.displayName="Button";function G(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 kD(e,t){const n=h.createContext(t);function r(s){const{children:i,...a}=s,l=h.useMemo(()=>a,Object.values(a));return c.jsx(n.Provider,{value:l,children:i})}function o(s){const i=h.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function _n(e,t=[]){let n=[];function r(s,i){const a=h.createContext(i),l=n.length;n=[...n,i];function u(f){const{scope:p,children:x,...g}=f,y=(p==null?void 0:p[e][l])||a,S=h.useMemo(()=>g,Object.values(g));return c.jsx(y.Provider,{value:S,children:x})}function d(f,p){const x=(p==null?void 0:p[e][l])||a,g=h.useContext(x);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return u.displayName=s+"Provider",[u,d]}const o=()=>{const s=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,ED(o,...t)]}function ED(...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(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function _t(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function so({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=TD({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=_t(n),l=h.useCallback(u=>{if(s){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else o(u)},[s,e,o,a]);return[i,l]}function TD({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,o=h.useRef(r),s=_t(t);return h.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var RD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ve=RD.reduce((e,t)=>{const n=h.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?oo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function rg(e,t){e&&fo.flushSync(()=>e.dispatchEvent(t))}function Ld(e){const t=e+"CollectionProvider",[n,r]=_n(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=x=>{const{scope:g,children:y}=x,S=Oe.useRef(null),v=Oe.useRef(new Map).current;return c.jsx(o,{scope:g,itemMap:v,collectionRef:S,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=Oe.forwardRef((x,g)=>{const{scope:y,children:S}=x,v=s(a,y),m=be(g,v.collectionRef);return c.jsx(oo,{ref:m,children:S})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Oe.forwardRef((x,g)=>{const{scope:y,children:S,...v}=x,m=Oe.useRef(null),w=be(g,m),b=s(u,y);return Oe.useEffect(()=>(b.itemMap.set(m,{ref:m,...v}),()=>void b.itemMap.delete(m))),c.jsx(oo,{[d]:"",ref:w,children:S})});f.displayName=u;function p(x){const g=s(e+"CollectionConsumer",x);return Oe.useCallback(()=>{const S=g.collectionRef.current;if(!S)return[];const v=Array.from(S.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((b,C)=>v.indexOf(b.ref.current)-v.indexOf(C.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},p,r]}var ND=h.createContext(void 0);function Yl(e){const t=h.useContext(ND);return e||t||"ltr"}function PD(e,t=globalThis==null?void 0:globalThis.document){const n=_t(e);h.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 jD="DismissableLayer",wp="dismissableLayer.update",DD="dismissableLayer.pointerDownOutside",MD="dismissableLayer.focusOutside",xx,a_=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ji=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=h.useContext(a_),[d,f]=h.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=h.useState({}),g=be(t,R=>f(R)),y=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(S),m=d?y.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,b=m>=v,C=AD(R=>{const N=R.target,D=[...u.branches].some(O=>O.contains(N));!b||D||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},p),_=ID(R=>{const N=R.target;[...u.branches].some(O=>O.contains(N))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},p);return PD(R=>{m===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},p),h.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xx=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),wx(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=xx)}},[d,p,n,u]),h.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),wx())},[d,u]),h.useEffect(()=>{const R=()=>x({});return document.addEventListener(wp,R),()=>document.removeEventListener(wp,R)},[]),c.jsx(ve.div,{...l,ref:g,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:G(e.onFocusCapture,_.onFocusCapture),onBlurCapture:G(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,C.onPointerDownCapture)})});Ji.displayName=jD;var OD="DismissableLayerBranch",l_=h.forwardRef((e,t)=>{const n=h.useContext(a_),r=h.useRef(null),o=be(t,r);return h.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(ve.div,{...e,ref:o})});l_.displayName=OD;function AD(e,t=globalThis==null?void 0:globalThis.document){const n=_t(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){c_(DD,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ID(e,t=globalThis==null?void 0:globalThis.document){const n=_t(e),r=h.useRef(!1);return h.useEffect(()=>{const o=s=>{s.target&&!r.current&&c_(MD,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wx(){const e=new CustomEvent(wp);document.dispatchEvent(e)}function c_(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?rg(o,s):o.dispatchEvent(s)}var LD=Ji,FD=l_,eh=0;function og(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Sx()),document.body.insertAdjacentElement("beforeend",e[1]??Sx()),eh++,()=>{eh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),eh--}},[])}function Sx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var th="focusScope.autoFocusOnMount",nh="focusScope.autoFocusOnUnmount",_x={bubbles:!1,cancelable:!0},UD="FocusScope",Fd=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=h.useState(null),u=_t(o),d=_t(s),f=h.useRef(null),p=be(t,y=>l(y)),x=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let y=function(w){if(x.paused||!a)return;const b=w.target;a.contains(b)?f.current=b:To(f.current,{select:!0})},S=function(w){if(x.paused||!a)return;const b=w.relatedTarget;b!==null&&(a.contains(b)||To(f.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&To(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",S);const m=new MutationObserver(v);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",S),m.disconnect()}}},[r,a,x.paused]),h.useEffect(()=>{if(a){Cx.add(x);const y=document.activeElement;if(!a.contains(y)){const v=new CustomEvent(th,_x);a.addEventListener(th,u),a.dispatchEvent(v),v.defaultPrevented||($D(HD(u_(a)),{select:!0}),document.activeElement===y&&To(a))}return()=>{a.removeEventListener(th,u),setTimeout(()=>{const v=new CustomEvent(nh,_x);a.addEventListener(nh,d),a.dispatchEvent(v),v.defaultPrevented||To(y??document.body,{select:!0}),a.removeEventListener(nh,d),Cx.remove(x)},0)}}},[a,u,d,x]);const g=h.useCallback(y=>{if(!n&&!r||x.paused)return;const S=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,v=document.activeElement;if(S&&v){const m=y.currentTarget,[w,b]=VD(m);w&&b?!y.shiftKey&&v===b?(y.preventDefault(),n&&To(w,{select:!0})):y.shiftKey&&v===w&&(y.preventDefault(),n&&To(b,{select:!0})):v===m&&y.preventDefault()}},[n,r,x.paused]);return c.jsx(ve.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});Fd.displayName=UD;function $D(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(To(r,{select:t}),document.activeElement!==n)return}function VD(e){const t=u_(e),n=bx(t,e),r=bx(t.reverse(),e);return[n,r]}function u_(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 bx(e,t){for(const n of e)if(!zD(n,{upTo:t}))return n}function zD(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 WD(e){return e instanceof HTMLInputElement&&"select"in e}function To(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&WD(e)&&t&&e.select()}}var Cx=YD();function YD(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=kx(e,t),e.unshift(t)},remove(t){var n;e=kx(e,t),(n=e[0])==null||n.resume()}}}function kx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function HD(e){return e.filter(t=>t.tagName!=="A")}var Kt=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},BD=Ew.useId||(()=>{}),GD=0;function Tr(e){const[t,n]=h.useState(BD());return Kt(()=>{n(r=>r??String(GD++))},[e]),t?`radix-${t}`:""}const KD=["top","right","bottom","left"],br=Math.min,Rn=Math.max,Wu=Math.round,Ic=Math.floor,Zo=e=>({x:e,y:e}),ZD={left:"right",right:"left",bottom:"top",top:"bottom"},qD={start:"end",end:"start"};function Sp(e,t,n){return Rn(e,br(t,n))}function io(e,t){return typeof e=="function"?e(t):e}function ao(e){return e.split("-")[0]}function ea(e){return e.split("-")[1]}function sg(e){return e==="x"?"y":"x"}function ig(e){return e==="y"?"height":"width"}function qo(e){return["top","bottom"].includes(ao(e))?"y":"x"}function ag(e){return sg(qo(e))}function XD(e,t,n){n===void 0&&(n=!1);const r=ea(e),o=ag(e),s=ig(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Yu(i)),[i,Yu(i)]}function QD(e){const t=Yu(e);return[_p(e),t,_p(t)]}function _p(e){return e.replace(/start|end/g,t=>qD[t])}function JD(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function eM(e,t,n,r){const o=ea(e);let s=JD(ao(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(_p)))),s}function Yu(e){return e.replace(/left|right|bottom|top/g,t=>ZD[t])}function tM(e){return{top:0,right:0,bottom:0,left:0,...e}}function d_(e){return typeof e!="number"?tM(e):{top:e,right:e,bottom:e,left:e}}function Hu(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 Ex(e,t,n){let{reference:r,floating:o}=e;const s=qo(t),i=ag(t),a=ig(i),l=ao(t),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let x;switch(l){case"top":x={x:d,y:r.y-o.height};break;case"bottom":x={x:d,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:f};break;case"left":x={x:r.x-o.width,y:f};break;default:x={x:r.x,y:r.y}}switch(ea(t)){case"start":x[i]-=p*(n&&u?-1:1);break;case"end":x[i]+=p*(n&&u?-1:1);break}return x}const nM=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Ex(u,r,l),p=r,x={},g=0;for(let y=0;y<a.length;y++){const{name:S,fn:v}=a[y],{x:m,y:w,data:b,reset:C}=await v({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:x,rects:u,platform:i,elements:{reference:e,floating:t}});d=m??d,f=w??f,x={...x,[S]:{...x[S],...b}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:f}=Ex(u,p,l)),y=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:x}};async function pl(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:x=0}=io(t,e),g=d_(x),S=a[p?f==="floating"?"reference":"floating":f],v=Hu(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),m=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=Hu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:l}):m);return{top:(v.top-C.top+g.top)/b.y,bottom:(C.bottom-v.bottom+g.bottom)/b.y,left:(v.left-C.left+g.left)/b.x,right:(C.right-v.right+g.right)/b.x}}const rM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=io(e,t)||{};if(u==null)return{};const f=d_(d),p={x:n,y:r},x=ag(o),g=ig(x),y=await i.getDimensions(u),S=x==="y",v=S?"top":"left",m=S?"bottom":"right",w=S?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[x]-p[x]-s.floating[g],C=p[x]-s.reference[x],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let R=_?_[w]:0;(!R||!await(i.isElement==null?void 0:i.isElement(_)))&&(R=a.floating[w]||s.floating[g]);const N=b/2-C/2,D=R/2-y[g]/2-1,O=br(f[v],D),B=br(f[m],D),A=O,H=R-y[g]-B,L=R/2-y[g]/2+N,K=Sp(A,L,H),ne=!l.arrow&&ea(o)!=null&&L!==K&&s.reference[g]/2-(L<A?O:B)-y[g]/2<0,W=ne?L<A?L-A:L-H:0;return{[x]:p[x]+W,data:{[x]:K,centerOffset:L-K-W,...ne&&{alignmentOffset:W}},reset:ne}}}),oM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...S}=io(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=ao(o),m=qo(a),w=ao(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=p||(w||!y?[Yu(a)]:QD(a)),_=g!=="none";!p&&_&&C.push(...eM(a,y,g,b));const R=[a,...C],N=await pl(t,S),D=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&D.push(N[v]),f){const L=XD(o,i,b);D.push(N[L[0]],N[L[1]])}if(O=[...O,{placement:o,overflows:D}],!D.every(L=>L<=0)){var B,A;const L=(((B=s.flip)==null?void 0:B.index)||0)+1,K=R[L];if(K)return{data:{index:L,overflows:O},reset:{placement:K}};let ne=(A=O.filter(W=>W.overflows[0]<=0).sort((W,F)=>W.overflows[1]-F.overflows[1])[0])==null?void 0:A.placement;if(!ne)switch(x){case"bestFit":{var H;const W=(H=O.filter(F=>{if(_){const M=qo(F.placement);return M===m||M==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(M=>M>0).reduce((M,X)=>M+X,0)]).sort((F,M)=>F[1]-M[1])[0])==null?void 0:H[0];W&&(ne=W);break}case"initialPlacement":ne=a;break}if(o!==ne)return{reset:{placement:ne}}}return{}}}};function Tx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rx(e){return KD.some(t=>e[t]>=0)}const sM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=io(e,t);switch(r){case"referenceHidden":{const s=await pl(t,{...o,elementContext:"reference"}),i=Tx(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Rx(i)}}}case"escaped":{const s=await pl(t,{...o,altBoundary:!0}),i=Tx(s,n.floating);return{data:{escapedOffsets:i,escaped:Rx(i)}}}default:return{}}}}};async function iM(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ao(n),a=ea(n),l=qo(n)==="y",u=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,f=io(t,e);let{mainAxis:p,crossAxis:x,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof g=="number"&&(x=a==="end"?g*-1:g),l?{x:x*d,y:p*u}:{x:p*u,y:x*d}}const aM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await iM(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},lM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:S=>{let{x:v,y:m}=S;return{x:v,y:m}}},...l}=io(e,t),u={x:n,y:r},d=await pl(t,l),f=qo(ao(o)),p=sg(f);let x=u[p],g=u[f];if(s){const S=p==="y"?"top":"left",v=p==="y"?"bottom":"right",m=x+d[S],w=x-d[v];x=Sp(m,x,w)}if(i){const S=f==="y"?"top":"left",v=f==="y"?"bottom":"right",m=g+d[S],w=g-d[v];g=Sp(m,g,w)}const y=a.fn({...t,[p]:x,[f]:g});return{...y,data:{x:y.x-n,y:y.y-r}}}}},cM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=io(e,t),d={x:n,y:r},f=qo(o),p=sg(f);let x=d[p],g=d[f];const y=io(a,t),S=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=p==="y"?"height":"width",b=s.reference[p]-s.floating[w]+S.mainAxis,C=s.reference[p]+s.reference[w]-S.mainAxis;x<b?x=b:x>C&&(x=C)}if(u){var v,m;const w=p==="y"?"width":"height",b=["top","left"].includes(ao(o)),C=s.reference[f]-s.floating[w]+(b&&((v=i.offset)==null?void 0:v[f])||0)+(b?0:S.crossAxis),_=s.reference[f]+s.reference[w]+(b?0:((m=i.offset)==null?void 0:m[f])||0)-(b?S.crossAxis:0);g<C?g=C:g>_&&(g=_)}return{[p]:x,[f]:g}}}},uM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=io(e,t),l=await pl(t,a),u=ao(n),d=ea(n),f=qo(n)==="y",{width:p,height:x}=r.floating;let g,y;u==="top"||u==="bottom"?(g=u,y=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(y=u,g=d==="end"?"top":"bottom");const S=x-l.top-l.bottom,v=p-l.left-l.right,m=br(x-l[g],S),w=br(p-l[y],v),b=!t.middlewareData.shift;let C=m,_=w;if(f?_=d||b?br(w,v):v:C=d||b?br(m,S):S,b&&!d){const N=Rn(l.left,0),D=Rn(l.right,0),O=Rn(l.top,0),B=Rn(l.bottom,0);f?_=p-2*(N!==0||D!==0?N+D:Rn(l.left,l.right)):C=x-2*(O!==0||B!==0?O+B:Rn(l.top,l.bottom))}await i({...t,availableWidth:_,availableHeight:C});const R=await o.getDimensions(s.floating);return p!==R.width||x!==R.height?{reset:{rects:!0}}:{}}}};function ta(e){return f_(e)?(e.nodeName||"").toLowerCase():"#document"}function jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mo(e){var t;return(t=(f_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function f_(e){return e instanceof Node||e instanceof jn(e).Node}function cr(e){return e instanceof Element||e instanceof jn(e).Element}function Nr(e){return e instanceof HTMLElement||e instanceof jn(e).HTMLElement}function Nx(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jn(e).ShadowRoot}function Hl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function dM(e){return["table","td","th"].includes(ta(e))}function Ud(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function lg(e){const t=cg(),n=cr(e)?ur(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function fM(e){let t=Xo(e);for(;Nr(t)&&!Vi(t);){if(lg(t))return t;if(Ud(t))return null;t=Xo(t)}return null}function cg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vi(e){return["html","body","#document"].includes(ta(e))}function ur(e){return jn(e).getComputedStyle(e)}function $d(e){return cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xo(e){if(ta(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nx(e)&&e.host||mo(e);return Nx(t)?t.host:t}function h_(e){const t=Xo(e);return Vi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nr(t)&&Hl(t)?t:h_(t)}function ml(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=h_(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=jn(o);return s?t.concat(i,i.visualViewport||[],Hl(o)?o:[],i.frameElement&&n?ml(i.frameElement):[]):t.concat(o,ml(o,[],n))}function p_(e){const t=ur(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Nr(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Wu(n)!==s||Wu(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ug(e){return cr(e)?e:e.contextElement}function Ei(e){const t=ug(e);if(!Nr(t))return Zo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=p_(t);let i=(s?Wu(n.width):n.width)/r,a=(s?Wu(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const hM=Zo(0);function m_(e){const t=jn(e);return!cg()||!t.visualViewport?hM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jn(e)?!1:t}function Os(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ug(e);let i=Zo(1);t&&(r?cr(r)&&(i=Ei(r)):i=Ei(e));const a=pM(s,n,r)?m_(s):Zo(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=jn(s),x=r&&cr(r)?jn(r):r;let g=p,y=g.frameElement;for(;y&&r&&x!==g;){const S=Ei(y),v=y.getBoundingClientRect(),m=ur(y),w=v.left+(y.clientLeft+parseFloat(m.paddingLeft))*S.x,b=v.top+(y.clientTop+parseFloat(m.paddingTop))*S.y;l*=S.x,u*=S.y,d*=S.x,f*=S.y,l+=w,u+=b,g=jn(y),y=g.frameElement}}return Hu({width:d,height:f,x:l,y:u})}function mM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=mo(r),a=t?Ud(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Zo(1);const d=Zo(0),f=Nr(r);if((f||!f&&!s)&&((ta(r)!=="body"||Hl(i))&&(l=$d(r)),Nr(r))){const p=Os(r);u=Ei(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function gM(e){return Array.from(e.getClientRects())}function g_(e){return Os(mo(e)).left+$d(e).scrollLeft}function vM(e){const t=mo(e),n=$d(e),r=e.ownerDocument.body,o=Rn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Rn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+g_(e);const a=-n.scrollTop;return ur(r).direction==="rtl"&&(i+=Rn(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function yM(e,t){const n=jn(e),r=mo(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=cg();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function xM(e,t){const n=Os(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Nr(e)?Ei(e):Zo(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function Px(e,t,n){let r;if(t==="viewport")r=yM(e,n);else if(t==="document")r=vM(mo(e));else if(cr(t))r=xM(t,n);else{const o=m_(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Hu(r)}function v_(e,t){const n=Xo(e);return n===t||!cr(n)||Vi(n)?!1:ur(n).position==="fixed"||v_(n,t)}function wM(e,t){const n=t.get(e);if(n)return n;let r=ml(e,[],!1).filter(a=>cr(a)&&ta(a)!=="body"),o=null;const s=ur(e).position==="fixed";let i=s?Xo(e):e;for(;cr(i)&&!Vi(i);){const a=ur(i),l=lg(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Hl(i)&&!l&&v_(e,i))?r=r.filter(d=>d!==i):o=a,i=Xo(i)}return t.set(e,r),r}function SM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ud(t)?[]:wM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,d)=>{const f=Px(t,d,o);return u.top=Rn(f.top,u.top),u.right=br(f.right,u.right),u.bottom=br(f.bottom,u.bottom),u.left=Rn(f.left,u.left),u},Px(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _M(e){const{width:t,height:n}=p_(e);return{width:t,height:n}}function bM(e,t,n){const r=Nr(t),o=mo(t),s=n==="fixed",i=Os(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Zo(0);if(r||!r&&!s)if((ta(t)!=="body"||Hl(o))&&(a=$d(t)),r){const f=Os(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=g_(o));const u=i.left+a.scrollLeft-l.x,d=i.top+a.scrollTop-l.y;return{x:u,y:d,width:i.width,height:i.height}}function rh(e){return ur(e).position==="static"}function jx(e,t){return!Nr(e)||ur(e).position==="fixed"?null:t?t(e):e.offsetParent}function y_(e,t){const n=jn(e);if(Ud(e))return n;if(!Nr(e)){let o=Xo(e);for(;o&&!Vi(o);){if(cr(o)&&!rh(o))return o;o=Xo(o)}return n}let r=jx(e,t);for(;r&&dM(r)&&rh(r);)r=jx(r,t);return r&&Vi(r)&&rh(r)&&!lg(r)?n:r||fM(e)||n}const CM=async function(e){const t=this.getOffsetParent||y_,n=this.getDimensions,r=await n(e.floating);return{reference:bM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kM(e){return ur(e).direction==="rtl"}const EM={convertOffsetParentRelativeRectToViewportRelativeRect:mM,getDocumentElement:mo,getClippingRect:SM,getOffsetParent:y_,getElementRects:CM,getClientRects:gM,getDimensions:_M,getScale:Ei,isElement:cr,isRTL:kM};function TM(e,t){let n=null,r;const o=mo(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:u,top:d,width:f,height:p}=e.getBoundingClientRect();if(a||t(),!f||!p)return;const x=Ic(d),g=Ic(o.clientWidth-(u+f)),y=Ic(o.clientHeight-(d+p)),S=Ic(u),m={rootMargin:-x+"px "+-g+"px "+-y+"px "+-S+"px",threshold:Rn(0,br(1,l))||1};let w=!0;function b(C){const _=C[0].intersectionRatio;if(_!==l){if(!w)return i();_?i(!1,_):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(b,{...m,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,m)}n.observe(e)}return i(!0),s}function RM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=ug(e),d=o||s?[...u?ml(u):[],...ml(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=u&&a?TM(u,n):null;let p=-1,x=null;i&&(x=new ResizeObserver(v=>{let[m]=v;m&&m.target===u&&x&&(x.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=x)==null||w.observe(t)})),n()}),u&&!l&&x.observe(u),x.observe(t));let g,y=l?Os(e):null;l&&S();function S(){const v=Os(e);y&&(v.x!==y.x||v.y!==y.y||v.width!==y.width||v.height!==y.height)&&n(),y=v,g=requestAnimationFrame(S)}return n(),()=>{var v;d.forEach(m=>{o&&m.removeEventListener("scroll",n),s&&m.removeEventListener("resize",n)}),f==null||f(),(v=x)==null||v.disconnect(),x=null,l&&cancelAnimationFrame(g)}}const NM=aM,PM=lM,jM=oM,DM=uM,MM=sM,Dx=rM,OM=cM,AM=(e,t,n)=>{const r=new Map,o={platform:EM,...n},s={...o.platform,_c:r};return nM(e,t,{...o,platform:s})};var au=typeof document<"u"?h.useLayoutEffect:h.useEffect;function Bu(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(!Bu(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Bu(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function x_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mx(e,t){const n=x_(e);return Math.round(t*n)/n}function Ox(e){const t=h.useRef(e);return au(()=>{t.current=e}),t}function IM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,x]=h.useState(r);Bu(p,r)||x(r);const[g,y]=h.useState(null),[S,v]=h.useState(null),m=h.useCallback(W=>{W!==_.current&&(_.current=W,y(W))},[]),w=h.useCallback(W=>{W!==R.current&&(R.current=W,v(W))},[]),b=s||g,C=i||S,_=h.useRef(null),R=h.useRef(null),N=h.useRef(d),D=l!=null,O=Ox(l),B=Ox(o),A=h.useCallback(()=>{if(!_.current||!R.current)return;const W={placement:t,strategy:n,middleware:p};B.current&&(W.platform=B.current),AM(_.current,R.current,W).then(F=>{const M={...F,isPositioned:!0};H.current&&!Bu(N.current,M)&&(N.current=M,fo.flushSync(()=>{f(M)}))})},[p,t,n,B]);au(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[u]);const H=h.useRef(!1);au(()=>(H.current=!0,()=>{H.current=!1}),[]),au(()=>{if(b&&(_.current=b),C&&(R.current=C),b&&C){if(O.current)return O.current(b,C,A);A()}},[b,C,A,O,D]);const L=h.useMemo(()=>({reference:_,floating:R,setReference:m,setFloating:w}),[m,w]),K=h.useMemo(()=>({reference:b,floating:C}),[b,C]),ne=h.useMemo(()=>{const W={position:n,left:0,top:0};if(!K.floating)return W;const F=Mx(K.floating,d.x),M=Mx(K.floating,d.y);return a?{...W,transform:"translate("+F+"px, "+M+"px)",...x_(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:M}},[n,a,K.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:A,refs:L,elements:K,floatingStyles:ne}),[d,A,L,K,ne])}const LM=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?Dx({element:r.current,padding:o}).fn(n):{}:r?Dx({element:r,padding:o}).fn(n):{}}}},FM=(e,t)=>({...NM(e),options:[e,t]}),UM=(e,t)=>({...PM(e),options:[e,t]}),$M=(e,t)=>({...OM(e),options:[e,t]}),VM=(e,t)=>({...jM(e),options:[e,t]}),zM=(e,t)=>({...DM(e),options:[e,t]}),WM=(e,t)=>({...MM(e),options:[e,t]}),YM=(e,t)=>({...LM(e),options:[e,t]});var HM="Arrow",w_=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsx(ve.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});w_.displayName=HM;var BM=w_;function dg(e){const[t,n]=h.useState(void 0);return Kt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var fg="Popper",[S_,na]=_n(fg),[GM,__]=S_(fg),b_=e=>{const{__scopePopper:t,children:n}=e,[r,o]=h.useState(null);return c.jsx(GM,{scope:t,anchor:r,onAnchorChange:o,children:n})};b_.displayName=fg;var C_="PopperAnchor",k_=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=__(C_,n),i=h.useRef(null),a=be(t,i);return h.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:c.jsx(ve.div,{...o,ref:a})});k_.displayName=C_;var hg="PopperContent",[KM,ZM]=S_(hg),E_=h.forwardRef((e,t)=>{var ce,De,He,$e,Ve,Se;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:x="optimized",onPlaced:g,...y}=e,S=__(hg,n),[v,m]=h.useState(null),w=be(t,vt=>m(vt)),[b,C]=h.useState(null),_=dg(b),R=(_==null?void 0:_.width)??0,N=(_==null?void 0:_.height)??0,D=r+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},B=Array.isArray(u)?u:[u],A=B.length>0,H={padding:O,boundary:B.filter(XM),altBoundary:A},{refs:L,floatingStyles:K,placement:ne,isPositioned:W,middlewareData:F}=IM({strategy:"fixed",placement:D,whileElementsMounted:(...vt)=>RM(...vt,{animationFrame:x==="always"}),elements:{reference:S.anchor},middleware:[FM({mainAxis:o+N,alignmentAxis:i}),l&&UM({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?$M():void 0,...H}),l&&VM({...H}),zM({...H,apply:({elements:vt,rects:Zt,availableWidth:xo,availableHeight:pn})=>{const{width:wo,height:k}=Zt.reference,P=vt.floating.style;P.setProperty("--radix-popper-available-width",`${xo}px`),P.setProperty("--radix-popper-available-height",`${pn}px`),P.setProperty("--radix-popper-anchor-width",`${wo}px`),P.setProperty("--radix-popper-anchor-height",`${k}px`)}}),b&&YM({element:b,padding:a}),QM({arrowWidth:R,arrowHeight:N}),p&&WM({strategy:"referenceHidden",...H})]}),[M,X]=N_(ne),le=_t(g);Kt(()=>{W&&(le==null||le())},[W,le]);const me=(ce=F.arrow)==null?void 0:ce.x,rt=(De=F.arrow)==null?void 0:De.y,je=((He=F.arrow)==null?void 0:He.centerOffset)!==0,[gt,Ue]=h.useState();return Kt(()=>{v&&Ue(window.getComputedStyle(v).zIndex)},[v]),c.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:W?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:gt,"--radix-popper-transform-origin":[($e=F.transformOrigin)==null?void 0:$e.x,(Ve=F.transformOrigin)==null?void 0:Ve.y].join(" "),...((Se=F.hide)==null?void 0:Se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(KM,{scope:n,placedSide:M,onArrowChange:C,arrowX:me,arrowY:rt,shouldHideArrow:je,children:c.jsx(ve.div,{"data-side":M,"data-align":X,...y,ref:w,style:{...y.style,animation:W?void 0:"none"}})})})});E_.displayName=hg;var T_="PopperArrow",qM={top:"bottom",right:"left",bottom:"top",left:"right"},R_=h.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=ZM(T_,r),i=qM[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(BM,{...o,ref:n,style:{...o.style,display:"block"}})})});R_.displayName=T_;function XM(e){return e!==null}var QM=e=>({name:"transformOrigin",options:e,fn(t){var S,v,m;const{placement:n,rects:r,middlewareData:o}=t,i=((S=o.arrow)==null?void 0:S.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=N_(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,x=(((m=o.arrow)==null?void 0:m.y)??0)+l/2;let g="",y="";return u==="bottom"?(g=i?f:`${p}px`,y=`${-l}px`):u==="top"?(g=i?f:`${p}px`,y=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,y=i?f:`${x}px`):u==="left"&&(g=`${r.floating.width+l}px`,y=i?f:`${x}px`),{data:{x:g,y}}}});function N_(e){const[t,n="center"]=e.split("-");return[t,n]}var pg=b_,mg=k_,gg=E_,vg=R_,JM="Portal",Bl=h.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=h.useState(!1);Kt(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?NS.createPortal(c.jsx(ve.div,{...r,ref:t}),i):null});Bl.displayName=JM;function eO(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var fn=e=>{const{present:t,children:n}=e,r=tO(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),s=be(r.ref,nO(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:s}):null};fn.displayName="Presence";function tO(e){const[t,n]=h.useState(),r=h.useRef({}),o=h.useRef(e),s=h.useRef("none"),i=e?"mounted":"unmounted",[a,l]=eO(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=Lc(r.current);s.current=a==="mounted"?u:"none"},[a]),Kt(()=>{const u=r.current,d=o.current;if(d!==e){const p=s.current,x=Lc(u);e?l("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&p!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Kt(()=>{if(t){const u=f=>{const x=Lc(r.current).includes(f.animationName);f.target===t&&x&&fo.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(s.current=Lc(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Lc(e){return(e==null?void 0:e.animationName)||"none"}function nO(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 oh="rovingFocusGroup.onEntryFocus",rO={bubbles:!1,cancelable:!0},Vd="RovingFocusGroup",[bp,P_,oO]=Ld(Vd),[sO,zd]=_n(Vd,[oO]),[iO,aO]=sO(Vd),j_=h.forwardRef((e,t)=>c.jsx(bp.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(bp.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(lO,{...e,ref:t})})}));j_.displayName=Vd;var lO=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=h.useRef(null),x=be(t,p),g=Yl(s),[y=null,S]=so({prop:i,defaultProp:a,onChange:l}),[v,m]=h.useState(!1),w=_t(u),b=P_(n),C=h.useRef(!1),[_,R]=h.useState(0);return h.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(oh,w),()=>N.removeEventListener(oh,w)},[w]),c.jsx(iO,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:y,onItemFocus:h.useCallback(N=>S(N),[S]),onItemShiftTab:h.useCallback(()=>m(!0),[]),onFocusableItemAdd:h.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:h.useCallback(()=>R(N=>N-1),[]),children:c.jsx(ve.div,{tabIndex:v||_===0?-1:0,"data-orientation":r,...f,ref:x,style:{outline:"none",...e.style},onMouseDown:G(e.onMouseDown,()=>{C.current=!0}),onFocus:G(e.onFocus,N=>{const D=!C.current;if(N.target===N.currentTarget&&D&&!v){const O=new CustomEvent(oh,rO);if(N.currentTarget.dispatchEvent(O),!O.defaultPrevented){const B=b().filter(ne=>ne.focusable),A=B.find(ne=>ne.active),H=B.find(ne=>ne.id===y),K=[A,H,...B].filter(Boolean).map(ne=>ne.ref.current);O_(K,d)}}C.current=!1}),onBlur:G(e.onBlur,()=>m(!1))})})}),D_="RovingFocusGroupItem",M_=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=Tr(),l=s||a,u=aO(D_,n),d=u.currentTabStopId===l,f=P_(n),{onFocusableItemAdd:p,onFocusableItemRemove:x}=u;return h.useEffect(()=>{if(r)return p(),()=>x()},[r,p,x]),c.jsx(bp.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:c.jsx(ve.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:G(e.onMouseDown,g=>{r?u.onItemFocus(l):g.preventDefault()}),onFocus:G(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:G(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=dO(g,u.orientation,u.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let v=f().filter(m=>m.focusable).map(m=>m.ref.current);if(y==="last")v.reverse();else if(y==="prev"||y==="next"){y==="prev"&&v.reverse();const m=v.indexOf(g.currentTarget);v=u.loop?fO(v,m+1):v.slice(m+1)}setTimeout(()=>O_(v))}})})})});M_.displayName=D_;var cO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dO(e,t,n){const r=uO(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return cO[r]}function O_(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function fO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var A_=j_,I_=M_,hO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xs=new WeakMap,Fc=new WeakMap,Uc={},sh=0,L_=function(e){return e&&(e.host||L_(e.parentNode))},pO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=L_(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})},mO=function(e,t,n,r){var o=pO(t,Array.isArray(e)?e:[e]);Uc[n]||(Uc[n]=new WeakMap);var s=Uc[n],i=[],a=new Set,l=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))d(p);else try{var x=p.getAttribute(r),g=x!==null&&x!=="false",y=(Xs.get(p)||0)+1,S=(s.get(p)||0)+1;Xs.set(p,y),s.set(p,S),i.push(p),y===1&&g&&Fc.set(p,!0),S===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return d(t),a.clear(),sh++,function(){i.forEach(function(f){var p=Xs.get(f)-1,x=s.get(f)-1;Xs.set(f,p),s.set(f,x),p||(Fc.has(f)||f.removeAttribute(r),Fc.delete(f)),x||f.removeAttribute(n)}),sh--,sh||(Xs=new WeakMap,Xs=new WeakMap,Fc=new WeakMap,Uc={})}},yg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=hO(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),mO(r,o,n,"aria-hidden")):function(){return null}},wr=function(){return wr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},wr.apply(this,arguments)};function F_(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 gO(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var lu="right-scroll-bar-position",cu="width-before-scroll-bar",vO="with-scroll-bars-hidden",yO="--removed-body-scroll-bar-size";function ih(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xO(e,t){var n=h.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 wO=typeof window<"u"?h.useLayoutEffect:h.useEffect,Ax=new WeakMap;function SO(e,t){var n=xO(null,function(r){return e.forEach(function(o){return ih(o,r)})});return wO(function(){var r=Ax.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||ih(a,null)}),s.forEach(function(a){o.has(a)||ih(a,i)})}Ax.set(n,e)},[e]),n}function _O(e){return e}function bO(e,t){t===void 0&&(t=_O);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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function CO(e){e===void 0&&(e={});var t=bO(null);return t.options=wr({async:!0,ssr:!1},e),t}var U_=function(e){var t=e.sideCar,n=F_(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 h.createElement(r,wr({},n))};U_.isSideCarExport=!0;function kO(e,t){return e.useMedium(t),U_}var $_=CO(),ah=function(){},Wd=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:ah,onWheelCapture:ah,onTouchMoveCapture:ah}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,x=e.noIsolation,g=e.inert,y=e.allowPinchZoom,S=e.as,v=S===void 0?"div":S,m=e.gapMode,w=F_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=p,C=SO([n,t]),_=wr(wr({},w),o);return h.createElement(h.Fragment,null,d&&h.createElement(b,{sideCar:$_,removeScrollBar:u,shards:f,noIsolation:x,inert:g,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:m}),i?h.cloneElement(h.Children.only(a),wr(wr({},_),{ref:C})):h.createElement(v,wr({},_,{className:l,ref:C}),a))});Wd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wd.classNames={fullWidth:cu,zeroRight:lu};var EO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function TO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=EO();return t&&e.setAttribute("nonce",t),e}function RO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function NO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var PO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=TO())&&(RO(t,n),NO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jO=function(){var e=PO();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},V_=function(){var e=jO(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},DO={left:0,top:0,right:0,gap:0},lh=function(e){return parseInt(e||"",10)||0},MO=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[lh(n),lh(r),lh(o)]},OO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return DO;var t=MO(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])}},AO=V_(),Ti="data-scroll-locked",IO=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
.`.concat(vO,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(a,"px ").concat(r,`;
}
body[`).concat(Ti,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(o,`px;
padding-top: `).concat(s,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(lu,` {
right: `).concat(a,"px ").concat(r,`;
}
.`).concat(cu,` {
margin-right: `).concat(a,"px ").concat(r,`;
}
.`).concat(lu," .").concat(lu,` {
right: 0 `).concat(r,`;
}
.`).concat(cu," .").concat(cu,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(Ti,`] {
`).concat(yO,": ").concat(a,`px;
}
`)},Ix=function(){var e=parseInt(document.body.getAttribute(Ti)||"0",10);return isFinite(e)?e:0},LO=function(){h.useEffect(function(){return document.body.setAttribute(Ti,(Ix()+1).toString()),function(){var e=Ix()-1;e<=0?document.body.removeAttribute(Ti):document.body.setAttribute(Ti,e.toString())}},[])},FO=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;LO();var s=h.useMemo(function(){return OO(o)},[o]);return h.createElement(AO,{styles:IO(s,!t,o,n?"":"!important")})},Cp=!1;if(typeof window<"u")try{var $c=Object.defineProperty({},"passive",{get:function(){return Cp=!0,!0}});window.addEventListener("test",$c,$c),window.removeEventListener("test",$c,$c)}catch{Cp=!1}var Qs=Cp?{passive:!1}:!1,UO=function(e){return e.tagName==="TEXTAREA"},z_=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!UO(e)&&n[t]==="visible")},$O=function(e){return z_(e,"overflowY")},VO=function(e){return z_(e,"overflowX")},Lx=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=W_(e,r);if(o){var s=Y_(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zO=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},WO=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},W_=function(e,t){return e==="v"?$O(t):VO(t)},Y_=function(e,t){return e==="v"?zO(t):WO(t)},YO=function(e,t){return e==="h"&&t==="rtl"?-1:1},HO=function(e,t,n,r,o){var s=YO(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,d=i>0,f=0,p=0;do{var x=Y_(e,a),g=x[0],y=x[1],S=x[2],v=y-S-s*g;(g||v)&&W_(e,a)&&(f+=v,p+=g),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!o)||!d&&(Math.abs(p)<1||!o))&&(u=!0),u},Vc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fx=function(e){return[e.deltaX,e.deltaY]},Ux=function(e){return e&&"current"in e?e.current:e},BO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},GO=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},KO=0,Js=[];function ZO(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(KO++)[0],s=h.useState(V_)[0],i=h.useRef(e);h.useEffect(function(){i.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=gO([e.lockRef.current],(e.shards||[]).map(Ux),!0).filter(Boolean);return y.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(y,S){if("touches"in y&&y.touches.length===2)return!i.current.allowPinchZoom;var v=Vc(y),m=n.current,w="deltaX"in y?y.deltaX:m[0]-v[0],b="deltaY"in y?y.deltaY:m[1]-v[1],C,_=y.target,R=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in y&&R==="h"&&_.type==="range")return!1;var N=Lx(R,_);if(!N)return!0;if(N?C=R:(C=R==="v"?"h":"v",N=Lx(R,_)),!N)return!1;if(!r.current&&"changedTouches"in y&&(w||b)&&(r.current=C),!C)return!0;var D=r.current||C;return HO(D,S,y,D==="h"?w:b,!0)},[]),l=h.useCallback(function(y){var S=y;if(!(!Js.length||Js[Js.length-1]!==s)){var v="deltaY"in S?Fx(S):Vc(S),m=t.current.filter(function(C){return C.name===S.type&&(C.target===S.target||S.target===C.shadowParent)&&BO(C.delta,v)})[0];if(m&&m.should){S.cancelable&&S.preventDefault();return}if(!m){var w=(i.current.shards||[]).map(Ux).filter(Boolean).filter(function(C){return C.contains(S.target)}),b=w.length>0?a(S,w[0]):!i.current.noIsolation;b&&S.cancelable&&S.preventDefault()}}},[]),u=h.useCallback(function(y,S,v,m){var w={name:y,delta:S,target:v,should:m,shadowParent:qO(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),d=h.useCallback(function(y){n.current=Vc(y),r.current=void 0},[]),f=h.useCallback(function(y){u(y.type,Fx(y),y.target,a(y,e.lockRef.current))},[]),p=h.useCallback(function(y){u(y.type,Vc(y),y.target,a(y,e.lockRef.current))},[]);h.useEffect(function(){return Js.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Qs),document.addEventListener("touchmove",l,Qs),document.addEventListener("touchstart",d,Qs),function(){Js=Js.filter(function(y){return y!==s}),document.removeEventListener("wheel",l,Qs),document.removeEventListener("touchmove",l,Qs),document.removeEventListener("touchstart",d,Qs)}},[]);var x=e.removeScrollBar,g=e.inert;return h.createElement(h.Fragment,null,g?h.createElement(s,{styles:GO(o)}):null,x?h.createElement(FO,{gapMode:e.gapMode}):null)}function qO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const XO=kO($_,ZO);var Yd=h.forwardRef(function(e,t){return h.createElement(Wd,wr({},e,{ref:t,sideCar:XO}))});Yd.classNames=Wd.classNames;var kp=["Enter"," "],QO=["ArrowDown","PageUp","Home"],H_=["ArrowUp","PageDown","End"],JO=[...QO,...H_],eA={ltr:[...kp,"ArrowRight"],rtl:[...kp,"ArrowLeft"]},tA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gl="Menu",[gl,nA,rA]=Ld(Gl),[Vs,B_]=_n(Gl,[rA,na,zd]),Hd=na(),G_=zd(),[oA,zs]=Vs(Gl),[sA,Kl]=Vs(Gl),K_=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Hd(t),[l,u]=h.useState(null),d=h.useRef(!1),f=_t(s),p=Yl(o);return h.useEffect(()=>{const x=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.jsx(pg,{...a,children:c.jsx(oA,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:c.jsx(sA,{scope:t,onClose:h.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};K_.displayName=Gl;var iA="MenuAnchor",xg=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hd(n);return c.jsx(mg,{...o,...r,ref:t})});xg.displayName=iA;var wg="MenuPortal",[aA,Z_]=Vs(wg,{forceMount:void 0}),q_=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=zs(wg,t);return c.jsx(aA,{scope:t,forceMount:n,children:c.jsx(fn,{present:n||s.open,children:c.jsx(Bl,{asChild:!0,container:o,children:r})})})};q_.displayName=wg;var Wn="MenuContent",[lA,Sg]=Vs(Wn),X_=h.forwardRef((e,t)=>{const n=Z_(Wn,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=zs(Wn,e.__scopeMenu),i=Kl(Wn,e.__scopeMenu);return c.jsx(gl.Provider,{scope:e.__scopeMenu,children:c.jsx(fn,{present:r||s.open,children:c.jsx(gl.Slot,{scope:e.__scopeMenu,children:i.modal?c.jsx(cA,{...o,ref:t}):c.jsx(uA,{...o,ref:t})})})})}),cA=h.forwardRef((e,t)=>{const n=zs(Wn,e.__scopeMenu),r=h.useRef(null),o=be(t,r);return h.useEffect(()=>{const s=r.current;if(s)return yg(s)},[]),c.jsx(_g,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:G(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),uA=h.forwardRef((e,t)=>{const n=zs(Wn,e.__scopeMenu);return c.jsx(_g,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_g=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:x,disableOutsideScroll:g,...y}=e,S=zs(Wn,n),v=Kl(Wn,n),m=Hd(n),w=G_(n),b=nA(n),[C,_]=h.useState(null),R=h.useRef(null),N=be(t,R,S.onContentChange),D=h.useRef(0),O=h.useRef(""),B=h.useRef(0),A=h.useRef(null),H=h.useRef("right"),L=h.useRef(0),K=g?Yd:h.Fragment,ne=g?{as:oo,allowPinchZoom:!0}:void 0,W=M=>{var ce,De;const X=O.current+M,le=b().filter(He=>!He.disabled),me=document.activeElement,rt=(ce=le.find(He=>He.ref.current===me))==null?void 0:ce.textValue,je=le.map(He=>He.textValue),gt=_A(je,X,rt),Ue=(De=le.find(He=>He.textValue===gt))==null?void 0:De.ref.current;(function He($e){O.current=$e,window.clearTimeout(D.current),$e!==""&&(D.current=window.setTimeout(()=>He(""),1e3))})(X),Ue&&setTimeout(()=>Ue.focus())};h.useEffect(()=>()=>window.clearTimeout(D.current),[]),og();const F=h.useCallback(M=>{var le,me;return H.current===((le=A.current)==null?void 0:le.side)&&CA(M,(me=A.current)==null?void 0:me.area)},[]);return c.jsx(lA,{scope:n,searchRef:O,onItemEnter:h.useCallback(M=>{F(M)&&M.preventDefault()},[F]),onItemLeave:h.useCallback(M=>{var X;F(M)||((X=R.current)==null||X.focus(),_(null))},[F]),onTriggerLeave:h.useCallback(M=>{F(M)&&M.preventDefault()},[F]),pointerGraceTimerRef:B,onPointerGraceIntentChange:h.useCallback(M=>{A.current=M},[]),children:c.jsx(K,{...ne,children:c.jsx(Fd,{asChild:!0,trapped:o,onMountAutoFocus:G(s,M=>{var X;M.preventDefault(),(X=R.current)==null||X.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:c.jsx(Ji,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:x,children:c.jsx(A_,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:_,onEntryFocus:G(l,M=>{v.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(gg,{role:"menu","aria-orientation":"vertical","data-state":hb(S.open),"data-radix-menu-content":"",dir:v.dir,...m,...y,ref:N,style:{outline:"none",...y.style},onKeyDown:G(y.onKeyDown,M=>{const le=M.target.closest("[data-radix-menu-content]")===M.currentTarget,me=M.ctrlKey||M.altKey||M.metaKey,rt=M.key.length===1;le&&(M.key==="Tab"&&M.preventDefault(),!me&&rt&&W(M.key));const je=R.current;if(M.target!==je||!JO.includes(M.key))return;M.preventDefault();const Ue=b().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);H_.includes(M.key)&&Ue.reverse(),wA(Ue)}),onBlur:G(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(D.current),O.current="")}),onPointerMove:G(e.onPointerMove,vl(M=>{const X=M.target,le=L.current!==M.clientX;if(M.currentTarget.contains(X)&&le){const me=M.clientX>L.current?"right":"left";H.current=me,L.current=M.clientX}}))})})})})})})});X_.displayName=Wn;var dA="MenuGroup",bg=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ve.div,{role:"group",...r,ref:t})});bg.displayName=dA;var fA="MenuLabel",Q_=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ve.div,{...r,ref:t})});Q_.displayName=fA;var Gu="MenuItem",$x="menu.itemSelect",Bd=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=h.useRef(null),i=Kl(Gu,e.__scopeMenu),a=Sg(Gu,e.__scopeMenu),l=be(t,s),u=h.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const p=new CustomEvent($x,{bubbles:!0,cancelable:!0});f.addEventListener($x,x=>r==null?void 0:r(x),{once:!0}),rg(f,p),p.defaultPrevented?u.current=!1:i.onClose()}};return c.jsx(J_,{...o,ref:l,disabled:n,onClick:G(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),u.current=!0},onPointerUp:G(e.onPointerUp,f=>{var p;u.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:G(e.onKeyDown,f=>{const p=a.searchRef.current!=="";n||p&&f.key===" "||kp.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Bd.displayName=Gu;var J_=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Sg(Gu,n),a=G_(n),l=h.useRef(null),u=be(t,l),[d,f]=h.useState(!1),[p,x]=h.useState("");return h.useEffect(()=>{const g=l.current;g&&x((g.textContent??"").trim())},[s.children]),c.jsx(gl.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:c.jsx(I_,{asChild:!0,...a,focusable:!r,children:c.jsx(ve.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:G(e.onPointerMove,vl(g=>{r?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:G(e.onPointerLeave,vl(g=>i.onItemLeave(g))),onFocus:G(e.onFocus,()=>f(!0)),onBlur:G(e.onBlur,()=>f(!1))})})})}),hA="MenuCheckboxItem",eb=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(sb,{scope:e.__scopeMenu,checked:n,children:c.jsx(Bd,{role:"menuitemcheckbox","aria-checked":Ku(n)?"mixed":n,...o,ref:t,"data-state":kg(n),onSelect:G(o.onSelect,()=>r==null?void 0:r(Ku(n)?!0:!n),{checkForDefaultPrevented:!1})})})});eb.displayName=hA;var tb="MenuRadioGroup",[pA,mA]=Vs(tb,{value:void 0,onValueChange:()=>{}}),nb=h.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=_t(r);return c.jsx(pA,{scope:e.__scopeMenu,value:n,onValueChange:s,children:c.jsx(bg,{...o,ref:t})})});nb.displayName=tb;var rb="MenuRadioItem",ob=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=mA(rb,e.__scopeMenu),s=n===o.value;return c.jsx(sb,{scope:e.__scopeMenu,checked:s,children:c.jsx(Bd,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":kg(s),onSelect:G(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});ob.displayName=rb;var Cg="MenuItemIndicator",[sb,gA]=Vs(Cg,{checked:!1}),ib=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=gA(Cg,n);return c.jsx(fn,{present:r||Ku(s.checked)||s.checked===!0,children:c.jsx(ve.span,{...o,ref:t,"data-state":kg(s.checked)})})});ib.displayName=Cg;var vA="MenuSeparator",ab=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ve.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});ab.displayName=vA;var yA="MenuArrow",lb=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hd(n);return c.jsx(vg,{...o,...r,ref:t})});lb.displayName=yA;var xA="MenuSub",[o3,cb]=Vs(xA),Pa="MenuSubTrigger",ub=h.forwardRef((e,t)=>{const n=zs(Pa,e.__scopeMenu),r=Kl(Pa,e.__scopeMenu),o=cb(Pa,e.__scopeMenu),s=Sg(Pa,e.__scopeMenu),i=h.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),c.jsx(xg,{asChild:!0,...u,children:c.jsx(J_,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":hb(n.open),...e,ref:Id(t,o.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:G(e.onPointerMove,vl(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:G(e.onPointerLeave,vl(f=>{var x,g;d();const p=(x=n.content)==null?void 0:x.getBoundingClientRect();if(p){const y=(g=n.content)==null?void 0:g.dataset.side,S=y==="right",v=S?-5:5,m=p[S?"left":"right"],w=p[S?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:m,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x:m,y:p.bottom}],side:y}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:G(e.onKeyDown,f=>{var x;const p=s.searchRef.current!=="";e.disabled||p&&f.key===" "||eA[r.dir].includes(f.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),f.preventDefault())})})})});ub.displayName=Pa;var db="MenuSubContent",fb=h.forwardRef((e,t)=>{const n=Z_(Wn,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=zs(Wn,e.__scopeMenu),i=Kl(Wn,e.__scopeMenu),a=cb(db,e.__scopeMenu),l=h.useRef(null),u=be(t,l);return c.jsx(gl.Provider,{scope:e.__scopeMenu,children:c.jsx(fn,{present:r||s.open,children:c.jsx(gl.Slot,{scope:e.__scopeMenu,children:c.jsx(_g,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:G(e.onFocusOutside,d=>{d.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:G(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:G(e.onKeyDown,d=>{var x;const f=d.currentTarget.contains(d.target),p=tA[i.dir].includes(d.key);f&&p&&(s.onOpenChange(!1),(x=a.trigger)==null||x.focus(),d.preventDefault())})})})})})});fb.displayName=db;function hb(e){return e?"open":"closed"}function Ku(e){return e==="indeterminate"}function kg(e){return Ku(e)?"indeterminate":e?"checked":"unchecked"}function wA(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function SA(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function _A(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=SA(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function bA(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,l=t[s].y,u=t[i].x,d=t[i].y;l>r!=d>r&&n<(u-a)*(r-l)/(d-l)+a&&(o=!o)}return o}function CA(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return bA(n,t)}function vl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var kA=K_,EA=xg,TA=q_,RA=X_,NA=bg,PA=Q_,jA=Bd,DA=eb,MA=nb,OA=ob,AA=ib,IA=ab,LA=lb,FA=ub,UA=fb,Eg="DropdownMenu",[$A,s3]=_n(Eg,[B_]),hn=B_(),[VA,pb]=$A(Eg),mb=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=hn(t),u=h.useRef(null),[d=!1,f]=so({prop:o,defaultProp:s,onChange:i});return c.jsx(VA,{scope:t,triggerId:Tr(),triggerRef:u,contentId:Tr(),open:d,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(p=>!p),[f]),modal:a,children:c.jsx(kA,{...l,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};mb.displayName=Eg;var gb="DropdownMenuTrigger",vb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=pb(gb,n),i=hn(n);return c.jsx(EA,{asChild:!0,...i,children:c.jsx(ve.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Id(t,s.triggerRef),onPointerDown:G(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:G(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});vb.displayName=gb;var zA="DropdownMenuPortal",yb=e=>{const{__scopeDropdownMenu:t,...n}=e,r=hn(t);return c.jsx(TA,{...r,...n})};yb.displayName=zA;var xb="DropdownMenuContent",wb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pb(xb,n),s=hn(n),i=h.useRef(!1);return c.jsx(RA,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:G(e.onCloseAutoFocus,a=>{var l;i.current||(l=o.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:G(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!o.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wb.displayName=xb;var WA="DropdownMenuGroup",YA=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(NA,{...o,...r,ref:t})});YA.displayName=WA;var HA="DropdownMenuLabel",Sb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(PA,{...o,...r,ref:t})});Sb.displayName=HA;var BA="DropdownMenuItem",_b=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(jA,{...o,...r,ref:t})});_b.displayName=BA;var GA="DropdownMenuCheckboxItem",bb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(DA,{...o,...r,ref:t})});bb.displayName=GA;var KA="DropdownMenuRadioGroup",ZA=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(MA,{...o,...r,ref:t})});ZA.displayName=KA;var qA="DropdownMenuRadioItem",Cb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(OA,{...o,...r,ref:t})});Cb.displayName=qA;var XA="DropdownMenuItemIndicator",kb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(AA,{...o,...r,ref:t})});kb.displayName=XA;var QA="DropdownMenuSeparator",Eb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(IA,{...o,...r,ref:t})});Eb.displayName=QA;var JA="DropdownMenuArrow",eI=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(LA,{...o,...r,ref:t})});eI.displayName=JA;var tI="DropdownMenuSubTrigger",Tb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(FA,{...o,...r,ref:t})});Tb.displayName=tI;var nI="DropdownMenuSubContent",Rb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hn(n);return c.jsx(UA,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Rb.displayName=nI;var rI=mb,oI=vb,sI=yb,Nb=wb,Pb=Sb,jb=_b,Db=bb,Mb=Cb,Ob=kb,Ab=Eb,Ib=Tb,Lb=Rb;const iI=rI,aI=oI,lI=h.forwardRef(({className:e,inset:t,children:n,...r},o)=>c.jsxs(Ib,{ref:o,className:se("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,c.jsx(Aj,{className:"ml-auto h-4 w-4"})]}));lI.displayName=Ib.displayName;const cI=h.forwardRef(({className:e,...t},n)=>c.jsx(Lb,{ref:n,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));cI.displayName=Lb.displayName;const Fb=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(sI,{children:c.jsx(Nb,{ref:r,sideOffset:t,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Fb.displayName=Nb.displayName;const Ub=h.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(jb,{ref:r,className:se("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Ub.displayName=jb.displayName;const uI=h.forwardRef(({className:e,children:t,checked:n,...r},o)=>c.jsxs(Db,{ref:o,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Ob,{children:c.jsx(ZS,{className:"h-4 w-4"})})}),t]}));uI.displayName=Db.displayName;const dI=h.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(Mb,{ref:r,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Ob,{children:c.jsx(JS,{className:"h-2 w-2 fill-current"})})}),t]}));dI.displayName=Mb.displayName;const $b=h.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(Pb,{ref:r,className:se("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));$b.displayName=Pb.displayName;const Vb=h.forwardRef(({className:e,...t},n)=>c.jsx(Ab,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));Vb.displayName=Ab.displayName;var Tg="Dialog",[zb,Wb]=_n(Tg),[fI,pr]=zb(Tg),Yb=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=h.useRef(null),l=h.useRef(null),[u=!1,d]=so({prop:r,defaultProp:o,onChange:s});return c.jsx(fI,{scope:t,triggerRef:a,contentRef:l,contentId:Tr(),titleId:Tr(),descriptionId:Tr(),open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};Yb.displayName=Tg;var Hb="DialogTrigger",Bb=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pr(Hb,n),s=be(t,o.triggerRef);return c.jsx(ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Pg(o.open),...r,ref:s,onClick:G(e.onClick,o.onOpenToggle)})});Bb.displayName=Hb;var Rg="DialogPortal",[hI,Gb]=zb(Rg,{forceMount:void 0}),Kb=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=pr(Rg,t);return c.jsx(hI,{scope:t,forceMount:n,children:h.Children.map(r,i=>c.jsx(fn,{present:n||s.open,children:c.jsx(Bl,{asChild:!0,container:o,children:i})}))})};Kb.displayName=Rg;var Zu="DialogOverlay",Zb=h.forwardRef((e,t)=>{const n=Gb(Zu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=pr(Zu,e.__scopeDialog);return s.modal?c.jsx(fn,{present:r||s.open,children:c.jsx(pI,{...o,ref:t})}):null});Zb.displayName=Zu;var pI=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pr(Zu,n);return c.jsx(Yd,{as:oo,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(ve.div,{"data-state":Pg(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),As="DialogContent",qb=h.forwardRef((e,t)=>{const n=Gb(As,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=pr(As,e.__scopeDialog);return c.jsx(fn,{present:r||s.open,children:s.modal?c.jsx(mI,{...o,ref:t}):c.jsx(gI,{...o,ref:t})})});qb.displayName=As;var mI=h.forwardRef((e,t)=>{const n=pr(As,e.__scopeDialog),r=h.useRef(null),o=be(t,n.contentRef,r);return h.useEffect(()=>{const s=r.current;if(s)return yg(s)},[]),c.jsx(Xb,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:G(e.onFocusOutside,s=>s.preventDefault())})}),gI=h.forwardRef((e,t)=>{const n=pr(As,e.__scopeDialog),r=h.useRef(!1),o=h.useRef(!1);return c.jsx(Xb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Xb=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=pr(As,n),l=h.useRef(null),u=be(t,l);return og(),c.jsxs(c.Fragment,{children:[c.jsx(Fd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(Ji,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Pg(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(yI,{titleId:a.titleId}),c.jsx(wI,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Ng="DialogTitle",Qb=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pr(Ng,n);return c.jsx(ve.h2,{id:o.titleId,...r,ref:t})});Qb.displayName=Ng;var Jb="DialogDescription",e1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pr(Jb,n);return c.jsx(ve.p,{id:o.descriptionId,...r,ref:t})});e1.displayName=Jb;var t1="DialogClose",n1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pr(t1,n);return c.jsx(ve.button,{type:"button",...r,ref:t,onClick:G(e.onClick,()=>o.onOpenChange(!1))})});n1.displayName=t1;function Pg(e){return e?"open":"closed"}var r1="DialogTitleWarning",[vI,o1]=kD(r1,{contentName:As,titleName:Ng,docsSlug:"dialog"}),yI=({titleId:e})=>{const t=o1(r1),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},xI="DialogDescriptionWarning",wI=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${o1(xI).contentName}}.`;return h.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},jg=Yb,Dg=Bb,Mg=Kb,Zl=Zb,ql=qb,Xl=Qb,Ql=e1,Gd=n1;const s1=jg,i1=Dg,SI=Mg,a1=h.forwardRef(({className:e,...t},n)=>c.jsx(Zl,{className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));a1.displayName=Zl.displayName;const _I=Wl("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Og=h.forwardRef(({side:e="right",className:t,children:n,...r},o)=>c.jsxs(SI,{children:[c.jsx(a1,{}),c.jsxs(ql,{ref:o,className:se(_I({side:e}),t),...r,children:[n,c.jsxs(Gd,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(Jm,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Og.displayName=ql.displayName;const l1=({className:e,...t})=>c.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});l1.displayName="SheetHeader";const c1=h.forwardRef(({className:e,...t},n)=>c.jsx(Xl,{ref:n,className:se("text-lg font-semibold text-foreground",e),...t}));c1.displayName=Xl.displayName;const bI=h.forwardRef(({className:e,...t},n)=>c.jsx(Ql,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));bI.displayName=Ql.displayName;class Dn extends Error{constructor(t){var n,r,o,s;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Dn.prototype),t!==null&&typeof t=="object"&&(this.url=typeof t.url=="string"?t.url:"",this.status=typeof t.status=="number"?t.status:0,this.isAbort=!!t.isAbort,this.originalError=t.originalError,t.response!==null&&typeof t.response=="object"?this.response=t.response:t.data!==null&&typeof t.data=="object"?this.response=t.data:this.response={}),this.originalError||t instanceof Dn||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(n=this.response)==null?void 0:n.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(s=(o=(r=this.originalError)==null?void 0:r.cause)==null?void 0:o.message)!=null&&s.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return{...this}}}const zc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function CI(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||kI;let o=0;for(;o<e.length;){const s=e.indexOf("=",o);if(s===-1)break;let i=e.indexOf(";",o);if(i===-1)i=e.length;else if(i<s){o=e.lastIndexOf(";",s-1)+1;continue}const a=e.slice(o,s).trim();if(n[a]===void 0){let l=e.slice(s+1,i).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1));try{n[a]=r(l)}catch{n[a]=l}}o=i+1}return n}function Vx(e,t,n){const r=Object.assign({},n||{}),o=r.encode||EI;if(!zc.test(e))throw new TypeError("argument name is invalid");const s=o(t);if(s&&!zc.test(s))throw new TypeError("argument val is invalid");let i=e+"="+s;if(r.maxAge!=null){const a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(a)}if(r.domain){if(!zc.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!zc.test(r.path))throw new TypeError("option path is invalid");i+="; Path="+r.path}if(r.expires){if(!function(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}(r.expires)||isNaN(r.expires.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():r.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}function kI(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function EI(e){return encodeURIComponent(e)}const TI=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let u1;function Ri(e){if(e)try{const t=decodeURIComponent(u1(e.split(".")[1]).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function d1(e,t=0){let n=Ri(e);return!(Object.keys(n).length>0&&(!n.exp||n.exp-t>Date.now()/1e3))}u1=typeof atob!="function"||TI?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,s=0,i="";r=t.charAt(s++);~r&&(n=o%4?64*n+r:r,o++%4)?i+=String.fromCharCode(255&n>>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i}:atob;const zx="pb_auth";class RI{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!d1(this.token)}get isAdmin(){return Ri(this.token).type==="admin"}get isAuthRecord(){return Ri(this.token).type==="authRecord"}save(t,n){this.baseToken=t||"",this.baseModel=n||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,n=zx){const r=CI(t||"")[n]||"";let o={};try{o=JSON.parse(r),(typeof o===null||typeof o!="object"||Array.isArray(o))&&(o={})}catch{}this.save(o.token||"",o.model||null)}exportToCookie(t,n=zx){var l,u;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},o=Ri(this.token);r.expires=o!=null&&o.exp?new Date(1e3*o.exp):new Date("1970-01-01"),t=Object.assign({},r,t);const s={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=Vx(n,JSON.stringify(s),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(s.model&&a>4096){s.model={id:(l=s==null?void 0:s.model)==null?void 0:l.id,email:(u=s==null?void 0:s.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(s.model[f]=this.model[f]);i=Vx(n,JSON.stringify(s),t)}return i}onChange(t,n=!1){return this._onChangeCallbacks.push(t),n&&t(this.token,this.model),()=>{for(let r=this._onChangeCallbacks.length-1;r>=0;r--)if(this._onChangeCallbacks[r]==t)return delete this._onChangeCallbacks[r],void this._onChangeCallbacks.splice(r,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class NI extends RI{constructor(t="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=t,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(t,n){this._storageSet(this.storageKey,{token:t,model:n}),super.save(t,n)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const n=window.localStorage.getItem(t)||"";try{return JSON.parse(n)}catch{return n}}return this.storageFallback[t]}_storageSet(t,n){if(typeof window<"u"&&(window!=null&&window.localStorage)){let r=n;typeof n!="string"&&(r=JSON.stringify(n)),window.localStorage.setItem(t,r)}else this.storageFallback[t]=n}_storageRemove(t){var n;typeof window<"u"&&(window!=null&&window.localStorage)&&((n=window.localStorage)==null||n.removeItem(t)),delete this.storageFallback[t]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",t=>{if(t.key!=this.storageKey)return;const n=this._storageGet(this.storageKey)||{};super.save(n.token||"",n.model||null)})}}class Ws{constructor(t){this.client=t}}class PI extends Ws{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,n){return n=Object.assign({method:"PATCH",body:t},n),this.client.send("/api/settings",n)}async testS3(t="storage",n){return n=Object.assign({method:"POST",body:{filesystem:t}},n),this.client.send("/api/settings/test/s3",n).then(()=>!0)}async testEmail(t,n,r){return r=Object.assign({method:"POST",body:{email:t,template:n}},r),this.client.send("/api/settings/test/email",r).then(()=>!0)}async generateAppleClientSecret(t,n,r,o,s,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:n,keyId:r,privateKey:o,duration:s}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class Ag extends Ws{decode(t){return t}async getFullList(t,n){if(typeof t=="number")return this._getFullList(t,n);let r=500;return(n=Object.assign({},t,n)).batch&&(r=n.batch,delete n.batch),this._getFullList(r,n)}async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send(this.baseCrudPath,r).then(o=>{var s;return o.items=((s=o.items)==null?void 0:s.map(i=>this.decode(i)))||[],o})}async getFirstListItem(t,n){return(n=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},n)).query=Object.assign({filter:t,skipTotal:1},n.query),this.getList(1,1,n).then(r=>{var o;if(!((o=r==null?void 0:r.items)!=null&&o.length))throw new Dn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return r.items[0]})}async getOne(t,n){if(!t)throw new Dn({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(r=>this.decode(r))}async create(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send(this.baseCrudPath,n).then(r=>this.decode(r))}async update(t,n,r){return r=Object.assign({method:"PATCH",body:n},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(o=>this.decode(o))}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(()=>!0)}_getFullList(t=500,n){(n=n||{}).query=Object.assign({skipTotal:1},n.query);let r=[],o=async s=>this.getList(s,t||500,n).then(i=>{const a=i.items;return r=r.concat(a),a.length==i.perPage?o(s+1):r});return o(1)}}function Cn(e,t,n,r){const o=r!==void 0;return o||n!==void 0?o?(console.warn(e),t.body=Object.assign({},t.body,n),t.query=Object.assign({},t.query,r),t):Object.assign(t,n):t}function ch(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class jI extends Ag{get baseCrudPath(){return"/api/admins"}async update(t,n,r){return super.update(t,n,r).then(o=>{var s,i;return((s=this.client.authStore.model)==null?void 0:s.id)===o.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,o),o})}async delete(t,n){return super.delete(t,n).then(r=>{var o,s;return r&&((o=this.client.authStore.model)==null?void 0:o.id)===t&&((s=this.client.authStore.model)==null?void 0:s.collectionId)===void 0&&this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:n})}async authWithPassword(t,n,r,o){let s={method:"POST",body:{identity:t,password:n}};s=Cn("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",s,r,o);const i=s.autoRefreshThreshold;delete s.autoRefreshThreshold,s.autoRefresh||ch(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",s);return a=this.authResponse(a),i&&function(u,d,f,p){ch(u);const x=u.beforeSend,g=u.authStore.model,y=u.authStore.onChange((S,v)=>{(!S||(v==null?void 0:v.id)!=(g==null?void 0:g.id)||(v!=null&&v.collectionId||g!=null&&g.collectionId)&&(v==null?void 0:v.collectionId)!=(g==null?void 0:g.collectionId))&&ch(u)});u._resetAutoRefresh=function(){y(),u.beforeSend=x,delete u._resetAutoRefresh},u.beforeSend=async(S,v)=>{var C;const m=u.authStore.token;if((C=v.query)!=null&&C.autoRefresh)return x?x(S,v):{url:S,sendOptions:v};let w=u.authStore.isValid;if(w&&d1(u.authStore.token,d))try{await f()}catch{w=!1}w||await p();const b=v.headers||{};for(let _ in b)if(_.toLowerCase()=="authorization"&&m==b[_]&&u.authStore.token){b[_]=u.authStore.token;break}return v.headers=b,x?x(S,v):{url:S,sendOptions:v}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},s))),a}async authRefresh(t,n){let r={method:"POST"};return r=Cn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCrudPath+"/auth-refresh",r).then(this.authResponse.bind(this))}async requestPasswordReset(t,n,r){let o={method:"POST",body:{email:t}};return o=Cn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",o,n,r),this.client.send(this.baseCrudPath+"/request-password-reset",o).then(()=>!0)}async confirmPasswordReset(t,n,r,o,s){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Cn("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,o,s),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const DI=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function f1(e){if(e){e.query=e.query||{};for(let t in e)DI.includes(t)||(e.query[t]=e[t],delete e[t])}}class h1 extends Ws{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(t,n,r){var i;if(!t)throw new Error("topic must be set.");let o=t;if(r){f1(r);const a="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.headers}));o+=(o.includes("?")?"&":"?")+a}const s=function(a){const l=a;let u;try{u=JSON.parse(l==null?void 0:l.data)}catch{}n(u||{})};return this.subscriptions[o]||(this.subscriptions[o]=[]),this.subscriptions[o].push(s),this.isConnected?this.subscriptions[o].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(o,s):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,s)}async unsubscribe(t){var r;let n=!1;if(t){const o=this.getSubscriptionsByTopic(t);for(let s in o)if(this.hasSubscriptionListeners(s)){for(let i of this.subscriptions[s])(r=this.eventSource)==null||r.removeEventListener(s,i);delete this.subscriptions[s],n||(n=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var r;let n=!1;for(let o in this.subscriptions)if((o+"?").startsWith(t)){n=!0;for(let s of this.subscriptions[o])(r=this.eventSource)==null||r.removeEventListener(o,s);delete this.subscriptions[o]}n&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,n){var s;let r=!1;const o=this.getSubscriptionsByTopic(t);for(let i in o){if(!Array.isArray(this.subscriptions[i])||!this.subscriptions[i].length)continue;let a=!1;for(let l=this.subscriptions[i].length-1;l>=0;l--)this.subscriptions[i][l]===n&&(a=!0,delete this.subscriptions[i][l],this.subscriptions[i].splice(l,1),(s=this.eventSource)==null||s.removeEventListener(i,n));a&&(this.subscriptions[i].length||delete this.subscriptions[i],r||this.hasSubscriptionListeners(i)||(r=!0))}this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var n,r;if(this.subscriptions=this.subscriptions||{},t)return!!((n=this.subscriptions[t])!=null&&n.length);for(let o in this.subscriptions)if((r=this.subscriptions[o])!=null&&r.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(t=>{if(!(t!=null&&t.isAbort))throw t})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(t){const n={};t=t.includes("?")?t:t+"?";for(let r in this.subscriptions)(r+"?").startsWith(t)&&(n[r]=this.subscriptions[r]);return n}getNonEmptySubscriptionKeys(){const t=[];for(let n in this.subscriptions)this.subscriptions[n].length&&t.push(n);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.addEventListener(t,n)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.removeEventListener(t,n)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,n)=>{this.pendingConnects.push({resolve:t,reject:n}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=t=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",t=>{const n=t;this.clientId=n==null?void 0:n.lastEventId,this.submitSubscriptions().then(async()=>{let r=3;for(;this.hasUnsentSubscriptions()&&r>0;)r--,await this.submitSubscriptions()}).then(()=>{for(let o of this.pendingConnects)o.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const r=this.getSubscriptionsByTopic("PB_CONNECT");for(let o in r)for(let s of r[o])s(t)}).catch(r=>{this.clientId="",this.connectErrorHandler(r)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const n of t)if(!this.lastSentSubscriptions.includes(n))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let r of this.pendingConnects)r.reject(new Dn(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const n=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},n)}disconnect(t=!1){var n;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(n=this.eventSource)==null||n.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let r of this.pendingConnects)r.resolve();this.pendingConnects=[]}}}class MI extends Ag{constructor(t,n){super(t),this.collectionIdOrName=n}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,n,r){if(!t)throw new Error("Missing topic.");if(!n)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,n,r)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,n){if(typeof t=="number")return super.getFullList(t,n);const r=Object.assign({},t,n);return super.getFullList(r)}async getList(t=1,n=30,r){return super.getList(t,n,r)}async getFirstListItem(t,n){return super.getFirstListItem(t,n)}async getOne(t,n){return super.getOne(t,n)}async create(t,n){return super.create(t,n)}async update(t,n,r){return super.update(t,n,r).then(o=>{var s,i,a;return((s=this.client.authStore.model)==null?void 0:s.id)!==(o==null?void 0:o.id)||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((a=this.client.authStore.model)==null?void 0:a.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,o),o})}async delete(t,n){return super.delete(t,n).then(r=>{var o,s,i;return!r||((o=this.client.authStore.model)==null?void 0:o.id)!==t||((s=this.client.authStore.model)==null?void 0:s.collectionId)!==this.collectionIdOrName&&((i=this.client.authStore.model)==null?void 0:i.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:n})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(n=>Object.assign({},n,{usernamePassword:!!(n!=null&&n.usernamePassword),emailPassword:!!(n!=null&&n.emailPassword),authProviders:Array.isArray(n==null?void 0:n.authProviders)?n==null?void 0:n.authProviders:[]}))}async authWithPassword(t,n,r,o){let s={method:"POST",body:{identity:t,password:n}};return s=Cn("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",s,r,o),this.client.send(this.baseCollectionPath+"/auth-with-password",s).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,n,r,o,s,i,a){let l={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:o,createData:s}};return l=Cn("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",l,i,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const n=(t==null?void 0:t[0])||{};let r=null;n.urlCallback||(r=Wx(void 0));const o=new h1(this.client);function s(){r==null||r.close(),o.unsubscribe()}const i={},a=n.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(l=>{var p;const u=l.authProviders.find(x=>x.name===n.provider);if(!u)throw new Dn(new Error(`Missing or invalid provider "${n.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=a?(p=this.client.cancelControllers)==null?void 0:p[a]:void 0;return f&&(f.signal.onabort=()=>{s()}),new Promise(async(x,g)=>{var y;try{await o.subscribe("@oauth2",async w=>{var C;const b=o.clientId;try{if(!w.state||b!==w.state)throw new Error("State parameters don't match.");if(w.error||!w.code)throw new Error("OAuth2 redirect error or missing code: "+w.error);const _=Object.assign({},n);delete _.provider,delete _.scopes,delete _.createData,delete _.urlCallback,(C=f==null?void 0:f.signal)!=null&&C.onabort&&(f.signal.onabort=null);const R=await this.authWithOAuth2Code(u.name,w.code,u.codeVerifier,d,n.createData,_);x(R)}catch(_){g(new Dn(_))}s()});const S={state:o.clientId};(y=n.scopes)!=null&&y.length&&(S.scope=n.scopes.join(" "));const v=this._replaceQueryParams(u.authUrl+d,S);await(n.urlCallback||function(w){r?r.location.href=w:r=Wx(w)})(v)}catch(S){s(),g(new Dn(S))}})}).catch(l=>{throw s(),l})}async authRefresh(t,n){let r={method:"POST"};return r=Cn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCollectionPath+"/auth-refresh",r).then(o=>this.authResponse(o))}async requestPasswordReset(t,n,r){let o={method:"POST",body:{email:t}};return o=Cn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",o,n,r),this.client.send(this.baseCollectionPath+"/request-password-reset",o).then(()=>!0)}async confirmPasswordReset(t,n,r,o,s){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Cn("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,o,s),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,n,r){let o={method:"POST",body:{email:t}};return o=Cn("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",o,n,r),this.client.send(this.baseCollectionPath+"/request-verification",o).then(()=>!0)}async confirmVerification(t,n,r){let o={method:"POST",body:{token:t}};return o=Cn("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",o,n,r),this.client.send(this.baseCollectionPath+"/confirm-verification",o).then(()=>{const s=Ri(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===s.id&&i.collectionId===s.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,n,r){let o={method:"POST",body:{newEmail:t}};return o=Cn("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",o,n,r),this.client.send(this.baseCollectionPath+"/request-email-change",o).then(()=>!0)}async confirmEmailChange(t,n,r,o){let s={method:"POST",body:{token:t,password:n}};return s=Cn("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",s,r,o),this.client.send(this.baseCollectionPath+"/confirm-email-change",s).then(()=>{const i=Ri(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",n)}async unlinkExternalAuth(t,n,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(n),r).then(()=>!0)}_replaceQueryParams(t,n={}){let r=t,o="";t.indexOf("?")>=0&&(r=t.substring(0,t.indexOf("?")),o=t.substring(t.indexOf("?")+1));const s={},i=o.split("&");for(const a of i){if(a=="")continue;const l=a.split("=");s[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let a in n)n.hasOwnProperty(a)&&(n[a]==null?delete s[a]:s[a]=n[a]);o="";for(let a in s)s.hasOwnProperty(a)&&(o!=""&&(o+="&"),o+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(s[a].replace(/%20/g,"+")));return o!=""?r+"?"+o:r}}function Wx(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Dn(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,n=768,r=window.innerWidth,o=window.innerHeight;t=t>r?r:t,n=n>o?o:n;let s=r/2-t/2,i=o/2-n/2;return window.open(e,"popup_window","width="+t+",height="+n+",top="+i+",left="+s+",resizable,menubar=no")}class OI extends Ag{get baseCrudPath(){return"/api/collections"}async import(t,n=!1,r){return r=Object.assign({method:"PUT",body:{collections:t,deleteMissing:n}},r),this.client.send(this.baseCrudPath+"/import",r).then(()=>!0)}}class AI extends Ws{async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send("/api/logs",r)}async getOne(t,n){if(!t)throw new Dn({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/"+encodeURIComponent(t),n)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class II extends Ws{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class LI extends Ws{getUrl(t,n,r={}){if(!n||!(t!=null&&t.id)||!(t!=null&&t.collectionId)&&!(t!=null&&t.collectionName))return"";const o=[];o.push("api"),o.push("files"),o.push(encodeURIComponent(t.collectionId||t.collectionName)),o.push(encodeURIComponent(t.id)),o.push(encodeURIComponent(n));let s=this.client.buildUrl(o.join("/"));if(Object.keys(r).length){r.download===!1&&delete r.download;const i=new URLSearchParams(r);s+=(s.includes("?")?"&":"?")+i}return s}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(n=>(n==null?void 0:n.token)||"")}}class FI extends Ws{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,n){return n=Object.assign({method:"POST",body:{name:t}},n),this.client.send("/api/backups",n).then(()=>!0)}async upload(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send("/api/backups/upload",n).then(()=>!0)}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}`,n).then(()=>!0)}async restore(t,n){return n=Object.assign({method:"POST"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,n).then(()=>!0)}getDownloadUrl(t,n){return this.client.buildUrl(`/api/backups/${encodeURIComponent(n)}?token=${encodeURIComponent(t)}`)}}class UI{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new NI,this.admins=new jI(this),this.collections=new OI(this),this.files=new LI(this),this.logs=new AI(this),this.settings=new PI(this),this.realtime=new h1(this),this.health=new II(this),this.backups=new FI(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new MI(this,t)),this.recordServices[t]}autoCancellation(t){return this.enableAutoCancellation=!!t,this}cancelRequest(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this}cancelAllRequests(){for(let t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this}filter(t,n){if(!n)return t;for(let r in n){let o=n[r];switch(typeof o){case"boolean":case"number":o=""+o;break;case"string":o="'"+o.replace(/'/g,"\\'")+"'";break;default:o=o===null?"null":o instanceof Date?"'"+o.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(o).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+r+"}",o)}return t}getFileUrl(t,n,r={}){return this.files.getUrl(t,n,r)}buildUrl(t){var r;let n=this.baseUrl;return typeof window>"u"||!window.location||n.startsWith("https://")||n.startsWith("http://")||(n=(r=window.location.origin)!=null&&r.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(n+=window.location.pathname||"/",n+=n.endsWith("/")?"":"/"),n+=this.baseUrl),t&&(n+=n.endsWith("/")?"":"/",n+=t.startsWith("/")?t.substring(1):t),n}async send(t,n){n=this.initSendOptions(t,n);let r=this.buildUrl(t);if(this.beforeSend){const o=Object.assign({},await this.beforeSend(r,n));o.url!==void 0||o.options!==void 0?(r=o.url||r,n=o.options||n):Object.keys(o).length&&(n=o,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(n.query!==void 0){const o=this.serializeQueryParams(n.query);o&&(r+=(r.includes("?")?"&":"?")+o),delete n.query}return this.getHeader(n.headers,"Content-Type")=="application/json"&&n.body&&typeof n.body!="string"&&(n.body=JSON.stringify(n.body)),(n.fetch||fetch)(r,n).then(async o=>{let s={};try{s=await o.json()}catch{}if(this.afterSend&&(s=await this.afterSend(o,s)),o.status>=400)throw new Dn({url:o.url,status:o.status,data:s});return s}).catch(o=>{throw new Dn(o)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),f1(n),n.query=Object.assign({},n.params,n.query),n.requestKey===void 0&&(n.$autoCancel===!1||n.query.$autoCancel===!1?n.requestKey=null:(n.$cancelKey||n.query.$cancelKey)&&(n.requestKey=n.$cancelKey||n.query.$cancelKey)),delete n.$autoCancel,delete n.query.$autoCancel,delete n.$cancelKey,delete n.query.$cancelKey,this.getHeader(n.headers,"Content-Type")!==null||this.isFormData(n.body)||(n.headers=Object.assign({},n.headers,{"Content-Type":"application/json"})),this.getHeader(n.headers,"Accept-Language")===null&&(n.headers=Object.assign({},n.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(n.headers,"Authorization")===null&&(n.headers=Object.assign({},n.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&n.requestKey!==null){const r=n.requestKey||(n.method||"GET")+t;delete n.requestKey,this.cancelRequest(r);const o=new AbortController;this.cancelControllers[r]=o,n.signal=o.signal}return n}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const n=new FormData;for(const r in t){const o=t[r];if(typeof o!="object"||this.hasBlobField({data:o})){const s=Array.isArray(o)?o:[o];for(let i of s)n.append(r,i)}else{let s={};s[r]=o,n.append("@jsonPayload",JSON.stringify(s))}}return n}hasBlobField(t){for(const n in t){const r=Array.isArray(t[n])?t[n]:[t[n]];for(const o of r)if(typeof Blob<"u"&&o instanceof Blob||typeof File<"u"&&o instanceof File)return!0}return!1}getHeader(t,n){t=t||{},n=n.toLowerCase();for(let r in t)if(r.toLowerCase()==n)return t[r];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const n=[];for(const r in t){if(t[r]===null)continue;const o=t[r],s=encodeURIComponent(r);if(Array.isArray(o))for(const i of o)n.push(s+"="+encodeURIComponent(i));else o instanceof Date?n.push(s+"="+encodeURIComponent(o.toISOString())):typeof o!==null&&typeof o=="object"?n.push(s+"="+encodeURIComponent(JSON.stringify(o))):n.push(s+"="+encodeURIComponent(o))}return n.join("&")}}var $I={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const Ep=$I.VITE_API_DOMAIN;console.log(Ep);let Wc;const Vt=()=>Wc||(Wc=new UI(Ep||"http://127.0.0.1:8090"),Wc);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var p1;function te(){return p1.apply(null,arguments)}function VI(e){p1=e}function dr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Cs(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function We(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ig(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(We(e,t))return!1;return!0}function mn(e){return e===void 0}function lo(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Jl(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function m1(e,t){var n=[],r,o=e.length;for(r=0;r<o;++r)n.push(t(e[r],r));return n}function Ao(e,t){for(var n in t)We(t,n)&&(e[n]=t[n]);return We(t,"toString")&&(e.toString=t.toString),We(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Mr(e,t,n,r){return F1(e,t,n,r,!0).utc()}function zI(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Ee(e){return e._pf==null&&(e._pf=zI()),e._pf}var Tp;Array.prototype.some?Tp=Array.prototype.some:Tp=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Lg(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Ee(e),n=Tp.call(t.parsedDateParts,function(o){return o!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function Kd(e){var t=Mr(NaN);return e!=null?Ao(Ee(t),e):Ee(t).userInvalidated=!0,t}var Yx=te.momentProperties=[],uh=!1;function Fg(e,t){var n,r,o,s=Yx.length;if(mn(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),mn(t._i)||(e._i=t._i),mn(t._f)||(e._f=t._f),mn(t._l)||(e._l=t._l),mn(t._strict)||(e._strict=t._strict),mn(t._tzm)||(e._tzm=t._tzm),mn(t._isUTC)||(e._isUTC=t._isUTC),mn(t._offset)||(e._offset=t._offset),mn(t._pf)||(e._pf=Ee(t)),mn(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=Yx[n],o=t[r],mn(o)||(e[r]=o);return e}function ec(e){Fg(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),uh===!1&&(uh=!0,te.updateOffset(this),uh=!1)}function fr(e){return e instanceof ec||e!=null&&e._isAMomentObject!=null}function g1(e){te.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Bn(e,t){var n=!0;return Ao(function(){if(te.deprecationHandler!=null&&te.deprecationHandler(null,e),n){var r=[],o,s,i,a=arguments.length;for(s=0;s<a;s++){if(o="",typeof arguments[s]=="object"){o+=`
[`+s+"] ";for(i in arguments[0])We(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[s];r.push(o)}g1(e+`
Arguments: `+Array.prototype.slice.call(r).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Hx={};function v1(e,t){te.deprecationHandler!=null&&te.deprecationHandler(e,t),Hx[e]||(g1(t),Hx[e]=!0)}te.suppressDeprecationWarnings=!1;te.deprecationHandler=null;function Or(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function WI(e){var t,n;for(n in e)We(e,n)&&(t=e[n],Or(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Rp(e,t){var n=Ao({},e),r;for(r in t)We(t,r)&&(Cs(e[r])&&Cs(t[r])?(n[r]={},Ao(n[r],e[r]),Ao(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)We(e,r)&&!We(t,r)&&Cs(e[r])&&(n[r]=Ao({},n[r]));return n}function Ug(e){e!=null&&this.set(e)}var Np;Object.keys?Np=Object.keys:Np=function(e){var t,n=[];for(t in e)We(e,t)&&n.push(t);return n};var YI={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function HI(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Or(r)?r.call(t,n):r}function Pr(e,t,n){var r=""+Math.abs(e),o=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var $g=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Yc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,dh={},Ni={};function he(e,t,n,r){var o=r;typeof r=="string"&&(o=function(){return this[r]()}),e&&(Ni[e]=o),t&&(Ni[t[0]]=function(){return Pr(o.apply(this,arguments),t[1],t[2])}),n&&(Ni[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function BI(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function GI(e){var t=e.match($g),n,r;for(n=0,r=t.length;n<r;n++)Ni[t[n]]?t[n]=Ni[t[n]]:t[n]=BI(t[n]);return function(o){var s="",i;for(i=0;i<r;i++)s+=Or(t[i])?t[i].call(o,e):t[i];return s}}function uu(e,t){return e.isValid()?(t=y1(t,e.localeData()),dh[t]=dh[t]||GI(t),dh[t](e)):e.localeData().invalidDate()}function y1(e,t){var n=5;function r(o){return t.longDateFormat(o)||o}for(Yc.lastIndex=0;n>=0&&Yc.test(e);)e=e.replace(Yc,r),Yc.lastIndex=0,n-=1;return e}var KI={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ZI(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match($g).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var qI="Invalid date";function XI(){return this._invalidDate}var QI="%d",JI=/\d{1,2}/;function e2(e){return this._ordinal.replace("%d",e)}var t2={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function n2(e,t,n,r){var o=this._relativeTime[n];return Or(o)?o(e,t,n,r):o.replace(/%d/i,e)}function r2(e,t){var n=this._relativeTime[e>0?"future":"past"];return Or(n)?n(t):n.replace(/%s/i,t)}var Bx={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Gn(e){return typeof e=="string"?Bx[e]||Bx[e.toLowerCase()]:void 0}function Vg(e){var t={},n,r;for(r in e)We(e,r)&&(n=Gn(r),n&&(t[n]=e[r]));return t}var o2={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function s2(e){var t=[],n;for(n in e)We(e,n)&&t.push({unit:n,priority:o2[n]});return t.sort(function(r,o){return r.priority-o.priority}),t}var x1=/\d/,Ln=/\d\d/,w1=/\d{3}/,zg=/\d{4}/,Zd=/[+-]?\d{6}/,ft=/\d\d?/,S1=/\d\d\d\d?/,_1=/\d\d\d\d\d\d?/,qd=/\d{1,3}/,Wg=/\d{1,4}/,Xd=/[+-]?\d{1,6}/,ra=/\d+/,Qd=/[+-]?\d+/,i2=/Z|[+-]\d\d:?\d\d/gi,Jd=/Z|[+-]\d\d(?::?\d\d)?/gi,a2=/[+-]?\d+(\.\d{1,3})?/,tc=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oa=/^[1-9]\d?/,Yg=/^([1-9]\d|\d)/,qu;qu={};function ie(e,t,n){qu[e]=Or(t)?t:function(r,o){return r&&n?n:t}}function l2(e,t){return We(qu,e)?qu[e](t._strict,t._locale):new RegExp(c2(e))}function c2(e){return Qr(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,o,s){return n||r||o||s}))}function Qr(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $n(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ae(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=$n(t)),n}var Pp={};function nt(e,t){var n,r=t,o;for(typeof e=="string"&&(e=[e]),lo(t)&&(r=function(s,i){i[t]=Ae(s)}),o=e.length,n=0;n<o;n++)Pp[e[n]]=r}function nc(e,t){nt(e,function(n,r,o,s){o._w=o._w||{},t(n,o._w,o,s)})}function u2(e,t,n){t!=null&&We(Pp,e)&&Pp[e](t,n._a,n,e)}function ef(e){return e%4===0&&e%100!==0||e%400===0}var Jt=0,Kr=1,Sr=2,Lt=3,rr=4,Zr=5,ws=6,d2=7,f2=8;he("Y",0,0,function(){var e=this.year();return e<=9999?Pr(e,4):"+"+e});he(0,["YY",2],0,function(){return this.year()%100});he(0,["YYYY",4],0,"year");he(0,["YYYYY",5],0,"year");he(0,["YYYYYY",6,!0],0,"year");ie("Y",Qd);ie("YY",ft,Ln);ie("YYYY",Wg,zg);ie("YYYYY",Xd,Zd);ie("YYYYYY",Xd,Zd);nt(["YYYYY","YYYYYY"],Jt);nt("YYYY",function(e,t){t[Jt]=e.length===2?te.parseTwoDigitYear(e):Ae(e)});nt("YY",function(e,t){t[Jt]=te.parseTwoDigitYear(e)});nt("Y",function(e,t){t[Jt]=parseInt(e,10)});function Wa(e){return ef(e)?366:365}te.parseTwoDigitYear=function(e){return Ae(e)+(Ae(e)>68?1900:2e3)};var b1=sa("FullYear",!0);function h2(){return ef(this.year())}function sa(e,t){return function(n){return n!=null?(C1(this,e,n),te.updateOffset(this,t),this):yl(this,e)}}function yl(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function C1(e,t,n){var r,o,s,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!ef(s)?28:a,o?r.setUTCFullYear(s,i,a):r.setFullYear(s,i,a)}}function p2(e){return e=Gn(e),Or(this[e])?this[e]():this}function m2(e,t){if(typeof e=="object"){e=Vg(e);var n=s2(e),r,o=n.length;for(r=0;r<o;r++)this[n[r].unit](e[n[r].unit])}else if(e=Gn(e),Or(this[e]))return this[e](t);return this}function g2(e,t){return(e%t+t)%t}var Rt;Array.prototype.indexOf?Rt=Array.prototype.indexOf:Rt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Hg(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=g2(t,12);return e+=(t-n)/12,n===1?ef(e)?29:28:31-n%7%2}he("M",["MM",2],"Mo",function(){return this.month()+1});he("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});he("MMMM",0,0,function(e){return this.localeData().months(this,e)});ie("M",ft,oa);ie("MM",ft,Ln);ie("MMM",function(e,t){return t.monthsShortRegex(e)});ie("MMMM",function(e,t){return t.monthsRegex(e)});nt(["M","MM"],function(e,t){t[Kr]=Ae(e)-1});nt(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);o!=null?t[Kr]=o:Ee(n).invalidMonth=e});var v2="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),k1="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),E1=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,y2=tc,x2=tc;function w2(e,t){return e?dr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||E1).test(t)?"format":"standalone"][e.month()]:dr(this._months)?this._months:this._months.standalone}function S2(e,t){return e?dr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[E1.test(t)?"format":"standalone"][e.month()]:dr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _2(e,t,n){var r,o,s,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=Mr([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?t==="MMM"?(o=Rt.call(this._shortMonthsParse,i),o!==-1?o:null):(o=Rt.call(this._longMonthsParse,i),o!==-1?o:null):t==="MMM"?(o=Rt.call(this._shortMonthsParse,i),o!==-1?o:(o=Rt.call(this._longMonthsParse,i),o!==-1?o:null)):(o=Rt.call(this._longMonthsParse,i),o!==-1?o:(o=Rt.call(this._shortMonthsParse,i),o!==-1?o:null))}function b2(e,t,n){var r,o,s;if(this._monthsParseExact)return _2.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=Mr([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function T1(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Ae(t);else if(t=e.localeData().monthsParse(t),!lo(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,Hg(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function R1(e){return e!=null?(T1(this,e),te.updateOffset(this,!0),this):yl(this,"Month")}function C2(){return Hg(this.year(),this.month())}function k2(e){return this._monthsParseExact?(We(this,"_monthsRegex")||N1.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(We(this,"_monthsShortRegex")||(this._monthsShortRegex=y2),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function E2(e){return this._monthsParseExact?(We(this,"_monthsRegex")||N1.call(this),e?this._monthsStrictRegex:this._monthsRegex):(We(this,"_monthsRegex")||(this._monthsRegex=x2),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function N1(){function e(l,u){return u.length-l.length}var t=[],n=[],r=[],o,s,i,a;for(o=0;o<12;o++)s=Mr([2e3,o]),i=Qr(this.monthsShort(s,"")),a=Qr(this.months(s,"")),t.push(i),n.push(a),r.push(a),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function T2(e,t,n,r,o,s,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,o,s,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,o,s,i),a}function xl(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Xu(e,t,n){var r=7+t-n,o=(7+xl(e,0,r).getUTCDay()-t)%7;return-o+r-1}function P1(e,t,n,r,o){var s=(7+n-r)%7,i=Xu(e,r,o),a=1+7*(t-1)+s+i,l,u;return a<=0?(l=e-1,u=Wa(l)+a):a>Wa(e)?(l=e+1,u=a-Wa(e)):(l=e,u=a),{year:l,dayOfYear:u}}function wl(e,t,n){var r=Xu(e.year(),t,n),o=Math.floor((e.dayOfYear()-r-1)/7)+1,s,i;return o<1?(i=e.year()-1,s=o+Jr(i,t,n)):o>Jr(e.year(),t,n)?(s=o-Jr(e.year(),t,n),i=e.year()+1):(i=e.year(),s=o),{week:s,year:i}}function Jr(e,t,n){var r=Xu(e,t,n),o=Xu(e+1,t,n);return(Wa(e)-r+o)/7}he("w",["ww",2],"wo","week");he("W",["WW",2],"Wo","isoWeek");ie("w",ft,oa);ie("ww",ft,Ln);ie("W",ft,oa);ie("WW",ft,Ln);nc(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Ae(e)});function R2(e){return wl(e,this._week.dow,this._week.doy).week}var N2={dow:0,doy:6};function P2(){return this._week.dow}function j2(){return this._week.doy}function D2(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function M2(e){var t=wl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}he("d",0,"do","day");he("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});he("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});he("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});he("e",0,0,"weekday");he("E",0,0,"isoWeekday");ie("d",ft);ie("e",ft);ie("E",ft);ie("dd",function(e,t){return t.weekdaysMinRegex(e)});ie("ddd",function(e,t){return t.weekdaysShortRegex(e)});ie("dddd",function(e,t){return t.weekdaysRegex(e)});nc(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);o!=null?t.d=o:Ee(n).invalidWeekday=e});nc(["d","e","E"],function(e,t,n,r){t[r]=Ae(e)});function O2(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function A2(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Bg(e,t){return e.slice(t,7).concat(e.slice(0,t))}var I2="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),j1="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),L2="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),F2=tc,U2=tc,$2=tc;function V2(e,t){var n=dr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Bg(n,this._week.dow):e?n[e.day()]:n}function z2(e){return e===!0?Bg(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function W2(e){return e===!0?Bg(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Y2(e,t,n){var r,o,s,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=Mr([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(o=Rt.call(this._weekdaysParse,i),o!==-1?o:null):t==="ddd"?(o=Rt.call(this._shortWeekdaysParse,i),o!==-1?o:null):(o=Rt.call(this._minWeekdaysParse,i),o!==-1?o:null):t==="dddd"?(o=Rt.call(this._weekdaysParse,i),o!==-1||(o=Rt.call(this._shortWeekdaysParse,i),o!==-1)?o:(o=Rt.call(this._minWeekdaysParse,i),o!==-1?o:null)):t==="ddd"?(o=Rt.call(this._shortWeekdaysParse,i),o!==-1||(o=Rt.call(this._weekdaysParse,i),o!==-1)?o:(o=Rt.call(this._minWeekdaysParse,i),o!==-1?o:null)):(o=Rt.call(this._minWeekdaysParse,i),o!==-1||(o=Rt.call(this._weekdaysParse,i),o!==-1)?o:(o=Rt.call(this._shortWeekdaysParse,i),o!==-1?o:null))}function H2(e,t,n){var r,o,s;if(this._weekdaysParseExact)return Y2.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=Mr([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function B2(e){if(!this.isValid())return e!=null?this:NaN;var t=yl(this,"Day");return e!=null?(e=O2(e,this.localeData()),this.add(e-t,"d")):t}function G2(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function K2(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=A2(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Z2(e){return this._weekdaysParseExact?(We(this,"_weekdaysRegex")||Gg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(We(this,"_weekdaysRegex")||(this._weekdaysRegex=F2),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function q2(e){return this._weekdaysParseExact?(We(this,"_weekdaysRegex")||Gg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(We(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=U2),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function X2(e){return this._weekdaysParseExact?(We(this,"_weekdaysRegex")||Gg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(We(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$2),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Gg(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],o=[],s,i,a,l,u;for(s=0;s<7;s++)i=Mr([2e3,1]).day(s),a=Qr(this.weekdaysMin(i,"")),l=Qr(this.weekdaysShort(i,"")),u=Qr(this.weekdays(i,"")),t.push(a),n.push(l),r.push(u),o.push(a),o.push(l),o.push(u);t.sort(e),n.sort(e),r.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Kg(){return this.hours()%12||12}function Q2(){return this.hours()||24}he("H",["HH",2],0,"hour");he("h",["hh",2],0,Kg);he("k",["kk",2],0,Q2);he("hmm",0,0,function(){return""+Kg.apply(this)+Pr(this.minutes(),2)});he("hmmss",0,0,function(){return""+Kg.apply(this)+Pr(this.minutes(),2)+Pr(this.seconds(),2)});he("Hmm",0,0,function(){return""+this.hours()+Pr(this.minutes(),2)});he("Hmmss",0,0,function(){return""+this.hours()+Pr(this.minutes(),2)+Pr(this.seconds(),2)});function D1(e,t){he(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}D1("a",!0);D1("A",!1);function M1(e,t){return t._meridiemParse}ie("a",M1);ie("A",M1);ie("H",ft,Yg);ie("h",ft,oa);ie("k",ft,oa);ie("HH",ft,Ln);ie("hh",ft,Ln);ie("kk",ft,Ln);ie("hmm",S1);ie("hmmss",_1);ie("Hmm",S1);ie("Hmmss",_1);nt(["H","HH"],Lt);nt(["k","kk"],function(e,t,n){var r=Ae(e);t[Lt]=r===24?0:r});nt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});nt(["h","hh"],function(e,t,n){t[Lt]=Ae(e),Ee(n).bigHour=!0});nt("hmm",function(e,t,n){var r=e.length-2;t[Lt]=Ae(e.substr(0,r)),t[rr]=Ae(e.substr(r)),Ee(n).bigHour=!0});nt("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Lt]=Ae(e.substr(0,r)),t[rr]=Ae(e.substr(r,2)),t[Zr]=Ae(e.substr(o)),Ee(n).bigHour=!0});nt("Hmm",function(e,t,n){var r=e.length-2;t[Lt]=Ae(e.substr(0,r)),t[rr]=Ae(e.substr(r))});nt("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Lt]=Ae(e.substr(0,r)),t[rr]=Ae(e.substr(r,2)),t[Zr]=Ae(e.substr(o))});function J2(e){return(e+"").toLowerCase().charAt(0)==="p"}var eL=/[ap]\.?m?\.?/i,tL=sa("Hours",!0);function nL(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var O1={calendar:YI,longDateFormat:KI,invalidDate:qI,ordinal:QI,dayOfMonthOrdinalParse:JI,relativeTime:t2,months:v2,monthsShort:k1,week:N2,weekdays:I2,weekdaysMin:L2,weekdaysShort:j1,meridiemParse:eL},pt={},_a={},Sl;function rL(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Gx(e){return e&&e.toLowerCase().replace("_","-")}function oL(e){for(var t=0,n,r,o,s;t<e.length;){for(s=Gx(e[t]).split("-"),n=s.length,r=Gx(e[t+1]),r=r?r.split("-"):null;n>0;){if(o=tf(s.slice(0,n).join("-")),o)return o;if(r&&r.length>=n&&rL(s,r)>=n-1)break;n--}t++}return Sl}function sL(e){return!!(e&&e.match("^[^/\\\\]*$"))}function tf(e){var t=null,n;if(pt[e]===void 0&&typeof gu<"u"&&gu&&gu.exports&&sL(e))try{t=Sl._abbr,n=require,n("./locale/"+e),Bo(t)}catch{pt[e]=null}return pt[e]}function Bo(e,t){var n;return e&&(mn(t)?n=go(e):n=Zg(e,t),n?Sl=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Sl._abbr}function Zg(e,t){if(t!==null){var n,r=O1;if(t.abbr=e,pt[e]!=null)v1("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=pt[e]._config;else if(t.parentLocale!=null)if(pt[t.parentLocale]!=null)r=pt[t.parentLocale]._config;else if(n=tf(t.parentLocale),n!=null)r=n._config;else return _a[t.parentLocale]||(_a[t.parentLocale]=[]),_a[t.parentLocale].push({name:e,config:t}),null;return pt[e]=new Ug(Rp(r,t)),_a[e]&&_a[e].forEach(function(o){Zg(o.name,o.config)}),Bo(e),pt[e]}else return delete pt[e],null}function iL(e,t){if(t!=null){var n,r,o=O1;pt[e]!=null&&pt[e].parentLocale!=null?pt[e].set(Rp(pt[e]._config,t)):(r=tf(e),r!=null&&(o=r._config),t=Rp(o,t),r==null&&(t.abbr=e),n=new Ug(t),n.parentLocale=pt[e],pt[e]=n),Bo(e)}else pt[e]!=null&&(pt[e].parentLocale!=null?(pt[e]=pt[e].parentLocale,e===Bo()&&Bo(e)):pt[e]!=null&&delete pt[e]);return pt[e]}function go(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Sl;if(!dr(e)){if(t=tf(e),t)return t;e=[e]}return oL(e)}function aL(){return Np(pt)}function qg(e){var t,n=e._a;return n&&Ee(e).overflow===-2&&(t=n[Kr]<0||n[Kr]>11?Kr:n[Sr]<1||n[Sr]>Hg(n[Jt],n[Kr])?Sr:n[Lt]<0||n[Lt]>24||n[Lt]===24&&(n[rr]!==0||n[Zr]!==0||n[ws]!==0)?Lt:n[rr]<0||n[rr]>59?rr:n[Zr]<0||n[Zr]>59?Zr:n[ws]<0||n[ws]>999?ws:-1,Ee(e)._overflowDayOfYear&&(t<Jt||t>Sr)&&(t=Sr),Ee(e)._overflowWeeks&&t===-1&&(t=d2),Ee(e)._overflowWeekday&&t===-1&&(t=f2),Ee(e).overflow=t),e}var lL=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,cL=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,uL=/Z|[+-]\d\d(?::?\d\d)?/,Hc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fh=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],dL=/^\/?Date\((-?\d+)/i,fL=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,hL={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function A1(e){var t,n,r=e._i,o=lL.exec(r)||cL.exec(r),s,i,a,l,u=Hc.length,d=fh.length;if(o){for(Ee(e).iso=!0,t=0,n=u;t<n;t++)if(Hc[t][1].exec(o[1])){i=Hc[t][0],s=Hc[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(o[3]){for(t=0,n=d;t<n;t++)if(fh[t][1].exec(o[3])){a=(o[2]||" ")+fh[t][0];break}if(a==null){e._isValid=!1;return}}if(!s&&a!=null){e._isValid=!1;return}if(o[4])if(uL.exec(o[4]))l="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(l||""),Qg(e)}else e._isValid=!1}function pL(e,t,n,r,o,s){var i=[mL(e),k1.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return s&&i.push(parseInt(s,10)),i}function mL(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function gL(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function vL(e,t,n){if(e){var r=j1.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(r!==o)return Ee(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function yL(e,t,n){if(e)return hL[e];if(t)return 0;var r=parseInt(n,10),o=r%100,s=(r-o)/100;return s*60+o}function I1(e){var t=fL.exec(gL(e._i)),n;if(t){if(n=pL(t[4],t[3],t[2],t[5],t[6],t[7]),!vL(t[1],n,e))return;e._a=n,e._tzm=yL(t[8],t[9],t[10]),e._d=xl.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ee(e).rfc2822=!0}else e._isValid=!1}function xL(e){var t=dL.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(A1(e),e._isValid===!1)delete e._isValid;else return;if(I1(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:te.createFromInputFallback(e)}te.createFromInputFallback=Bn("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ni(e,t,n){return e??t??n}function wL(e){var t=new Date(te.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Xg(e){var t,n,r=[],o,s,i;if(!e._d){for(o=wL(e),e._w&&e._a[Sr]==null&&e._a[Kr]==null&&SL(e),e._dayOfYear!=null&&(i=ni(e._a[Jt],o[Jt]),(e._dayOfYear>Wa(i)||e._dayOfYear===0)&&(Ee(e)._overflowDayOfYear=!0),n=xl(i,0,e._dayOfYear),e._a[Kr]=n.getUTCMonth(),e._a[Sr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=o[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Lt]===24&&e._a[rr]===0&&e._a[Zr]===0&&e._a[ws]===0&&(e._nextDay=!0,e._a[Lt]=0),e._d=(e._useUTC?xl:T2).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Lt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(Ee(e).weekdayMismatch=!0)}}function SL(e){var t,n,r,o,s,i,a,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,i=4,n=ni(t.GG,e._a[Jt],wl(dt(),1,4).year),r=ni(t.W,1),o=ni(t.E,1),(o<1||o>7)&&(l=!0)):(s=e._locale._week.dow,i=e._locale._week.doy,u=wl(dt(),s,i),n=ni(t.gg,e._a[Jt],u.year),r=ni(t.w,u.week),t.d!=null?(o=t.d,(o<0||o>6)&&(l=!0)):t.e!=null?(o=t.e+s,(t.e<0||t.e>6)&&(l=!0)):o=s),r<1||r>Jr(n,s,i)?Ee(e)._overflowWeeks=!0:l!=null?Ee(e)._overflowWeekday=!0:(a=P1(n,r,o,s,i),e._a[Jt]=a.year,e._dayOfYear=a.dayOfYear)}te.ISO_8601=function(){};te.RFC_2822=function(){};function Qg(e){if(e._f===te.ISO_8601){A1(e);return}if(e._f===te.RFC_2822){I1(e);return}e._a=[],Ee(e).empty=!0;var t=""+e._i,n,r,o,s,i,a=t.length,l=0,u,d;for(o=y1(e._f,e._locale).match($g)||[],d=o.length,n=0;n<d;n++)s=o[n],r=(t.match(l2(s,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&Ee(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),l+=r.length),Ni[s]?(r?Ee(e).empty=!1:Ee(e).unusedTokens.push(s),u2(s,r,e)):e._strict&&!r&&Ee(e).unusedTokens.push(s);Ee(e).charsLeftOver=a-l,t.length>0&&Ee(e).unusedInput.push(t),e._a[Lt]<=12&&Ee(e).bigHour===!0&&e._a[Lt]>0&&(Ee(e).bigHour=void 0),Ee(e).parsedDateParts=e._a.slice(0),Ee(e).meridiem=e._meridiem,e._a[Lt]=_L(e._locale,e._a[Lt],e._meridiem),u=Ee(e).era,u!==null&&(e._a[Jt]=e._locale.erasConvertYear(u,e._a[Jt])),Xg(e),qg(e)}function _L(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function bL(e){var t,n,r,o,s,i,a=!1,l=e._f.length;if(l===0){Ee(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<l;o++)s=0,i=!1,t=Fg({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],Qg(t),Lg(t)&&(i=!0),s+=Ee(t).charsLeftOver,s+=Ee(t).unusedTokens.length*10,Ee(t).score=s,a?s<r&&(r=s,n=t):(r==null||s<r||i)&&(r=s,n=t,i&&(a=!0));Ao(e,n||t)}function CL(e){if(!e._d){var t=Vg(e._i),n=t.day===void 0?t.date:t.day;e._a=m1([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Xg(e)}}function kL(e){var t=new ec(qg(L1(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function L1(e){var t=e._i,n=e._f;return e._locale=e._locale||go(e._l),t===null||n===void 0&&t===""?Kd({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),fr(t)?new ec(qg(t)):(Jl(t)?e._d=t:dr(n)?bL(e):n?Qg(e):EL(e),Lg(e)||(e._d=null),e))}function EL(e){var t=e._i;mn(t)?e._d=new Date(te.now()):Jl(t)?e._d=new Date(t.valueOf()):typeof t=="string"?xL(e):dr(t)?(e._a=m1(t.slice(0),function(n){return parseInt(n,10)}),Xg(e)):Cs(t)?CL(e):lo(t)?e._d=new Date(t):te.createFromInputFallback(e)}function F1(e,t,n,r,o){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Cs(e)&&Ig(e)||dr(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,kL(s)}function dt(e,t,n,r){return F1(e,t,n,r,!1)}var TL=Bn("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Kd()}),RL=Bn("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Kd()});function U1(e,t){var n,r;if(t.length===1&&dr(t[0])&&(t=t[0]),!t.length)return dt();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function NL(){var e=[].slice.call(arguments,0);return U1("isBefore",e)}function PL(){var e=[].slice.call(arguments,0);return U1("isAfter",e)}var jL=function(){return Date.now?Date.now():+new Date},ba=["year","quarter","month","week","day","hour","minute","second","millisecond"];function DL(e){var t,n=!1,r,o=ba.length;for(t in e)if(We(e,t)&&!(Rt.call(ba,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<o;++r)if(e[ba[r]]){if(n)return!1;parseFloat(e[ba[r]])!==Ae(e[ba[r]])&&(n=!0)}return!0}function ML(){return this._isValid}function OL(){return mr(NaN)}function nf(e){var t=Vg(e),n=t.year||0,r=t.quarter||0,o=t.month||0,s=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=DL(t),this._milliseconds=+d+u*1e3+l*6e4+a*1e3*60*60,this._days=+i+s*7,this._months=+o+r*3+n*12,this._data={},this._locale=go(),this._bubble()}function du(e){return e instanceof nf}function jp(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function AL(e,t,n){var r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0,i;for(i=0;i<r;i++)Ae(e[i])!==Ae(t[i])&&s++;return s+o}function $1(e,t){he(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Pr(~~(n/60),2)+t+Pr(~~n%60,2)})}$1("Z",":");$1("ZZ","");ie("Z",Jd);ie("ZZ",Jd);nt(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Jg(Jd,e)});var IL=/([\+\-]|\d\d)/gi;function Jg(e,t){var n=(t||"").match(e),r,o,s;return n===null?null:(r=n[n.length-1]||[],o=(r+"").match(IL)||["-",0,0],s=+(o[1]*60)+Ae(o[2]),s===0?0:o[0]==="+"?s:-s)}function ev(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(fr(e)||Jl(e)?e.valueOf():dt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),te.updateOffset(n,!1),n):dt(e).local()}function Dp(e){return-Math.round(e._d.getTimezoneOffset())}te.updateOffset=function(){};function LL(e,t,n){var r=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Jg(Jd,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(o=Dp(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),r!==e&&(!t||this._changeInProgress?W1(this,mr(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,te.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Dp(this)}function FL(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function UL(e){return this.utcOffset(0,e)}function $L(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Dp(this),"m")),this}function VL(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Jg(i2,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function zL(e){return this.isValid()?(e=e?dt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function WL(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function YL(){if(!mn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Fg(e,this),e=L1(e),e._a?(t=e._isUTC?Mr(e._a):dt(e._a),this._isDSTShifted=this.isValid()&&AL(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function HL(){return this.isValid()?!this._isUTC:!1}function BL(){return this.isValid()?this._isUTC:!1}function V1(){return this.isValid()?this._isUTC&&this._offset===0:!1}var GL=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,KL=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mr(e,t){var n=e,r=null,o,s,i;return du(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:lo(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=GL.exec(e))?(o=r[1]==="-"?-1:1,n={y:0,d:Ae(r[Sr])*o,h:Ae(r[Lt])*o,m:Ae(r[rr])*o,s:Ae(r[Zr])*o,ms:Ae(jp(r[ws]*1e3))*o}):(r=KL.exec(e))?(o=r[1]==="-"?-1:1,n={y:us(r[2],o),M:us(r[3],o),w:us(r[4],o),d:us(r[5],o),h:us(r[6],o),m:us(r[7],o),s:us(r[8],o)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=ZL(dt(n.from),dt(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),s=new nf(n),du(e)&&We(e,"_locale")&&(s._locale=e._locale),du(e)&&We(e,"_isValid")&&(s._isValid=e._isValid),s}mr.fn=nf.prototype;mr.invalid=OL;function us(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kx(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function ZL(e,t){var n;return e.isValid()&&t.isValid()?(t=ev(t,e),e.isBefore(t)?n=Kx(e,t):(n=Kx(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function z1(e,t){return function(n,r){var o,s;return r!==null&&!isNaN(+r)&&(v1(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),o=mr(n,r),W1(this,o,e),this}}function W1(e,t,n,r){var o=t._milliseconds,s=jp(t._days),i=jp(t._months);e.isValid()&&(r=r??!0,i&&T1(e,yl(e,"Month")+i*n),s&&C1(e,"Date",yl(e,"Date")+s*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&te.updateOffset(e,s||i))}var qL=z1(1,"add"),XL=z1(-1,"subtract");function Y1(e){return typeof e=="string"||e instanceof String}function QL(e){return fr(e)||Jl(e)||Y1(e)||lo(e)||eF(e)||JL(e)||e===null||e===void 0}function JL(e){var t=Cs(e)&&!Ig(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,s,i=r.length;for(o=0;o<i;o+=1)s=r[o],n=n||We(e,s);return t&&n}function eF(e){var t=dr(e),n=!1;return t&&(n=e.filter(function(r){return!lo(r)&&Y1(e)}).length===0),t&&n}function tF(e){var t=Cs(e)&&!Ig(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,s;for(o=0;o<r.length;o+=1)s=r[o],n=n||We(e,s);return t&&n}function nF(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function rF(e,t){arguments.length===1&&(arguments[0]?QL(arguments[0])?(e=arguments[0],t=void 0):tF(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||dt(),r=ev(n,this).startOf("day"),o=te.calendarFormat(this,r)||"sameElse",s=t&&(Or(t[o])?t[o].call(this,n):t[o]);return this.format(s||this.localeData().calendar(o,this,dt(n)))}function oF(){return new ec(this)}function sF(e,t){var n=fr(e)?e:dt(e);return this.isValid()&&n.isValid()?(t=Gn(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function iF(e,t){var n=fr(e)?e:dt(e);return this.isValid()&&n.isValid()?(t=Gn(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function aF(e,t,n,r){var o=fr(e)?e:dt(e),s=fr(t)?t:dt(t);return this.isValid()&&o.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(o,n):!this.isBefore(o,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function lF(e,t){var n=fr(e)?e:dt(e),r;return this.isValid()&&n.isValid()?(t=Gn(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function cF(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function uF(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function dF(e,t,n){var r,o,s;if(!this.isValid())return NaN;if(r=ev(e,this),!r.isValid())return NaN;switch(o=(r.utcOffset()-this.utcOffset())*6e4,t=Gn(t),t){case"year":s=fu(this,r)/12;break;case"month":s=fu(this,r);break;case"quarter":s=fu(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-o)/864e5;break;case"week":s=(this-r-o)/6048e5;break;default:s=this-r}return n?s:$n(s)}function fu(e,t){if(e.date()<t.date())return-fu(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),o,s;return t-r<0?(o=e.clone().add(n-1,"months"),s=(t-r)/(r-o)):(o=e.clone().add(n+1,"months"),s=(t-r)/(o-r)),-(n+s)||0}te.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";te.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function fF(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function hF(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?uu(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Or(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",uu(n,"Z")):uu(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function pF(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,o,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+o+s)}function mF(e){e||(e=this.isUtc()?te.defaultFormatUtc:te.defaultFormat);var t=uu(this,e);return this.localeData().postformat(t)}function gF(e,t){return this.isValid()&&(fr(e)&&e.isValid()||dt(e).isValid())?mr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function vF(e){return this.from(dt(),e)}function yF(e,t){return this.isValid()&&(fr(e)&&e.isValid()||dt(e).isValid())?mr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function xF(e){return this.to(dt(),e)}function H1(e){var t;return e===void 0?this._locale._abbr:(t=go(e),t!=null&&(this._locale=t),this)}var B1=Bn("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function G1(){return this._locale}var Qu=1e3,Pi=60*Qu,Ju=60*Pi,K1=(365*400+97)*24*Ju;function ji(e,t){return(e%t+t)%t}function Z1(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-K1:new Date(e,t,n).valueOf()}function q1(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-K1:Date.UTC(e,t,n)}function wF(e){var t,n;if(e=Gn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?q1:Z1,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ji(t+(this._isUTC?0:this.utcOffset()*Pi),Ju);break;case"minute":t=this._d.valueOf(),t-=ji(t,Pi);break;case"second":t=this._d.valueOf(),t-=ji(t,Qu);break}return this._d.setTime(t),te.updateOffset(this,!0),this}function SF(e){var t,n;if(e=Gn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?q1:Z1,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ju-ji(t+(this._isUTC?0:this.utcOffset()*Pi),Ju)-1;break;case"minute":t=this._d.valueOf(),t+=Pi-ji(t,Pi)-1;break;case"second":t=this._d.valueOf(),t+=Qu-ji(t,Qu)-1;break}return this._d.setTime(t),te.updateOffset(this,!0),this}function _F(){return this._d.valueOf()-(this._offset||0)*6e4}function bF(){return Math.floor(this.valueOf()/1e3)}function CF(){return new Date(this.valueOf())}function kF(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function EF(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function TF(){return this.isValid()?this.toISOString():null}function RF(){return Lg(this)}function NF(){return Ao({},Ee(this))}function PF(){return Ee(this).overflow}function jF(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}he("N",0,0,"eraAbbr");he("NN",0,0,"eraAbbr");he("NNN",0,0,"eraAbbr");he("NNNN",0,0,"eraName");he("NNNNN",0,0,"eraNarrow");he("y",["y",1],"yo","eraYear");he("y",["yy",2],0,"eraYear");he("y",["yyy",3],0,"eraYear");he("y",["yyyy",4],0,"eraYear");ie("N",tv);ie("NN",tv);ie("NNN",tv);ie("NNNN",zF);ie("NNNNN",WF);nt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?Ee(n).era=o:Ee(n).invalidEra=e});ie("y",ra);ie("yy",ra);ie("yyy",ra);ie("yyyy",ra);ie("yo",YF);nt(["y","yy","yyy","yyyy"],Jt);nt(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Jt]=n._locale.eraYearOrdinalParse(e,o):t[Jt]=parseInt(e,10)});function DF(e,t){var n,r,o,s=this._eras||go("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":o=te(s[n].since).startOf("day"),s[n].since=o.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":o=te(s[n].until).startOf("day").valueOf(),s[n].until=o.valueOf();break}}return s}function MF(e,t,n){var r,o,s=this.eras(),i,a,l;for(e=e.toUpperCase(),r=0,o=s.length;r<o;++r)if(i=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),l=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return s[r];break;case"NNNN":if(i===e)return s[r];break;case"NNNNN":if(l===e)return s[r];break}else if([i,a,l].indexOf(e)>=0)return s[r]}function OF(e,t){var n=e.since<=e.until?1:-1;return t===void 0?te(e.since).year():te(e.since).year()+(t-e.offset)*n}function AF(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function IF(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function LF(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function FF(){var e,t,n,r,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,r=this.clone().startOf("day").valueOf(),o[e].since<=r&&r<=o[e].until||o[e].until<=r&&r<=o[e].since)return(this.year()-te(o[e].since).year())*n+o[e].offset;return this.year()}function UF(e){return We(this,"_erasNameRegex")||nv.call(this),e?this._erasNameRegex:this._erasRegex}function $F(e){return We(this,"_erasAbbrRegex")||nv.call(this),e?this._erasAbbrRegex:this._erasRegex}function VF(e){return We(this,"_erasNarrowRegex")||nv.call(this),e?this._erasNarrowRegex:this._erasRegex}function tv(e,t){return t.erasAbbrRegex(e)}function zF(e,t){return t.erasNameRegex(e)}function WF(e,t){return t.erasNarrowRegex(e)}function YF(e,t){return t._eraYearOrdinalRegex||ra}function nv(){var e=[],t=[],n=[],r=[],o,s,i,a,l,u=this.eras();for(o=0,s=u.length;o<s;++o)i=Qr(u[o].name),a=Qr(u[o].abbr),l=Qr(u[o].narrow),t.push(i),e.push(a),n.push(l),r.push(i),r.push(a),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}he(0,["gg",2],0,function(){return this.weekYear()%100});he(0,["GG",2],0,function(){return this.isoWeekYear()%100});function rf(e,t){he(0,[e,e.length],0,t)}rf("gggg","weekYear");rf("ggggg","weekYear");rf("GGGG","isoWeekYear");rf("GGGGG","isoWeekYear");ie("G",Qd);ie("g",Qd);ie("GG",ft,Ln);ie("gg",ft,Ln);ie("GGGG",Wg,zg);ie("gggg",Wg,zg);ie("GGGGG",Xd,Zd);ie("ggggg",Xd,Zd);nc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Ae(e)});nc(["gg","GG"],function(e,t,n,r){t[r]=te.parseTwoDigitYear(e)});function HF(e){return X1.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function BF(e){return X1.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function GF(){return Jr(this.year(),1,4)}function KF(){return Jr(this.isoWeekYear(),1,4)}function ZF(){var e=this.localeData()._week;return Jr(this.year(),e.dow,e.doy)}function qF(){var e=this.localeData()._week;return Jr(this.weekYear(),e.dow,e.doy)}function X1(e,t,n,r,o){var s;return e==null?wl(this,r,o).year:(s=Jr(e,r,o),t>s&&(t=s),XF.call(this,e,t,n,r,o))}function XF(e,t,n,r,o){var s=P1(e,t,n,r,o),i=xl(s.year,0,s.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}he("Q",0,"Qo","quarter");ie("Q",x1);nt("Q",function(e,t){t[Kr]=(Ae(e)-1)*3});function QF(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}he("D",["DD",2],"Do","date");ie("D",ft,oa);ie("DD",ft,Ln);ie("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});nt(["D","DD"],Sr);nt("Do",function(e,t){t[Sr]=Ae(e.match(ft)[0])});var Q1=sa("Date",!0);he("DDD",["DDDD",3],"DDDo","dayOfYear");ie("DDD",qd);ie("DDDD",w1);nt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Ae(e)});function JF(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}he("m",["mm",2],0,"minute");ie("m",ft,Yg);ie("mm",ft,Ln);nt(["m","mm"],rr);var e4=sa("Minutes",!1);he("s",["ss",2],0,"second");ie("s",ft,Yg);ie("ss",ft,Ln);nt(["s","ss"],Zr);var t4=sa("Seconds",!1);he("S",0,0,function(){return~~(this.millisecond()/100)});he(0,["SS",2],0,function(){return~~(this.millisecond()/10)});he(0,["SSS",3],0,"millisecond");he(0,["SSSS",4],0,function(){return this.millisecond()*10});he(0,["SSSSS",5],0,function(){return this.millisecond()*100});he(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});he(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});he(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});he(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});ie("S",qd,x1);ie("SS",qd,Ln);ie("SSS",qd,w1);var Io,J1;for(Io="SSSS";Io.length<=9;Io+="S")ie(Io,ra);function n4(e,t){t[ws]=Ae(("0."+e)*1e3)}for(Io="S";Io.length<=9;Io+="S")nt(Io,n4);J1=sa("Milliseconds",!1);he("z",0,0,"zoneAbbr");he("zz",0,0,"zoneName");function r4(){return this._isUTC?"UTC":""}function o4(){return this._isUTC?"Coordinated Universal Time":""}var z=ec.prototype;z.add=qL;z.calendar=rF;z.clone=oF;z.diff=dF;z.endOf=SF;z.format=mF;z.from=gF;z.fromNow=vF;z.to=yF;z.toNow=xF;z.get=p2;z.invalidAt=PF;z.isAfter=sF;z.isBefore=iF;z.isBetween=aF;z.isSame=lF;z.isSameOrAfter=cF;z.isSameOrBefore=uF;z.isValid=RF;z.lang=B1;z.locale=H1;z.localeData=G1;z.max=RL;z.min=TL;z.parsingFlags=NF;z.set=m2;z.startOf=wF;z.subtract=XL;z.toArray=kF;z.toObject=EF;z.toDate=CF;z.toISOString=hF;z.inspect=pF;typeof Symbol<"u"&&Symbol.for!=null&&(z[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});z.toJSON=TF;z.toString=fF;z.unix=bF;z.valueOf=_F;z.creationData=jF;z.eraName=AF;z.eraNarrow=IF;z.eraAbbr=LF;z.eraYear=FF;z.year=b1;z.isLeapYear=h2;z.weekYear=HF;z.isoWeekYear=BF;z.quarter=z.quarters=QF;z.month=R1;z.daysInMonth=C2;z.week=z.weeks=D2;z.isoWeek=z.isoWeeks=M2;z.weeksInYear=ZF;z.weeksInWeekYear=qF;z.isoWeeksInYear=GF;z.isoWeeksInISOWeekYear=KF;z.date=Q1;z.day=z.days=B2;z.weekday=G2;z.isoWeekday=K2;z.dayOfYear=JF;z.hour=z.hours=tL;z.minute=z.minutes=e4;z.second=z.seconds=t4;z.millisecond=z.milliseconds=J1;z.utcOffset=LL;z.utc=UL;z.local=$L;z.parseZone=VL;z.hasAlignedHourOffset=zL;z.isDST=WL;z.isLocal=HL;z.isUtcOffset=BL;z.isUtc=V1;z.isUTC=V1;z.zoneAbbr=r4;z.zoneName=o4;z.dates=Bn("dates accessor is deprecated. Use date instead.",Q1);z.months=Bn("months accessor is deprecated. Use month instead",R1);z.years=Bn("years accessor is deprecated. Use year instead",b1);z.zone=Bn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",FL);z.isDSTShifted=Bn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",YL);function s4(e){return dt(e*1e3)}function i4(){return dt.apply(null,arguments).parseZone()}function eC(e){return e}var Ye=Ug.prototype;Ye.calendar=HI;Ye.longDateFormat=ZI;Ye.invalidDate=XI;Ye.ordinal=e2;Ye.preparse=eC;Ye.postformat=eC;Ye.relativeTime=n2;Ye.pastFuture=r2;Ye.set=WI;Ye.eras=DF;Ye.erasParse=MF;Ye.erasConvertYear=OF;Ye.erasAbbrRegex=$F;Ye.erasNameRegex=UF;Ye.erasNarrowRegex=VF;Ye.months=w2;Ye.monthsShort=S2;Ye.monthsParse=b2;Ye.monthsRegex=E2;Ye.monthsShortRegex=k2;Ye.week=R2;Ye.firstDayOfYear=j2;Ye.firstDayOfWeek=P2;Ye.weekdays=V2;Ye.weekdaysMin=W2;Ye.weekdaysShort=z2;Ye.weekdaysParse=H2;Ye.weekdaysRegex=Z2;Ye.weekdaysShortRegex=q2;Ye.weekdaysMinRegex=X2;Ye.isPM=J2;Ye.meridiem=nL;function ed(e,t,n,r){var o=go(),s=Mr().set(r,t);return o[n](s,e)}function tC(e,t,n){if(lo(e)&&(t=e,e=void 0),e=e||"",t!=null)return ed(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=ed(e,r,n,"month");return o}function rv(e,t,n,r){typeof e=="boolean"?(lo(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,lo(t)&&(n=t,t=void 0),t=t||"");var o=go(),s=e?o._week.dow:0,i,a=[];if(n!=null)return ed(t,(n+s)%7,r,"day");for(i=0;i<7;i++)a[i]=ed(t,(i+s)%7,r,"day");return a}function a4(e,t){return tC(e,t,"months")}function l4(e,t){return tC(e,t,"monthsShort")}function c4(e,t,n){return rv(e,t,n,"weekdays")}function u4(e,t,n){return rv(e,t,n,"weekdaysShort")}function d4(e,t,n){return rv(e,t,n,"weekdaysMin")}Bo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Ae(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});te.lang=Bn("moment.lang is deprecated. Use moment.locale instead.",Bo);te.langData=Bn("moment.langData is deprecated. Use moment.localeData instead.",go);var Fr=Math.abs;function f4(){var e=this._data;return this._milliseconds=Fr(this._milliseconds),this._days=Fr(this._days),this._months=Fr(this._months),e.milliseconds=Fr(e.milliseconds),e.seconds=Fr(e.seconds),e.minutes=Fr(e.minutes),e.hours=Fr(e.hours),e.months=Fr(e.months),e.years=Fr(e.years),this}function nC(e,t,n,r){var o=mr(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function h4(e,t){return nC(this,e,t,1)}function p4(e,t){return nC(this,e,t,-1)}function Zx(e){return e<0?Math.floor(e):Math.ceil(e)}function m4(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,o,s,i,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Zx(Mp(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,o=$n(e/1e3),r.seconds=o%60,s=$n(o/60),r.minutes=s%60,i=$n(s/60),r.hours=i%24,t+=$n(i/24),l=$n(rC(t)),n+=l,t-=Zx(Mp(l)),a=$n(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function rC(e){return e*4800/146097}function Mp(e){return e*146097/4800}function g4(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Gn(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+rC(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Mp(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function vo(e){return function(){return this.as(e)}}var oC=vo("ms"),v4=vo("s"),y4=vo("m"),x4=vo("h"),w4=vo("d"),S4=vo("w"),_4=vo("M"),b4=vo("Q"),C4=vo("y"),k4=oC;function E4(){return mr(this)}function T4(e){return e=Gn(e),this.isValid()?this[e+"s"]():NaN}function Ys(e){return function(){return this.isValid()?this._data[e]:NaN}}var R4=Ys("milliseconds"),N4=Ys("seconds"),P4=Ys("minutes"),j4=Ys("hours"),D4=Ys("days"),M4=Ys("months"),O4=Ys("years");function A4(){return $n(this.days()/7)}var Wr=Math.round,vi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function I4(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function L4(e,t,n,r){var o=mr(e).abs(),s=Wr(o.as("s")),i=Wr(o.as("m")),a=Wr(o.as("h")),l=Wr(o.as("d")),u=Wr(o.as("M")),d=Wr(o.as("w")),f=Wr(o.as("y")),p=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||i<=1&&["m"]||i<n.m&&["mm",i]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(p=p||d<=1&&["w"]||d<n.w&&["ww",d]),p=p||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],p[2]=t,p[3]=+e>0,p[4]=r,I4.apply(null,p)}function F4(e){return e===void 0?Wr:typeof e=="function"?(Wr=e,!0):!1}function U4(e,t){return vi[e]===void 0?!1:t===void 0?vi[e]:(vi[e]=t,e==="s"&&(vi.ss=t-1),!0)}function $4(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=vi,o,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},vi,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),o=this.localeData(),s=L4(this,!n,r,o),n&&(s=o.pastFuture(+this,s)),o.postformat(s)}var hh=Math.abs;function ei(e){return(e>0)-(e<0)||+e}function of(){if(!this.isValid())return this.localeData().invalidDate();var e=hh(this._milliseconds)/1e3,t=hh(this._days),n=hh(this._months),r,o,s,i,a=this.asSeconds(),l,u,d,f;return a?(r=$n(e/60),o=$n(r/60),e%=60,r%=60,s=$n(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=ei(this._months)!==ei(a)?"-":"",d=ei(this._days)!==ei(a)?"-":"",f=ei(this._milliseconds)!==ei(a)?"-":"",l+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(o||r||e?"T":"")+(o?f+o+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var Fe=nf.prototype;Fe.isValid=ML;Fe.abs=f4;Fe.add=h4;Fe.subtract=p4;Fe.as=g4;Fe.asMilliseconds=oC;Fe.asSeconds=v4;Fe.asMinutes=y4;Fe.asHours=x4;Fe.asDays=w4;Fe.asWeeks=S4;Fe.asMonths=_4;Fe.asQuarters=b4;Fe.asYears=C4;Fe.valueOf=k4;Fe._bubble=m4;Fe.clone=E4;Fe.get=T4;Fe.milliseconds=R4;Fe.seconds=N4;Fe.minutes=P4;Fe.hours=j4;Fe.days=D4;Fe.weeks=A4;Fe.months=M4;Fe.years=O4;Fe.humanize=$4;Fe.toISOString=of;Fe.toString=of;Fe.toJSON=of;Fe.locale=H1;Fe.localeData=G1;Fe.toIsoString=Bn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",of);Fe.lang=B1;he("X",0,0,"unix");he("x",0,0,"valueOf");ie("x",Qd);ie("X",a2);nt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});nt("x",function(e,t,n){n._d=new Date(Ae(e))});//! moment.js
te.version="2.30.1";VI(dt);te.fn=z;te.min=NL;te.max=PL;te.now=jL;te.utc=Mr;te.unix=s4;te.months=a4;te.isDate=Jl;te.locale=Bo;te.invalid=Kd;te.duration=mr;te.isMoment=fr;te.weekdays=c4;te.parseZone=i4;te.localeData=go;te.isDuration=du;te.monthsShort=l4;te.weekdaysMin=d4;te.defineLocale=Zg;te.updateLocale=iL;te.locales=aL;te.weekdaysShort=u4;te.normalizeUnits=Gn;te.relativeTimeRounding=F4;te.relativeTimeThreshold=U4;te.calendarFormat=nF;te.prototype=z;te.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const V4=async()=>await Vt().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),ov=async e=>e.id?await Vt().collection("access").update(e.id,e):await Vt().collection("access").create(e),z4=async e=>(e.deleted=te.utc().format("YYYY-MM-DD HH:mm:ss"),await Vt().collection("access").update(e.id,e)),W4=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};default:return e}},sC=h.createContext({}),rc=()=>h.useContext(sC),Y4=({children:e})=>{const[t,n]=h.useReducer(W4,{accesses:[]});h.useEffect(()=>{(async()=>{const a=await V4();n({type:"SET_ACCESSES",payload:a})})()},[]);const r=h.useCallback(i=>{n({type:"DELETE_ACCESS",payload:i})},[]),o=h.useCallback(i=>{n({type:"ADD_ACCESS",payload:i})},[]),s=h.useCallback(i=>{n({type:"UPDATE_ACCESS",payload:i})},[]);return c.jsx(sC.Provider,{value:{config:{accesses:t.accesses},deleteAccess:r,addAccess:o,updateAccess:s},children:e&&e})};function H4(){const e=as(),t=is();if(!Vt().authStore.isValid||!Vt().authStore.isAdmin)return c.jsx(BS,{to:"/login"});const n=t.pathname,r=s=>(console.log(n),s==n?"bg-muted text-primary":"text-muted-foreground"),o=()=>{Vt().authStore.clear(),e("/login")};return c.jsx(c.Fragment,{children:c.jsx(Y4,{children:c.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]",children:[c.jsx("div",{className:"hidden border-r bg-muted/40 md:block",children:c.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[c.jsx("div",{className:"flex h-14 items-center border-b px-4 lg:h-[60px] lg:px-6",children:c.jsxs($r,{to:"/",className:"flex items-center gap-2 font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"",children:"Certimate"})]})}),c.jsx("div",{className:"flex-1",children:c.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[c.jsxs($r,{to:"/",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/")),children:[c.jsx(vp,{className:"h-4 w-4"}),"域名列表"]}),c.jsxs($r,{to:"/access",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/access")),children:[c.jsx(px,{className:"h-4 w-4"}),"授权管理"]}),c.jsxs($r,{to:"/history",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/history")),children:[c.jsx(fx,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),c.jsxs("div",{className:"flex flex-col",children:[c.jsxs("header",{className:"flex h-14 items-center gap-4 border-b bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[c.jsxs(s1,{children:[c.jsx(i1,{asChild:!0,children:c.jsxs(Dt,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[c.jsx(Uj,{className:"h-5 w-5"}),c.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),c.jsx(Og,{side:"left",className:"flex flex-col",children:c.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[c.jsxs($r,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"",children:"Certimate"}),c.jsx("span",{className:"sr-only",children:"Certimate"})]}),c.jsxs($r,{to:"/",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/")),children:[c.jsx(vp,{className:"h-5 w-5"}),"域名列表"]}),c.jsxs($r,{to:"/access",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/dns_provider")),children:[c.jsx(px,{className:"h-5 w-5"}),"授权管理"]}),c.jsxs($r,{to:"/history",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/history")),children:[c.jsx(fx,{className:"h-5 w-5"}),"部署历史"]})]})})]}),c.jsx("div",{className:"w-full flex-1"}),c.jsxs(iI,{children:[c.jsx(aI,{asChild:!0,children:c.jsxs(Dt,{variant:"secondary",size:"icon",className:"rounded-full",children:[c.jsx(Lj,{className:"h-5 w-5"}),c.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),c.jsxs(Fb,{align:"end",children:[c.jsx($b,{children:"My Account"}),c.jsx(Vb,{}),c.jsx(Ub,{onClick:o,children:"Logout"})]})]})]}),c.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[c.jsx(GS,{}),c.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[c.jsx("div",{className:""}),c.jsx("div",{className:"text-muted-foreground text-sm hover:text-stone-900",children:c.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:"Certimate v0.0.2"})})]})]})]})]})})})}var B4="Separator",qx="horizontal",G4=["horizontal","vertical"],iC=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=qx,...o}=e,s=K4(r)?r:qx,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return c.jsx(ve.div,{"data-orientation":s,...a,...o,ref:t})});iC.displayName=B4;function K4(e){return G4.includes(e)}var aC=iC;const Ht=h.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>c.jsx(aC,{ref:o,decorative:n,orientation:t,className:se("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ht.displayName=aC.displayName;const lC=({phase:e,phaseSuccess:t})=>{let n=c.jsx(c.Fragment,{children:" "});return e==="check"&&(t?n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Ht,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Ht,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),c.jsx(Ht,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Ht,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Ht,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Ht,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Ht,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),c.jsx(Ht,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Ht,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Ht,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Ht,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Ht,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),n},Z4=({when:e,children:t,fallback:n})=>e?t:n;var cC="AlertDialog",[q4,i3]=_n(cC,[Wb]),yo=Wb(),uC=e=>{const{__scopeAlertDialog:t,...n}=e,r=yo(t);return c.jsx(jg,{...r,...n,modal:!0})};uC.displayName=cC;var X4="AlertDialogTrigger",dC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=yo(n);return c.jsx(Dg,{...o,...r,ref:t})});dC.displayName=X4;var Q4="AlertDialogPortal",fC=e=>{const{__scopeAlertDialog:t,...n}=e,r=yo(t);return c.jsx(Mg,{...r,...n})};fC.displayName=Q4;var J4="AlertDialogOverlay",hC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=yo(n);return c.jsx(Zl,{...o,...r,ref:t})});hC.displayName=J4;var Di="AlertDialogContent",[eU,tU]=q4(Di),pC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=yo(n),i=h.useRef(null),a=be(t,i),l=h.useRef(null);return c.jsx(vI,{contentName:Di,titleName:mC,docsSlug:"alert-dialog",children:c.jsx(eU,{scope:n,cancelRef:l,children:c.jsxs(ql,{role:"alertdialog",...s,...o,ref:a,onOpenAutoFocus:G(o.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(eg,{children:r}),c.jsx(rU,{contentRef:i})]})})})});pC.displayName=Di;var mC="AlertDialogTitle",gC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=yo(n);return c.jsx(Xl,{...o,...r,ref:t})});gC.displayName=mC;var vC="AlertDialogDescription",yC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=yo(n);return c.jsx(Ql,{...o,...r,ref:t})});yC.displayName=vC;var nU="AlertDialogAction",xC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=yo(n);return c.jsx(Gd,{...o,...r,ref:t})});xC.displayName=nU;var wC="AlertDialogCancel",SC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=tU(wC,n),s=yo(n),i=be(t,o);return c.jsx(Gd,{...s,...r,ref:i})});SC.displayName=wC;var rU=({contentRef:e})=>{const t=`\`${Di}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${Di}\` by passing a \`${vC}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Di}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return h.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},oU=uC,sU=dC,iU=fC,_C=hC,bC=pC,CC=xC,kC=SC,EC=gC,TC=yC;const aU=oU,lU=sU,cU=iU,RC=h.forwardRef(({className:e,...t},n)=>c.jsx(_C,{className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));RC.displayName=_C.displayName;const NC=h.forwardRef(({className:e,...t},n)=>c.jsxs(cU,{children:[c.jsx(RC,{}),c.jsx(bC,{ref:n,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));NC.displayName=bC.displayName;const PC=({className:e,...t})=>c.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});PC.displayName="AlertDialogHeader";const jC=({className:e,...t})=>c.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});jC.displayName="AlertDialogFooter";const DC=h.forwardRef(({className:e,...t},n)=>c.jsx(EC,{ref:n,className:se("text-lg font-semibold",e),...t}));DC.displayName=EC.displayName;const MC=h.forwardRef(({className:e,...t},n)=>c.jsx(TC,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));MC.displayName=TC.displayName;const OC=h.forwardRef(({className:e,...t},n)=>c.jsx(CC,{ref:n,className:se(ng(),e),...t}));OC.displayName=CC.displayName;const AC=h.forwardRef(({className:e,...t},n)=>c.jsx(kC,{ref:n,className:se(ng({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));AC.displayName=kC.displayName;function sv(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var iv="Switch",[uU,a3]=_n(iv),[dU,fU]=uU(iv),IC=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l="on",onCheckedChange:u,...d}=e,[f,p]=h.useState(null),x=be(t,m=>p(m)),g=h.useRef(!1),y=f?!!f.closest("form"):!0,[S=!1,v]=so({prop:o,defaultProp:s,onChange:u});return c.jsxs(dU,{scope:n,checked:S,disabled:a,children:[c.jsx(ve.button,{type:"button",role:"switch","aria-checked":S,"aria-required":i,"data-state":UC(S),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:x,onClick:G(e.onClick,m=>{v(w=>!w),y&&(g.current=m.isPropagationStopped(),g.current||m.stopPropagation())})}),y&&c.jsx(hU,{control:f,bubbles:!g.current,name:r,value:l,checked:S,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});IC.displayName=iv;var LC="SwitchThumb",FC=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=fU(LC,n);return c.jsx(ve.span,{"data-state":UC(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});FC.displayName=LC;var hU=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,s=h.useRef(null),i=sv(n),a=dg(t);return h.useEffect(()=>{const l=s.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const p=new Event("click",{bubbles:r});f.call(l,n),l.dispatchEvent(p)}},[i,n,r]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function UC(e){return e?"checked":"unchecked"}var $C=IC,pU=FC;const VC=h.forwardRef(({className:e,...t},n)=>c.jsx($C,{className:se("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:c.jsx(pU,{className:se("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));VC.displayName=$C.displayName;var mU="VisuallyHidden",oc=h.forwardRef((e,t)=>c.jsx(ve.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));oc.displayName=mU;var gU=oc,av="ToastProvider",[lv,vU,yU]=Ld("Toast"),[zC,l3]=_n("Toast",[yU]),[xU,sf]=zC(av),WC=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=h.useState(null),[u,d]=h.useState(0),f=h.useRef(!1),p=h.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${av}\`. Expected non-empty \`string\`.`),c.jsx(lv.Provider,{scope:t,children:c.jsx(xU,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:h.useCallback(()=>d(x=>x+1),[]),onToastRemove:h.useCallback(()=>d(x=>x-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:i})})};WC.displayName=av;var YC="ToastViewport",wU=["F8"],Op="toast.viewportPause",Ap="toast.viewportResume",HC=h.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=wU,label:o="Notifications ({hotkey})",...s}=e,i=sf(YC,n),a=vU(n),l=h.useRef(null),u=h.useRef(null),d=h.useRef(null),f=h.useRef(null),p=be(t,f,i.onViewportChange),x=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;h.useEffect(()=>{const S=v=>{var w;r.every(b=>v[b]||v.code===b)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[r]),h.useEffect(()=>{const S=l.current,v=f.current;if(g&&S&&v){const m=()=>{if(!i.isClosePausedRef.current){const _=new CustomEvent(Op);v.dispatchEvent(_),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const _=new CustomEvent(Ap);v.dispatchEvent(_),i.isClosePausedRef.current=!1}},b=_=>{!S.contains(_.relatedTarget)&&w()},C=()=>{S.contains(document.activeElement)||w()};return S.addEventListener("focusin",m),S.addEventListener("focusout",b),S.addEventListener("pointermove",m),S.addEventListener("pointerleave",C),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{S.removeEventListener("focusin",m),S.removeEventListener("focusout",b),S.removeEventListener("pointermove",m),S.removeEventListener("pointerleave",C),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[g,i.isClosePausedRef]);const y=h.useCallback(({tabbingDirection:S})=>{const m=a().map(w=>{const b=w.ref.current,C=[b,...MU(b)];return S==="forwards"?C:C.reverse()});return(S==="forwards"?m.reverse():m).flat()},[a]);return h.useEffect(()=>{const S=f.current;if(S){const v=m=>{var C,_,R;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const N=document.activeElement,D=m.shiftKey;if(m.target===S&&D){(C=u.current)==null||C.focus();return}const A=y({tabbingDirection:D?"backwards":"forwards"}),H=A.findIndex(L=>L===N);ph(A.slice(H+1))?m.preventDefault():D?(_=u.current)==null||_.focus():(R=d.current)==null||R.focus()}};return S.addEventListener("keydown",v),()=>S.removeEventListener("keydown",v)}},[a,y]),c.jsxs(FD,{ref:l,role:"region","aria-label":o.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&c.jsx(Ip,{ref:u,onFocusFromOutsideViewport:()=>{const S=y({tabbingDirection:"forwards"});ph(S)}}),c.jsx(lv.Slot,{scope:n,children:c.jsx(ve.ol,{tabIndex:-1,...s,ref:p})}),g&&c.jsx(Ip,{ref:d,onFocusFromOutsideViewport:()=>{const S=y({tabbingDirection:"backwards"});ph(S)}})]})});HC.displayName=YC;var BC="ToastFocusProxy",Ip=h.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=sf(BC,n);return c.jsx(oc,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});Ip.displayName=BC;var af="Toast",SU="toast.swipeStart",_U="toast.swipeMove",bU="toast.swipeCancel",CU="toast.swipeEnd",GC=h.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=so({prop:r,defaultProp:o,onChange:s});return c.jsx(fn,{present:n||a,children:c.jsx(TU,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:_t(e.onPause),onResume:_t(e.onResume),onSwipeStart:G(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:G(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:G(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:G(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});GC.displayName=af;var[kU,EU]=zC(af,{onClose(){}}),TU=h.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:x,...g}=e,y=sf(af,n),[S,v]=h.useState(null),m=be(t,L=>v(L)),w=h.useRef(null),b=h.useRef(null),C=o||y.duration,_=h.useRef(0),R=h.useRef(C),N=h.useRef(0),{onToastAdd:D,onToastRemove:O}=y,B=_t(()=>{var K;(S==null?void 0:S.contains(document.activeElement))&&((K=y.viewport)==null||K.focus()),i()}),A=h.useCallback(L=>{!L||L===1/0||(window.clearTimeout(N.current),_.current=new Date().getTime(),N.current=window.setTimeout(B,L))},[B]);h.useEffect(()=>{const L=y.viewport;if(L){const K=()=>{A(R.current),u==null||u()},ne=()=>{const W=new Date().getTime()-_.current;R.current=R.current-W,window.clearTimeout(N.current),l==null||l()};return L.addEventListener(Op,ne),L.addEventListener(Ap,K),()=>{L.removeEventListener(Op,ne),L.removeEventListener(Ap,K)}}},[y.viewport,C,l,u,A]),h.useEffect(()=>{s&&!y.isClosePausedRef.current&&A(C)},[s,C,y.isClosePausedRef,A]),h.useEffect(()=>(D(),()=>O()),[D,O]);const H=h.useMemo(()=>S?ek(S):null,[S]);return y.viewport?c.jsxs(c.Fragment,{children:[H&&c.jsx(RU,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),c.jsx(kU,{scope:n,onClose:B,children:fo.createPortal(c.jsx(lv.ItemSlot,{scope:n,children:c.jsx(LD,{asChild:!0,onEscapeKeyDown:G(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||B(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(ve.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":y.swipeDirection,...g,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:G(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:G(e.onPointerDown,L=>{L.button===0&&(w.current={x:L.clientX,y:L.clientY})}),onPointerMove:G(e.onPointerMove,L=>{if(!w.current)return;const K=L.clientX-w.current.x,ne=L.clientY-w.current.y,W=!!b.current,F=["left","right"].includes(y.swipeDirection),M=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,X=F?M(0,K):0,le=F?0:M(0,ne),me=L.pointerType==="touch"?10:2,rt={x:X,y:le},je={originalEvent:L,delta:rt};W?(b.current=rt,Bc(_U,f,je,{discrete:!1})):Xx(rt,y.swipeDirection,me)?(b.current=rt,Bc(SU,d,je,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(K)>me||Math.abs(ne)>me)&&(w.current=null)}),onPointerUp:G(e.onPointerUp,L=>{const K=b.current,ne=L.target;if(ne.hasPointerCapture(L.pointerId)&&ne.releasePointerCapture(L.pointerId),b.current=null,w.current=null,K){const W=L.currentTarget,F={originalEvent:L,delta:K};Xx(K,y.swipeDirection,y.swipeThreshold)?Bc(CU,x,F,{discrete:!0}):Bc(bU,p,F,{discrete:!0}),W.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),RU=e=>{const{__scopeToast:t,children:n,...r}=e,o=sf(af,t),[s,i]=h.useState(!1),[a,l]=h.useState(!1);return jU(()=>i(!0)),h.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(Bl,{asChild:!0,children:c.jsx(oc,{...r,children:s&&c.jsxs(c.Fragment,{children:[o.label," ",n]})})})},NU="ToastTitle",KC=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(ve.div,{...r,ref:t})});KC.displayName=NU;var PU="ToastDescription",ZC=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(ve.div,{...r,ref:t})});ZC.displayName=PU;var qC="ToastAction",XC=h.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsx(JC,{altText:n,asChild:!0,children:c.jsx(cv,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${qC}\`. Expected non-empty \`string\`.`),null)});XC.displayName=qC;var QC="ToastClose",cv=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=EU(QC,n);return c.jsx(JC,{asChild:!0,children:c.jsx(ve.button,{type:"button",...r,ref:t,onClick:G(e.onClick,o.onClose)})})});cv.displayName=QC;var JC=h.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return c.jsx(ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function ek(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),DU(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...ek(r))}}),t}function Bc(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?rg(o,s):o.dispatchEvent(s)}var Xx=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function jU(e=()=>{}){const t=_t(e);Kt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function DU(e){return e.nodeType===e.ELEMENT_NODE}function MU(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 ph(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var OU=WC,tk=HC,nk=GC,rk=KC,ok=ZC,sk=XC,ik=cv;const AU=OU,ak=h.forwardRef(({className:e,...t},n)=>c.jsx(tk,{ref:n,className:se("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));ak.displayName=tk.displayName;const IU=Wl("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),lk=h.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(nk,{ref:r,className:se(IU({variant:t}),e),...n}));lk.displayName=nk.displayName;const LU=h.forwardRef(({className:e,...t},n)=>c.jsx(sk,{ref:n,className:se("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));LU.displayName=sk.displayName;const ck=h.forwardRef(({className:e,...t},n)=>c.jsx(ik,{ref:n,className:se("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(Jm,{className:"h-4 w-4"})}));ck.displayName=ik.displayName;const uk=h.forwardRef(({className:e,...t},n)=>c.jsx(rk,{ref:n,className:se("text-sm font-semibold",e),...t}));uk.displayName=rk.displayName;const dk=h.forwardRef(({className:e,...t},n)=>c.jsx(ok,{ref:n,className:se("text-sm opacity-90",e),...t}));dk.displayName=ok.displayName;const FU=1,UU=1e6;let mh=0;function $U(){return mh=(mh+1)%Number.MAX_SAFE_INTEGER,mh.toString()}const gh=new Map,Qx=e=>{if(gh.has(e))return;const t=setTimeout(()=>{gh.delete(e),Ya({type:"REMOVE_TOAST",toastId:e})},UU);gh.set(e,t)},VU=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,FU)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Qx(n):e.toasts.forEach(r=>{Qx(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},hu=[];let pu={toasts:[]};function Ya(e){pu=VU(pu,e),hu.forEach(t=>{t(pu)})}function zU({...e}){const t=$U(),n=o=>Ya({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Ya({type:"DISMISS_TOAST",toastId:t});return Ya({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function uv(){const[e,t]=h.useState(pu);return h.useEffect(()=>(hu.push(t),()=>{const n=hu.indexOf(t);n>-1&&hu.splice(n,1)}),[e]),{...e,toast:zU,dismiss:n=>Ya({type:"DISMISS_TOAST",toastId:n})}}function fk(){const{toasts:e}=uv();return c.jsxs(AU,{children:[e.map(function({id:t,title:n,description:r,action:o,...s}){return c.jsxs(lk,{...s,children:[c.jsxs("div",{className:"grid gap-1",children:[n&&c.jsx(uk,{children:n}),r&&c.jsx(dk,{children:r})]}),o,c.jsx(ck,{})]},t)}),c.jsx(ak,{})]})}var[lf,c3]=_n("Tooltip",[na]),cf=na(),hk="TooltipProvider",WU=700,Lp="tooltip.open",[YU,dv]=lf(hk),pk=e=>{const{__scopeTooltip:t,delayDuration:n=WU,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[i,a]=h.useState(!0),l=h.useRef(!1),u=h.useRef(0);return h.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(YU,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:h.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:h.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:s})};pk.displayName=hk;var uf="Tooltip",[HU,df]=lf(uf),mk=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=dv(uf,e.__scopeTooltip),u=cf(t),[d,f]=h.useState(null),p=Tr(),x=h.useRef(0),g=i??l.disableHoverableContent,y=a??l.delayDuration,S=h.useRef(!1),[v=!1,m]=so({prop:r,defaultProp:o,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(Lp))):l.onClose(),s==null||s(R)}}),w=h.useMemo(()=>v?S.current?"delayed-open":"instant-open":"closed",[v]),b=h.useCallback(()=>{window.clearTimeout(x.current),S.current=!1,m(!0)},[m]),C=h.useCallback(()=>{window.clearTimeout(x.current),m(!1)},[m]),_=h.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{S.current=!0,m(!0)},y)},[y,m]);return h.useEffect(()=>()=>window.clearTimeout(x.current),[]),c.jsx(pg,{...u,children:c.jsx(HU,{scope:t,contentId:p,open:v,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:h.useCallback(()=>{l.isOpenDelayed?_():b()},[l.isOpenDelayed,_,b]),onTriggerLeave:h.useCallback(()=>{g?C():window.clearTimeout(x.current)},[C,g]),onOpen:b,onClose:C,disableHoverableContent:g,children:n})})};mk.displayName=uf;var Fp="TooltipTrigger",gk=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=df(Fp,n),s=dv(Fp,n),i=cf(n),a=h.useRef(null),l=be(t,a,o.onTriggerChange),u=h.useRef(!1),d=h.useRef(!1),f=h.useCallback(()=>u.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(mg,{asChild:!0,...i,children:c.jsx(ve.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:G(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:G(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:G(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:G(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:G(e.onBlur,o.onClose),onClick:G(e.onClick,o.onClose)})})});gk.displayName=Fp;var BU="TooltipPortal",[u3,GU]=lf(BU,{forceMount:void 0}),zi="TooltipContent",fv=h.forwardRef((e,t)=>{const n=GU(zi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=df(zi,e.__scopeTooltip);return c.jsx(fn,{present:r||i.open,children:i.disableHoverableContent?c.jsx(vk,{side:o,...s,ref:t}):c.jsx(KU,{side:o,...s,ref:t})})}),KU=h.forwardRef((e,t)=>{const n=df(zi,e.__scopeTooltip),r=dv(zi,e.__scopeTooltip),o=h.useRef(null),s=be(t,o),[i,a]=h.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,p=h.useCallback(()=>{a(null),f(!1)},[f]),x=h.useCallback((g,y)=>{const S=g.currentTarget,v={x:g.clientX,y:g.clientY},m=QU(v,S.getBoundingClientRect()),w=JU(v,m),b=e$(y.getBoundingClientRect()),C=n$([...w,...b]);a(C),f(!0)},[f]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(l&&d){const g=S=>x(S,d),y=S=>x(S,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",y)}}},[l,d,x,p]),h.useEffect(()=>{if(i){const g=y=>{const S=y.target,v={x:y.clientX,y:y.clientY},m=(l==null?void 0:l.contains(S))||(d==null?void 0:d.contains(S)),w=!t$(v,i);m?p():w&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,i,u,p]),c.jsx(vk,{...e,ref:s})}),[ZU,qU]=lf(uf,{isInside:!1}),vk=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=df(zi,n),u=cf(n),{onClose:d}=l;return h.useEffect(()=>(document.addEventListener(Lp,d),()=>document.removeEventListener(Lp,d)),[d]),h.useEffect(()=>{if(l.trigger){const f=p=>{const x=p.target;x!=null&&x.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),c.jsx(Ji,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:c.jsxs(gg,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(eg,{children:r}),c.jsx(ZU,{scope:n,isInside:!0,children:c.jsx(gU,{id:l.contentId,role:"tooltip",children:o||r})})]})})});fv.displayName=zi;var yk="TooltipArrow",XU=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=cf(n);return qU(yk,n).isInside?null:c.jsx(vg,{...o,...r,ref:t})});XU.displayName=yk;function QU(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function JU(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 e$(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 t$(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,l=t[s].y,u=t[i].x,d=t[i].y;l>r!=d>r&&n<(u-a)*(r-l)/(d-l)+a&&(o=!o)}return o}function n$(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),r$(t)}function r$(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 s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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 s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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 o$=mk,s$=gk,xk=fv;const i$=o$,a$=s$,l$=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(xk,{ref:r,sideOffset:t,className:se("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));l$.displayName=xk.displayName;const _l=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},c$=e=>_l(e).split(" ")[0],u$=async()=>Vt().collection("domains").getFullList({sort:"-created",expand:"lastDeployment"}),d$=async e=>await Vt().collection("domains").getOne(e),Up=async e=>e.id?await Vt().collection("domains").update(e.id,e):await Vt().collection("domains").create(e),f$=async e=>await Vt().collection("domains").delete(e),h$=(e,t)=>Vt().collection("domains").subscribe(e,n=>{n.action==="update"&&t(n.record)},{expand:"lastDeployment"}),p$=e=>{Vt().collection("domains").unsubscribe(e)},m$=()=>{const e=uv(),t=as(),n=()=>{t("/edit")},r=d=>{t(`/edit?id=${d}`)},o=d=>{t(`/history?domain=${d}`)},s=async d=>{try{await f$(d),a(i.filter(f=>f.id!==d))}catch(f){console.error("Error deleting domain:",f)}},[i,a]=h.useState([]);h.useEffect(()=>{(async()=>{const f=await u$();a(f)})()},[]);const l=async d=>{const f=i.filter(y=>y.id===d),p=f[0].enabled,x=f[0];x.enabled=!p,await Up(x);const g=i.map(y=>y.id===d?{...y,checked:!p}:y);a(g)},u=async d=>{try{p$(d.id),h$(d.id,f=>{console.log(f);const p=i.map(x=>x.id===f.id?{...f}:x);a(p)}),d.rightnow=!0,await Up(d),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:c.jsxs(c.Fragment,{children:["执行失败,请查看",c.jsx($r,{to:`/history?domain=${d.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(fk,{}),c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),c.jsx(Dt,{onClick:n,children:"新增域名"})]}),i.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[c.jsx("div",{className:"w-40",children:"域名"}),c.jsx("div",{className:"w-48",children:"有效期限"}),c.jsx("div",{className:"w-32",children:"最近执行状态"}),c.jsx("div",{className:"w-64",children:"最近执行阶段"}),c.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),c.jsx("div",{className:"w-32",children:"是否启用"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),i.map(d=>{var f,p,x,g,y,S;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:d.domain}),c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx("div",{children:d.expiredAt?c.jsxs(c.Fragment,{children:[c.jsx("div",{children:"有效期90天"}),c.jsxs("div",{children:[c$(d.expiredAt),"到期"]})]}):"---"})}),c.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((f=d.expand)!=null&&f.lastDeployment)?c.jsx(c.Fragment,{children:((p=d.expand.lastDeployment)==null?void 0:p.phase)==="deploy"&&((x=d.expand.lastDeployment)!=null&&x.phaseSuccess)?c.jsx(XS,{size:16,className:"text-green-700"}):c.jsx(QS,{size:16,className:"text-red-700"})}):"---"}),c.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((g=d.expand)!=null&&g.lastDeployment)?c.jsx(lC,{phase:(y=d.expand.lastDeployment)==null?void 0:y.phase,phaseSuccess:(S=d.expand.lastDeployment)==null?void 0:S.phaseSuccess}):"---"}),c.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:d.lastDeployedAt?_l(d.lastDeployedAt):"---"}),c.jsx("div",{className:"sm:w-32 flex items-center",children:c.jsx(pk,{children:c.jsxs(i$,{children:[c.jsx(a$,{children:c.jsx(VC,{checked:d.enabled,onCheckedChange:()=>{l(d.id)}})}),c.jsx(fv,{children:c.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:d.enabled?"禁用":"启用"})})]})})}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(Dt,{variant:"link",className:"p-0",onClick:()=>o(d.id),children:"部署历史"}),c.jsxs(Z4,{when:!!d.enabled,children:[c.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Dt,{variant:"link",className:"p-0",onClick:()=>u(d),children:"立即部署"})]}),!d.enabled&&c.jsxs(c.Fragment,{children:[c.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),c.jsxs(aU,{children:[c.jsx(lU,{asChild:!0,children:c.jsx(Dt,{variant:"link",className:"p-0",children:"删除"})}),c.jsxs(NC,{children:[c.jsxs(PC,{children:[c.jsx(DC,{children:"删除域名"}),c.jsx(MC,{children:"确定要删除域名吗?"})]}),c.jsxs(jC,{children:[c.jsx(AC,{children:"取消"}),c.jsx(OC,{onClick:()=>{s(d.id)},children:"确认"})]})]})]}),c.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Dt,{variant:"link",className:"p-0",onClick:()=>r(d.id),children:"编辑"})]})]})]},d.id)})]}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(vp,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(Dt,{onClick:n,className:"mt-3",children:"添加域名"})]})})]})})},ct=h.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{type:t,className:se("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));ct.displayName="Input";var sc=e=>e.type==="checkbox",yi=e=>e instanceof Date,an=e=>e==null;const wk=e=>typeof e=="object";var Ft=e=>!an(e)&&!Array.isArray(e)&&wk(e)&&!yi(e),Sk=e=>Ft(e)&&e.target?sc(e.target)?e.target.checked:e.target.value:e,g$=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,_k=(e,t)=>e.has(g$(t)),v$=e=>{const t=e.constructor&&e.constructor.prototype;return Ft(t)&&t.hasOwnProperty("isPrototypeOf")},hv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function gn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(hv&&(e instanceof Blob||e instanceof FileList))&&(n||Ft(e)))if(t=n?[]:{},!n&&!v$(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=gn(e[r]));else return e;return t}var ff=e=>Array.isArray(e)?e.filter(Boolean):[],Tt=e=>e===void 0,Z=(e,t,n)=>{if(!t||!Ft(e))return n;const r=ff(t.split(/[,[\].]+?/)).reduce((o,s)=>an(o)?o:o[s],e);return Tt(r)||r===e?Tt(e[t])?n:e[t]:r},_r=e=>typeof e=="boolean",pv=e=>/^\w*$/.test(e),bk=e=>ff(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ke=(e,t,n)=>{let r=-1;const o=pv(t)?[t]:bk(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let l=n;if(r!==i){const u=e[a];l=Ft(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(a==="__proto__")return;e[a]=l,e=e[a]}return e};const td={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},nr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ur={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ck=Oe.createContext(null),hf=()=>Oe.useContext(Ck),y$=e=>{const{children:t,...n}=e;return Oe.createElement(Ck.Provider,{value:n},t)};var kk=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==nr.all&&(t._proxyFormState[i]=!r||nr.all),n&&(n[i]=!0),e[i]}});return o},kn=e=>Ft(e)&&!Object.keys(e).length,Ek=(e,t,n,r)=>{n(e);const{name:o,...s}=e;return kn(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!r||nr.all))},Ha=e=>Array.isArray(e)?e:[e],Tk=(e,t,n)=>!e||!t||e===t||Ha(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function mv(e){const t=Oe.useRef(e);t.current=e,Oe.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function x$(e){const t=hf(),{control:n=t.control,disabled:r,name:o,exact:s}=e||{},[i,a]=Oe.useState(n._formState),l=Oe.useRef(!0),u=Oe.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Oe.useRef(o);return d.current=o,mv({disabled:r,next:f=>l.current&&Tk(d.current,f.name,s)&&Ek(f,u.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),Oe.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),kk(i,n,u.current,!1)}var Cr=e=>typeof e=="string",Rk=(e,t,n,r,o)=>Cr(e)?(r&&t.watch.add(e),Z(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Z(n,s))):(r&&(t.watchAll=!0),n);function w$(e){const t=hf(),{control:n=t.control,name:r,defaultValue:o,disabled:s,exact:i}=e||{},a=Oe.useRef(r);a.current=r,mv({disabled:s,subject:n._subjects.values,next:d=>{Tk(a.current,d.name,i)&&u(gn(Rk(a.current,n._names,d.values||n._formValues,!1,o)))}});const[l,u]=Oe.useState(n._getWatch(r,o));return Oe.useEffect(()=>n._removeUnmounted()),l}function S$(e){const t=hf(),{name:n,disabled:r,control:o=t.control,shouldUnregister:s}=e,i=_k(o._names.array,n),a=w$({control:o,name:n,defaultValue:Z(o._formValues,n,Z(o._defaultValues,n,e.defaultValue)),exact:!0}),l=x$({control:o,name:n}),u=Oe.useRef(o.register(n,{...e.rules,value:a,..._r(e.disabled)?{disabled:e.disabled}:{}}));return Oe.useEffect(()=>{const d=o._options.shouldUnregister||s,f=(p,x)=>{const g=Z(o._fields,p);g&&g._f&&(g._f.mount=x)};if(f(n,!0),d){const p=gn(Z(o._options.defaultValues,n));Ke(o._defaultValues,n,p),Tt(Z(o._formValues,n))&&Ke(o._formValues,n,p)}return()=>{(i?d&&!o._state.action:d)?o.unregister(n):f(n,!1)}},[n,o,i,s]),Oe.useEffect(()=>{Z(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:Z(o._fields,n)._f.value})},[r,n,o]),{field:{name:n,value:a,..._r(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Oe.useCallback(d=>u.current.onChange({target:{value:Sk(d),name:n},type:td.CHANGE}),[n]),onBlur:Oe.useCallback(()=>u.current.onBlur({target:{value:Z(o._formValues,n),name:n},type:td.BLUR}),[n,o]),ref:d=>{const f=Z(o._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:p=>d.setCustomValidity(p),reportValidity:()=>d.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Z(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Z(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Z(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Z(l.validatingFields,n)},error:{enumerable:!0,get:()=>Z(l.errors,n)}})}}const _$=e=>e.render(S$(e));var Nk=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},Jx=e=>({isOnSubmit:!e||e===nr.onSubmit,isOnBlur:e===nr.onBlur,isOnChange:e===nr.onChange,isOnAll:e===nr.all,isOnTouch:e===nr.onTouched}),ew=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ba=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=Z(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!r)break;if(i.ref&&t(i.ref,i.name)&&!r)break;Ba(a,t)}else Ft(a)&&Ba(a,t)}}};var b$=(e,t,n)=>{const r=Ha(Z(e,n));return Ke(r,"root",t[n]),Ke(e,n,r),e},gv=e=>e.type==="file",Lo=e=>typeof e=="function",nd=e=>{if(!hv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},mu=e=>Cr(e),vv=e=>e.type==="radio",rd=e=>e instanceof RegExp;const tw={value:!1,isValid:!1},nw={value:!0,isValid:!0};var Pk=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&&!Tt(e[0].attributes.value)?Tt(e[0].value)||e[0].value===""?nw:{value:e[0].value,isValid:!0}:nw:tw}return tw};const rw={isValid:!1,value:null};var jk=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,rw):rw;function ow(e,t,n="validate"){if(mu(e)||Array.isArray(e)&&e.every(mu)||_r(e)&&!e)return{type:n,message:mu(e)?e:"",ref:t}}var ti=e=>Ft(e)&&!rd(e)?e:{value:e,message:""},sw=async(e,t,n,r,o)=>{const{ref:s,refs:i,required:a,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:x,name:g,valueAsNumber:y,mount:S,disabled:v}=e._f,m=Z(t,g);if(!S||v)return{};const w=i?i[0]:s,b=A=>{r&&w.reportValidity&&(w.setCustomValidity(_r(A)?"":A||""),w.reportValidity())},C={},_=vv(s),R=sc(s),N=_||R,D=(y||gv(s))&&Tt(s.value)&&Tt(m)||nd(s)&&s.value===""||m===""||Array.isArray(m)&&!m.length,O=Nk.bind(null,g,n,C),B=(A,H,L,K=Ur.maxLength,ne=Ur.minLength)=>{const W=A?H:L;C[g]={type:A?K:ne,message:W,ref:s,...O(A?K:ne,W)}};if(o?!Array.isArray(m)||!m.length:a&&(!N&&(D||an(m))||_r(m)&&!m||R&&!Pk(i).isValid||_&&!jk(i).isValid)){const{value:A,message:H}=mu(a)?{value:!!a,message:a}:ti(a);if(A&&(C[g]={type:Ur.required,message:H,ref:w,...O(Ur.required,H)},!n))return b(H),C}if(!D&&(!an(d)||!an(f))){let A,H;const L=ti(f),K=ti(d);if(!an(m)&&!isNaN(m)){const ne=s.valueAsNumber||m&&+m;an(L.value)||(A=ne>L.value),an(K.value)||(H=ne<K.value)}else{const ne=s.valueAsDate||new Date(m),W=X=>new Date(new Date().toDateString()+" "+X),F=s.type=="time",M=s.type=="week";Cr(L.value)&&m&&(A=F?W(m)>W(L.value):M?m>L.value:ne>new Date(L.value)),Cr(K.value)&&m&&(H=F?W(m)<W(K.value):M?m<K.value:ne<new Date(K.value))}if((A||H)&&(B(!!A,L.message,K.message,Ur.max,Ur.min),!n))return b(C[g].message),C}if((l||u)&&!D&&(Cr(m)||o&&Array.isArray(m))){const A=ti(l),H=ti(u),L=!an(A.value)&&m.length>+A.value,K=!an(H.value)&&m.length<+H.value;if((L||K)&&(B(L,A.message,H.message),!n))return b(C[g].message),C}if(p&&!D&&Cr(m)){const{value:A,message:H}=ti(p);if(rd(A)&&!m.match(A)&&(C[g]={type:Ur.pattern,message:H,ref:s,...O(Ur.pattern,H)},!n))return b(H),C}if(x){if(Lo(x)){const A=await x(m,t),H=ow(A,w);if(H&&(C[g]={...H,...O(Ur.validate,H.message)},!n))return b(H.message),C}else if(Ft(x)){let A={};for(const H in x){if(!kn(A)&&!n)break;const L=ow(await x[H](m,t),w,H);L&&(A={...L,...O(H,L.message)},b(L.message),n&&(C[g]=A))}if(!kn(A)&&(C[g]={ref:w,...A},!n))return C}}return b(!0),C};function C$(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Tt(e)?r++:e[t[r++]];return e}function k$(e){for(const t in e)if(e.hasOwnProperty(t)&&!Tt(e[t]))return!1;return!0}function Ot(e,t){const n=Array.isArray(t)?t:pv(t)?[t]:bk(t),r=n.length===1?e:C$(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(Ft(r)&&kn(r)||Array.isArray(r)&&k$(r))&&Ot(e,n.slice(0,-1)),e}var vh=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}},od=e=>an(e)||!wk(e);function Ss(e,t){if(od(e)||od(t))return e===t;if(yi(e)&&yi(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const s=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const i=t[o];if(yi(s)&&yi(i)||Ft(s)&&Ft(i)||Array.isArray(s)&&Array.isArray(i)?!Ss(s,i):s!==i)return!1}}return!0}var Dk=e=>e.type==="select-multiple",E$=e=>vv(e)||sc(e),yh=e=>nd(e)&&e.isConnected,Mk=e=>{for(const t in e)if(Lo(e[t]))return!0;return!1};function sd(e,t={}){const n=Array.isArray(e);if(Ft(e)||n)for(const r in e)Array.isArray(e[r])||Ft(e[r])&&!Mk(e[r])?(t[r]=Array.isArray(e[r])?[]:{},sd(e[r],t[r])):an(e[r])||(t[r]=!0);return t}function Ok(e,t,n){const r=Array.isArray(e);if(Ft(e)||r)for(const o in e)Array.isArray(e[o])||Ft(e[o])&&!Mk(e[o])?Tt(t)||od(n[o])?n[o]=Array.isArray(e[o])?sd(e[o],[]):{...sd(e[o])}:Ok(e[o],an(t)?{}:t[o],n[o]):n[o]=!Ss(e[o],t[o]);return n}var Gc=(e,t)=>Ok(e,t,sd(t)),Ak=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Tt(e)?e:t?e===""?NaN:e&&+e:n&&Cr(e)?new Date(e):r?r(e):e;function xh(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return gv(t)?t.files:vv(t)?jk(e.refs).value:Dk(t)?[...t.selectedOptions].map(({value:n})=>n):sc(t)?Pk(e.refs).value:Ak(Tt(t.value)?e.ref.value:t.value,e)}var T$=(e,t,n,r)=>{const o={};for(const s of e){const i=Z(t,s);i&&Ke(o,s,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Ca=e=>Tt(e)?e:rd(e)?e.source:Ft(e)?rd(e.value)?e.value.source:e.value:e,R$=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function iw(e,t,n){const r=Z(e,n);if(r||pv(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),i=Z(t,s),a=Z(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};o.pop()}return{name:n}}var N$=(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,P$=(e,t)=>!ff(Z(e,t)).length&&Ot(e,t);const j$={mode:nr.onSubmit,reValidateMode:nr.onChange,shouldFocusError:!0};function D$(e={}){let t={...j$,...e},n={submitCount:0,isDirty:!1,isLoading:Lo(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Ft(t.defaultValues)||Ft(t.values)?gn(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:gn(o),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:vh(),array:vh(),state:vh()},p=Jx(t.mode),x=Jx(t.reValidateMode),g=t.criteriaMode===nr.all,y=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},S=async k=>{if(d.isValid||k){const P=t.resolver?kn((await N()).errors):await O(r,!0);P!==n.isValid&&f.state.next({isValid:P})}},v=(k,P)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(I=>{I&&(P?Ke(n.validatingFields,I,P):Ot(n.validatingFields,I))}),f.state.next({validatingFields:n.validatingFields,isValidating:!kn(n.validatingFields)}))},m=(k,P=[],I,J,Q=!0,Y=!0)=>{if(J&&I){if(i.action=!0,Y&&Array.isArray(Z(r,k))){const ue=I(Z(r,k),J.argA,J.argB);Q&&Ke(r,k,ue)}if(Y&&Array.isArray(Z(n.errors,k))){const ue=I(Z(n.errors,k),J.argA,J.argB);Q&&Ke(n.errors,k,ue),P$(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(Z(n.touchedFields,k))){const ue=I(Z(n.touchedFields,k),J.argA,J.argB);Q&&Ke(n.touchedFields,k,ue)}d.dirtyFields&&(n.dirtyFields=Gc(o,s)),f.state.next({name:k,isDirty:A(k,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ke(s,k,P)},w=(k,P)=>{Ke(n.errors,k,P),f.state.next({errors:n.errors})},b=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,P,I,J)=>{const Q=Z(r,k);if(Q){const Y=Z(s,k,Tt(I)?Z(o,k):I);Tt(Y)||J&&J.defaultChecked||P?Ke(s,k,P?Y:xh(Q._f)):K(k,Y),i.mount&&S()}},_=(k,P,I,J,Q)=>{let Y=!1,ue=!1;const Me={name:k},yt=!!(Z(r,k)&&Z(r,k)._f&&Z(r,k)._f.disabled);if(!I||J){d.isDirty&&(ue=n.isDirty,n.isDirty=Me.isDirty=A(),Y=ue!==Me.isDirty);const zt=yt||Ss(Z(o,k),P);ue=!!(!yt&&Z(n.dirtyFields,k)),zt||yt?Ot(n.dirtyFields,k):Ke(n.dirtyFields,k,!0),Me.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&ue!==!zt}if(I){const zt=Z(n.touchedFields,k);zt||(Ke(n.touchedFields,k,I),Me.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&zt!==I)}return Y&&Q&&f.state.next(Me),Y?Me:{}},R=(k,P,I,J)=>{const Q=Z(n.errors,k),Y=d.isValid&&_r(P)&&n.isValid!==P;if(e.delayError&&I?(l=y(()=>w(k,I)),l(e.delayError)):(clearTimeout(u),l=null,I?Ke(n.errors,k,I):Ot(n.errors,k)),(I?!Ss(Q,I):Q)||!kn(J)||Y){const ue={...J,...Y&&_r(P)?{isValid:P}:{},errors:n.errors,name:k};n={...n,...ue},f.state.next(ue)}},N=async k=>{v(k,!0);const P=await t.resolver(s,t.context,T$(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return v(k),P},D=async k=>{const{errors:P}=await N(k);if(k)for(const I of k){const J=Z(P,I);J?Ke(n.errors,I,J):Ot(n.errors,I)}else n.errors=P;return P},O=async(k,P,I={valid:!0})=>{for(const J in k){const Q=k[J];if(Q){const{_f:Y,...ue}=Q;if(Y){const Me=a.array.has(Y.name);v([J],!0);const yt=await sw(Q,s,g,t.shouldUseNativeValidation&&!P,Me);if(v([J]),yt[Y.name]&&(I.valid=!1,P))break;!P&&(Z(yt,Y.name)?Me?b$(n.errors,yt,Y.name):Ke(n.errors,Y.name,yt[Y.name]):Ot(n.errors,Y.name))}ue&&await O(ue,P,I)}}return I.valid},B=()=>{for(const k of a.unMount){const P=Z(r,k);P&&(P._f.refs?P._f.refs.every(I=>!yh(I)):!yh(P._f.ref))&&Ue(k)}a.unMount=new Set},A=(k,P)=>(k&&P&&Ke(s,k,P),!Ss(le(),o)),H=(k,P,I)=>Rk(k,a,{...i.mount?s:Tt(P)?o:Cr(k)?{[k]:P}:P},I,P),L=k=>ff(Z(i.mount?s:o,k,e.shouldUnregister?Z(o,k,[]):[])),K=(k,P,I={})=>{const J=Z(r,k);let Q=P;if(J){const Y=J._f;Y&&(!Y.disabled&&Ke(s,k,Ak(P,Y)),Q=nd(Y.ref)&&an(P)?"":P,Dk(Y.ref)?[...Y.ref.options].forEach(ue=>ue.selected=Q.includes(ue.value)):Y.refs?sc(Y.ref)?Y.refs.length>1?Y.refs.forEach(ue=>(!ue.defaultChecked||!ue.disabled)&&(ue.checked=Array.isArray(Q)?!!Q.find(Me=>Me===ue.value):Q===ue.value)):Y.refs[0]&&(Y.refs[0].checked=!!Q):Y.refs.forEach(ue=>ue.checked=ue.value===Q):gv(Y.ref)?Y.ref.value="":(Y.ref.value=Q,Y.ref.type||f.values.next({name:k,values:{...s}})))}(I.shouldDirty||I.shouldTouch)&&_(k,Q,I.shouldTouch,I.shouldDirty,!0),I.shouldValidate&&X(k)},ne=(k,P,I)=>{for(const J in P){const Q=P[J],Y=`${k}.${J}`,ue=Z(r,Y);(a.array.has(k)||!od(Q)||ue&&!ue._f)&&!yi(Q)?ne(Y,Q,I):K(Y,Q,I)}},W=(k,P,I={})=>{const J=Z(r,k),Q=a.array.has(k),Y=gn(P);Ke(s,k,Y),Q?(f.array.next({name:k,values:{...s}}),(d.isDirty||d.dirtyFields)&&I.shouldDirty&&f.state.next({name:k,dirtyFields:Gc(o,s),isDirty:A(k,Y)})):J&&!J._f&&!an(Y)?ne(k,Y,I):K(k,Y,I),ew(k,a)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...s}})},F=async k=>{i.mount=!0;const P=k.target;let I=P.name,J=!0;const Q=Z(r,I),Y=()=>P.type?xh(Q._f):Sk(k),ue=Me=>{J=Number.isNaN(Me)||Me===Z(s,I,Me)};if(Q){let Me,yt;const zt=Y(),rn=k.type===td.BLUR||k.type===td.FOCUS_OUT,Zn=!R$(Q._f)&&!t.resolver&&!Z(n.errors,I)&&!Q._f.deps||N$(rn,Z(n.touchedFields,I),n.isSubmitted,x,p),Hs=ew(I,a,rn);Ke(s,I,zt),rn?(Q._f.onBlur&&Q._f.onBlur(k),l&&l(0)):Q._f.onChange&&Q._f.onChange(k);const So=_(I,zt,rn,!1),Sf=!kn(So)||Hs;if(!rn&&f.values.next({name:I,type:k.type,values:{...s}}),Zn)return d.isValid&&S(),Sf&&f.state.next({name:I,...Hs?{}:So});if(!rn&&Hs&&f.state.next({...n}),t.resolver){const{errors:qn}=await N([I]);if(ue(zt),J){const dc=iw(n.errors,r,I),aa=iw(qn,r,dc.name||I);Me=aa.error,I=aa.name,yt=kn(qn)}}else v([I],!0),Me=(await sw(Q,s,g,t.shouldUseNativeValidation))[I],v([I]),ue(zt),J&&(Me?yt=!1:d.isValid&&(yt=await O(r,!0)));J&&(Q._f.deps&&X(Q._f.deps),R(I,yt,Me,So))}},M=(k,P)=>{if(Z(n.errors,P)&&k.focus)return k.focus(),1},X=async(k,P={})=>{let I,J;const Q=Ha(k);if(t.resolver){const Y=await D(Tt(k)?k:Q);I=kn(Y),J=k?!Q.some(ue=>Z(Y,ue)):I}else k?(J=(await Promise.all(Q.map(async Y=>{const ue=Z(r,Y);return await O(ue&&ue._f?{[Y]:ue}:ue)}))).every(Boolean),!(!J&&!n.isValid)&&S()):J=I=await O(r);return f.state.next({...!Cr(k)||d.isValid&&I!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:I}:{},errors:n.errors}),P.shouldFocus&&!J&&Ba(r,M,k?Q:a.mount),J},le=k=>{const P={...i.mount?s:o};return Tt(k)?P:Cr(k)?Z(P,k):k.map(I=>Z(P,I))},me=(k,P)=>({invalid:!!Z((P||n).errors,k),isDirty:!!Z((P||n).dirtyFields,k),error:Z((P||n).errors,k),isValidating:!!Z(n.validatingFields,k),isTouched:!!Z((P||n).touchedFields,k)}),rt=k=>{k&&Ha(k).forEach(P=>Ot(n.errors,P)),f.state.next({errors:k?n.errors:{}})},je=(k,P,I)=>{const J=(Z(r,k,{_f:{}})._f||{}).ref,Q=Z(n.errors,k)||{},{ref:Y,message:ue,type:Me,...yt}=Q;Ke(n.errors,k,{...yt,...P,ref:J}),f.state.next({name:k,errors:n.errors,isValid:!1}),I&&I.shouldFocus&&J&&J.focus&&J.focus()},gt=(k,P)=>Lo(k)?f.values.subscribe({next:I=>k(H(void 0,P),I)}):H(k,P,!0),Ue=(k,P={})=>{for(const I of k?Ha(k):a.mount)a.mount.delete(I),a.array.delete(I),P.keepValue||(Ot(r,I),Ot(s,I)),!P.keepError&&Ot(n.errors,I),!P.keepDirty&&Ot(n.dirtyFields,I),!P.keepTouched&&Ot(n.touchedFields,I),!P.keepIsValidating&&Ot(n.validatingFields,I),!t.shouldUnregister&&!P.keepDefaultValue&&Ot(o,I);f.values.next({values:{...s}}),f.state.next({...n,...P.keepDirty?{isDirty:A()}:{}}),!P.keepIsValid&&S()},ce=({disabled:k,name:P,field:I,fields:J,value:Q})=>{if(_r(k)&&i.mount||k){const Y=k?void 0:Tt(Q)?xh(I?I._f:Z(J,P)._f):Q;Ke(s,P,Y),_(P,Y,!1,!1,!0)}},De=(k,P={})=>{let I=Z(r,k);const J=_r(P.disabled);return Ke(r,k,{...I||{},_f:{...I&&I._f?I._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),I?ce({field:I,disabled:P.disabled,name:k,value:P.value}):C(k,!0,P.value),{...J?{disabled:P.disabled}:{},...t.progressive?{required:!!P.required,min:Ca(P.min),max:Ca(P.max),minLength:Ca(P.minLength),maxLength:Ca(P.maxLength),pattern:Ca(P.pattern)}:{},name:k,onChange:F,onBlur:F,ref:Q=>{if(Q){De(k,P),I=Z(r,k);const Y=Tt(Q.value)&&Q.querySelectorAll&&Q.querySelectorAll("input,select,textarea")[0]||Q,ue=E$(Y),Me=I._f.refs||[];if(ue?Me.find(yt=>yt===Y):Y===I._f.ref)return;Ke(r,k,{_f:{...I._f,...ue?{refs:[...Me.filter(yh),Y,...Array.isArray(Z(o,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else I=Z(r,k,{}),I._f&&(I._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(_k(a.array,k)&&i.action)&&a.unMount.add(k)}}},He=()=>t.shouldFocusError&&Ba(r,M,a.mount),$e=k=>{_r(k)&&(f.state.next({disabled:k}),Ba(r,(P,I)=>{const J=Z(r,I);J&&(P.disabled=J._f.disabled||k,Array.isArray(J._f.refs)&&J._f.refs.forEach(Q=>{Q.disabled=J._f.disabled||k}))},0,!1))},Ve=(k,P)=>async I=>{let J;I&&(I.preventDefault&&I.preventDefault(),I.persist&&I.persist());let Q=gn(s);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:ue}=await N();n.errors=Y,Q=ue}else await O(r);if(Ot(n.errors,"root"),kn(n.errors)){f.state.next({errors:{}});try{await k(Q,I)}catch(Y){J=Y}}else P&&await P({...n.errors},I),He(),setTimeout(He);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:kn(n.errors)&&!J,submitCount:n.submitCount+1,errors:n.errors}),J)throw J},Se=(k,P={})=>{Z(r,k)&&(Tt(P.defaultValue)?W(k,gn(Z(o,k))):(W(k,P.defaultValue),Ke(o,k,gn(P.defaultValue))),P.keepTouched||Ot(n.touchedFields,k),P.keepDirty||(Ot(n.dirtyFields,k),n.isDirty=P.defaultValue?A(k,gn(Z(o,k))):A()),P.keepError||(Ot(n.errors,k),d.isValid&&S()),f.state.next({...n}))},vt=(k,P={})=>{const I=k?gn(k):o,J=gn(I),Q=kn(k),Y=Q?o:J;if(P.keepDefaultValues||(o=I),!P.keepValues){if(P.keepDirtyValues)for(const ue of a.mount)Z(n.dirtyFields,ue)?Ke(Y,ue,Z(s,ue)):W(ue,Z(Y,ue));else{if(hv&&Tt(k))for(const ue of a.mount){const Me=Z(r,ue);if(Me&&Me._f){const yt=Array.isArray(Me._f.refs)?Me._f.refs[0]:Me._f.ref;if(nd(yt)){const zt=yt.closest("form");if(zt){zt.reset();break}}}}r={}}s=e.shouldUnregister?P.keepDefaultValues?gn(o):{}:gn(Y),f.array.next({values:{...Y}}),f.values.next({values:{...Y}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:Q?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!Ss(k,o)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Q?{}:P.keepDirtyValues?P.keepDefaultValues&&s?Gc(o,s):n.dirtyFields:P.keepDefaultValues&&k?Gc(o,k):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Zt=(k,P)=>vt(Lo(k)?k(s):k,P);return{control:{register:De,unregister:Ue,getFieldState:me,handleSubmit:Ve,setError:je,_executeSchema:N,_getWatch:H,_getDirty:A,_updateValid:S,_removeUnmounted:B,_updateFieldArray:m,_updateDisabledField:ce,_getFieldArray:L,_reset:vt,_resetDefaultValues:()=>Lo(t.defaultValues)&&t.defaultValues().then(k=>{Zt(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:$e,_subjects:f,_proxyFormState:d,_setErrors:b,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(k){i=k},get _defaultValues(){return o},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:X,register:De,handleSubmit:Ve,watch:gt,setValue:W,getValues:le,reset:Zt,resetField:Se,clearErrors:rt,unregister:Ue,setError:je,setFocus:(k,P={})=>{const I=Z(r,k),J=I&&I._f;if(J){const Q=J.refs?J.refs[0]:J.ref;Q.focus&&(Q.focus(),P.shouldSelect&&Q.select())}},getFieldState:me}}function ic(e={}){const t=Oe.useRef(),n=Oe.useRef(),[r,o]=Oe.useState({isDirty:!1,isValidating:!1,isLoading:Lo(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Lo(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...D$(e),formState:r});const s=t.current.control;return s._options=e,mv({subject:s._subjects.state,next:i=>{Ek(i,s._proxyFormState,s._updateFormState,!0)&&o({...s._formState})}}),Oe.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),Oe.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==r.isDirty&&s._subjects.state.next({isDirty:i})}},[s,r.isDirty]),Oe.useEffect(()=>{e.values&&!Ss(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[e.values,s]),Oe.useEffect(()=>{e.errors&&s._setErrors(e.errors)},[e.errors,s]),Oe.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),Oe.useEffect(()=>{e.shouldUnregister&&s._subjects.values.next({values:s._getWatch()})},[e.shouldUnregister,s]),t.current.formState=kk(r,s),t.current}const aw=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Z(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Ik=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?aw(r.ref,n,e):r.refs&&r.refs.forEach(o=>aw(o,n,e))}},M$=(e,t)=>{t.shouldUseNativeValidation&&Ik(e,t);const n={};for(const r in e){const o=Z(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.ref});if(O$(t.names||Object.keys(e),r)){const i=Object.assign({},Z(n,r));Ke(i,"root",s),Ke(n,r,i)}else Ke(n,r,s)}return n},O$=(e,t)=>e.some(n=>n.startsWith(t+"."));var A$=function(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var l=n[i].types,u=l&&l[r.code];n[i]=Nk(i,t,n,o,u?[].concat(u,r.message):r.message)}e.shift()}return n},ac=function(e,t,n){return n===void 0&&(n={}),function(r,o,s){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return s.shouldUseNativeValidation&&Ik({},s),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:M$(A$(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}}},Le;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Le||(Le={}));var $p;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})($p||($p={}));const oe=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Do=e=>{switch(typeof e){case"undefined":return oe.undefined;case"string":return oe.string;case"number":return isNaN(e)?oe.nan:oe.number;case"boolean":return oe.boolean;case"function":return oe.function;case"bigint":return oe.bigint;case"symbol":return oe.symbol;case"object":return Array.isArray(e)?oe.array:e===null?oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?oe.promise:typeof Map<"u"&&e instanceof Map?oe.map:typeof Set<"u"&&e instanceof Set?oe.set:typeof Date<"u"&&e instanceof Date?oe.date:oe.object;default:return oe.unknown}},V=Le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),I$=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Mn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return o(this),r}static assert(t){if(!(t instanceof Mn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.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}}get formErrors(){return this.flatten()}}Mn.create=e=>new Mn(e);const Wi=(e,t)=>{let n;switch(e.code){case V.invalid_type:e.received===oe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case V.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Le.jsonStringifyReplacer)}`;break;case V.unrecognized_keys:n=`Unrecognized key(s) in object: ${Le.joinValues(e.keys,", ")}`;break;case V.invalid_union:n="Invalid input";break;case V.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Le.joinValues(e.options)}`;break;case V.invalid_enum_value:n=`Invalid enum value. Expected ${Le.joinValues(e.options)}, received '${e.received}'`;break;case V.invalid_arguments:n="Invalid function arguments";break;case V.invalid_return_type:n="Invalid function return type";break;case V.invalid_date:n="Invalid date";break;case V.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Le.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case V.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case V.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case V.custom:n="Invalid input";break;case V.invalid_intersection_types:n="Intersection results could not be merged";break;case V.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case V.not_finite:n="Number must be finite";break;default:n=t.defaultError,Le.assertNever(e)}return{message:n}};let Lk=Wi;function L$(e){Lk=e}function id(){return Lk}const ad=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},F$=[];function ee(e,t){const n=id(),r=ad({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Wi?void 0:Wi].filter(o=>!!o)});e.common.issues.push(r)}class tn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return we;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return tn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return we;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const we=Object.freeze({status:"aborted"}),xi=e=>({status:"dirty",value:e}),cn=e=>({status:"valid",value:e}),Vp=e=>e.status==="aborted",zp=e=>e.status==="dirty",bl=e=>e.status==="valid",Cl=e=>typeof Promise<"u"&&e instanceof Promise;function ld(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Fk(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));var ja,Da;class jr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const lw=(e,t)=>{if(bl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Mn(e.common.issues);return this._error=n,this._error}}};function _e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(l=d??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:o}}class Re{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Do(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Do(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new tn,ctx:{common:t.parent.common,data:t.data,parsedType:Do(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Cl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Do(t)},s=this._parseSync({data:t,path:o.path,parent:o});return lw(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Do(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Cl(o)?o:Promise.resolve(o));return lw(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:V.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new hr({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Rr.create(this,this._def)}nullable(){return ts.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ar.create(this,this._def)}promise(){return Hi.create(this,this._def)}or(t){return Rl.create([this,t],this._def)}and(t){return Nl.create(this,t,this._def)}transform(t){return new hr({..._e(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ol({..._e(this._def),innerType:this,defaultValue:n,typeName:ye.ZodDefault})}brand(){return new yv({typeName:ye.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Al({..._e(this._def),innerType:this,catchValue:n,typeName:ye.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return lc.create(this,t)}readonly(){return Il.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const U$=/^c[^\s-]{8,}$/i,$$=/^[0-9a-z]+$/,V$=/^[0-9A-HJKMNP-TV-Z]{26}$/,z$=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,W$=/^[a-z0-9_-]{21}$/i,Y$=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,H$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,B$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let wh;const G$=/^(?:(?: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])$/,K$=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Z$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Uk="((\\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])))",q$=new RegExp(`^${Uk}$`);function $k(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function X$(e){return new RegExp(`^${$k(e)}$`)}function Vk(e){let t=`${Uk}T${$k(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Q$(e,t){return!!((t==="v4"||!t)&&G$.test(e)||(t==="v6"||!t)&&K$.test(e))}class or extends Re{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==oe.string){const s=this._getOrReturnCtx(t);return ee(s,{code:V.invalid_type,expected:oe.string,received:s.parsedType}),we}const r=new tn;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:V.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:V.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?ee(o,{code:V.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ee(o,{code:V.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")H$.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"email",code:V.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")wh||(wh=new RegExp(B$,"u")),wh.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"emoji",code:V.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")z$.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"uuid",code:V.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")W$.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"nanoid",code:V.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")U$.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid",code:V.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")$$.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid2",code:V.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")V$.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ulid",code:V.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ee(o,{validation:"url",code:V.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"regex",code:V.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),ee(o,{code:V.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:V.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:V.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?Vk(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:V.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?q$.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:V.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?X$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:V.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?Y$.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"duration",code:V.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Q$(t.data,s.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ip",code:V.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?Z$.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"base64",code:V.invalid_string,message:s.message}),r.dirty()):Le.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:V.invalid_string,...fe.errToObj(r)})}_addCheck(t){return new or({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...fe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...fe.errToObj(n)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new or({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new or({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new or({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}or.create=e=>{var t;return new or({checks:[],typeName:ye.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function J$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Qo extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==oe.number){const s=this._getOrReturnCtx(t);return ee(s,{code:V.invalid_type,expected:oe.number,received:s.parsedType}),we}let r;const o=new tn;for(const s of this._def.checks)s.kind==="int"?Le.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:V.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?J$(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:V.not_finite,message:s.message}),o.dirty()):Le.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,o){return new Qo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(o)}]})}_addCheck(t){return new Qo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Le.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Qo.create=e=>new Qo({checks:[],typeName:ye.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Jo extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==oe.bigint){const s=this._getOrReturnCtx(t);return ee(s,{code:V.invalid_type,expected:oe.bigint,received:s.parsedType}),we}let r;const o=new tn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Le.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,o){return new Jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(o)}]})}_addCheck(t){return new Jo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Jo.create=e=>{var t;return new Jo({checks:[],typeName:ye.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class kl extends Re{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==oe.boolean){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:oe.boolean,received:r.parsedType}),we}return cn(t.data)}}kl.create=e=>new kl({typeName:ye.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Is extends Re{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==oe.date){const s=this._getOrReturnCtx(t);return ee(s,{code:V.invalid_type,expected:oe.date,received:s.parsedType}),we}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ee(s,{code:V.invalid_date}),we}const r=new tn;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:V.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:V.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Le.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Is({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Is.create=e=>new Is({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ye.ZodDate,..._e(e)});class cd extends Re{_parse(t){if(this._getType(t)!==oe.symbol){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:oe.symbol,received:r.parsedType}),we}return cn(t.data)}}cd.create=e=>new cd({typeName:ye.ZodSymbol,..._e(e)});class El extends Re{_parse(t){if(this._getType(t)!==oe.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:oe.undefined,received:r.parsedType}),we}return cn(t.data)}}El.create=e=>new El({typeName:ye.ZodUndefined,..._e(e)});class Tl extends Re{_parse(t){if(this._getType(t)!==oe.null){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:oe.null,received:r.parsedType}),we}return cn(t.data)}}Tl.create=e=>new Tl({typeName:ye.ZodNull,..._e(e)});class Yi extends Re{constructor(){super(...arguments),this._any=!0}_parse(t){return cn(t.data)}}Yi.create=e=>new Yi({typeName:ye.ZodAny,..._e(e)});class ks extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(t){return cn(t.data)}}ks.create=e=>new ks({typeName:ye.ZodUnknown,..._e(e)});class co extends Re{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:V.invalid_type,expected:oe.never,received:n.parsedType}),we}}co.create=e=>new co({typeName:ye.ZodNever,..._e(e)});class ud extends Re{_parse(t){if(this._getType(t)!==oe.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:oe.void,received:r.parsedType}),we}return cn(t.data)}}ud.create=e=>new ud({typeName:ye.ZodVoid,..._e(e)});class ar extends Re{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==oe.array)return ee(n,{code:V.invalid_type,expected:oe.array,received:n.parsedType}),we;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(ee(n,{code:i?V.too_big:V.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ee(n,{code:V.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ee(n,{code:V.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new jr(n,i,n.path,a)))).then(i=>tn.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new jr(n,i,n.path,a)));return tn.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new ar({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new ar({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new ar({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}}ar.create=(e,t)=>new ar({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,..._e(t)});function ri(e){if(e instanceof xt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Rr.create(ri(r))}return new xt({...e._def,shape:()=>t})}else return e instanceof ar?new ar({...e._def,type:ri(e.element)}):e instanceof Rr?Rr.create(ri(e.unwrap())):e instanceof ts?ts.create(ri(e.unwrap())):e instanceof Dr?Dr.create(e.items.map(t=>ri(t))):e}class xt extends Re{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Le.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==oe.object){const u=this._getOrReturnCtx(t);return ee(u,{code:V.invalid_type,expected:oe.object,received:u.parsedType}),we}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof co&&this._def.unknownKeys==="strip"))for(const u in o.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const d=s[u],f=o.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new jr(o,f,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof co){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:o.data[d]}});else if(u==="strict")a.length>0&&(ee(o,{code:V.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=o.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new jr(o,f,o.path,d)),alwaysSet:d in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const f=await d.key,p=await d.value;u.push({key:f,value:p,alwaysSet:d.alwaysSet})}return u}).then(u=>tn.mergeObjectSync(r,u)):tn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new xt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=fe.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new xt({...this._def,unknownKeys:"strip"})}passthrough(){return new xt({...this._def,unknownKeys:"passthrough"})}extend(t){return new xt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new xt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ye.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new xt({...this._def,catchall:t})}pick(t){const n={};return Le.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}omit(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}deepPartial(){return ri(this)}partial(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new xt({...this._def,shape:()=>n})}required(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Rr;)s=s._def.innerType;n[r]=s}}),new xt({...this._def,shape:()=>n})}keyof(){return zk(Le.objectKeys(this.shape))}}xt.create=(e,t)=>new xt({shape:()=>e,unknownKeys:"strip",catchall:co.create(),typeName:ye.ZodObject,..._e(t)});xt.strictCreate=(e,t)=>new xt({shape:()=>e,unknownKeys:"strict",catchall:co.create(),typeName:ye.ZodObject,..._e(t)});xt.lazycreate=(e,t)=>new xt({shape:e,unknownKeys:"strip",catchall:co.create(),typeName:ye.ZodObject,..._e(t)});class Rl extends Re{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new Mn(a.ctx.common.issues));return ee(n,{code:V.invalid_union,unionErrors:i}),we}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!s&&(s={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new Mn(l));return ee(n,{code:V.invalid_union,unionErrors:a}),we}}get options(){return this._def.options}}Rl.create=(e,t)=>new Rl({options:e,typeName:ye.ZodUnion,..._e(t)});const Vr=e=>e instanceof jl?Vr(e.schema):e instanceof hr?Vr(e.innerType()):e instanceof Dl?[e.value]:e instanceof es?e.options:e instanceof Ml?Le.objectValues(e.enum):e instanceof Ol?Vr(e._def.innerType):e instanceof El?[void 0]:e instanceof Tl?[null]:e instanceof Rr?[void 0,...Vr(e.unwrap())]:e instanceof ts?[null,...Vr(e.unwrap())]:e instanceof yv||e instanceof Il?Vr(e.unwrap()):e instanceof Al?Vr(e._def.innerType):[];class pf extends Re{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.object)return ee(n,{code:V.invalid_type,expected:oe.object,received:n.parsedType}),we;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:V.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=Vr(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new pf({typeName:ye.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._e(r)})}}function Wp(e,t){const n=Do(e),r=Do(t);if(e===t)return{valid:!0,data:e};if(n===oe.object&&r===oe.object){const o=Le.objectKeys(t),s=Le.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Wp(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===oe.array&&r===oe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Wp(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===oe.date&&r===oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Nl extends Re{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(Vp(s)||Vp(i))return we;const a=Wp(s.value,i.value);return a.valid?((zp(s)||zp(i))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:V.invalid_intersection_types}),we)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Nl.create=(e,t,n)=>new Nl({left:e,right:t,typeName:ye.ZodIntersection,..._e(n)});class Dr extends Re{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.array)return ee(r,{code:V.invalid_type,expected:oe.array,received:r.parsedType}),we;if(r.data.length<this._def.items.length)return ee(r,{code:V.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&r.data.length>this._def.items.length&&(ee(r,{code:V.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new jr(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>tn.mergeArray(n,i)):tn.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Dr({...this._def,rest:t})}}Dr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Dr({items:e,typeName:ye.ZodTuple,rest:null,..._e(t)})};class Pl extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.object)return ee(r,{code:V.invalid_type,expected:oe.object,received:r.parsedType}),we;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new jr(r,a,r.path,a)),value:i._parse(new jr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?tn.mergeObjectAsync(n,o):tn.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Re?new Pl({keyType:t,valueType:n,typeName:ye.ZodRecord,..._e(r)}):new Pl({keyType:or.create(),valueType:t,typeName:ye.ZodRecord,..._e(n)})}}class dd extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.map)return ee(r,{code:V.invalid_type,expected:oe.map,received:r.parsedType}),we;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],u)=>({key:o._parse(new jr(r,a,r.path,[u,"key"])),value:s._parse(new jr(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return we;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return we;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}dd.create=(e,t,n)=>new dd({valueType:t,keyType:e,typeName:ye.ZodMap,..._e(n)});class Ls extends Re{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.set)return ee(r,{code:V.invalid_type,expected:oe.set,received:r.parsedType}),we;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ee(r,{code:V.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ee(r,{code:V.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const u=new Set;for(const d of l){if(d.status==="aborted")return we;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>s._parse(new jr(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Ls({...this._def,minSize:{value:t,message:fe.toString(n)}})}max(t,n){return new Ls({...this._def,maxSize:{value:t,message:fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ls.create=(e,t)=>new Ls({valueType:e,minSize:null,maxSize:null,typeName:ye.ZodSet,..._e(t)});class Mi extends Re{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.function)return ee(n,{code:V.invalid_type,expected:oe.function,received:n.parsedType}),we;function r(a,l){return ad({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,id(),Wi].filter(u=>!!u),issueData:{code:V.invalid_arguments,argumentsError:l}})}function o(a,l){return ad({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,id(),Wi].filter(u=>!!u),issueData:{code:V.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Hi){const a=this;return cn(async function(...l){const u=new Mn([]),d=await a._def.args.parseAsync(l,s).catch(x=>{throw u.addIssue(r(l,x)),u}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,s).catch(x=>{throw u.addIssue(o(f,x)),u})})}else{const a=this;return cn(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Mn([r(l,u.error)]);const d=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(d,s);if(!f.success)throw new Mn([o(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Mi({...this._def,args:Dr.create(t).rest(ks.create())})}returns(t){return new Mi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Mi({args:t||Dr.create([]).rest(ks.create()),returns:n||ks.create(),typeName:ye.ZodFunction,..._e(r)})}}class jl extends Re{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}jl.create=(e,t)=>new jl({getter:e,typeName:ye.ZodLazy,..._e(t)});class Dl extends Re{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:V.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:t.data}}get value(){return this._def.value}}Dl.create=(e,t)=>new Dl({value:e,typeName:ye.ZodLiteral,..._e(t)});function zk(e,t){return new es({values:e,typeName:ye.ZodEnum,..._e(t)})}class es extends Re{constructor(){super(...arguments),ja.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:Le.joinValues(r),received:n.parsedType,code:V.invalid_type}),we}if(ld(this,ja)||Fk(this,ja,new Set(this._def.values)),!ld(this,ja).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:V.invalid_enum_value,options:r}),we}return cn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return es.create(t,{...this._def,...n})}exclude(t,n=this._def){return es.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ja=new WeakMap;es.create=zk;class Ml extends Re{constructor(){super(...arguments),Da.set(this,void 0)}_parse(t){const n=Le.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==oe.string&&r.parsedType!==oe.number){const o=Le.objectValues(n);return ee(r,{expected:Le.joinValues(o),received:r.parsedType,code:V.invalid_type}),we}if(ld(this,Da)||Fk(this,Da,new Set(Le.getValidEnumValues(this._def.values))),!ld(this,Da).has(t.data)){const o=Le.objectValues(n);return ee(r,{received:r.data,code:V.invalid_enum_value,options:o}),we}return cn(t.data)}get enum(){return this._def.values}}Da=new WeakMap;Ml.create=(e,t)=>new Ml({values:e,typeName:ye.ZodNativeEnum,..._e(t)});class Hi extends Re{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.promise&&n.common.async===!1)return ee(n,{code:V.invalid_type,expected:oe.promise,received:n.parsedType}),we;const r=n.parsedType===oe.promise?n.data:Promise.resolve(n.data);return cn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Hi.create=(e,t)=>new Hi({type:e,typeName:ye.ZodPromise,..._e(t)});class hr extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{ee(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return we;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?we:l.status==="dirty"||n.value==="dirty"?xi(l.value):l});{if(n.value==="aborted")return we;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?we:a.status==="dirty"||n.value==="dirty"?xi(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?we:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?we:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!bl(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>bl(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Le.assertNever(o)}}hr.create=(e,t,n)=>new hr({schema:e,typeName:ye.ZodEffects,effect:t,..._e(n)});hr.createWithPreprocess=(e,t,n)=>new hr({schema:t,effect:{type:"preprocess",transform:e},typeName:ye.ZodEffects,..._e(n)});class Rr extends Re{_parse(t){return this._getType(t)===oe.undefined?cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rr.create=(e,t)=>new Rr({innerType:e,typeName:ye.ZodOptional,..._e(t)});class ts extends Re{_parse(t){return this._getType(t)===oe.null?cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ts.create=(e,t)=>new ts({innerType:e,typeName:ye.ZodNullable,..._e(t)});class Ol extends Re{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===oe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ol.create=(e,t)=>new Ol({innerType:e,typeName:ye.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class Al extends Re{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Cl(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Mn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Mn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Al.create=(e,t)=>new Al({innerType:e,typeName:ye.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class fd extends Re{_parse(t){if(this._getType(t)!==oe.nan){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:oe.nan,received:r.parsedType}),we}return{status:"valid",value:t.data}}}fd.create=e=>new fd({typeName:ye.ZodNaN,..._e(e)});const eV=Symbol("zod_brand");class yv extends Re{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class lc extends Re{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?we:s.status==="dirty"?(n.dirty(),xi(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?we:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new lc({in:t,out:n,typeName:ye.ZodPipeline})}}class Il extends Re{_parse(t){const n=this._def.innerType._parse(t),r=o=>(bl(o)&&(o.value=Object.freeze(o.value)),o);return Cl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:ye.ZodReadonly,..._e(t)});function Wk(e,t={},n){return e?Yi.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...u,fatal:l})}}):Yi.create()}const tV={object:xt.lazycreate};var ye;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ye||(ye={}));const nV=(e,t={message:`Input not instance of ${e.name}`})=>Wk(n=>n instanceof e,t),Yk=or.create,Hk=Qo.create,rV=fd.create,oV=Jo.create,Bk=kl.create,sV=Is.create,iV=cd.create,aV=El.create,lV=Tl.create,cV=Yi.create,uV=ks.create,dV=co.create,fV=ud.create,hV=ar.create,pV=xt.create,mV=xt.strictCreate,gV=Rl.create,vV=pf.create,yV=Nl.create,xV=Dr.create,wV=Pl.create,SV=dd.create,_V=Ls.create,bV=Mi.create,CV=jl.create,kV=Dl.create,EV=es.create,TV=Ml.create,RV=Hi.create,cw=hr.create,NV=Rr.create,PV=ts.create,jV=hr.createWithPreprocess,DV=lc.create,MV=()=>Yk().optional(),OV=()=>Hk().optional(),AV=()=>Bk().optional(),IV={string:e=>or.create({...e,coerce:!0}),number:e=>Qo.create({...e,coerce:!0}),boolean:e=>kl.create({...e,coerce:!0}),bigint:e=>Jo.create({...e,coerce:!0}),date:e=>Is.create({...e,coerce:!0})},LV=we;var Ie=Object.freeze({__proto__:null,defaultErrorMap:Wi,setErrorMap:L$,getErrorMap:id,makeIssue:ad,EMPTY_PATH:F$,addIssueToContext:ee,ParseStatus:tn,INVALID:we,DIRTY:xi,OK:cn,isAborted:Vp,isDirty:zp,isValid:bl,isAsync:Cl,get util(){return Le},get objectUtil(){return $p},ZodParsedType:oe,getParsedType:Do,ZodType:Re,datetimeRegex:Vk,ZodString:or,ZodNumber:Qo,ZodBigInt:Jo,ZodBoolean:kl,ZodDate:Is,ZodSymbol:cd,ZodUndefined:El,ZodNull:Tl,ZodAny:Yi,ZodUnknown:ks,ZodNever:co,ZodVoid:ud,ZodArray:ar,ZodObject:xt,ZodUnion:Rl,ZodDiscriminatedUnion:pf,ZodIntersection:Nl,ZodTuple:Dr,ZodRecord:Pl,ZodMap:dd,ZodSet:Ls,ZodFunction:Mi,ZodLazy:jl,ZodLiteral:Dl,ZodEnum:es,ZodNativeEnum:Ml,ZodPromise:Hi,ZodEffects:hr,ZodTransformer:hr,ZodOptional:Rr,ZodNullable:ts,ZodDefault:Ol,ZodCatch:Al,ZodNaN:fd,BRAND:eV,ZodBranded:yv,ZodPipeline:lc,ZodReadonly:Il,custom:Wk,Schema:Re,ZodSchema:Re,late:tV,get ZodFirstPartyTypeKind(){return ye},coerce:IV,any:cV,array:hV,bigint:oV,boolean:Bk,date:sV,discriminatedUnion:vV,effect:cw,enum:EV,function:bV,instanceof:nV,intersection:yV,lazy:CV,literal:kV,map:SV,nan:rV,nativeEnum:TV,never:dV,null:lV,nullable:PV,number:Hk,object:pV,oboolean:AV,onumber:OV,optional:NV,ostring:MV,pipeline:DV,preprocess:jV,promise:RV,record:wV,set:_V,strictObject:mV,string:Yk,symbol:iV,transformer:cw,tuple:xV,undefined:aV,union:gV,unknown:uV,void:fV,NEVER:LV,ZodIssueCode:V,quotelessJson:I$,ZodError:Mn}),FV="Label",Gk=h.forwardRef((e,t)=>c.jsx(ve.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())}}));Gk.displayName=FV;var Kk=Gk;const UV=Wl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ll=h.forwardRef(({className:e,...t},n)=>c.jsx(Kk,{ref:n,className:se(UV(),e),...t}));Ll.displayName=Kk.displayName;const cc=y$,Zk=h.createContext({}),tt=({...e})=>c.jsx(Zk.Provider,{value:{name:e.name},children:c.jsx(_$,{...e})}),mf=()=>{const e=h.useContext(Zk),t=h.useContext(qk),{getFieldState:n,formState:r}=hf(),o=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},qk=h.createContext({}),qe=h.forwardRef(({className:e,...t},n)=>{const r=h.useId();return c.jsx(qk.Provider,{value:{id:r},children:c.jsx("div",{ref:n,className:se("space-y-2",e),...t})})});qe.displayName="FormItem";const Xe=h.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:o}=mf();return c.jsx(Ll,{ref:n,className:se(r&&"text-destructive",e),htmlFor:o,...t})});Xe.displayName="FormLabel";const Qe=h.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:s}=mf();return c.jsx(oo,{ref:t,id:r,"aria-describedby":n?`${o} ${s}`:`${o}`,"aria-invalid":!!n,...e})});Qe.displayName="FormControl";const $V=h.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=mf();return c.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})});$V.displayName="FormDescription";const Be=h.forwardRef(({className:e,children:t,...n},r)=>{const{error:o,formMessageId:s}=mf(),i=o?String(o==null?void 0:o.message):t;return i?c.jsx("p",{ref:r,id:s,className:se("text-sm font-medium text-destructive",e),...n,children:i}):null});Be.displayName="FormMessage";function Yp(e,[t,n]){return Math.min(n,Math.max(t,e))}var VV=[" ","Enter","ArrowUp","ArrowDown"],zV=[" ","Enter"],uc="Select",[gf,vf,WV]=Ld(uc),[ia,d3]=_n(uc,[WV,na]),yf=na(),[YV,ls]=ia(uc),[HV,BV]=ia(uc),Xk=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:x}=e,g=yf(t),[y,S]=h.useState(null),[v,m]=h.useState(null),[w,b]=h.useState(!1),C=Yl(u),[_=!1,R]=so({prop:r,defaultProp:o,onChange:s}),[N,D]=so({prop:i,defaultProp:a,onChange:l}),O=h.useRef(null),B=y?!!y.closest("form"):!0,[A,H]=h.useState(new Set),L=Array.from(A).map(K=>K.props.value).join(";");return c.jsx(pg,{...g,children:c.jsxs(YV,{required:x,scope:t,trigger:y,onTriggerChange:S,valueNode:v,onValueNodeChange:m,valueNodeHasChildren:w,onValueNodeHasChildrenChange:b,contentId:Tr(),value:N,onValueChange:D,open:_,onOpenChange:R,dir:C,triggerPointerDownPosRef:O,disabled:p,children:[c.jsx(gf.Provider,{scope:t,children:c.jsx(HV,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(K=>{H(ne=>new Set(ne).add(K))},[]),onNativeOptionRemove:h.useCallback(K=>{H(ne=>{const W=new Set(ne);return W.delete(K),W})},[]),children:n})}),B?c.jsxs(bE,{"aria-hidden":!0,required:x,tabIndex:-1,name:d,autoComplete:f,value:N,onChange:K=>D(K.target.value),disabled:p,children:[N===void 0?c.jsx("option",{value:""}):null,Array.from(A)]},L):null]})})};Xk.displayName=uc;var Qk="SelectTrigger",Jk=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=yf(n),i=ls(Qk,n),a=i.disabled||r,l=be(t,i.onTriggerChange),u=vf(n),[d,f,p]=CE(g=>{const y=u().filter(m=>!m.disabled),S=y.find(m=>m.value===i.value),v=kE(y,g,S);v!==void 0&&i.onValueChange(v.value)}),x=()=>{a||(i.onOpenChange(!0),p())};return c.jsx(mg,{asChild:!0,...s,children:c.jsx(ve.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":_E(i.value)?"":void 0,...o,ref:l,onClick:G(o.onClick,g=>{g.currentTarget.focus()}),onPointerDown:G(o.onPointerDown,g=>{const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(x(),i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:G(o.onKeyDown,g=>{const y=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(y&&g.key===" ")&&VV.includes(g.key)&&(x(),g.preventDefault())})})})});Jk.displayName=Qk;var eE="SelectValue",tE=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=ls(eE,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=be(t,l.onValueNodeChange);return Kt(()=>{u(d)},[u,d]),c.jsx(ve.span,{...a,ref:f,style:{pointerEvents:"none"},children:_E(l.value)?c.jsx(c.Fragment,{children:i}):s})});tE.displayName=eE;var GV="SelectIcon",nE=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsx(ve.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nE.displayName=GV;var KV="SelectPortal",rE=e=>c.jsx(Bl,{asChild:!0,...e});rE.displayName=KV;var Fs="SelectContent",oE=h.forwardRef((e,t)=>{const n=ls(Fs,e.__scopeSelect),[r,o]=h.useState();if(Kt(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?fo.createPortal(c.jsx(sE,{scope:e.__scopeSelect,children:c.jsx(gf.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),s):null}return c.jsx(iE,{...e,ref:t})});oE.displayName=Fs;var Yr=10,[sE,cs]=ia(Fs),ZV="SelectContentImpl",iE=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:x,sticky:g,hideWhenDetached:y,avoidCollisions:S,...v}=e,m=ls(Fs,n),[w,b]=h.useState(null),[C,_]=h.useState(null),R=be(t,ce=>b(ce)),[N,D]=h.useState(null),[O,B]=h.useState(null),A=vf(n),[H,L]=h.useState(!1),K=h.useRef(!1);h.useEffect(()=>{if(w)return yg(w)},[w]),og();const ne=h.useCallback(ce=>{const[De,...He]=A().map(Se=>Se.ref.current),[$e]=He.slice(-1),Ve=document.activeElement;for(const Se of ce)if(Se===Ve||(Se==null||Se.scrollIntoView({block:"nearest"}),Se===De&&C&&(C.scrollTop=0),Se===$e&&C&&(C.scrollTop=C.scrollHeight),Se==null||Se.focus(),document.activeElement!==Ve))return},[A,C]),W=h.useCallback(()=>ne([N,w]),[ne,N,w]);h.useEffect(()=>{H&&W()},[H,W]);const{onOpenChange:F,triggerPointerDownPosRef:M}=m;h.useEffect(()=>{if(w){let ce={x:0,y:0};const De=$e=>{var Ve,Se;ce={x:Math.abs(Math.round($e.pageX)-(((Ve=M.current)==null?void 0:Ve.x)??0)),y:Math.abs(Math.round($e.pageY)-(((Se=M.current)==null?void 0:Se.y)??0))}},He=$e=>{ce.x<=10&&ce.y<=10?$e.preventDefault():w.contains($e.target)||F(!1),document.removeEventListener("pointermove",De),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",De),document.addEventListener("pointerup",He,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",De),document.removeEventListener("pointerup",He,{capture:!0})}}},[w,F,M]),h.useEffect(()=>{const ce=()=>F(!1);return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[F]);const[X,le]=CE(ce=>{const De=A().filter(Ve=>!Ve.disabled),He=De.find(Ve=>Ve.ref.current===document.activeElement),$e=kE(De,ce,He);$e&&setTimeout(()=>$e.ref.current.focus())}),me=h.useCallback((ce,De,He)=>{const $e=!K.current&&!He;(m.value!==void 0&&m.value===De||$e)&&(D(ce),$e&&(K.current=!0))},[m.value]),rt=h.useCallback(()=>w==null?void 0:w.focus(),[w]),je=h.useCallback((ce,De,He)=>{const $e=!K.current&&!He;(m.value!==void 0&&m.value===De||$e)&&B(ce)},[m.value]),gt=r==="popper"?Hp:aE,Ue=gt===Hp?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:x,sticky:g,hideWhenDetached:y,avoidCollisions:S}:{};return c.jsx(sE,{scope:n,content:w,viewport:C,onViewportChange:_,itemRefCallback:me,selectedItem:N,onItemLeave:rt,itemTextRefCallback:je,focusSelectedItem:W,selectedItemText:O,position:r,isPositioned:H,searchRef:X,children:c.jsx(Yd,{as:oo,allowPinchZoom:!0,children:c.jsx(Fd,{asChild:!0,trapped:m.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:G(o,ce=>{var De;(De=m.trigger)==null||De.focus({preventScroll:!0}),ce.preventDefault()}),children:c.jsx(Ji,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:c.jsx(gt,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:ce=>ce.preventDefault(),...v,...Ue,onPlaced:()=>L(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:G(v.onKeyDown,ce=>{const De=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!De&&ce.key.length===1&&le(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let $e=A().filter(Ve=>!Ve.disabled).map(Ve=>Ve.ref.current);if(["ArrowUp","End"].includes(ce.key)&&($e=$e.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const Ve=ce.target,Se=$e.indexOf(Ve);$e=$e.slice(Se+1)}setTimeout(()=>ne($e)),ce.preventDefault()}})})})})})})});iE.displayName=ZV;var qV="SelectItemAlignedPosition",aE=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=ls(Fs,n),i=cs(Fs,n),[a,l]=h.useState(null),[u,d]=h.useState(null),f=be(t,R=>d(R)),p=vf(n),x=h.useRef(!1),g=h.useRef(!0),{viewport:y,selectedItem:S,selectedItemText:v,focusSelectedItem:m}=i,w=h.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&y&&S&&v){const R=s.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),D=s.valueNode.getBoundingClientRect(),O=v.getBoundingClientRect();if(s.dir!=="rtl"){const Ve=O.left-N.left,Se=D.left-Ve,vt=R.left-Se,Zt=R.width+vt,xo=Math.max(Zt,N.width),pn=window.innerWidth-Yr,wo=Yp(Se,[Yr,pn-xo]);a.style.minWidth=Zt+"px",a.style.left=wo+"px"}else{const Ve=N.right-O.right,Se=window.innerWidth-D.right-Ve,vt=window.innerWidth-R.right-Se,Zt=R.width+vt,xo=Math.max(Zt,N.width),pn=window.innerWidth-Yr,wo=Yp(Se,[Yr,pn-xo]);a.style.minWidth=Zt+"px",a.style.right=wo+"px"}const B=p(),A=window.innerHeight-Yr*2,H=y.scrollHeight,L=window.getComputedStyle(u),K=parseInt(L.borderTopWidth,10),ne=parseInt(L.paddingTop,10),W=parseInt(L.borderBottomWidth,10),F=parseInt(L.paddingBottom,10),M=K+ne+H+F+W,X=Math.min(S.offsetHeight*5,M),le=window.getComputedStyle(y),me=parseInt(le.paddingTop,10),rt=parseInt(le.paddingBottom,10),je=R.top+R.height/2-Yr,gt=A-je,Ue=S.offsetHeight/2,ce=S.offsetTop+Ue,De=K+ne+ce,He=M-De;if(De<=je){const Ve=S===B[B.length-1].ref.current;a.style.bottom="0px";const Se=u.clientHeight-y.offsetTop-y.offsetHeight,vt=Math.max(gt,Ue+(Ve?rt:0)+Se+W),Zt=De+vt;a.style.height=Zt+"px"}else{const Ve=S===B[0].ref.current;a.style.top="0px";const vt=Math.max(je,K+y.offsetTop+(Ve?me:0)+Ue)+He;a.style.height=vt+"px",y.scrollTop=De-je+y.offsetTop}a.style.margin=`${Yr}px 0`,a.style.minHeight=X+"px",a.style.maxHeight=A+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[p,s.trigger,s.valueNode,a,u,y,S,v,s.dir,r]);Kt(()=>w(),[w]);const[b,C]=h.useState();Kt(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const _=h.useCallback(R=>{R&&g.current===!0&&(w(),m==null||m(),g.current=!1)},[w,m]);return c.jsx(QV,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:_,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:c.jsx(ve.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});aE.displayName=qV;var XV="SelectPopperPosition",Hp=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yr,...s}=e,i=yf(n);return c.jsx(gg,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Hp.displayName=XV;var[QV,xv]=ia(Fs,{}),Bp="SelectViewport",lE=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=cs(Bp,n),i=xv(Bp,n),a=be(t,s.onViewportChange),l=h.useRef(0);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(gf.Slot,{scope:n,children:c.jsx(ve.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:G(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&f){const x=Math.abs(l.current-d.scrollTop);if(x>0){const g=window.innerHeight-Yr*2,y=parseFloat(f.style.minHeight),S=parseFloat(f.style.height),v=Math.max(y,S);if(v<g){const m=v+x,w=Math.min(g,m),b=m-w;f.style.height=w+"px",f.style.bottom==="0px"&&(d.scrollTop=b>0?b:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});lE.displayName=Bp;var cE="SelectGroup",[JV,ez]=ia(cE),uE=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Tr();return c.jsx(JV,{scope:n,id:o,children:c.jsx(ve.div,{role:"group","aria-labelledby":o,...r,ref:t})})});uE.displayName=cE;var dE="SelectLabel",fE=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ez(dE,n);return c.jsx(ve.div,{id:o.id,...r,ref:t})});fE.displayName=dE;var hd="SelectItem",[tz,hE]=ia(hd),pE=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=ls(hd,n),l=cs(hd,n),u=a.value===r,[d,f]=h.useState(s??""),[p,x]=h.useState(!1),g=be(t,v=>{var m;return(m=l.itemRefCallback)==null?void 0:m.call(l,v,r,o)}),y=Tr(),S=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(tz,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:h.useCallback(v=>{f(m=>m||((v==null?void 0:v.textContent)??"").trim())},[]),children:c.jsx(gf.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:c.jsx(ve.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:g,onFocus:G(i.onFocus,()=>x(!0)),onBlur:G(i.onBlur,()=>x(!1)),onPointerUp:G(i.onPointerUp,S),onPointerMove:G(i.onPointerMove,v=>{var m;o?(m=l.onItemLeave)==null||m.call(l):v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(i.onPointerLeave,v=>{var m;v.currentTarget===document.activeElement&&((m=l.onItemLeave)==null||m.call(l))}),onKeyDown:G(i.onKeyDown,v=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&v.key===" "||(zV.includes(v.key)&&S(),v.key===" "&&v.preventDefault())})})})})});pE.displayName=hd;var Ma="SelectItemText",mE=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=ls(Ma,n),a=cs(Ma,n),l=hE(Ma,n),u=BV(Ma,n),[d,f]=h.useState(null),p=be(t,v=>f(v),l.onItemTextChange,v=>{var m;return(m=a.itemTextRefCallback)==null?void 0:m.call(a,v,l.value,l.disabled)}),x=d==null?void 0:d.textContent,g=h.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:x},l.value),[l.disabled,l.value,x]),{onNativeOptionAdd:y,onNativeOptionRemove:S}=u;return Kt(()=>(y(g),()=>S(g)),[y,S,g]),c.jsxs(c.Fragment,{children:[c.jsx(ve.span,{id:l.textId,...s,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?fo.createPortal(s.children,i.valueNode):null]})});mE.displayName=Ma;var gE="SelectItemIndicator",vE=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return hE(gE,n).isSelected?c.jsx(ve.span,{"aria-hidden":!0,...r,ref:t}):null});vE.displayName=gE;var Gp="SelectScrollUpButton",yE=h.forwardRef((e,t)=>{const n=cs(Gp,e.__scopeSelect),r=xv(Gp,e.__scopeSelect),[o,s]=h.useState(!1),i=be(t,r.onScrollButtonChange);return Kt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?c.jsx(wE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});yE.displayName=Gp;var Kp="SelectScrollDownButton",xE=h.forwardRef((e,t)=>{const n=cs(Kp,e.__scopeSelect),r=xv(Kp,e.__scopeSelect),[o,s]=h.useState(!1),i=be(t,r.onScrollButtonChange);return Kt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?c.jsx(wE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});xE.displayName=Kp;var wE=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=cs("SelectScrollButton",n),i=h.useRef(null),a=vf(n),l=h.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),Kt(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),c.jsx(ve.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:G(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:G(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:G(o.onPointerLeave,()=>{l()})})}),nz="SelectSeparator",SE=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(ve.div,{"aria-hidden":!0,...r,ref:t})});SE.displayName=nz;var Zp="SelectArrow",rz=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=yf(n),s=ls(Zp,n),i=cs(Zp,n);return s.open&&i.position==="popper"?c.jsx(vg,{...o,...r,ref:t}):null});rz.displayName=Zp;function _E(e){return e===""||e===void 0}var bE=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=h.useRef(null),s=be(t,o),i=sv(n);return h.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[i,n]),c.jsx(oc,{asChild:!0,children:c.jsx("select",{...r,ref:s,defaultValue:n})})});bE.displayName="BubbleSelect";function CE(e){const t=_t(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(i=>{const a=n.current+i;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function kE(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=oz(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function oz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sz=Xk,EE=Jk,iz=tE,az=nE,lz=rE,TE=oE,cz=lE,uz=uE,RE=fE,NE=pE,dz=mE,fz=vE,PE=yE,jE=xE,DE=SE;const uw=sz,dw=uz,fw=iz,qp=h.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(EE,{ref:r,className:se("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,c.jsx(az,{asChild:!0,children:c.jsx(qS,{className:"h-4 w-4 opacity-50"})})]}));qp.displayName=EE.displayName;const ME=h.forwardRef(({className:e,...t},n)=>c.jsx(PE,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Ij,{className:"h-4 w-4"})}));ME.displayName=PE.displayName;const OE=h.forwardRef(({className:e,...t},n)=>c.jsx(jE,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(qS,{className:"h-4 w-4"})}));OE.displayName=jE.displayName;const Xp=h.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>c.jsx(lz,{children:c.jsxs(TE,{ref:o,className:se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[c.jsx(ME,{}),c.jsx(cz,{className:se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(OE,{})]})}));Xp.displayName=TE.displayName;const Qp=h.forwardRef(({className:e,...t},n)=>c.jsx(RE,{ref:n,className:se("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Qp.displayName=RE.displayName;const Jp=h.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(NE,{ref:r,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(fz,{children:c.jsx(ZS,{className:"h-4 w-4"})})}),c.jsx(dz,{children:t})]}));Jp.displayName=NE.displayName;const hz=h.forwardRef(({className:e,...t},n)=>c.jsx(DE,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));hz.displayName=DE.displayName;const em=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),pz=Array.from(em.keys()),mz=jg,gz=Dg,vz=Mg,AE=h.forwardRef(({className:e,...t},n)=>c.jsx(Zl,{ref:n,className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));AE.displayName=Zl.displayName;const IE=h.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(vz,{children:[c.jsx(AE,{}),c.jsxs(ql,{ref:r,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,c.jsxs(Gd,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(Jm,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));IE.displayName=ql.displayName;const LE=({className:e,...t})=>c.jsx("div",{className:se("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});LE.displayName="DialogHeader";const FE=h.forwardRef(({className:e,...t},n)=>c.jsx(Xl,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t}));FE.displayName=Xl.displayName;const yz=h.forwardRef(({className:e,...t},n)=>c.jsx(Ql,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));yz.displayName=Ql.displayName;const Es=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),wv=Ie.union([Ie.literal("aliyun"),Ie.literal("tencent"),Ie.literal("ssh")],{message:"请选择云服务商"}),xz=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=rc(),o=Ie.object({id:Ie.string().optional(),name:Ie.string().min(1).max(64),configType:wv,secretId:Ie.string().min(1).max(64),secretKey:Ie.string().min(1).max(64)});let s={secretId:"",secretKey:""};e&&(s=e.config);const i=ic({resolver:ac(o),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:s.secretId,secretKey:s.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,config:{secretId:l.secretId,secretKey:l.secretKey}};try{const d=await ov(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){r(u);return}n(u)}catch(d){Object.entries(d.response.data).forEach(([p,x])=>{i.setError(p,{type:"manual",message:x.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(cc,{...i,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(tt,{control:i.control,name:"name",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"名称"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入授权名称",...l})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"id",render:({field:l})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Xe,{children:"配置类型"}),c.jsx(Qe,{children:c.jsx(ct,{...l})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Xe,{children:"配置类型"}),c.jsx(Qe,{children:c.jsx(ct,{...l})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"secretId",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"SecretId"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入SecretId",...l})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"secretKey",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"SecretKey"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入SecretKey",...l})}),c.jsx(Be,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Dt,{type:"submit",children:"保存"})})]})})})})},wz=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=rc(),o=Ie.object({id:Ie.string().optional(),name:Ie.string().min(1).max(64),configType:wv,accessKeyId:Ie.string().min(1).max(64),accessSecretId:Ie.string().min(1).max(64)});let s={accessKeyId:"",accessKeySecret:""};e&&(s=e.config);const i=ic({resolver:ac(o),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:s.accessKeyId,accessSecretId:s.accessKeySecret}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const d=await ov(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){r(u);return}n(u)}catch(d){Object.entries(d.response.data).forEach(([p,x])=>{i.setError(p,{type:"manual",message:x.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(cc,{...i,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(tt,{control:i.control,name:"name",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"名称"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入授权名称",...l})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"id",render:({field:l})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Xe,{children:"配置类型"}),c.jsx(Qe,{children:c.jsx(ct,{...l})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Xe,{children:"配置类型"}),c.jsx(Qe,{children:c.jsx(ct,{...l})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"accessKeyId",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"AccessKeyId"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入AccessKeyId",...l})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"accessSecretId",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"AccessKeySecret"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入AccessKeySecret",...l})}),c.jsx(Be,{})]})}),c.jsx(Be,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Dt,{type:"submit",children:"保存"})})]})})})})};var Sv="Radio",[Sz,UE]=_n(Sv),[_z,bz]=Sz(Sv),$E=h.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:l,...u}=e,[d,f]=h.useState(null),p=be(t,y=>f(y)),x=h.useRef(!1),g=d?!!d.closest("form"):!0;return c.jsxs(_z,{scope:n,checked:o,disabled:i,children:[c.jsx(ve.button,{type:"button",role:"radio","aria-checked":o,"data-state":WE(o),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:p,onClick:G(e.onClick,y=>{o||l==null||l(),g&&(x.current=y.isPropagationStopped(),x.current||y.stopPropagation())})}),g&&c.jsx(Cz,{control:d,bubbles:!x.current,name:r,value:a,checked:o,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});$E.displayName=Sv;var VE="RadioIndicator",zE=h.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=bz(VE,n);return c.jsx(fn,{present:r||s.checked,children:c.jsx(ve.span,{"data-state":WE(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});zE.displayName=VE;var Cz=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,s=h.useRef(null),i=sv(n),a=dg(t);return h.useEffect(()=>{const l=s.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const p=new Event("click",{bubbles:r});f.call(l,n),l.dispatchEvent(p)}},[i,n,r]),c.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function WE(e){return e?"checked":"unchecked"}var kz=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_v="RadioGroup",[Ez,f3]=_n(_v,[zd,UE]),YE=zd(),HE=UE(),[Tz,Rz]=Ez(_v),BE=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...p}=e,x=YE(n),g=Yl(u),[y,S]=so({prop:s,defaultProp:o,onChange:f});return c.jsx(Tz,{scope:n,name:r,required:i,disabled:a,value:y,onValueChange:S,children:c.jsx(A_,{asChild:!0,...x,orientation:l,dir:g,loop:d,children:c.jsx(ve.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g,...p,ref:t})})})});BE.displayName=_v;var GE="RadioGroupItem",KE=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=Rz(GE,n),i=s.disabled||r,a=YE(n),l=HE(n),u=h.useRef(null),d=be(t,u),f=s.value===o.value,p=h.useRef(!1);return h.useEffect(()=>{const x=y=>{kz.includes(y.key)&&(p.current=!0)},g=()=>p.current=!1;return document.addEventListener("keydown",x),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",x),document.removeEventListener("keyup",g)}},[]),c.jsx(I_,{asChild:!0,...a,focusable:!i,active:f,children:c.jsx($E,{disabled:i,required:s.required,checked:f,...l,...o,name:s.name,ref:d,onCheck:()=>s.onValueChange(o.value),onKeyDown:G(x=>{x.key==="Enter"&&x.preventDefault()}),onFocus:G(o.onFocus,()=>{var x;p.current&&((x=u.current)==null||x.click())})})})});KE.displayName=GE;var Nz="RadioGroupIndicator",ZE=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=HE(n);return c.jsx(zE,{...o,...r,ref:t})});ZE.displayName=Nz;var qE=BE,XE=KE,Pz=ZE;const bv=h.forwardRef(({className:e,...t},n)=>c.jsx(qE,{className:se("grid gap-2",e),...t,ref:n}));bv.displayName=qE.displayName;const Cv=h.forwardRef(({className:e,...t},n)=>c.jsx(XE,{ref:n,className:se("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:c.jsx(Pz,{className:"flex items-center justify-center",children:c.jsx(JS,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Cv.displayName=XE.displayName;const QE=h.forwardRef(({className:e,...t},n)=>c.jsx("textarea",{className:se("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));QE.displayName="Textarea";function jz(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{r.result?t(r.result.toString()):n("No content found")},r.onerror=()=>n(r.error),r.readAsText(e)})}const Dz=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=rc(),o=Ie.object({id:Ie.string().optional(),name:Ie.string().min(1).max(64),configType:wv,host:Ie.string().ip({message:"请输入合法的IP地址"}),port:Ie.string().min(1).max(5),username:Ie.string().min(1).max(64),password:Ie.string().min(0).max(64),key:Ie.string().min(0).max(20480),keyFile:Ie.string().optional(),command:Ie.string().min(1).max(2048),certPath:Ie.string().min(0).max(2048),keyPath:Ie.string().min(0).max(2048)});let s={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(s=e.config);const i=ic({resolver:ac(o),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",host:s.host,port:s.port,username:s.username,password:s.password,key:s.key,keyFile:s.keyFile,certPath:s.certPath,keyPath:s.keyPath,command:s.command}}),a=async u=>{console.log(u);const d={id:u.id,name:u.name,configType:u.configType,config:{host:u.host,port:u.port,username:u.username,password:u.password,key:u.key,command:u.command,certPath:u.certPath,keyPath:u.keyPath}};try{const f=await ov(d);if(t(),d.id=f.id,d.created=f.created,d.updated=f.updated,u.id){r(d);return}n(d)}catch(f){Object.entries(f.response.data).forEach(([x,g])=>{i.setError(x,{type:"manual",message:g.message})});return}},l=async u=>{var p;const d=(p=u.target.files)==null?void 0:p[0];if(!d)return;const f=await jz(d);i.setValue("key",f),i.setValue("keyFile","")};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(cc,{...i,children:c.jsxs("form",{onSubmit:u=>{u.stopPropagation(),i.handleSubmit(a)(u)},className:"space-y-3",children:[c.jsx(tt,{control:i.control,name:"name",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"名称"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入授权名称",...u})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"id",render:({field:u})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Xe,{children:"配置类型"}),c.jsx(Qe,{children:c.jsx(ct,{...u})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"configType",render:({field:u})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Xe,{children:"配置类型"}),c.jsx(Qe,{children:c.jsx(ct,{...u})}),c.jsx(Be,{})]})}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx(tt,{control:i.control,name:"host",render:({field:u})=>c.jsxs(qe,{className:"grow",children:[c.jsx(Xe,{children:"服务器IP"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入Host",...u})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"port",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"SSH端口"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入Port",...u,type:"number"})}),c.jsx(Be,{})]})})]}),c.jsx(tt,{control:i.control,name:"username",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"用户名"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入用户名",...u})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"password",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"密码"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入密码",...u})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"key",render:({field:u})=>c.jsxs(qe,{hidden:!0,children:[c.jsx(Xe,{children:"Key使用证书登录"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入Key",...u})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"keyFile",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"Key使用证书登录"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入Key",...u,type:"file",onChange:l})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"certPath",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"证书上传路径"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入证书上传路径",...u})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"keyPath",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"私钥上传路径"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入私钥上传路径",...u})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:i.control,name:"command",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"Command"}),c.jsx(Qe,{children:c.jsx(QE,{placeholder:"请输入要执行的命令",...u})}),c.jsx(Be,{})]})}),c.jsx(Be,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Dt,{type:"submit",children:"保存"})})]})})})})};function Ga({trigger:e,op:t,data:n,className:r}){const[o,s]=h.useState(!1),i=Array.from(Es.keys()),[a,l]=h.useState((n==null?void 0:n.configType)||"");let u=c.jsx(c.Fragment,{children:" "});switch(a){case"tencent":u=c.jsx(xz,{data:n,onAfterReq:()=>{s(!1)}});break;case"aliyun":u=c.jsx(wz,{data:n,onAfterReq:()=>{s(!1)}});break;case"ssh":u=c.jsx(Dz,{data:n,onAfterReq:()=>{s(!1)}});break}const d=f=>f==a?"border-primary":"";return c.jsxs(mz,{onOpenChange:s,open:o,children:[c.jsx(gz,{asChild:!0,className:se(r),children:e}),c.jsxs(IE,{className:"sm:max-w-[600px] w-full",children:[c.jsx(LE,{children:c.jsxs(FE,{children:[t=="add"?"添加":"编辑","授权"]})}),c.jsxs("div",{className:"container",children:[c.jsx(Ll,{children:"服务商"}),c.jsx(bv,{value:a,className:"flex mt-3 space-x-2",onValueChange:l,children:i.map(f=>{var p,x;return c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx(Cv,{value:f,id:f,hidden:!0}),c.jsx(Ll,{htmlFor:f,children:c.jsxs("div",{className:se("flex items-center space-x-2 border p-2 rounded cursor-pointer",d(f)),children:[c.jsx("img",{src:(p=Es.get(f))==null?void 0:p[1],className:"h-6"}),c.jsx("div",{children:(x=Es.get(f))==null?void 0:x[0]})]})})]},f)})}),u]})]})]})}const Mz=()=>{const{config:{accesses:e}}=rc(),[t,n]=h.useState(),r=is();h.useEffect(()=>{const g=new URLSearchParams(r.search).get("id");g&&(async()=>{const S=await d$(g);n(S)})()},[r.search]);const o=Ie.object({id:Ie.string().optional(),domain:Ie.string().regex(new RegExp("^(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\\.[A-Za-z]{2,6})+$"),{message:"请输入正确的域名"}),access:Ie.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:Ie.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择部署服务商配置"}),targetType:Ie.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"})}),s=ic({resolver:ac(o),defaultValues:{id:"",domain:"",access:"",targetAccess:"",targetType:""}});h.useEffect(()=>{t&&s.reset({id:t.id,domain:t.domain,access:t.access,targetAccess:t.targetAccess,targetType:t.targetType})},[t,s]);const[i,a]=h.useState(t?t.targetType:""),l=e.filter(x=>{if(i=="")return!0;const g=s.getValues().targetType.split("-");return x.configType===g[0]}),{toast:u}=uv(),d=as(),f=async x=>{const g={id:x.id,crontab:"0 0 * * *",domain:x.domain,access:x.access,targetAccess:x.targetAccess,targetType:x.targetType};try{await Up(g);let y="域名编辑成功";g.id==""&&(y="域名添加成功"),u({title:"成功",description:y}),d("/")}catch(y){Object.entries(y.response.data).forEach(([v,m])=>{s.setError(v,{type:"manual",message:m.message})});return}},p=x=>s.getValues().targetType==x?"border-primary":"";return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(fk,{}),c.jsxs("div",{className:"border-b h-10 text-muted-foreground",children:[t!=null&&t.id?"编辑":"新增","域名"]}),c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(cc,{...s,children:c.jsxs("form",{onSubmit:s.handleSubmit(f),className:"space-y-8",children:[c.jsx(tt,{control:s.control,name:"domain",render:({field:x})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"域名"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"请输入域名",...x})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:s.control,name:"access",render:({field:x})=>c.jsxs(qe,{children:[c.jsxs(Xe,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"DNS 服务商授权配置"}),c.jsx(Ga,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(hx,{size:14}),"新增"]}),op:"add"})]}),c.jsx(Qe,{children:c.jsxs(uw,{...x,value:x.value,onValueChange:g=>{s.setValue("access",g)},children:[c.jsx(qp,{children:c.jsx(fw,{placeholder:"请选择授权配置"})}),c.jsx(Xp,{children:c.jsxs(dw,{children:[c.jsx(Qp,{children:"服务商授权配置"}),e.map(g=>{var y;return c.jsx(Jp,{value:g.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(y=Es.get(g.configType))==null?void 0:y[1]}),c.jsx("div",{children:g.name})]})},g.id)})]})})]})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:s.control,name:"targetType",render:({field:x})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"部署服务类型"}),c.jsx(Qe,{children:c.jsx(bv,{className:"flex mt-3 space-x-2",onValueChange:g=>{a(g),s.setValue("targetType",g)},...x,children:pz.map(g=>{var y,S;return c.jsx("div",{className:"flex items-center space-x-2",children:c.jsxs(Ll,{children:[c.jsx(Cv,{value:g,id:g,hidden:!0}),c.jsxs("div",{className:se("flex items-center space-x-2 border p-2 rounded cursor-pointer",p(g)),children:[c.jsx("img",{src:(y=em.get(g))==null?void 0:y[1],className:"h-6"}),c.jsx("div",{children:(S=em.get(g))==null?void 0:S[0]})]})]})},g)})})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:s.control,name:"targetAccess",render:({field:x})=>c.jsxs(qe,{children:[c.jsxs(Xe,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"部署服务商授权配置"}),c.jsx(Ga,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(hx,{size:14}),"新增"]}),op:"add"})]}),c.jsx(Qe,{children:c.jsxs(uw,{...x,onValueChange:g=>{s.setValue("targetAccess",g)},children:[c.jsx(qp,{children:c.jsx(fw,{placeholder:"请选择授权配置"})}),c.jsx(Xp,{children:c.jsxs(dw,{children:[c.jsx(Qp,{children:"服务商授权配置"}),l.map(g=>{var y;return c.jsx(Jp,{value:g.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(y=Es.get(g.configType))==null?void 0:y[1]}),c.jsx("div",{children:g.name})]})},g.id)})]})})]})}),c.jsx(Be,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Dt,{type:"submit",children:"保存"})})]})})})]})})},Oz=()=>{const{config:e,deleteAccess:t}=rc(),{accesses:n}=e,r=async o=>{const s=await z4(o);t(s.id)};return c.jsxs("div",{className:"",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),c.jsx(Ga,{trigger:c.jsx(Dt,{children:"添加授权"}),op:"add"})]}),n.length===0?c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(Fj,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),c.jsx(Ga,{trigger:c.jsx(Dt,{children:"添加授权"}),op:"add",className:"mt-3"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"名称"}),c.jsx("div",{className:"w-48",children:"服务商"}),c.jsx("div",{className:"w-52",children:"创建时间"}),c.jsx("div",{className:"w-52",children:"更新时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),n.map(o=>{var s,i;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:o.name}),c.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[c.jsx("img",{src:(s=Es.get(o.configType))==null?void 0:s[1],className:"w-6"}),c.jsx("div",{children:(i=Es.get(o.configType))==null?void 0:i[0]})]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",o.created&&_l(o.created)]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",o.updated&&_l(o.updated)]}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(Ga,{trigger:c.jsx(Dt,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:o}),c.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Dt,{variant:"link",className:"p-0",onClick:()=>{r(o)},children:"删除"})]})]},o.id)})]})]})},Az=Wl("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),JE=h.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("div",{ref:r,role:"alert",className:se(Az({variant:t}),e),...n}));JE.displayName="Alert";const eT=h.forwardRef(({className:e,...t},n)=>c.jsx("h5",{ref:n,className:se("mb-1 font-medium leading-none tracking-tight",e),...t}));eT.displayName="AlertTitle";const tT=h.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:se("text-sm [&_p]:leading-relaxed",e),...t}));tT.displayName="AlertDescription";function Iz(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var kv="ScrollArea",[nT,h3]=_n(kv),[Lz,Kn]=nT(kv),rT=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[a,l]=h.useState(null),[u,d]=h.useState(null),[f,p]=h.useState(null),[x,g]=h.useState(null),[y,S]=h.useState(null),[v,m]=h.useState(0),[w,b]=h.useState(0),[C,_]=h.useState(!1),[R,N]=h.useState(!1),D=be(t,B=>l(B)),O=Yl(o);return c.jsx(Lz,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:p,scrollbarX:x,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:_,scrollbarY:y,onScrollbarYChange:S,scrollbarYEnabled:R,onScrollbarYEnabledChange:N,onCornerWidthChange:m,onCornerHeightChange:b,children:c.jsx(ve.div,{dir:O,...i,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});rT.displayName=kv;var oT="ScrollAreaViewport",sT=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,i=Kn(oT,n),a=h.useRef(null),l=be(t,a,i.onViewportChange);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(ve.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});sT.displayName=oT;var Ar="ScrollAreaScrollbar",Ev=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Kn(Ar,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,a=e.orientation==="horizontal";return h.useEffect(()=>(a?s(!0):i(!0),()=>{a?s(!1):i(!1)}),[a,s,i]),o.type==="hover"?c.jsx(Fz,{...r,ref:t,forceMount:n}):o.type==="scroll"?c.jsx(Uz,{...r,ref:t,forceMount:n}):o.type==="auto"?c.jsx(iT,{...r,ref:t,forceMount:n}):o.type==="always"?c.jsx(Tv,{...r,ref:t}):null});Ev.displayName=Ar;var Fz=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Kn(Ar,e.__scopeScrollArea),[s,i]=h.useState(!1);return h.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),i(!0)},d=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),c.jsx(fn,{present:n||s,children:c.jsx(iT,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Uz=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Kn(Ar,e.__scopeScrollArea),s=e.orientation==="horizontal",i=wf(()=>l("SCROLL_END"),100),[a,l]=Iz("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 h.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,l]),h.useEffect(()=>{const u=o.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const p=()=>{const x=u[d];f!==x&&(l("SCROLL"),i()),f=x};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,s,l,i]),c.jsx(fn,{present:n||a!=="hidden",children:c.jsx(Tv,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:G(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:G(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),iT=h.forwardRef((e,t)=>{const n=Kn(Ar,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=h.useState(!1),a=e.orientation==="horizontal",l=wf(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?u:d)}},10);return Bi(n.viewport,l),Bi(n.content,l),c.jsx(fn,{present:r||s,children:c.jsx(Tv,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Tv=h.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Kn(Ar,e.__scopeScrollArea),s=h.useRef(null),i=h.useRef(0),[a,l]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=dT(a.viewport,a.content),d={...r,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:p=>s.current=p,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:p=>i.current=p};function f(p,x){return Hz(p,i.current,a,x)}return n==="horizontal"?c.jsx($z,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollLeft,x=hw(p,a,o.dir);s.current.style.transform=`translate3d(${x}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=f(p,o.dir))}}):n==="vertical"?c.jsx(Vz,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollTop,x=hw(p,a);s.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=f(p))}}):null}),$z=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Kn(Ar,e.__scopeScrollArea),[i,a]=h.useState(),l=h.useRef(null),u=be(t,l,s.onScrollbarXChange);return h.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(lT,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":xf(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const p=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),hT(p,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:md(i.paddingLeft),paddingEnd:md(i.paddingRight)}})}})}),Vz=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Kn(Ar,e.__scopeScrollArea),[i,a]=h.useState(),l=h.useRef(null),u=be(t,l,s.onScrollbarYChange);return h.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(lT,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":xf(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const p=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),hT(p,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:md(i.paddingTop),paddingEnd:md(i.paddingBottom)}})}})}),[zz,aT]=nT(Ar),lT=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...p}=e,x=Kn(Ar,n),[g,y]=h.useState(null),S=be(t,D=>y(D)),v=h.useRef(null),m=h.useRef(""),w=x.viewport,b=r.content-r.viewport,C=_t(d),_=_t(l),R=wf(f,10);function N(D){if(v.current){const O=D.clientX-v.current.left,B=D.clientY-v.current.top;u({x:O,y:B})}}return h.useEffect(()=>{const D=O=>{const B=O.target;(g==null?void 0:g.contains(B))&&C(O,b)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[w,g,b,C]),h.useEffect(_,[r,_]),Bi(g,R),Bi(x.content,R),c.jsx(zz,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:_t(s),onThumbPointerUp:_t(i),onThumbPositionChange:_,onThumbPointerDown:_t(a),children:c.jsx(ve.div,{...p,ref:S,style:{position:"absolute",...p.style},onPointerDown:G(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),v.current=g.getBoundingClientRect(),m.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),N(D))}),onPointerMove:G(e.onPointerMove,N),onPointerUp:G(e.onPointerUp,D=>{const O=D.target;O.hasPointerCapture(D.pointerId)&&O.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=m.current,x.viewport&&(x.viewport.style.scrollBehavior=""),v.current=null})})})}),pd="ScrollAreaThumb",cT=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=aT(pd,e.__scopeScrollArea);return c.jsx(fn,{present:n||o.hasThumb,children:c.jsx(Wz,{ref:t,...r})})}),Wz=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=Kn(pd,n),i=aT(pd,n),{onThumbPositionChange:a}=i,l=be(t,f=>i.onThumbChange(f)),u=h.useRef(),d=wf(()=>{u.current&&(u.current(),u.current=void 0)},100);return h.useEffect(()=>{const f=s.viewport;if(f){const p=()=>{if(d(),!u.current){const x=Bz(f,a);u.current=x,a()}};return a(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[s.viewport,d,a]),c.jsx(ve.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:G(e.onPointerDownCapture,f=>{const x=f.target.getBoundingClientRect(),g=f.clientX-x.left,y=f.clientY-x.top;i.onThumbPointerDown({x:g,y})}),onPointerUp:G(e.onPointerUp,i.onThumbPointerUp)})});cT.displayName=pd;var Rv="ScrollAreaCorner",uT=h.forwardRef((e,t)=>{const n=Kn(Rv,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(Yz,{...e,ref:t}):null});uT.displayName=Rv;var Yz=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Kn(Rv,n),[s,i]=h.useState(0),[a,l]=h.useState(0),u=!!(s&&a);return Bi(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),Bi(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),i(d)}),u?c.jsx(ve.div,{...r,ref:t,style:{width:s,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function md(e){return e?parseInt(e,10):0}function dT(e,t){const n=e/t;return isNaN(n)?0:n}function xf(e){const t=dT(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Hz(e,t,n,r="ltr"){const o=xf(n),s=o/2,i=t||s,a=o-i,l=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return fT([l,u],f)(e)}function hw(e,t,n="ltr"){const r=xf(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,a=s-r,l=n==="ltr"?[0,i]:[i*-1,0],u=Yp(e,l);return fT([0,i],[0,a])(u)}function fT(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 hT(e,t){return e>0&&e<t}var Bz=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,a=n.top!==s.top;(i||a)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function wf(e,t){const n=_t(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Bi(e,t){const n=_t(t);Kt(()=>{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 pT=rT,Gz=sT,Kz=uT;const mT=h.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(pT,{ref:r,className:se("relative overflow-hidden",e),...n,children:[c.jsx(Gz,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(gT,{}),c.jsx(Kz,{})]}));mT.displayName=pT.displayName;const gT=h.forwardRef(({className:e,orientation:t="vertical",...n},r)=>c.jsx(Ev,{ref:r,orientation:t,className:se("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:c.jsx(cT,{className:"relative flex-1 rounded-full bg-border"})}));gT.displayName=Ev.displayName;const Zz=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await Vt().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},qz=()=>{const e=as(),[t,n]=h.useState(),[r]=jj(),o=r.get("domain");return h.useEffect(()=>{(async()=>{const i={};o&&(i.domain=o);const a=await Zz(i);n(a.items)})()},[o]),c.jsxs(mT,{className:"h-[80vh] overflow-hidden",children:[c.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(s=>{var i,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=s.expand.domain)==null?void 0:i.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:s.phase==="deploy"&&s.phaseSuccess?c.jsx(XS,{size:16,className:"text-green-700"}):c.jsx(QS,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(lC,{phase:s.phase,phaseSuccess:s.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:_l(s.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(s1,{children:[c.jsx(i1,{asChild:!0,children:c.jsx(Dt,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(Og,{className:"sm:max-w-5xl",children:[c.jsx(l1,{children:c.jsxs(c1,{children:[(a=s.expand.domain)==null?void 0:a.domain,"-",s.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[s.log.check&&c.jsx(c.Fragment,{children:s.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),s.log.apply&&c.jsx(c.Fragment,{children:s.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),s.log.deploy&&c.jsx(c.Fragment,{children:s.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},s.id)})]}):c.jsx(c.Fragment,{children:c.jsxs(JE,{className:"max-w-[40em] mx-auto mt-20",children:[c.jsx(eT,{children:"暂无数据"}),c.jsxs(tT,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx($j,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(Dt,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},Xz=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",Qz=Ie.object({username:Ie.string().email({message:"请输入正确的邮箱地址"}),password:Ie.string().min(10,{message:"密码至少10个字符"})}),Jz=()=>{const e=ic({resolver:ac(Qz),defaultValues:{username:"",password:""}}),t=async r=>{try{await Vt().admins.authWithPassword(r.username,r.password),n("/")}catch(o){const s=Xz(o);e.setError("username",{message:s}),e.setError("password",{message:s})}},n=as();return c.jsxs("div",{className:"max-w-[35em] border mx-auto mt-32 p-10 rounded-md shadow-md",children:[c.jsx("div",{className:"flex justify-center mb-10",children:c.jsx("img",{src:"/vite.svg",className:"w-16"})}),c.jsx(cc,{...e,children:c.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8",children:[c.jsx(tt,{control:e.control,name:"username",render:({field:r})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"用户名"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"email",...r})}),c.jsx(Be,{})]})}),c.jsx(tt,{control:e.control,name:"password",render:({field:r})=>c.jsxs(qe,{children:[c.jsx(Xe,{children:"密码"}),c.jsx(Qe,{children:c.jsx(ct,{placeholder:"shadcn",...r,type:"password"})}),c.jsx(Be,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Dt,{type:"submit",children:"登录"})})]})})]})},e3=()=>Vt().authStore.isValid&&Vt().authStore.isAdmin?c.jsx(BS,{to:"/"}):c.jsx("div",{className:"container",children:c.jsx(GS,{})}),t3=gj([{path:"/",element:c.jsx(H4,{}),children:[{path:"/",element:c.jsx(m$,{})},{path:"/edit",element:c.jsx(Mz,{})},{path:"/access",element:c.jsx(Oz,{})},{path:"/history",element:c.jsx(qz,{})}]},{path:"/login",element:c.jsx(e3,{}),children:[{path:"/login",element:c.jsx(Jz,{})}]},{path:"/about",element:c.jsx("div",{children:"About"})}]);Sh.createRoot(document.getElementById("root")).render(c.jsx(Oe.StrictMode,{children:c.jsx(kj,{router:t3})}))});export default n3();