certimate/ui/dist/assets/index-D8LCaikl.js
2024-08-21 12:19:12 +08:00

223 lines
566 KiB
JavaScript

var qk=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zV=qk((JV,au)=>{function Ax(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Ix(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lx={exports:{}},od={},Fx={exports:{}},Re={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Al=Symbol.for("react.element"),Qk=Symbol.for("react.portal"),Xk=Symbol.for("react.fragment"),Jk=Symbol.for("react.strict_mode"),eE=Symbol.for("react.profiler"),tE=Symbol.for("react.provider"),nE=Symbol.for("react.context"),rE=Symbol.for("react.forward_ref"),sE=Symbol.for("react.suspense"),oE=Symbol.for("react.memo"),iE=Symbol.for("react.lazy"),ov=Symbol.iterator;function aE(e){return e===null||typeof e!="object"?null:(e=ov&&e[ov]||e["@@iterator"],typeof e=="function"?e:null)}var Ux={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vx=Object.assign,$x={};function $i(e,t,n){this.props=e,this.context=t,this.refs=$x,this.updater=n||Ux}$i.prototype.isReactComponent={};$i.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")};$i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zx(){}zx.prototype=$i.prototype;function $p(e,t,n){this.props=e,this.context=t,this.refs=$x,this.updater=n||Ux}var zp=$p.prototype=new zx;zp.constructor=$p;Vx(zp,$i.prototype);zp.isPureReactComponent=!0;var iv=Array.isArray,Wx=Object.prototype.hasOwnProperty,Wp={current:null},Yx={key:!0,ref:!0,__self:!0,__source:!0};function Bx(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Wx.call(t,r)&&!Yx.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Al,type:e,key:o,ref:i,props:s,_owner:Wp.current}}function lE(e,t){return{$$typeof:Al,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Yp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Al}function cE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var av=/\/+/g;function yf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?cE(""+e.key):t.toString(36)}function Ic(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Al:case Qk:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+yf(i,0):r,iv(s)?(n="",e!=null&&(n=e.replace(av,"$&/")+"/"),Ic(s,t,n,"",function(c){return c})):s!=null&&(Yp(s)&&(s=lE(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(av,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",iv(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+yf(o,a);i+=Ic(o,t,n,l,s)}else if(l=aE(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+yf(o,a++),i+=Ic(o,t,n,l,s);else if(o==="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 ic(e,t,n){if(e==null)return e;var r=[],s=0;return Ic(e,r,"","",function(o){return t.call(n,o,s++)}),r}function uE(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 cn={current:null},Lc={transition:null},dE={ReactCurrentDispatcher:cn,ReactCurrentBatchConfig:Lc,ReactCurrentOwner:Wp};function Hx(){throw Error("act(...) is not supported in production builds of React.")}Re.Children={map:ic,forEach:function(e,t,n){ic(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ic(e,function(){t++}),t},toArray:function(e){return ic(e,function(t){return t})||[]},only:function(e){if(!Yp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Re.Component=$i;Re.Fragment=Xk;Re.Profiler=eE;Re.PureComponent=$p;Re.StrictMode=Jk;Re.Suspense=sE;Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dE;Re.act=Hx;Re.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=Vx({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Wp.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Wx.call(t,l)&&!Yx.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 c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Al,type:e.type,key:s,ref:o,props:r,_owner:i}};Re.createContext=function(e){return e={$$typeof:nE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:tE,_context:e},e.Consumer=e};Re.createElement=Bx;Re.createFactory=function(e){var t=Bx.bind(null,e);return t.type=e,t};Re.createRef=function(){return{current:null}};Re.forwardRef=function(e){return{$$typeof:rE,render:e}};Re.isValidElement=Yp;Re.lazy=function(e){return{$$typeof:iE,_payload:{_status:-1,_result:e},_init:uE}};Re.memo=function(e,t){return{$$typeof:oE,type:e,compare:t===void 0?null:t}};Re.startTransition=function(e){var t=Lc.transition;Lc.transition={};try{e()}finally{Lc.transition=t}};Re.unstable_act=Hx;Re.useCallback=function(e,t){return cn.current.useCallback(e,t)};Re.useContext=function(e){return cn.current.useContext(e)};Re.useDebugValue=function(){};Re.useDeferredValue=function(e){return cn.current.useDeferredValue(e)};Re.useEffect=function(e,t){return cn.current.useEffect(e,t)};Re.useId=function(){return cn.current.useId()};Re.useImperativeHandle=function(e,t,n){return cn.current.useImperativeHandle(e,t,n)};Re.useInsertionEffect=function(e,t){return cn.current.useInsertionEffect(e,t)};Re.useLayoutEffect=function(e,t){return cn.current.useLayoutEffect(e,t)};Re.useMemo=function(e,t){return cn.current.useMemo(e,t)};Re.useReducer=function(e,t,n){return cn.current.useReducer(e,t,n)};Re.useRef=function(e){return cn.current.useRef(e)};Re.useState=function(e){return cn.current.useState(e)};Re.useSyncExternalStore=function(e,t,n){return cn.current.useSyncExternalStore(e,t,n)};Re.useTransition=function(){return cn.current.useTransition()};Re.version="18.3.1";Fx.exports=Re;var h=Fx.exports;const De=Ix(h),Kx=Ax({__proto__:null,default:De},[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 fE=h,hE=Symbol.for("react.element"),pE=Symbol.for("react.fragment"),mE=Object.prototype.hasOwnProperty,gE=fE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vE={key:!0,ref:!0,__self:!0,__source:!0};function Gx(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)mE.call(t,r)&&!vE.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:hE,type:e,key:o,ref:i,props:s,_owner:gE.current}}od.Fragment=pE;od.jsx=Gx;od.jsxs=Gx;Lx.exports=od;var u=Lx.exports,ph={},Zx={exports:{}},Dn={},qx={exports:{}},Qx={};/**
* @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(I,O){var q=I.length;I.push(O);e:for(;0<q;){var ae=q-1>>>1,me=I[ae];if(0<s(me,O))I[ae]=O,I[q]=me,q=ae;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var O=I[0],q=I.pop();if(q!==O){I[0]=q;e:for(var ae=0,me=I.length,Qe=me>>>1;ae<Qe;){var Pe=2*(ae+1)-1,ct=I[Pe],Le=Pe+1,le=I[Le];if(0>s(ct,q))Le<me&&0>s(le,ct)?(I[ae]=le,I[Le]=q,ae=Le):(I[ae]=ct,I[Pe]=q,ae=Pe);else if(Le<me&&0>s(le,q))I[ae]=le,I[Le]=q,ae=Le;else break e}}return O}function s(I,O){var q=I.sortIndex-O.sortIndex;return q!==0?q:I.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],c=[],d=1,f=null,p=3,y=!1,x=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,g=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(I){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=I)r(c),O.sortIndex=O.expirationTime,t(l,O);else break;O=n(c)}}function b(I){if(v=!1,w(I),!x)if(n(l)!==null)x=!0,ne(C);else{var O=n(c);O!==null&&W(b,O.startTime-I)}}function C(I,O){x=!1,v&&(v=!1,g(R),R=-1),y=!0;var q=p;try{for(w(O),f=n(l);f!==null&&(!(f.expirationTime>O)||I&&!Z());){var ae=f.callback;if(typeof ae=="function"){f.callback=null,p=f.priorityLevel;var me=ae(f.expirationTime<=O);O=e.unstable_now(),typeof me=="function"?f.callback=me:f===n(l)&&r(l),w(O)}else r(l);f=n(l)}if(f!==null)var Qe=!0;else{var Pe=n(c);Pe!==null&&W(b,Pe.startTime-O),Qe=!1}return Qe}finally{f=null,p=q,y=!1}}var S=!1,N=null,R=-1,F=5,L=-1;function Z(){return!(e.unstable_now()-L<F)}function D(){if(N!==null){var I=e.unstable_now();L=I;var O=!0;try{O=N(!0,I)}finally{O?B():(S=!1,N=null)}}else S=!1}var B;if(typeof m=="function")B=function(){m(D)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,H=A.port2;A.port1.onmessage=D,B=function(){H.postMessage(null)}}else B=function(){_(D,0)};function ne(I){N=I,S||(S=!0,B())}function W(I,O){R=_(function(){I(e.unstable_now())},O)}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(I){I.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,ne(C))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(I){switch(p){case 1:case 2:case 3:var O=3;break;default:O=p}var q=p;p=O;try{return I()}finally{p=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,O){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var q=p;p=I;try{return O()}finally{p=q}},e.unstable_scheduleCallback=function(I,O,q){var ae=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?ae+q:ae):q=ae,I){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=q+me,I={id:d++,callback:O,priorityLevel:I,startTime:q,expirationTime:me,sortIndex:-1},q>ae?(I.sortIndex=q,t(c,I),n(l)===null&&I===n(c)&&(v?(g(R),R=-1):v=!0,W(b,q-ae))):(I.sortIndex=me,t(l,I),x||y||(x=!0,ne(C))),I},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(I){var O=p;return function(){var q=p;p=O;try{return I.apply(this,arguments)}finally{p=q}}}})(Qx);qx.exports=Qx;var yE=qx.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 xE=h,On=yE;function V(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 Xx=new Set,Ha={};function Ao(e,t){Ri(e,t),Ri(e+"Capture",t)}function Ri(e,t){for(Ha[e]=t,e=0;e<t.length;e++)Xx.add(t[e])}var Qr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mh=Object.prototype.hasOwnProperty,wE=/^[: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]*$/,lv={},cv={};function _E(e){return mh.call(cv,e)?!0:mh.call(lv,e)?!1:wE.test(e)?cv[e]=!0:(lv[e]=!0,!1)}function SE(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 bE(e,t,n,r){if(t===null||typeof t>"u"||SE(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 un(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var zt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){zt[e]=new un(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];zt[t]=new un(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){zt[e]=new un(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){zt[e]=new un(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){zt[e]=new un(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){zt[e]=new un(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){zt[e]=new un(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){zt[e]=new un(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){zt[e]=new un(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bp=/[\-:]([a-z])/g;function Hp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bp,Hp);zt[t]=new un(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bp,Hp);zt[t]=new un(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bp,Hp);zt[t]=new un(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){zt[e]=new un(e,1,!1,e.toLowerCase(),null,!1,!1)});zt.xlinkHref=new un("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){zt[e]=new un(e,1,!1,e.toLowerCase(),null,!0,!0)});function Kp(e,t,n,r){var s=zt.hasOwnProperty(t)?zt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(bE(t,n,s,r)&&(n=null),r||s===null?_E(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var is=xE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ac=Symbol.for("react.element"),ei=Symbol.for("react.portal"),ti=Symbol.for("react.fragment"),Gp=Symbol.for("react.strict_mode"),gh=Symbol.for("react.profiler"),Jx=Symbol.for("react.provider"),ew=Symbol.for("react.context"),Zp=Symbol.for("react.forward_ref"),vh=Symbol.for("react.suspense"),yh=Symbol.for("react.suspense_list"),qp=Symbol.for("react.memo"),bs=Symbol.for("react.lazy"),tw=Symbol.for("react.offscreen"),uv=Symbol.iterator;function ra(e){return e===null||typeof e!="object"?null:(e=uv&&e[uv]||e["@@iterator"],typeof e=="function"?e:null)}var gt=Object.assign,xf;function xa(e){if(xf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);xf=t&&t[1]||""}return`
`+xf+e}var wf=!1;function _f(e,t){if(!e||wf)return"";wf=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
`),o=r.stack.split(`
`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=`
`+s[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{wf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xa(e):""}function CE(e){switch(e.tag){case 5:return xa(e.type);case 16:return xa("Lazy");case 13:return xa("Suspense");case 19:return xa("SuspenseList");case 0:case 2:case 15:return e=_f(e.type,!1),e;case 11:return e=_f(e.type.render,!1),e;case 1:return e=_f(e.type,!0),e;default:return""}}function xh(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 ti:return"Fragment";case ei:return"Portal";case gh:return"Profiler";case Gp:return"StrictMode";case vh:return"Suspense";case yh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ew:return(e.displayName||"Context")+".Consumer";case Jx:return(e._context.displayName||"Context")+".Provider";case Zp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qp:return t=e.displayName||null,t!==null?t:xh(e.type)||"Memo";case bs:t=e._payload,e=e._init;try{return xh(e(t))}catch{}}return null}function kE(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 xh(t);case 8:return t===Gp?"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 zs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EE(e){var t=nw(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 s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.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 lc(e){e._valueTracker||(e._valueTracker=EE(e))}function rw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=nw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function lu(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 wh(e,t){var n=t.checked;return gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function dv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zs(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 sw(e,t){t=t.checked,t!=null&&Kp(e,"checked",t,!1)}function _h(e,t){sw(e,t);var n=zs(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")?Sh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sh(e,t.type,zs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fv(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 Sh(e,t,n){(t!=="number"||lu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wa=Array.isArray;function gi(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+zs(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function bh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return gt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(V(92));if(wa(n)){if(1<n.length)throw Error(V(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:zs(n)}}function ow(e,t){var n=zs(t.value),r=zs(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 pv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function iw(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 Ch(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?iw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cc,aw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(cc=cc||document.createElement("div"),cc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ka(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Na={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},TE=["Webkit","ms","Moz","O"];Object.keys(Na).forEach(function(e){TE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Na[t]=Na[e]})});function lw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Na.hasOwnProperty(e)&&Na[e]?(""+t).trim():t+"px"}function cw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=lw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var NE=gt({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 kh(e,t){if(t){if(NE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function Eh(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 Th=null;function Qp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nh=null,vi=null,yi=null;function mv(e){if(e=Fl(e)){if(typeof Nh!="function")throw Error(V(280));var t=e.stateNode;t&&(t=ud(t),Nh(e.stateNode,e.type,t))}}function uw(e){vi?yi?yi.push(e):yi=[e]:vi=e}function dw(){if(vi){var e=vi,t=yi;if(yi=vi=null,mv(e),t)for(e=0;e<t.length;e++)mv(t[e])}}function fw(e,t){return e(t)}function hw(){}var Sf=!1;function pw(e,t,n){if(Sf)return e(t,n);Sf=!0;try{return fw(e,t,n)}finally{Sf=!1,(vi!==null||yi!==null)&&(hw(),dw())}}function Ga(e,t){var n=e.stateNode;if(n===null)return null;var r=ud(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(V(231,t,typeof n));return n}var Rh=!1;if(Qr)try{var sa={};Object.defineProperty(sa,"passive",{get:function(){Rh=!0}}),window.addEventListener("test",sa,sa),window.removeEventListener("test",sa,sa)}catch{Rh=!1}function RE(e,t,n,r,s,o,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Ra=!1,cu=null,uu=!1,Ph=null,PE={onError:function(e){Ra=!0,cu=e}};function ME(e,t,n,r,s,o,i,a,l){Ra=!1,cu=null,RE.apply(PE,arguments)}function OE(e,t,n,r,s,o,i,a,l){if(ME.apply(this,arguments),Ra){if(Ra){var c=cu;Ra=!1,cu=null}else throw Error(V(198));uu||(uu=!0,Ph=c)}}function Io(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 mw(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 gv(e){if(Io(e)!==e)throw Error(V(188))}function DE(e){var t=e.alternate;if(!t){if(t=Io(e),t===null)throw Error(V(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return gv(s),e;if(o===r)return gv(s),t;o=o.sibling}throw Error(V(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,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){for(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)throw Error(V(189))}}if(n.alternate!==r)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function gw(e){return e=DE(e),e!==null?vw(e):null}function vw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=vw(e);if(t!==null)return t;e=e.sibling}return null}var yw=On.unstable_scheduleCallback,vv=On.unstable_cancelCallback,jE=On.unstable_shouldYield,AE=On.unstable_requestPaint,St=On.unstable_now,IE=On.unstable_getCurrentPriorityLevel,Xp=On.unstable_ImmediatePriority,xw=On.unstable_UserBlockingPriority,du=On.unstable_NormalPriority,LE=On.unstable_LowPriority,ww=On.unstable_IdlePriority,id=null,Sr=null;function FE(e){if(Sr&&typeof Sr.onCommitFiberRoot=="function")try{Sr.onCommitFiberRoot(id,e,void 0,(e.current.flags&128)===128)}catch{}}var nr=Math.clz32?Math.clz32:$E,UE=Math.log,VE=Math.LN2;function $E(e){return e>>>=0,e===0?32:31-(UE(e)/VE|0)|0}var uc=64,dc=4194304;function _a(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 fu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=_a(a):(o&=i,o!==0&&(r=_a(o)))}else i=n&~s,i!==0?r=_a(i):o!==0&&(r=_a(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&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-nr(t),s=1<<n,r|=e[n],t&=~s;return r}function zE(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 WE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-nr(o),a=1<<i,l=s[i];l===-1?(!(a&n)||a&r)&&(s[i]=zE(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Mh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _w(){var e=uc;return uc<<=1,!(uc&4194240)&&(uc=64),e}function bf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Il(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nr(t),e[t]=n}function YE(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 s=31-nr(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Jp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nr(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Ge=0;function Sw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var bw,em,Cw,kw,Ew,Oh=!1,fc=[],Ds=null,js=null,As=null,Za=new Map,qa=new Map,ks=[],BE="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 yv(e,t){switch(e){case"focusin":case"focusout":Ds=null;break;case"dragenter":case"dragleave":js=null;break;case"mouseover":case"mouseout":As=null;break;case"pointerover":case"pointerout":Za.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qa.delete(t.pointerId)}}function oa(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Fl(t),t!==null&&em(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function HE(e,t,n,r,s){switch(t){case"focusin":return Ds=oa(Ds,e,t,n,r,s),!0;case"dragenter":return js=oa(js,e,t,n,r,s),!0;case"mouseover":return As=oa(As,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Za.set(o,oa(Za.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,qa.set(o,oa(qa.get(o)||null,e,t,n,r,s)),!0}return!1}function Tw(e){var t=uo(e.target);if(t!==null){var n=Io(t);if(n!==null){if(t=n.tag,t===13){if(t=mw(n),t!==null){e.blockedOn=t,Ew(e.priority,function(){Cw(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 Fc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Dh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Th=r,n.target.dispatchEvent(r),Th=null}else return t=Fl(n),t!==null&&em(t),e.blockedOn=n,!1;t.shift()}return!0}function xv(e,t,n){Fc(e)&&n.delete(t)}function KE(){Oh=!1,Ds!==null&&Fc(Ds)&&(Ds=null),js!==null&&Fc(js)&&(js=null),As!==null&&Fc(As)&&(As=null),Za.forEach(xv),qa.forEach(xv)}function ia(e,t){e.blockedOn===t&&(e.blockedOn=null,Oh||(Oh=!0,On.unstable_scheduleCallback(On.unstable_NormalPriority,KE)))}function Qa(e){function t(s){return ia(s,e)}if(0<fc.length){ia(fc[0],e);for(var n=1;n<fc.length;n++){var r=fc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ds!==null&&ia(Ds,e),js!==null&&ia(js,e),As!==null&&ia(As,e),Za.forEach(t),qa.forEach(t),n=0;n<ks.length;n++)r=ks[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ks.length&&(n=ks[0],n.blockedOn===null);)Tw(n),n.blockedOn===null&&ks.shift()}var xi=is.ReactCurrentBatchConfig,hu=!0;function GE(e,t,n,r){var s=Ge,o=xi.transition;xi.transition=null;try{Ge=1,tm(e,t,n,r)}finally{Ge=s,xi.transition=o}}function ZE(e,t,n,r){var s=Ge,o=xi.transition;xi.transition=null;try{Ge=4,tm(e,t,n,r)}finally{Ge=s,xi.transition=o}}function tm(e,t,n,r){if(hu){var s=Dh(e,t,n,r);if(s===null)Df(e,t,r,pu,n),yv(e,r);else if(HE(s,e,t,n,r))r.stopPropagation();else if(yv(e,r),t&4&&-1<BE.indexOf(e)){for(;s!==null;){var o=Fl(s);if(o!==null&&bw(o),o=Dh(e,t,n,r),o===null&&Df(e,t,r,pu,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Df(e,t,r,null,n)}}var pu=null;function Dh(e,t,n,r){if(pu=null,e=Qp(r),e=uo(e),e!==null)if(t=Io(e),t===null)e=null;else if(n=t.tag,n===13){if(e=mw(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 pu=e,null}function Nw(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(IE()){case Xp:return 1;case xw:return 4;case du:case LE:return 16;case ww:return 536870912;default:return 16}default:return 16}}var Ns=null,nm=null,Uc=null;function Rw(){if(Uc)return Uc;var e,t=nm,n=t.length,r,s="value"in Ns?Ns.value:Ns.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return Uc=s.slice(e,1<r?1-r:void 0)}function Vc(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 hc(){return!0}function wv(){return!1}function jn(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?hc:wv,this.isPropagationStopped=wv,this}return gt(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=hc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hc)},persist:function(){},isPersistent:hc}),t}var zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rm=jn(zi),Ll=gt({},zi,{view:0,detail:0}),qE=jn(Ll),Cf,kf,aa,ad=gt({},Ll,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sm,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!==aa&&(aa&&e.type==="mousemove"?(Cf=e.screenX-aa.screenX,kf=e.screenY-aa.screenY):kf=Cf=0,aa=e),Cf)},movementY:function(e){return"movementY"in e?e.movementY:kf}}),_v=jn(ad),QE=gt({},ad,{dataTransfer:0}),XE=jn(QE),JE=gt({},Ll,{relatedTarget:0}),Ef=jn(JE),eT=gt({},zi,{animationName:0,elapsedTime:0,pseudoElement:0}),tT=jn(eT),nT=gt({},zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rT=jn(nT),sT=gt({},zi,{data:0}),Sv=jn(sT),oT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iT={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"},aT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=aT[e])?!!t[e]:!1}function sm(){return lT}var cT=gt({},Ll,{key:function(e){if(e.key){var t=oT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?iT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sm,charCode:function(e){return e.type==="keypress"?Vc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uT=jn(cT),dT=gt({},ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bv=jn(dT),fT=gt({},Ll,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sm}),hT=jn(fT),pT=gt({},zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),mT=jn(pT),gT=gt({},ad,{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}),vT=jn(gT),yT=[9,13,27,32],om=Qr&&"CompositionEvent"in window,Pa=null;Qr&&"documentMode"in document&&(Pa=document.documentMode);var xT=Qr&&"TextEvent"in window&&!Pa,Pw=Qr&&(!om||Pa&&8<Pa&&11>=Pa),Cv=" ",kv=!1;function Mw(e,t){switch(e){case"keyup":return yT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ow(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ni=!1;function wT(e,t){switch(e){case"compositionend":return Ow(t);case"keypress":return t.which!==32?null:(kv=!0,Cv);case"textInput":return e=t.data,e===Cv&&kv?null:e;default:return null}}function _T(e,t){if(ni)return e==="compositionend"||!om&&Mw(e,t)?(e=Rw(),Uc=nm=Ns=null,ni=!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 Pw&&t.locale!=="ko"?null:t.data;default:return null}}var ST={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 Ev(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ST[e.type]:t==="textarea"}function Dw(e,t,n,r){uw(r),t=mu(t,"onChange"),0<t.length&&(n=new rm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ma=null,Xa=null;function bT(e){Yw(e,0)}function ld(e){var t=oi(e);if(rw(t))return e}function CT(e,t){if(e==="change")return t}var jw=!1;if(Qr){var Tf;if(Qr){var Nf="oninput"in document;if(!Nf){var Tv=document.createElement("div");Tv.setAttribute("oninput","return;"),Nf=typeof Tv.oninput=="function"}Tf=Nf}else Tf=!1;jw=Tf&&(!document.documentMode||9<document.documentMode)}function Nv(){Ma&&(Ma.detachEvent("onpropertychange",Aw),Xa=Ma=null)}function Aw(e){if(e.propertyName==="value"&&ld(Xa)){var t=[];Dw(t,Xa,e,Qp(e)),pw(bT,t)}}function kT(e,t,n){e==="focusin"?(Nv(),Ma=t,Xa=n,Ma.attachEvent("onpropertychange",Aw)):e==="focusout"&&Nv()}function ET(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ld(Xa)}function TT(e,t){if(e==="click")return ld(t)}function NT(e,t){if(e==="input"||e==="change")return ld(t)}function RT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var or=typeof Object.is=="function"?Object.is:RT;function Ja(e,t){if(or(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 s=n[r];if(!mh.call(t,s)||!or(e[s],t[s]))return!1}return!0}function Rv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pv(e,t){var n=Rv(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=Rv(n)}}function Iw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lw(){for(var e=window,t=lu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=lu(e.document)}return t}function im(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 PT(e){var t=Lw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Iw(n.ownerDocument.documentElement,n)){if(r!==null&&im(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 s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Pv(n,o);var i=Pv(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>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 MT=Qr&&"documentMode"in document&&11>=document.documentMode,ri=null,jh=null,Oa=null,Ah=!1;function Mv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ah||ri==null||ri!==lu(r)||(r=ri,"selectionStart"in r&&im(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}),Oa&&Ja(Oa,r)||(Oa=r,r=mu(jh,"onSelect"),0<r.length&&(t=new rm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ri)))}function pc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var si={animationend:pc("Animation","AnimationEnd"),animationiteration:pc("Animation","AnimationIteration"),animationstart:pc("Animation","AnimationStart"),transitionend:pc("Transition","TransitionEnd")},Rf={},Fw={};Qr&&(Fw=document.createElement("div").style,"AnimationEvent"in window||(delete si.animationend.animation,delete si.animationiteration.animation,delete si.animationstart.animation),"TransitionEvent"in window||delete si.transitionend.transition);function cd(e){if(Rf[e])return Rf[e];if(!si[e])return e;var t=si[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fw)return Rf[e]=t[n];return e}var Uw=cd("animationend"),Vw=cd("animationiteration"),$w=cd("animationstart"),zw=cd("transitionend"),Ww=new Map,Ov="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 Xs(e,t){Ww.set(e,t),Ao(t,[e])}for(var Pf=0;Pf<Ov.length;Pf++){var Mf=Ov[Pf],OT=Mf.toLowerCase(),DT=Mf[0].toUpperCase()+Mf.slice(1);Xs(OT,"on"+DT)}Xs(Uw,"onAnimationEnd");Xs(Vw,"onAnimationIteration");Xs($w,"onAnimationStart");Xs("dblclick","onDoubleClick");Xs("focusin","onFocus");Xs("focusout","onBlur");Xs(zw,"onTransitionEnd");Ri("onMouseEnter",["mouseout","mouseover"]);Ri("onMouseLeave",["mouseout","mouseover"]);Ri("onPointerEnter",["pointerout","pointerover"]);Ri("onPointerLeave",["pointerout","pointerover"]);Ao("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ao("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ao("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ao("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ao("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ao("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sa="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(" "),jT=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sa));function Dv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,OE(r,t,void 0,e),e.currentTarget=null}function Yw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;Dv(s,a,c),o=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;Dv(s,a,c),o=l}}}if(uu)throw e=Ph,uu=!1,Ph=null,e}function nt(e,t){var n=t[Vh];n===void 0&&(n=t[Vh]=new Set);var r=e+"__bubble";n.has(r)||(Bw(t,e,2,!1),n.add(r))}function Of(e,t,n){var r=0;t&&(r|=4),Bw(n,e,r,t)}var mc="_reactListening"+Math.random().toString(36).slice(2);function el(e){if(!e[mc]){e[mc]=!0,Xx.forEach(function(n){n!=="selectionchange"&&(jT.has(n)||Of(n,!1,e),Of(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mc]||(t[mc]=!0,Of("selectionchange",!1,t))}}function Bw(e,t,n,r){switch(Nw(t)){case 1:var s=GE;break;case 4:s=ZE;break;default:s=tm}n=s.bind(null,t,n,e),s=void 0,!Rh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Df(e,t,n,r,s){var o=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===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=uo(a),i===null)return;if(l=i.tag,l===5||l===6){r=o=i;continue e}a=a.parentNode}}r=r.return}pw(function(){var c=o,d=Qp(n),f=[];e:{var p=Ww.get(e);if(p!==void 0){var y=rm,x=e;switch(e){case"keypress":if(Vc(n)===0)break e;case"keydown":case"keyup":y=uT;break;case"focusin":x="focus",y=Ef;break;case"focusout":x="blur",y=Ef;break;case"beforeblur":case"afterblur":y=Ef;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":y=_v;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=XE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=hT;break;case Uw:case Vw:case $w:y=tT;break;case zw:y=mT;break;case"scroll":y=qE;break;case"wheel":y=vT;break;case"copy":case"cut":case"paste":y=rT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=bv}var v=(t&4)!==0,_=!v&&e==="scroll",g=v?p!==null?p+"Capture":null:p;v=[];for(var m=c,w;m!==null;){w=m;var b=w.stateNode;if(w.tag===5&&b!==null&&(w=b,g!==null&&(b=Ga(m,g),b!=null&&v.push(tl(m,b,w)))),_)break;m=m.return}0<v.length&&(p=new y(p,x,null,n,d),f.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",p&&n!==Th&&(x=n.relatedTarget||n.fromElement)&&(uo(x)||x[Xr]))break e;if((y||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,y?(x=n.relatedTarget||n.toElement,y=c,x=x?uo(x):null,x!==null&&(_=Io(x),x!==_||x.tag!==5&&x.tag!==6)&&(x=null)):(y=null,x=c),y!==x)){if(v=_v,b="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=bv,b="onPointerLeave",g="onPointerEnter",m="pointer"),_=y==null?p:oi(y),w=x==null?p:oi(x),p=new v(b,m+"leave",y,n,d),p.target=_,p.relatedTarget=w,b=null,uo(d)===c&&(v=new v(g,m+"enter",x,n,d),v.target=w,v.relatedTarget=_,b=v),_=b,y&&x)t:{for(v=y,g=x,m=0,w=v;w;w=Bo(w))m++;for(w=0,b=g;b;b=Bo(b))w++;for(;0<m-w;)v=Bo(v),m--;for(;0<w-m;)g=Bo(g),w--;for(;m--;){if(v===g||g!==null&&v===g.alternate)break t;v=Bo(v),g=Bo(g)}v=null}else v=null;y!==null&&jv(f,p,y,v,!1),x!==null&&_!==null&&jv(f,_,x,v,!0)}}e:{if(p=c?oi(c):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var C=CT;else if(Ev(p))if(jw)C=NT;else{C=ET;var S=kT}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=TT);if(C&&(C=C(e,c))){Dw(f,C,n,d);break e}S&&S(e,p,c),e==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&Sh(p,"number",p.value)}switch(S=c?oi(c):window,e){case"focusin":(Ev(S)||S.contentEditable==="true")&&(ri=S,jh=c,Oa=null);break;case"focusout":Oa=jh=ri=null;break;case"mousedown":Ah=!0;break;case"contextmenu":case"mouseup":case"dragend":Ah=!1,Mv(f,n,d);break;case"selectionchange":if(MT)break;case"keydown":case"keyup":Mv(f,n,d)}var N;if(om)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else ni?Mw(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(Pw&&n.locale!=="ko"&&(ni||R!=="onCompositionStart"?R==="onCompositionEnd"&&ni&&(N=Rw()):(Ns=d,nm="value"in Ns?Ns.value:Ns.textContent,ni=!0)),S=mu(c,R),0<S.length&&(R=new Sv(R,e,null,n,d),f.push({event:R,listeners:S}),N?R.data=N:(N=Ow(n),N!==null&&(R.data=N)))),(N=xT?wT(e,n):_T(e,n))&&(c=mu(c,"onBeforeInput"),0<c.length&&(d=new Sv("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=N))}Yw(f,t)})}function tl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function mu(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Ga(e,n),o!=null&&r.unshift(tl(e,o,s)),o=Ga(e,t),o!=null&&r.push(tl(e,o,s))),e=e.return}return r}function Bo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function jv(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Ga(n,o),l!=null&&i.unshift(tl(n,l,a))):s||(l=Ga(n,o),l!=null&&i.push(tl(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var AT=/\r\n?/g,IT=/\u0000|\uFFFD/g;function Av(e){return(typeof e=="string"?e:""+e).replace(AT,`
`).replace(IT,"")}function gc(e,t,n){if(t=Av(t),Av(e)!==t&&n)throw Error(V(425))}function gu(){}var Ih=null,Lh=null;function Fh(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 Uh=typeof setTimeout=="function"?setTimeout:void 0,LT=typeof clearTimeout=="function"?clearTimeout:void 0,Iv=typeof Promise=="function"?Promise:void 0,FT=typeof queueMicrotask=="function"?queueMicrotask:typeof Iv<"u"?function(e){return Iv.resolve(null).then(e).catch(UT)}:Uh;function UT(e){setTimeout(function(){throw e})}function jf(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Qa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Qa(t)}function Is(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 Lv(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 Wi=Math.random().toString(36).slice(2),gr="__reactFiber$"+Wi,nl="__reactProps$"+Wi,Xr="__reactContainer$"+Wi,Vh="__reactEvents$"+Wi,VT="__reactListeners$"+Wi,$T="__reactHandles$"+Wi;function uo(e){var t=e[gr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xr]||n[gr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Lv(e);e!==null;){if(n=e[gr])return n;e=Lv(e)}return t}e=n,n=e.parentNode}return null}function Fl(e){return e=e[gr]||e[Xr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function oi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function ud(e){return e[nl]||null}var $h=[],ii=-1;function Js(e){return{current:e}}function rt(e){0>ii||(e.current=$h[ii],$h[ii]=null,ii--)}function et(e,t){ii++,$h[ii]=e.current,e.current=t}var Ws={},Qt=Js(Ws),yn=Js(!1),bo=Ws;function Pi(e,t){var n=e.type.contextTypes;if(!n)return Ws;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function xn(e){return e=e.childContextTypes,e!=null}function vu(){rt(yn),rt(Qt)}function Fv(e,t,n){if(Qt.current!==Ws)throw Error(V(168));et(Qt,t),et(yn,n)}function Hw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(V(108,kE(e)||"Unknown",s));return gt({},n,r)}function yu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ws,bo=Qt.current,et(Qt,e),et(yn,yn.current),!0}function Uv(e,t,n){var r=e.stateNode;if(!r)throw Error(V(169));n?(e=Hw(e,t,bo),r.__reactInternalMemoizedMergedChildContext=e,rt(yn),rt(Qt),et(Qt,e)):rt(yn),et(yn,n)}var zr=null,dd=!1,Af=!1;function Kw(e){zr===null?zr=[e]:zr.push(e)}function zT(e){dd=!0,Kw(e)}function eo(){if(!Af&&zr!==null){Af=!0;var e=0,t=Ge;try{var n=zr;for(Ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zr=null,dd=!1}catch(s){throw zr!==null&&(zr=zr.slice(e+1)),yw(Xp,eo),s}finally{Ge=t,Af=!1}}return null}var ai=[],li=0,xu=null,wu=0,In=[],Ln=0,Co=null,Wr=1,Yr="";function ao(e,t){ai[li++]=wu,ai[li++]=xu,xu=e,wu=t}function Gw(e,t,n){In[Ln++]=Wr,In[Ln++]=Yr,In[Ln++]=Co,Co=e;var r=Wr;e=Yr;var s=32-nr(r)-1;r&=~(1<<s),n+=1;var o=32-nr(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Wr=1<<32-nr(t)+s|n<<s|r,Yr=o+e}else Wr=1<<o|n<<s|r,Yr=e}function am(e){e.return!==null&&(ao(e,1),Gw(e,1,0))}function lm(e){for(;e===xu;)xu=ai[--li],ai[li]=null,wu=ai[--li],ai[li]=null;for(;e===Co;)Co=In[--Ln],In[Ln]=null,Yr=In[--Ln],In[Ln]=null,Wr=In[--Ln],In[Ln]=null}var Nn=null,Tn=null,lt=!1,Xn=null;function Zw(e,t){var n=Un(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 Vv(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,Nn=e,Tn=Is(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Nn=e,Tn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Co!==null?{id:Wr,overflow:Yr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Un(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Nn=e,Tn=null,!0):!1;default:return!1}}function zh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Wh(e){if(lt){var t=Tn;if(t){var n=t;if(!Vv(e,t)){if(zh(e))throw Error(V(418));t=Is(n.nextSibling);var r=Nn;t&&Vv(e,t)?Zw(r,n):(e.flags=e.flags&-4097|2,lt=!1,Nn=e)}}else{if(zh(e))throw Error(V(418));e.flags=e.flags&-4097|2,lt=!1,Nn=e}}}function $v(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Nn=e}function vc(e){if(e!==Nn)return!1;if(!lt)return $v(e),lt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Fh(e.type,e.memoizedProps)),t&&(t=Tn)){if(zh(e))throw qw(),Error(V(418));for(;t;)Zw(e,t),t=Is(t.nextSibling)}if($v(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Tn=Is(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Tn=null}}else Tn=Nn?Is(e.stateNode.nextSibling):null;return!0}function qw(){for(var e=Tn;e;)e=Is(e.nextSibling)}function Mi(){Tn=Nn=null,lt=!1}function cm(e){Xn===null?Xn=[e]:Xn.push(e)}var WT=is.ReactCurrentBatchConfig;function la(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(V(309));var r=n.stateNode}if(!r)throw Error(V(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(V(284));if(!n._owner)throw Error(V(290,e))}return e}function yc(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function zv(e){var t=e._init;return t(e._payload)}function Qw(e){function t(g,m){if(e){var w=g.deletions;w===null?(g.deletions=[m],g.flags|=16):w.push(m)}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function s(g,m){return g=Vs(g,m),g.index=0,g.sibling=null,g}function o(g,m,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<m?(g.flags|=2,m):w):(g.flags|=2,m)):(g.flags|=1048576,m)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,m,w,b){return m===null||m.tag!==6?(m=zf(w,g.mode,b),m.return=g,m):(m=s(m,w),m.return=g,m)}function l(g,m,w,b){var C=w.type;return C===ti?d(g,m,w.props.children,b,w.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===bs&&zv(C)===m.type)?(b=s(m,w.props),b.ref=la(g,m,w),b.return=g,b):(b=Kc(w.type,w.key,w.props,null,g.mode,b),b.ref=la(g,m,w),b.return=g,b)}function c(g,m,w,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=Wf(w,g.mode,b),m.return=g,m):(m=s(m,w.children||[]),m.return=g,m)}function d(g,m,w,b,C){return m===null||m.tag!==7?(m=wo(w,g.mode,b,C),m.return=g,m):(m=s(m,w),m.return=g,m)}function f(g,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=zf(""+m,g.mode,w),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ac:return w=Kc(m.type,m.key,m.props,null,g.mode,w),w.ref=la(g,null,m),w.return=g,w;case ei:return m=Wf(m,g.mode,w),m.return=g,m;case bs:var b=m._init;return f(g,b(m._payload),w)}if(wa(m)||ra(m))return m=wo(m,g.mode,w,null),m.return=g,m;yc(g,m)}return null}function p(g,m,w,b){var C=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:a(g,m,""+w,b);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ac:return w.key===C?l(g,m,w,b):null;case ei:return w.key===C?c(g,m,w,b):null;case bs:return C=w._init,p(g,m,C(w._payload),b)}if(wa(w)||ra(w))return C!==null?null:d(g,m,w,b,null);yc(g,w)}return null}function y(g,m,w,b,C){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(w)||null,a(m,g,""+b,C);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ac:return g=g.get(b.key===null?w:b.key)||null,l(m,g,b,C);case ei:return g=g.get(b.key===null?w:b.key)||null,c(m,g,b,C);case bs:var S=b._init;return y(g,m,w,S(b._payload),C)}if(wa(b)||ra(b))return g=g.get(w)||null,d(m,g,b,C,null);yc(m,b)}return null}function x(g,m,w,b){for(var C=null,S=null,N=m,R=m=0,F=null;N!==null&&R<w.length;R++){N.index>R?(F=N,N=null):F=N.sibling;var L=p(g,N,w[R],b);if(L===null){N===null&&(N=F);break}e&&N&&L.alternate===null&&t(g,N),m=o(L,m,R),S===null?C=L:S.sibling=L,S=L,N=F}if(R===w.length)return n(g,N),lt&&ao(g,R),C;if(N===null){for(;R<w.length;R++)N=f(g,w[R],b),N!==null&&(m=o(N,m,R),S===null?C=N:S.sibling=N,S=N);return lt&&ao(g,R),C}for(N=r(g,N);R<w.length;R++)F=y(N,g,R,w[R],b),F!==null&&(e&&F.alternate!==null&&N.delete(F.key===null?R:F.key),m=o(F,m,R),S===null?C=F:S.sibling=F,S=F);return e&&N.forEach(function(Z){return t(g,Z)}),lt&&ao(g,R),C}function v(g,m,w,b){var C=ra(w);if(typeof C!="function")throw Error(V(150));if(w=C.call(w),w==null)throw Error(V(151));for(var S=C=null,N=m,R=m=0,F=null,L=w.next();N!==null&&!L.done;R++,L=w.next()){N.index>R?(F=N,N=null):F=N.sibling;var Z=p(g,N,L.value,b);if(Z===null){N===null&&(N=F);break}e&&N&&Z.alternate===null&&t(g,N),m=o(Z,m,R),S===null?C=Z:S.sibling=Z,S=Z,N=F}if(L.done)return n(g,N),lt&&ao(g,R),C;if(N===null){for(;!L.done;R++,L=w.next())L=f(g,L.value,b),L!==null&&(m=o(L,m,R),S===null?C=L:S.sibling=L,S=L);return lt&&ao(g,R),C}for(N=r(g,N);!L.done;R++,L=w.next())L=y(N,g,R,L.value,b),L!==null&&(e&&L.alternate!==null&&N.delete(L.key===null?R:L.key),m=o(L,m,R),S===null?C=L:S.sibling=L,S=L);return e&&N.forEach(function(D){return t(g,D)}),lt&&ao(g,R),C}function _(g,m,w,b){if(typeof w=="object"&&w!==null&&w.type===ti&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ac:e:{for(var C=w.key,S=m;S!==null;){if(S.key===C){if(C=w.type,C===ti){if(S.tag===7){n(g,S.sibling),m=s(S,w.props.children),m.return=g,g=m;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===bs&&zv(C)===S.type){n(g,S.sibling),m=s(S,w.props),m.ref=la(g,S,w),m.return=g,g=m;break e}n(g,S);break}else t(g,S);S=S.sibling}w.type===ti?(m=wo(w.props.children,g.mode,b,w.key),m.return=g,g=m):(b=Kc(w.type,w.key,w.props,null,g.mode,b),b.ref=la(g,m,w),b.return=g,g=b)}return i(g);case ei:e:{for(S=w.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){n(g,m.sibling),m=s(m,w.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=Wf(w,g.mode,b),m.return=g,g=m}return i(g);case bs:return S=w._init,_(g,m,S(w._payload),b)}if(wa(w))return x(g,m,w,b);if(ra(w))return v(g,m,w,b);yc(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(g,m.sibling),m=s(m,w),m.return=g,g=m):(n(g,m),m=zf(w,g.mode,b),m.return=g,g=m),i(g)):n(g,m)}return _}var Oi=Qw(!0),Xw=Qw(!1),_u=Js(null),Su=null,ci=null,um=null;function dm(){um=ci=Su=null}function fm(e){var t=_u.current;rt(_u),e._currentValue=t}function Yh(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 wi(e,t){Su=e,um=ci=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(vn=!0),e.firstContext=null)}function zn(e){var t=e._currentValue;if(um!==e)if(e={context:e,memoizedValue:t,next:null},ci===null){if(Su===null)throw Error(V(308));ci=e,Su.dependencies={lanes:0,firstContext:e}}else ci=ci.next=e;return t}var fo=null;function hm(e){fo===null?fo=[e]:fo.push(e)}function Jw(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,hm(t)):(n.next=s.next,s.next=n),t.interleaved=n,Jr(e,r)}function Jr(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 Cs=!1;function pm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function e0(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 Kr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ls(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ve&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Jr(e,n)}return s=r.interleaved,s===null?(t.next=t,hm(r)):(t.next=s.next,s.next=t),r.interleaved=t,Jr(e,n)}function $c(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,Jp(e,n)}}function Wv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=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};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bu(e,t,n,r){var s=e.updateQueue;Cs=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?o=c:i.next=c,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,d=c=l=null,a=o;do{var p=a.lane,y=a.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,v=a;switch(p=t,y=n,v.tag){case 1:if(x=v.payload,typeof x=="function"){f=x.call(y,f,p);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,p=typeof x=="function"?x.call(y,f,p):x,p==null)break e;f=gt({},f,p);break e;case 2:Cs=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else y={eventTime:y,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=y,l=f):d=d.next=y,i|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Eo|=i,e.lanes=i,e.memoizedState=f}}function Yv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(V(191,s));s.call(r)}}}var Ul={},br=Js(Ul),rl=Js(Ul),sl=Js(Ul);function ho(e){if(e===Ul)throw Error(V(174));return e}function mm(e,t){switch(et(sl,t),et(rl,e),et(br,Ul),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ch(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ch(t,e)}rt(br),et(br,t)}function Di(){rt(br),rt(rl),rt(sl)}function t0(e){ho(sl.current);var t=ho(br.current),n=Ch(t,e.type);t!==n&&(et(rl,e),et(br,n))}function gm(e){rl.current===e&&(rt(br),rt(rl))}var pt=Js(0);function Cu(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 If=[];function vm(){for(var e=0;e<If.length;e++)If[e]._workInProgressVersionPrimary=null;If.length=0}var zc=is.ReactCurrentDispatcher,Lf=is.ReactCurrentBatchConfig,ko=0,mt=null,Tt=null,Mt=null,ku=!1,Da=!1,ol=0,YT=0;function Yt(){throw Error(V(321))}function ym(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function xm(e,t,n,r,s,o){if(ko=o,mt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,zc.current=e===null||e.memoizedState===null?GT:ZT,e=n(r,s),Da){o=0;do{if(Da=!1,ol=0,25<=o)throw Error(V(301));o+=1,Mt=Tt=null,t.updateQueue=null,zc.current=qT,e=n(r,s)}while(Da)}if(zc.current=Eu,t=Tt!==null&&Tt.next!==null,ko=0,Mt=Tt=mt=null,ku=!1,t)throw Error(V(300));return e}function wm(){var e=ol!==0;return ol=0,e}function mr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?mt.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function Wn(){if(Tt===null){var e=mt.alternate;e=e!==null?e.memoizedState:null}else e=Tt.next;var t=Mt===null?mt.memoizedState:Mt.next;if(t!==null)Mt=t,Tt=e;else{if(e===null)throw Error(V(310));Tt=e,e={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},Mt===null?mt.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function il(e,t){return typeof t=="function"?t(e):t}function Ff(e){var t=Wn(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=Tt,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,l=null,c=o;do{var d=c.lane;if((ko&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,i=r):l=l.next=f,mt.lanes|=d,Eo|=d}c=c.next}while(c!==null&&c!==o);l===null?i=r:l.next=a,or(r,t.memoizedState)||(vn=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,mt.lanes|=o,Eo|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Uf(e){var t=Wn(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);or(o,t.memoizedState)||(vn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function n0(){}function r0(e,t){var n=mt,r=Wn(),s=t(),o=!or(r.memoizedState,s);if(o&&(r.memoizedState=s,vn=!0),r=r.queue,_m(i0.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Mt!==null&&Mt.memoizedState.tag&1){if(n.flags|=2048,al(9,o0.bind(null,n,r,s,t),void 0,null),jt===null)throw Error(V(349));ko&30||s0(n,t,s)}return s}function s0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=mt.updateQueue,t===null?(t={lastEffect:null,stores:null},mt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function o0(e,t,n,r){t.value=n,t.getSnapshot=r,a0(t)&&l0(e)}function i0(e,t,n){return n(function(){a0(t)&&l0(e)})}function a0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch{return!0}}function l0(e){var t=Jr(e,1);t!==null&&rr(t,e,1,-1)}function Bv(e){var t=mr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:e},t.queue=e,e=e.dispatch=KT.bind(null,mt,e),[t.memoizedState,e]}function al(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=mt.updateQueue,t===null?(t={lastEffect:null,stores:null},mt.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 c0(){return Wn().memoizedState}function Wc(e,t,n,r){var s=mr();mt.flags|=e,s.memoizedState=al(1|t,n,void 0,r===void 0?null:r)}function fd(e,t,n,r){var s=Wn();r=r===void 0?null:r;var o=void 0;if(Tt!==null){var i=Tt.memoizedState;if(o=i.destroy,r!==null&&ym(r,i.deps)){s.memoizedState=al(t,n,o,r);return}}mt.flags|=e,s.memoizedState=al(1|t,n,o,r)}function Hv(e,t){return Wc(8390656,8,e,t)}function _m(e,t){return fd(2048,8,e,t)}function u0(e,t){return fd(4,2,e,t)}function d0(e,t){return fd(4,4,e,t)}function f0(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 h0(e,t,n){return n=n!=null?n.concat([e]):null,fd(4,4,f0.bind(null,t,e),n)}function Sm(){}function p0(e,t){var n=Wn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ym(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function m0(e,t){var n=Wn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ym(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function g0(e,t,n){return ko&21?(or(n,t)||(n=_w(),mt.lanes|=n,Eo|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,vn=!0),e.memoizedState=n)}function BT(e,t){var n=Ge;Ge=n!==0&&4>n?n:4,e(!0);var r=Lf.transition;Lf.transition={};try{e(!1),t()}finally{Ge=n,Lf.transition=r}}function v0(){return Wn().memoizedState}function HT(e,t,n){var r=Us(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},y0(e))x0(t,n);else if(n=Jw(e,t,n,r),n!==null){var s=an();rr(n,e,r,s),w0(n,t,r)}}function KT(e,t,n){var r=Us(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(y0(e))x0(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,or(a,i)){var l=t.interleaved;l===null?(s.next=s,hm(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Jw(e,t,s,r),n!==null&&(s=an(),rr(n,e,r,s),w0(n,t,r))}}function y0(e){var t=e.alternate;return e===mt||t!==null&&t===mt}function x0(e,t){Da=ku=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function w0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jp(e,n)}}var Eu={readContext:zn,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},GT={readContext:zn,useCallback:function(e,t){return mr().memoizedState=[e,t===void 0?null:t],e},useContext:zn,useEffect:Hv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wc(4194308,4,f0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wc(4,2,e,t)},useMemo:function(e,t){var n=mr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mr();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=HT.bind(null,mt,e),[r.memoizedState,e]},useRef:function(e){var t=mr();return e={current:e},t.memoizedState=e},useState:Bv,useDebugValue:Sm,useDeferredValue:function(e){return mr().memoizedState=e},useTransition:function(){var e=Bv(!1),t=e[0];return e=BT.bind(null,e[1]),mr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=mt,s=mr();if(lt){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),jt===null)throw Error(V(349));ko&30||s0(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Hv(i0.bind(null,r,o,e),[e]),r.flags|=2048,al(9,o0.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=mr(),t=jt.identifierPrefix;if(lt){var n=Yr,r=Wr;n=(r&~(1<<32-nr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ol++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=YT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ZT={readContext:zn,useCallback:p0,useContext:zn,useEffect:_m,useImperativeHandle:h0,useInsertionEffect:u0,useLayoutEffect:d0,useMemo:m0,useReducer:Ff,useRef:c0,useState:function(){return Ff(il)},useDebugValue:Sm,useDeferredValue:function(e){var t=Wn();return g0(t,Tt.memoizedState,e)},useTransition:function(){var e=Ff(il)[0],t=Wn().memoizedState;return[e,t]},useMutableSource:n0,useSyncExternalStore:r0,useId:v0,unstable_isNewReconciler:!1},qT={readContext:zn,useCallback:p0,useContext:zn,useEffect:_m,useImperativeHandle:h0,useInsertionEffect:u0,useLayoutEffect:d0,useMemo:m0,useReducer:Uf,useRef:c0,useState:function(){return Uf(il)},useDebugValue:Sm,useDeferredValue:function(e){var t=Wn();return Tt===null?t.memoizedState=e:g0(t,Tt.memoizedState,e)},useTransition:function(){var e=Uf(il)[0],t=Wn().memoizedState;return[e,t]},useMutableSource:n0,useSyncExternalStore:r0,useId:v0,unstable_isNewReconciler:!1};function Zn(e,t){if(e&&e.defaultProps){t=gt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Bh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:gt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hd={isMounted:function(e){return(e=e._reactInternals)?Io(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=an(),s=Us(e),o=Kr(r,s);o.payload=t,n!=null&&(o.callback=n),t=Ls(e,o,s),t!==null&&(rr(t,e,s,r),$c(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=an(),s=Us(e),o=Kr(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Ls(e,o,s),t!==null&&(rr(t,e,s,r),$c(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=an(),r=Us(e),s=Kr(n,r);s.tag=2,t!=null&&(s.callback=t),t=Ls(e,s,r),t!==null&&(rr(t,e,r,n),$c(t,e,r))}};function Kv(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!Ja(n,r)||!Ja(s,o):!0}function _0(e,t,n){var r=!1,s=Ws,o=t.contextType;return typeof o=="object"&&o!==null?o=zn(o):(s=xn(t)?bo:Qt.current,r=t.contextTypes,o=(r=r!=null)?Pi(e,s):Ws),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=hd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Gv(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&&hd.enqueueReplaceState(t,t.state,null)}function Hh(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},pm(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=zn(o):(o=xn(t)?bo:Qt.current,s.context=Pi(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Bh(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&hd.enqueueReplaceState(s,s.state,null),bu(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ji(e,t){try{var n="",r=t;do n+=CE(r),r=r.return;while(r);var s=n}catch(o){s=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Vf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Kh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var QT=typeof WeakMap=="function"?WeakMap:Map;function S0(e,t,n){n=Kr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Nu||(Nu=!0,rp=r),Kh(e,t)},n}function b0(e,t,n){n=Kr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Kh(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Kh(e,t),typeof r!="function"&&(Fs===null?Fs=new Set([this]):Fs.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Zv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new QT;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=dN.bind(null,e,t,n),t.then(e,e))}function qv(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 Qv(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,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=Kr(-1,1),t.tag=2,Ls(n,t,1))),n.lanes|=1),e)}var XT=is.ReactCurrentOwner,vn=!1;function sn(e,t,n,r){t.child=e===null?Xw(t,null,n,r):Oi(t,e.child,n,r)}function Xv(e,t,n,r,s){n=n.render;var o=t.ref;return wi(t,s),r=xm(e,t,n,r,o,s),n=wm(),e!==null&&!vn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,es(e,t,s)):(lt&&n&&am(t),t.flags|=1,sn(e,t,r,s),t.child)}function Jv(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Pm(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,C0(e,t,o,r,s)):(e=Kc(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ja,n(i,r)&&e.ref===t.ref)return es(e,t,s)}return t.flags|=1,e=Vs(o,r),e.ref=t.ref,e.return=t,t.child=e}function C0(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(Ja(o,r)&&e.ref===t.ref)if(vn=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(vn=!0);else return t.lanes=e.lanes,es(e,t,s)}return Gh(e,t,n,r,s)}function k0(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(di,Cn),Cn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,et(di,Cn),Cn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,et(di,Cn),Cn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,et(di,Cn),Cn|=r;return sn(e,t,s,n),t.child}function E0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Gh(e,t,n,r,s){var o=xn(n)?bo:Qt.current;return o=Pi(t,o),wi(t,s),n=xm(e,t,n,r,o,s),r=wm(),e!==null&&!vn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,es(e,t,s)):(lt&&r&&am(t),t.flags|=1,sn(e,t,n,s),t.child)}function ey(e,t,n,r,s){if(xn(n)){var o=!0;yu(t)}else o=!1;if(wi(t,s),t.stateNode===null)Yc(e,t),_0(t,n,r),Hh(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=zn(c):(c=xn(n)?bo:Qt.current,c=Pi(t,c));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!==c)&&Gv(t,i,r,c),Cs=!1;var p=t.memoizedState;i.state=p,bu(t,r,i,s),l=t.memoizedState,a!==r||p!==l||yn.current||Cs?(typeof d=="function"&&(Bh(t,n,d,r),l=t.memoizedState),(a=Cs||Kv(t,n,a,r,p,l,c))?(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=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,e0(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Zn(t.type,a),i.props=c,f=t.pendingProps,p=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=zn(l):(l=xn(n)?bo:Qt.current,l=Pi(t,l));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||p!==l)&&Gv(t,i,r,l),Cs=!1,p=t.memoizedState,i.state=p,bu(t,r,i,s);var x=t.memoizedState;a!==f||p!==x||yn.current||Cs?(typeof y=="function"&&(Bh(t,n,y,r),x=t.memoizedState),(c=Cs||Kv(t,n,c,r,p,x,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,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=x),i.props=r,i.state=x,i.context=l,r=c):(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 Zh(e,t,n,r,o,s)}function Zh(e,t,n,r,s,o){E0(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&Uv(t,n,!1),es(e,t,o);r=t.stateNode,XT.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Oi(t,e.child,null,o),t.child=Oi(t,null,a,o)):sn(e,t,a,o),t.memoizedState=r.state,s&&Uv(t,n,!0),t.child}function T0(e){var t=e.stateNode;t.pendingContext?Fv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Fv(e,t.context,!1),mm(e,t.containerInfo)}function ty(e,t,n,r,s){return Mi(),cm(s),t.flags|=256,sn(e,t,n,r),t.child}var qh={dehydrated:null,treeContext:null,retryLane:0};function Qh(e){return{baseLanes:e,cachePool:null,transitions:null}}function N0(e,t,n){var r=t.pendingProps,s=pt.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),et(pt,s&1),e===null)return Wh(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,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=gd(i,r,0,null),e=wo(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Qh(n),t.memoizedState=qh,e):bm(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return JT(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vs(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=Vs(a,o):(o=wo(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Qh(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=qh,r}return o=e.child,e=o.sibling,r=Vs(o,{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 bm(e,t){return t=gd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xc(e,t,n,r){return r!==null&&cm(r),Oi(t,e.child,null,n),e=bm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function JT(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Vf(Error(V(422))),xc(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=gd({mode:"visible",children:r.children},s,0,null),o=wo(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Oi(t,e.child,null,i),t.child.memoizedState=Qh(i),t.memoizedState=qh,o);if(!(t.mode&1))return xc(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(V(419)),r=Vf(o,r,void 0),xc(e,t,i,r)}if(a=(i&e.childLanes)!==0,vn||a){if(r=jt,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Jr(e,s),rr(r,e,s,-1))}return Rm(),r=Vf(Error(V(421))),xc(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=fN.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Tn=Is(s.nextSibling),Nn=t,lt=!0,Xn=null,e!==null&&(In[Ln++]=Wr,In[Ln++]=Yr,In[Ln++]=Co,Wr=e.id,Yr=e.overflow,Co=t),t=bm(t,r.children),t.flags|=4096,t)}function ny(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yh(e.return,t,n)}function $f(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function R0(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(sn(e,t,r.children,n),r=pt.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&&ny(e,n,t);else if(e.tag===19)ny(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(et(pt,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Cu(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),$f(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Cu(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}$f(t,!0,n,null,o);break;case"together":$f(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function es(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Eo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=Vs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function eN(e,t,n){switch(t.tag){case 3:T0(t),Mi();break;case 5:t0(t);break;case 1:xn(t.type)&&yu(t);break;case 4:mm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;et(_u,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(et(pt,pt.current&1),t.flags|=128,null):n&t.child.childLanes?N0(e,t,n):(et(pt,pt.current&1),e=es(e,t,n),e!==null?e.sibling:null);et(pt,pt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return R0(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),et(pt,pt.current),r)break;return null;case 22:case 23:return t.lanes=0,k0(e,t,n)}return es(e,t,n)}var P0,Xh,M0,O0;P0=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}};Xh=function(){};M0=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,ho(br.current);var o=null;switch(n){case"input":s=wh(e,s),r=wh(e,r),o=[];break;case"select":s=gt({},s,{value:void 0}),r=gt({},r,{value:void 0}),o=[];break;case"textarea":s=bh(e,s),r=bh(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=gu)}kh(n,r);var i;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ha.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="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||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ha.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&nt("scroll",e),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};O0=function(e,t,n,r){n!==r&&(t.flags|=4)};function ca(e,t){if(!lt)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 Bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function tN(e,t,n){var r=t.pendingProps;switch(lm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(t),null;case 1:return xn(t.type)&&vu(),Bt(t),null;case 3:return r=t.stateNode,Di(),rt(yn),rt(Qt),vm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(vc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xn!==null&&(ip(Xn),Xn=null))),Xh(e,t),Bt(t),null;case 5:gm(t);var s=ho(sl.current);if(n=t.type,e!==null&&t.stateNode!=null)M0(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(V(166));return Bt(t),null}if(e=ho(br.current),vc(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[gr]=t,r[nl]=o,e=(t.mode&1)!==0,n){case"dialog":nt("cancel",r),nt("close",r);break;case"iframe":case"object":case"embed":nt("load",r);break;case"video":case"audio":for(s=0;s<Sa.length;s++)nt(Sa[s],r);break;case"source":nt("error",r);break;case"img":case"image":case"link":nt("error",r),nt("load",r);break;case"details":nt("toggle",r);break;case"input":dv(r,o),nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},nt("invalid",r);break;case"textarea":hv(r,o),nt("invalid",r)}kh(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&gc(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&gc(r.textContent,a,e),s=["children",""+a]):Ha.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&nt("scroll",r)}switch(n){case"input":lc(r),fv(r,o,!0);break;case"textarea":lc(r),pv(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=gu)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=iw(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[gr]=t,e[nl]=r,P0(e,t,!1,!1),t.stateNode=e;e:{switch(i=Eh(n,r),n){case"dialog":nt("cancel",e),nt("close",e),s=r;break;case"iframe":case"object":case"embed":nt("load",e),s=r;break;case"video":case"audio":for(s=0;s<Sa.length;s++)nt(Sa[s],e);s=r;break;case"source":nt("error",e),s=r;break;case"img":case"image":case"link":nt("error",e),nt("load",e),s=r;break;case"details":nt("toggle",e),s=r;break;case"input":dv(e,r),s=wh(e,r),nt("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=gt({},r,{value:void 0}),nt("invalid",e);break;case"textarea":hv(e,r),s=bh(e,r),nt("invalid",e);break;default:s=r}kh(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?cw(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&aw(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ka(e,l):typeof l=="number"&&Ka(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ha.hasOwnProperty(o)?l!=null&&o==="onScroll"&&nt("scroll",e):l!=null&&Kp(e,o,l,i))}switch(n){case"input":lc(e),fv(e,r,!1);break;case"textarea":lc(e),pv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+zs(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?gi(e,!!r.multiple,o,!1):r.defaultValue!=null&&gi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=gu)}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 Bt(t),null;case 6:if(e&&t.stateNode!=null)O0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(V(166));if(n=ho(sl.current),ho(br.current),vc(t)){if(r=t.stateNode,n=t.memoizedProps,r[gr]=t,(o=r.nodeValue!==n)&&(e=Nn,e!==null))switch(e.tag){case 3:gc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&gc(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[gr]=t,t.stateNode=r}return Bt(t),null;case 13:if(rt(pt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(lt&&Tn!==null&&t.mode&1&&!(t.flags&128))qw(),Mi(),t.flags|=98560,o=!1;else if(o=vc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(V(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(V(317));o[gr]=t}else Mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bt(t),o=!1}else Xn!==null&&(ip(Xn),Xn=null),o=!0;if(!o)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||pt.current&1?Nt===0&&(Nt=3):Rm())),t.updateQueue!==null&&(t.flags|=4),Bt(t),null);case 4:return Di(),Xh(e,t),e===null&&el(t.stateNode.containerInfo),Bt(t),null;case 10:return fm(t.type._context),Bt(t),null;case 17:return xn(t.type)&&vu(),Bt(t),null;case 19:if(rt(pt),o=t.memoizedState,o===null)return Bt(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)ca(o,!1);else{if(Nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Cu(e),i!==null){for(t.flags|=128,ca(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return et(pt,pt.current&1|2),t.child}e=e.sibling}o.tail!==null&&St()>Ai&&(t.flags|=128,r=!0,ca(o,!1),t.lanes=4194304)}else{if(!r)if(e=Cu(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ca(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!lt)return Bt(t),null}else 2*St()-o.renderingStartTime>Ai&&n!==1073741824&&(t.flags|=128,r=!0,ca(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=St(),t.sibling=null,n=pt.current,et(pt,r?n&1|2:n&1),t):(Bt(t),null);case 22:case 23:return Nm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Cn&1073741824&&(Bt(t),t.subtreeFlags&6&&(t.flags|=8192)):Bt(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function nN(e,t){switch(lm(t),t.tag){case 1:return xn(t.type)&&vu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Di(),rt(yn),rt(Qt),vm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gm(t),null;case 13:if(rt(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(pt),null;case 4:return Di(),null;case 10:return fm(t.type._context),null;case 22:case 23:return Nm(),null;case 24:return null;default:return null}}var wc=!1,Kt=!1,rN=typeof WeakSet=="function"?WeakSet:Set,ie=null;function ui(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){yt(e,t,r)}else n.current=null}function Jh(e,t,n){try{n()}catch(r){yt(e,t,r)}}var ry=!1;function sN(e,t){if(Ih=hu,e=Lw(),im(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 s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var y;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(l=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===e)break t;if(p===n&&++c===s&&(a=i),p===o&&++d===r&&(l=i),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lh={focusedElem:e,selectionRange:n},hu=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var v=x.memoizedProps,_=x.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:Zn(t.type,v),_);g.__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(V(163))}}catch(b){yt(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return x=ry,ry=!1,x}function ja(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Jh(t,n,o)}s=s.next}while(s!==r)}}function pd(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 ep(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 D0(e){var t=e.alternate;t!==null&&(e.alternate=null,D0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gr],delete t[nl],delete t[Vh],delete t[VT],delete t[$T])),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 j0(e){return e.tag===5||e.tag===3||e.tag===4}function sy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||j0(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 tp(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=gu));else if(r!==4&&(e=e.child,e!==null))for(tp(e,t,n),e=e.sibling;e!==null;)tp(e,t,n),e=e.sibling}function np(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(np(e,t,n),e=e.sibling;e!==null;)np(e,t,n),e=e.sibling}var Lt=null,qn=!1;function vs(e,t,n){for(n=n.child;n!==null;)A0(e,t,n),n=n.sibling}function A0(e,t,n){if(Sr&&typeof Sr.onCommitFiberUnmount=="function")try{Sr.onCommitFiberUnmount(id,n)}catch{}switch(n.tag){case 5:Kt||ui(n,t);case 6:var r=Lt,s=qn;Lt=null,vs(e,t,n),Lt=r,qn=s,Lt!==null&&(qn?(e=Lt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Lt.removeChild(n.stateNode));break;case 18:Lt!==null&&(qn?(e=Lt,n=n.stateNode,e.nodeType===8?jf(e.parentNode,n):e.nodeType===1&&jf(e,n),Qa(e)):jf(Lt,n.stateNode));break;case 4:r=Lt,s=qn,Lt=n.stateNode.containerInfo,qn=!0,vs(e,t,n),Lt=r,qn=s;break;case 0:case 11:case 14:case 15:if(!Kt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Jh(n,t,i),s=s.next}while(s!==r)}vs(e,t,n);break;case 1:if(!Kt&&(ui(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){yt(n,t,a)}vs(e,t,n);break;case 21:vs(e,t,n);break;case 22:n.mode&1?(Kt=(r=Kt)||n.memoizedState!==null,vs(e,t,n),Kt=r):vs(e,t,n);break;default:vs(e,t,n)}}function oy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rN),t.forEach(function(r){var s=hN.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Gn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Lt=a.stateNode,qn=!1;break e;case 3:Lt=a.stateNode.containerInfo,qn=!0;break e;case 4:Lt=a.stateNode.containerInfo,qn=!0;break e}a=a.return}if(Lt===null)throw Error(V(160));A0(o,i,s),Lt=null,qn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){yt(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)I0(t,e),t=t.sibling}function I0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Gn(t,e),pr(e),r&4){try{ja(3,e,e.return),pd(3,e)}catch(v){yt(e,e.return,v)}try{ja(5,e,e.return)}catch(v){yt(e,e.return,v)}}break;case 1:Gn(t,e),pr(e),r&512&&n!==null&&ui(n,n.return);break;case 5:if(Gn(t,e),pr(e),r&512&&n!==null&&ui(n,n.return),e.flags&32){var s=e.stateNode;try{Ka(s,"")}catch(v){yt(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&sw(s,o),Eh(a,i);var c=Eh(a,o);for(i=0;i<l.length;i+=2){var d=l[i],f=l[i+1];d==="style"?cw(s,f):d==="dangerouslySetInnerHTML"?aw(s,f):d==="children"?Ka(s,f):Kp(s,d,f,c)}switch(a){case"input":_h(s,o);break;case"textarea":ow(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?gi(s,!!o.multiple,y,!1):p!==!!o.multiple&&(o.defaultValue!=null?gi(s,!!o.multiple,o.defaultValue,!0):gi(s,!!o.multiple,o.multiple?[]:"",!1))}s[nl]=o}catch(v){yt(e,e.return,v)}}break;case 6:if(Gn(t,e),pr(e),r&4){if(e.stateNode===null)throw Error(V(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(v){yt(e,e.return,v)}}break;case 3:if(Gn(t,e),pr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Qa(t.containerInfo)}catch(v){yt(e,e.return,v)}break;case 4:Gn(t,e),pr(e);break;case 13:Gn(t,e),pr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Em=St())),r&4&&oy(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Kt=(c=Kt)||d,Gn(t,e),Kt=c):Gn(t,e),pr(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(ie=e,d=e.child;d!==null;){for(f=ie=d;ie!==null;){switch(p=ie,y=p.child,p.tag){case 0:case 11:case 14:case 15:ja(4,p,p.return);break;case 1:ui(p,p.return);var x=p.stateNode;if(typeof x.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(v){yt(r,n,v)}}break;case 5:ui(p,p.return);break;case 22:if(p.memoizedState!==null){ay(f);continue}}y!==null?(y.return=p,ie=y):ay(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=lw("display",i))}catch(v){yt(e,e.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(v){yt(e,e.return,v)}}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:Gn(t,e),pr(e),r&4&&oy(e);break;case 21:break;default:Gn(t,e),pr(e)}}function pr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(j0(n)){var r=n;break e}n=n.return}throw Error(V(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ka(s,""),r.flags&=-33);var o=sy(e);np(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=sy(e);tp(e,a,i);break;default:throw Error(V(161))}}catch(l){yt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function oN(e,t,n){ie=e,L0(e)}function L0(e,t,n){for(var r=(e.mode&1)!==0;ie!==null;){var s=ie,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||wc;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Kt;a=wc;var c=Kt;if(wc=i,(Kt=l)&&!c)for(ie=s;ie!==null;)i=ie,l=i.child,i.tag===22&&i.memoizedState!==null?ly(s):l!==null?(l.return=i,ie=l):ly(s);for(;o!==null;)ie=o,L0(o),o=o.sibling;ie=s,wc=a,Kt=c}iy(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,ie=o):iy(e)}}function iy(e){for(;ie!==null;){var t=ie;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Kt||pd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Kt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Zn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Yv(t,o,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}Yv(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 c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Qa(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}Kt||t.flags&512&&ep(t)}catch(p){yt(t,t.return,p)}}if(t===e){ie=null;break}if(n=t.sibling,n!==null){n.return=t.return,ie=n;break}ie=t.return}}function ay(e){for(;ie!==null;){var t=ie;if(t===e){ie=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ie=n;break}ie=t.return}}function ly(e){for(;ie!==null;){var t=ie;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pd(4,t)}catch(l){yt(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){yt(t,s,l)}}var o=t.return;try{ep(t)}catch(l){yt(t,o,l)}break;case 5:var i=t.return;try{ep(t)}catch(l){yt(t,i,l)}}}catch(l){yt(t,t.return,l)}if(t===e){ie=null;break}var a=t.sibling;if(a!==null){a.return=t.return,ie=a;break}ie=t.return}}var iN=Math.ceil,Tu=is.ReactCurrentDispatcher,Cm=is.ReactCurrentOwner,Vn=is.ReactCurrentBatchConfig,Ve=0,jt=null,kt=null,$t=0,Cn=0,di=Js(0),Nt=0,ll=null,Eo=0,md=0,km=0,Aa=null,mn=null,Em=0,Ai=1/0,Ur=null,Nu=!1,rp=null,Fs=null,_c=!1,Rs=null,Ru=0,Ia=0,sp=null,Bc=-1,Hc=0;function an(){return Ve&6?St():Bc!==-1?Bc:Bc=St()}function Us(e){return e.mode&1?Ve&2&&$t!==0?$t&-$t:WT.transition!==null?(Hc===0&&(Hc=_w()),Hc):(e=Ge,e!==0||(e=window.event,e=e===void 0?16:Nw(e.type)),e):1}function rr(e,t,n,r){if(50<Ia)throw Ia=0,sp=null,Error(V(185));Il(e,n,r),(!(Ve&2)||e!==jt)&&(e===jt&&(!(Ve&2)&&(md|=n),Nt===4&&Es(e,$t)),wn(e,r),n===1&&Ve===0&&!(t.mode&1)&&(Ai=St()+500,dd&&eo()))}function wn(e,t){var n=e.callbackNode;WE(e,t);var r=fu(e,e===jt?$t:0);if(r===0)n!==null&&vv(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vv(n),t===1)e.tag===0?zT(cy.bind(null,e)):Kw(cy.bind(null,e)),FT(function(){!(Ve&6)&&eo()}),n=null;else{switch(Sw(r)){case 1:n=Xp;break;case 4:n=xw;break;case 16:n=du;break;case 536870912:n=ww;break;default:n=du}n=B0(n,F0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function F0(e,t){if(Bc=-1,Hc=0,Ve&6)throw Error(V(327));var n=e.callbackNode;if(_i()&&e.callbackNode!==n)return null;var r=fu(e,e===jt?$t:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Pu(e,r);else{t=r;var s=Ve;Ve|=2;var o=V0();(jt!==e||$t!==t)&&(Ur=null,Ai=St()+500,xo(e,t));do try{cN();break}catch(a){U0(e,a)}while(!0);dm(),Tu.current=o,Ve=s,kt!==null?t=0:(jt=null,$t=0,t=Nt)}if(t!==0){if(t===2&&(s=Mh(e),s!==0&&(r=s,t=op(e,s))),t===1)throw n=ll,xo(e,0),Es(e,r),wn(e,St()),n;if(t===6)Es(e,r);else{if(s=e.current.alternate,!(r&30)&&!aN(s)&&(t=Pu(e,r),t===2&&(o=Mh(e),o!==0&&(r=o,t=op(e,o))),t===1))throw n=ll,xo(e,0),Es(e,r),wn(e,St()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(V(345));case 2:lo(e,mn,Ur);break;case 3:if(Es(e,r),(r&130023424)===r&&(t=Em+500-St(),10<t)){if(fu(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){an(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Uh(lo.bind(null,e,mn,Ur),t);break}lo(e,mn,Ur);break;case 4:if(Es(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-nr(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=St()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*iN(r/1960))-r,10<r){e.timeoutHandle=Uh(lo.bind(null,e,mn,Ur),r);break}lo(e,mn,Ur);break;case 5:lo(e,mn,Ur);break;default:throw Error(V(329))}}}return wn(e,St()),e.callbackNode===n?F0.bind(null,e):null}function op(e,t){var n=Aa;return e.current.memoizedState.isDehydrated&&(xo(e,t).flags|=256),e=Pu(e,t),e!==2&&(t=mn,mn=n,t!==null&&ip(t)),e}function ip(e){mn===null?mn=e:mn.push.apply(mn,e)}function aN(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 s=n[r],o=s.getSnapshot;s=s.value;try{if(!or(o(),s))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 Es(e,t){for(t&=~km,t&=~md,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-nr(t),r=1<<n;e[n]=-1,t&=~r}}function cy(e){if(Ve&6)throw Error(V(327));_i();var t=fu(e,0);if(!(t&1))return wn(e,St()),null;var n=Pu(e,t);if(e.tag!==0&&n===2){var r=Mh(e);r!==0&&(t=r,n=op(e,r))}if(n===1)throw n=ll,xo(e,0),Es(e,t),wn(e,St()),n;if(n===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,lo(e,mn,Ur),wn(e,St()),null}function Tm(e,t){var n=Ve;Ve|=1;try{return e(t)}finally{Ve=n,Ve===0&&(Ai=St()+500,dd&&eo())}}function To(e){Rs!==null&&Rs.tag===0&&!(Ve&6)&&_i();var t=Ve;Ve|=1;var n=Vn.transition,r=Ge;try{if(Vn.transition=null,Ge=1,e)return e()}finally{Ge=r,Vn.transition=n,Ve=t,!(Ve&6)&&eo()}}function Nm(){Cn=di.current,rt(di)}function xo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,LT(n)),kt!==null)for(n=kt.return;n!==null;){var r=n;switch(lm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vu();break;case 3:Di(),rt(yn),rt(Qt),vm();break;case 5:gm(r);break;case 4:Di();break;case 13:rt(pt);break;case 19:rt(pt);break;case 10:fm(r.type._context);break;case 22:case 23:Nm()}n=n.return}if(jt=e,kt=e=Vs(e.current,null),$t=Cn=t,Nt=0,ll=null,km=md=Eo=0,mn=Aa=null,fo!==null){for(t=0;t<fo.length;t++)if(n=fo[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}fo=null}return e}function U0(e,t){do{var n=kt;try{if(dm(),zc.current=Eu,ku){for(var r=mt.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ku=!1}if(ko=0,Mt=Tt=mt=null,Da=!1,ol=0,Cm.current=null,n===null||n.return===null){Nt=1,ll=t,kt=null;break}e:{var o=e,i=n.return,a=n,l=t;if(t=$t,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=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 y=qv(i);if(y!==null){y.flags&=-257,Qv(y,i,a,o,t),y.mode&1&&Zv(o,c,t),t=y,l=c;var x=t.updateQueue;if(x===null){var v=new Set;v.add(l),t.updateQueue=v}else x.add(l);break e}else{if(!(t&1)){Zv(o,c,t),Rm();break e}l=Error(V(426))}}else if(lt&&a.mode&1){var _=qv(i);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Qv(_,i,a,o,t),cm(ji(l,a));break e}}o=l=ji(l,a),Nt!==4&&(Nt=2),Aa===null?Aa=[o]:Aa.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=S0(o,l,t);Wv(o,g);break e;case 1:a=l;var m=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Fs===null||!Fs.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var b=b0(o,a,t);Wv(o,b);break e}}o=o.return}while(o!==null)}z0(n)}catch(C){t=C,kt===n&&n!==null&&(kt=n=n.return);continue}break}while(!0)}function V0(){var e=Tu.current;return Tu.current=Eu,e===null?Eu:e}function Rm(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),jt===null||!(Eo&268435455)&&!(md&268435455)||Es(jt,$t)}function Pu(e,t){var n=Ve;Ve|=2;var r=V0();(jt!==e||$t!==t)&&(Ur=null,xo(e,t));do try{lN();break}catch(s){U0(e,s)}while(!0);if(dm(),Ve=n,Tu.current=r,kt!==null)throw Error(V(261));return jt=null,$t=0,Nt}function lN(){for(;kt!==null;)$0(kt)}function cN(){for(;kt!==null&&!jE();)$0(kt)}function $0(e){var t=Y0(e.alternate,e,Cn);e.memoizedProps=e.pendingProps,t===null?z0(e):kt=t,Cm.current=null}function z0(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,kt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Nt=6,kt=null;return}}else if(n=tN(n,t,Cn),n!==null){kt=n;return}if(t=t.sibling,t!==null){kt=t;return}kt=t=e}while(t!==null);Nt===0&&(Nt=5)}function lo(e,t,n){var r=Ge,s=Vn.transition;try{Vn.transition=null,Ge=1,uN(e,t,n,r)}finally{Vn.transition=s,Ge=r}return null}function uN(e,t,n,r){do _i();while(Rs!==null);if(Ve&6)throw Error(V(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(V(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(YE(e,o),e===jt&&(kt=jt=null,$t=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_c||(_c=!0,B0(du,function(){return _i(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Vn.transition,Vn.transition=null;var i=Ge;Ge=1;var a=Ve;Ve|=4,Cm.current=null,sN(e,n),I0(n,e),PT(Lh),hu=!!Ih,Lh=Ih=null,e.current=n,oN(n),AE(),Ve=a,Ge=i,Vn.transition=o}else e.current=n;if(_c&&(_c=!1,Rs=e,Ru=s),o=e.pendingLanes,o===0&&(Fs=null),FE(n.stateNode),wn(e,St()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Nu)throw Nu=!1,e=rp,rp=null,e;return Ru&1&&e.tag!==0&&_i(),o=e.pendingLanes,o&1?e===sp?Ia++:(Ia=0,sp=e):Ia=0,eo(),null}function _i(){if(Rs!==null){var e=Sw(Ru),t=Vn.transition,n=Ge;try{if(Vn.transition=null,Ge=16>e?16:e,Rs===null)var r=!1;else{if(e=Rs,Rs=null,Ru=0,Ve&6)throw Error(V(331));var s=Ve;for(Ve|=4,ie=e.current;ie!==null;){var o=ie,i=o.child;if(ie.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(ie=c;ie!==null;){var d=ie;switch(d.tag){case 0:case 11:case 15:ja(8,d,o)}var f=d.child;if(f!==null)f.return=d,ie=f;else for(;ie!==null;){d=ie;var p=d.sibling,y=d.return;if(D0(d),d===c){ie=null;break}if(p!==null){p.return=y,ie=p;break}ie=y}}}var x=o.alternate;if(x!==null){var v=x.child;if(v!==null){x.child=null;do{var _=v.sibling;v.sibling=null,v=_}while(v!==null)}}ie=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,ie=i;else e:for(;ie!==null;){if(o=ie,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ja(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,ie=g;break e}ie=o.return}}var m=e.current;for(ie=m;ie!==null;){i=ie;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,ie=w;else e:for(i=m;ie!==null;){if(a=ie,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:pd(9,a)}}catch(C){yt(a,a.return,C)}if(a===i){ie=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,ie=b;break e}ie=a.return}}if(Ve=s,eo(),Sr&&typeof Sr.onPostCommitFiberRoot=="function")try{Sr.onPostCommitFiberRoot(id,e)}catch{}r=!0}return r}finally{Ge=n,Vn.transition=t}}return!1}function uy(e,t,n){t=ji(n,t),t=S0(e,t,1),e=Ls(e,t,1),t=an(),e!==null&&(Il(e,1,t),wn(e,t))}function yt(e,t,n){if(e.tag===3)uy(e,e,n);else for(;t!==null;){if(t.tag===3){uy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Fs===null||!Fs.has(r))){e=ji(n,e),e=b0(t,e,1),t=Ls(t,e,1),e=an(),t!==null&&(Il(t,1,e),wn(t,e));break}}t=t.return}}function dN(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=an(),e.pingedLanes|=e.suspendedLanes&n,jt===e&&($t&n)===n&&(Nt===4||Nt===3&&($t&130023424)===$t&&500>St()-Em?xo(e,0):km|=n),wn(e,t)}function W0(e,t){t===0&&(e.mode&1?(t=dc,dc<<=1,!(dc&130023424)&&(dc=4194304)):t=1);var n=an();e=Jr(e,t),e!==null&&(Il(e,t,n),wn(e,n))}function fN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),W0(e,n)}function hN(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(V(314))}r!==null&&r.delete(t),W0(e,n)}var Y0;Y0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yn.current)vn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return vn=!1,eN(e,t,n);vn=!!(e.flags&131072)}else vn=!1,lt&&t.flags&1048576&&Gw(t,wu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yc(e,t),e=t.pendingProps;var s=Pi(t,Qt.current);wi(t,n),s=xm(null,t,r,e,s,n);var o=wm();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xn(r)?(o=!0,yu(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,pm(t),s.updater=hd,t.stateNode=s,s._reactInternals=t,Hh(t,r,e,n),t=Zh(null,t,r,!0,o,n)):(t.tag=0,lt&&o&&am(t),sn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=mN(r),e=Zn(r,e),s){case 0:t=Gh(null,t,r,e,n);break e;case 1:t=ey(null,t,r,e,n);break e;case 11:t=Xv(null,t,r,e,n);break e;case 14:t=Jv(null,t,r,Zn(r.type,e),n);break e}throw Error(V(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Zn(r,s),Gh(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Zn(r,s),ey(e,t,r,s,n);case 3:e:{if(T0(t),e===null)throw Error(V(387));r=t.pendingProps,o=t.memoizedState,s=o.element,e0(e,t),bu(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=ji(Error(V(423)),t),t=ty(e,t,r,n,s);break e}else if(r!==s){s=ji(Error(V(424)),t),t=ty(e,t,r,n,s);break e}else for(Tn=Is(t.stateNode.containerInfo.firstChild),Nn=t,lt=!0,Xn=null,n=Xw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mi(),r===s){t=es(e,t,n);break e}sn(e,t,r,n)}t=t.child}return t;case 5:return t0(t),e===null&&Wh(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Fh(r,s)?i=null:o!==null&&Fh(r,o)&&(t.flags|=32),E0(e,t),sn(e,t,i,n),t.child;case 6:return e===null&&Wh(t),null;case 13:return N0(e,t,n);case 4:return mm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oi(t,null,r,n):sn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Zn(r,s),Xv(e,t,r,s,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,s=t.pendingProps,o=t.memoizedProps,i=s.value,et(_u,r._currentValue),r._currentValue=i,o!==null)if(or(o.value,i)){if(o.children===s.children&&!yn.current){t=es(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Kr(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Yh(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(V(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Yh(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}sn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,wi(t,n),s=zn(s),r=r(s),t.flags|=1,sn(e,t,r,n),t.child;case 14:return r=t.type,s=Zn(r,t.pendingProps),s=Zn(r.type,s),Jv(e,t,r,s,n);case 15:return C0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Zn(r,s),Yc(e,t),t.tag=1,xn(r)?(e=!0,yu(t)):e=!1,wi(t,n),_0(t,r,s),Hh(t,r,s,n),Zh(null,t,r,!0,e,n);case 19:return R0(e,t,n);case 22:return k0(e,t,n)}throw Error(V(156,t.tag))};function B0(e,t){return yw(e,t)}function pN(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 Un(e,t,n,r){return new pN(e,t,n,r)}function Pm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mN(e){if(typeof e=="function")return Pm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zp)return 11;if(e===qp)return 14}return 2}function Vs(e,t){var n=e.alternate;return n===null?(n=Un(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 Kc(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Pm(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ti:return wo(n.children,s,o,t);case Gp:i=8,s|=8;break;case gh:return e=Un(12,n,t,s|2),e.elementType=gh,e.lanes=o,e;case vh:return e=Un(13,n,t,s),e.elementType=vh,e.lanes=o,e;case yh:return e=Un(19,n,t,s),e.elementType=yh,e.lanes=o,e;case tw:return gd(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jx:i=10;break e;case ew:i=9;break e;case Zp:i=11;break e;case qp:i=14;break e;case bs:i=16,r=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=Un(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function wo(e,t,n,r){return e=Un(7,e,r,t),e.lanes=n,e}function gd(e,t,n,r){return e=Un(22,e,r,t),e.elementType=tw,e.lanes=n,e.stateNode={isHidden:!1},e}function zf(e,t,n){return e=Un(6,e,null,t),e.lanes=n,e}function Wf(e,t,n){return t=Un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gN(e,t,n,r,s){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=bf(0),this.expirationTimes=bf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bf(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Mm(e,t,n,r,s,o,i,a,l){return e=new gN(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Un(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pm(o),e}function vN(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ei,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function H0(e){if(!e)return Ws;e=e._reactInternals;e:{if(Io(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var n=e.type;if(xn(n))return Hw(e,n,t)}return t}function K0(e,t,n,r,s,o,i,a,l){return e=Mm(n,r,!0,e,s,o,i,a,l),e.context=H0(null),n=e.current,r=an(),s=Us(n),o=Kr(r,s),o.callback=t??null,Ls(n,o,s),e.current.lanes=s,Il(e,s,r),wn(e,r),e}function vd(e,t,n,r){var s=t.current,o=an(),i=Us(s);return n=H0(n),t.context===null?t.context=n:t.pendingContext=n,t=Kr(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ls(s,t,i),e!==null&&(rr(e,s,i,o),$c(e,s,i)),i}function Mu(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 dy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Om(e,t){dy(e,t),(e=e.alternate)&&dy(e,t)}function yN(){return null}var G0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Dm(e){this._internalRoot=e}yd.prototype.render=Dm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));vd(e,t,null,null)};yd.prototype.unmount=Dm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;To(function(){vd(null,e,null,null)}),t[Xr]=null}};function yd(e){this._internalRoot=e}yd.prototype.unstable_scheduleHydration=function(e){if(e){var t=kw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ks.length&&t!==0&&t<ks[n].priority;n++);ks.splice(n,0,e),n===0&&Tw(e)}};function jm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function xd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fy(){}function xN(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var c=Mu(i);o.call(c)}}var i=K0(t,r,e,0,null,!1,!1,"",fy);return e._reactRootContainer=i,e[Xr]=i.current,el(e.nodeType===8?e.parentNode:e),To(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=Mu(l);a.call(c)}}var l=Mm(e,0,!1,null,null,!1,!1,"",fy);return e._reactRootContainer=l,e[Xr]=l.current,el(e.nodeType===8?e.parentNode:e),To(function(){vd(t,l,n,r)}),l}function wd(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=Mu(i);a.call(l)}}vd(t,i,e,s)}else i=xN(n,t,e,s,r);return Mu(i)}bw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=_a(t.pendingLanes);n!==0&&(Jp(t,n|1),wn(t,St()),!(Ve&6)&&(Ai=St()+500,eo()))}break;case 13:To(function(){var r=Jr(e,1);if(r!==null){var s=an();rr(r,e,1,s)}}),Om(e,1)}};em=function(e){if(e.tag===13){var t=Jr(e,134217728);if(t!==null){var n=an();rr(t,e,134217728,n)}Om(e,134217728)}};Cw=function(e){if(e.tag===13){var t=Us(e),n=Jr(e,t);if(n!==null){var r=an();rr(n,e,t,r)}Om(e,t)}};kw=function(){return Ge};Ew=function(e,t){var n=Ge;try{return Ge=e,t()}finally{Ge=n}};Nh=function(e,t,n){switch(t){case"input":if(_h(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 s=ud(r);if(!s)throw Error(V(90));rw(r),_h(r,s)}}}break;case"textarea":ow(e,n);break;case"select":t=n.value,t!=null&&gi(e,!!n.multiple,t,!1)}};fw=Tm;hw=To;var wN={usingClientEntryPoint:!1,Events:[Fl,oi,ud,uw,dw,Tm]},ua={findFiberByHostInstance:uo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_N={bundleType:ua.bundleType,version:ua.version,rendererPackageName:ua.rendererPackageName,rendererConfig:ua.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:is.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=gw(e),e===null?null:e.stateNode},findFiberByHostInstance:ua.findFiberByHostInstance||yN,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 Sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sc.isDisabled&&Sc.supportsFiber)try{id=Sc.inject(_N),Sr=Sc}catch{}}Dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wN;Dn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jm(t))throw Error(V(200));return vN(e,t,null,n)};Dn.createRoot=function(e,t){if(!jm(e))throw Error(V(299));var n=!1,r="",s=G0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Mm(e,1,!1,null,null,n,!1,r,s),e[Xr]=t.current,el(e.nodeType===8?e.parentNode:e),new Dm(t)};Dn.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(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=gw(t),e=e===null?null:e.stateNode,e};Dn.flushSync=function(e){return To(e)};Dn.hydrate=function(e,t,n){if(!xd(t))throw Error(V(200));return wd(null,e,t,!0,n)};Dn.hydrateRoot=function(e,t,n){if(!jm(e))throw Error(V(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=G0;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=K0(t,null,e,1,n??null,s,!1,o,i),e[Xr]=t.current,el(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new yd(t)};Dn.render=function(e,t,n){if(!xd(t))throw Error(V(200));return wd(null,e,t,!1,n)};Dn.unmountComponentAtNode=function(e){if(!xd(e))throw Error(V(40));return e._reactRootContainer?(To(function(){wd(null,null,e,!1,function(){e._reactRootContainer=null,e[Xr]=null})}),!0):!1};Dn.unstable_batchedUpdates=Tm;Dn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!xd(n))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return wd(e,t,n,!1,r)};Dn.version="18.3.1-next-f1338f8080-20240426";function Z0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Z0)}catch(e){console.error(e)}}Z0(),Zx.exports=Dn;var as=Zx.exports;const q0=Ix(as),SN=Ax({__proto__:null,default:q0},[as]);var hy=as;ph.createRoot=hy.createRoot,ph.hydrateRoot=hy.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 ht(){return ht=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},ht.apply(this,arguments)}var Ct;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ct||(Ct={}));const py="popstate";function bN(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:a="",hash:l=""}=ls(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),cl("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(s,o){let i=s.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let l=s.location.href,c=l.indexOf("#");a=c===-1?l:l.slice(0,c)}return a+"#"+(typeof o=="string"?o:Ro(o))}function r(s,o){No(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return kN(t,n,r,e)}function Ne(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function No(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function CN(){return Math.random().toString(36).substr(2,8)}function my(e,t){return{usr:e.state,key:e.key,idx:t}}function cl(e,t,n,r){return n===void 0&&(n=null),ht({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ls(t):t,{state:n,key:t&&t.key||r||CN()})}function Ro(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 ls(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 kN(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=Ct.Pop,l=null,c=d();c==null&&(c=0,i.replaceState(ht({},i.state,{idx:c}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Ct.Pop;let _=d(),g=_==null?null:_-c;c=_,l&&l({action:a,location:v.location,delta:g})}function p(_,g){a=Ct.Push;let m=cl(v.location,_,g);n&&n(m,_),c=d()+1;let w=my(m,c),b=v.createHref(m);try{i.pushState(w,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(b)}o&&l&&l({action:a,location:v.location,delta:1})}function y(_,g){a=Ct.Replace;let m=cl(v.location,_,g);n&&n(m,_),c=d();let w=my(m,c),b=v.createHref(m);i.replaceState(w,"",b),o&&l&&l({action:a,location:v.location,delta:0})}function x(_){let g=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof _=="string"?_:Ro(_);return m=m.replace(/ $/,"%20"),Ne(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let v={get action(){return a},get location(){return e(s,i)},listen(_){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(py,f),l=_,()=>{s.removeEventListener(py,f),l=null}},createHref(_){return t(s,_)},createURL:x,encodeLocation(_){let g=x(_);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:y,go(_){return i.go(_)}};return v}var Je;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Je||(Je={}));const EN=new Set(["lazy","caseSensitive","path","id","index","children"]);function TN(e){return e.index===!0}function ul(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(Ne(s.index!==!0||!s.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`),TN(s)){let l=ht({},s,t(s),{id:a});return r[a]=l,l}else{let l=ht({},s,t(s),{id:a,children:void 0});return r[a]=l,s.children&&(l.children=ul(s.children,t,i,r)),l}})}function co(e,t,n){return n===void 0&&(n="/"),Gc(e,t,n,!1)}function Gc(e,t,n,r){let s=typeof t=="string"?ls(t):t,o=Yi(s.pathname||"/",n);if(o==null)return null;let i=Q0(e);RN(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=VN(o);a=FN(i[l],c,r)}return a}function NN(e,t){let{route:n,pathname:r,params:s}=e;return{id:n.id,pathname:r,params:s,data:t[n.id],handle:n.handle}}function Q0(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};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 c=Gr([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(Ne(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Q0(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:IN(c,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of X0(o.path))s(o,i,l)}),t}function X0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=X0(r.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function RN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:LN(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const PN=/^:[\w-]+$/,MN=3,ON=2,DN=1,jN=10,AN=-2,gy=e=>e==="*";function IN(e,t){let n=e.split("/"),r=n.length;return n.some(gy)&&(r+=AN),t&&(r+=ON),n.filter(s=>!gy(s)).reduce((s,o)=>s+(PN.test(o)?MN:o===""?DN:jN),r)}function LN(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function FN(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=vy({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),p=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=vy({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:Gr([o,f.pathname]),pathnameBase:WN(Gr([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=Gr([o,f.pathnameBase]))}return i}function vy(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=UN(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:p,isOptional:y}=d;if(p==="*"){let v=a[f]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const x=a[f];return y&&!x?c[p]=void 0:c[p]=(x||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function UN(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),No(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=[],s="^"+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:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function VN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return No(!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 Yi(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 $N(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?ls(e):e;return{pathname:n?n.startsWith("/")?n:zN(n,t):t,search:YN(r),hash:BN(s)}}function zN(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Yf(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 J0(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _d(e,t){let n=J0(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Sd(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=ls(e):(s=ht({},e),Ne(!s.pathname||!s.pathname.includes("?"),Yf("?","pathname","search",s)),Ne(!s.pathname||!s.pathname.includes("#"),Yf("#","pathname","hash",s)),Ne(!s.search||!s.search.includes("#"),Yf("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.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;s.pathname=p.join("/")}a=f>=0?t[f]:"/"}let l=$N(s,a),c=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Gr=e=>e.join("/").replace(/\/\/+/g,"/"),WN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),YN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,BN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Am{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function bd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const e_=["post","put","patch","delete"],HN=new Set(e_),KN=["get",...e_],GN=new Set(KN),ZN=new Set([301,302,303,307,308]),qN=new Set([307,308]),Bf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},QN={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},da={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Im=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,XN=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),t_="remix-router-transitions";function JN(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 s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let E=e.detectErrorBoundary;s=T=>({hasErrorBoundary:E(T)})}else s=XN;let o={},i=ul(e.routes,s,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||sR,d=e.unstable_patchRoutesOnMiss,f=ht({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),p=null,y=new Set,x=null,v=null,_=null,g=e.hydrationData!=null,m=co(i,e.history.location,l),w=null;if(m==null&&!d){let E=rn(404,{pathname:e.history.location.pathname}),{matches:T,route:M}=Ty(i);m=T,w={[M.id]:E}}m&&d&&!e.hydrationData&&vf(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,M=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(M)}else b=m.every(M)}else b=e.hydrationData!=null;let C,S={historyAction:e.history.action,location:e.history.location,matches:m,initialized:b,navigation:Bf,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},N=Ct.Pop,R=!1,F,L=!1,Z=new Map,D=null,B=!1,A=!1,H=[],ne=[],W=new Map,I=0,O=-1,q=new Map,ae=new Set,me=new Map,Qe=new Map,Pe=new Set,ct=new Map,Le=new Map,le=new Map,Me=!1;function Ye(){if(p=e.history.listen(E=>{let{action:T,location:M,delta:U}=E;if(Me){Me=!1;return}No(Le.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=tv({currentLocation:S.location,nextLocation:M,historyAction:T});if(re&&U!=null){Me=!0,e.history.go(U*-1),ec(re,{state:"blocked",location:M,proceed(){ec(re,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),e.history.go(U)},reset(){let ue=new Map(S.blockers);ue.set(re,da),we({blockers:ue})}});return}return fn(T,M)}),n){vR(t,Z);let E=()=>yR(t,Z);t.addEventListener("pagehide",E),D=()=>t.removeEventListener("pagehide",E)}return S.initialized||fn(Ct.Pop,S.location,{initialHydration:!0}),C}function Fe(){p&&p(),D&&D(),y.clear(),F&&F.abort(),S.fetchers.forEach((E,T)=>ms(T)),S.blockers.forEach((E,T)=>ev(T))}function Ue(E){return y.add(E),()=>y.delete(E)}function we(E,T){T===void 0&&(T={}),S=ht({},S,E);let M=[],U=[];f.v7_fetcherPersist&&S.fetchers.forEach((re,ue)=>{re.state==="idle"&&(Pe.has(ue)?U.push(ue):M.push(ue))}),[...y].forEach(re=>re(S,{deletedFetchers:U,unstable_viewTransitionOpts:T.viewTransitionOpts,unstable_flushSync:T.flushSync===!0})),f.v7_fetcherPersist&&(M.forEach(re=>S.fetchers.delete(re)),U.forEach(re=>ms(re)))}function ut(E,T,M){var U,re;let{flushSync:ue}=M===void 0?{}:M,ye=S.actionData!=null&&S.navigation.formMethod!=null&&Qn(S.navigation.formMethod)&&S.navigation.state==="loading"&&((U=E.state)==null?void 0:U._isRedirect)!==!0,G;T.actionData?Object.keys(T.actionData).length>0?G=T.actionData:G=null:ye?G=S.actionData:G=null;let be=T.loaderData?ky(S.loaderData,T.loaderData,T.matches||[],T.errors):S.loaderData,he=S.blockers;he.size>0&&(he=new Map(he),he.forEach((Ke,Xe)=>he.set(Xe,da)));let ge=R===!0||S.navigation.formMethod!=null&&Qn(S.navigation.formMethod)&&((re=E.state)==null?void 0:re._isRedirect)!==!0;a&&(i=a,a=void 0),B||N===Ct.Pop||(N===Ct.Push?e.history.push(E,E.state):N===Ct.Replace&&e.history.replace(E,E.state));let Ze;if(N===Ct.Pop){let Ke=Z.get(S.location.pathname);Ke&&Ke.has(E.pathname)?Ze={currentLocation:S.location,nextLocation:E}:Z.has(E.pathname)&&(Ze={currentLocation:E,nextLocation:S.location})}else if(L){let Ke=Z.get(S.location.pathname);Ke?Ke.add(E.pathname):(Ke=new Set([E.pathname]),Z.set(S.location.pathname,Ke)),Ze={currentLocation:S.location,nextLocation:E}}we(ht({},T,{actionData:G,loaderData:be,historyAction:N,location:E,initialized:!0,navigation:Bf,revalidation:"idle",restoreScrollPosition:rv(E,T.matches||S.matches),preventScrollReset:ge,blockers:he}),{viewTransitionOpts:Ze,flushSync:ue===!0}),N=Ct.Pop,R=!1,L=!1,B=!1,A=!1,H=[],ne=[]}async function Wt(E,T){if(typeof E=="number"){e.history.go(E);return}let M=ap(S.location,S.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:ue}=yy(f.v7_normalizeFormMethod,!1,M,T),ye=S.location,G=cl(S.location,U,T&&T.state);G=ht({},G,e.history.encodeLocation(G));let be=T&&T.replace!=null?T.replace:void 0,he=Ct.Push;be===!0?he=Ct.Replace:be===!1||re!=null&&Qn(re.formMethod)&&re.formAction===S.location.pathname+S.location.search&&(he=Ct.Replace);let ge=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,Ze=(T&&T.unstable_flushSync)===!0,Ke=tv({currentLocation:ye,nextLocation:G,historyAction:he});if(Ke){ec(Ke,{state:"blocked",location:G,proceed(){ec(Ke,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),Wt(E,T)},reset(){let Xe=new Map(S.blockers);Xe.set(Ke,da),we({blockers:Xe})}});return}return await fn(he,G,{submission:re,pendingError:ue,preventScrollReset:ge,replace:T&&T.replace,enableViewTransition:T&&T.unstable_viewTransition,flushSync:Ze})}function hs(){if(At(),we({revalidation:"loading"}),S.navigation.state!=="submitting"){if(S.navigation.state==="idle"){fn(S.historyAction,S.location,{startUninterruptedRevalidation:!0});return}fn(N||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation})}}async function fn(E,T,M){F&&F.abort(),F=null,N=E,B=(M&&M.startUninterruptedRevalidation)===!0,Hk(S.location,S.matches),R=(M&&M.preventScrollReset)===!0,L=(M&&M.enableViewTransition)===!0;let U=a||i,re=M&&M.overrideNavigation,ue=co(U,T,l),ye=(M&&M.flushSync)===!0,G=vf(ue,U,T.pathname);if(G.active&&G.matches&&(ue=G.matches),!ue){let{error:Be,notFoundMatches:It,route:bt}=mf(T.pathname);ut(T,{matches:It,loaderData:{},errors:{[bt.id]:Be}},{flushSync:ye});return}if(S.initialized&&!A&&uR(S.location,T)&&!(M&&M.submission&&Qn(M.submission.formMethod))){ut(T,{matches:ue},{flushSync:ye});return}F=new AbortController;let be=Ho(e.history,T,F.signal,M&&M.submission),he;if(M&&M.pendingError)he=[fi(ue).route.id,{type:Je.error,error:M.pendingError}];else if(M&&M.submission&&Qn(M.submission.formMethod)){let Be=await ps(be,T,M.submission,ue,G.active,{replace:M.replace,flushSync:ye});if(Be.shortCircuited)return;if(Be.pendingActionResult){let[It,bt]=Be.pendingActionResult;if(kn(bt)&&bd(bt.error)&&bt.error.status===404){F=null,ut(T,{matches:Be.matches,loaderData:{},errors:{[It]:bt.error}});return}}ue=Be.matches||ue,he=Be.pendingActionResult,re=Hf(T,M.submission),ye=!1,G.active=!1,be=Ho(e.history,be.url,be.signal)}let{shortCircuited:ge,matches:Ze,loaderData:Ke,errors:Xe}=await k(be,T,ue,G.active,re,M&&M.submission,M&&M.fetcherSubmission,M&&M.replace,M&&M.initialHydration===!0,ye,he);ge||(F=null,ut(T,ht({matches:Ze||ue},Ey(he),{loaderData:Ke,errors:Xe})))}async function ps(E,T,M,U,re,ue){ue===void 0&&(ue={}),At();let ye=mR(T,M);if(we({navigation:ye},{flushSync:ue.flushSync===!0}),re){let he=await nc(U,T.pathname,E.signal);if(he.type==="aborted")return{shortCircuited:!0};if(he.type==="error"){let{boundaryId:ge,error:Ze}=tc(T.pathname,he);return{matches:he.partialMatches,pendingActionResult:[ge,{type:Je.error,error:Ze}]}}else if(he.matches)U=he.matches;else{let{notFoundMatches:ge,error:Ze,route:Ke}=mf(T.pathname);return{matches:ge,pendingActionResult:[Ke.id,{type:Je.error,error:Ze}]}}}let G,be=ba(U,T);if(!be.route.action&&!be.route.lazy)G={type:Je.error,error:rn(405,{method:E.method,pathname:T.pathname,routeId:be.route.id})};else if(G=(await Oe("action",E,[be],U))[0],E.signal.aborted)return{shortCircuited:!0};if(mo(G)){let he;return ue&&ue.replace!=null?he=ue.replace:he=Sy(G.response.headers.get("Location"),new URL(E.url),l)===S.location.pathname+S.location.search,await ce(E,G,{submission:M,replace:he}),{shortCircuited:!0}}if(po(G))throw rn(400,{type:"defer-action"});if(kn(G)){let he=fi(U,be.route.id);return(ue&&ue.replace)!==!0&&(N=Ct.Push),{matches:U,pendingActionResult:[he.route.id,G]}}return{matches:U,pendingActionResult:[be.route.id,G]}}async function k(E,T,M,U,re,ue,ye,G,be,he,ge){let Ze=re||Hf(T,ue),Ke=ue||ye||Py(Ze),Xe=!B&&(!f.v7_partialHydration||!be);if(U){if(Xe){let vt=P(ge);we(ht({navigation:Ze},vt!==void 0?{actionData:vt}:{}),{flushSync:he})}let Ee=await nc(M,T.pathname,E.signal);if(Ee.type==="aborted")return{shortCircuited:!0};if(Ee.type==="error"){let{boundaryId:vt,error:_n}=tc(T.pathname,Ee);return{matches:Ee.partialMatches,loaderData:{},errors:{[vt]:_n}}}else if(Ee.matches)M=Ee.matches;else{let{error:vt,notFoundMatches:_n,route:it}=mf(T.pathname);return{matches:_n,loaderData:{},errors:{[it.id]:vt}}}}let Be=a||i,[It,bt]=xy(e.history,S,M,Ke,T,f.v7_partialHydration&&be===!0,f.v7_skipActionErrorRevalidation,A,H,ne,Pe,me,ae,Be,l,ge);if(gf(Ee=>!(M&&M.some(vt=>vt.route.id===Ee))||It&&It.some(vt=>vt.route.id===Ee)),O=++I,It.length===0&&bt.length===0){let Ee=ta();return ut(T,ht({matches:M,loaderData:{},errors:ge&&kn(ge[1])?{[ge[0]]:ge[1].error}:null},Ey(ge),Ee?{fetchers:new Map(S.fetchers)}:{}),{flushSync:he}),{shortCircuited:!0}}if(Xe){let Ee={};if(!U){Ee.navigation=Ze;let vt=P(ge);vt!==void 0&&(Ee.actionData=vt)}bt.length>0&&(Ee.fetchers=j(bt)),we(Ee,{flushSync:he})}bt.forEach(Ee=>{W.has(Ee.key)&&Kn(Ee.key),Ee.controller&&W.set(Ee.key,Ee.controller)});let na=()=>bt.forEach(Ee=>Kn(Ee.key));F&&F.signal.addEventListener("abort",na);let{loaderResults:gs,fetcherResults:zo}=await dt(S.matches,M,It,bt,E);if(E.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",na),bt.forEach(Ee=>W.delete(Ee.key));let Wo=Ny([...gs,...zo]);if(Wo){if(Wo.idx>=It.length){let Ee=bt[Wo.idx-It.length].key;ae.add(Ee)}return await ce(E,Wo.result,{replace:G}),{shortCircuited:!0}}let{loaderData:Yo,errors:hr}=Cy(S,M,It,gs,ge,bt,zo,ct);ct.forEach((Ee,vt)=>{Ee.subscribe(_n=>{(_n||Ee.done)&&ct.delete(vt)})}),f.v7_partialHydration&&be&&S.errors&&Object.entries(S.errors).filter(Ee=>{let[vt]=Ee;return!It.some(_n=>_n.route.id===vt)}).forEach(Ee=>{let[vt,_n]=Ee;hr=Object.assign(hr||{},{[vt]:_n})});let rc=ta(),sc=Jg(O),oc=rc||sc||bt.length>0;return ht({matches:M,loaderData:Yo,errors:hr},oc?{fetchers:new Map(S.fetchers)}:{})}function P(E){if(E&&!kn(E[1]))return{[E[0]]:E[1].data};if(S.actionData)return Object.keys(S.actionData).length===0?null:S.actionData}function j(E){return E.forEach(T=>{let M=S.fetchers.get(T.key),U=fa(void 0,M?M.data:void 0);S.fetchers.set(T.key,U)}),new Map(S.fetchers)}function X(E,T,M,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)&&Kn(E);let re=(U&&U.unstable_flushSync)===!0,ue=a||i,ye=ap(S.location,S.matches,l,f.v7_prependBasename,M,f.v7_relativeSplatPath,T,U==null?void 0:U.relative),G=co(ue,ye,l),be=vf(G,ue,ye);if(be.active&&be.matches&&(G=be.matches),!G){Hn(E,T,rn(404,{pathname:ye}),{flushSync:re});return}let{path:he,submission:ge,error:Ze}=yy(f.v7_normalizeFormMethod,!0,ye,U);if(Ze){Hn(E,T,Ze,{flushSync:re});return}let Ke=ba(G,he);if(R=(U&&U.preventScrollReset)===!0,ge&&Qn(ge.formMethod)){Q(E,T,he,Ke,G,be.active,re,ge);return}me.set(E,{routeId:T,path:he}),Y(E,T,he,Ke,G,be.active,re,ge)}async function Q(E,T,M,U,re,ue,ye,G){At(),me.delete(E);function be(it){if(!it.route.action&&!it.route.lazy){let jr=rn(405,{method:G.formMethod,pathname:M,routeId:T});return Hn(E,T,jr,{flushSync:ye}),!0}return!1}if(!ue&&be(U))return;let he=S.fetchers.get(E);nn(E,gR(G,he),{flushSync:ye});let ge=new AbortController,Ze=Ho(e.history,M,ge.signal,G);if(ue){let it=await nc(re,M,Ze.signal);if(it.type==="aborted")return;if(it.type==="error"){let{error:jr}=tc(M,it);Hn(E,T,jr,{flushSync:ye});return}else if(it.matches){if(re=it.matches,U=ba(re,M),be(U))return}else{Hn(E,T,rn(404,{pathname:M}),{flushSync:ye});return}}W.set(E,ge);let Ke=I,Be=(await Oe("action",Ze,[U],re))[0];if(Ze.signal.aborted){W.get(E)===ge&&W.delete(E);return}if(f.v7_fetcherPersist&&Pe.has(E)){if(mo(Be)||kn(Be)){nn(E,_s(void 0));return}}else{if(mo(Be))if(W.delete(E),O>Ke){nn(E,_s(void 0));return}else return ae.add(E),nn(E,fa(G)),ce(Ze,Be,{fetcherSubmission:G});if(kn(Be)){Hn(E,T,Be.error);return}}if(po(Be))throw rn(400,{type:"defer-action"});let It=S.navigation.location||S.location,bt=Ho(e.history,It,ge.signal),na=a||i,gs=S.navigation.state!=="idle"?co(na,S.navigation.location,l):S.matches;Ne(gs,"Didn't find any matches after fetcher action");let zo=++I;q.set(E,zo);let Wo=fa(G,Be.data);S.fetchers.set(E,Wo);let[Yo,hr]=xy(e.history,S,gs,G,It,!1,f.v7_skipActionErrorRevalidation,A,H,ne,Pe,me,ae,na,l,[U.route.id,Be]);hr.filter(it=>it.key!==E).forEach(it=>{let jr=it.key,sv=S.fetchers.get(jr),Zk=fa(void 0,sv?sv.data:void 0);S.fetchers.set(jr,Zk),W.has(jr)&&Kn(jr),it.controller&&W.set(jr,it.controller)}),we({fetchers:new Map(S.fetchers)});let rc=()=>hr.forEach(it=>Kn(it.key));ge.signal.addEventListener("abort",rc);let{loaderResults:sc,fetcherResults:oc}=await dt(S.matches,gs,Yo,hr,bt);if(ge.signal.aborted)return;ge.signal.removeEventListener("abort",rc),q.delete(E),W.delete(E),hr.forEach(it=>W.delete(it.key));let Ee=Ny([...sc,...oc]);if(Ee){if(Ee.idx>=Yo.length){let it=hr[Ee.idx-Yo.length].key;ae.add(it)}return ce(bt,Ee.result)}let{loaderData:vt,errors:_n}=Cy(S,S.matches,Yo,sc,void 0,hr,oc,ct);if(S.fetchers.has(E)){let it=_s(Be.data);S.fetchers.set(E,it)}Jg(zo),S.navigation.state==="loading"&&zo>O?(Ne(N,"Expected pending action"),F&&F.abort(),ut(S.navigation.location,{matches:gs,loaderData:vt,errors:_n,fetchers:new Map(S.fetchers)})):(we({errors:_n,loaderData:ky(S.loaderData,vt,gs,_n),fetchers:new Map(S.fetchers)}),A=!1)}async function Y(E,T,M,U,re,ue,ye,G){let be=S.fetchers.get(E);nn(E,fa(G,be?be.data:void 0),{flushSync:ye});let he=new AbortController,ge=Ho(e.history,M,he.signal);if(ue){let Be=await nc(re,M,ge.signal);if(Be.type==="aborted")return;if(Be.type==="error"){let{error:It}=tc(M,Be);Hn(E,T,It,{flushSync:ye});return}else if(Be.matches)re=Be.matches,U=ba(re,M);else{Hn(E,T,rn(404,{pathname:M}),{flushSync:ye});return}}W.set(E,he);let Ze=I,Xe=(await Oe("loader",ge,[U],re))[0];if(po(Xe)&&(Xe=await i_(Xe,ge.signal,!0)||Xe),W.get(E)===he&&W.delete(E),!ge.signal.aborted){if(Pe.has(E)){nn(E,_s(void 0));return}if(mo(Xe))if(O>Ze){nn(E,_s(void 0));return}else{ae.add(E),await ce(ge,Xe);return}if(kn(Xe)){Hn(E,T,Xe.error);return}Ne(!po(Xe),"Unhandled fetcher deferred data"),nn(E,_s(Xe.data))}}async function ce(E,T,M){let{submission:U,fetcherSubmission:re,replace:ue}=M===void 0?{}:M;T.response.headers.has("X-Remix-Revalidate")&&(A=!0);let ye=T.response.headers.get("Location");Ne(ye,"Expected a Location header on the redirect Response"),ye=Sy(ye,new URL(E.url),l);let G=cl(S.location,ye,{_isRedirect:!0});if(n){let Xe=!1;if(T.response.headers.has("X-Remix-Reload-Document"))Xe=!0;else if(Im.test(ye)){const Be=e.history.createURL(ye);Xe=Be.origin!==t.location.origin||Yi(Be.pathname,l)==null}if(Xe){ue?t.location.replace(ye):t.location.assign(ye);return}}F=null;let be=ue===!0?Ct.Replace:Ct.Push,{formMethod:he,formAction:ge,formEncType:Ze}=S.navigation;!U&&!re&&he&&ge&&Ze&&(U=Py(S.navigation));let Ke=U||re;if(qN.has(T.response.status)&&Ke&&Qn(Ke.formMethod))await fn(be,G,{submission:ht({},Ke,{formAction:ye}),preventScrollReset:R});else{let Xe=Hf(G,U);await fn(be,G,{overrideNavigation:Xe,fetcherSubmission:re,preventScrollReset:R})}}async function Oe(E,T,M,U){try{let re=await oR(c,E,T,M,U,o,s);return await Promise.all(re.map((ue,ye)=>{if(fR(ue)){let G=ue.result;return{type:Je.redirect,response:lR(G,T,M[ye].route.id,U,l,f.v7_relativeSplatPath)}}return aR(ue)}))}catch(re){return M.map(()=>({type:Je.error,error:re}))}}async function dt(E,T,M,U,re){let[ue,...ye]=await Promise.all([M.length?Oe("loader",re,M,T):[],...U.map(G=>{if(G.matches&&G.match&&G.controller){let be=Ho(e.history,G.path,G.controller.signal);return Oe("loader",be,[G.match],G.matches).then(he=>he[0])}else return Promise.resolve({type:Je.error,error:rn(404,{pathname:G.path})})})]);return await Promise.all([Ry(E,M,ue,ue.map(()=>re.signal),!1,S.loaderData),Ry(E,U.map(G=>G.match),ye,U.map(G=>G.controller?G.controller.signal:null),!0)]),{loaderResults:ue,fetcherResults:ye}}function At(){A=!0,H.push(...gf()),me.forEach((E,T)=>{W.has(T)&&(ne.push(T),Kn(T))})}function nn(E,T,M){M===void 0&&(M={}),S.fetchers.set(E,T),we({fetchers:new Map(S.fetchers)},{flushSync:(M&&M.flushSync)===!0})}function Hn(E,T,M,U){U===void 0&&(U={});let re=fi(S.matches,T);ms(E),we({errors:{[re.route.id]:M},fetchers:new Map(S.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function $o(E){return f.v7_fetcherPersist&&(Qe.set(E,(Qe.get(E)||0)+1),Pe.has(E)&&Pe.delete(E)),S.fetchers.get(E)||QN}function ms(E){let T=S.fetchers.get(E);W.has(E)&&!(T&&T.state==="loading"&&q.has(E))&&Kn(E),me.delete(E),q.delete(E),ae.delete(E),Pe.delete(E),S.fetchers.delete(E)}function pf(E){if(f.v7_fetcherPersist){let T=(Qe.get(E)||0)-1;T<=0?(Qe.delete(E),Pe.add(E)):Qe.set(E,T)}else ms(E);we({fetchers:new Map(S.fetchers)})}function Kn(E){let T=W.get(E);Ne(T,"Expected fetch controller: "+E),T.abort(),W.delete(E)}function Jl(E){for(let T of E){let M=$o(T),U=_s(M.data);S.fetchers.set(T,U)}}function ta(){let E=[],T=!1;for(let M of ae){let U=S.fetchers.get(M);Ne(U,"Expected fetcher: "+M),U.state==="loading"&&(ae.delete(M),E.push(M),T=!0)}return Jl(E),T}function Jg(E){let T=[];for(let[M,U]of q)if(U<E){let re=S.fetchers.get(M);Ne(re,"Expected fetcher: "+M),re.state==="loading"&&(Kn(M),q.delete(M),T.push(M))}return Jl(T),T.length>0}function Yk(E,T){let M=S.blockers.get(E)||da;return Le.get(E)!==T&&Le.set(E,T),M}function ev(E){S.blockers.delete(E),Le.delete(E)}function ec(E,T){let M=S.blockers.get(E)||da;Ne(M.state==="unblocked"&&T.state==="blocked"||M.state==="blocked"&&T.state==="blocked"||M.state==="blocked"&&T.state==="proceeding"||M.state==="blocked"&&T.state==="unblocked"||M.state==="proceeding"&&T.state==="unblocked","Invalid blocker state transition: "+M.state+" -> "+T.state);let U=new Map(S.blockers);U.set(E,T),we({blockers:U})}function tv(E){let{currentLocation:T,nextLocation:M,historyAction:U}=E;if(Le.size===0)return;Le.size>1&&No(!1,"A router only supports one blocker at a time");let re=Array.from(Le.entries()),[ue,ye]=re[re.length-1],G=S.blockers.get(ue);if(!(G&&G.state==="proceeding")&&ye({currentLocation:T,nextLocation:M,historyAction:U}))return ue}function mf(E){let T=rn(404,{pathname:E}),M=a||i,{matches:U,route:re}=Ty(M);return gf(),{notFoundMatches:U,route:re,error:T}}function tc(E,T){return{boundaryId:fi(T.partialMatches).route.id,error:rn(400,{type:"route-discovery",pathname:E,message:T.error!=null&&"message"in T.error?T.error:String(T.error)})}}function gf(E){let T=[];return ct.forEach((M,U)=>{(!E||E(U))&&(M.cancel(),T.push(U),ct.delete(U))}),T}function Bk(E,T,M){if(x=E,_=T,v=M||null,!g&&S.navigation===Bf){g=!0;let U=rv(S.location,S.matches);U!=null&&we({restoreScrollPosition:U})}return()=>{x=null,_=null,v=null}}function nv(E,T){return v&&v(E,T.map(U=>NN(U,S.loaderData)))||E.key}function Hk(E,T){if(x&&_){let M=nv(E,T);x[M]=_()}}function rv(E,T){if(x){let M=nv(E,T),U=x[M];if(typeof U=="number")return U}return null}function vf(E,T,M){if(d)if(E){let U=E[E.length-1].route;if(U.path&&(U.path==="*"||U.path.endsWith("/*")))return{active:!0,matches:Gc(T,M,l,!0)}}else return{active:!0,matches:Gc(T,M,l,!0)||[]};return{active:!1,matches:null}}async function nc(E,T,M){let U=E,re=U.length>0?U[U.length-1].route:null;for(;;){let ue=a==null,ye=a||i;try{await rR(d,T,U,ye,o,s,le,M)}catch(ge){return{type:"error",error:ge,partialMatches:U}}finally{ue&&(i=[...i])}if(M.aborted)return{type:"aborted"};let G=co(ye,T,l),be=!1;if(G){let ge=G[G.length-1].route;if(ge.index)return{type:"success",matches:G};if(ge.path&&ge.path.length>0)if(ge.path==="*")be=!0;else return{type:"success",matches:G}}let he=Gc(ye,T,l,!0);if(!he||U.map(ge=>ge.route.id).join("-")===he.map(ge=>ge.route.id).join("-"))return{type:"success",matches:be?G:null};if(U=he,re=U[U.length-1].route,re.path==="*")return{type:"success",matches:U}}}function Kk(E){o={},a=ul(E,s,void 0,o)}function Gk(E,T){let M=a==null;r_(E,T,a||i,o,s),M&&(i=[...i],we({}))}return C={get basename(){return l},get future(){return f},get state(){return S},get routes(){return i},get window(){return t},initialize:Ye,subscribe:Ue,enableScrollRestoration:Bk,navigate:Wt,fetch:X,revalidate:hs,createHref:E=>e.history.createHref(E),encodeLocation:E=>e.history.encodeLocation(E),getFetcher:$o,deleteFetcher:pf,dispose:Fe,getBlocker:Yk,deleteBlocker:ev,patchRoutes:Gk,_internalFetchControllers:W,_internalActiveDeferreds:ct,_internalSetRoutes:Kk},C}function eR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ap(e,t,n,r,s,o,i,a){let l,c;if(i){l=[];for(let f of t)if(l.push(f),f.route.id===i){c=f;break}}else l=t,c=t[t.length-1];let d=Sd(s||".",_d(l,o),Yi(e.pathname,n)||e.pathname,a==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&c&&c.route.index&&!Lm(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Gr([n,d.pathname])),Ro(d)}function yy(e,t,n,r){if(!r||!eR(r))return{path:n};if(r.formMethod&&!pR(r.formMethod))return{path:n,error:rn(405,{method:r.formMethod})};let s=()=>({path:n,error:rn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=s_(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Qn(i))return s();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,x)=>{let[v,_]=x;return""+y+v+"="+_+`
`},""):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(!Qn(i))return s();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 s()}}}Ne(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=lp(r.formData),c=r.formData;else if(r.body instanceof FormData)l=lp(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=by(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=by(l)}catch{return s()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Qn(d.formMethod))return{path:n,submission:d};let f=ls(n);return t&&f.search&&Lm(f.search)&&l.append("index",""),f.search="?"+l,{path:Ro(f),submission:d}}function tR(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function xy(e,t,n,r,s,o,i,a,l,c,d,f,p,y,x,v){let _=v?kn(v[1])?v[1].error:v[1].data:void 0,g=e.createURL(t.location),m=e.createURL(s),w=v&&kn(v[1])?v[0]:void 0,b=w?tR(n,w):n,C=v?v[1].statusCode:void 0,S=i&&C&&C>=400,N=b.filter((F,L)=>{let{route:Z}=F;if(Z.lazy)return!0;if(Z.loader==null)return!1;if(o)return typeof Z.loader!="function"||Z.loader.hydrate?!0:t.loaderData[Z.id]===void 0&&(!t.errors||t.errors[Z.id]===void 0);if(nR(t.loaderData,t.matches[L],F)||l.some(A=>A===F.route.id))return!0;let D=t.matches[L],B=F;return wy(F,ht({currentUrl:g,currentParams:D.params,nextUrl:m,nextParams:B.params},r,{actionResult:_,actionStatus:C,defaultShouldRevalidate:S?!1:a||g.pathname+g.search===m.pathname+m.search||g.search!==m.search||n_(D,B)}))}),R=[];return f.forEach((F,L)=>{if(o||!n.some(H=>H.route.id===F.routeId)||d.has(L))return;let Z=co(y,F.path,x);if(!Z){R.push({key:L,routeId:F.routeId,path:F.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(L),B=ba(Z,F.path),A=!1;p.has(L)?A=!1:c.includes(L)?A=!0:D&&D.state!=="idle"&&D.data===void 0?A=a:A=wy(B,ht({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:_,actionStatus:C,defaultShouldRevalidate:S?!1:a})),A&&R.push({key:L,routeId:F.routeId,path:F.path,matches:Z,match:B,controller:new AbortController})}),[N,R]}function nR(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function n_(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function wy(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function rR(e,t,n,r,s,o,i,a){let l=[t,...n.map(c=>c.route.id)].join("-");try{let c=i.get(l);c||(c=e({path:t,matches:n,patch:(d,f)=>{a.aborted||r_(d,f,r,s,o)}}),i.set(l,c)),c&&dR(c)&&await c}finally{i.delete(l)}}function r_(e,t,n,r,s){if(e){var o;let i=r[e];Ne(i,"No route found to patch children into: routeId = "+e);let a=ul(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=ul(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function _y(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];Ne(s,"No route found in manifest");let o={};for(let i in r){let l=s[i]!==void 0&&i!=="hasErrorBoundary";No(!l,'Route "'+s.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&&!EN.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,ht({},t(s),{lazy:void 0}))}function sR(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function oR(e,t,n,r,s,o,i,a){let l=r.reduce((f,p)=>f.add(p.route.id),new Set),c=new Set,d=await e({matches:s.map(f=>{let p=l.has(f.route.id);return ht({},f,{shouldLoad:p,resolve:x=>(c.add(f.route.id),p?iR(t,n,f,o,i,x,a):Promise.resolve({type:Je.data,result:void 0}))})}),request:n,params:s[0].params,context:a});return s.forEach(f=>Ne(c.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(s[p].route.id))}async function iR(e,t,n,r,s,o,i){let a,l,c=d=>{let f,p=new Promise((v,_)=>f=_);l=()=>f(),t.signal.addEventListener("abort",l);let y=v=>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},...v!==void 0?[v]:[]),x;return o?x=o(v=>y(v)):x=(async()=>{try{return{type:"data",result:await y()}}catch(v){return{type:"error",result:v}}})(),Promise.race([x,p])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[p]=await Promise.all([c(d).catch(y=>{f=y}),_y(n.route,s,r)]);if(f!==void 0)throw f;a=p}else if(await _y(n.route,s,r),d=n.route[e],d)a=await c(d);else if(e==="action"){let f=new URL(t.url),p=f.pathname+f.search;throw rn(405,{method:t.method,pathname:p,routeId:n.route.id})}else return{type:Je.data,result:void 0};else if(d)a=await c(d);else{let f=new URL(t.url),p=f.pathname+f.search;throw rn(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:Je.error,result:d}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function aR(e){let{result:t,type:n,status:r}=e;if(o_(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:Je.error,error:a}}return n===Je.error?{type:Je.error,error:new Am(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:Je.data,data:i,statusCode:t.status,headers:t.headers}}if(n===Je.error)return{type:Je.error,error:t,statusCode:bd(t)?t.status:r};if(hR(t)){var s,o;return{type:Je.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:Je.data,data:t,statusCode:r}}function lR(e,t,n,r,s,o){let i=e.headers.get("Location");if(Ne(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Im.test(i)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);i=ap(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function Sy(e,t,n){if(Im.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Yi(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Ho(e,t,n,r){let s=e.createURL(s_(t)).toString(),o={signal:n};if(r&&Qn(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=lp(r.formData):o.body=r.formData}return new Request(s,o)}function lp(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function by(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function cR(e,t,n,r,s,o){let i={},a=null,l,c=!1,d={},f=r&&kn(r[1])?r[1].error:void 0;return n.forEach((p,y)=>{let x=t[y].route.id;if(Ne(!mo(p),"Cannot handle redirect results in processLoaderData"),kn(p)){let v=p.error;f!==void 0&&(v=f,f=void 0),a=a||{};{let _=fi(e,x);a[_.route.id]==null&&(a[_.route.id]=v)}i[x]=void 0,c||(c=!0,l=bd(p.error)?p.error.status:500),p.headers&&(d[x]=p.headers)}else po(p)?(s.set(x,p.deferredData),i[x]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!c&&(l=p.statusCode),p.headers&&(d[x]=p.headers)):(i[x]=p.data,p.statusCode&&p.statusCode!==200&&!c&&(l=p.statusCode),p.headers&&(d[x]=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 Cy(e,t,n,r,s,o,i,a){let{loaderData:l,errors:c}=cR(t,n,r,s,a);for(let d=0;d<o.length;d++){let{key:f,match:p,controller:y}=o[d];Ne(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(y&&y.signal.aborted))if(kn(x)){let v=fi(e.matches,p==null?void 0:p.route.id);c&&c[v.route.id]||(c=ht({},c,{[v.route.id]:x.error})),e.fetchers.delete(f)}else if(mo(x))Ne(!1,"Unhandled fetcher revalidation redirect");else if(po(x))Ne(!1,"Unhandled fetcher deferred data");else{let v=_s(x.data);e.fetchers.set(f,v)}}return{loaderData:l,errors:c}}function ky(e,t,n,r){let s=ht({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(s[i]=t[i]):e[i]!==void 0&&o.route.loader&&(s[i]=e[i]),r&&r.hasOwnProperty(i))break}return s}function Ey(e){return e?kn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function fi(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 Ty(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 rn(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?l='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+i):s&&n&&r?l="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="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",s&&n&&r?l="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new Am(e||500,a,new Error(l),!0)}function Ny(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(mo(n))return{result:n,idx:t}}}function s_(e){let t=typeof e=="string"?ls(e):e;return Ro(ht({},t,{hash:""}))}function uR(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function dR(e){return typeof e=="object"&&e!=null&&"then"in e}function fR(e){return o_(e.result)&&ZN.has(e.result.status)}function po(e){return e.type===Je.deferred}function kn(e){return e.type===Je.error}function mo(e){return(e&&e.type)===Je.redirect}function hR(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 o_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function pR(e){return GN.has(e.toLowerCase())}function Qn(e){return HN.has(e.toLowerCase())}async function Ry(e,t,n,r,s,o){for(let i=0;i<n.length;i++){let a=n[i],l=t[i];if(!l)continue;let c=e.find(f=>f.route.id===l.route.id),d=c!=null&&!n_(c,l)&&(o&&o[l.route.id])!==void 0;if(po(a)&&(s||d)){let f=r[i];Ne(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await i_(a,f,s).then(p=>{p&&(n[i]=p||n[i])})}}}async function i_(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Je.data,data:e.deferredData.unwrappedData}}catch(s){return{type:Je.error,error:s}}return{type:Je.data,data:e.deferredData.data}}}function Lm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ba(e,t){let n=typeof t=="string"?ls(t).search:t.search;if(e[e.length-1].route.index&&Lm(n||""))return e[e.length-1];let r=J0(e);return r[r.length-1]}function Py(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,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 Hf(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 mR(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 fa(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 gR(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 _s(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 vR(e,t){try{let n=e.sessionStorage.getItem(t_);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function yR(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(t_,JSON.stringify(n))}catch(r){No(!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 Ou(){return Ou=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},Ou.apply(this,arguments)}const Cd=h.createContext(null),a_=h.createContext(null),to=h.createContext(null),Fm=h.createContext(null),cs=h.createContext({outlet:null,matches:[],isDataRoute:!1}),l_=h.createContext(null);function xR(e,t){let{relative:n}=t===void 0?{}:t;Bi()||Ne(!1);let{basename:r,navigator:s}=h.useContext(to),{hash:o,pathname:i,search:a}=u_(e,{relative:n}),l=i;return r!=="/"&&(l=i==="/"?r:Gr([r,i])),s.createHref({pathname:l,search:a,hash:o})}function Bi(){return h.useContext(Fm)!=null}function no(){return Bi()||Ne(!1),h.useContext(Fm).location}function c_(e){h.useContext(to).static||h.useLayoutEffect(e)}function ro(){let{isDataRoute:e}=h.useContext(cs);return e?DR():wR()}function wR(){Bi()||Ne(!1);let e=h.useContext(Cd),{basename:t,future:n,navigator:r}=h.useContext(to),{matches:s}=h.useContext(cs),{pathname:o}=no(),i=JSON.stringify(_d(s,n.v7_relativeSplatPath)),a=h.useRef(!1);return c_(()=>{a.current=!0}),h.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=Sd(c,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Gr([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const _R=h.createContext(null);function SR(e){let t=h.useContext(cs).outlet;return t&&h.createElement(_R.Provider,{value:e},t)}function u_(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=h.useContext(to),{matches:s}=h.useContext(cs),{pathname:o}=no(),i=JSON.stringify(_d(s,r.v7_relativeSplatPath));return h.useMemo(()=>Sd(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function bR(e,t,n,r){Bi()||Ne(!1);let{navigator:s}=h.useContext(to),{matches:o}=h.useContext(cs),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=no(),d;d=c;let f=d.pathname||"/",p=f;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let y=co(e,{pathname:p});return NR(y&&y.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:Gr([l,s.encodeLocation?s.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Gr([l,s.encodeLocation?s.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r)}function CR(){let e=OR(),t=bd(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={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:s},n):null,null)}const kR=h.createElement(CR,null);class ER 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(cs.Provider,{value:this.props.routeContext},h.createElement(l_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function TR(e){let{routeContext:t,match:n,children:r}=e,s=h.useContext(Cd);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),h.createElement(cs.Provider,{value:t},r)}function NR(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.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,c=-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)&&(c=d),f.route.id){let{loaderData:p,errors:y}=n,x=f.route.loader&&p[f.route.id]===void 0&&(!y||y[f.route.id]===void 0);if(f.route.lazy||x){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((d,f,p)=>{let y,x=!1,v=null,_=null;n&&(y=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||kR,l&&(c<0&&p===0?(jR("route-fallback"),x=!0,_=null):c===p&&(x=!0,_=f.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,p+1)),m=()=>{let w;return y?w=v:x?w=_:f.route.Component?w=h.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,h.createElement(TR,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?h.createElement(ER,{location:n.location,revalidation:n.revalidation,component:v,error:y,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var d_=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(d_||{}),Du=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}(Du||{});function RR(e){let t=h.useContext(Cd);return t||Ne(!1),t}function PR(e){let t=h.useContext(a_);return t||Ne(!1),t}function MR(e){let t=h.useContext(cs);return t||Ne(!1),t}function f_(e){let t=MR(),n=t.matches[t.matches.length-1];return n.route.id||Ne(!1),n.route.id}function OR(){var e;let t=h.useContext(l_),n=PR(Du.UseRouteError),r=f_(Du.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function DR(){let{router:e}=RR(d_.UseNavigateStable),t=f_(Du.UseNavigateStable),n=h.useRef(!1);return c_(()=>{n.current=!0}),h.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ou({fromRouteId:t},o)))},[e,t])}const My={};function jR(e,t,n){My[e]||(My[e]=!0)}function h_(e){let{to:t,replace:n,state:r,relative:s}=e;Bi()||Ne(!1);let{future:o,static:i}=h.useContext(to),{matches:a}=h.useContext(cs),{pathname:l}=no(),c=ro(),d=Sd(t,_d(a,o.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return h.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:s}),[c,f,s,n,r]),null}function p_(e){return SR(e.context)}function AR(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Ct.Pop,navigator:o,static:i=!1,future:a}=e;Bi()&&Ne(!1);let l=t.replace(/^\/*/,"/"),c=h.useMemo(()=>({basename:l,navigator:o,static:i,future:Ou({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof r=="string"&&(r=ls(r));let{pathname:d="/",search:f="",hash:p="",state:y=null,key:x="default"}=r,v=h.useMemo(()=>{let _=Yi(d,l);return _==null?null:{location:{pathname:_,search:f,hash:p,state:y,key:x},navigationType:s}},[l,d,f,p,y,x,s]);return v==null?null:h.createElement(to.Provider,{value:c},h.createElement(Fm.Provider,{children:n,value:v}))}new Promise(()=>{});function IR(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 dl(){return dl=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},dl.apply(this,arguments)}function LR(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function FR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function UR(e,t){return e.button===0&&(!t||t==="_self")&&!FR(e)}function cp(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(s=>[n,s]):[[n,r]])},[]))}function VR(e,t){let n=cp(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const $R=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],zR="6";try{window.__reactRouterVersion=zR}catch{}function WR(e,t){return JN({basename:void 0,future:dl({},void 0,{v7_prependBasename:!0}),history:bN({window:void 0}),hydrationData:YR(),routes:e,mapRouteProperties:IR,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function YR(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=dl({},t,{errors:BR(t.errors)})),t}function BR(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new Am(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const HR=h.createContext({isTransitioning:!1}),KR=h.createContext(new Map),GR="startTransition",Oy=Kx[GR],ZR="flushSync",Dy=SN[ZR];function qR(e){Oy?Oy(e):e()}function ha(e){Dy?Dy(e):e()}class QR{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 XR(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=h.useState(n.state),[i,a]=h.useState(),[l,c]=h.useState({isTransitioning:!1}),[d,f]=h.useState(),[p,y]=h.useState(),[x,v]=h.useState(),_=h.useRef(new Map),{v7_startTransition:g}=r||{},m=h.useCallback(R=>{g?qR(R):R()},[g]),w=h.useCallback((R,F)=>{let{deletedFetchers:L,unstable_flushSync:Z,unstable_viewTransitionOpts:D}=F;L.forEach(A=>_.current.delete(A)),R.fetchers.forEach((A,H)=>{A.data!==void 0&&_.current.set(H,A.data)});let B=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!D||B){Z?ha(()=>o(R)):m(()=>o(R));return}if(Z){ha(()=>{p&&(d&&d.resolve(),p.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:D.currentLocation,nextLocation:D.nextLocation})});let A=n.window.document.startViewTransition(()=>{ha(()=>o(R))});A.finished.finally(()=>{ha(()=>{f(void 0),y(void 0),a(void 0),c({isTransitioning:!1})})}),ha(()=>y(A));return}p?(d&&d.resolve(),p.skipTransition(),v({state:R,currentLocation:D.currentLocation,nextLocation:D.nextLocation})):(a(R),c({isTransitioning:!0,flushSync:!1,currentLocation:D.currentLocation,nextLocation:D.nextLocation}))},[n.window,p,d,_,m]);h.useLayoutEffect(()=>n.subscribe(w),[n,w]),h.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new QR)},[l]),h.useEffect(()=>{if(d&&i&&n.window){let R=i,F=d.promise,L=n.window.document.startViewTransition(async()=>{m(()=>o(R)),await F});L.finished.finally(()=>{f(void 0),y(void 0),a(void 0),c({isTransitioning:!1})}),y(L)}},[m,i,d,n.window]),h.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,p,s.location,i]),h.useEffect(()=>{!l.isTransitioning&&x&&(a(x.state),c({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),v(void 0))},[l.isTransitioning,x]),h.useEffect(()=>{},[]);let b=h.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,F,L)=>n.navigate(R,{state:F,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(R,F,L)=>n.navigate(R,{replace:!0,state:F,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[n]),C=n.basename||"/",S=h.useMemo(()=>({router:n,navigator:b,static:!1,basename:C}),[n,b,C]),N=h.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return h.createElement(h.Fragment,null,h.createElement(Cd.Provider,{value:S},h.createElement(a_.Provider,{value:s},h.createElement(KR.Provider,{value:_.current},h.createElement(HR.Provider,{value:l},h.createElement(AR,{basename:C,location:s.location,navigationType:s.historyAction,navigator:b,future:N},s.initialized||n.future.v7_partialHydration?h.createElement(JR,{routes:n.routes,future:n.future,state:s}):t))))),null)}const JR=h.memo(eP);function eP(e){let{routes:t,future:n,state:r}=e;return bR(t,void 0,r,n)}const tP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ys=h.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:c,preventScrollReset:d,unstable_viewTransition:f}=t,p=LR(t,$R),{basename:y}=h.useContext(to),x,v=!1;if(typeof c=="string"&&nP.test(c)&&(x=c,tP))try{let w=new URL(window.location.href),b=c.startsWith("//")?new URL(w.protocol+c):new URL(c),C=Yi(b.pathname,y);b.origin===w.origin&&C!=null?c=C+b.search+b.hash:v=!0}catch{}let _=xR(c,{relative:s}),g=rP(c,{replace:i,state:a,target:l,preventScrollReset:d,relative:s,unstable_viewTransition:f});function m(w){r&&r(w),w.defaultPrevented||g(w)}return h.createElement("a",dl({},p,{href:x||_,onClick:v||o?r:m,ref:n,target:l}))});var jy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(jy||(jy={}));var Ay;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ay||(Ay={}));function rP(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,l=ro(),c=no(),d=u_(e,{relative:i});return h.useCallback(f=>{if(UR(f,n)){f.preventDefault();let p=r!==void 0?r:Ro(c)===Ro(d);l(e,{replace:p,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[c,l,d,r,s,n,e,o,i,a])}function sP(e){let t=h.useRef(cp(e)),n=h.useRef(!1),r=no(),s=h.useMemo(()=>VR(r.search,n.current?null:t.current),[r.search]),o=ro(),i=h.useCallback((a,l)=>{const c=cp(typeof a=="function"?a(s):a);n.current=!0,o("?"+c,l)},[o,s]);return[s,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 oP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),m_=(...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 iP={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 aP=h.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>h.createElement("svg",{ref:l,...iP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:m_("lucide",s),...a},[...i.map(([c,d])=>h.createElement(c,d)),...Array.isArray(o)?o:[o]]));/**
* @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 tn=(e,t)=>{const n=h.forwardRef(({className:r,...s},o)=>h.createElement(aP,{ref:o,iconNode:t,className:m_(`lucide-${oP(e)}`,r),...s}));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 g_=tn("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 v_=tn("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 lP=tn("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 cP=tn("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 y_=tn("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 uP=tn("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 x_=tn("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 dP=tn("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 up=tn("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 Iy=tn("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 fP=tn("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 hP=tn("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 Ly=tn("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 Fy=tn("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 pP=tn("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 Um=tn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function mP(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kd(...e){return t=>e.forEach(n=>mP(n,t))}function ze(...e){return h.useCallback(kd(...e),e)}var ts=h.forwardRef((e,t)=>{const{children:n,...r}=e,s=h.Children.toArray(n),o=s.find(gP);if(o){const i=o.props.children,a=s.map(l=>l===o?h.Children.count(i)>1?h.Children.only(null):h.isValidElement(i)?i.props.children:null:l);return u.jsx(dp,{...r,ref:t,children:h.isValidElement(i)?h.cloneElement(i,void 0,a):null})}return u.jsx(dp,{...r,ref:t,children:n})});ts.displayName="Slot";var dp=h.forwardRef((e,t)=>{const{children:n,...r}=e;if(h.isValidElement(n)){const s=yP(n);return h.cloneElement(n,{...vP(r,n.props),ref:t?kd(t,s):s})}return h.Children.count(n)>1?h.Children.only(null):null});dp.displayName="SlotClone";var w_=({children:e})=>u.jsx(u.Fragment,{children:e});function gP(e){return h.isValidElement(e)&&e.type===w_}function vP(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function yP(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function __(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[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function xP(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=__(e))&&(r&&(r+=" "),r+=t);return r}const Uy=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Vy=xP,Vl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Vy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(c=>{const d=n==null?void 0:n[c],f=o==null?void 0:o[c];if(d===null)return null;const p=Uy(d)||Uy(f);return s[c][p]}),a=n&&Object.entries(n).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:p,...y}=d;return Object.entries(y).every(x=>{let[v,_]=x;return Array.isArray(_)?_.includes({...o,...a}[v]):{...o,...a}[v]===_})?[...c,f,p]:c},[]);return Vy(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function S_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=S_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wP(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=S_(e))&&(r&&(r+=" "),r+=t);return r}const Vm="-";function _P(e){const t=bP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(i){const a=i.split(Vm);return a[0]===""&&a.length!==1&&a.shift(),b_(a,t)||SP(i)}function o(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function b_(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?b_(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Vm);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId}const $y=/^\[(.+)\]$/;function SP(e){if($y.test(e)){const t=$y.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function bP(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return kP(Object.entries(e.classGroups),n).forEach(([o,i])=>{fp(i,r,o,t)}),r}function fp(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:zy(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(CP(s)){fp(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{fp(i,zy(t,o),n,r)})})}function zy(e,t){let n=e;return t.split(Vm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function CP(e){return e.isThemeGetter}function kP(e,t){return t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e}function EP(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}}const C_="!";function TP(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length;function i(a){const l=[];let c=0,d=0,f;for(let _=0;_<a.length;_++){let g=a[_];if(c===0){if(g===s&&(r||a.slice(_,_+o)===t)){l.push(a.slice(d,_)),d=_+o;continue}if(g==="/"){f=_;continue}}g==="["?c++:g==="]"&&c--}const p=l.length===0?a:a.substring(d),y=p.startsWith(C_),x=y?p.substring(1):p,v=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:v}}return n?function(l){return n({className:l,parseClassName:i})}:i}function NP(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 RP(e){return{cache:EP(e.cacheSize),parseClassName:TP(e),..._P(e)}}const PP=/\s+/;function MP(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(PP).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:d}=n(i);let f=!!d,p=r(f?c.substring(0,d):c);if(!p){if(!f)return{isTailwindClass:!1,originalClassName:i};if(p=r(c),!p)return{isTailwindClass:!1,originalClassName:i};f=!1}const y=NP(a).join(":");return{isTailwindClass:!0,modifierId:l?y+C_:y,classGroupId:p,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,d=a+l;return o.has(d)?!1:(o.add(d),s(l,c).forEach(f=>o.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function OP(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=k_(t))&&(r&&(r+=" "),r+=n);return r}function k_(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=k_(e[r]))&&(n&&(n+=" "),n+=t);return n}function DP(e,...t){let n,r,s,o=i;function i(l){const c=t.reduce((d,f)=>f(d),e());return n=RP(c),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=MP(l,n);return s(l,d),d}return function(){return o(OP.apply(null,arguments))}}function tt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const E_=/^\[(?:([a-z-]+):)?(.+)\]$/i,jP=/^\d+\/\d+$/,AP=new Set(["px","full","screen"]),IP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LP=/\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$/,FP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,UP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Ar(e){return go(e)||AP.has(e)||jP.test(e)}function xs(e){return Hi(e,"length",GP)}function go(e){return!!e&&!Number.isNaN(Number(e))}function bc(e){return Hi(e,"number",go)}function pa(e){return!!e&&Number.isInteger(Number(e))}function $P(e){return e.endsWith("%")&&go(e.slice(0,-1))}function Ce(e){return E_.test(e)}function ws(e){return IP.test(e)}const zP=new Set(["length","size","percentage"]);function WP(e){return Hi(e,zP,T_)}function YP(e){return Hi(e,"position",T_)}const BP=new Set(["image","url"]);function HP(e){return Hi(e,BP,qP)}function KP(e){return Hi(e,"",ZP)}function ma(){return!0}function Hi(e,t,n){const r=E_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function GP(e){return LP.test(e)&&!FP.test(e)}function T_(){return!1}function ZP(e){return UP.test(e)}function qP(e){return VP.test(e)}function QP(){const e=tt("colors"),t=tt("spacing"),n=tt("blur"),r=tt("brightness"),s=tt("borderColor"),o=tt("borderRadius"),i=tt("borderSpacing"),a=tt("borderWidth"),l=tt("contrast"),c=tt("grayscale"),d=tt("hueRotate"),f=tt("invert"),p=tt("gap"),y=tt("gradientColorStops"),x=tt("gradientColorStopPositions"),v=tt("inset"),_=tt("margin"),g=tt("opacity"),m=tt("padding"),w=tt("saturate"),b=tt("scale"),C=tt("sepia"),S=tt("skew"),N=tt("space"),R=tt("translate"),F=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto",Ce,t],D=()=>[Ce,t],B=()=>["",Ar,xs],A=()=>["auto",go,Ce],H=()=>["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"],I=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",Ce],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[go,bc],me=()=>[go,Ce];return{cacheSize:500,separator:":",theme:{colors:[ma],spacing:[Ar,xs],blur:["none","",ws,Ce],brightness:ae(),borderColor:[e],borderRadius:["none","","full",ws,Ce],borderSpacing:D(),borderWidth:B(),contrast:ae(),grayscale:O(),hueRotate:me(),invert:O(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[$P,xs],inset:Z(),margin:Z(),opacity:ae(),padding:D(),saturate:ae(),scale:ae(),sepia:O(),skew:me(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[ws]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),Ce]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",pa,Ce]}],basis:[{basis:Z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ce]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",pa,Ce]}],"grid-cols":[{"grid-cols":[ma]}],"col-start-end":[{col:["auto",{span:["full",pa,Ce]},Ce]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[ma]}],"row-start-end":[{row:["auto",{span:[pa,Ce]},Ce]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ce]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"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:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ce,t]}],"min-w":[{"min-w":[Ce,t,"min","max","fit"]}],"max-w":[{"max-w":[Ce,t,"none","full","min","max","fit","prose",{screen:[ws]},ws]}],h:[{h:[Ce,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ws,xs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bc]}],"font-family":[{font:[ma]}],"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",Ce]}],"line-clamp":[{"line-clamp":["none",go,bc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ar,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ar,xs]}],"underline-offset":[{"underline-offset":["auto",Ar,Ce]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce]}],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",Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),YP]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",WP]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},HP]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...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":[g]}],"divide-style":[{divide:ne()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[Ar,Ce]}],"outline-w":[{outline:[Ar,xs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Ar,xs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ws,KP]}],"shadow-color":[{shadow:[ma]}],opacity:[{opacity:[g]}],"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",ws,Ce]}],grayscale:[{grayscale:[c]}],"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":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"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",Ce]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[pa,Ce]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ce]}],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",Ce]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",Ce]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ar,xs,bc]}],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 XP=DP(QP);function pe(...e){return XP(wP(e))}const JP=Vl("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,...s},o)=>{const i=r?ts:"button";return u.jsx(i,{className:pe(JP({variant:t,size:n,className:e})),ref:o,...s})});Dt.displayName="Button";function te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function eM(e,t){const n=h.createContext(t);function r(o){const{children:i,...a}=o,l=h.useMemo(()=>a,Object.values(a));return u.jsx(n.Provider,{value:l,children:i})}function s(o){const i=h.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function Pr(e,t=[]){let n=[];function r(o,i){const a=h.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:p,children:y,...x}=f,v=(p==null?void 0:p[e][l])||a,_=h.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:_,children:y})}function d(f,p){const y=(p==null?void 0:p[e][l])||a,x=h.useContext(y);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,d]}const s=()=>{const o=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,tM(s,...t)]}function tM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Xt(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 Ys({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=nM({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,a=Xt(n),l=h.useCallback(c=>{if(o){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else s(c)},[o,e,s,a]);return[i,l]}function nM({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,s=h.useRef(r),o=Xt(t);return h.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var rM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_e=rM.reduce((e,t)=>{const n=h.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?ts:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $m(e,t){e&&as.flushSync(()=>e.dispatchEvent(t))}function Ed(e){const t=e+"CollectionProvider",[n,r]=Pr(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:x,children:v}=y,_=De.useRef(null),g=De.useRef(new Map).current;return u.jsx(s,{scope:x,itemMap:g,collectionRef:_,children:v})};i.displayName=t;const a=e+"CollectionSlot",l=De.forwardRef((y,x)=>{const{scope:v,children:_}=y,g=o(a,v),m=ze(x,g.collectionRef);return u.jsx(ts,{ref:m,children:_})});l.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=De.forwardRef((y,x)=>{const{scope:v,children:_,...g}=y,m=De.useRef(null),w=ze(x,m),b=o(c,v);return De.useEffect(()=>(b.itemMap.set(m,{ref:m,...g}),()=>void b.itemMap.delete(m))),u.jsx(ts,{[d]:"",ref:w,children:_})});f.displayName=c;function p(y){const x=o(e+"CollectionConsumer",y);return De.useCallback(()=>{const _=x.collectionRef.current;if(!_)return[];const g=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((b,C)=>g.indexOf(b.ref.current)-g.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},p,r]}var sM=h.createContext(void 0);function zm(e){const t=h.useContext(sM);return e||t||"ltr"}function oM(e,t=globalThis==null?void 0:globalThis.document){const n=Xt(e);h.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var iM="DismissableLayer",hp="dismissableLayer.update",aM="dismissableLayer.pointerDownOutside",lM="dismissableLayer.focusOutside",Wy,N_=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ki=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,c=h.useContext(N_),[d,f]=h.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=h.useState({}),x=ze(t,N=>f(N)),v=Array.from(c.layers),[_]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(_),m=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,b=m>=g,C=uM(N=>{const R=N.target,F=[...c.branches].some(L=>L.contains(R));!b||F||(s==null||s(N),i==null||i(N),N.defaultPrevented||a==null||a())},p),S=dM(N=>{const R=N.target;[...c.branches].some(L=>L.contains(R))||(o==null||o(N),i==null||i(N),N.defaultPrevented||a==null||a())},p);return oM(N=>{m===c.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},p),h.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Wy=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Yy(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Wy)}},[d,p,n,c]),h.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Yy())},[d,c]),h.useEffect(()=>{const N=()=>y({});return document.addEventListener(hp,N),()=>document.removeEventListener(hp,N)},[]),u.jsx(_e.div,{...l,ref:x,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,S.onFocusCapture),onBlurCapture:te(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,C.onPointerDownCapture)})});Ki.displayName=iM;var cM="DismissableLayerBranch",R_=h.forwardRef((e,t)=>{const n=h.useContext(N_),r=h.useRef(null),s=ze(t,r);return h.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(_e.div,{...e,ref:s})});R_.displayName=cM;function uM(e,t=globalThis==null?void 0:globalThis.document){const n=Xt(e),r=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){P_(aM,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function dM(e,t=globalThis==null?void 0:globalThis.document){const n=Xt(e),r=h.useRef(!1);return h.useEffect(()=>{const s=o=>{o.target&&!r.current&&P_(lM,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Yy(){const e=new CustomEvent(hp);document.dispatchEvent(e)}function P_(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?$m(s,o):s.dispatchEvent(o)}var fM=Ki,hM=R_,Kf=0;function Wm(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??By()),document.body.insertAdjacentElement("beforeend",e[1]??By()),Kf++,()=>{Kf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Kf--}},[])}function By(){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 Gf="focusScope.autoFocusOnMount",Zf="focusScope.autoFocusOnUnmount",Hy={bubbles:!1,cancelable:!0},pM="FocusScope",Td=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=h.useState(null),c=Xt(s),d=Xt(o),f=h.useRef(null),p=ze(t,v=>l(v)),y=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let v=function(w){if(y.paused||!a)return;const b=w.target;a.contains(b)?f.current=b:Ss(f.current,{select:!0})},_=function(w){if(y.paused||!a)return;const b=w.relatedTarget;b!==null&&(a.contains(b)||Ss(f.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Ss(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const m=new MutationObserver(g);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),m.disconnect()}}},[r,a,y.paused]),h.useEffect(()=>{if(a){Gy.add(y);const v=document.activeElement;if(!a.contains(v)){const g=new CustomEvent(Gf,Hy);a.addEventListener(Gf,c),a.dispatchEvent(g),g.defaultPrevented||(mM(wM(M_(a)),{select:!0}),document.activeElement===v&&Ss(a))}return()=>{a.removeEventListener(Gf,c),setTimeout(()=>{const g=new CustomEvent(Zf,Hy);a.addEventListener(Zf,d),a.dispatchEvent(g),g.defaultPrevented||Ss(v??document.body,{select:!0}),a.removeEventListener(Zf,d),Gy.remove(y)},0)}}},[a,c,d,y]);const x=h.useCallback(v=>{if(!n&&!r||y.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,g=document.activeElement;if(_&&g){const m=v.currentTarget,[w,b]=gM(m);w&&b?!v.shiftKey&&g===b?(v.preventDefault(),n&&Ss(w,{select:!0})):v.shiftKey&&g===w&&(v.preventDefault(),n&&Ss(b,{select:!0})):g===m&&v.preventDefault()}},[n,r,y.paused]);return u.jsx(_e.div,{tabIndex:-1,...i,ref:p,onKeyDown:x})});Td.displayName=pM;function mM(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ss(r,{select:t}),document.activeElement!==n)return}function gM(e){const t=M_(e),n=Ky(t,e),r=Ky(t.reverse(),e);return[n,r]}function M_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ky(e,t){for(const n of e)if(!vM(n,{upTo:t}))return n}function vM(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 yM(e){return e instanceof HTMLInputElement&&"select"in e}function Ss(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yM(e)&&t&&e.select()}}var Gy=xM();function xM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Zy(e,t),e.unshift(t)},remove(t){var n;e=Zy(e,t),(n=e[0])==null||n.resume()}}}function Zy(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function wM(e){return e.filter(t=>t.tagName!=="A")}var Jt=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},_M=Kx.useId||(()=>{}),SM=0;function Cr(e){const[t,n]=h.useState(_M());return Jt(()=>{n(r=>r??String(SM++))},[e]),t?`radix-${t}`:""}const bM=["top","right","bottom","left"],wr=Math.min,En=Math.max,ju=Math.round,Cc=Math.floor,Bs=e=>({x:e,y:e}),CM={left:"right",right:"left",bottom:"top",top:"bottom"},kM={start:"end",end:"start"};function pp(e,t,n){return En(e,wr(t,n))}function ns(e,t){return typeof e=="function"?e(t):e}function rs(e){return e.split("-")[0]}function Gi(e){return e.split("-")[1]}function Ym(e){return e==="x"?"y":"x"}function Bm(e){return e==="y"?"height":"width"}function Hs(e){return["top","bottom"].includes(rs(e))?"y":"x"}function Hm(e){return Ym(Hs(e))}function EM(e,t,n){n===void 0&&(n=!1);const r=Gi(e),s=Hm(e),o=Bm(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Au(i)),[i,Au(i)]}function TM(e){const t=Au(e);return[mp(e),t,mp(t)]}function mp(e){return e.replace(/start|end/g,t=>kM[t])}function NM(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function RM(e,t,n,r){const s=Gi(e);let o=NM(rs(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(mp)))),o}function Au(e){return e.replace(/left|right|bottom|top/g,t=>CM[t])}function PM(e){return{top:0,right:0,bottom:0,left:0,...e}}function O_(e){return typeof e!="number"?PM(e):{top:e,right:e,bottom:e,left:e}}function Iu(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function qy(e,t,n){let{reference:r,floating:s}=e;const o=Hs(t),i=Hm(t),a=Bm(i),l=rs(t),c=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let y;switch(l){case"top":y={x:d,y:r.y-s.height};break;case"bottom":y={x:d,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:f};break;case"left":y={x:r.x-s.width,y:f};break;default:y={x:r.x,y:r.y}}switch(Gi(t)){case"start":y[i]-=p*(n&&c?-1:1);break;case"end":y[i]+=p*(n&&c?-1:1);break}return y}const MM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=qy(c,r,l),p=r,y={},x=0;for(let v=0;v<a.length;v++){const{name:_,fn:g}=a[v],{x:m,y:w,data:b,reset:C}=await g({x:d,y:f,initialPlacement:r,placement:p,strategy:s,middlewareData:y,rects:c,platform:i,elements:{reference:e,floating:t}});d=m??d,f=w??f,y={...y,[_]:{...y[_],...b}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:d,y:f}=qy(c,p,l)),v=-1)}return{x:d,y:f,placement:p,strategy:s,middlewareData:y}};async function fl(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:y=0}=ns(t,e),x=O_(y),_=a[p?f==="floating"?"reference":"floating":f],g=Iu(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(_)))==null||n?_:_.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),m=f==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),b=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},C=Iu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:l}):m);return{top:(g.top-C.top+x.top)/b.y,bottom:(C.bottom-g.bottom+x.bottom)/b.y,left:(g.left-C.left+x.left)/b.x,right:(C.right-g.right+x.right)/b.x}}const OM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=ns(e,t)||{};if(c==null)return{};const f=O_(d),p={x:n,y:r},y=Hm(s),x=Bm(y),v=await i.getDimensions(c),_=y==="y",g=_?"top":"left",m=_?"bottom":"right",w=_?"clientHeight":"clientWidth",b=o.reference[x]+o.reference[y]-p[y]-o.floating[x],C=p[y]-o.reference[y],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let N=S?S[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(S)))&&(N=a.floating[w]||o.floating[x]);const R=b/2-C/2,F=N/2-v[x]/2-1,L=wr(f[g],F),Z=wr(f[m],F),D=L,B=N-v[x]-Z,A=N/2-v[x]/2+R,H=pp(D,A,B),ne=!l.arrow&&Gi(s)!=null&&A!==H&&o.reference[x]/2-(A<D?L:Z)-v[x]/2<0,W=ne?A<D?A-D:A-B:0;return{[y]:p[y]+W,data:{[y]:H,centerOffset:A-H-W,...ne&&{alignmentOffset:W}},reset:ne}}}),DM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,..._}=ns(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=rs(s),m=Hs(a),w=rs(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=p||(w||!v?[Au(a)]:TM(a)),S=x!=="none";!p&&S&&C.push(...RM(a,v,x,b));const N=[a,...C],R=await fl(t,_),F=[];let L=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&F.push(R[g]),f){const A=EM(s,i,b);F.push(R[A[0]],R[A[1]])}if(L=[...L,{placement:s,overflows:F}],!F.every(A=>A<=0)){var Z,D;const A=(((Z=o.flip)==null?void 0:Z.index)||0)+1,H=N[A];if(H)return{data:{index:A,overflows:L},reset:{placement:H}};let ne=(D=L.filter(W=>W.overflows[0]<=0).sort((W,I)=>W.overflows[1]-I.overflows[1])[0])==null?void 0:D.placement;if(!ne)switch(y){case"bestFit":{var B;const W=(B=L.filter(I=>{if(S){const O=Hs(I.placement);return O===m||O==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(O=>O>0).reduce((O,q)=>O+q,0)]).sort((I,O)=>I[1]-O[1])[0])==null?void 0:B[0];W&&(ne=W);break}case"initialPlacement":ne=a;break}if(s!==ne)return{reset:{placement:ne}}}return{}}}};function Qy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Xy(e){return bM.some(t=>e[t]>=0)}const jM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=ns(e,t);switch(r){case"referenceHidden":{const o=await fl(t,{...s,elementContext:"reference"}),i=Qy(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Xy(i)}}}case"escaped":{const o=await fl(t,{...s,altBoundary:!0}),i=Qy(o,n.floating);return{data:{escapedOffsets:i,escaped:Xy(i)}}}default:return{}}}}};async function AM(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=rs(n),a=Gi(n),l=Hs(n)==="y",c=["left","top"].includes(i)?-1:1,d=o&&l?-1:1,f=ns(t,e);let{mainAxis:p,crossAxis:y,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof x=="number"&&(y=a==="end"?x*-1:x),l?{x:y*d,y:p*c}:{x:p*c,y:y*d}}const IM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await AM(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:o+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:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:_=>{let{x:g,y:m}=_;return{x:g,y:m}}},...l}=ns(e,t),c={x:n,y:r},d=await fl(t,l),f=Hs(rs(s)),p=Ym(f);let y=c[p],x=c[f];if(o){const _=p==="y"?"top":"left",g=p==="y"?"bottom":"right",m=y+d[_],w=y-d[g];y=pp(m,y,w)}if(i){const _=f==="y"?"top":"left",g=f==="y"?"bottom":"right",m=x+d[_],w=x-d[g];x=pp(m,x,w)}const v=a.fn({...t,[p]:y,[f]:x});return{...v,data:{x:v.x-n,y:v.y-r}}}}},FM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ns(e,t),d={x:n,y:r},f=Hs(s),p=Ym(f);let y=d[p],x=d[f];const v=ns(a,t),_=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const w=p==="y"?"height":"width",b=o.reference[p]-o.floating[w]+_.mainAxis,C=o.reference[p]+o.reference[w]-_.mainAxis;y<b?y=b:y>C&&(y=C)}if(c){var g,m;const w=p==="y"?"width":"height",b=["top","left"].includes(rs(s)),C=o.reference[f]-o.floating[w]+(b&&((g=i.offset)==null?void 0:g[f])||0)+(b?0:_.crossAxis),S=o.reference[f]+o.reference[w]+(b?0:((m=i.offset)==null?void 0:m[f])||0)-(b?_.crossAxis:0);x<C?x=C:x>S&&(x=S)}return{[p]:y,[f]:x}}}},UM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:o}=t,{apply:i=()=>{},...a}=ns(e,t),l=await fl(t,a),c=rs(n),d=Gi(n),f=Hs(n)==="y",{width:p,height:y}=r.floating;let x,v;c==="top"||c==="bottom"?(x=c,v=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(v=c,x=d==="end"?"top":"bottom");const _=y-l.top-l.bottom,g=p-l.left-l.right,m=wr(y-l[x],_),w=wr(p-l[v],g),b=!t.middlewareData.shift;let C=m,S=w;if(f?S=d||b?wr(w,g):g:C=d||b?wr(m,_):_,b&&!d){const R=En(l.left,0),F=En(l.right,0),L=En(l.top,0),Z=En(l.bottom,0);f?S=p-2*(R!==0||F!==0?R+F:En(l.left,l.right)):C=y-2*(L!==0||Z!==0?L+Z:En(l.top,l.bottom))}await i({...t,availableWidth:S,availableHeight:C});const N=await s.getDimensions(o.floating);return p!==N.width||y!==N.height?{reset:{rects:!0}}:{}}}};function Zi(e){return D_(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function us(e){var t;return(t=(D_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function D_(e){return e instanceof Node||e instanceof Rn(e).Node}function ir(e){return e instanceof Element||e instanceof Rn(e).Element}function Er(e){return e instanceof HTMLElement||e instanceof Rn(e).HTMLElement}function Jy(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function $l(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function VM(e){return["table","td","th"].includes(Zi(e))}function Nd(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Km(e){const t=Gm(),n=ir(e)?ar(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 $M(e){let t=Ks(e);for(;Er(t)&&!Ii(t);){if(Km(t))return t;if(Nd(t))return null;t=Ks(t)}return null}function Gm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ii(e){return["html","body","#document"].includes(Zi(e))}function ar(e){return Rn(e).getComputedStyle(e)}function Rd(e){return ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ks(e){if(Zi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jy(e)&&e.host||us(e);return Jy(t)?t.host:t}function j_(e){const t=Ks(e);return Ii(t)?e.ownerDocument?e.ownerDocument.body:e.body:Er(t)&&$l(t)?t:j_(t)}function hl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=j_(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Rn(s);return o?t.concat(i,i.visualViewport||[],$l(s)?s:[],i.frameElement&&n?hl(i.frameElement):[]):t.concat(s,hl(s,[],n))}function A_(e){const t=ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Er(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=ju(n)!==o||ju(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function Zm(e){return ir(e)?e:e.contextElement}function Si(e){const t=Zm(e);if(!Er(t))return Bs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=A_(t);let i=(o?ju(n.width):n.width)/r,a=(o?ju(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const zM=Bs(0);function I_(e){const t=Rn(e);return!Gm()||!t.visualViewport?zM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function Po(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=Zm(e);let i=Bs(1);t&&(r?ir(r)&&(i=Si(r)):i=Si(e));const a=WM(o,n,r)?I_(o):Bs(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const p=Rn(o),y=r&&ir(r)?Rn(r):r;let x=p,v=x.frameElement;for(;v&&r&&y!==x;){const _=Si(v),g=v.getBoundingClientRect(),m=ar(v),w=g.left+(v.clientLeft+parseFloat(m.paddingLeft))*_.x,b=g.top+(v.clientTop+parseFloat(m.paddingTop))*_.y;l*=_.x,c*=_.y,d*=_.x,f*=_.y,l+=w,c+=b,x=Rn(v),v=x.frameElement}}return Iu({width:d,height:f,x:l,y:c})}function YM(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=us(r),a=t?Nd(t.floating):!1;if(r===i||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Bs(1);const d=Bs(0),f=Er(r);if((f||!f&&!o)&&((Zi(r)!=="body"||$l(i))&&(l=Rd(r)),Er(r))){const p=Po(r);c=Si(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x,y:n.y*c.y-l.scrollTop*c.y+d.y}}function BM(e){return Array.from(e.getClientRects())}function L_(e){return Po(us(e)).left+Rd(e).scrollLeft}function HM(e){const t=us(e),n=Rd(e),r=e.ownerDocument.body,s=En(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=En(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+L_(e);const a=-n.scrollTop;return ar(r).direction==="rtl"&&(i+=En(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function KM(e,t){const n=Rn(e),r=us(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const c=Gm();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}function GM(e,t){const n=Po(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=Er(e)?Si(e):Bs(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,c=r*o.y;return{width:i,height:a,x:l,y:c}}function ex(e,t,n){let r;if(t==="viewport")r=KM(e,n);else if(t==="document")r=HM(us(e));else if(ir(t))r=GM(t,n);else{const s=I_(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return Iu(r)}function F_(e,t){const n=Ks(e);return n===t||!ir(n)||Ii(n)?!1:ar(n).position==="fixed"||F_(n,t)}function ZM(e,t){const n=t.get(e);if(n)return n;let r=hl(e,[],!1).filter(a=>ir(a)&&Zi(a)!=="body"),s=null;const o=ar(e).position==="fixed";let i=o?Ks(e):e;for(;ir(i)&&!Ii(i);){const a=ar(i),l=Km(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||$l(i)&&!l&&F_(e,i))?r=r.filter(d=>d!==i):s=a,i=Ks(i)}return t.set(e,r),r}function qM(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?Nd(t)?[]:ZM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,d)=>{const f=ex(t,d,s);return c.top=En(f.top,c.top),c.right=wr(f.right,c.right),c.bottom=wr(f.bottom,c.bottom),c.left=En(f.left,c.left),c},ex(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function QM(e){const{width:t,height:n}=A_(e);return{width:t,height:n}}function XM(e,t,n){const r=Er(t),s=us(t),o=n==="fixed",i=Po(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Bs(0);if(r||!r&&!o)if((Zi(t)!=="body"||$l(s))&&(a=Rd(t)),r){const f=Po(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&(l.x=L_(s));const c=i.left+a.scrollLeft-l.x,d=i.top+a.scrollTop-l.y;return{x:c,y:d,width:i.width,height:i.height}}function qf(e){return ar(e).position==="static"}function tx(e,t){return!Er(e)||ar(e).position==="fixed"?null:t?t(e):e.offsetParent}function U_(e,t){const n=Rn(e);if(Nd(e))return n;if(!Er(e)){let s=Ks(e);for(;s&&!Ii(s);){if(ir(s)&&!qf(s))return s;s=Ks(s)}return n}let r=tx(e,t);for(;r&&VM(r)&&qf(r);)r=tx(r,t);return r&&Ii(r)&&qf(r)&&!Km(r)?n:r||$M(e)||n}const JM=async function(e){const t=this.getOffsetParent||U_,n=this.getDimensions,r=await n(e.floating);return{reference:XM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eO(e){return ar(e).direction==="rtl"}const tO={convertOffsetParentRelativeRectToViewportRelativeRect:YM,getDocumentElement:us,getClippingRect:qM,getOffsetParent:U_,getElementRects:JM,getClientRects:BM,getDimensions:QM,getScale:Si,isElement:ir,isRTL:eO};function nO(e,t){let n=null,r;const s=us(e);function o(){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),o();const{left:c,top:d,width:f,height:p}=e.getBoundingClientRect();if(a||t(),!f||!p)return;const y=Cc(d),x=Cc(s.clientWidth-(c+f)),v=Cc(s.clientHeight-(d+p)),_=Cc(c),m={rootMargin:-y+"px "+-x+"px "+-v+"px "+-_+"px",threshold:En(0,wr(1,l))||1};let w=!0;function b(C){const S=C[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(b,{...m,root:s.ownerDocument})}catch{n=new IntersectionObserver(b,m)}n.observe(e)}return i(!0),o}function rO(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Zm(e),d=s||o?[...c?hl(c):[],...hl(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=c&&a?nO(c,n):null;let p=-1,y=null;i&&(y=new ResizeObserver(g=>{let[m]=g;m&&m.target===c&&y&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(t)})),n()}),c&&!l&&y.observe(c),y.observe(t));let x,v=l?Po(e):null;l&&_();function _(){const g=Po(e);v&&(g.x!==v.x||g.y!==v.y||g.width!==v.width||g.height!==v.height)&&n(),v=g,x=requestAnimationFrame(_)}return n(),()=>{var g;d.forEach(m=>{s&&m.removeEventListener("scroll",n),o&&m.removeEventListener("resize",n)}),f==null||f(),(g=y)==null||g.disconnect(),y=null,l&&cancelAnimationFrame(x)}}const sO=IM,oO=LM,iO=DM,aO=UM,lO=jM,nx=OM,cO=FM,uO=(e,t,n)=>{const r=new Map,s={platform:tO,...n},o={...s.platform,_c:r};return MM(e,t,{...s,platform:o})};var Zc=typeof document<"u"?h.useLayoutEffect:h.useEffect;function Lu(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,s;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(!Lu(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!Lu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function V_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rx(e,t){const n=V_(e);return Math.round(t*n)/n}function sx(e){const t=h.useRef(e);return Zc(()=>{t.current=e}),t}function dO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,y]=h.useState(r);Lu(p,r)||y(r);const[x,v]=h.useState(null),[_,g]=h.useState(null),m=h.useCallback(W=>{W!==S.current&&(S.current=W,v(W))},[]),w=h.useCallback(W=>{W!==N.current&&(N.current=W,g(W))},[]),b=o||x,C=i||_,S=h.useRef(null),N=h.useRef(null),R=h.useRef(d),F=l!=null,L=sx(l),Z=sx(s),D=h.useCallback(()=>{if(!S.current||!N.current)return;const W={placement:t,strategy:n,middleware:p};Z.current&&(W.platform=Z.current),uO(S.current,N.current,W).then(I=>{const O={...I,isPositioned:!0};B.current&&!Lu(R.current,O)&&(R.current=O,as.flushSync(()=>{f(O)}))})},[p,t,n,Z]);Zc(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[c]);const B=h.useRef(!1);Zc(()=>(B.current=!0,()=>{B.current=!1}),[]),Zc(()=>{if(b&&(S.current=b),C&&(N.current=C),b&&C){if(L.current)return L.current(b,C,D);D()}},[b,C,D,L,F]);const A=h.useMemo(()=>({reference:S,floating:N,setReference:m,setFloating:w}),[m,w]),H=h.useMemo(()=>({reference:b,floating:C}),[b,C]),ne=h.useMemo(()=>{const W={position:n,left:0,top:0};if(!H.floating)return W;const I=rx(H.floating,d.x),O=rx(H.floating,d.y);return a?{...W,transform:"translate("+I+"px, "+O+"px)",...V_(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:O}},[n,a,H.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:D,refs:A,elements:H,floatingStyles:ne}),[d,D,A,H,ne])}const fO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?nx({element:r.current,padding:s}).fn(n):{}:r?nx({element:r,padding:s}).fn(n):{}}}},hO=(e,t)=>({...sO(e),options:[e,t]}),pO=(e,t)=>({...oO(e),options:[e,t]}),mO=(e,t)=>({...cO(e),options:[e,t]}),gO=(e,t)=>({...iO(e),options:[e,t]}),vO=(e,t)=>({...aO(e),options:[e,t]}),yO=(e,t)=>({...lO(e),options:[e,t]}),xO=(e,t)=>({...fO(e),options:[e,t]});var wO="Arrow",$_=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return u.jsx(_e.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});$_.displayName=wO;var _O=$_;function z_(e){const[t,n]=h.useState(void 0);return Jt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.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 qm="Popper",[W_,qi]=Pr(qm),[SO,Y_]=W_(qm),B_=e=>{const{__scopePopper:t,children:n}=e,[r,s]=h.useState(null);return u.jsx(SO,{scope:t,anchor:r,onAnchorChange:s,children:n})};B_.displayName=qm;var H_="PopperAnchor",K_=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=Y_(H_,n),i=h.useRef(null),a=ze(t,i);return h.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:u.jsx(_e.div,{...s,ref:a})});K_.displayName=H_;var Qm="PopperContent",[bO,CO]=W_(Qm),G_=h.forwardRef((e,t)=>{var le,Me,Ye,Fe,Ue,we;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:y="optimized",onPlaced:x,...v}=e,_=Y_(Qm,n),[g,m]=h.useState(null),w=ze(t,ut=>m(ut)),[b,C]=h.useState(null),S=z_(b),N=(S==null?void 0:S.width)??0,R=(S==null?void 0:S.height)??0,F=r+(o!=="center"?"-"+o:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Z=Array.isArray(c)?c:[c],D=Z.length>0,B={padding:L,boundary:Z.filter(EO),altBoundary:D},{refs:A,floatingStyles:H,placement:ne,isPositioned:W,middlewareData:I}=dO({strategy:"fixed",placement:F,whileElementsMounted:(...ut)=>rO(...ut,{animationFrame:y==="always"}),elements:{reference:_.anchor},middleware:[hO({mainAxis:s+R,alignmentAxis:i}),l&&pO({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?mO():void 0,...B}),l&&gO({...B}),vO({...B,apply:({elements:ut,rects:Wt,availableWidth:hs,availableHeight:fn})=>{const{width:ps,height:k}=Wt.reference,P=ut.floating.style;P.setProperty("--radix-popper-available-width",`${hs}px`),P.setProperty("--radix-popper-available-height",`${fn}px`),P.setProperty("--radix-popper-anchor-width",`${ps}px`),P.setProperty("--radix-popper-anchor-height",`${k}px`)}}),b&&xO({element:b,padding:a}),TO({arrowWidth:N,arrowHeight:R}),p&&yO({strategy:"referenceHidden",...B})]}),[O,q]=Q_(ne),ae=Xt(x);Jt(()=>{W&&(ae==null||ae())},[W,ae]);const me=(le=I.arrow)==null?void 0:le.x,Qe=(Me=I.arrow)==null?void 0:Me.y,Pe=((Ye=I.arrow)==null?void 0:Ye.centerOffset)!==0,[ct,Le]=h.useState();return Jt(()=>{g&&Le(window.getComputedStyle(g).zIndex)},[g]),u.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:W?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ct,"--radix-popper-transform-origin":[(Fe=I.transformOrigin)==null?void 0:Fe.x,(Ue=I.transformOrigin)==null?void 0:Ue.y].join(" "),...((we=I.hide)==null?void 0:we.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(bO,{scope:n,placedSide:O,onArrowChange:C,arrowX:me,arrowY:Qe,shouldHideArrow:Pe,children:u.jsx(_e.div,{"data-side":O,"data-align":q,...v,ref:w,style:{...v.style,animation:W?void 0:"none"}})})})});G_.displayName=Qm;var Z_="PopperArrow",kO={top:"bottom",right:"left",bottom:"top",left:"right"},q_=h.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=CO(Z_,r),i=kO[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(_O,{...s,ref:n,style:{...s.style,display:"block"}})})});q_.displayName=Z_;function EO(e){return e!==null}var TO=e=>({name:"transformOrigin",options:e,fn(t){var _,g,m;const{placement:n,rects:r,middlewareData:s}=t,i=((_=s.arrow)==null?void 0:_.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=Q_(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,y=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let x="",v="";return c==="bottom"?(x=i?f:`${p}px`,v=`${-l}px`):c==="top"?(x=i?f:`${p}px`,v=`${r.floating.height+l}px`):c==="right"?(x=`${-l}px`,v=i?f:`${y}px`):c==="left"&&(x=`${r.floating.width+l}px`,v=i?f:`${y}px`),{data:{x,y:v}}}});function Q_(e){const[t,n="center"]=e.split("-");return[t,n]}var Xm=B_,Jm=K_,eg=G_,tg=q_,NO="Portal",zl=h.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=h.useState(!1);Jt(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?q0.createPortal(u.jsx(_e.div,{...r,ref:t}),i):null});zl.displayName=NO;function RO(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Mr=e=>{const{present:t,children:n}=e,r=PO(t),s=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),o=ze(r.ref,MO(s));return typeof n=="function"||r.isPresent?h.cloneElement(s,{ref:o}):null};Mr.displayName="Presence";function PO(e){const[t,n]=h.useState(),r=h.useRef({}),s=h.useRef(e),o=h.useRef("none"),i=e?"mounted":"unmounted",[a,l]=RO(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=kc(r.current);o.current=a==="mounted"?c:"none"},[a]),Jt(()=>{const c=r.current,d=s.current;if(d!==e){const p=o.current,y=kc(c);e?l("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Jt(()=>{if(t){const c=f=>{const y=kc(r.current).includes(f.animationName);f.target===t&&y&&as.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=kc(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function kc(e){return(e==null?void 0:e.animationName)||"none"}function MO(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qf="rovingFocusGroup.onEntryFocus",OO={bubbles:!1,cancelable:!0},Pd="RovingFocusGroup",[gp,X_,DO]=Ed(Pd),[jO,J_]=Pr(Pd,[DO]),[AO,IO]=jO(Pd),eS=h.forwardRef((e,t)=>u.jsx(gp.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(gp.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(LO,{...e,ref:t})})}));eS.displayName=Pd;var LO=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=e,p=h.useRef(null),y=ze(t,p),x=zm(o),[v=null,_]=Ys({prop:i,defaultProp:a,onChange:l}),[g,m]=h.useState(!1),w=Xt(c),b=X_(n),C=h.useRef(!1),[S,N]=h.useState(0);return h.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(Qf,w),()=>R.removeEventListener(Qf,w)},[w]),u.jsx(AO,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:v,onItemFocus:h.useCallback(R=>_(R),[_]),onItemShiftTab:h.useCallback(()=>m(!0),[]),onFocusableItemAdd:h.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:h.useCallback(()=>N(R=>R-1),[]),children:u.jsx(_e.div,{tabIndex:g||S===0?-1:0,"data-orientation":r,...f,ref:y,style:{outline:"none",...e.style},onMouseDown:te(e.onMouseDown,()=>{C.current=!0}),onFocus:te(e.onFocus,R=>{const F=!C.current;if(R.target===R.currentTarget&&F&&!g){const L=new CustomEvent(Qf,OO);if(R.currentTarget.dispatchEvent(L),!L.defaultPrevented){const Z=b().filter(ne=>ne.focusable),D=Z.find(ne=>ne.active),B=Z.find(ne=>ne.id===v),H=[D,B,...Z].filter(Boolean).map(ne=>ne.ref.current);rS(H,d)}}C.current=!1}),onBlur:te(e.onBlur,()=>m(!1))})})}),tS="RovingFocusGroupItem",nS=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,a=Cr(),l=o||a,c=IO(tS,n),d=c.currentTabStopId===l,f=X_(n),{onFocusableItemAdd:p,onFocusableItemRemove:y}=c;return h.useEffect(()=>{if(r)return p(),()=>y()},[r,p,y]),u.jsx(gp.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:u.jsx(_e.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:te(e.onMouseDown,x=>{r?c.onItemFocus(l):x.preventDefault()}),onFocus:te(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:te(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=VO(x,c.orientation,c.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let g=f().filter(m=>m.focusable).map(m=>m.ref.current);if(v==="last")g.reverse();else if(v==="prev"||v==="next"){v==="prev"&&g.reverse();const m=g.indexOf(x.currentTarget);g=c.loop?$O(g,m+1):g.slice(m+1)}setTimeout(()=>rS(g))}})})})});nS.displayName=tS;var FO={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 VO(e,t,n){const r=UO(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return FO[r]}function rS(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function $O(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zO=eS,WO=nS,YO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ko=new WeakMap,Ec=new WeakMap,Tc={},Xf=0,sS=function(e){return e&&(e.host||sS(e.parentNode))},BO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=sS(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})},HO=function(e,t,n,r){var s=BO(t,Array.isArray(e)?e:[e]);Tc[n]||(Tc[n]=new WeakMap);var o=Tc[n],i=[],a=new Set,l=new Set(s),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};s.forEach(c);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 y=p.getAttribute(r),x=y!==null&&y!=="false",v=(Ko.get(p)||0)+1,_=(o.get(p)||0)+1;Ko.set(p,v),o.set(p,_),i.push(p),v===1&&x&&Ec.set(p,!0),_===1&&p.setAttribute(n,"true"),x||p.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",p,g)}})};return d(t),a.clear(),Xf++,function(){i.forEach(function(f){var p=Ko.get(f)-1,y=o.get(f)-1;Ko.set(f,p),o.set(f,y),p||(Ec.has(f)||f.removeAttribute(r),Ec.delete(f)),y||f.removeAttribute(n)}),Xf--,Xf||(Ko=new WeakMap,Ko=new WeakMap,Ec=new WeakMap,Tc={})}},ng=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=YO(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),HO(r,s,n,"aria-hidden")):function(){return null}},vr=function(){return vr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},vr.apply(this,arguments)};function oS(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 s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function KO(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var qc="right-scroll-bar-position",Qc="width-before-scroll-bar",GO="with-scroll-bars-hidden",ZO="--removed-body-scroll-bar-size";function Jf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qO(e,t){var n=h.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var QO=typeof window<"u"?h.useLayoutEffect:h.useEffect,ox=new WeakMap;function XO(e,t){var n=qO(null,function(r){return e.forEach(function(s){return Jf(s,r)})});return QO(function(){var r=ox.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||Jf(a,null)}),o.forEach(function(a){s.has(a)||Jf(a,i)})}ox.set(n,e)},[e]),n}function JO(e){return e}function eD(e,t){t===void 0&&(t=JO);var n=[],r=!1,s={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(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var l=function(){var d=i;i=[],d.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),n}}}};return s}function tD(e){e===void 0&&(e={});var t=eD(null);return t.options=vr({async:!0,ssr:!1},e),t}var iS=function(e){var t=e.sideCar,n=oS(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,vr({},n))};iS.isSideCarExport=!0;function nD(e,t){return e.useMedium(t),iS}var aS=tD(),eh=function(){},Md=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:eh,onWheelCapture:eh,onTouchMoveCapture:eh}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,y=e.noIsolation,x=e.inert,v=e.allowPinchZoom,_=e.as,g=_===void 0?"div":_,m=e.gapMode,w=oS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=p,C=XO([n,t]),S=vr(vr({},w),s);return h.createElement(h.Fragment,null,d&&h.createElement(b,{sideCar:aS,removeScrollBar:c,shards:f,noIsolation:y,inert:x,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:m}),i?h.cloneElement(h.Children.only(a),vr(vr({},S),{ref:C})):h.createElement(g,vr({},S,{className:l,ref:C}),a))});Md.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Md.classNames={fullWidth:Qc,zeroRight:qc};var rD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=rD();return t&&e.setAttribute("nonce",t),e}function oD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function iD(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var aD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sD())&&(oD(t,n),iD(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lD=function(){var e=aD();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},lS=function(){var e=lD(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},cD={left:0,top:0,right:0,gap:0},th=function(e){return parseInt(e||"",10)||0},uD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[th(n),th(r),th(s)]},dD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return cD;var t=uD(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])}},fD=lS(),bi="data-scroll-locked",hD=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
.`.concat(GO,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(a,"px ").concat(r,`;
}
body[`).concat(bi,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(o,`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(qc,` {
right: `).concat(a,"px ").concat(r,`;
}
.`).concat(Qc,` {
margin-right: `).concat(a,"px ").concat(r,`;
}
.`).concat(qc," .").concat(qc,` {
right: 0 `).concat(r,`;
}
.`).concat(Qc," .").concat(Qc,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(bi,`] {
`).concat(ZO,": ").concat(a,`px;
}
`)},ix=function(){var e=parseInt(document.body.getAttribute(bi)||"0",10);return isFinite(e)?e:0},pD=function(){h.useEffect(function(){return document.body.setAttribute(bi,(ix()+1).toString()),function(){var e=ix()-1;e<=0?document.body.removeAttribute(bi):document.body.setAttribute(bi,e.toString())}},[])},mD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;pD();var o=h.useMemo(function(){return dD(s)},[s]);return h.createElement(fD,{styles:hD(o,!t,s,n?"":"!important")})},vp=!1;if(typeof window<"u")try{var Nc=Object.defineProperty({},"passive",{get:function(){return vp=!0,!0}});window.addEventListener("test",Nc,Nc),window.removeEventListener("test",Nc,Nc)}catch{vp=!1}var Go=vp?{passive:!1}:!1,gD=function(e){return e.tagName==="TEXTAREA"},cS=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!gD(e)&&n[t]==="visible")},vD=function(e){return cS(e,"overflowY")},yD=function(e){return cS(e,"overflowX")},ax=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=uS(e,r);if(s){var o=dS(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},xD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},wD=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},uS=function(e,t){return e==="v"?vD(t):yD(t)},dS=function(e,t){return e==="v"?xD(t):wD(t)},_D=function(e,t){return e==="h"&&t==="rtl"?-1:1},SD=function(e,t,n,r,s){var o=_D(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,l=t.contains(a),c=!1,d=i>0,f=0,p=0;do{var y=dS(e,a),x=y[0],v=y[1],_=y[2],g=v-_-o*x;(x||g)&&uS(e,a)&&(f+=g,p+=x),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||!s)||!d&&(Math.abs(p)<1||!s))&&(c=!0),c},Rc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lx=function(e){return[e.deltaX,e.deltaY]},cx=function(e){return e&&"current"in e?e.current:e},bD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},CD=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},kD=0,Zo=[];function ED(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),s=h.useState(kD++)[0],o=h.useState(lS)[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(s));var v=KO([e.lockRef.current],(e.shards||[]).map(cx),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(v,_){if("touches"in v&&v.touches.length===2)return!i.current.allowPinchZoom;var g=Rc(v),m=n.current,w="deltaX"in v?v.deltaX:m[0]-g[0],b="deltaY"in v?v.deltaY:m[1]-g[1],C,S=v.target,N=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in v&&N==="h"&&S.type==="range")return!1;var R=ax(N,S);if(!R)return!0;if(R?C=N:(C=N==="v"?"h":"v",R=ax(N,S)),!R)return!1;if(!r.current&&"changedTouches"in v&&(w||b)&&(r.current=C),!C)return!0;var F=r.current||C;return SD(F,_,v,F==="h"?w:b,!0)},[]),l=h.useCallback(function(v){var _=v;if(!(!Zo.length||Zo[Zo.length-1]!==o)){var g="deltaY"in _?lx(_):Rc(_),m=t.current.filter(function(C){return C.name===_.type&&(C.target===_.target||_.target===C.shadowParent)&&bD(C.delta,g)})[0];if(m&&m.should){_.cancelable&&_.preventDefault();return}if(!m){var w=(i.current.shards||[]).map(cx).filter(Boolean).filter(function(C){return C.contains(_.target)}),b=w.length>0?a(_,w[0]):!i.current.noIsolation;b&&_.cancelable&&_.preventDefault()}}},[]),c=h.useCallback(function(v,_,g,m){var w={name:v,delta:_,target:g,should:m,shadowParent:TD(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),d=h.useCallback(function(v){n.current=Rc(v),r.current=void 0},[]),f=h.useCallback(function(v){c(v.type,lx(v),v.target,a(v,e.lockRef.current))},[]),p=h.useCallback(function(v){c(v.type,Rc(v),v.target,a(v,e.lockRef.current))},[]);h.useEffect(function(){return Zo.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Go),document.addEventListener("touchmove",l,Go),document.addEventListener("touchstart",d,Go),function(){Zo=Zo.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,Go),document.removeEventListener("touchmove",l,Go),document.removeEventListener("touchstart",d,Go)}},[]);var y=e.removeScrollBar,x=e.inert;return h.createElement(h.Fragment,null,x?h.createElement(o,{styles:CD(s)}):null,y?h.createElement(mD,{gapMode:e.gapMode}):null)}function TD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ND=nD(aS,ED);var Od=h.forwardRef(function(e,t){return h.createElement(Md,vr({},e,{ref:t,sideCar:ND}))});Od.classNames=Md.classNames;var yp=["Enter"," "],RD=["ArrowDown","PageUp","Home"],fS=["ArrowUp","PageDown","End"],PD=[...RD,...fS],MD={ltr:[...yp,"ArrowRight"],rtl:[...yp,"ArrowLeft"]},OD={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wl="Menu",[pl,DD,jD]=Ed(Wl),[Lo,hS]=Pr(Wl,[jD,qi,J_]),Dd=qi(),pS=J_(),[AD,Fo]=Lo(Wl),[ID,Yl]=Lo(Wl),mS=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,a=Dd(t),[l,c]=h.useState(null),d=h.useRef(!1),f=Xt(o),p=zm(s);return h.useEffect(()=>{const y=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),u.jsx(Xm,{...a,children:u.jsx(AD,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:u.jsx(ID,{scope:t,onClose:h.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};mS.displayName=Wl;var LD="MenuAnchor",rg=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Dd(n);return u.jsx(Jm,{...s,...r,ref:t})});rg.displayName=LD;var sg="MenuPortal",[FD,gS]=Lo(sg,{forceMount:void 0}),vS=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Fo(sg,t);return u.jsx(FD,{scope:t,forceMount:n,children:u.jsx(Mr,{present:n||o.open,children:u.jsx(zl,{asChild:!0,container:s,children:r})})})};vS.displayName=sg;var $n="MenuContent",[UD,og]=Lo($n),yS=h.forwardRef((e,t)=>{const n=gS($n,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Fo($n,e.__scopeMenu),i=Yl($n,e.__scopeMenu);return u.jsx(pl.Provider,{scope:e.__scopeMenu,children:u.jsx(Mr,{present:r||o.open,children:u.jsx(pl.Slot,{scope:e.__scopeMenu,children:i.modal?u.jsx(VD,{...s,ref:t}):u.jsx($D,{...s,ref:t})})})})}),VD=h.forwardRef((e,t)=>{const n=Fo($n,e.__scopeMenu),r=h.useRef(null),s=ze(t,r);return h.useEffect(()=>{const o=r.current;if(o)return ng(o)},[]),u.jsx(ig,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:te(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$D=h.forwardRef((e,t)=>{const n=Fo($n,e.__scopeMenu);return u.jsx(ig,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ig=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:y,disableOutsideScroll:x,...v}=e,_=Fo($n,n),g=Yl($n,n),m=Dd(n),w=pS(n),b=DD(n),[C,S]=h.useState(null),N=h.useRef(null),R=ze(t,N,_.onContentChange),F=h.useRef(0),L=h.useRef(""),Z=h.useRef(0),D=h.useRef(null),B=h.useRef("right"),A=h.useRef(0),H=x?Od:h.Fragment,ne=x?{as:ts,allowPinchZoom:!0}:void 0,W=O=>{var le,Me;const q=L.current+O,ae=b().filter(Ye=>!Ye.disabled),me=document.activeElement,Qe=(le=ae.find(Ye=>Ye.ref.current===me))==null?void 0:le.textValue,Pe=ae.map(Ye=>Ye.textValue),ct=JD(Pe,q,Qe),Le=(Me=ae.find(Ye=>Ye.textValue===ct))==null?void 0:Me.ref.current;(function Ye(Fe){L.current=Fe,window.clearTimeout(F.current),Fe!==""&&(F.current=window.setTimeout(()=>Ye(""),1e3))})(q),Le&&setTimeout(()=>Le.focus())};h.useEffect(()=>()=>window.clearTimeout(F.current),[]),Wm();const I=h.useCallback(O=>{var ae,me;return B.current===((ae=D.current)==null?void 0:ae.side)&&tj(O,(me=D.current)==null?void 0:me.area)},[]);return u.jsx(UD,{scope:n,searchRef:L,onItemEnter:h.useCallback(O=>{I(O)&&O.preventDefault()},[I]),onItemLeave:h.useCallback(O=>{var q;I(O)||((q=N.current)==null||q.focus(),S(null))},[I]),onTriggerLeave:h.useCallback(O=>{I(O)&&O.preventDefault()},[I]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:h.useCallback(O=>{D.current=O},[]),children:u.jsx(H,{...ne,children:u.jsx(Td,{asChild:!0,trapped:s,onMountAutoFocus:te(o,O=>{var q;O.preventDefault(),(q=N.current)==null||q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:u.jsx(Ki,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:y,children:u.jsx(zO,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:te(l,O=>{g.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(eg,{role:"menu","aria-orientation":"vertical","data-state":jS(_.open),"data-radix-menu-content":"",dir:g.dir,...m,...v,ref:R,style:{outline:"none",...v.style},onKeyDown:te(v.onKeyDown,O=>{const ae=O.target.closest("[data-radix-menu-content]")===O.currentTarget,me=O.ctrlKey||O.altKey||O.metaKey,Qe=O.key.length===1;ae&&(O.key==="Tab"&&O.preventDefault(),!me&&Qe&&W(O.key));const Pe=N.current;if(O.target!==Pe||!PD.includes(O.key))return;O.preventDefault();const Le=b().filter(le=>!le.disabled).map(le=>le.ref.current);fS.includes(O.key)&&Le.reverse(),QD(Le)}),onBlur:te(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(F.current),L.current="")}),onPointerMove:te(e.onPointerMove,ml(O=>{const q=O.target,ae=A.current!==O.clientX;if(O.currentTarget.contains(q)&&ae){const me=O.clientX>A.current?"right":"left";B.current=me,A.current=O.clientX}}))})})})})})})});yS.displayName=$n;var zD="MenuGroup",ag=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(_e.div,{role:"group",...r,ref:t})});ag.displayName=zD;var WD="MenuLabel",xS=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(_e.div,{...r,ref:t})});xS.displayName=WD;var Fu="MenuItem",ux="menu.itemSelect",jd=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=h.useRef(null),i=Yl(Fu,e.__scopeMenu),a=og(Fu,e.__scopeMenu),l=ze(t,o),c=h.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const p=new CustomEvent(ux,{bubbles:!0,cancelable:!0});f.addEventListener(ux,y=>r==null?void 0:r(y),{once:!0}),$m(f,p),p.defaultPrevented?c.current=!1:i.onClose()}};return u.jsx(wS,{...s,ref:l,disabled:n,onClick:te(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),c.current=!0},onPointerUp:te(e.onPointerUp,f=>{var p;c.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:te(e.onKeyDown,f=>{const p=a.searchRef.current!=="";n||p&&f.key===" "||yp.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});jd.displayName=Fu;var wS=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=og(Fu,n),a=pS(n),l=h.useRef(null),c=ze(t,l),[d,f]=h.useState(!1),[p,y]=h.useState("");return h.useEffect(()=>{const x=l.current;x&&y((x.textContent??"").trim())},[o.children]),u.jsx(pl.ItemSlot,{scope:n,disabled:r,textValue:s??p,children:u.jsx(WO,{asChild:!0,...a,focusable:!r,children:u.jsx(_e.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:c,onPointerMove:te(e.onPointerMove,ml(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:te(e.onPointerLeave,ml(x=>i.onItemLeave(x))),onFocus:te(e.onFocus,()=>f(!0)),onBlur:te(e.onBlur,()=>f(!1))})})})}),YD="MenuCheckboxItem",_S=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return u.jsx(ES,{scope:e.__scopeMenu,checked:n,children:u.jsx(jd,{role:"menuitemcheckbox","aria-checked":Uu(n)?"mixed":n,...s,ref:t,"data-state":cg(n),onSelect:te(s.onSelect,()=>r==null?void 0:r(Uu(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_S.displayName=YD;var SS="MenuRadioGroup",[BD,HD]=Lo(SS,{value:void 0,onValueChange:()=>{}}),bS=h.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Xt(r);return u.jsx(BD,{scope:e.__scopeMenu,value:n,onValueChange:o,children:u.jsx(ag,{...s,ref:t})})});bS.displayName=SS;var CS="MenuRadioItem",kS=h.forwardRef((e,t)=>{const{value:n,...r}=e,s=HD(CS,e.__scopeMenu),o=n===s.value;return u.jsx(ES,{scope:e.__scopeMenu,checked:o,children:u.jsx(jd,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":cg(o),onSelect:te(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});kS.displayName=CS;var lg="MenuItemIndicator",[ES,KD]=Lo(lg,{checked:!1}),TS=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=KD(lg,n);return u.jsx(Mr,{present:r||Uu(o.checked)||o.checked===!0,children:u.jsx(_e.span,{...s,ref:t,"data-state":cg(o.checked)})})});TS.displayName=lg;var GD="MenuSeparator",NS=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(_e.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});NS.displayName=GD;var ZD="MenuArrow",RS=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Dd(n);return u.jsx(tg,{...s,...r,ref:t})});RS.displayName=ZD;var qD="MenuSub",[YV,PS]=Lo(qD),Ca="MenuSubTrigger",MS=h.forwardRef((e,t)=>{const n=Fo(Ca,e.__scopeMenu),r=Yl(Ca,e.__scopeMenu),s=PS(Ca,e.__scopeMenu),o=og(Ca,e.__scopeMenu),i=h.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=o,c={__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]),u.jsx(rg,{asChild:!0,...c,children:u.jsx(wS,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":jS(n.open),...e,ref:kd(t,s.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:te(e.onPointerMove,ml(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:te(e.onPointerLeave,ml(f=>{var y,x;d();const p=(y=n.content)==null?void 0:y.getBoundingClientRect();if(p){const v=(x=n.content)==null?void 0:x.dataset.side,_=v==="right",g=_?-5:5,m=p[_?"left":"right"],w=p[_?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:m,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x:m,y:p.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:te(e.onKeyDown,f=>{var y;const p=o.searchRef.current!=="";e.disabled||p&&f.key===" "||MD[r.dir].includes(f.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),f.preventDefault())})})})});MS.displayName=Ca;var OS="MenuSubContent",DS=h.forwardRef((e,t)=>{const n=gS($n,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Fo($n,e.__scopeMenu),i=Yl($n,e.__scopeMenu),a=PS(OS,e.__scopeMenu),l=h.useRef(null),c=ze(t,l);return u.jsx(pl.Provider,{scope:e.__scopeMenu,children:u.jsx(Mr,{present:r||o.open,children:u.jsx(pl.Slot,{scope:e.__scopeMenu,children:u.jsx(ig,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:c,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:te(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:te(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:te(e.onKeyDown,d=>{var y;const f=d.currentTarget.contains(d.target),p=OD[i.dir].includes(d.key);f&&p&&(o.onOpenChange(!1),(y=a.trigger)==null||y.focus(),d.preventDefault())})})})})})});DS.displayName=OS;function jS(e){return e?"open":"closed"}function Uu(e){return e==="indeterminate"}function cg(e){return Uu(e)?"indeterminate":e?"checked":"unchecked"}function QD(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function XD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function JD(e,t,n){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=XD(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function ej(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,l=t[o].y,c=t[i].x,d=t[i].y;l>r!=d>r&&n<(c-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function tj(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ej(n,t)}function ml(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nj=mS,rj=rg,sj=vS,oj=yS,ij=ag,aj=xS,lj=jd,cj=_S,uj=bS,dj=kS,fj=TS,hj=NS,pj=RS,mj=MS,gj=DS,ug="DropdownMenu",[vj,BV]=Pr(ug,[hS]),dn=hS(),[yj,AS]=vj(ug),IS=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=dn(t),c=h.useRef(null),[d=!1,f]=Ys({prop:s,defaultProp:o,onChange:i});return u.jsx(yj,{scope:t,triggerId:Cr(),triggerRef:c,contentId:Cr(),open:d,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(p=>!p),[f]),modal:a,children:u.jsx(nj,{...l,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};IS.displayName=ug;var LS="DropdownMenuTrigger",FS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=AS(LS,n),i=dn(n);return u.jsx(rj,{asChild:!0,...i,children:u.jsx(_e.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:kd(t,o.triggerRef),onPointerDown:te(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:te(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});FS.displayName=LS;var xj="DropdownMenuPortal",US=e=>{const{__scopeDropdownMenu:t,...n}=e,r=dn(t);return u.jsx(sj,{...r,...n})};US.displayName=xj;var VS="DropdownMenuContent",$S=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=AS(VS,n),o=dn(n),i=h.useRef(!1);return u.jsx(oj,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:te(e.onCloseAutoFocus,a=>{var l;i.current||(l=s.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:te(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!s.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)"}})});$S.displayName=VS;var wj="DropdownMenuGroup",_j=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(ij,{...s,...r,ref:t})});_j.displayName=wj;var Sj="DropdownMenuLabel",zS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(aj,{...s,...r,ref:t})});zS.displayName=Sj;var bj="DropdownMenuItem",WS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(lj,{...s,...r,ref:t})});WS.displayName=bj;var Cj="DropdownMenuCheckboxItem",YS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(cj,{...s,...r,ref:t})});YS.displayName=Cj;var kj="DropdownMenuRadioGroup",Ej=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(uj,{...s,...r,ref:t})});Ej.displayName=kj;var Tj="DropdownMenuRadioItem",BS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(dj,{...s,...r,ref:t})});BS.displayName=Tj;var Nj="DropdownMenuItemIndicator",HS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(fj,{...s,...r,ref:t})});HS.displayName=Nj;var Rj="DropdownMenuSeparator",KS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(hj,{...s,...r,ref:t})});KS.displayName=Rj;var Pj="DropdownMenuArrow",Mj=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(pj,{...s,...r,ref:t})});Mj.displayName=Pj;var Oj="DropdownMenuSubTrigger",GS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(mj,{...s,...r,ref:t})});GS.displayName=Oj;var Dj="DropdownMenuSubContent",ZS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(gj,{...s,...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)"}})});ZS.displayName=Dj;var jj=IS,Aj=FS,Ij=US,qS=$S,QS=zS,XS=WS,JS=YS,e1=BS,t1=HS,n1=KS,r1=GS,s1=ZS;const Lj=jj,Fj=Aj,Uj=h.forwardRef(({className:e,inset:t,children:n,...r},s)=>u.jsxs(r1,{ref:s,className:pe("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,u.jsx(lP,{className:"ml-auto h-4 w-4"})]}));Uj.displayName=r1.displayName;const Vj=h.forwardRef(({className:e,...t},n)=>u.jsx(s1,{ref:n,className:pe("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}));Vj.displayName=s1.displayName;const o1=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(Ij,{children:u.jsx(qS,{ref:r,sideOffset:t,className:pe("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})}));o1.displayName=qS.displayName;const i1=h.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(XS,{ref:r,className:pe("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}));i1.displayName=XS.displayName;const $j=h.forwardRef(({className:e,children:t,checked:n,...r},s)=>u.jsxs(JS,{ref:s,className:pe("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:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(t1,{children:u.jsx(g_,{className:"h-4 w-4"})})}),t]}));$j.displayName=JS.displayName;const zj=h.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(e1,{ref:r,className:pe("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:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(t1,{children:u.jsx(dP,{className:"h-2 w-2 fill-current"})})}),t]}));zj.displayName=e1.displayName;const a1=h.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(QS,{ref:r,className:pe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));a1.displayName=QS.displayName;const l1=h.forwardRef(({className:e,...t},n)=>u.jsx(n1,{ref:n,className:pe("-mx-1 my-1 h-px bg-muted",e),...t}));l1.displayName=n1.displayName;var dg="Dialog",[c1,HV]=Pr(dg),[Wj,dr]=c1(dg),u1=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=h.useRef(null),l=h.useRef(null),[c=!1,d]=Ys({prop:r,defaultProp:s,onChange:o});return u.jsx(Wj,{scope:t,triggerRef:a,contentRef:l,contentId:Cr(),titleId:Cr(),descriptionId:Cr(),open:c,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};u1.displayName=dg;var d1="DialogTrigger",f1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=dr(d1,n),o=ze(t,s.triggerRef);return u.jsx(_e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":pg(s.open),...r,ref:o,onClick:te(e.onClick,s.onOpenToggle)})});f1.displayName=d1;var fg="DialogPortal",[Yj,h1]=c1(fg,{forceMount:void 0}),p1=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=dr(fg,t);return u.jsx(Yj,{scope:t,forceMount:n,children:h.Children.map(r,i=>u.jsx(Mr,{present:n||o.open,children:u.jsx(zl,{asChild:!0,container:s,children:i})}))})};p1.displayName=fg;var Vu="DialogOverlay",m1=h.forwardRef((e,t)=>{const n=h1(Vu,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=dr(Vu,e.__scopeDialog);return o.modal?u.jsx(Mr,{present:r||o.open,children:u.jsx(Bj,{...s,ref:t})}):null});m1.displayName=Vu;var Bj=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=dr(Vu,n);return u.jsx(Od,{as:ts,allowPinchZoom:!0,shards:[s.contentRef],children:u.jsx(_e.div,{"data-state":pg(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Mo="DialogContent",g1=h.forwardRef((e,t)=>{const n=h1(Mo,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=dr(Mo,e.__scopeDialog);return u.jsx(Mr,{present:r||o.open,children:o.modal?u.jsx(Hj,{...s,ref:t}):u.jsx(Kj,{...s,ref:t})})});g1.displayName=Mo;var Hj=h.forwardRef((e,t)=>{const n=dr(Mo,e.__scopeDialog),r=h.useRef(null),s=ze(t,n.contentRef,r);return h.useEffect(()=>{const o=r.current;if(o)return ng(o)},[]),u.jsx(v1,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:te(e.onFocusOutside,o=>o.preventDefault())})}),Kj=h.forwardRef((e,t)=>{const n=dr(Mo,e.__scopeDialog),r=h.useRef(!1),s=h.useRef(!1);return u.jsx(v1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),v1=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=dr(Mo,n),l=h.useRef(null),c=ze(t,l);return Wm(),u.jsxs(u.Fragment,{children:[u.jsx(Td,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:u.jsx(Ki,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":pg(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(Gj,{titleId:a.titleId}),u.jsx(qj,{contentRef:l,descriptionId:a.descriptionId})]})]})}),hg="DialogTitle",y1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=dr(hg,n);return u.jsx(_e.h2,{id:s.titleId,...r,ref:t})});y1.displayName=hg;var x1="DialogDescription",w1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=dr(x1,n);return u.jsx(_e.p,{id:s.descriptionId,...r,ref:t})});w1.displayName=x1;var _1="DialogClose",S1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=dr(_1,n);return u.jsx(_e.button,{type:"button",...r,ref:t,onClick:te(e.onClick,()=>s.onOpenChange(!1))})});S1.displayName=_1;function pg(e){return e?"open":"closed"}var b1="DialogTitleWarning",[KV,C1]=eM(b1,{contentName:Mo,titleName:hg,docsSlug:"dialog"}),Gj=({titleId:e})=>{const t=C1(b1),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},Zj="DialogDescriptionWarning",qj=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${C1(Zj).contentName}}.`;return h.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},k1=u1,E1=f1,T1=p1,Ad=m1,Id=g1,Ld=y1,Fd=w1,N1=S1;const R1=k1,P1=E1,Qj=T1,M1=h.forwardRef(({className:e,...t},n)=>u.jsx(Ad,{className:pe("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}));M1.displayName=Ad.displayName;const Xj=Vl("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"}}),mg=h.forwardRef(({side:e="right",className:t,children:n,...r},s)=>u.jsxs(Qj,{children:[u.jsx(M1,{}),u.jsxs(Id,{ref:s,className:pe(Xj({side:e}),t),...r,children:[n,u.jsxs(N1,{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:[u.jsx(Um,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));mg.displayName=Id.displayName;const O1=({className:e,...t})=>u.jsx("div",{className:pe("flex flex-col space-y-2 text-center sm:text-left",e),...t});O1.displayName="SheetHeader";const D1=h.forwardRef(({className:e,...t},n)=>u.jsx(Ld,{ref:n,className:pe("text-lg font-semibold text-foreground",e),...t}));D1.displayName=Ld.displayName;const Jj=h.forwardRef(({className:e,...t},n)=>u.jsx(Fd,{ref:n,className:pe("text-sm text-muted-foreground",e),...t}));Jj.displayName=Fd.displayName;class Pn extends Error{constructor(t){var n,r,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Pn.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 Pn||(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.":(o=(s=(r=this.originalError)==null?void 0:r.cause)==null?void 0:s.message)!=null&&o.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 Pc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function eA(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||tA;let s=0;for(;s<e.length;){const o=e.indexOf("=",s);if(o===-1)break;let i=e.indexOf(";",s);if(i===-1)i=e.length;else if(i<o){s=e.lastIndexOf(";",o-1)+1;continue}const a=e.slice(s,o).trim();if(n[a]===void 0){let l=e.slice(o+1,i).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1));try{n[a]=r(l)}catch{n[a]=l}}s=i+1}return n}function dx(e,t,n){const r=Object.assign({},n||{}),s=r.encode||nA;if(!Pc.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!Pc.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;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(!Pc.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!Pc.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 tA(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function nA(e){return encodeURIComponent(e)}const rA=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let j1;function Ci(e){if(e)try{const t=decodeURIComponent(j1(e.split(".")[1]).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function A1(e,t=0){let n=Ci(e);return!(Object.keys(n).length>0&&(!n.exp||n.exp-t>Date.now()/1e3))}j1=typeof atob!="function"||rA?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,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)?i+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i}:atob;const fx="pb_auth";class sA{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!A1(this.token)}get isAdmin(){return Ci(this.token).type==="admin"}get isAuthRecord(){return Ci(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=fx){const r=eA(t||"")[n]||"";let s={};try{s=JSON.parse(r),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,n=fx){var l,c;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=Ci(this.token);r.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},r,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=dx(n,JSON.stringify(o),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&a>4096){o.model={id:(l=o==null?void 0:o.model)==null?void 0:l.id,email:(c=o==null?void 0:o.model)==null?void 0:c.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=dx(n,JSON.stringify(o),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 oA extends sA{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 Uo{constructor(t){this.client=t}}class iA extends Uo{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,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:n,keyId:r,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class gg extends Uo{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(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}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 s;if(!((s=r==null?void 0:r.items)!=null&&s.length))throw new Pn({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 Pn({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(s=>this.decode(s))}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=[],s=async o=>this.getList(o,t||500,n).then(i=>{const a=i.items;return r=r.concat(a),a.length==i.perPage?s(o+1):r});return s(1)}}function Sn(e,t,n,r){const s=r!==void 0;return s||n!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,n),t.query=Object.assign({},t.query,r),t):Object.assign(t,n):t}function nh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class aA extends gg{get baseCrudPath(){return"/api/admins"}async update(t,n,r){return super.update(t,n,r).then(s=>{var o,i;return((o=this.client.authStore.model)==null?void 0:o.id)===s.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o;return r&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((o=this.client.authStore.model)==null?void 0:o.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,s){let o={method:"POST",body:{identity:t,password:n}};o=Sn("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,r,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||nh(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(c,d,f,p){nh(c);const y=c.beforeSend,x=c.authStore.model,v=c.authStore.onChange((_,g)=>{(!_||(g==null?void 0:g.id)!=(x==null?void 0:x.id)||(g!=null&&g.collectionId||x!=null&&x.collectionId)&&(g==null?void 0:g.collectionId)!=(x==null?void 0:x.collectionId))&&nh(c)});c._resetAutoRefresh=function(){v(),c.beforeSend=y,delete c._resetAutoRefresh},c.beforeSend=async(_,g)=>{var C;const m=c.authStore.token;if((C=g.query)!=null&&C.autoRefresh)return y?y(_,g):{url:_,sendOptions:g};let w=c.authStore.isValid;if(w&&A1(c.authStore.token,d))try{await f()}catch{w=!1}w||await p();const b=g.headers||{};for(let S in b)if(S.toLowerCase()=="authorization"&&m==b[S]&&c.authStore.token){b[S]=c.authStore.token;break}return g.headers=b,y?y(_,g):{url:_,sendOptions:g}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,n){let r={method:"POST"};return r=Sn("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 s={method:"POST",body:{email:t}};return s=Sn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Sn("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const lA=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function I1(e){if(e){e.query=e.query||{};for(let t in e)lA.includes(t)||(e.query[t]=e[t],delete e[t])}}class L1 extends Uo{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 s=t;if(r){I1(r);const a="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const l=a;let c;try{c=JSON.parse(l==null?void 0:l.data)}catch{}n(c||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var r;let n=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(r=this.eventSource)==null||r.removeEventListener(o,i);delete this.subscriptions[o],n||(n=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var r;let n=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){n=!0;for(let o of this.subscriptions[s])(r=this.eventSource)==null||r.removeEventListener(s,o);delete this.subscriptions[s]}n&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,n){var o;let r=!1;const s=this.getSubscriptionsByTopic(t);for(let i in s){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),(o=this.eventSource)==null||o.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 s in this.subscriptions)if((r=this.subscriptions[s])!=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 s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const r=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in r)for(let o of r[s])o(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 Pn(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 cA extends gg{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(s=>{var o,i,a;return((o=this.client.authStore.model)==null?void 0:o.id)!==(s==null?void 0:s.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,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o,i;return!r||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((o=this.client.authStore.model)==null?void 0:o.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,s){let o={method:"POST",body:{identity:t,password:n}};return o=Sn("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,n,r,s,o,i,a){let l={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:s,createData:o}};return l=Sn("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(c=>this.authResponse(c))}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=hx(void 0));const s=new L1(this.client);function o(){r==null||r.close(),s.unsubscribe()}const i={},a=n.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(l=>{var p;const c=l.authProviders.find(y=>y.name===n.provider);if(!c)throw new Pn(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=()=>{o()}),new Promise(async(y,x)=>{var v;try{await s.subscribe("@oauth2",async w=>{var C;const b=s.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 S=Object.assign({},n);delete S.provider,delete S.scopes,delete S.createData,delete S.urlCallback,(C=f==null?void 0:f.signal)!=null&&C.onabort&&(f.signal.onabort=null);const N=await this.authWithOAuth2Code(c.name,w.code,c.codeVerifier,d,n.createData,S);y(N)}catch(S){x(new Pn(S))}o()});const _={state:s.clientId};(v=n.scopes)!=null&&v.length&&(_.scope=n.scopes.join(" "));const g=this._replaceQueryParams(c.authUrl+d,_);await(n.urlCallback||function(w){r?r.location.href=w:r=hx(w)})(g)}catch(_){o(),x(new Pn(_))}})}).catch(l=>{throw o(),l})}async authRefresh(t,n){let r={method:"POST"};return r=Sn("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(s=>this.authResponse(s))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Sn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Sn("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,n,r){let s={method:"POST",body:{email:t}};return s=Sn("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,n,r){let s={method:"POST",body:{token:t}};return s=Sn("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=Ci(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===o.id&&i.collectionId===o.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,n,r){let s={method:"POST",body:{newEmail:t}};return s=Sn("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,n,r,s){let o={method:"POST",body:{token:t,password:n}};return o=Sn("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=Ci(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,s="";t.indexOf("?")>=0&&(r=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const o={},i=s.split("&");for(const a of i){if(a=="")continue;const l=a.split("=");o[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let a in n)n.hasOwnProperty(a)&&(n[a]==null?delete o[a]:o[a]=n[a]);s="";for(let a in o)o.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(o[a].replace(/%20/g,"+")));return s!=""?r+"?"+s:r}}function hx(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Pn(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,n=768,r=window.innerWidth,s=window.innerHeight;t=t>r?r:t,n=n>s?s:n;let o=r/2-t/2,i=s/2-n/2;return window.open(e,"popup_window","width="+t+",height="+n+",top="+i+",left="+o+",resizable,menubar=no")}class uA extends gg{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 dA extends Uo{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 Pn({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 fA extends Uo{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class hA extends Uo{getUrl(t,n,r={}){if(!n||!(t!=null&&t.id)||!(t!=null&&t.collectionId)&&!(t!=null&&t.collectionName))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(t.collectionId||t.collectionName)),s.push(encodeURIComponent(t.id)),s.push(encodeURIComponent(n));let o=this.client.buildUrl(s.join("/"));if(Object.keys(r).length){r.download===!1&&delete r.download;const i=new URLSearchParams(r);o+=(o.includes("?")?"&":"?")+i}return o}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 pA extends Uo{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 mA{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new oA,this.admins=new aA(this),this.collections=new uA(this),this.files=new hA(this),this.logs=new dA(this),this.settings=new iA(this),this.realtime=new L1(this),this.health=new fA(this),this.backups=new pA(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new cA(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 s=n[r];switch(typeof s){case"boolean":case"number":s=""+s;break;case"string":s="'"+s.replace(/'/g,"\\'")+"'";break;default:s=s===null?"null":s instanceof Date?"'"+s.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(s).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+r+"}",s)}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 s=Object.assign({},await this.beforeSend(r,n));s.url!==void 0||s.options!==void 0?(r=s.url||r,n=s.options||n):Object.keys(s).length&&(n=s,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 s=this.serializeQueryParams(n.query);s&&(r+=(r.includes("?")?"&":"?")+s),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 s=>{let o={};try{o=await s.json()}catch{}if(this.afterSend&&(o=await this.afterSend(s,o)),s.status>=400)throw new Pn({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Pn(s)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),I1(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 s=new AbortController;this.cancelControllers[r]=s,n.signal=s.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 s=t[r];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)n.append(r,i)}else{let o={};o[r]=s,n.append("@jsonPayload",JSON.stringify(o))}}return n}hasBlobField(t){for(const n in t){const r=Array.isArray(t[n])?t[n]:[t[n]];for(const s of r)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s 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 s=t[r],o=encodeURIComponent(r);if(Array.isArray(s))for(const i of s)n.push(o+"="+encodeURIComponent(i));else s instanceof Date?n.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?n.push(o+"="+encodeURIComponent(JSON.stringify(s))):n.push(o+"="+encodeURIComponent(s))}return n.join("&")}}let Mc;const Zt=()=>Mc||(Mc=new mA("http://127.0.0.1:8090"),Mc);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var F1;function ee(){return F1.apply(null,arguments)}function gA(e){F1=e}function lr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function _o(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function $e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function vg(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if($e(e,t))return!1;return!0}function hn(e){return e===void 0}function ss(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Bl(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function U1(e,t){var n=[],r,s=e.length;for(r=0;r<s;++r)n.push(t(e[r],r));return n}function Ps(e,t){for(var n in t)$e(t,n)&&(e[n]=t[n]);return $e(t,"toString")&&(e.toString=t.toString),$e(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Or(e,t,n,r){return lb(e,t,n,r,!0).utc()}function vA(){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 ke(e){return e._pf==null&&(e._pf=vA()),e._pf}var xp;Array.prototype.some?xp=Array.prototype.some:xp=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 yg(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=ke(e),n=xp.call(t.parsedDateParts,function(s){return s!=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 Ud(e){var t=Or(NaN);return e!=null?Ps(ke(t),e):ke(t).userInvalidated=!0,t}var px=ee.momentProperties=[],rh=!1;function xg(e,t){var n,r,s,o=px.length;if(hn(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),hn(t._i)||(e._i=t._i),hn(t._f)||(e._f=t._f),hn(t._l)||(e._l=t._l),hn(t._strict)||(e._strict=t._strict),hn(t._tzm)||(e._tzm=t._tzm),hn(t._isUTC)||(e._isUTC=t._isUTC),hn(t._offset)||(e._offset=t._offset),hn(t._pf)||(e._pf=ke(t)),hn(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)r=px[n],s=t[r],hn(s)||(e[r]=s);return e}function Hl(e){xg(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),rh===!1&&(rh=!0,ee.updateOffset(this),rh=!1)}function cr(e){return e instanceof Hl||e!=null&&e._isAMomentObject!=null}function V1(e){ee.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Yn(e,t){var n=!0;return Ps(function(){if(ee.deprecationHandler!=null&&ee.deprecationHandler(null,e),n){var r=[],s,o,i,a=arguments.length;for(o=0;o<a;o++){if(s="",typeof arguments[o]=="object"){s+=`
[`+o+"] ";for(i in arguments[0])$e(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}V1(e+`
Arguments: `+Array.prototype.slice.call(r).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var mx={};function $1(e,t){ee.deprecationHandler!=null&&ee.deprecationHandler(e,t),mx[e]||(V1(t),mx[e]=!0)}ee.suppressDeprecationWarnings=!1;ee.deprecationHandler=null;function Dr(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function yA(e){var t,n;for(n in e)$e(e,n)&&(t=e[n],Dr(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 wp(e,t){var n=Ps({},e),r;for(r in t)$e(t,r)&&(_o(e[r])&&_o(t[r])?(n[r]={},Ps(n[r],e[r]),Ps(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)$e(e,r)&&!$e(t,r)&&_o(e[r])&&(n[r]=Ps({},n[r]));return n}function wg(e){e!=null&&this.set(e)}var _p;Object.keys?_p=Object.keys:_p=function(e){var t,n=[];for(t in e)$e(e,t)&&n.push(t);return n};var xA={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function wA(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Dr(r)?r.call(t,n):r}function Tr(e,t,n){var r=""+Math.abs(e),s=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).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,Oc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,sh={},ki={};function fe(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(ki[e]=s),t&&(ki[t[0]]=function(){return Tr(s.apply(this,arguments),t[1],t[2])}),n&&(ki[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function _A(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function SA(e){var t=e.match(_g),n,r;for(n=0,r=t.length;n<r;n++)ki[t[n]]?t[n]=ki[t[n]]:t[n]=_A(t[n]);return function(s){var o="",i;for(i=0;i<r;i++)o+=Dr(t[i])?t[i].call(s,e):t[i];return o}}function Xc(e,t){return e.isValid()?(t=z1(t,e.localeData()),sh[t]=sh[t]||SA(t),sh[t](e)):e.localeData().invalidDate()}function z1(e,t){var n=5;function r(s){return t.longDateFormat(s)||s}for(Oc.lastIndex=0;n>=0&&Oc.test(e);)e=e.replace(Oc,r),Oc.lastIndex=0,n-=1;return e}var bA={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 CA(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 kA="Invalid date";function EA(){return this._invalidDate}var TA="%d",NA=/\d{1,2}/;function RA(e){return this._ordinal.replace("%d",e)}var PA={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 MA(e,t,n,r){var s=this._relativeTime[n];return Dr(s)?s(e,t,n,r):s.replace(/%d/i,e)}function OA(e,t){var n=this._relativeTime[e>0?"future":"past"];return Dr(n)?n(t):n.replace(/%s/i,t)}var gx={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 Bn(e){return typeof e=="string"?gx[e]||gx[e.toLowerCase()]:void 0}function Sg(e){var t={},n,r;for(r in e)$e(e,r)&&(n=Bn(r),n&&(t[n]=e[r]));return t}var DA={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 jA(e){var t=[],n;for(n in e)$e(e,n)&&t.push({unit:n,priority:DA[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var W1=/\d/,An=/\d\d/,Y1=/\d{3}/,bg=/\d{4}/,Vd=/[+-]?\d{6}/,ot=/\d\d?/,B1=/\d\d\d\d?/,H1=/\d\d\d\d\d\d?/,$d=/\d{1,3}/,Cg=/\d{1,4}/,zd=/[+-]?\d{1,6}/,Qi=/\d+/,Wd=/[+-]?\d+/,AA=/Z|[+-]\d\d:?\d\d/gi,Yd=/Z|[+-]\d\d(?::?\d\d)?/gi,IA=/[+-]?\d+(\.\d{1,3})?/,Kl=/[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,Xi=/^[1-9]\d?/,kg=/^([1-9]\d|\d)/,$u;$u={};function oe(e,t,n){$u[e]=Dr(t)?t:function(r,s){return r&&n?n:t}}function LA(e,t){return $e($u,e)?$u[e](t._strict,t._locale):new RegExp(FA(e))}function FA(e){return Zr(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function Zr(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Fn(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function je(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Fn(t)),n}var Sp={};function qe(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),ss(t)&&(r=function(o,i){i[t]=je(o)}),s=e.length,n=0;n<s;n++)Sp[e[n]]=r}function Gl(e,t){qe(e,function(n,r,s,o){s._w=s._w||{},t(n,s._w,s,o)})}function UA(e,t,n){t!=null&&$e(Sp,e)&&Sp[e](t,n._a,n,e)}function Bd(e){return e%4===0&&e%100!==0||e%400===0}var qt=0,Br=1,yr=2,Rt=3,er=4,Hr=5,vo=6,VA=7,$A=8;fe("Y",0,0,function(){var e=this.year();return e<=9999?Tr(e,4):"+"+e});fe(0,["YY",2],0,function(){return this.year()%100});fe(0,["YYYY",4],0,"year");fe(0,["YYYYY",5],0,"year");fe(0,["YYYYYY",6,!0],0,"year");oe("Y",Wd);oe("YY",ot,An);oe("YYYY",Cg,bg);oe("YYYYY",zd,Vd);oe("YYYYYY",zd,Vd);qe(["YYYYY","YYYYYY"],qt);qe("YYYY",function(e,t){t[qt]=e.length===2?ee.parseTwoDigitYear(e):je(e)});qe("YY",function(e,t){t[qt]=ee.parseTwoDigitYear(e)});qe("Y",function(e,t){t[qt]=parseInt(e,10)});function La(e){return Bd(e)?366:365}ee.parseTwoDigitYear=function(e){return je(e)+(je(e)>68?1900:2e3)};var K1=Ji("FullYear",!0);function zA(){return Bd(this.year())}function Ji(e,t){return function(n){return n!=null?(G1(this,e,n),ee.updateOffset(this,t),this):gl(this,e)}}function gl(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 G1(e,t,n){var r,s,o,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!Bd(o)?28:a,s?r.setUTCFullYear(o,i,a):r.setFullYear(o,i,a)}}function WA(e){return e=Bn(e),Dr(this[e])?this[e]():this}function YA(e,t){if(typeof e=="object"){e=Sg(e);var n=jA(e),r,s=n.length;for(r=0;r<s;r++)this[n[r].unit](e[n[r].unit])}else if(e=Bn(e),Dr(this[e]))return this[e](t);return this}function BA(e,t){return(e%t+t)%t}var _t;Array.prototype.indexOf?_t=Array.prototype.indexOf:_t=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Eg(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=BA(t,12);return e+=(t-n)/12,n===1?Bd(e)?29:28:31-n%7%2}fe("M",["MM",2],"Mo",function(){return this.month()+1});fe("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});fe("MMMM",0,0,function(e){return this.localeData().months(this,e)});oe("M",ot,Xi);oe("MM",ot,An);oe("MMM",function(e,t){return t.monthsShortRegex(e)});oe("MMMM",function(e,t){return t.monthsRegex(e)});qe(["M","MM"],function(e,t){t[Br]=je(e)-1});qe(["MMM","MMMM"],function(e,t,n,r){var s=n._locale.monthsParse(e,r,n._strict);s!=null?t[Br]=s:ke(n).invalidMonth=e});var HA="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Z1="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),q1=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,KA=Kl,GA=Kl;function ZA(e,t){return e?lr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||q1).test(t)?"format":"standalone"][e.month()]:lr(this._months)?this._months:this._months.standalone}function qA(e,t){return e?lr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[q1.test(t)?"format":"standalone"][e.month()]:lr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function QA(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=Or([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?t==="MMM"?(s=_t.call(this._shortMonthsParse,i),s!==-1?s:null):(s=_t.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=_t.call(this._shortMonthsParse,i),s!==-1?s:(s=_t.call(this._longMonthsParse,i),s!==-1?s:null)):(s=_t.call(this._longMonthsParse,i),s!==-1?s:(s=_t.call(this._shortMonthsParse,i),s!==-1?s:null))}function XA(e,t,n){var r,s,o;if(this._monthsParseExact)return QA.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=Or([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[r]=new RegExp(o.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 Q1(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=je(t);else if(t=e.localeData().monthsParse(t),!ss(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,Eg(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function X1(e){return e!=null?(Q1(this,e),ee.updateOffset(this,!0),this):gl(this,"Month")}function JA(){return Eg(this.year(),this.month())}function eI(e){return this._monthsParseExact?($e(this,"_monthsRegex")||J1.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):($e(this,"_monthsShortRegex")||(this._monthsShortRegex=KA),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function tI(e){return this._monthsParseExact?($e(this,"_monthsRegex")||J1.call(this),e?this._monthsStrictRegex:this._monthsRegex):($e(this,"_monthsRegex")||(this._monthsRegex=GA),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function J1(){function e(l,c){return c.length-l.length}var t=[],n=[],r=[],s,o,i,a;for(s=0;s<12;s++)o=Or([2e3,s]),i=Zr(this.monthsShort(o,"")),a=Zr(this.months(o,"")),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 nI(e,t,n,r,s,o,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,o,i),a}function vl(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 zu(e,t,n){var r=7+t-n,s=(7+vl(e,0,r).getUTCDay()-t)%7;return-s+r-1}function eb(e,t,n,r,s){var o=(7+n-r)%7,i=zu(e,r,s),a=1+7*(t-1)+o+i,l,c;return a<=0?(l=e-1,c=La(l)+a):a>La(e)?(l=e+1,c=a-La(e)):(l=e,c=a),{year:l,dayOfYear:c}}function yl(e,t,n){var r=zu(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+qr(i,t,n)):s>qr(e.year(),t,n)?(o=s-qr(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function qr(e,t,n){var r=zu(e,t,n),s=zu(e+1,t,n);return(La(e)-r+s)/7}fe("w",["ww",2],"wo","week");fe("W",["WW",2],"Wo","isoWeek");oe("w",ot,Xi);oe("ww",ot,An);oe("W",ot,Xi);oe("WW",ot,An);Gl(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=je(e)});function rI(e){return yl(e,this._week.dow,this._week.doy).week}var sI={dow:0,doy:6};function oI(){return this._week.dow}function iI(){return this._week.doy}function aI(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function lI(e){var t=yl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}fe("d",0,"do","day");fe("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});fe("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});fe("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});fe("e",0,0,"weekday");fe("E",0,0,"isoWeekday");oe("d",ot);oe("e",ot);oe("E",ot);oe("dd",function(e,t){return t.weekdaysMinRegex(e)});oe("ddd",function(e,t){return t.weekdaysShortRegex(e)});oe("dddd",function(e,t){return t.weekdaysRegex(e)});Gl(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:ke(n).invalidWeekday=e});Gl(["d","e","E"],function(e,t,n,r){t[r]=je(e)});function cI(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function uI(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Tg(e,t){return e.slice(t,7).concat(e.slice(0,t))}var dI="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),tb="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),fI="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),hI=Kl,pI=Kl,mI=Kl;function gI(e,t){var n=lr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Tg(n,this._week.dow):e?n[e.day()]:n}function vI(e){return e===!0?Tg(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function yI(e){return e===!0?Tg(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function xI(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Or([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(s=_t.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=_t.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=_t.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=_t.call(this._weekdaysParse,i),s!==-1||(s=_t.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=_t.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=_t.call(this._shortWeekdaysParse,i),s!==-1||(s=_t.call(this._weekdaysParse,i),s!==-1)?s:(s=_t.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=_t.call(this._minWeekdaysParse,i),s!==-1||(s=_t.call(this._weekdaysParse,i),s!==-1)?s:(s=_t.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function wI(e,t,n){var r,s,o;if(this._weekdaysParseExact)return xI.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=Or([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.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 _I(e){if(!this.isValid())return e!=null?this:NaN;var t=gl(this,"Day");return e!=null?(e=cI(e,this.localeData()),this.add(e-t,"d")):t}function SI(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 bI(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=uI(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function CI(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Ng.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):($e(this,"_weekdaysRegex")||(this._weekdaysRegex=hI),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function kI(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Ng.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):($e(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=pI),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function EI(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Ng.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):($e(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=mI),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ng(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,a,l,c;for(o=0;o<7;o++)i=Or([2e3,1]).day(o),a=Zr(this.weekdaysMin(i,"")),l=Zr(this.weekdaysShort(i,"")),c=Zr(this.weekdays(i,"")),t.push(a),n.push(l),r.push(c),s.push(a),s.push(l),s.push(c);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.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 Rg(){return this.hours()%12||12}function TI(){return this.hours()||24}fe("H",["HH",2],0,"hour");fe("h",["hh",2],0,Rg);fe("k",["kk",2],0,TI);fe("hmm",0,0,function(){return""+Rg.apply(this)+Tr(this.minutes(),2)});fe("hmmss",0,0,function(){return""+Rg.apply(this)+Tr(this.minutes(),2)+Tr(this.seconds(),2)});fe("Hmm",0,0,function(){return""+this.hours()+Tr(this.minutes(),2)});fe("Hmmss",0,0,function(){return""+this.hours()+Tr(this.minutes(),2)+Tr(this.seconds(),2)});function nb(e,t){fe(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}nb("a",!0);nb("A",!1);function rb(e,t){return t._meridiemParse}oe("a",rb);oe("A",rb);oe("H",ot,kg);oe("h",ot,Xi);oe("k",ot,Xi);oe("HH",ot,An);oe("hh",ot,An);oe("kk",ot,An);oe("hmm",B1);oe("hmmss",H1);oe("Hmm",B1);oe("Hmmss",H1);qe(["H","HH"],Rt);qe(["k","kk"],function(e,t,n){var r=je(e);t[Rt]=r===24?0:r});qe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});qe(["h","hh"],function(e,t,n){t[Rt]=je(e),ke(n).bigHour=!0});qe("hmm",function(e,t,n){var r=e.length-2;t[Rt]=je(e.substr(0,r)),t[er]=je(e.substr(r)),ke(n).bigHour=!0});qe("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Rt]=je(e.substr(0,r)),t[er]=je(e.substr(r,2)),t[Hr]=je(e.substr(s)),ke(n).bigHour=!0});qe("Hmm",function(e,t,n){var r=e.length-2;t[Rt]=je(e.substr(0,r)),t[er]=je(e.substr(r))});qe("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Rt]=je(e.substr(0,r)),t[er]=je(e.substr(r,2)),t[Hr]=je(e.substr(s))});function NI(e){return(e+"").toLowerCase().charAt(0)==="p"}var RI=/[ap]\.?m?\.?/i,PI=Ji("Hours",!0);function MI(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var sb={calendar:xA,longDateFormat:bA,invalidDate:kA,ordinal:TA,dayOfMonthOrdinalParse:NA,relativeTime:PA,months:HA,monthsShort:Z1,week:sI,weekdays:dI,weekdaysMin:fI,weekdaysShort:tb,meridiemParse:RI},at={},ga={},xl;function OI(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 vx(e){return e&&e.toLowerCase().replace("_","-")}function DI(e){for(var t=0,n,r,s,o;t<e.length;){for(o=vx(e[t]).split("-"),n=o.length,r=vx(e[t+1]),r=r?r.split("-"):null;n>0;){if(s=Hd(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&OI(o,r)>=n-1)break;n--}t++}return xl}function jI(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Hd(e){var t=null,n;if(at[e]===void 0&&typeof au<"u"&&au&&au.exports&&jI(e))try{t=xl._abbr,n=require,n("./locale/"+e),$s(t)}catch{at[e]=null}return at[e]}function $s(e,t){var n;return e&&(hn(t)?n=ds(e):n=Pg(e,t),n?xl=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),xl._abbr}function Pg(e,t){if(t!==null){var n,r=sb;if(t.abbr=e,at[e]!=null)$1("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=at[e]._config;else if(t.parentLocale!=null)if(at[t.parentLocale]!=null)r=at[t.parentLocale]._config;else if(n=Hd(t.parentLocale),n!=null)r=n._config;else return ga[t.parentLocale]||(ga[t.parentLocale]=[]),ga[t.parentLocale].push({name:e,config:t}),null;return at[e]=new wg(wp(r,t)),ga[e]&&ga[e].forEach(function(s){Pg(s.name,s.config)}),$s(e),at[e]}else return delete at[e],null}function AI(e,t){if(t!=null){var n,r,s=sb;at[e]!=null&&at[e].parentLocale!=null?at[e].set(wp(at[e]._config,t)):(r=Hd(e),r!=null&&(s=r._config),t=wp(s,t),r==null&&(t.abbr=e),n=new wg(t),n.parentLocale=at[e],at[e]=n),$s(e)}else at[e]!=null&&(at[e].parentLocale!=null?(at[e]=at[e].parentLocale,e===$s()&&$s(e)):at[e]!=null&&delete at[e]);return at[e]}function ds(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return xl;if(!lr(e)){if(t=Hd(e),t)return t;e=[e]}return DI(e)}function II(){return _p(at)}function Mg(e){var t,n=e._a;return n&&ke(e).overflow===-2&&(t=n[Br]<0||n[Br]>11?Br:n[yr]<1||n[yr]>Eg(n[qt],n[Br])?yr:n[Rt]<0||n[Rt]>24||n[Rt]===24&&(n[er]!==0||n[Hr]!==0||n[vo]!==0)?Rt:n[er]<0||n[er]>59?er:n[Hr]<0||n[Hr]>59?Hr:n[vo]<0||n[vo]>999?vo:-1,ke(e)._overflowDayOfYear&&(t<qt||t>yr)&&(t=yr),ke(e)._overflowWeeks&&t===-1&&(t=VA),ke(e)._overflowWeekday&&t===-1&&(t=$A),ke(e).overflow=t),e}var LI=/^\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)?)?$/,FI=/^\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)?)?$/,UI=/Z|[+-]\d\d(?::?\d\d)?/,Dc=[["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]],oh=[["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/]],VI=/^\/?Date\((-?\d+)/i,$I=/^(?:(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}))$/,zI={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 ob(e){var t,n,r=e._i,s=LI.exec(r)||FI.exec(r),o,i,a,l,c=Dc.length,d=oh.length;if(s){for(ke(e).iso=!0,t=0,n=c;t<n;t++)if(Dc[t][1].exec(s[1])){i=Dc[t][0],o=Dc[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,n=d;t<n;t++)if(oh[t][1].exec(s[3])){a=(s[2]||" ")+oh[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(s[4])if(UI.exec(s[4]))l="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(l||""),Dg(e)}else e._isValid=!1}function WI(e,t,n,r,s,o){var i=[YI(e),Z1.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function YI(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function BI(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function HI(e,t,n){if(e){var r=tb.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(r!==s)return ke(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function KI(e,t,n){if(e)return zI[e];if(t)return 0;var r=parseInt(n,10),s=r%100,o=(r-s)/100;return o*60+s}function ib(e){var t=$I.exec(BI(e._i)),n;if(t){if(n=WI(t[4],t[3],t[2],t[5],t[6],t[7]),!HI(t[1],n,e))return;e._a=n,e._tzm=KI(t[8],t[9],t[10]),e._d=vl.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ke(e).rfc2822=!0}else e._isValid=!1}function GI(e){var t=VI.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(ob(e),e._isValid===!1)delete e._isValid;else return;if(ib(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ee.createFromInputFallback(e)}ee.createFromInputFallback=Yn("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 Xo(e,t,n){return e??t??n}function ZI(e){var t=new Date(ee.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Og(e){var t,n,r=[],s,o,i;if(!e._d){for(s=ZI(e),e._w&&e._a[yr]==null&&e._a[Br]==null&&qI(e),e._dayOfYear!=null&&(i=Xo(e._a[qt],s[qt]),(e._dayOfYear>La(i)||e._dayOfYear===0)&&(ke(e)._overflowDayOfYear=!0),n=vl(i,0,e._dayOfYear),e._a[Br]=n.getUTCMonth(),e._a[yr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Rt]===24&&e._a[er]===0&&e._a[Hr]===0&&e._a[vo]===0&&(e._nextDay=!0,e._a[Rt]=0),e._d=(e._useUTC?vl:nI).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Rt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(ke(e).weekdayMismatch=!0)}}function qI(e){var t,n,r,s,o,i,a,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=Xo(t.GG,e._a[qt],yl(st(),1,4).year),r=Xo(t.W,1),s=Xo(t.E,1),(s<1||s>7)&&(l=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,c=yl(st(),o,i),n=Xo(t.gg,e._a[qt],c.year),r=Xo(t.w,c.week),t.d!=null?(s=t.d,(s<0||s>6)&&(l=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(l=!0)):s=o),r<1||r>qr(n,o,i)?ke(e)._overflowWeeks=!0:l!=null?ke(e)._overflowWeekday=!0:(a=eb(n,r,s,o,i),e._a[qt]=a.year,e._dayOfYear=a.dayOfYear)}ee.ISO_8601=function(){};ee.RFC_2822=function(){};function Dg(e){if(e._f===ee.ISO_8601){ob(e);return}if(e._f===ee.RFC_2822){ib(e);return}e._a=[],ke(e).empty=!0;var t=""+e._i,n,r,s,o,i,a=t.length,l=0,c,d;for(s=z1(e._f,e._locale).match(_g)||[],d=s.length,n=0;n<d;n++)o=s[n],r=(t.match(LA(o,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&ke(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),l+=r.length),ki[o]?(r?ke(e).empty=!1:ke(e).unusedTokens.push(o),UA(o,r,e)):e._strict&&!r&&ke(e).unusedTokens.push(o);ke(e).charsLeftOver=a-l,t.length>0&&ke(e).unusedInput.push(t),e._a[Rt]<=12&&ke(e).bigHour===!0&&e._a[Rt]>0&&(ke(e).bigHour=void 0),ke(e).parsedDateParts=e._a.slice(0),ke(e).meridiem=e._meridiem,e._a[Rt]=QI(e._locale,e._a[Rt],e._meridiem),c=ke(e).era,c!==null&&(e._a[qt]=e._locale.erasConvertYear(c,e._a[qt])),Og(e),Mg(e)}function QI(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 XI(e){var t,n,r,s,o,i,a=!1,l=e._f.length;if(l===0){ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<l;s++)o=0,i=!1,t=xg({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],Dg(t),yg(t)&&(i=!0),o+=ke(t).charsLeftOver,o+=ke(t).unusedTokens.length*10,ke(t).score=o,a?o<r&&(r=o,n=t):(r==null||o<r||i)&&(r=o,n=t,i&&(a=!0));Ps(e,n||t)}function JI(e){if(!e._d){var t=Sg(e._i),n=t.day===void 0?t.date:t.day;e._a=U1([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Og(e)}}function e2(e){var t=new Hl(Mg(ab(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function ab(e){var t=e._i,n=e._f;return e._locale=e._locale||ds(e._l),t===null||n===void 0&&t===""?Ud({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),cr(t)?new Hl(Mg(t)):(Bl(t)?e._d=t:lr(n)?XI(e):n?Dg(e):t2(e),yg(e)||(e._d=null),e))}function t2(e){var t=e._i;hn(t)?e._d=new Date(ee.now()):Bl(t)?e._d=new Date(t.valueOf()):typeof t=="string"?GI(e):lr(t)?(e._a=U1(t.slice(0),function(n){return parseInt(n,10)}),Og(e)):_o(t)?JI(e):ss(t)?e._d=new Date(t):ee.createFromInputFallback(e)}function lb(e,t,n,r,s){var o={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(_o(e)&&vg(e)||lr(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=n,o._i=e,o._f=t,o._strict=r,e2(o)}function st(e,t,n,r){return lb(e,t,n,r,!1)}var n2=Yn("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=st.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ud()}),r2=Yn("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=st.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ud()});function cb(e,t){var n,r;if(t.length===1&&lr(t[0])&&(t=t[0]),!t.length)return st();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function s2(){var e=[].slice.call(arguments,0);return cb("isBefore",e)}function o2(){var e=[].slice.call(arguments,0);return cb("isAfter",e)}var i2=function(){return Date.now?Date.now():+new Date},va=["year","quarter","month","week","day","hour","minute","second","millisecond"];function a2(e){var t,n=!1,r,s=va.length;for(t in e)if($e(e,t)&&!(_t.call(va,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<s;++r)if(e[va[r]]){if(n)return!1;parseFloat(e[va[r]])!==je(e[va[r]])&&(n=!0)}return!0}function l2(){return this._isValid}function c2(){return fr(NaN)}function Kd(e){var t=Sg(e),n=t.year||0,r=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=a2(t),this._milliseconds=+d+c*1e3+l*6e4+a*1e3*60*60,this._days=+i+o*7,this._months=+s+r*3+n*12,this._data={},this._locale=ds(),this._bubble()}function Jc(e){return e instanceof Kd}function bp(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function u2(e,t,n){var r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<r;i++)je(e[i])!==je(t[i])&&o++;return o+s}function ub(e,t){fe(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Tr(~~(n/60),2)+t+Tr(~~n%60,2)})}ub("Z",":");ub("ZZ","");oe("Z",Yd);oe("ZZ",Yd);qe(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=jg(Yd,e)});var d2=/([\+\-]|\d\d)/gi;function jg(e,t){var n=(t||"").match(e),r,s,o;return n===null?null:(r=n[n.length-1]||[],s=(r+"").match(d2)||["-",0,0],o=+(s[1]*60)+je(s[2]),o===0?0:s[0]==="+"?o:-o)}function Ag(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(cr(e)||Bl(e)?e.valueOf():st(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),ee.updateOffset(n,!1),n):st(e).local()}function Cp(e){return-Math.round(e._d.getTimezoneOffset())}ee.updateOffset=function(){};function f2(e,t,n){var r=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=jg(Yd,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(s=Cp(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),r!==e&&(!t||this._changeInProgress?hb(this,fr(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ee.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Cp(this)}function h2(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function p2(e){return this.utcOffset(0,e)}function m2(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Cp(this),"m")),this}function g2(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=jg(AA,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function v2(e){return this.isValid()?(e=e?st(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function y2(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function x2(){if(!hn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return xg(e,this),e=ab(e),e._a?(t=e._isUTC?Or(e._a):st(e._a),this._isDSTShifted=this.isValid()&&u2(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function w2(){return this.isValid()?!this._isUTC:!1}function _2(){return this.isValid()?this._isUTC:!1}function db(){return this.isValid()?this._isUTC&&this._offset===0:!1}var S2=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,b2=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function fr(e,t){var n=e,r=null,s,o,i;return Jc(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:ss(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=S2.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:je(r[yr])*s,h:je(r[Rt])*s,m:je(r[er])*s,s:je(r[Hr])*s,ms:je(bp(r[vo]*1e3))*s}):(r=b2.exec(e))?(s=r[1]==="-"?-1:1,n={y:io(r[2],s),M:io(r[3],s),w:io(r[4],s),d:io(r[5],s),h:io(r[6],s),m:io(r[7],s),s:io(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=C2(st(n.from),st(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new Kd(n),Jc(e)&&$e(e,"_locale")&&(o._locale=e._locale),Jc(e)&&$e(e,"_isValid")&&(o._isValid=e._isValid),o}fr.fn=Kd.prototype;fr.invalid=c2;function io(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function yx(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 C2(e,t){var n;return e.isValid()&&t.isValid()?(t=Ag(t,e),e.isBefore(t)?n=yx(e,t):(n=yx(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function fb(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&($1(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."),o=n,n=r,r=o),s=fr(n,r),hb(this,s,e),this}}function hb(e,t,n,r){var s=t._milliseconds,o=bp(t._days),i=bp(t._months);e.isValid()&&(r=r??!0,i&&Q1(e,gl(e,"Month")+i*n),o&&G1(e,"Date",gl(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&ee.updateOffset(e,o||i))}var k2=fb(1,"add"),E2=fb(-1,"subtract");function pb(e){return typeof e=="string"||e instanceof String}function T2(e){return cr(e)||Bl(e)||pb(e)||ss(e)||R2(e)||N2(e)||e===null||e===void 0}function N2(e){var t=_o(e)&&!vg(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"],s,o,i=r.length;for(s=0;s<i;s+=1)o=r[s],n=n||$e(e,o);return t&&n}function R2(e){var t=lr(e),n=!1;return t&&(n=e.filter(function(r){return!ss(r)&&pb(e)}).length===0),t&&n}function P2(e){var t=_o(e)&&!vg(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<r.length;s+=1)o=r[s],n=n||$e(e,o);return t&&n}function M2(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 O2(e,t){arguments.length===1&&(arguments[0]?T2(arguments[0])?(e=arguments[0],t=void 0):P2(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||st(),r=Ag(n,this).startOf("day"),s=ee.calendarFormat(this,r)||"sameElse",o=t&&(Dr(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,st(n)))}function D2(){return new Hl(this)}function j2(e,t){var n=cr(e)?e:st(e);return this.isValid()&&n.isValid()?(t=Bn(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function A2(e,t){var n=cr(e)?e:st(e);return this.isValid()&&n.isValid()?(t=Bn(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function I2(e,t,n,r){var s=cr(e)?e:st(e),o=cr(t)?t:st(t);return this.isValid()&&s.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(s,n):!this.isBefore(s,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function L2(e,t){var n=cr(e)?e:st(e),r;return this.isValid()&&n.isValid()?(t=Bn(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 F2(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function U2(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function V2(e,t,n){var r,s,o;if(!this.isValid())return NaN;if(r=Ag(e,this),!r.isValid())return NaN;switch(s=(r.utcOffset()-this.utcOffset())*6e4,t=Bn(t),t){case"year":o=eu(this,r)/12;break;case"month":o=eu(this,r);break;case"quarter":o=eu(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-s)/864e5;break;case"week":o=(this-r-s)/6048e5;break;default:o=this-r}return n?o:Fn(o)}function eu(e,t){if(e.date()<t.date())return-eu(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),s,o;return t-r<0?(s=e.clone().add(n-1,"months"),o=(t-r)/(r-s)):(s=e.clone().add(n+1,"months"),o=(t-r)/(s-r)),-(n+o)||0}ee.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ee.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function $2(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function z2(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Xc(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Dr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Xc(n,"Z")):Xc(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function W2(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+s+o)}function Y2(e){e||(e=this.isUtc()?ee.defaultFormatUtc:ee.defaultFormat);var t=Xc(this,e);return this.localeData().postformat(t)}function B2(e,t){return this.isValid()&&(cr(e)&&e.isValid()||st(e).isValid())?fr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function H2(e){return this.from(st(),e)}function K2(e,t){return this.isValid()&&(cr(e)&&e.isValid()||st(e).isValid())?fr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function G2(e){return this.to(st(),e)}function mb(e){var t;return e===void 0?this._locale._abbr:(t=ds(e),t!=null&&(this._locale=t),this)}var gb=Yn("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 vb(){return this._locale}var Wu=1e3,Ei=60*Wu,Yu=60*Ei,yb=(365*400+97)*24*Yu;function Ti(e,t){return(e%t+t)%t}function xb(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-yb:new Date(e,t,n).valueOf()}function wb(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-yb:Date.UTC(e,t,n)}function Z2(e){var t,n;if(e=Bn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?wb:xb,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-=Ti(t+(this._isUTC?0:this.utcOffset()*Ei),Yu);break;case"minute":t=this._d.valueOf(),t-=Ti(t,Ei);break;case"second":t=this._d.valueOf(),t-=Ti(t,Wu);break}return this._d.setTime(t),ee.updateOffset(this,!0),this}function q2(e){var t,n;if(e=Bn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?wb:xb,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+=Yu-Ti(t+(this._isUTC?0:this.utcOffset()*Ei),Yu)-1;break;case"minute":t=this._d.valueOf(),t+=Ei-Ti(t,Ei)-1;break;case"second":t=this._d.valueOf(),t+=Wu-Ti(t,Wu)-1;break}return this._d.setTime(t),ee.updateOffset(this,!0),this}function Q2(){return this._d.valueOf()-(this._offset||0)*6e4}function X2(){return Math.floor(this.valueOf()/1e3)}function J2(){return new Date(this.valueOf())}function eL(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function tL(){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 nL(){return this.isValid()?this.toISOString():null}function rL(){return yg(this)}function sL(){return Ps({},ke(this))}function oL(){return ke(this).overflow}function iL(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}fe("N",0,0,"eraAbbr");fe("NN",0,0,"eraAbbr");fe("NNN",0,0,"eraAbbr");fe("NNNN",0,0,"eraName");fe("NNNNN",0,0,"eraNarrow");fe("y",["y",1],"yo","eraYear");fe("y",["yy",2],0,"eraYear");fe("y",["yyy",3],0,"eraYear");fe("y",["yyyy",4],0,"eraYear");oe("N",Ig);oe("NN",Ig);oe("NNN",Ig);oe("NNNN",vL);oe("NNNNN",yL);qe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?ke(n).era=s:ke(n).invalidEra=e});oe("y",Qi);oe("yy",Qi);oe("yyy",Qi);oe("yyyy",Qi);oe("yo",xL);qe(["y","yy","yyy","yyyy"],qt);qe(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[qt]=n._locale.eraYearOrdinalParse(e,s):t[qt]=parseInt(e,10)});function aL(e,t){var n,r,s,o=this._eras||ds("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":s=ee(o[n].since).startOf("day"),o[n].since=s.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=ee(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf();break}}return o}function lL(e,t,n){var r,s,o=this.eras(),i,a,l;for(e=e.toUpperCase(),r=0,s=o.length;r<s;++r)if(i=o[r].name.toUpperCase(),a=o[r].abbr.toUpperCase(),l=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return o[r];break;case"NNNN":if(i===e)return o[r];break;case"NNNNN":if(l===e)return o[r];break}else if([i,a,l].indexOf(e)>=0)return o[r]}function cL(e,t){var n=e.since<=e.until?1:-1;return t===void 0?ee(e.since).year():ee(e.since).year()+(t-e.offset)*n}function uL(){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 dL(){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 fL(){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 hL(){var e,t,n,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return(this.year()-ee(s[e].since).year())*n+s[e].offset;return this.year()}function pL(e){return $e(this,"_erasNameRegex")||Lg.call(this),e?this._erasNameRegex:this._erasRegex}function mL(e){return $e(this,"_erasAbbrRegex")||Lg.call(this),e?this._erasAbbrRegex:this._erasRegex}function gL(e){return $e(this,"_erasNarrowRegex")||Lg.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ig(e,t){return t.erasAbbrRegex(e)}function vL(e,t){return t.erasNameRegex(e)}function yL(e,t){return t.erasNarrowRegex(e)}function xL(e,t){return t._eraYearOrdinalRegex||Qi}function Lg(){var e=[],t=[],n=[],r=[],s,o,i,a,l,c=this.eras();for(s=0,o=c.length;s<o;++s)i=Zr(c[s].name),a=Zr(c[s].abbr),l=Zr(c[s].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")}fe(0,["gg",2],0,function(){return this.weekYear()%100});fe(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Gd(e,t){fe(0,[e,e.length],0,t)}Gd("gggg","weekYear");Gd("ggggg","weekYear");Gd("GGGG","isoWeekYear");Gd("GGGGG","isoWeekYear");oe("G",Wd);oe("g",Wd);oe("GG",ot,An);oe("gg",ot,An);oe("GGGG",Cg,bg);oe("gggg",Cg,bg);oe("GGGGG",zd,Vd);oe("ggggg",zd,Vd);Gl(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=je(e)});Gl(["gg","GG"],function(e,t,n,r){t[r]=ee.parseTwoDigitYear(e)});function wL(e){return _b.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function _L(e){return _b.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function SL(){return qr(this.year(),1,4)}function bL(){return qr(this.isoWeekYear(),1,4)}function CL(){var e=this.localeData()._week;return qr(this.year(),e.dow,e.doy)}function kL(){var e=this.localeData()._week;return qr(this.weekYear(),e.dow,e.doy)}function _b(e,t,n,r,s){var o;return e==null?yl(this,r,s).year:(o=qr(e,r,s),t>o&&(t=o),EL.call(this,e,t,n,r,s))}function EL(e,t,n,r,s){var o=eb(e,t,n,r,s),i=vl(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}fe("Q",0,"Qo","quarter");oe("Q",W1);qe("Q",function(e,t){t[Br]=(je(e)-1)*3});function TL(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}fe("D",["DD",2],"Do","date");oe("D",ot,Xi);oe("DD",ot,An);oe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});qe(["D","DD"],yr);qe("Do",function(e,t){t[yr]=je(e.match(ot)[0])});var Sb=Ji("Date",!0);fe("DDD",["DDDD",3],"DDDo","dayOfYear");oe("DDD",$d);oe("DDDD",Y1);qe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=je(e)});function NL(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}fe("m",["mm",2],0,"minute");oe("m",ot,kg);oe("mm",ot,An);qe(["m","mm"],er);var RL=Ji("Minutes",!1);fe("s",["ss",2],0,"second");oe("s",ot,kg);oe("ss",ot,An);qe(["s","ss"],Hr);var PL=Ji("Seconds",!1);fe("S",0,0,function(){return~~(this.millisecond()/100)});fe(0,["SS",2],0,function(){return~~(this.millisecond()/10)});fe(0,["SSS",3],0,"millisecond");fe(0,["SSSS",4],0,function(){return this.millisecond()*10});fe(0,["SSSSS",5],0,function(){return this.millisecond()*100});fe(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});fe(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});fe(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});fe(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});oe("S",$d,W1);oe("SS",$d,An);oe("SSS",$d,Y1);var Ms,bb;for(Ms="SSSS";Ms.length<=9;Ms+="S")oe(Ms,Qi);function ML(e,t){t[vo]=je(("0."+e)*1e3)}for(Ms="S";Ms.length<=9;Ms+="S")qe(Ms,ML);bb=Ji("Milliseconds",!1);fe("z",0,0,"zoneAbbr");fe("zz",0,0,"zoneName");function OL(){return this._isUTC?"UTC":""}function DL(){return this._isUTC?"Coordinated Universal Time":""}var z=Hl.prototype;z.add=k2;z.calendar=O2;z.clone=D2;z.diff=V2;z.endOf=q2;z.format=Y2;z.from=B2;z.fromNow=H2;z.to=K2;z.toNow=G2;z.get=WA;z.invalidAt=oL;z.isAfter=j2;z.isBefore=A2;z.isBetween=I2;z.isSame=L2;z.isSameOrAfter=F2;z.isSameOrBefore=U2;z.isValid=rL;z.lang=gb;z.locale=mb;z.localeData=vb;z.max=r2;z.min=n2;z.parsingFlags=sL;z.set=YA;z.startOf=Z2;z.subtract=E2;z.toArray=eL;z.toObject=tL;z.toDate=J2;z.toISOString=z2;z.inspect=W2;typeof Symbol<"u"&&Symbol.for!=null&&(z[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});z.toJSON=nL;z.toString=$2;z.unix=X2;z.valueOf=Q2;z.creationData=iL;z.eraName=uL;z.eraNarrow=dL;z.eraAbbr=fL;z.eraYear=hL;z.year=K1;z.isLeapYear=zA;z.weekYear=wL;z.isoWeekYear=_L;z.quarter=z.quarters=TL;z.month=X1;z.daysInMonth=JA;z.week=z.weeks=aI;z.isoWeek=z.isoWeeks=lI;z.weeksInYear=CL;z.weeksInWeekYear=kL;z.isoWeeksInYear=SL;z.isoWeeksInISOWeekYear=bL;z.date=Sb;z.day=z.days=_I;z.weekday=SI;z.isoWeekday=bI;z.dayOfYear=NL;z.hour=z.hours=PI;z.minute=z.minutes=RL;z.second=z.seconds=PL;z.millisecond=z.milliseconds=bb;z.utcOffset=f2;z.utc=p2;z.local=m2;z.parseZone=g2;z.hasAlignedHourOffset=v2;z.isDST=y2;z.isLocal=w2;z.isUtcOffset=_2;z.isUtc=db;z.isUTC=db;z.zoneAbbr=OL;z.zoneName=DL;z.dates=Yn("dates accessor is deprecated. Use date instead.",Sb);z.months=Yn("months accessor is deprecated. Use month instead",X1);z.years=Yn("years accessor is deprecated. Use year instead",K1);z.zone=Yn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",h2);z.isDSTShifted=Yn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",x2);function jL(e){return st(e*1e3)}function AL(){return st.apply(null,arguments).parseZone()}function Cb(e){return e}var We=wg.prototype;We.calendar=wA;We.longDateFormat=CA;We.invalidDate=EA;We.ordinal=RA;We.preparse=Cb;We.postformat=Cb;We.relativeTime=MA;We.pastFuture=OA;We.set=yA;We.eras=aL;We.erasParse=lL;We.erasConvertYear=cL;We.erasAbbrRegex=mL;We.erasNameRegex=pL;We.erasNarrowRegex=gL;We.months=ZA;We.monthsShort=qA;We.monthsParse=XA;We.monthsRegex=tI;We.monthsShortRegex=eI;We.week=rI;We.firstDayOfYear=iI;We.firstDayOfWeek=oI;We.weekdays=gI;We.weekdaysMin=yI;We.weekdaysShort=vI;We.weekdaysParse=wI;We.weekdaysRegex=CI;We.weekdaysShortRegex=kI;We.weekdaysMinRegex=EI;We.isPM=NI;We.meridiem=MI;function Bu(e,t,n,r){var s=ds(),o=Or().set(r,t);return s[n](o,e)}function kb(e,t,n){if(ss(e)&&(t=e,e=void 0),e=e||"",t!=null)return Bu(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=Bu(e,r,n,"month");return s}function Fg(e,t,n,r){typeof e=="boolean"?(ss(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,ss(t)&&(n=t,t=void 0),t=t||"");var s=ds(),o=e?s._week.dow:0,i,a=[];if(n!=null)return Bu(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=Bu(t,(i+o)%7,r,"day");return a}function IL(e,t){return kb(e,t,"months")}function LL(e,t){return kb(e,t,"monthsShort")}function FL(e,t,n){return Fg(e,t,n,"weekdays")}function UL(e,t,n){return Fg(e,t,n,"weekdaysShort")}function VL(e,t,n){return Fg(e,t,n,"weekdaysMin")}$s("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=je(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});ee.lang=Yn("moment.lang is deprecated. Use moment.locale instead.",$s);ee.langData=Yn("moment.langData is deprecated. Use moment.localeData instead.",ds);var Ir=Math.abs;function $L(){var e=this._data;return this._milliseconds=Ir(this._milliseconds),this._days=Ir(this._days),this._months=Ir(this._months),e.milliseconds=Ir(e.milliseconds),e.seconds=Ir(e.seconds),e.minutes=Ir(e.minutes),e.hours=Ir(e.hours),e.months=Ir(e.months),e.years=Ir(e.years),this}function Eb(e,t,n,r){var s=fr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function zL(e,t){return Eb(this,e,t,1)}function WL(e,t){return Eb(this,e,t,-1)}function xx(e){return e<0?Math.floor(e):Math.ceil(e)}function YL(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=xx(kp(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=Fn(e/1e3),r.seconds=s%60,o=Fn(s/60),r.minutes=o%60,i=Fn(o/60),r.hours=i%24,t+=Fn(i/24),l=Fn(Tb(t)),n+=l,t-=xx(kp(l)),a=Fn(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function Tb(e){return e*4800/146097}function kp(e){return e*146097/4800}function BL(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Bn(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+Tb(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(kp(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 fs(e){return function(){return this.as(e)}}var Nb=fs("ms"),HL=fs("s"),KL=fs("m"),GL=fs("h"),ZL=fs("d"),qL=fs("w"),QL=fs("M"),XL=fs("Q"),JL=fs("y"),eF=Nb;function tF(){return fr(this)}function nF(e){return e=Bn(e),this.isValid()?this[e+"s"]():NaN}function Vo(e){return function(){return this.isValid()?this._data[e]:NaN}}var rF=Vo("milliseconds"),sF=Vo("seconds"),oF=Vo("minutes"),iF=Vo("hours"),aF=Vo("days"),lF=Vo("months"),cF=Vo("years");function uF(){return Fn(this.days()/7)}var Vr=Math.round,hi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function dF(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function fF(e,t,n,r){var s=fr(e).abs(),o=Vr(s.as("s")),i=Vr(s.as("m")),a=Vr(s.as("h")),l=Vr(s.as("d")),c=Vr(s.as("M")),d=Vr(s.as("w")),f=Vr(s.as("y")),p=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||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||c<=1&&["M"]||c<n.M&&["MM",c]||f<=1&&["y"]||["yy",f],p[2]=t,p[3]=+e>0,p[4]=r,dF.apply(null,p)}function hF(e){return e===void 0?Vr:typeof e=="function"?(Vr=e,!0):!1}function pF(e,t){return hi[e]===void 0?!1:t===void 0?hi[e]:(hi[e]=t,e==="s"&&(hi.ss=t-1),!0)}function mF(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=hi,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},hi,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=fF(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var ih=Math.abs;function qo(e){return(e>0)-(e<0)||+e}function Zd(){if(!this.isValid())return this.localeData().invalidDate();var e=ih(this._milliseconds)/1e3,t=ih(this._days),n=ih(this._months),r,s,o,i,a=this.asSeconds(),l,c,d,f;return a?(r=Fn(e/60),s=Fn(r/60),e%=60,r%=60,o=Fn(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=qo(this._months)!==qo(a)?"-":"",d=qo(this._days)!==qo(a)?"-":"",f=qo(this._milliseconds)!==qo(a)?"-":"",l+"P"+(o?c+o+"Y":"")+(n?c+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var Ie=Kd.prototype;Ie.isValid=l2;Ie.abs=$L;Ie.add=zL;Ie.subtract=WL;Ie.as=BL;Ie.asMilliseconds=Nb;Ie.asSeconds=HL;Ie.asMinutes=KL;Ie.asHours=GL;Ie.asDays=ZL;Ie.asWeeks=qL;Ie.asMonths=QL;Ie.asQuarters=XL;Ie.asYears=JL;Ie.valueOf=eF;Ie._bubble=YL;Ie.clone=tF;Ie.get=nF;Ie.milliseconds=rF;Ie.seconds=sF;Ie.minutes=oF;Ie.hours=iF;Ie.days=aF;Ie.weeks=uF;Ie.months=lF;Ie.years=cF;Ie.humanize=mF;Ie.toISOString=Zd;Ie.toString=Zd;Ie.toJSON=Zd;Ie.locale=mb;Ie.localeData=vb;Ie.toIsoString=Yn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zd);Ie.lang=gb;fe("X",0,0,"unix");fe("x",0,0,"valueOf");oe("x",Wd);oe("X",IA);qe("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});qe("x",function(e,t,n){n._d=new Date(je(e))});//! moment.js
ee.version="2.30.1";gA(st);ee.fn=z;ee.min=s2;ee.max=o2;ee.now=i2;ee.utc=Or;ee.unix=jL;ee.months=IL;ee.isDate=Bl;ee.locale=$s;ee.invalid=Ud;ee.duration=fr;ee.isMoment=cr;ee.weekdays=FL;ee.parseZone=AL;ee.localeData=ds;ee.isDuration=Jc;ee.monthsShort=LL;ee.weekdaysMin=VL;ee.defineLocale=Pg;ee.updateLocale=AI;ee.locales=II;ee.weekdaysShort=UL;ee.normalizeUnits=Bn;ee.relativeTimeRounding=hF;ee.relativeTimeThreshold=pF;ee.calendarFormat=M2;ee.prototype=z;ee.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 gF=async()=>await Zt().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Rb=async e=>e.id?await Zt().collection("access").update(e.id,e):await Zt().collection("access").create(e),vF=async e=>(e.deleted=ee.utc().format("YYYY-MM-DD HH:mm:ss"),await Zt().collection("access").update(e.id,e)),yF=(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}},Pb=h.createContext({}),qd=()=>h.useContext(Pb),xF=({children:e})=>{const[t,n]=h.useReducer(yF,{accesses:[]});h.useEffect(()=>{(async()=>{const a=await gF();n({type:"SET_ACCESSES",payload:a})})()},[]);const r=h.useCallback(i=>{n({type:"DELETE_ACCESS",payload:i})},[]),s=h.useCallback(i=>{n({type:"ADD_ACCESS",payload:i})},[]),o=h.useCallback(i=>{n({type:"UPDATE_ACCESS",payload:i})},[]);return u.jsx(Pb.Provider,{value:{config:{accesses:t.accesses},deleteAccess:r,addAccess:s,updateAccess:o},children:e&&e})};function wF(){const e=ro(),t=no();if(!Zt().authStore.isValid||!Zt().authStore.isAdmin)return u.jsx(h_,{to:"/login"});const n=t.pathname,r=o=>(console.log(n),o==n?"bg-muted text-primary":"text-muted-foreground"),s=()=>{Zt().authStore.clear(),e("/login")};return u.jsx(u.Fragment,{children:u.jsx(xF,{children:u.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]",children:[u.jsx("div",{className:"hidden border-r bg-muted/40 md:block",children:u.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[u.jsx("div",{className:"flex h-14 items-center border-b px-4 lg:h-[60px] lg:px-6",children:u.jsxs(ys,{to:"/",className:"flex items-center gap-2 font-semibold",children:[u.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),u.jsx("span",{className:"",children:"Certimate"})]})}),u.jsx("div",{className:"flex-1",children:u.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[u.jsxs(ys,{to:"/",className:pe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/")),children:[u.jsx(up,{className:"h-4 w-4"}),"域名列表"]}),u.jsxs(ys,{to:"/access",className:pe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/access")),children:[u.jsx(Fy,{className:"h-4 w-4"}),"授权管理"]}),u.jsxs(ys,{to:"/history",className:pe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/history")),children:[u.jsx(Iy,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),u.jsxs("div",{className:"flex flex-col",children:[u.jsxs("header",{className:"flex h-14 items-center gap-4 border-b bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[u.jsxs(R1,{children:[u.jsx(P1,{asChild:!0,children:u.jsxs(Dt,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[u.jsx(hP,{className:"h-5 w-5"}),u.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),u.jsx(mg,{side:"left",className:"flex flex-col",children:u.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[u.jsxs(ys,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[u.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),u.jsx("span",{className:"",children:"Certimate"}),u.jsx("span",{className:"sr-only",children:"Certimate"})]}),u.jsxs(ys,{to:"/",className:pe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/")),children:[u.jsx(up,{className:"h-5 w-5"}),"域名列表"]}),u.jsxs(ys,{to:"/access",className:pe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/dns_provider")),children:[u.jsx(Fy,{className:"h-5 w-5"}),"授权管理"]}),u.jsxs(ys,{to:"/history",className:pe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/history")),children:[u.jsx(Iy,{className:"h-5 w-5"}),"部署历史"]})]})})]}),u.jsx("div",{className:"w-full flex-1"}),u.jsxs(Lj,{children:[u.jsx(Fj,{asChild:!0,children:u.jsxs(Dt,{variant:"secondary",size:"icon",className:"rounded-full",children:[u.jsx(uP,{className:"h-5 w-5"}),u.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),u.jsxs(o1,{align:"end",children:[u.jsx(a1,{children:"My Account"}),u.jsx(l1,{}),u.jsx(i1,{onClick:s,children:"Logout"})]})]})]}),u.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6",children:u.jsx(p_,{})})]})]})})})}var _F="Separator",wx="horizontal",SF=["horizontal","vertical"],Mb=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=wx,...s}=e,o=bF(r)?r:wx,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return u.jsx(_e.div,{"data-orientation":o,...a,...s,ref:t})});Mb.displayName=_F;function bF(e){return SF.includes(e)}var Ob=Mb;const Ht=h.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>u.jsx(Ob,{ref:s,decorative:n,orientation:t,className:pe("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ht.displayName=Ob.displayName;const Db=({phase:e,phaseSuccess:t})=>{let n=u.jsx(u.Fragment,{children:" "});return e==="check"&&(t?n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),n};function jb(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 Ug="Switch",[CF,GV]=Pr(Ug),[kF,EF]=CF(Ug),Ab=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:i,disabled:a,value:l="on",onCheckedChange:c,...d}=e,[f,p]=h.useState(null),y=ze(t,m=>p(m)),x=h.useRef(!1),v=f?!!f.closest("form"):!0,[_=!1,g]=Ys({prop:s,defaultProp:o,onChange:c});return u.jsxs(kF,{scope:n,checked:_,disabled:a,children:[u.jsx(_e.button,{type:"button",role:"switch","aria-checked":_,"aria-required":i,"data-state":Fb(_),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:y,onClick:te(e.onClick,m=>{g(w=>!w),v&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),v&&u.jsx(TF,{control:f,bubbles:!x.current,name:r,value:l,checked:_,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});Ab.displayName=Ug;var Ib="SwitchThumb",Lb=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=EF(Ib,n);return u.jsx(_e.span,{"data-state":Fb(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});Lb.displayName=Ib;var TF=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=h.useRef(null),i=jb(n),a=z_(t);return h.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==n&&f){const p=new Event("click",{bubbles:r});f.call(l,n),l.dispatchEvent(p)}},[i,n,r]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Fb(e){return e?"checked":"unchecked"}var Ub=Ab,NF=Lb;const Vb=h.forwardRef(({className:e,...t},n)=>u.jsx(Ub,{className:pe("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:u.jsx(NF,{className:pe("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")})}));Vb.displayName=Ub.displayName;var RF="VisuallyHidden",Zl=h.forwardRef((e,t)=>u.jsx(_e.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}}));Zl.displayName=RF;var PF=Zl,Vg="ToastProvider",[$g,MF,OF]=Ed("Toast"),[$b,ZV]=Pr("Toast",[OF]),[DF,Qd]=$b(Vg),zb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=h.useState(null),[c,d]=h.useState(0),f=h.useRef(!1),p=h.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Vg}\`. Expected non-empty \`string\`.`),u.jsx($g.Provider,{scope:t,children:u.jsx(DF,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:h.useCallback(()=>d(y=>y+1),[]),onToastRemove:h.useCallback(()=>d(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:i})})};zb.displayName=Vg;var Wb="ToastViewport",jF=["F8"],Ep="toast.viewportPause",Tp="toast.viewportResume",Yb=h.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=jF,label:s="Notifications ({hotkey})",...o}=e,i=Qd(Wb,n),a=MF(n),l=h.useRef(null),c=h.useRef(null),d=h.useRef(null),f=h.useRef(null),p=ze(t,f,i.onViewportChange),y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;h.useEffect(()=>{const _=g=>{var w;r.every(b=>g[b]||g.code===b)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[r]),h.useEffect(()=>{const _=l.current,g=f.current;if(x&&_&&g){const m=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(Ep);g.dispatchEvent(S),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(Tp);g.dispatchEvent(S),i.isClosePausedRef.current=!1}},b=S=>{!_.contains(S.relatedTarget)&&w()},C=()=>{_.contains(document.activeElement)||w()};return _.addEventListener("focusin",m),_.addEventListener("focusout",b),_.addEventListener("pointermove",m),_.addEventListener("pointerleave",C),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{_.removeEventListener("focusin",m),_.removeEventListener("focusout",b),_.removeEventListener("pointermove",m),_.removeEventListener("pointerleave",C),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[x,i.isClosePausedRef]);const v=h.useCallback(({tabbingDirection:_})=>{const m=a().map(w=>{const b=w.ref.current,C=[b,...KF(b)];return _==="forwards"?C:C.reverse()});return(_==="forwards"?m.reverse():m).flat()},[a]);return h.useEffect(()=>{const _=f.current;if(_){const g=m=>{var C,S,N;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const R=document.activeElement,F=m.shiftKey;if(m.target===_&&F){(C=c.current)==null||C.focus();return}const D=v({tabbingDirection:F?"backwards":"forwards"}),B=D.findIndex(A=>A===R);ah(D.slice(B+1))?m.preventDefault():F?(S=c.current)==null||S.focus():(N=d.current)==null||N.focus()}};return _.addEventListener("keydown",g),()=>_.removeEventListener("keydown",g)}},[a,v]),u.jsxs(hM,{ref:l,role:"region","aria-label":s.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&u.jsx(Np,{ref:c,onFocusFromOutsideViewport:()=>{const _=v({tabbingDirection:"forwards"});ah(_)}}),u.jsx($g.Slot,{scope:n,children:u.jsx(_e.ol,{tabIndex:-1,...o,ref:p})}),x&&u.jsx(Np,{ref:d,onFocusFromOutsideViewport:()=>{const _=v({tabbingDirection:"backwards"});ah(_)}})]})});Yb.displayName=Wb;var Bb="ToastFocusProxy",Np=h.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Qd(Bb,n);return u.jsx(Zl,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=o.viewport)!=null&&c.contains(a))&&r()}})});Np.displayName=Bb;var Xd="Toast",AF="toast.swipeStart",IF="toast.swipeMove",LF="toast.swipeCancel",FF="toast.swipeEnd",Hb=h.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,l]=Ys({prop:r,defaultProp:s,onChange:o});return u.jsx(Mr,{present:n||a,children:u.jsx($F,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Xt(e.onPause),onResume:Xt(e.onResume),onSwipeStart:te(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:te(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:te(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:te(e.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});Hb.displayName=Xd;var[UF,VF]=$b(Xd,{onClose(){}}),$F=h.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:y,...x}=e,v=Qd(Xd,n),[_,g]=h.useState(null),m=ze(t,A=>g(A)),w=h.useRef(null),b=h.useRef(null),C=s||v.duration,S=h.useRef(0),N=h.useRef(C),R=h.useRef(0),{onToastAdd:F,onToastRemove:L}=v,Z=Xt(()=>{var H;(_==null?void 0:_.contains(document.activeElement))&&((H=v.viewport)==null||H.focus()),i()}),D=h.useCallback(A=>{!A||A===1/0||(window.clearTimeout(R.current),S.current=new Date().getTime(),R.current=window.setTimeout(Z,A))},[Z]);h.useEffect(()=>{const A=v.viewport;if(A){const H=()=>{D(N.current),c==null||c()},ne=()=>{const W=new Date().getTime()-S.current;N.current=N.current-W,window.clearTimeout(R.current),l==null||l()};return A.addEventListener(Ep,ne),A.addEventListener(Tp,H),()=>{A.removeEventListener(Ep,ne),A.removeEventListener(Tp,H)}}},[v.viewport,C,l,c,D]),h.useEffect(()=>{o&&!v.isClosePausedRef.current&&D(C)},[o,C,v.isClosePausedRef,D]),h.useEffect(()=>(F(),()=>L()),[F,L]);const B=h.useMemo(()=>_?Jb(_):null,[_]);return v.viewport?u.jsxs(u.Fragment,{children:[B&&u.jsx(zF,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),u.jsx(UF,{scope:n,onClose:Z,children:as.createPortal(u.jsx($g.ItemSlot,{scope:n,children:u.jsx(fM,{asChild:!0,onEscapeKeyDown:te(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||Z(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(_e.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":v.swipeDirection,...x,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:te(e.onKeyDown,A=>{A.key==="Escape"&&(a==null||a(A.nativeEvent),A.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:te(e.onPointerDown,A=>{A.button===0&&(w.current={x:A.clientX,y:A.clientY})}),onPointerMove:te(e.onPointerMove,A=>{if(!w.current)return;const H=A.clientX-w.current.x,ne=A.clientY-w.current.y,W=!!b.current,I=["left","right"].includes(v.swipeDirection),O=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,q=I?O(0,H):0,ae=I?0:O(0,ne),me=A.pointerType==="touch"?10:2,Qe={x:q,y:ae},Pe={originalEvent:A,delta:Qe};W?(b.current=Qe,jc(IF,f,Pe,{discrete:!1})):_x(Qe,v.swipeDirection,me)?(b.current=Qe,jc(AF,d,Pe,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(H)>me||Math.abs(ne)>me)&&(w.current=null)}),onPointerUp:te(e.onPointerUp,A=>{const H=b.current,ne=A.target;if(ne.hasPointerCapture(A.pointerId)&&ne.releasePointerCapture(A.pointerId),b.current=null,w.current=null,H){const W=A.currentTarget,I={originalEvent:A,delta:H};_x(H,v.swipeDirection,v.swipeThreshold)?jc(FF,y,I,{discrete:!0}):jc(LF,p,I,{discrete:!0}),W.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),zF=e=>{const{__scopeToast:t,children:n,...r}=e,s=Qd(Xd,t),[o,i]=h.useState(!1),[a,l]=h.useState(!1);return BF(()=>i(!0)),h.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(zl,{asChild:!0,children:u.jsx(Zl,{...r,children:o&&u.jsxs(u.Fragment,{children:[s.label," ",n]})})})},WF="ToastTitle",Kb=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return u.jsx(_e.div,{...r,ref:t})});Kb.displayName=WF;var YF="ToastDescription",Gb=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return u.jsx(_e.div,{...r,ref:t})});Gb.displayName=YF;var Zb="ToastAction",qb=h.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?u.jsx(Xb,{altText:n,asChild:!0,children:u.jsx(zg,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Zb}\`. Expected non-empty \`string\`.`),null)});qb.displayName=Zb;var Qb="ToastClose",zg=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=VF(Qb,n);return u.jsx(Xb,{asChild:!0,children:u.jsx(_e.button,{type:"button",...r,ref:t,onClick:te(e.onClick,s.onClose)})})});zg.displayName=Qb;var Xb=h.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return u.jsx(_e.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function Jb(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),HF(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Jb(r))}}),t}function jc(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?$m(s,o):s.dispatchEvent(o)}var _x=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function BF(e=()=>{}){const t=Xt(e);Jt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function HF(e){return e.nodeType===e.ELEMENT_NODE}function KF(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ah(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var GF=zb,eC=Yb,tC=Hb,nC=Kb,rC=Gb,sC=qb,oC=zg;const ZF=GF,iC=h.forwardRef(({className:e,...t},n)=>u.jsx(eC,{ref:n,className:pe("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}));iC.displayName=eC.displayName;const qF=Vl("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"}}),aC=h.forwardRef(({className:e,variant:t,...n},r)=>u.jsx(tC,{ref:r,className:pe(qF({variant:t}),e),...n}));aC.displayName=tC.displayName;const QF=h.forwardRef(({className:e,...t},n)=>u.jsx(sC,{ref:n,className:pe("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}));QF.displayName=sC.displayName;const lC=h.forwardRef(({className:e,...t},n)=>u.jsx(oC,{ref:n,className:pe("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:u.jsx(Um,{className:"h-4 w-4"})}));lC.displayName=oC.displayName;const cC=h.forwardRef(({className:e,...t},n)=>u.jsx(nC,{ref:n,className:pe("text-sm font-semibold",e),...t}));cC.displayName=nC.displayName;const uC=h.forwardRef(({className:e,...t},n)=>u.jsx(rC,{ref:n,className:pe("text-sm opacity-90",e),...t}));uC.displayName=rC.displayName;const XF=1,JF=1e6;let lh=0;function e4(){return lh=(lh+1)%Number.MAX_SAFE_INTEGER,lh.toString()}const ch=new Map,Sx=e=>{if(ch.has(e))return;const t=setTimeout(()=>{ch.delete(e),Fa({type:"REMOVE_TOAST",toastId:e})},JF);ch.set(e,t)},t4=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,XF)};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?Sx(n):e.toasts.forEach(r=>{Sx(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)}}},tu=[];let nu={toasts:[]};function Fa(e){nu=t4(nu,e),tu.forEach(t=>{t(nu)})}function n4({...e}){const t=e4(),n=s=>Fa({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Fa({type:"DISMISS_TOAST",toastId:t});return Fa({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function dC(){const[e,t]=h.useState(nu);return h.useEffect(()=>(tu.push(t),()=>{const n=tu.indexOf(t);n>-1&&tu.splice(n,1)}),[e]),{...e,toast:n4,dismiss:n=>Fa({type:"DISMISS_TOAST",toastId:n})}}function fC(){const{toasts:e}=dC();return u.jsxs(ZF,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return u.jsxs(aC,{...o,children:[u.jsxs("div",{className:"grid gap-1",children:[n&&u.jsx(cC,{children:n}),r&&u.jsx(uC,{children:r})]}),s,u.jsx(lC,{})]},t)}),u.jsx(iC,{})]})}var[Jd,qV]=Pr("Tooltip",[qi]),ef=qi(),hC="TooltipProvider",r4=700,Rp="tooltip.open",[s4,Wg]=Jd(hC),pC=e=>{const{__scopeTooltip:t,delayDuration:n=r4,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=h.useState(!0),l=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),u.jsx(s4,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(c.current),a(!1)},[]),onClose:h.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:h.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:o})};pC.displayName=hC;var tf="Tooltip",[o4,nf]=Jd(tf),mC=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,l=Wg(tf,e.__scopeTooltip),c=ef(t),[d,f]=h.useState(null),p=Cr(),y=h.useRef(0),x=i??l.disableHoverableContent,v=a??l.delayDuration,_=h.useRef(!1),[g=!1,m]=Ys({prop:r,defaultProp:s,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(Rp))):l.onClose(),o==null||o(N)}}),w=h.useMemo(()=>g?_.current?"delayed-open":"instant-open":"closed",[g]),b=h.useCallback(()=>{window.clearTimeout(y.current),_.current=!1,m(!0)},[m]),C=h.useCallback(()=>{window.clearTimeout(y.current),m(!1)},[m]),S=h.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{_.current=!0,m(!0)},v)},[v,m]);return h.useEffect(()=>()=>window.clearTimeout(y.current),[]),u.jsx(Xm,{...c,children:u.jsx(o4,{scope:t,contentId:p,open:g,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:h.useCallback(()=>{l.isOpenDelayed?S():b()},[l.isOpenDelayed,S,b]),onTriggerLeave:h.useCallback(()=>{x?C():window.clearTimeout(y.current)},[C,x]),onOpen:b,onClose:C,disableHoverableContent:x,children:n})})};mC.displayName=tf;var Pp="TooltipTrigger",gC=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=nf(Pp,n),o=Wg(Pp,n),i=ef(n),a=h.useRef(null),l=ze(t,a,s.onTriggerChange),c=h.useRef(!1),d=h.useRef(!1),f=h.useCallback(()=>c.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(Jm,{asChild:!0,...i,children:u.jsx(_e.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:te(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:te(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:te(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:te(e.onBlur,s.onClose),onClick:te(e.onClick,s.onClose)})})});gC.displayName=Pp;var i4="TooltipPortal",[QV,a4]=Jd(i4,{forceMount:void 0}),Li="TooltipContent",Yg=h.forwardRef((e,t)=>{const n=a4(Li,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=nf(Li,e.__scopeTooltip);return u.jsx(Mr,{present:r||i.open,children:i.disableHoverableContent?u.jsx(vC,{side:s,...o,ref:t}):u.jsx(l4,{side:s,...o,ref:t})})}),l4=h.forwardRef((e,t)=>{const n=nf(Li,e.__scopeTooltip),r=Wg(Li,e.__scopeTooltip),s=h.useRef(null),o=ze(t,s),[i,a]=h.useState(null),{trigger:l,onClose:c}=n,d=s.current,{onPointerInTransitChange:f}=r,p=h.useCallback(()=>{a(null),f(!1)},[f]),y=h.useCallback((x,v)=>{const _=x.currentTarget,g={x:x.clientX,y:x.clientY},m=f4(g,_.getBoundingClientRect()),w=h4(g,m),b=p4(v.getBoundingClientRect()),C=g4([...w,...b]);a(C),f(!0)},[f]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(l&&d){const x=_=>y(_,d),v=_=>y(_,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",v)}}},[l,d,y,p]),h.useEffect(()=>{if(i){const x=v=>{const _=v.target,g={x:v.clientX,y:v.clientY},m=(l==null?void 0:l.contains(_))||(d==null?void 0:d.contains(_)),w=!m4(g,i);m?p():w&&(p(),c())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,i,c,p]),u.jsx(vC,{...e,ref:o})}),[c4,u4]=Jd(tf,{isInside:!1}),vC=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=nf(Li,n),c=ef(n),{onClose:d}=l;return h.useEffect(()=>(document.addEventListener(Rp,d),()=>document.removeEventListener(Rp,d)),[d]),h.useEffect(()=>{if(l.trigger){const f=p=>{const y=p.target;y!=null&&y.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(Ki,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(eg,{"data-state":l.stateAttribute,...c,...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:[u.jsx(w_,{children:r}),u.jsx(c4,{scope:n,isInside:!0,children:u.jsx(PF,{id:l.contentId,role:"tooltip",children:s||r})})]})})});Yg.displayName=Li;var yC="TooltipArrow",d4=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ef(n);return u4(yC,n).isInside?null:u.jsx(tg,{...s,...r,ref:t})});d4.displayName=yC;function f4(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function h4(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 p4(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function m4(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,l=t[o].y,c=t[i].x,d=t[i].y;l>r!=d>r&&n<(c-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function g4(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),v4(t)}function v4(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}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 y4=mC,x4=gC,xC=Yg;const w4=y4,_4=x4,S4=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(xC,{ref:r,sideOffset:t,className:pe("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}));S4.displayName=xC.displayName;const wl=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)},b4=e=>wl(e).split(" ")[0],C4=async()=>Zt().collection("domains").getFullList({sort:"-created",expand:"lastDeployment"}),k4=async e=>await Zt().collection("domains").getOne(e),wC=async e=>e.id?await Zt().collection("domains").update(e.id,e):await Zt().collection("domains").create(e),E4=async e=>await Zt().collection("domains").delete(e),T4=()=>{const e=ro(),t=()=>{e("/edit")},n=l=>{e(`/edit?id=${l}`)},r=l=>{e(`/history?domain=${l}`)},s=async l=>{try{await E4(l),i(o.filter(c=>c.id!==l))}catch(c){console.error("Error deleting domain:",c)}},[o,i]=h.useState([]);h.useEffect(()=>{(async()=>{const c=await C4();i(c)})()},[]);const a=async l=>{const c=o.filter(y=>y.id===l),d=c[0].enabled,f=c[0];f.enabled=!d,await wC(f);const p=o.map(y=>y.id===l?{...y,checked:!d}:y);i(p)};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(fC,{}),u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),u.jsx(Dt,{onClick:t,children:"新增域名"})]}),o.length?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-40",children:"域名"}),u.jsx("div",{className:"w-48",children:"有效期限"}),u.jsx("div",{className:"w-32",children:"最近执行状态"}),u.jsx("div",{className:"w-64",children:"最近执行阶段"}),u.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),u.jsx("div",{className:"w-32",children:"是否启用"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),o.map(l=>{var c,d,f,p,y,x;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:l.domain}),u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx("div",{children:l.expiredAt?u.jsxs(u.Fragment,{children:[u.jsx("div",{children:"有效期90天"}),u.jsxs("div",{children:[b4(l.expiredAt),"到期"]})]}):"---"})}),u.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:l.lastDeployedAt&&((c=l.expand)!=null&&c.lastDeployment)?u.jsx(u.Fragment,{children:((d=l.expand.lastDeployment)==null?void 0:d.phase)==="deploy"&&((f=l.expand.lastDeployment)!=null&&f.phaseSuccess)?u.jsx(y_,{size:16,className:"text-green-700"}):u.jsx(x_,{size:16,className:"text-red-700"})}):"---"}),u.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:l.lastDeployedAt&&((p=l.expand)!=null&&p.lastDeployment)?u.jsx(Db,{phase:(y=l.expand.lastDeployment)==null?void 0:y.phase,phaseSuccess:(x=l.expand.lastDeployment)==null?void 0:x.phaseSuccess}):"---"}),u.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:l.lastDeployedAt?wl(l.lastDeployedAt):"---"}),u.jsx("div",{className:"sm:w-32 flex items-center",children:u.jsx(pC,{children:u.jsxs(w4,{children:[u.jsx(_4,{children:u.jsx(Vb,{checked:l.enabled,onCheckedChange:()=>{a(l.id)}})}),u.jsx(Yg,{children:u.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:l.enabled?"禁用":"启用"})})]})})}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(Dt,{variant:"link",className:"p-0",onClick:()=>r(l.id),children:"部署历史"}),!l.enabled&&u.jsxs(u.Fragment,{children:[u.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Dt,{variant:"link",className:"p-0",onClick:()=>s(l.id),children:"删除"}),u.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Dt,{variant:"link",className:"p-0",onClick:()=>n(l.id),children:"编辑"})]})]})]},l.id)})]}):u.jsx(u.Fragment,{children:u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(up,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),u.jsx(Dt,{onClick:t,className:"mt-3",children:"添加域名"})]})})]})})},gn=h.forwardRef(({className:e,type:t,...n},r)=>u.jsx("input",{type:t,className:pe("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}));gn.displayName="Input";var ql=e=>e.type==="checkbox",pi=e=>e instanceof Date,on=e=>e==null;const _C=e=>typeof e=="object";var Pt=e=>!on(e)&&!Array.isArray(e)&&_C(e)&&!pi(e),SC=e=>Pt(e)&&e.target?ql(e.target)?e.target.checked:e.target.value:e,N4=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,bC=(e,t)=>e.has(N4(t)),R4=e=>{const t=e.constructor&&e.constructor.prototype;return Pt(t)&&t.hasOwnProperty("isPrototypeOf")},Bg=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function pn(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(!(Bg&&(e instanceof Blob||e instanceof FileList))&&(n||Pt(e)))if(t=n?[]:{},!n&&!R4(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=pn(e[r]));else return e;return t}var rf=e=>Array.isArray(e)?e.filter(Boolean):[],xt=e=>e===void 0,K=(e,t,n)=>{if(!t||!Pt(e))return n;const r=rf(t.split(/[,[\].]+?/)).reduce((s,o)=>on(s)?s:s[o],e);return xt(r)||r===e?xt(e[t])?n:e[t]:r},xr=e=>typeof e=="boolean",Hg=e=>/^\w*$/.test(e),CC=e=>rf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),He=(e,t,n)=>{let r=-1;const s=Hg(t)?[t]:CC(t),o=s.length,i=o-1;for(;++r<o;){const a=s[r];let l=n;if(r!==i){const c=e[a];l=Pt(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(a==="__proto__")return;e[a]=l,e=e[a]}return e};const Hu={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Jn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Lr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},kC=De.createContext(null),sf=()=>De.useContext(kC),P4=e=>{const{children:t,...n}=e;return De.createElement(kC.Provider,{value:n},t)};var EC=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Jn.all&&(t._proxyFormState[i]=!r||Jn.all),n&&(n[i]=!0),e[i]}});return s},bn=e=>Pt(e)&&!Object.keys(e).length,TC=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return bn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||Jn.all))},Ua=e=>Array.isArray(e)?e:[e],NC=(e,t,n)=>!e||!t||e===t||Ua(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Kg(e){const t=De.useRef(e);t.current=e,De.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function M4(e){const t=sf(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,a]=De.useState(n._formState),l=De.useRef(!0),c=De.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=De.useRef(s);return d.current=s,Kg({disabled:r,next:f=>l.current&&NC(d.current,f.name,o)&&TC(f,c.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),De.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),EC(i,n,c.current,!1)}var _r=e=>typeof e=="string",RC=(e,t,n,r,s)=>_r(e)?(r&&t.watch.add(e),K(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),K(n,o))):(r&&(t.watchAll=!0),n);function O4(e){const t=sf(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},a=De.useRef(r);a.current=r,Kg({disabled:o,subject:n._subjects.values,next:d=>{NC(a.current,d.name,i)&&c(pn(RC(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=De.useState(n._getWatch(r,s));return De.useEffect(()=>n._removeUnmounted()),l}function D4(e){const t=sf(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=bC(s._names.array,n),a=O4({control:s,name:n,defaultValue:K(s._formValues,n,K(s._defaultValues,n,e.defaultValue)),exact:!0}),l=M4({control:s,name:n}),c=De.useRef(s.register(n,{...e.rules,value:a,...xr(e.disabled)?{disabled:e.disabled}:{}}));return De.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(p,y)=>{const x=K(s._fields,p);x&&x._f&&(x._f.mount=y)};if(f(n,!0),d){const p=pn(K(s._options.defaultValues,n));He(s._defaultValues,n,p),xt(K(s._formValues,n))&&He(s._formValues,n,p)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),De.useEffect(()=>{K(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:K(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...xr(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:De.useCallback(d=>c.current.onChange({target:{value:SC(d),name:n},type:Hu.CHANGE}),[n]),onBlur:De.useCallback(()=>c.current.onBlur({target:{value:K(s._formValues,n),name:n},type:Hu.BLUR}),[n,s]),ref:d=>{const f=K(s._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:()=>!!K(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!K(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!K(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!K(l.validatingFields,n)},error:{enumerable:!0,get:()=>K(l.errors,n)}})}}const j4=e=>e.render(D4(e));var PC=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},bx=e=>({isOnSubmit:!e||e===Jn.onSubmit,isOnBlur:e===Jn.onBlur,isOnChange:e===Jn.onChange,isOnAll:e===Jn.all,isOnTouch:e===Jn.onTouched}),Cx=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Va=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=K(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)break;if(i.ref&&t(i.ref,i.name)&&!r)break;Va(a,t)}else Pt(a)&&Va(a,t)}}};var A4=(e,t,n)=>{const r=Ua(K(e,n));return He(r,"root",t[n]),He(e,n,r),e},Gg=e=>e.type==="file",Os=e=>typeof e=="function",Ku=e=>{if(!Bg)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ru=e=>_r(e),Zg=e=>e.type==="radio",Gu=e=>e instanceof RegExp;const kx={value:!1,isValid:!1},Ex={value:!0,isValid:!0};var MC=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&&!xt(e[0].attributes.value)?xt(e[0].value)||e[0].value===""?Ex:{value:e[0].value,isValid:!0}:Ex:kx}return kx};const Tx={isValid:!1,value:null};var OC=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Tx):Tx;function Nx(e,t,n="validate"){if(ru(e)||Array.isArray(e)&&e.every(ru)||xr(e)&&!e)return{type:n,message:ru(e)?e:"",ref:t}}var Qo=e=>Pt(e)&&!Gu(e)?e:{value:e,message:""},Rx=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:c,min:d,max:f,pattern:p,validate:y,name:x,valueAsNumber:v,mount:_,disabled:g}=e._f,m=K(t,x);if(!_||g)return{};const w=i?i[0]:o,b=D=>{r&&w.reportValidity&&(w.setCustomValidity(xr(D)?"":D||""),w.reportValidity())},C={},S=Zg(o),N=ql(o),R=S||N,F=(v||Gg(o))&&xt(o.value)&&xt(m)||Ku(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,L=PC.bind(null,x,n,C),Z=(D,B,A,H=Lr.maxLength,ne=Lr.minLength)=>{const W=D?B:A;C[x]={type:D?H:ne,message:W,ref:o,...L(D?H:ne,W)}};if(s?!Array.isArray(m)||!m.length:a&&(!R&&(F||on(m))||xr(m)&&!m||N&&!MC(i).isValid||S&&!OC(i).isValid)){const{value:D,message:B}=ru(a)?{value:!!a,message:a}:Qo(a);if(D&&(C[x]={type:Lr.required,message:B,ref:w,...L(Lr.required,B)},!n))return b(B),C}if(!F&&(!on(d)||!on(f))){let D,B;const A=Qo(f),H=Qo(d);if(!on(m)&&!isNaN(m)){const ne=o.valueAsNumber||m&&+m;on(A.value)||(D=ne>A.value),on(H.value)||(B=ne<H.value)}else{const ne=o.valueAsDate||new Date(m),W=q=>new Date(new Date().toDateString()+" "+q),I=o.type=="time",O=o.type=="week";_r(A.value)&&m&&(D=I?W(m)>W(A.value):O?m>A.value:ne>new Date(A.value)),_r(H.value)&&m&&(B=I?W(m)<W(H.value):O?m<H.value:ne<new Date(H.value))}if((D||B)&&(Z(!!D,A.message,H.message,Lr.max,Lr.min),!n))return b(C[x].message),C}if((l||c)&&!F&&(_r(m)||s&&Array.isArray(m))){const D=Qo(l),B=Qo(c),A=!on(D.value)&&m.length>+D.value,H=!on(B.value)&&m.length<+B.value;if((A||H)&&(Z(A,D.message,B.message),!n))return b(C[x].message),C}if(p&&!F&&_r(m)){const{value:D,message:B}=Qo(p);if(Gu(D)&&!m.match(D)&&(C[x]={type:Lr.pattern,message:B,ref:o,...L(Lr.pattern,B)},!n))return b(B),C}if(y){if(Os(y)){const D=await y(m,t),B=Nx(D,w);if(B&&(C[x]={...B,...L(Lr.validate,B.message)},!n))return b(B.message),C}else if(Pt(y)){let D={};for(const B in y){if(!bn(D)&&!n)break;const A=Nx(await y[B](m,t),w,B);A&&(D={...A,...L(B,A.message)},b(A.message),n&&(C[x]=D))}if(!bn(D)&&(C[x]={ref:w,...D},!n))return C}}return b(!0),C};function I4(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=xt(e)?r++:e[t[r++]];return e}function L4(e){for(const t in e)if(e.hasOwnProperty(t)&&!xt(e[t]))return!1;return!0}function Et(e,t){const n=Array.isArray(t)?t:Hg(t)?[t]:CC(t),r=n.length===1?e:I4(e,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(Pt(r)&&bn(r)||Array.isArray(r)&&L4(r))&&Et(e,n.slice(0,-1)),e}var uh=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},Zu=e=>on(e)||!_C(e);function yo(e,t){if(Zu(e)||Zu(t))return e===t;if(pi(e)&&pi(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(pi(o)&&pi(i)||Pt(o)&&Pt(i)||Array.isArray(o)&&Array.isArray(i)?!yo(o,i):o!==i)return!1}}return!0}var DC=e=>e.type==="select-multiple",F4=e=>Zg(e)||ql(e),dh=e=>Ku(e)&&e.isConnected,jC=e=>{for(const t in e)if(Os(e[t]))return!0;return!1};function qu(e,t={}){const n=Array.isArray(e);if(Pt(e)||n)for(const r in e)Array.isArray(e[r])||Pt(e[r])&&!jC(e[r])?(t[r]=Array.isArray(e[r])?[]:{},qu(e[r],t[r])):on(e[r])||(t[r]=!0);return t}function AC(e,t,n){const r=Array.isArray(e);if(Pt(e)||r)for(const s in e)Array.isArray(e[s])||Pt(e[s])&&!jC(e[s])?xt(t)||Zu(n[s])?n[s]=Array.isArray(e[s])?qu(e[s],[]):{...qu(e[s])}:AC(e[s],on(t)?{}:t[s],n[s]):n[s]=!yo(e[s],t[s]);return n}var Ac=(e,t)=>AC(e,t,qu(t)),IC=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>xt(e)?e:t?e===""?NaN:e&&+e:n&&_r(e)?new Date(e):r?r(e):e;function fh(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Gg(t)?t.files:Zg(t)?OC(e.refs).value:DC(t)?[...t.selectedOptions].map(({value:n})=>n):ql(t)?MC(e.refs).value:IC(xt(t.value)?e.ref.value:t.value,e)}var U4=(e,t,n,r)=>{const s={};for(const o of e){const i=K(t,o);i&&He(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},ya=e=>xt(e)?e:Gu(e)?e.source:Pt(e)?Gu(e.value)?e.value.source:e.value:e,V4=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Px(e,t,n){const r=K(e,n);if(r||Hg(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=K(t,o),a=K(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var $4=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,z4=(e,t)=>!rf(K(e,t)).length&&Et(e,t);const W4={mode:Jn.onSubmit,reValidateMode:Jn.onChange,shouldFocusError:!0};function Y4(e={}){let t={...W4,...e},n={submitCount:0,isDirty:!1,isLoading:Os(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Pt(t.defaultValues)||Pt(t.values)?pn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:pn(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:uh(),array:uh(),state:uh()},p=bx(t.mode),y=bx(t.reValidateMode),x=t.criteriaMode===Jn.all,v=k=>P=>{clearTimeout(c),c=setTimeout(k,P)},_=async k=>{if(d.isValid||k){const P=t.resolver?bn((await R()).errors):await L(r,!0);P!==n.isValid&&f.state.next({isValid:P})}},g=(k,P)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(j=>{j&&(P?He(n.validatingFields,j,P):Et(n.validatingFields,j))}),f.state.next({validatingFields:n.validatingFields,isValidating:!bn(n.validatingFields)}))},m=(k,P=[],j,X,Q=!0,Y=!0)=>{if(X&&j){if(i.action=!0,Y&&Array.isArray(K(r,k))){const ce=j(K(r,k),X.argA,X.argB);Q&&He(r,k,ce)}if(Y&&Array.isArray(K(n.errors,k))){const ce=j(K(n.errors,k),X.argA,X.argB);Q&&He(n.errors,k,ce),z4(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(K(n.touchedFields,k))){const ce=j(K(n.touchedFields,k),X.argA,X.argB);Q&&He(n.touchedFields,k,ce)}d.dirtyFields&&(n.dirtyFields=Ac(s,o)),f.state.next({name:k,isDirty:D(k,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else He(o,k,P)},w=(k,P)=>{He(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,j,X)=>{const Q=K(r,k);if(Q){const Y=K(o,k,xt(j)?K(s,k):j);xt(Y)||X&&X.defaultChecked||P?He(o,k,P?Y:fh(Q._f)):H(k,Y),i.mount&&_()}},S=(k,P,j,X,Q)=>{let Y=!1,ce=!1;const Oe={name:k},dt=!!(K(r,k)&&K(r,k)._f&&K(r,k)._f.disabled);if(!j||X){d.isDirty&&(ce=n.isDirty,n.isDirty=Oe.isDirty=D(),Y=ce!==Oe.isDirty);const At=dt||yo(K(s,k),P);ce=!!(!dt&&K(n.dirtyFields,k)),At||dt?Et(n.dirtyFields,k):He(n.dirtyFields,k,!0),Oe.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&ce!==!At}if(j){const At=K(n.touchedFields,k);At||(He(n.touchedFields,k,j),Oe.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&At!==j)}return Y&&Q&&f.state.next(Oe),Y?Oe:{}},N=(k,P,j,X)=>{const Q=K(n.errors,k),Y=d.isValid&&xr(P)&&n.isValid!==P;if(e.delayError&&j?(l=v(()=>w(k,j)),l(e.delayError)):(clearTimeout(c),l=null,j?He(n.errors,k,j):Et(n.errors,k)),(j?!yo(Q,j):Q)||!bn(X)||Y){const ce={...X,...Y&&xr(P)?{isValid:P}:{},errors:n.errors,name:k};n={...n,...ce},f.state.next(ce)}},R=async k=>{g(k,!0);const P=await t.resolver(o,t.context,U4(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return g(k),P},F=async k=>{const{errors:P}=await R(k);if(k)for(const j of k){const X=K(P,j);X?He(n.errors,j,X):Et(n.errors,j)}else n.errors=P;return P},L=async(k,P,j={valid:!0})=>{for(const X in k){const Q=k[X];if(Q){const{_f:Y,...ce}=Q;if(Y){const Oe=a.array.has(Y.name);g([X],!0);const dt=await Rx(Q,o,x,t.shouldUseNativeValidation&&!P,Oe);if(g([X]),dt[Y.name]&&(j.valid=!1,P))break;!P&&(K(dt,Y.name)?Oe?A4(n.errors,dt,Y.name):He(n.errors,Y.name,dt[Y.name]):Et(n.errors,Y.name))}ce&&await L(ce,P,j)}}return j.valid},Z=()=>{for(const k of a.unMount){const P=K(r,k);P&&(P._f.refs?P._f.refs.every(j=>!dh(j)):!dh(P._f.ref))&&Le(k)}a.unMount=new Set},D=(k,P)=>(k&&P&&He(o,k,P),!yo(ae(),s)),B=(k,P,j)=>RC(k,a,{...i.mount?o:xt(P)?s:_r(k)?{[k]:P}:P},j,P),A=k=>rf(K(i.mount?o:s,k,e.shouldUnregister?K(s,k,[]):[])),H=(k,P,j={})=>{const X=K(r,k);let Q=P;if(X){const Y=X._f;Y&&(!Y.disabled&&He(o,k,IC(P,Y)),Q=Ku(Y.ref)&&on(P)?"":P,DC(Y.ref)?[...Y.ref.options].forEach(ce=>ce.selected=Q.includes(ce.value)):Y.refs?ql(Y.ref)?Y.refs.length>1?Y.refs.forEach(ce=>(!ce.defaultChecked||!ce.disabled)&&(ce.checked=Array.isArray(Q)?!!Q.find(Oe=>Oe===ce.value):Q===ce.value)):Y.refs[0]&&(Y.refs[0].checked=!!Q):Y.refs.forEach(ce=>ce.checked=ce.value===Q):Gg(Y.ref)?Y.ref.value="":(Y.ref.value=Q,Y.ref.type||f.values.next({name:k,values:{...o}})))}(j.shouldDirty||j.shouldTouch)&&S(k,Q,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&q(k)},ne=(k,P,j)=>{for(const X in P){const Q=P[X],Y=`${k}.${X}`,ce=K(r,Y);(a.array.has(k)||!Zu(Q)||ce&&!ce._f)&&!pi(Q)?ne(Y,Q,j):H(Y,Q,j)}},W=(k,P,j={})=>{const X=K(r,k),Q=a.array.has(k),Y=pn(P);He(o,k,Y),Q?(f.array.next({name:k,values:{...o}}),(d.isDirty||d.dirtyFields)&&j.shouldDirty&&f.state.next({name:k,dirtyFields:Ac(s,o),isDirty:D(k,Y)})):X&&!X._f&&!on(Y)?ne(k,Y,j):H(k,Y,j),Cx(k,a)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},I=async k=>{i.mount=!0;const P=k.target;let j=P.name,X=!0;const Q=K(r,j),Y=()=>P.type?fh(Q._f):SC(k),ce=Oe=>{X=Number.isNaN(Oe)||Oe===K(o,j,Oe)};if(Q){let Oe,dt;const At=Y(),nn=k.type===Hu.BLUR||k.type===Hu.FOCUS_OUT,Hn=!V4(Q._f)&&!t.resolver&&!K(n.errors,j)&&!Q._f.deps||$4(nn,K(n.touchedFields,j),n.isSubmitted,y,p),$o=Cx(j,a,nn);He(o,j,At),nn?(Q._f.onBlur&&Q._f.onBlur(k),l&&l(0)):Q._f.onChange&&Q._f.onChange(k);const ms=S(j,At,nn,!1),pf=!bn(ms)||$o;if(!nn&&f.values.next({name:j,type:k.type,values:{...o}}),Hn)return d.isValid&&_(),pf&&f.state.next({name:j,...$o?{}:ms});if(!nn&&$o&&f.state.next({...n}),t.resolver){const{errors:Kn}=await R([j]);if(ce(At),X){const Jl=Px(n.errors,r,j),ta=Px(Kn,r,Jl.name||j);Oe=ta.error,j=ta.name,dt=bn(Kn)}}else g([j],!0),Oe=(await Rx(Q,o,x,t.shouldUseNativeValidation))[j],g([j]),ce(At),X&&(Oe?dt=!1:d.isValid&&(dt=await L(r,!0)));X&&(Q._f.deps&&q(Q._f.deps),N(j,dt,Oe,ms))}},O=(k,P)=>{if(K(n.errors,P)&&k.focus)return k.focus(),1},q=async(k,P={})=>{let j,X;const Q=Ua(k);if(t.resolver){const Y=await F(xt(k)?k:Q);j=bn(Y),X=k?!Q.some(ce=>K(Y,ce)):j}else k?(X=(await Promise.all(Q.map(async Y=>{const ce=K(r,Y);return await L(ce&&ce._f?{[Y]:ce}:ce)}))).every(Boolean),!(!X&&!n.isValid)&&_()):X=j=await L(r);return f.state.next({...!_r(k)||d.isValid&&j!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:j}:{},errors:n.errors}),P.shouldFocus&&!X&&Va(r,O,k?Q:a.mount),X},ae=k=>{const P={...i.mount?o:s};return xt(k)?P:_r(k)?K(P,k):k.map(j=>K(P,j))},me=(k,P)=>({invalid:!!K((P||n).errors,k),isDirty:!!K((P||n).dirtyFields,k),error:K((P||n).errors,k),isValidating:!!K(n.validatingFields,k),isTouched:!!K((P||n).touchedFields,k)}),Qe=k=>{k&&Ua(k).forEach(P=>Et(n.errors,P)),f.state.next({errors:k?n.errors:{}})},Pe=(k,P,j)=>{const X=(K(r,k,{_f:{}})._f||{}).ref,Q=K(n.errors,k)||{},{ref:Y,message:ce,type:Oe,...dt}=Q;He(n.errors,k,{...dt,...P,ref:X}),f.state.next({name:k,errors:n.errors,isValid:!1}),j&&j.shouldFocus&&X&&X.focus&&X.focus()},ct=(k,P)=>Os(k)?f.values.subscribe({next:j=>k(B(void 0,P),j)}):B(k,P,!0),Le=(k,P={})=>{for(const j of k?Ua(k):a.mount)a.mount.delete(j),a.array.delete(j),P.keepValue||(Et(r,j),Et(o,j)),!P.keepError&&Et(n.errors,j),!P.keepDirty&&Et(n.dirtyFields,j),!P.keepTouched&&Et(n.touchedFields,j),!P.keepIsValidating&&Et(n.validatingFields,j),!t.shouldUnregister&&!P.keepDefaultValue&&Et(s,j);f.values.next({values:{...o}}),f.state.next({...n,...P.keepDirty?{isDirty:D()}:{}}),!P.keepIsValid&&_()},le=({disabled:k,name:P,field:j,fields:X,value:Q})=>{if(xr(k)&&i.mount||k){const Y=k?void 0:xt(Q)?fh(j?j._f:K(X,P)._f):Q;He(o,P,Y),S(P,Y,!1,!1,!0)}},Me=(k,P={})=>{let j=K(r,k);const X=xr(P.disabled);return He(r,k,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),j?le({field:j,disabled:P.disabled,name:k,value:P.value}):C(k,!0,P.value),{...X?{disabled:P.disabled}:{},...t.progressive?{required:!!P.required,min:ya(P.min),max:ya(P.max),minLength:ya(P.minLength),maxLength:ya(P.maxLength),pattern:ya(P.pattern)}:{},name:k,onChange:I,onBlur:I,ref:Q=>{if(Q){Me(k,P),j=K(r,k);const Y=xt(Q.value)&&Q.querySelectorAll&&Q.querySelectorAll("input,select,textarea")[0]||Q,ce=F4(Y),Oe=j._f.refs||[];if(ce?Oe.find(dt=>dt===Y):Y===j._f.ref)return;He(r,k,{_f:{...j._f,...ce?{refs:[...Oe.filter(dh),Y,...Array.isArray(K(s,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else j=K(r,k,{}),j._f&&(j._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(bC(a.array,k)&&i.action)&&a.unMount.add(k)}}},Ye=()=>t.shouldFocusError&&Va(r,O,a.mount),Fe=k=>{xr(k)&&(f.state.next({disabled:k}),Va(r,(P,j)=>{const X=K(r,j);X&&(P.disabled=X._f.disabled||k,Array.isArray(X._f.refs)&&X._f.refs.forEach(Q=>{Q.disabled=X._f.disabled||k}))},0,!1))},Ue=(k,P)=>async j=>{let X;j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let Q=pn(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:ce}=await R();n.errors=Y,Q=ce}else await L(r);if(Et(n.errors,"root"),bn(n.errors)){f.state.next({errors:{}});try{await k(Q,j)}catch(Y){X=Y}}else P&&await P({...n.errors},j),Ye(),setTimeout(Ye);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bn(n.errors)&&!X,submitCount:n.submitCount+1,errors:n.errors}),X)throw X},we=(k,P={})=>{K(r,k)&&(xt(P.defaultValue)?W(k,pn(K(s,k))):(W(k,P.defaultValue),He(s,k,pn(P.defaultValue))),P.keepTouched||Et(n.touchedFields,k),P.keepDirty||(Et(n.dirtyFields,k),n.isDirty=P.defaultValue?D(k,pn(K(s,k))):D()),P.keepError||(Et(n.errors,k),d.isValid&&_()),f.state.next({...n}))},ut=(k,P={})=>{const j=k?pn(k):s,X=pn(j),Q=bn(k),Y=Q?s:X;if(P.keepDefaultValues||(s=j),!P.keepValues){if(P.keepDirtyValues)for(const ce of a.mount)K(n.dirtyFields,ce)?He(Y,ce,K(o,ce)):W(ce,K(Y,ce));else{if(Bg&&xt(k))for(const ce of a.mount){const Oe=K(r,ce);if(Oe&&Oe._f){const dt=Array.isArray(Oe._f.refs)?Oe._f.refs[0]:Oe._f.ref;if(Ku(dt)){const At=dt.closest("form");if(At){At.reset();break}}}}r={}}o=e.shouldUnregister?P.keepDefaultValues?pn(s):{}:pn(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&&!yo(k,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Q?{}:P.keepDirtyValues?P.keepDefaultValues&&o?Ac(s,o):n.dirtyFields:P.keepDefaultValues&&k?Ac(s,k):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Wt=(k,P)=>ut(Os(k)?k(o):k,P);return{control:{register:Me,unregister:Le,getFieldState:me,handleSubmit:Ue,setError:Pe,_executeSchema:R,_getWatch:B,_getDirty:D,_updateValid:_,_removeUnmounted:Z,_updateFieldArray:m,_updateDisabledField:le,_getFieldArray:A,_reset:ut,_resetDefaultValues:()=>Os(t.defaultValues)&&t.defaultValues().then(k=>{Wt(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:Fe,_subjects:f,_proxyFormState:d,_setErrors:b,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(k){i=k},get _defaultValues(){return s},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:q,register:Me,handleSubmit:Ue,watch:ct,setValue:W,getValues:ae,reset:Wt,resetField:we,clearErrors:Qe,unregister:Le,setError:Pe,setFocus:(k,P={})=>{const j=K(r,k),X=j&&j._f;if(X){const Q=X.refs?X.refs[0]:X.ref;Q.focus&&(Q.focus(),P.shouldSelect&&Q.select())}},getFieldState:me}}function of(e={}){const t=De.useRef(),n=De.useRef(),[r,s]=De.useState({isDirty:!1,isValidating:!1,isLoading:Os(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Os(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Y4(e),formState:r});const o=t.current.control;return o._options=e,Kg({subject:o._subjects.state,next:i=>{TC(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),De.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),De.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),De.useEffect(()=>{e.values&&!yo(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),De.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),De.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),De.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=EC(r,o),t.current}const Mx=(e,t,n)=>{if(e&&"reportValidity"in e){const r=K(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},LC=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Mx(r.ref,n,e):r.refs&&r.refs.forEach(s=>Mx(s,n,e))}},B4=(e,t)=>{t.shouldUseNativeValidation&&LC(e,t);const n={};for(const r in e){const s=K(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(H4(t.names||Object.keys(e),r)){const i=Object.assign({},K(n,r));He(i,"root",o),He(n,r,i)}else He(n,r,o)}return n},H4=(e,t)=>e.some(n=>n.startsWith(t+"."));var K4=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=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:o,type:s};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,c=l&&l[r.code];n[i]=PC(i,t,n,s,c?[].concat(c,r.message):r.message)}e.shift()}return n},af=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return o.shouldUseNativeValidation&&LC({},o),{errors:{},values:n.raw?r:c}})}catch(c){return a(c)}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:B4(K4(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},Ae;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Ae||(Ae={}));var Mp;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Mp||(Mp={}));const se=Ae.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ts=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},$=Ae.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"]),G4=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(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(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 c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(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,Ae.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Mn.create=e=>new Mn(e);const Fi=(e,t)=>{let n;switch(e.code){case $.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case $.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ae.jsonStringifyReplacer)}`;break;case $.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ae.joinValues(e.keys,", ")}`;break;case $.invalid_union:n="Invalid input";break;case $.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ae.joinValues(e.options)}`;break;case $.invalid_enum_value:n=`Invalid enum value. Expected ${Ae.joinValues(e.options)}, received '${e.received}'`;break;case $.invalid_arguments:n="Invalid function arguments";break;case $.invalid_return_type:n="Invalid function return type";break;case $.invalid_date:n="Invalid date";break;case $.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}"`:Ae.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case $.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 $.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 $.custom:n="Invalid input";break;case $.invalid_intersection_types:n="Intersection results could not be merged";break;case $.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case $.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ae.assertNever(e)}return{message:n}};let FC=Fi;function Z4(e){FC=e}function Qu(){return FC}const Xu=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},q4=[];function J(e,t){const n=Qu(),r=Xu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Fi?void 0:Fi].filter(s=>!!s)});e.common.issues.push(r)}class en{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 s of n){if(s.status==="aborted")return xe;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return en.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return xe;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:t.value,value:r}}}const xe=Object.freeze({status:"aborted"}),mi=e=>({status:"dirty",value:e}),ln=e=>({status:"valid",value:e}),Op=e=>e.status==="aborted",Dp=e=>e.status==="dirty",_l=e=>e.status==="valid",Sl=e=>typeof Promise<"u"&&e instanceof Promise;function Ju(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 UC(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!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 de;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(de||(de={}));var ka,Ea;class Nr{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}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 Ox=(e,t)=>{if(_l(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 Se(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=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:s}:{errorMap:(i,a)=>{var l,c;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:(c=d??n)!==null&&c!==void 0?c:a.defaultError}},description:s}}class Te{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 Ts(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ts(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new en,ctx:{common:t.parent.common,data:t.data,parsedType:Ts(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Sl(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 s={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:Ts(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Ox(s,o)}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:Ts(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(Sl(s)?s:Promise.resolve(s));return Ox(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:$.custom,...r(s)});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,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new ur({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return kr.create(this,this._def)}nullable(){return Qs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return sr.create(this,this._def)}promise(){return Vi.create(this,this._def)}or(t){return El.create([this,t],this._def)}and(t){return Tl.create(this,t,this._def)}transform(t){return new ur({...Se(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ol({...Se(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new qg({typeName:ve.ZodBranded,type:this,...Se(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Dl({...Se(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ql.create(this,t)}readonly(){return jl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Q4=/^c[^\s-]{8,}$/i,X4=/^[0-9a-z]+$/,J4=/^[0-9A-HJKMNP-TV-Z]{26}$/,eU=/^[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,tU=/^[a-z0-9_-]{21}$/i,nU=/^[-+]?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)?)??$/,rU=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let hh;const oU=/^(?:(?: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])$/,iU=/^(([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})))$/,aU=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,VC="((\\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])))",lU=new RegExp(`^${VC}$`);function $C(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 cU(e){return new RegExp(`^${$C(e)}$`)}function zC(e){let t=`${VC}T${$C(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 uU(e,t){return!!((t==="v4"||!t)&&oU.test(e)||(t==="v6"||!t)&&iU.test(e))}class tr extends Te{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const o=this._getOrReturnCtx(t);return J(o,{code:$.invalid_type,expected:se.string,received:o.parsedType}),xe}const r=new en;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:$.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:$.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?J(s,{code:$.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&J(s,{code:$.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")rU.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"email",code:$.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")hh||(hh=new RegExp(sU,"u")),hh.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"emoji",code:$.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")eU.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"uuid",code:$.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")tU.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"nanoid",code:$.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Q4.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"cuid",code:$.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")X4.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"cuid2",code:$.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")J4.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"ulid",code:$.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),J(s,{validation:"url",code:$.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"regex",code:$.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),J(s,{code:$.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),J(s,{code:$.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),J(s,{code:$.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?zC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{code:$.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?lU.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{code:$.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?cU(o).test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{code:$.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?nU.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"duration",code:$.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?uU(t.data,o.version)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"ip",code:$.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?aU.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"base64",code:$.invalid_string,message:o.message}),r.dirty()):Ae.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:$.invalid_string,...de.errToObj(r)})}_addCheck(t){return new tr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...de.errToObj(t)})}url(t){return this._addCheck({kind:"url",...de.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...de.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...de.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...de.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...de.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...de.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...de.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...de.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...de.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,...de.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,...de.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...de.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...de.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...de.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...de.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...de.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...de.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...de.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...de.errToObj(n)})}nonempty(t){return this.min(1,de.errToObj(t))}trim(){return new tr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new tr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new tr({...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}}tr.create=e=>{var t;return new tr({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Se(e)})};function dU(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class Gs extends Te{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)!==se.number){const o=this._getOrReturnCtx(t);return J(o,{code:$.invalid_type,expected:se.number,received:o.parsedType}),xe}let r;const s=new en;for(const o of this._def.checks)o.kind==="int"?Ae.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:$.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:$.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:$.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?dU(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),J(r,{code:$.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:$.not_finite,message:o.message}),s.dirty()):Ae.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,s){return new Gs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(s)}]})}_addCheck(t){return new Gs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:de.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:de.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.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"&&Ae.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)}}Gs.create=e=>new Gs({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Se(e)});class Zs extends Te{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)!==se.bigint){const o=this._getOrReturnCtx(t);return J(o,{code:$.invalid_type,expected:se.bigint,received:o.parsedType}),xe}let r;const s=new en;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:$.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:$.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),J(r,{code:$.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ae.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,s){return new Zs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(s)}]})}_addCheck(t){return new Zs({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.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}}Zs.create=e=>{var t;return new Zs({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Se(e)})};class bl extends Te{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return J(r,{code:$.invalid_type,expected:se.boolean,received:r.parsedType}),xe}return ln(t.data)}}bl.create=e=>new bl({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Se(e)});class Oo extends Te{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const o=this._getOrReturnCtx(t);return J(o,{code:$.invalid_type,expected:se.date,received:o.parsedType}),xe}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return J(o,{code:$.invalid_date}),xe}const r=new en;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:$.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:$.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ae.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Oo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:de.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:de.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}}Oo.create=e=>new Oo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...Se(e)});class ed extends Te{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return J(r,{code:$.invalid_type,expected:se.symbol,received:r.parsedType}),xe}return ln(t.data)}}ed.create=e=>new ed({typeName:ve.ZodSymbol,...Se(e)});class Cl extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:$.invalid_type,expected:se.undefined,received:r.parsedType}),xe}return ln(t.data)}}Cl.create=e=>new Cl({typeName:ve.ZodUndefined,...Se(e)});class kl extends Te{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return J(r,{code:$.invalid_type,expected:se.null,received:r.parsedType}),xe}return ln(t.data)}}kl.create=e=>new kl({typeName:ve.ZodNull,...Se(e)});class Ui extends Te{constructor(){super(...arguments),this._any=!0}_parse(t){return ln(t.data)}}Ui.create=e=>new Ui({typeName:ve.ZodAny,...Se(e)});class So extends Te{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ln(t.data)}}So.create=e=>new So({typeName:ve.ZodUnknown,...Se(e)});class os extends Te{_parse(t){const n=this._getOrReturnCtx(t);return J(n,{code:$.invalid_type,expected:se.never,received:n.parsedType}),xe}}os.create=e=>new os({typeName:ve.ZodNever,...Se(e)});class td extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:$.invalid_type,expected:se.void,received:r.parsedType}),xe}return ln(t.data)}}td.create=e=>new td({typeName:ve.ZodVoid,...Se(e)});class sr extends Te{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==se.array)return J(n,{code:$.invalid_type,expected:se.array,received:n.parsedType}),xe;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(i||a)&&(J(n,{code:i?$.too_big:$.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(J(n,{code:$.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(J(n,{code:$.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new Nr(n,i,n.path,a)))).then(i=>en.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new Nr(n,i,n.path,a)));return en.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new sr({...this._def,minLength:{value:t,message:de.toString(n)}})}max(t,n){return new sr({...this._def,maxLength:{value:t,message:de.toString(n)}})}length(t,n){return new sr({...this._def,exactLength:{value:t,message:de.toString(n)}})}nonempty(t){return this.min(1,t)}}sr.create=(e,t)=>new sr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Se(t)});function Jo(e){if(e instanceof ft){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=kr.create(Jo(r))}return new ft({...e._def,shape:()=>t})}else return e instanceof sr?new sr({...e._def,type:Jo(e.element)}):e instanceof kr?kr.create(Jo(e.unwrap())):e instanceof Qs?Qs.create(Jo(e.unwrap())):e instanceof Rr?Rr.create(e.items.map(t=>Jo(t))):e}class ft extends Te{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=Ae.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const c=this._getOrReturnCtx(t);return J(c,{code:$.invalid_type,expected:se.object,received:c.parsedType}),xe}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof os&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const d=o[c],f=s.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new Nr(s,f,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof os){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(c==="strict")a.length>0&&(J(s,{code:$.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of a){const f=s.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new Nr(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const f=await d.key,p=await d.value;c.push({key:f,value:p,alwaysSet:d.alwaysSet})}return c}).then(c=>en.mergeObjectSync(r,c)):en.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return de.errToObj,new ft({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=de.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ft({...this._def,unknownKeys:"strip"})}passthrough(){return new ft({...this._def,unknownKeys:"passthrough"})}extend(t){return new ft({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ft({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ft({...this._def,catchall:t})}pick(t){const n={};return Ae.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ft({...this._def,shape:()=>n})}omit(t){const n={};return Ae.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ft({...this._def,shape:()=>n})}deepPartial(){return Jo(this)}partial(t){const n={};return Ae.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new ft({...this._def,shape:()=>n})}required(t){const n={};return Ae.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof kr;)o=o._def.innerType;n[r]=o}}),new ft({...this._def,shape:()=>n})}keyof(){return WC(Ae.objectKeys(this.shape))}}ft.create=(e,t)=>new ft({shape:()=>e,unknownKeys:"strip",catchall:os.create(),typeName:ve.ZodObject,...Se(t)});ft.strictCreate=(e,t)=>new ft({shape:()=>e,unknownKeys:"strict",catchall:os.create(),typeName:ve.ZodObject,...Se(t)});ft.lazycreate=(e,t)=>new ft({shape:e,unknownKeys:"strip",catchall:os.create(),typeName:ve.ZodObject,...Se(t)});class El extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Mn(a.ctx.common.issues));return J(n,{code:$.invalid_union,unionErrors:i}),xe}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new Mn(l));return J(n,{code:$.invalid_union,unionErrors:a}),xe}}get options(){return this._def.options}}El.create=(e,t)=>new El({options:e,typeName:ve.ZodUnion,...Se(t)});const Fr=e=>e instanceof Rl?Fr(e.schema):e instanceof ur?Fr(e.innerType()):e instanceof Pl?[e.value]:e instanceof qs?e.options:e instanceof Ml?Ae.objectValues(e.enum):e instanceof Ol?Fr(e._def.innerType):e instanceof Cl?[void 0]:e instanceof kl?[null]:e instanceof kr?[void 0,...Fr(e.unwrap())]:e instanceof Qs?[null,...Fr(e.unwrap())]:e instanceof qg||e instanceof jl?Fr(e.unwrap()):e instanceof Dl?Fr(e._def.innerType):[];class lf extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return J(n,{code:$.invalid_type,expected:se.object,received:n.parsedType}),xe;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:$.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const i=Fr(o.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(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new lf({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Se(r)})}}function jp(e,t){const n=Ts(e),r=Ts(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const s=Ae.objectKeys(t),o=Ae.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const l=jp(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const i=e[o],a=t[o],l=jp(i,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===se.date&&r===se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Tl extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,i)=>{if(Op(o)||Op(i))return xe;const a=jp(o.value,i.value);return a.valid?((Dp(o)||Dp(i))&&n.dirty(),{status:n.value,value:a.data}):(J(r,{code:$.invalid_intersection_types}),xe)};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(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Tl.create=(e,t,n)=>new Tl({left:e,right:t,typeName:ve.ZodIntersection,...Se(n)});class Rr extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return J(r,{code:$.invalid_type,expected:se.array,received:r.parsedType}),xe;if(r.data.length<this._def.items.length)return J(r,{code:$.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:$.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Nr(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>en.mergeArray(n,i)):en.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Rr({...this._def,rest:t})}}Rr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rr({items:e,typeName:ve.ZodTuple,rest:null,...Se(t)})};class Nl extends Te{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!==se.object)return J(r,{code:$.invalid_type,expected:se.object,received:r.parsedType}),xe;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new Nr(r,a,r.path,a)),value:i._parse(new Nr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?en.mergeObjectAsync(n,s):en.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Te?new Nl({keyType:t,valueType:n,typeName:ve.ZodRecord,...Se(r)}):new Nl({keyType:tr.create(),valueType:t,typeName:ve.ZodRecord,...Se(n)})}}class nd extends Te{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!==se.map)return J(r,{code:$.invalid_type,expected:se.map,received:r.parsedType}),xe;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:s._parse(new Nr(r,a,r.path,[c,"key"])),value:o._parse(new Nr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return xe;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(c.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return xe;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(c.value,d.value)}return{status:n.value,value:a}}}}nd.create=(e,t,n)=>new nd({valueType:t,keyType:e,typeName:ve.ZodMap,...Se(n)});class Do extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return J(r,{code:$.invalid_type,expected:se.set,received:r.parsedType}),xe;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(J(r,{code:$.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(J(r,{code:$.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const d of l){if(d.status==="aborted")return xe;d.status==="dirty"&&n.dirty(),c.add(d.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>o._parse(new Nr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Do({...this._def,minSize:{value:t,message:de.toString(n)}})}max(t,n){return new Do({...this._def,maxSize:{value:t,message:de.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Do.create=(e,t)=>new Do({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...Se(t)});class Ni extends Te{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return J(n,{code:$.invalid_type,expected:se.function,received:n.parsedType}),xe;function r(a,l){return Xu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qu(),Fi].filter(c=>!!c),issueData:{code:$.invalid_arguments,argumentsError:l}})}function s(a,l){return Xu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qu(),Fi].filter(c=>!!c),issueData:{code:$.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Vi){const a=this;return ln(async function(...l){const c=new Mn([]),d=await a._def.args.parseAsync(l,o).catch(y=>{throw c.addIssue(r(l,y)),c}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(y=>{throw c.addIssue(s(f,y)),c})})}else{const a=this;return ln(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new Mn([r(l,c.error)]);const d=Reflect.apply(i,this,c.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new Mn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ni({...this._def,args:Rr.create(t).rest(So.create())})}returns(t){return new Ni({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ni({args:t||Rr.create([]).rest(So.create()),returns:n||So.create(),typeName:ve.ZodFunction,...Se(r)})}}class Rl extends Te{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})}}Rl.create=(e,t)=>new Rl({getter:e,typeName:ve.ZodLazy,...Se(t)});class Pl extends Te{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return J(n,{received:n.data,code:$.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Pl.create=(e,t)=>new Pl({value:e,typeName:ve.ZodLiteral,...Se(t)});function WC(e,t){return new qs({values:e,typeName:ve.ZodEnum,...Se(t)})}class qs extends Te{constructor(){super(...arguments),ka.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{expected:Ae.joinValues(r),received:n.parsedType,code:$.invalid_type}),xe}if(Ju(this,ka)||UC(this,ka,new Set(this._def.values)),!Ju(this,ka).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{received:n.data,code:$.invalid_enum_value,options:r}),xe}return ln(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 qs.create(t,{...this._def,...n})}exclude(t,n=this._def){return qs.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ka=new WeakMap;qs.create=WC;class Ml extends Te{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){const n=Ae.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const s=Ae.objectValues(n);return J(r,{expected:Ae.joinValues(s),received:r.parsedType,code:$.invalid_type}),xe}if(Ju(this,Ea)||UC(this,Ea,new Set(Ae.getValidEnumValues(this._def.values))),!Ju(this,Ea).has(t.data)){const s=Ae.objectValues(n);return J(r,{received:r.data,code:$.invalid_enum_value,options:s}),xe}return ln(t.data)}get enum(){return this._def.values}}Ea=new WeakMap;Ml.create=(e,t)=>new Ml({values:e,typeName:ve.ZodNativeEnum,...Se(t)});class Vi extends Te{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return J(n,{code:$.invalid_type,expected:se.promise,received:n.parsedType}),xe;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return ln(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Vi.create=(e,t)=>new Vi({type:e,typeName:ve.ZodPromise,...Se(t)});class ur extends Te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{J(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return xe;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?xe:l.status==="dirty"||n.value==="dirty"?mi(l.value):l});{if(n.value==="aborted")return xe;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?xe:a.status==="dirty"||n.value==="dirty"?mi(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);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"?xe:(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"?xe:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!_l(i))return i;const a=s.transform(i.value,o);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=>_l(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);Ae.assertNever(s)}}ur.create=(e,t,n)=>new ur({schema:e,typeName:ve.ZodEffects,effect:t,...Se(n)});ur.createWithPreprocess=(e,t,n)=>new ur({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...Se(n)});class kr extends Te{_parse(t){return this._getType(t)===se.undefined?ln(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}kr.create=(e,t)=>new kr({innerType:e,typeName:ve.ZodOptional,...Se(t)});class Qs extends Te{_parse(t){return this._getType(t)===se.null?ln(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qs.create=(e,t)=>new Qs({innerType:e,typeName:ve.ZodNullable,...Se(t)});class Ol extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.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:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Se(t)});class Dl extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Sl(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Mn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Mn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Dl.create=(e,t)=>new Dl({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Se(t)});class rd extends Te{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return J(r,{code:$.invalid_type,expected:se.nan,received:r.parsedType}),xe}return{status:"valid",value:t.data}}}rd.create=e=>new rd({typeName:ve.ZodNaN,...Se(e)});const fU=Symbol("zod_brand");class qg extends Te{_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 Ql extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?xe:o.status==="dirty"?(n.dirty(),mi(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?xe:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new Ql({in:t,out:n,typeName:ve.ZodPipeline})}}class jl extends Te{_parse(t){const n=this._def.innerType._parse(t),r=s=>(_l(s)&&(s.value=Object.freeze(s.value)),s);return Sl(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}jl.create=(e,t)=>new jl({innerType:e,typeName:ve.ZodReadonly,...Se(t)});function YC(e,t={},n){return e?Ui.create().superRefine((r,s)=>{var o,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...c,fatal:l})}}):Ui.create()}const hU={object:ft.lazycreate};var ve;(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"})(ve||(ve={}));const pU=(e,t={message:`Input not instance of ${e.name}`})=>YC(n=>n instanceof e,t),BC=tr.create,HC=Gs.create,mU=rd.create,gU=Zs.create,KC=bl.create,vU=Oo.create,yU=ed.create,xU=Cl.create,wU=kl.create,_U=Ui.create,SU=So.create,bU=os.create,CU=td.create,kU=sr.create,EU=ft.create,TU=ft.strictCreate,NU=El.create,RU=lf.create,PU=Tl.create,MU=Rr.create,OU=Nl.create,DU=nd.create,jU=Do.create,AU=Ni.create,IU=Rl.create,LU=Pl.create,FU=qs.create,UU=Ml.create,VU=Vi.create,Dx=ur.create,$U=kr.create,zU=Qs.create,WU=ur.createWithPreprocess,YU=Ql.create,BU=()=>BC().optional(),HU=()=>HC().optional(),KU=()=>KC().optional(),GU={string:e=>tr.create({...e,coerce:!0}),number:e=>Gs.create({...e,coerce:!0}),boolean:e=>bl.create({...e,coerce:!0}),bigint:e=>Zs.create({...e,coerce:!0}),date:e=>Oo.create({...e,coerce:!0})},ZU=xe;var wt=Object.freeze({__proto__:null,defaultErrorMap:Fi,setErrorMap:Z4,getErrorMap:Qu,makeIssue:Xu,EMPTY_PATH:q4,addIssueToContext:J,ParseStatus:en,INVALID:xe,DIRTY:mi,OK:ln,isAborted:Op,isDirty:Dp,isValid:_l,isAsync:Sl,get util(){return Ae},get objectUtil(){return Mp},ZodParsedType:se,getParsedType:Ts,ZodType:Te,datetimeRegex:zC,ZodString:tr,ZodNumber:Gs,ZodBigInt:Zs,ZodBoolean:bl,ZodDate:Oo,ZodSymbol:ed,ZodUndefined:Cl,ZodNull:kl,ZodAny:Ui,ZodUnknown:So,ZodNever:os,ZodVoid:td,ZodArray:sr,ZodObject:ft,ZodUnion:El,ZodDiscriminatedUnion:lf,ZodIntersection:Tl,ZodTuple:Rr,ZodRecord:Nl,ZodMap:nd,ZodSet:Do,ZodFunction:Ni,ZodLazy:Rl,ZodLiteral:Pl,ZodEnum:qs,ZodNativeEnum:Ml,ZodPromise:Vi,ZodEffects:ur,ZodTransformer:ur,ZodOptional:kr,ZodNullable:Qs,ZodDefault:Ol,ZodCatch:Dl,ZodNaN:rd,BRAND:fU,ZodBranded:qg,ZodPipeline:Ql,ZodReadonly:jl,custom:YC,Schema:Te,ZodSchema:Te,late:hU,get ZodFirstPartyTypeKind(){return ve},coerce:GU,any:_U,array:kU,bigint:gU,boolean:KC,date:vU,discriminatedUnion:RU,effect:Dx,enum:FU,function:AU,instanceof:pU,intersection:PU,lazy:IU,literal:LU,map:DU,nan:mU,nativeEnum:UU,never:bU,null:wU,nullable:zU,number:HC,object:EU,oboolean:KU,onumber:HU,optional:$U,ostring:BU,pipeline:YU,preprocess:WU,promise:VU,record:OU,set:jU,strictObject:TU,string:BC,symbol:yU,transformer:Dx,tuple:MU,undefined:xU,union:NU,unknown:SU,void:CU,NEVER:ZU,ZodIssueCode:$,quotelessJson:G4,ZodError:Mn}),qU="Label",GC=h.forwardRef((e,t)=>u.jsx(_e.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));GC.displayName=qU;var ZC=GC;const QU=Vl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qg=h.forwardRef(({className:e,...t},n)=>u.jsx(ZC,{ref:n,className:pe(QU(),e),...t}));Qg.displayName=ZC.displayName;const cf=P4,qC=h.createContext({}),Gt=({...e})=>u.jsx(qC.Provider,{value:{name:e.name},children:u.jsx(j4,{...e})}),uf=()=>{const e=h.useContext(qC),t=h.useContext(QC),{getFieldState:n,formState:r}=sf(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},QC=h.createContext({}),Ft=h.forwardRef(({className:e,...t},n)=>{const r=h.useId();return u.jsx(QC.Provider,{value:{id:r},children:u.jsx("div",{ref:n,className:pe("space-y-2",e),...t})})});Ft.displayName="FormItem";const Ut=h.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=uf();return u.jsx(Qg,{ref:n,className:pe(r&&"text-destructive",e),htmlFor:s,...t})});Ut.displayName="FormLabel";const Vt=h.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=uf();return u.jsx(ts,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});Vt.displayName="FormControl";const XU=h.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=uf();return u.jsx("p",{ref:n,id:r,className:pe("text-sm text-muted-foreground",e),...t})});XU.displayName="FormDescription";const Ot=h.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=uf(),i=s?String(s==null?void 0:s.message):t;return i?u.jsx("p",{ref:r,id:o,className:pe("text-sm font-medium text-destructive",e),...n,children:i}):null});Ot.displayName="FormMessage";function jx(e,[t,n]){return Math.min(n,Math.max(t,e))}var JU=[" ","Enter","ArrowUp","ArrowDown"],eV=[" ","Enter"],Xl="Select",[df,ff,tV]=Ed(Xl),[ea,XV]=Pr(Xl,[tV,qi]),hf=qi(),[nV,so]=ea(Xl),[rV,sV]=ea(Xl),XC=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:p,required:y}=e,x=hf(t),[v,_]=h.useState(null),[g,m]=h.useState(null),[w,b]=h.useState(!1),C=zm(c),[S=!1,N]=Ys({prop:r,defaultProp:s,onChange:o}),[R,F]=Ys({prop:i,defaultProp:a,onChange:l}),L=h.useRef(null),Z=v?!!v.closest("form"):!0,[D,B]=h.useState(new Set),A=Array.from(D).map(H=>H.props.value).join(";");return u.jsx(Xm,{...x,children:u.jsxs(nV,{required:y,scope:t,trigger:v,onTriggerChange:_,valueNode:g,onValueNodeChange:m,valueNodeHasChildren:w,onValueNodeHasChildrenChange:b,contentId:Cr(),value:R,onValueChange:F,open:S,onOpenChange:N,dir:C,triggerPointerDownPosRef:L,disabled:p,children:[u.jsx(df.Provider,{scope:t,children:u.jsx(rV,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(H=>{B(ne=>new Set(ne).add(H))},[]),onNativeOptionRemove:h.useCallback(H=>{B(ne=>{const W=new Set(ne);return W.delete(H),W})},[]),children:n})}),Z?u.jsxs(Ck,{"aria-hidden":!0,required:y,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:H=>F(H.target.value),disabled:p,children:[R===void 0?u.jsx("option",{value:""}):null,Array.from(D)]},A):null]})})};XC.displayName=Xl;var JC="SelectTrigger",ek=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=hf(n),i=so(JC,n),a=i.disabled||r,l=ze(t,i.onTriggerChange),c=ff(n),[d,f,p]=kk(x=>{const v=c().filter(m=>!m.disabled),_=v.find(m=>m.value===i.value),g=Ek(v,x,_);g!==void 0&&i.onValueChange(g.value)}),y=()=>{a||(i.onOpenChange(!0),p())};return u.jsx(Jm,{asChild:!0,...o,children:u.jsx(_e.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":bk(i.value)?"":void 0,...s,ref:l,onClick:te(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:te(s.onPointerDown,x=>{const v=x.target;v.hasPointerCapture(x.pointerId)&&v.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(y(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:te(s.onKeyDown,x=>{const v=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(v&&x.key===" ")&&JU.includes(x.key)&&(y(),x.preventDefault())})})})});ek.displayName=JC;var tk="SelectValue",nk=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,l=so(tk,n),{onValueNodeHasChildrenChange:c}=l,d=o!==void 0,f=ze(t,l.onValueNodeChange);return Jt(()=>{c(d)},[c,d]),u.jsx(_e.span,{...a,ref:f,style:{pointerEvents:"none"},children:bk(l.value)?u.jsx(u.Fragment,{children:i}):o})});nk.displayName=tk;var oV="SelectIcon",rk=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return u.jsx(_e.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});rk.displayName=oV;var iV="SelectPortal",sk=e=>u.jsx(zl,{asChild:!0,...e});sk.displayName=iV;var jo="SelectContent",ok=h.forwardRef((e,t)=>{const n=so(jo,e.__scopeSelect),[r,s]=h.useState();if(Jt(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?as.createPortal(u.jsx(ik,{scope:e.__scopeSelect,children:u.jsx(df.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),o):null}return u.jsx(ak,{...e,ref:t})});ok.displayName=jo;var $r=10,[ik,oo]=ea(jo),aV="SelectContentImpl",ak=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:y,sticky:x,hideWhenDetached:v,avoidCollisions:_,...g}=e,m=so(jo,n),[w,b]=h.useState(null),[C,S]=h.useState(null),N=ze(t,le=>b(le)),[R,F]=h.useState(null),[L,Z]=h.useState(null),D=ff(n),[B,A]=h.useState(!1),H=h.useRef(!1);h.useEffect(()=>{if(w)return ng(w)},[w]),Wm();const ne=h.useCallback(le=>{const[Me,...Ye]=D().map(we=>we.ref.current),[Fe]=Ye.slice(-1),Ue=document.activeElement;for(const we of le)if(we===Ue||(we==null||we.scrollIntoView({block:"nearest"}),we===Me&&C&&(C.scrollTop=0),we===Fe&&C&&(C.scrollTop=C.scrollHeight),we==null||we.focus(),document.activeElement!==Ue))return},[D,C]),W=h.useCallback(()=>ne([R,w]),[ne,R,w]);h.useEffect(()=>{B&&W()},[B,W]);const{onOpenChange:I,triggerPointerDownPosRef:O}=m;h.useEffect(()=>{if(w){let le={x:0,y:0};const Me=Fe=>{var Ue,we;le={x:Math.abs(Math.round(Fe.pageX)-(((Ue=O.current)==null?void 0:Ue.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((we=O.current)==null?void 0:we.y)??0))}},Ye=Fe=>{le.x<=10&&le.y<=10?Fe.preventDefault():w.contains(Fe.target)||I(!1),document.removeEventListener("pointermove",Me),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Me),document.addEventListener("pointerup",Ye,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Me),document.removeEventListener("pointerup",Ye,{capture:!0})}}},[w,I,O]),h.useEffect(()=>{const le=()=>I(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[I]);const[q,ae]=kk(le=>{const Me=D().filter(Ue=>!Ue.disabled),Ye=Me.find(Ue=>Ue.ref.current===document.activeElement),Fe=Ek(Me,le,Ye);Fe&&setTimeout(()=>Fe.ref.current.focus())}),me=h.useCallback((le,Me,Ye)=>{const Fe=!H.current&&!Ye;(m.value!==void 0&&m.value===Me||Fe)&&(F(le),Fe&&(H.current=!0))},[m.value]),Qe=h.useCallback(()=>w==null?void 0:w.focus(),[w]),Pe=h.useCallback((le,Me,Ye)=>{const Fe=!H.current&&!Ye;(m.value!==void 0&&m.value===Me||Fe)&&Z(le)},[m.value]),ct=r==="popper"?Ap:lk,Le=ct===Ap?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:y,sticky:x,hideWhenDetached:v,avoidCollisions:_}:{};return u.jsx(ik,{scope:n,content:w,viewport:C,onViewportChange:S,itemRefCallback:me,selectedItem:R,onItemLeave:Qe,itemTextRefCallback:Pe,focusSelectedItem:W,selectedItemText:L,position:r,isPositioned:B,searchRef:q,children:u.jsx(Od,{as:ts,allowPinchZoom:!0,children:u.jsx(Td,{asChild:!0,trapped:m.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:te(s,le=>{var Me;(Me=m.trigger)==null||Me.focus({preventScroll:!0}),le.preventDefault()}),children:u.jsx(Ki,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:u.jsx(ct,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:le=>le.preventDefault(),...g,...Le,onPlaced:()=>A(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:te(g.onKeyDown,le=>{const Me=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!Me&&le.key.length===1&&ae(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let Fe=D().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);if(["ArrowUp","End"].includes(le.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Ue=le.target,we=Fe.indexOf(Ue);Fe=Fe.slice(we+1)}setTimeout(()=>ne(Fe)),le.preventDefault()}})})})})})})});ak.displayName=aV;var lV="SelectItemAlignedPosition",lk=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=so(jo,n),i=oo(jo,n),[a,l]=h.useState(null),[c,d]=h.useState(null),f=ze(t,N=>d(N)),p=ff(n),y=h.useRef(!1),x=h.useRef(!0),{viewport:v,selectedItem:_,selectedItemText:g,focusSelectedItem:m}=i,w=h.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&c&&v&&_&&g){const N=o.trigger.getBoundingClientRect(),R=c.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),L=g.getBoundingClientRect();if(o.dir!=="rtl"){const Ue=L.left-R.left,we=F.left-Ue,ut=N.left-we,Wt=N.width+ut,hs=Math.max(Wt,R.width),fn=window.innerWidth-$r,ps=jx(we,[$r,fn-hs]);a.style.minWidth=Wt+"px",a.style.left=ps+"px"}else{const Ue=R.right-L.right,we=window.innerWidth-F.right-Ue,ut=window.innerWidth-N.right-we,Wt=N.width+ut,hs=Math.max(Wt,R.width),fn=window.innerWidth-$r,ps=jx(we,[$r,fn-hs]);a.style.minWidth=Wt+"px",a.style.right=ps+"px"}const Z=p(),D=window.innerHeight-$r*2,B=v.scrollHeight,A=window.getComputedStyle(c),H=parseInt(A.borderTopWidth,10),ne=parseInt(A.paddingTop,10),W=parseInt(A.borderBottomWidth,10),I=parseInt(A.paddingBottom,10),O=H+ne+B+I+W,q=Math.min(_.offsetHeight*5,O),ae=window.getComputedStyle(v),me=parseInt(ae.paddingTop,10),Qe=parseInt(ae.paddingBottom,10),Pe=N.top+N.height/2-$r,ct=D-Pe,Le=_.offsetHeight/2,le=_.offsetTop+Le,Me=H+ne+le,Ye=O-Me;if(Me<=Pe){const Ue=_===Z[Z.length-1].ref.current;a.style.bottom="0px";const we=c.clientHeight-v.offsetTop-v.offsetHeight,ut=Math.max(ct,Le+(Ue?Qe:0)+we+W),Wt=Me+ut;a.style.height=Wt+"px"}else{const Ue=_===Z[0].ref.current;a.style.top="0px";const ut=Math.max(Pe,H+v.offsetTop+(Ue?me:0)+Le)+Ye;a.style.height=ut+"px",v.scrollTop=Me-Pe+v.offsetTop}a.style.margin=`${$r}px 0`,a.style.minHeight=q+"px",a.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[p,o.trigger,o.valueNode,a,c,v,_,g,o.dir,r]);Jt(()=>w(),[w]);const[b,C]=h.useState();Jt(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const S=h.useCallback(N=>{N&&x.current===!0&&(w(),m==null||m(),x.current=!1)},[w,m]);return u.jsx(uV,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:S,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:u.jsx(_e.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});lk.displayName=lV;var cV="SelectPopperPosition",Ap=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=$r,...o}=e,i=hf(n);return u.jsx(eg,{...i,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.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)"}})});Ap.displayName=cV;var[uV,Xg]=ea(jo,{}),Ip="SelectViewport",ck=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=oo(Ip,n),i=Xg(Ip,n),a=ze(t,o.onViewportChange),l=h.useRef(0);return u.jsxs(u.Fragment,{children:[u.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}),u.jsx(df.Slot,{scope:n,children:u.jsx(_e.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:te(s.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&f){const y=Math.abs(l.current-d.scrollTop);if(y>0){const x=window.innerHeight-$r*2,v=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),g=Math.max(v,_);if(g<x){const m=g+y,w=Math.min(x,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})})})]})});ck.displayName=Ip;var uk="SelectGroup",[dV,fV]=ea(uk),dk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Cr();return u.jsx(dV,{scope:n,id:s,children:u.jsx(_e.div,{role:"group","aria-labelledby":s,...r,ref:t})})});dk.displayName=uk;var fk="SelectLabel",hk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=fV(fk,n);return u.jsx(_e.div,{id:s.id,...r,ref:t})});hk.displayName=fk;var sd="SelectItem",[hV,pk]=ea(sd),mk=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=so(sd,n),l=oo(sd,n),c=a.value===r,[d,f]=h.useState(o??""),[p,y]=h.useState(!1),x=ze(t,g=>{var m;return(m=l.itemRefCallback)==null?void 0:m.call(l,g,r,s)}),v=Cr(),_=()=>{s||(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 u.jsx(hV,{scope:n,value:r,disabled:s,textId:v,isSelected:c,onItemTextChange:h.useCallback(g=>{f(m=>m||((g==null?void 0:g.textContent)??"").trim())},[]),children:u.jsx(df.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:u.jsx(_e.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:x,onFocus:te(i.onFocus,()=>y(!0)),onBlur:te(i.onBlur,()=>y(!1)),onPointerUp:te(i.onPointerUp,_),onPointerMove:te(i.onPointerMove,g=>{var m;s?(m=l.onItemLeave)==null||m.call(l):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(i.onPointerLeave,g=>{var m;g.currentTarget===document.activeElement&&((m=l.onItemLeave)==null||m.call(l))}),onKeyDown:te(i.onKeyDown,g=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&g.key===" "||(eV.includes(g.key)&&_(),g.key===" "&&g.preventDefault())})})})})});mk.displayName=sd;var Ta="SelectItemText",gk=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=so(Ta,n),a=oo(Ta,n),l=pk(Ta,n),c=sV(Ta,n),[d,f]=h.useState(null),p=ze(t,g=>f(g),l.onItemTextChange,g=>{var m;return(m=a.itemTextRefCallback)==null?void 0:m.call(a,g,l.value,l.disabled)}),y=d==null?void 0:d.textContent,x=h.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:y},l.value),[l.disabled,l.value,y]),{onNativeOptionAdd:v,onNativeOptionRemove:_}=c;return Jt(()=>(v(x),()=>_(x)),[v,_,x]),u.jsxs(u.Fragment,{children:[u.jsx(_e.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?as.createPortal(o.children,i.valueNode):null]})});gk.displayName=Ta;var vk="SelectItemIndicator",yk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return pk(vk,n).isSelected?u.jsx(_e.span,{"aria-hidden":!0,...r,ref:t}):null});yk.displayName=vk;var Lp="SelectScrollUpButton",xk=h.forwardRef((e,t)=>{const n=oo(Lp,e.__scopeSelect),r=Xg(Lp,e.__scopeSelect),[s,o]=h.useState(!1),i=ze(t,r.onScrollButtonChange);return Jt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;o(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?u.jsx(_k,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});xk.displayName=Lp;var Fp="SelectScrollDownButton",wk=h.forwardRef((e,t)=>{const n=oo(Fp,e.__scopeSelect),r=Xg(Fp,e.__scopeSelect),[s,o]=h.useState(!1),i=ze(t,r.onScrollButtonChange);return Jt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;o(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?u.jsx(_k,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});wk.displayName=Fp;var _k=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=oo("SelectScrollButton",n),i=h.useRef(null),a=ff(n),l=h.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),Jt(()=>{var d;const c=a().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),u.jsx(_e.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:te(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:te(s.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:te(s.onPointerLeave,()=>{l()})})}),pV="SelectSeparator",Sk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.jsx(_e.div,{"aria-hidden":!0,...r,ref:t})});Sk.displayName=pV;var Up="SelectArrow",mV=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=hf(n),o=so(Up,n),i=oo(Up,n);return o.open&&i.position==="popper"?u.jsx(tg,{...s,...r,ref:t}):null});mV.displayName=Up;function bk(e){return e===""||e===void 0}var Ck=h.forwardRef((e,t)=>{const{value:n,...r}=e,s=h.useRef(null),o=ze(t,s),i=jb(n);return h.useEffect(()=>{const a=s.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]),u.jsx(Zl,{asChild:!0,children:u.jsx("select",{...r,ref:o,defaultValue:n})})});Ck.displayName="BubbleSelect";function kk(e){const t=Xt(e),n=h.useRef(""),r=h.useRef(0),s=h.useCallback(i=>{const a=n.current+i;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function Ek(e,t,n){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=gV(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function gV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vV=XC,Tk=ek,yV=nk,xV=rk,wV=sk,Nk=ok,_V=ck,SV=dk,Rk=hk,Pk=mk,bV=gk,CV=yk,Mk=xk,Ok=wk,Dk=Sk;const su=vV,ou=SV,iu=yV,$a=h.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Tk,{ref:r,className:pe("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,u.jsx(xV,{asChild:!0,children:u.jsx(v_,{className:"h-4 w-4 opacity-50"})})]}));$a.displayName=Tk.displayName;const jk=h.forwardRef(({className:e,...t},n)=>u.jsx(Mk,{ref:n,className:pe("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(cP,{className:"h-4 w-4"})}));jk.displayName=Mk.displayName;const Ak=h.forwardRef(({className:e,...t},n)=>u.jsx(Ok,{ref:n,className:pe("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(v_,{className:"h-4 w-4"})}));Ak.displayName=Ok.displayName;const za=h.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>u.jsx(wV,{children:u.jsxs(Nk,{ref:s,className:pe("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:[u.jsx(jk,{}),u.jsx(_V,{className:pe("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),u.jsx(Ak,{})]})}));za.displayName=Nk.displayName;const Wa=h.forwardRef(({className:e,...t},n)=>u.jsx(Rk,{ref:n,className:pe("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Wa.displayName=Rk.displayName;const Ya=h.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Pk,{ref:r,className:pe("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:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(CV,{children:u.jsx(g_,{className:"h-4 w-4"})})}),u.jsx(bV,{children:t})]}));Ya.displayName=Pk.displayName;const kV=h.forwardRef(({className:e,...t},n)=>u.jsx(Dk,{ref:n,className:pe("-mx-1 my-1 h-px bg-muted",e),...t}));kV.displayName=Dk.displayName;const EV=k1,TV=E1,NV=T1,Ik=h.forwardRef(({className:e,...t},n)=>u.jsx(Ad,{ref:n,className:pe("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}));Ik.displayName=Ad.displayName;const Lk=h.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(NV,{children:[u.jsx(Ik,{}),u.jsxs(Id,{ref:r,className:pe("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,u.jsxs(N1,{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:[u.jsx(Um,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Lk.displayName=Id.displayName;const Fk=({className:e,...t})=>u.jsx("div",{className:pe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Fk.displayName="DialogHeader";const Uk=h.forwardRef(({className:e,...t},n)=>u.jsx(Ld,{ref:n,className:pe("text-lg font-semibold leading-none tracking-tight",e),...t}));Uk.displayName=Ld.displayName;const RV=h.forwardRef(({className:e,...t},n)=>u.jsx(Fd,{ref:n,className:pe("text-sm text-muted-foreground",e),...t}));RV.displayName=Fd.displayName;const Vp=new Map([["tencent","腾讯云"],["aliyun","阿里云"]]),Vk=wt.union([wt.literal("aliyun"),wt.literal("tencent")],{message:"请选择云服务商"}),PV=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=qd(),s=wt.object({id:wt.string().optional(),name:wt.string().min(1).max(64),configType:Vk,secretId:wt.string().min(1).max(64),secretKey:wt.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=of({resolver:af(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:o.secretId,secretKey:o.secretKey}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{secretId:l.secretId,secretKey:l.secretKey}};try{const d=await Rb(c);if(t(),c.id=d.id,c.created=d.created,c.updated=d.updated,l.id){r(c);return}n(c)}catch(d){Object.entries(d.response.data).forEach(([p,y])=>{i.setError(p,{type:"manual",message:y.message})})}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(cf,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(Gt,{control:i.control,name:"name",render:({field:l})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"名称"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入授权名称",...l})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:i.control,name:"id",render:({field:l})=>u.jsxs(Ft,{className:"hidden",children:[u.jsx(Ut,{children:"配置类型"}),u.jsx(Vt,{children:u.jsx(gn,{...l})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(Ft,{className:"hidden",children:[u.jsx(Ut,{children:"配置类型"}),u.jsx(Vt,{children:u.jsx(gn,{...l})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:i.control,name:"secretId",render:({field:l})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"SecretId"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入SecretId",...l})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:i.control,name:"secretKey",render:({field:l})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"SecretKey"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入SecretKey",...l})}),u.jsx(Ot,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Dt,{type:"submit",children:"保存"})})]})})})})},MV=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=qd(),s=wt.object({id:wt.string().optional(),name:wt.string().min(1).max(64),configType:Vk,accessKeyId:wt.string().min(1).max(64),accessSecretId:wt.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=of({resolver:af(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:o.accessKeyId,accessSecretId:o.accessKeySecret}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const d=await Rb(c);if(t(),c.id=d.id,c.created=d.created,c.updated=d.updated,l.id){r(c);return}n(c)}catch(d){Object.entries(d.response.data).forEach(([p,y])=>{i.setError(p,{type:"manual",message:y.message})});return}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(cf,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(Gt,{control:i.control,name:"name",render:({field:l})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"名称"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入授权名称",...l})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:i.control,name:"id",render:({field:l})=>u.jsxs(Ft,{className:"hidden",children:[u.jsx(Ut,{children:"配置类型"}),u.jsx(Vt,{children:u.jsx(gn,{...l})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(Ft,{className:"hidden",children:[u.jsx(Ut,{children:"配置类型"}),u.jsx(Vt,{children:u.jsx(gn,{...l})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:i.control,name:"accessKeyId",render:({field:l})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"AccessKeyId"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入AccessKeyId",...l})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:i.control,name:"accessSecretId",render:({field:l})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"AccessKeySecret"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入AccessKeySecret",...l})}),u.jsx(Ot,{})]})}),u.jsx(Ot,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Dt,{type:"submit",children:"保存"})})]})})})})};function Ba({trigger:e,op:t,data:n,className:r}){const[s,o]=h.useState(!1),i=Array.from(Vp.keys()),[a,l]=h.useState((n==null?void 0:n.configType)||"");let c=u.jsx(u.Fragment,{children:" "});switch(a){case"tencent":c=u.jsx(PV,{data:n,onAfterReq:()=>{o(!1)}});break;case"aliyun":c=u.jsx(MV,{data:n,onAfterReq:()=>{o(!1)}});break}return u.jsxs(EV,{onOpenChange:o,open:s,children:[u.jsx(TV,{asChild:!0,className:pe(r),children:e}),u.jsxs(Lk,{className:"sm:max-w-[600px] w-full",children:[u.jsx(Fk,{children:u.jsxs(Uk,{children:[t=="add"?"添加":"编辑","授权"]})}),u.jsxs("div",{className:"container",children:[u.jsx(Qg,{children:"服务商"}),u.jsxs(su,{onValueChange:d=>{l(d)},value:a,children:[u.jsx($a,{className:"mt-3",children:u.jsx(iu,{placeholder:"选择服务商"})}),u.jsx(za,{children:u.jsxs(ou,{children:[u.jsx(Wa,{children:"服务商"}),i.map(d=>u.jsx(Ya,{value:d,children:Vp.get(d)}))]})})]}),c]})]})]})}const OV=()=>{const{config:{accesses:e}}=qd(),[t,n]=h.useState(),r=no();h.useEffect(()=>{const y=new URLSearchParams(r.search).get("id");y&&(async()=>{const v=await k4(y);n(v)})()},[r.search]);const s=wt.object({id:wt.string().optional(),domain:wt.string().regex(new RegExp("^(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\\.[A-Za-z]{2,6})+$"),{message:"请输入正确的域名"}),access:wt.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:wt.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择部署服务商配置"}),targetType:wt.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"})}),o=of({resolver:af(s),defaultValues:{id:"",domain:"",access:"",targetAccess:"",targetType:""}});h.useEffect(()=>{t&&o.reset({id:t.id,domain:t.domain,access:t.access,targetAccess:t.targetAccess,targetType:t.targetType})},[t,o]);const[i,a]=h.useState(t?t.targetType:""),l=e.filter(p=>{if(i=="")return!0;const y=o.getValues().targetType.split("-");return p.configType===y[0]}),{toast:c}=dC(),d=ro(),f=async p=>{const y={id:p.id,crontab:"0 0 * * *",domain:p.domain,access:p.access,targetAccess:p.targetAccess,targetType:p.targetType};try{await wC(y);let x="域名编辑成功";y.id==""&&(x="域名添加成功"),c({title:"成功",description:x}),d("/")}catch(x){Object.entries(x.response.data).forEach(([_,g])=>{o.setError(_,{type:"manual",message:g.message})});return}};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(fC,{}),u.jsxs("div",{className:"border-b h-10 text-muted-foreground",children:[t!=null&&t.id?"编辑":"新增","域名"]}),u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(cf,{...o,children:u.jsxs("form",{onSubmit:o.handleSubmit(f),className:"space-y-8",children:[u.jsx(Gt,{control:o.control,name:"domain",render:({field:p})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"域名"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入域名",...p})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:o.control,name:"access",render:({field:p})=>u.jsxs(Ft,{children:[u.jsxs(Ut,{className:"flex w-full justify-between",children:[u.jsx("div",{children:"DNS 服务商授权配置"}),u.jsx(Ba,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(Ly,{size:14}),"新增"]}),op:"add"})]}),u.jsx(Vt,{children:u.jsxs(su,{...p,value:p.value,onValueChange:y=>{o.setValue("access",y)},children:[u.jsx($a,{children:u.jsx(iu,{placeholder:"请选择授权配置"})}),u.jsx(za,{children:u.jsxs(ou,{children:[u.jsx(Wa,{children:"服务商授权配置"}),e.map(y=>u.jsx(Ya,{value:y.id,children:y.name},y.id))]})})]})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:o.control,name:"targetType",render:({field:p})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"部署服务类型"}),u.jsx(Vt,{children:u.jsxs(su,{...p,onValueChange:y=>{a(y),o.setValue("targetType",y)},children:[u.jsx($a,{children:u.jsx(iu,{placeholder:"请选择部署服务类型"})}),u.jsx(za,{children:u.jsxs(ou,{children:[u.jsx(Wa,{children:"部署服务类型"}),u.jsx(Ya,{value:"aliyun-oss",children:"阿里云-OSS"})]})})]})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:o.control,name:"targetAccess",render:({field:p})=>u.jsxs(Ft,{children:[u.jsxs(Ut,{className:"w-full flex justify-between",children:[u.jsx("div",{children:"部署服务商授权配置"}),u.jsx(Ba,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(Ly,{size:14}),"新增"]}),op:"add"})]}),u.jsx(Vt,{children:u.jsxs(su,{...p,onValueChange:y=>{o.setValue("targetAccess",y)},children:[u.jsx($a,{children:u.jsx(iu,{placeholder:"请选择授权配置"})}),u.jsx(za,{children:u.jsxs(ou,{children:[u.jsx(Wa,{children:"服务商授权配置"}),l.map(y=>u.jsx(Ya,{value:y.id,children:y.name},y.id))]})})]})}),u.jsx(Ot,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Dt,{type:"submit",children:"保存"})})]})})})]})})},DV=()=>{const{config:e,deleteAccess:t}=qd(),{accesses:n}=e,r=async s=>{const o=await vF(s);t(o.id)};return u.jsxs("div",{className:"",children:[u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),u.jsx(Ba,{trigger:u.jsx(Dt,{children:"添加授权"}),op:"add"})]}),n.length===0?u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(fP,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),u.jsx(Ba,{trigger:u.jsx(Dt,{children:"添加授权"}),op:"add",className:"mt-3"})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-48",children:"名称"}),u.jsx("div",{className:"w-48",children:"服务商"}),u.jsx("div",{className:"w-52",children:"创建时间"}),u.jsx("div",{className:"w-52",children:"更新时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),n.map(s=>u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:s.name}),u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:Vp.get(s.configType)}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",s.created&&wl(s.created)]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",s.updated&&wl(s.updated)]}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(Ba,{trigger:u.jsx(Dt,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:s}),u.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Dt,{variant:"link",className:"p-0",onClick:()=>{r(s)},children:"删除"})]})]},s.id))]})]})},jV=Vl("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"}}),$k=h.forwardRef(({className:e,variant:t,...n},r)=>u.jsx("div",{ref:r,role:"alert",className:pe(jV({variant:t}),e),...n}));$k.displayName="Alert";const zk=h.forwardRef(({className:e,...t},n)=>u.jsx("h5",{ref:n,className:pe("mb-1 font-medium leading-none tracking-tight",e),...t}));zk.displayName="AlertTitle";const Wk=h.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:pe("text-sm [&_p]:leading-relaxed",e),...t}));Wk.displayName="AlertDescription";const AV=async e=>{let t=1;e.page&&(t=e.page);let n=10;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await Zt().collection("deployments").getList(t,n,{filter:r,sort:"-id",expand:"domain"})},IV=()=>{const e=ro(),[t,n]=h.useState(),[r]=sP(),s=r.get("domain");return h.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const a=await AV(i);n(a.items)})()},[s]),u.jsxs("div",{children:[u.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-48",children:"域名"}),u.jsx("div",{className:"w-24",children:"状态"}),u.jsx("div",{className:"w-56",children:"阶段"}),u.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(o=>{var i,a;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=o.expand.domain)==null?void 0:i.domain}),u.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:o.phase==="deploy"&&o.phaseSuccess?u.jsx(y_,{size:16,className:"text-green-700"}):u.jsx(x_,{size:16,className:"text-red-700"})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx(Db,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:wl(o.deployedAt)}),u.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:u.jsxs(R1,{children:[u.jsx(P1,{asChild:!0,children:u.jsx(Dt,{variant:"link",className:"p-0",children:"日志"})}),u.jsxs(mg,{className:"sm:max-w-5xl",children:[u.jsx(O1,{children:u.jsxs(D1,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),u.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&u.jsx(u.Fragment,{children:o.log.check.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.apply&&u.jsx(u.Fragment,{children:o.log.apply.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.deploy&&u.jsx(u.Fragment,{children:o.log.deploy.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},o.id)})]}):u.jsx(u.Fragment,{children:u.jsxs($k,{className:"max-w-[40em] mx-auto mt-20",children:[u.jsx(zk,{children:"暂无数据"}),u.jsxs(Wk,{children:[u.jsxs("div",{className:"flex items-center mt-5",children:[u.jsx("div",{children:u.jsx(pP,{className:"text-yellow-400",size:36})}),u.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),u.jsx("div",{className:"mt-2 flex justify-end",children:u.jsx(Dt,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},LV=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",FV=wt.object({username:wt.string().email({message:"请输入正确的邮箱地址"}),password:wt.string().min(10,{message:"密码至少10个字符"})}),UV=()=>{const e=of({resolver:af(FV),defaultValues:{username:"",password:""}}),t=async r=>{try{await Zt().admins.authWithPassword(r.username,r.password),n("/")}catch(s){const o=LV(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},n=ro();return u.jsxs("div",{className:"max-w-[35em] border mx-auto mt-32 p-10 rounded-md shadow-md",children:[u.jsx("div",{className:"flex justify-center mb-10",children:u.jsx("img",{src:"/vite.svg",className:"w-16"})}),u.jsx(cf,{...e,children:u.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8",children:[u.jsx(Gt,{control:e.control,name:"username",render:({field:r})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"用户名"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"email",...r})}),u.jsx(Ot,{})]})}),u.jsx(Gt,{control:e.control,name:"password",render:({field:r})=>u.jsxs(Ft,{children:[u.jsx(Ut,{children:"密码"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"shadcn",...r,type:"password"})}),u.jsx(Ot,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Dt,{type:"submit",children:"登录"})})]})})]})},VV=()=>Zt().authStore.isValid&&Zt().authStore.isAdmin?u.jsx(h_,{to:"/"}):u.jsx("div",{className:"container",children:u.jsx(p_,{})}),$V=WR([{path:"/",element:u.jsx(wF,{}),children:[{path:"/",element:u.jsx(T4,{})},{path:"/edit",element:u.jsx(OV,{})},{path:"/access",element:u.jsx(DV,{})},{path:"/history",element:u.jsx(IV,{})}]},{path:"/login",element:u.jsx(VV,{}),children:[{path:"/login",element:u.jsx(UV,{})}]},{path:"/about",element:u.jsx("div",{children:"About"})}]);ph.createRoot(document.getElementById("root")).render(u.jsx(De.StrictMode,{children:u.jsx(XR,{router:$V})}))});export default zV();