From fa85580e357caeb6cd81084a99c6338542852d16 Mon Sep 17 00:00:00 2001 From: yoan <536464346@qq.com> Date: Sun, 15 Sep 2024 21:58:08 +0800 Subject: [PATCH] Merge authorization group into authorization management --- .../{index-pPAQ4idS.js => index-CDJ2jqew.js} | 118 +++++----- ui/dist/assets/index-ChWRjRip.css | 1 + ui/dist/assets/index-DXJTf3ck.css | 1 - ui/dist/index.html | 4 +- ui/package-lock.json | 30 +++ ui/package.json | 1 + .../components/certimate/AccessGroupList.tsx | 217 +++++++++++++++++ ui/src/components/ui/tabs.tsx | 53 +++++ ui/src/pages/DashboardLayout.tsx | 26 +-- ui/src/pages/access/Access.tsx | 213 ++++++++++------- ui/src/pages/access_groups/AccessGroups.tsx | 219 ------------------ ui/src/router.tsx | 5 - 12 files changed, 492 insertions(+), 396 deletions(-) rename ui/dist/assets/{index-pPAQ4idS.js => index-CDJ2jqew.js} (61%) create mode 100644 ui/dist/assets/index-ChWRjRip.css delete mode 100644 ui/dist/assets/index-DXJTf3ck.css create mode 100644 ui/src/components/certimate/AccessGroupList.tsx create mode 100644 ui/src/components/ui/tabs.tsx delete mode 100644 ui/src/pages/access_groups/AccessGroups.tsx diff --git a/ui/dist/assets/index-pPAQ4idS.js b/ui/dist/assets/index-CDJ2jqew.js similarity index 61% rename from ui/dist/assets/index-pPAQ4idS.js rename to ui/dist/assets/index-CDJ2jqew.js index 17b0540a..765e2a04 100644 --- a/ui/dist/assets/index-pPAQ4idS.js +++ b/ui/dist/assets/index-CDJ2jqew.js @@ -1,4 +1,4 @@ -var Ij=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var R8=Ij((V8,Lu)=>{function K0(e,t){for(var r=0;rn[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"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var Ic=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G0={exports:{}},zd={},q0={exports:{}},et={};/** +var rT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Q8=rT((uU,Fu)=>{function Q0(e,t){for(var r=0;rn[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"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var Lc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J0={exports:{}},zd={},ew={exports:{}},et={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var Ij=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var R8=Ij((V8,Lu) * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var oc=Symbol.for("react.element"),Lj=Symbol.for("react.portal"),Fj=Symbol.for("react.fragment"),zj=Symbol.for("react.strict_mode"),Uj=Symbol.for("react.profiler"),Vj=Symbol.for("react.provider"),$j=Symbol.for("react.context"),Wj=Symbol.for("react.forward_ref"),Bj=Symbol.for("react.suspense"),Hj=Symbol.for("react.memo"),Yj=Symbol.for("react.lazy"),my=Symbol.iterator;function Zj(e){return e===null||typeof e!="object"?null:(e=my&&e[my]||e["@@iterator"],typeof e=="function"?e:null)}var X0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q0=Object.assign,J0={};function ga(e,t,r){this.props=e,this.context=t,this.refs=J0,this.updater=r||X0}ga.prototype.isReactComponent={};ga.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")};ga.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ew(){}ew.prototype=ga.prototype;function Em(e,t,r){this.props=e,this.context=t,this.refs=J0,this.updater=r||X0}var jm=Em.prototype=new ew;jm.constructor=Em;Q0(jm,ga.prototype);jm.isPureReactComponent=!0;var gy=Array.isArray,tw=Object.prototype.hasOwnProperty,Tm={current:null},rw={key:!0,ref:!0,__self:!0,__source:!0};function nw(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)tw.call(t,n)&&!rw.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1()=>(t||e((t={exports:{}}).exports,t),t.exports);var R8=Ij((V8,Lu) * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Qj=y,Jj=Symbol.for("react.element"),eT=Symbol.for("react.fragment"),tT=Object.prototype.hasOwnProperty,rT=Qj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,nT={key:!0,ref:!0,__self:!0,__source:!0};function ow(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)tT.call(t,n)&&!nT.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:Jj,type:e,key:i,ref:o,props:s,_owner:rT.current}}zd.Fragment=eT;zd.jsx=ow;zd.jsxs=ow;G0.exports=zd;var c=G0.exports,Kh={},aw={exports:{}},zr={},lw={exports:{}},cw={};/** + */var yT=y,xT=Symbol.for("react.element"),wT=Symbol.for("react.fragment"),_T=Object.prototype.hasOwnProperty,bT=yT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ST={key:!0,ref:!0,__self:!0,__source:!0};function uw(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)_T.call(t,n)&&!ST.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:xT,type:e,key:i,ref:o,props:s,_owner:bT.current}}zd.Fragment=wT;zd.jsx=uw;zd.jsxs=uw;J0.exports=zd;var c=J0.exports,Zh={},dw={exports:{}},zr={},fw={exports:{}},hw={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var Ij=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var R8=Ij((V8,Lu) * * 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(Z,I){var Q=Z.length;Z.push(I);e:for(;0>>1,V=Z[z];if(0>>1;zs(se,Q))Aes(he,se)?(Z[z]=he,Z[Ae]=Q,z=Ae):(Z[z]=se,Z[ne]=Q,z=ne);else if(Aes(he,Q))Z[z]=he,Z[Ae]=Q,z=Ae;else break e}}return I}function s(Z,I){var Q=Z.sortIndex-I.sortIndex;return Q!==0?Q:Z.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,d=null,m=3,v=!1,w=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(Z){for(var I=r(u);I!==null;){if(I.callback===null)n(u);else if(I.startTime<=Z)n(u),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(u)}}function C(Z){if(g=!1,_(Z),!w)if(r(l)!==null)w=!0,te(E);else{var I=r(u);I!==null&&W(C,I.startTime-Z)}}function E(Z,I){w=!1,g&&(g=!1,p(A),A=-1),v=!0;var Q=m;try{for(_(I),d=r(l);d!==null&&(!(d.expirationTime>I)||Z&&!q());){var z=d.callback;if(typeof z=="function"){d.callback=null,m=d.priorityLevel;var V=z(d.expirationTime<=I);I=e.unstable_now(),typeof V=="function"?d.callback=V:d===r(l)&&n(l),_(I)}else n(l);d=r(l)}if(d!==null)var fe=!0;else{var ne=r(u);ne!==null&&W(C,ne.startTime-I),fe=!1}return fe}finally{d=null,m=Q,v=!1}}var j=!1,R=null,A=-1,P=5,L=-1;function q(){return!(e.unstable_now()-LZ||125z?(Z.sortIndex=Q,t(u,Z),r(l)===null&&Z===r(u)&&(g?(p(A),A=-1):g=!0,W(C,Q-z))):(Z.sortIndex=V,t(l,Z),w||v||(w=!0,te(E))),Z},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(Z){var I=m;return function(){var Q=m;m=I;try{return Z.apply(this,arguments)}finally{m=Q}}}})(cw);lw.exports=cw;var sT=lw.exports;/** + */(function(e){function t(Z,I){var Q=Z.length;Z.push(I);e:for(;0>>1,V=Z[z];if(0>>1;zs(se,Q))Aes(he,se)?(Z[z]=he,Z[Ae]=Q,z=Ae):(Z[z]=se,Z[ne]=Q,z=ne);else if(Aes(he,Q))Z[z]=he,Z[Ae]=Q,z=Ae;else break e}}return I}function s(Z,I){var Q=Z.sortIndex-I.sortIndex;return Q!==0?Q:Z.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,d=null,m=3,v=!1,w=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(Z){for(var I=r(u);I!==null;){if(I.callback===null)n(u);else if(I.startTime<=Z)n(u),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(u)}}function C(Z){if(g=!1,_(Z),!w)if(r(l)!==null)w=!0,te(E);else{var I=r(u);I!==null&&B(C,I.startTime-Z)}}function E(Z,I){w=!1,g&&(g=!1,p(A),A=-1),v=!0;var Q=m;try{for(_(I),d=r(l);d!==null&&(!(d.expirationTime>I)||Z&&!q());){var z=d.callback;if(typeof z=="function"){d.callback=null,m=d.priorityLevel;var V=z(d.expirationTime<=I);I=e.unstable_now(),typeof V=="function"?d.callback=V:d===r(l)&&n(l),_(I)}else n(l);d=r(l)}if(d!==null)var fe=!0;else{var ne=r(u);ne!==null&&B(C,ne.startTime-I),fe=!1}return fe}finally{d=null,m=Q,v=!1}}var j=!1,R=null,A=-1,P=5,L=-1;function q(){return!(e.unstable_now()-LZ||125z?(Z.sortIndex=Q,t(u,Z),r(l)===null&&Z===r(u)&&(g?(p(A),A=-1):g=!0,B(C,Q-z))):(Z.sortIndex=V,t(l,Z),w||v||(w=!0,te(E))),Z},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(Z){var I=m;return function(){var Q=m;m=I;try{return Z.apply(this,arguments)}finally{m=Q}}}})(hw);fw.exports=hw;var kT=fw.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var Ij=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var R8=Ij((V8,Lu) * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var iT=y,Fr=sT;function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gh=Object.prototype.hasOwnProperty,oT=/^[: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]*$/,yy={},xy={};function aT(e){return Gh.call(xy,e)?!0:Gh.call(yy,e)?!1:oT.test(e)?xy[e]=!0:(yy[e]=!0,!1)}function lT(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function cT(e,t,r,n){if(t===null||typeof t>"u"||lT(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 vr(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nr[e]=new vr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nr[t]=new vr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nr[e]=new vr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nr[e]=new vr(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){nr[e]=new vr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nr[e]=new vr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nr[e]=new vr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nr[e]=new vr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nr[e]=new vr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rm=/[\-:]([a-z])/g;function Pm(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(Rm,Pm);nr[t]=new vr(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(Rm,Pm);nr[t]=new vr(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(Rm,Pm);nr[t]=new vr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nr[e]=new vr(e,1,!1,e.toLowerCase(),null,!1,!1)});nr.xlinkHref=new vr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nr[e]=new vr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Am(e,t,r,n){var s=nr.hasOwnProperty(t)?nr[t]:null;(s!==null?s.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kh=Object.prototype.hasOwnProperty,ET=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,_y={},by={};function jT(e){return Kh.call(by,e)?!0:Kh.call(_y,e)?!1:ET.test(e)?by[e]=!0:(_y[e]=!0,!1)}function TT(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function NT(e,t,r,n){if(t===null||typeof t>"u"||TT(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 vr(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var rr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rr[e]=new vr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rr[t]=new vr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rr[e]=new vr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rr[e]=new vr(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){rr[e]=new vr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rr[e]=new vr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rr[e]=new vr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rr[e]=new vr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rr[e]=new vr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rm=/[\-:]([a-z])/g;function Pm(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(Rm,Pm);rr[t]=new vr(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(Rm,Pm);rr[t]=new vr(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(Rm,Pm);rr[t]=new vr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rr[e]=new vr(e,1,!1,e.toLowerCase(),null,!1,!1)});rr.xlinkHref=new vr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rr[e]=new vr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Am(e,t,r,n){var s=rr.hasOwnProperty(t)?rr[t]:null;(s!==null?s.type!==0:n||!(2a||s[o]!==i[a]){var l=` -`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{eh=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Za(e):""}function uT(e){switch(e.tag){case 5:return Za(e.type);case 16:return Za("Lazy");case 13:return Za("Suspense");case 19:return Za("SuspenseList");case 0:case 2:case 15:return e=th(e.type,!1),e;case 11:return e=th(e.type.render,!1),e;case 1:return e=th(e.type,!0),e;default:return""}}function Jh(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 Co:return"Fragment";case ko:return"Portal";case qh:return"Profiler";case Dm:return"StrictMode";case Xh:return"Suspense";case Qh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fw:return(e.displayName||"Context")+".Consumer";case dw:return(e._context.displayName||"Context")+".Provider";case Om:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mm:return t=e.displayName||null,t!==null?t:Jh(e.type)||"Memo";case Us:t=e._payload,e=e._init;try{return Jh(e(t))}catch{}}return null}function dT(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 Jh(t);case 8:return t===Dm?"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 li(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fT(e){var t=pw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zc(e){e._valueTracker||(e._valueTracker=fT(e))}function mw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=pw(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Fu(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 ep(e,t){var r=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function _y(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=li(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gw(e,t){t=t.checked,t!=null&&Am(e,"checked",t,!1)}function tp(e,t){gw(e,t);var r=li(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?rp(e,t.type,r):t.hasOwnProperty("defaultValue")&&rp(e,t.type,li(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function by(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function rp(e,t,r){(t!=="number"||Fu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ka=Array.isArray;function Vo(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Uc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var nl={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},hT=["Webkit","ms","Moz","O"];Object.keys(nl).forEach(function(e){hT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nl[t]=nl[e]})});function ww(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||nl.hasOwnProperty(e)&&nl[e]?(""+t).trim():t+"px"}function _w(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=ww(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var pT=Mt({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 ip(e,t){if(t){if(pT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function op(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 ap=null;function Im(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lp=null,$o=null,Wo=null;function Cy(e){if(e=cc(e)){if(typeof lp!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=Bd(t),lp(e.stateNode,e.type,t))}}function bw(e){$o?Wo?Wo.push(e):Wo=[e]:$o=e}function Sw(){if($o){var e=$o,t=Wo;if(Wo=$o=null,Cy(e),t)for(e=0;e>>=0,e===0?32:31-(CT(e)/ET|0)|0}var Vc=64,$c=4194304;function Ga(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 $u(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Ga(a):(i&=o,i!==0&&(n=Ga(i)))}else o=r&~s,o!==0?n=Ga(o):i!==0&&(n=Ga(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function ac(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vn(t),e[t]=r}function RT(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0=il),Oy=" ",My=!1;function Ww(e,t){switch(e){case"keyup":return sN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eo=!1;function oN(e,t){switch(e){case"compositionend":return Bw(t);case"keypress":return t.which!==32?null:(My=!0,Oy);case"textInput":return e=t.data,e===Oy&&My?null:e;default:return null}}function aN(e,t){if(Eo)return e==="compositionend"||!Bm&&Ww(e,t)?(e=Vw(),vu=Vm=Zs=null,Eo=!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)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=zy(r)}}function Kw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gw(){for(var e=window,t=Fu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Fu(e.document)}return t}function Hm(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 gN(e){var t=Gw(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Kw(r.ownerDocument.documentElement,r)){if(n!==null&&Hm(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=Uy(r,i);var o=Uy(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,jo=null,pp=null,al=null,mp=!1;function Vy(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;mp||jo==null||jo!==Fu(n)||(n=jo,"selectionStart"in n&&Hm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),al&&Cl(al,n)||(al=n,n=Hu(pp,"onSelect"),0Ro||(e.current=_p[Ro],_p[Ro]=null,Ro--)}function xt(e,t){Ro++,_p[Ro]=e.current,e.current=t}var ci={},cr=xi(ci),Sr=xi(!1),Hi=ci;function na(e,t){var r=e.type.contextTypes;if(!r)return ci;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function kr(e){return e=e.childContextTypes,e!=null}function Zu(){St(Sr),St(cr)}function Ky(e,t,r){if(cr.current!==ci)throw Error(ie(168));xt(cr,t),xt(Sr,r)}function s_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(ie(108,dT(e)||"Unknown",s));return Mt({},r,n)}function Ku(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,Hi=cr.current,xt(cr,e),xt(Sr,Sr.current),!0}function Gy(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=s_(e,t,Hi),n.__reactInternalMemoizedMergedChildContext=e,St(Sr),St(cr),xt(cr,e)):St(Sr),xt(Sr,r)}var as=null,Hd=!1,mh=!1;function i_(e){as===null?as=[e]:as.push(e)}function TN(e){Hd=!0,i_(e)}function wi(){if(!mh&&as!==null){mh=!0;var e=0,t=pt;try{var r=as;for(pt=1;e>=o,s-=o,ls=1<<32-vn(t)+s|r<A?(P=R,R=null):P=R.sibling;var L=m(p,R,_[A],C);if(L===null){R===null&&(R=P);break}e&&R&&L.alternate===null&&t(p,R),h=i(L,h,A),j===null?E=L:j.sibling=L,j=L,R=P}if(A===_.length)return r(p,R),Nt&&Ti(p,A),E;if(R===null){for(;A<_.length;A++)R=d(p,_[A],C),R!==null&&(h=i(R,h,A),j===null?E=R:j.sibling=R,j=R);return Nt&&Ti(p,A),E}for(R=n(p,R);A<_.length;A++)P=v(R,p,A,_[A],C),P!==null&&(e&&P.alternate!==null&&R.delete(P.key===null?A:P.key),h=i(P,h,A),j===null?E=P:j.sibling=P,j=P);return e&&R.forEach(function(q){return t(p,q)}),Nt&&Ti(p,A),E}function g(p,h,_,C){var E=Pa(_);if(typeof E!="function")throw Error(ie(150));if(_=E.call(_),_==null)throw Error(ie(151));for(var j=E=null,R=h,A=h=0,P=null,L=_.next();R!==null&&!L.done;A++,L=_.next()){R.index>A?(P=R,R=null):P=R.sibling;var q=m(p,R,L.value,C);if(q===null){R===null&&(R=P);break}e&&R&&q.alternate===null&&t(p,R),h=i(q,h,A),j===null?E=q:j.sibling=q,j=q,R=P}if(L.done)return r(p,R),Nt&&Ti(p,A),E;if(R===null){for(;!L.done;A++,L=_.next())L=d(p,L.value,C),L!==null&&(h=i(L,h,A),j===null?E=L:j.sibling=L,j=L);return Nt&&Ti(p,A),E}for(R=n(p,R);!L.done;A++,L=_.next())L=v(R,p,A,L.value,C),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?A:L.key),h=i(L,h,A),j===null?E=L:j.sibling=L,j=L);return e&&R.forEach(function(T){return t(p,T)}),Nt&&Ti(p,A),E}function x(p,h,_,C){if(typeof _=="object"&&_!==null&&_.type===Co&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Fc:e:{for(var E=_.key,j=h;j!==null;){if(j.key===E){if(E=_.type,E===Co){if(j.tag===7){r(p,j.sibling),h=s(j,_.props.children),h.return=p,p=h;break e}}else if(j.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Us&&Qy(E)===j.type){r(p,j.sibling),h=s(j,_.props),h.ref=Ia(p,j,_),h.return=p,p=h;break e}r(p,j);break}else t(p,j);j=j.sibling}_.type===Co?(h=$i(_.props.children,p.mode,C,_.key),h.return=p,p=h):(C=Cu(_.type,_.key,_.props,null,p.mode,C),C.ref=Ia(p,h,_),C.return=p,p=C)}return o(p);case ko:e:{for(j=_.key;h!==null;){if(h.key===j)if(h.tag===4&&h.stateNode.containerInfo===_.containerInfo&&h.stateNode.implementation===_.implementation){r(p,h.sibling),h=s(h,_.children||[]),h.return=p,p=h;break e}else{r(p,h);break}else t(p,h);h=h.sibling}h=Sh(_,p.mode,C),h.return=p,p=h}return o(p);case Us:return j=_._init,x(p,h,j(_._payload),C)}if(Ka(_))return w(p,h,_,C);if(Pa(_))return g(p,h,_,C);Gc(p,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,h!==null&&h.tag===6?(r(p,h.sibling),h=s(h,_),h.return=p,p=h):(r(p,h),h=bh(_,p.mode,C),h.return=p,p=h),o(p)):r(p,h)}return x}var ia=c_(!0),u_=c_(!1),Xu=xi(null),Qu=null,Do=null,Gm=null;function qm(){Gm=Do=Qu=null}function Xm(e){var t=Xu.current;St(Xu),e._currentValue=t}function kp(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ho(e,t){Qu=e,Gm=Do=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(br=!0),e.firstContext=null)}function en(e){var t=e._currentValue;if(Gm!==e)if(e={context:e,memoizedValue:t,next:null},Do===null){if(Qu===null)throw Error(ie(308));Do=e,Qu.dependencies={lanes:0,firstContext:e}}else Do=Do.next=e;return t}var Oi=null;function Qm(e){Oi===null?Oi=[e]:Oi.push(e)}function d_(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Qm(t)):(r.next=s.next,s.next=r),t.interleaved=r,ys(e,n)}function ys(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Vs=!1;function Jm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function f_(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 fs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ri(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,at&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,ys(e,r)}return s=n.interleaved,s===null?(t.next=t,Qm(n)):(t.next=s.next,s.next=t),n.interleaved=t,ys(e,r)}function xu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Fm(e,r)}}function Jy(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ju(e,t,r,n){var s=e.updateQueue;Vs=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,f=u=l=null,a=i;do{var m=a.lane,v=a.eventTime;if((n&m)===m){f!==null&&(f=f.next={eventTime:v,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,g=a;switch(m=t,v=r,g.tag){case 1:if(w=g.payload,typeof w=="function"){d=w.call(v,d,m);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=g.payload,m=typeof w=="function"?w.call(v,d,m):w,m==null)break e;d=Mt({},d,m);break e;case 2:Vs=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[a]:m.push(a))}else v={eventTime:v,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=v,l=d):f=f.next=v,o|=m;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;m=a,a=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(f===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=f,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ki|=o,e.lanes=o,e.memoizedState=d}}function ex(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=vh.transition;vh.transition={};try{e(!1),t()}finally{pt=r,vh.transition=n}}function N_(){return tn().memoizedState}function AN(e,t,r){var n=si(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},R_(e))P_(t,r);else if(r=d_(e,t,r,n),r!==null){var s=pr();yn(r,e,n,s),A_(r,t,n)}}function DN(e,t,r){var n=si(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(R_(e))P_(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,wn(a,o)){var l=t.interleaved;l===null?(s.next=s,Qm(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=d_(e,t,s,n),r!==null&&(s=pr(),yn(r,e,n,s),A_(r,t,n))}}function R_(e){var t=e.alternate;return e===Ot||t!==null&&t===Ot}function P_(e,t){ll=td=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function A_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Fm(e,r)}}var rd={readContext:en,useCallback:ir,useContext:ir,useEffect:ir,useImperativeHandle:ir,useInsertionEffect:ir,useLayoutEffect:ir,useMemo:ir,useReducer:ir,useRef:ir,useState:ir,useDebugValue:ir,useDeferredValue:ir,useTransition:ir,useMutableSource:ir,useSyncExternalStore:ir,useId:ir,unstable_isNewReconciler:!1},ON={readContext:en,useCallback:function(e,t){return Pn().memoizedState=[e,t===void 0?null:t],e},useContext:en,useEffect:rx,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,_u(4194308,4,k_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return _u(4194308,4,e,t)},useInsertionEffect:function(e,t){return _u(4,2,e,t)},useMemo:function(e,t){var r=Pn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Pn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=AN.bind(null,Ot,e),[n.memoizedState,e]},useRef:function(e){var t=Pn();return e={current:e},t.memoizedState=e},useState:tx,useDebugValue:ag,useDeferredValue:function(e){return Pn().memoizedState=e},useTransition:function(){var e=tx(!1),t=e[0];return e=PN.bind(null,e[1]),Pn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ot,s=Pn();if(Nt){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=t(),Qt===null)throw Error(ie(349));Zi&30||g_(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,rx(y_.bind(null,n,i,e),[e]),n.flags|=2048,Dl(9,v_.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Pn(),t=Qt.identifierPrefix;if(Nt){var r=cs,n=ls;r=(n&~(1<<32-vn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Pl++,0")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Jf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Za(e):""}function RT(e){switch(e.tag){case 5:return Za(e.type);case 16:return Za("Lazy");case 13:return Za("Suspense");case 19:return Za("SuspenseList");case 0:case 2:case 15:return e=eh(e.type,!1),e;case 11:return e=eh(e.type.render,!1),e;case 1:return e=eh(e.type,!0),e;default:return""}}function Qh(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 Co:return"Fragment";case ko:return"Portal";case Gh:return"Profiler";case Dm:return"StrictMode";case qh:return"Suspense";case Xh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gw:return(e.displayName||"Context")+".Consumer";case mw:return(e._context.displayName||"Context")+".Provider";case Om:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mm:return t=e.displayName||null,t!==null?t:Qh(e.type)||"Memo";case Vs:t=e._payload,e=e._init;try{return Qh(e(t))}catch{}}return null}function PT(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 Qh(t);case 8:return t===Dm?"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 ci(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function AT(e){var t=yw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Uc(e){e._valueTracker||(e._valueTracker=AT(e))}function xw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=yw(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function zu(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 Jh(e,t){var r=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function ky(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ci(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ww(e,t){t=t.checked,t!=null&&Am(e,"checked",t,!1)}function ep(e,t){ww(e,t);var r=ci(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?tp(e,t.type,r):t.hasOwnProperty("defaultValue")&&tp(e,t.type,ci(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Cy(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function tp(e,t,r){(t!=="number"||zu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ka=Array.isArray;function Vo(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Vc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var nl={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},DT=["Webkit","ms","Moz","O"];Object.keys(nl).forEach(function(e){DT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nl[t]=nl[e]})});function kw(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||nl.hasOwnProperty(e)&&nl[e]?(""+t).trim():t+"px"}function Cw(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=kw(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var OT=Mt({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 sp(e,t){if(t){if(OT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function ip(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 op=null;function Im(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ap=null,$o=null,Bo=null;function Ty(e){if(e=cc(e)){if(typeof ap!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=Wd(t),ap(e.stateNode,e.type,t))}}function Ew(e){$o?Bo?Bo.push(e):Bo=[e]:$o=e}function jw(){if($o){var e=$o,t=Bo;if(Bo=$o=null,Ty(e),t)for(e=0;e>>=0,e===0?32:31-(HT(e)/YT|0)|0}var $c=64,Bc=4194304;function Ga(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 Bu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Ga(a):(i&=o,i!==0&&(n=Ga(i)))}else o=r&~s,o!==0?n=Ga(o):i!==0&&(n=Ga(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function ac(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vn(t),e[t]=r}function qT(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0=il),Ly=" ",Fy=!1;function Zw(e,t){switch(e){case"keyup":return kN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eo=!1;function EN(e,t){switch(e){case"compositionend":return Kw(t);case"keypress":return t.which!==32?null:(Fy=!0,Ly);case"textInput":return e=t.data,e===Ly&&Fy?null:e;default:return null}}function jN(e,t){if(Eo)return e==="compositionend"||!Wm&&Zw(e,t)?(e=Hw(),yu=Vm=Ks=null,Eo=!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)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=$y(r)}}function Qw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jw(){for(var e=window,t=zu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=zu(e.document)}return t}function Hm(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 IN(e){var t=Jw(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Qw(r.ownerDocument.documentElement,r)){if(n!==null&&Hm(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=By(r,i);var o=By(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,jo=null,hp=null,al=null,pp=!1;function Wy(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;pp||jo==null||jo!==zu(n)||(n=jo,"selectionStart"in n&&Hm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),al&&Cl(al,n)||(al=n,n=Yu(hp,"onSelect"),0Ro||(e.current=wp[Ro],wp[Ro]=null,Ro--)}function xt(e,t){Ro++,wp[Ro]=e.current,e.current=t}var ui={},lr=xi(ui),kr=xi(!1),Hi=ui;function na(e,t){var r=e.type.contextTypes;if(!r)return ui;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Cr(e){return e=e.childContextTypes,e!=null}function Ku(){St(kr),St(lr)}function Xy(e,t,r){if(lr.current!==ui)throw Error(ie(168));xt(lr,t),xt(kr,r)}function l_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(ie(108,PT(e)||"Unknown",s));return Mt({},r,n)}function Gu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ui,Hi=lr.current,xt(lr,e),xt(kr,kr.current),!0}function Qy(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=l_(e,t,Hi),n.__reactInternalMemoizedMergedChildContext=e,St(kr),St(lr),xt(lr,e)):St(kr),xt(kr,r)}var as=null,Hd=!1,ph=!1;function c_(e){as===null?as=[e]:as.push(e)}function KN(e){Hd=!0,c_(e)}function wi(){if(!ph&&as!==null){ph=!0;var e=0,t=pt;try{var r=as;for(pt=1;e>=o,s-=o,ls=1<<32-vn(t)+s|r<A?(P=R,R=null):P=R.sibling;var L=m(p,R,_[A],C);if(L===null){R===null&&(R=P);break}e&&R&&L.alternate===null&&t(p,R),h=i(L,h,A),j===null?E=L:j.sibling=L,j=L,R=P}if(A===_.length)return r(p,R),Nt&&Ti(p,A),E;if(R===null){for(;A<_.length;A++)R=d(p,_[A],C),R!==null&&(h=i(R,h,A),j===null?E=R:j.sibling=R,j=R);return Nt&&Ti(p,A),E}for(R=n(p,R);A<_.length;A++)P=v(R,p,A,_[A],C),P!==null&&(e&&P.alternate!==null&&R.delete(P.key===null?A:P.key),h=i(P,h,A),j===null?E=P:j.sibling=P,j=P);return e&&R.forEach(function(q){return t(p,q)}),Nt&&Ti(p,A),E}function g(p,h,_,C){var E=Pa(_);if(typeof E!="function")throw Error(ie(150));if(_=E.call(_),_==null)throw Error(ie(151));for(var j=E=null,R=h,A=h=0,P=null,L=_.next();R!==null&&!L.done;A++,L=_.next()){R.index>A?(P=R,R=null):P=R.sibling;var q=m(p,R,L.value,C);if(q===null){R===null&&(R=P);break}e&&R&&q.alternate===null&&t(p,R),h=i(q,h,A),j===null?E=q:j.sibling=q,j=q,R=P}if(L.done)return r(p,R),Nt&&Ti(p,A),E;if(R===null){for(;!L.done;A++,L=_.next())L=d(p,L.value,C),L!==null&&(h=i(L,h,A),j===null?E=L:j.sibling=L,j=L);return Nt&&Ti(p,A),E}for(R=n(p,R);!L.done;A++,L=_.next())L=v(R,p,A,L.value,C),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?A:L.key),h=i(L,h,A),j===null?E=L:j.sibling=L,j=L);return e&&R.forEach(function(T){return t(p,T)}),Nt&&Ti(p,A),E}function x(p,h,_,C){if(typeof _=="object"&&_!==null&&_.type===Co&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case zc:e:{for(var E=_.key,j=h;j!==null;){if(j.key===E){if(E=_.type,E===Co){if(j.tag===7){r(p,j.sibling),h=s(j,_.props.children),h.return=p,p=h;break e}}else if(j.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Vs&&tx(E)===j.type){r(p,j.sibling),h=s(j,_.props),h.ref=Ia(p,j,_),h.return=p,p=h;break e}r(p,j);break}else t(p,j);j=j.sibling}_.type===Co?(h=$i(_.props.children,p.mode,C,_.key),h.return=p,p=h):(C=Eu(_.type,_.key,_.props,null,p.mode,C),C.ref=Ia(p,h,_),C.return=p,p=C)}return o(p);case ko:e:{for(j=_.key;h!==null;){if(h.key===j)if(h.tag===4&&h.stateNode.containerInfo===_.containerInfo&&h.stateNode.implementation===_.implementation){r(p,h.sibling),h=s(h,_.children||[]),h.return=p,p=h;break e}else{r(p,h);break}else t(p,h);h=h.sibling}h=bh(_,p.mode,C),h.return=p,p=h}return o(p);case Vs:return j=_._init,x(p,h,j(_._payload),C)}if(Ka(_))return w(p,h,_,C);if(Pa(_))return g(p,h,_,C);qc(p,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,h!==null&&h.tag===6?(r(p,h.sibling),h=s(h,_),h.return=p,p=h):(r(p,h),h=_h(_,p.mode,C),h.return=p,p=h),o(p)):r(p,h)}return x}var ia=h_(!0),p_=h_(!1),Qu=xi(null),Ju=null,Do=null,Gm=null;function qm(){Gm=Do=Ju=null}function Xm(e){var t=Qu.current;St(Qu),e._currentValue=t}function Sp(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ho(e,t){Ju=e,Gm=Do=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Sr=!0),e.firstContext=null)}function tn(e){var t=e._currentValue;if(Gm!==e)if(e={context:e,memoizedValue:t,next:null},Do===null){if(Ju===null)throw Error(ie(308));Do=e,Ju.dependencies={lanes:0,firstContext:e}}else Do=Do.next=e;return t}var Oi=null;function Qm(e){Oi===null?Oi=[e]:Oi.push(e)}function m_(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Qm(t)):(r.next=s.next,s.next=r),t.interleaved=r,ys(e,n)}function ys(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var $s=!1;function Jm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function g_(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 fs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ni(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,at&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,ys(e,r)}return s=n.interleaved,s===null?(t.next=t,Qm(n)):(t.next=s.next,s.next=t),n.interleaved=t,ys(e,r)}function wu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Fm(e,r)}}function rx(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ed(e,t,r,n){var s=e.updateQueue;$s=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,f=u=l=null,a=i;do{var m=a.lane,v=a.eventTime;if((n&m)===m){f!==null&&(f=f.next={eventTime:v,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,g=a;switch(m=t,v=r,g.tag){case 1:if(w=g.payload,typeof w=="function"){d=w.call(v,d,m);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=g.payload,m=typeof w=="function"?w.call(v,d,m):w,m==null)break e;d=Mt({},d,m);break e;case 2:$s=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[a]:m.push(a))}else v={eventTime:v,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=v,l=d):f=f.next=v,o|=m;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;m=a,a=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(f===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=f,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ki|=o,e.lanes=o,e.memoizedState=d}}function nx(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=gh.transition;gh.transition={};try{e(!1),t()}finally{pt=r,gh.transition=n}}function D_(){return rn().memoizedState}function QN(e,t,r){var n=ii(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},O_(e))M_(t,r);else if(r=m_(e,t,r,n),r!==null){var s=pr();yn(r,e,n,s),I_(r,t,n)}}function JN(e,t,r){var n=ii(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(O_(e))M_(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,_n(a,o)){var l=t.interleaved;l===null?(s.next=s,Qm(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=m_(e,t,s,n),r!==null&&(s=pr(),yn(r,e,n,s),I_(r,t,n))}}function O_(e){var t=e.alternate;return e===Ot||t!==null&&t===Ot}function M_(e,t){ll=rd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function I_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Fm(e,r)}}var nd={readContext:tn,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useInsertionEffect:sr,useLayoutEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useMutableSource:sr,useSyncExternalStore:sr,useId:sr,unstable_isNewReconciler:!1},e2={readContext:tn,useCallback:function(e,t){return An().memoizedState=[e,t===void 0?null:t],e},useContext:tn,useEffect:ix,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,bu(4194308,4,T_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return bu(4194308,4,e,t)},useInsertionEffect:function(e,t){return bu(4,2,e,t)},useMemo:function(e,t){var r=An();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=An();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=QN.bind(null,Ot,e),[n.memoizedState,e]},useRef:function(e){var t=An();return e={current:e},t.memoizedState=e},useState:sx,useDebugValue:ag,useDeferredValue:function(e){return An().memoizedState=e},useTransition:function(){var e=sx(!1),t=e[0];return e=XN.bind(null,e[1]),An().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ot,s=An();if(Nt){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=t(),Qt===null)throw Error(ie(349));Zi&30||w_(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,ix(b_.bind(null,n,i,e),[e]),n.flags|=2048,Dl(9,__.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=An(),t=Qt.identifierPrefix;if(Nt){var r=cs,n=ls;r=(n&~(1<<32-vn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Pl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[An]=t,e[Tl]=n,$_(e,t,!1,!1),t.stateNode=e;e:{switch(o=op(r,n),r){case"dialog":bt("cancel",e),bt("close",e),s=n;break;case"iframe":case"object":case"embed":bt("load",e),s=n;break;case"video":case"audio":for(s=0;sla&&(t.flags|=128,n=!0,La(i,!1),t.lanes=4194304)}else{if(!n)if(e=ed(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),La(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Nt)return or(t),null}else 2*Ut()-i.renderingStartTime>la&&r!==1073741824&&(t.flags|=128,n=!0,La(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ut(),t.sibling=null,r=At.current,xt(At,n?r&1|2:r&1),t):(or(t),null);case 22:case 23:return hg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Rr&1073741824&&(or(t),t.subtreeFlags&6&&(t.flags|=8192)):or(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function $N(e,t){switch(Zm(t),t.tag){case 1:return kr(t.type)&&Zu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(),St(Sr),St(cr),rg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return tg(t),null;case 13:if(St(At),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return St(At),null;case 4:return oa(),null;case 10:return Xm(t.type._context),null;case 22:case 23:return hg(),null;case 24:return null;default:return null}}var Xc=!1,ar=!1,WN=typeof WeakSet=="function"?WeakSet:Set,be=null;function Oo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Lt(e,t,n)}else r.current=null}function Dp(e,t,r){try{r()}catch(n){Lt(e,t,n)}}var hx=!1;function BN(e,t){if(gp=Wu,e=Gw(),Hm(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,f=0,d=e,m=null;t:for(;;){for(var v;d!==r||s!==0&&d.nodeType!==3||(a=o+s),d!==i||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(v=d.firstChild)!==null;)m=d,d=v;for(;;){if(d===e)break t;if(m===r&&++u===s&&(a=o),m===i&&++f===n&&(l=o),(v=d.nextSibling)!==null)break;d=m,m=d.parentNode}d=v}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(vp={focusedElem:e,selectionRange:r},Wu=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var g=w.memoizedProps,x=w.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?g:cn(t.type,g),x);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(C){Lt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,be=e;break}be=t.return}return w=hx,hx=!1,w}function cl(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Dp(t,r,i)}s=s.next}while(s!==n)}}function Kd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Op(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function H_(e){var t=e.alternate;t!==null&&(e.alternate=null,H_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[An],delete t[Tl],delete t[wp],delete t[EN],delete t[jN])),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 Y_(e){return e.tag===5||e.tag===3||e.tag===4}function px(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Y_(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 Mp(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Yu));else if(n!==4&&(e=e.child,e!==null))for(Mp(e,t,r),e=e.sibling;e!==null;)Mp(e,t,r),e=e.sibling}function Ip(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Ip(e,t,r),e=e.sibling;e!==null;)Ip(e,t,r),e=e.sibling}var er=null,un=!1;function Ms(e,t,r){for(r=r.child;r!==null;)Z_(e,t,r),r=r.sibling}function Z_(e,t,r){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount(Ud,r)}catch{}switch(r.tag){case 5:ar||Oo(r,t);case 6:var n=er,s=un;er=null,Ms(e,t,r),er=n,un=s,er!==null&&(un?(e=er,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):er.removeChild(r.stateNode));break;case 18:er!==null&&(un?(e=er,r=r.stateNode,e.nodeType===8?ph(e.parentNode,r):e.nodeType===1&&ph(e,r),Sl(e)):ph(er,r.stateNode));break;case 4:n=er,s=un,er=r.stateNode.containerInfo,un=!0,Ms(e,t,r),er=n,un=s;break;case 0:case 11:case 14:case 15:if(!ar&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Dp(r,t,o),s=s.next}while(s!==n)}Ms(e,t,r);break;case 1:if(!ar&&(Oo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Lt(r,t,a)}Ms(e,t,r);break;case 21:Ms(e,t,r);break;case 22:r.mode&1?(ar=(n=ar)||r.memoizedState!==null,Ms(e,t,r),ar=n):Ms(e,t,r);break;default:Ms(e,t,r)}}function mx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new WN),t.forEach(function(n){var s=JN.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ln(e,t){var r=t.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=Ut()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*YN(n/1960))-n,10e?16:e,Ks===null)var n=!1;else{if(e=Ks,Ks=null,id=0,at&6)throw Error(ie(331));var s=at;for(at|=4,be=e.current;be!==null;){var i=be,o=i.child;if(be.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lUt()-dg?Vi(e,0):ug|=r),Cr(e,t)}function t1(e,t){t===0&&(e.mode&1?(t=$c,$c<<=1,!($c&130023424)&&($c=4194304)):t=1);var r=pr();e=ys(e,t),e!==null&&(ac(e,t,r),Cr(e,r))}function QN(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),t1(e,r)}function JN(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ie(314))}n!==null&&n.delete(t),t1(e,r)}var r1;r1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Sr.current)br=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return br=!1,UN(e,t,r);br=!!(e.flags&131072)}else br=!1,Nt&&t.flags&1048576&&o_(t,qu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;bu(e,t),e=t.pendingProps;var s=na(t,cr.current);Ho(t,r),s=sg(null,t,n,e,s,r);var i=ig();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,kr(n)?(i=!0,Ku(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Jm(t),s.updater=Zd,t.stateNode=s,s._reactInternals=t,Ep(t,n,e,r),t=Np(null,t,n,!0,i,r)):(t.tag=0,Nt&&i&&Ym(t),fr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(bu(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=t2(n),e=cn(n,e),s){case 0:t=Tp(null,t,n,e,r);break e;case 1:t=ux(null,t,n,e,r);break e;case 11:t=lx(null,t,n,e,r);break e;case 14:t=cx(null,t,n,cn(n.type,e),r);break e}throw Error(ie(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),Tp(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),ux(e,t,n,s,r);case 3:e:{if(z_(t),e===null)throw Error(ie(387));n=t.pendingProps,i=t.memoizedState,s=i.element,f_(e,t),Ju(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=aa(Error(ie(423)),t),t=dx(e,t,n,r,s);break e}else if(n!==s){s=aa(Error(ie(424)),t),t=dx(e,t,n,r,s);break e}else for(Dr=ti(t.stateNode.containerInfo.firstChild),Or=t,Nt=!0,hn=null,r=u_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(sa(),n===s){t=xs(e,t,r);break e}fr(e,t,n,r)}t=t.child}return t;case 5:return h_(t),e===null&&Sp(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,yp(n,s)?o=null:i!==null&&yp(n,i)&&(t.flags|=32),F_(e,t),fr(e,t,o,r),t.child;case 6:return e===null&&Sp(t),null;case 13:return U_(e,t,r);case 4:return eg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ia(t,null,n,r):fr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),lx(e,t,n,s,r);case 7:return fr(e,t,t.pendingProps,r),t.child;case 8:return fr(e,t,t.pendingProps.children,r),t.child;case 12:return fr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,xt(Xu,n._currentValue),n._currentValue=o,i!==null)if(wn(i.value,o)){if(i.children===s.children&&!Sr.current){t=xs(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=fs(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),kp(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ie(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),kp(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}fr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Ho(t,r),s=en(s),n=n(s),t.flags|=1,fr(e,t,n,r),t.child;case 14:return n=t.type,s=cn(n,t.pendingProps),s=cn(n.type,s),cx(e,t,n,s,r);case 15:return I_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),bu(e,t),t.tag=1,kr(n)?(e=!0,Ku(t)):e=!1,Ho(t,r),D_(t,n,s),Ep(t,n,s,r),Np(null,t,n,!0,e,r);case 19:return V_(e,t,r);case 22:return L_(e,t,r)}throw Error(ie(156,t.tag))};function n1(e,t){return Rw(e,t)}function e2(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(e,t,r,n){return new e2(e,t,r,n)}function mg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function t2(e){if(typeof e=="function")return mg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Om)return 11;if(e===Mm)return 14}return 2}function ii(e,t){var r=e.alternate;return r===null?(r=Xr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Cu(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")mg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Co:return $i(r.children,s,i,t);case Dm:o=8,s|=8;break;case qh:return e=Xr(12,r,t,s|2),e.elementType=qh,e.lanes=i,e;case Xh:return e=Xr(13,r,t,s),e.elementType=Xh,e.lanes=i,e;case Qh:return e=Xr(19,r,t,s),e.elementType=Qh,e.lanes=i,e;case hw:return qd(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dw:o=10;break e;case fw:o=9;break e;case Om:o=11;break e;case Mm:o=14;break e;case Us:o=16,n=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=Xr(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function $i(e,t,r,n){return e=Xr(7,e,n,t),e.lanes=r,e}function qd(e,t,r,n){return e=Xr(22,e,n,t),e.elementType=hw,e.lanes=r,e.stateNode={isHidden:!1},e}function bh(e,t,r){return e=Xr(6,e,null,t),e.lanes=r,e}function Sh(e,t,r){return t=Xr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function r2(e,t,r,n,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=nh(0),this.expirationTimes=nh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nh(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function gg(e,t,r,n,s,i,o,a,l){return e=new r2(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Xr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jm(i),e}function n2(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a1)}catch(e){console.error(e)}}a1(),aw.exports=zr;var Es=aw.exports;const l1=Cm(Es),l2=K0({__proto__:null,default:l1},[Es]);var Sx=Es;Kh.createRoot=Sx.createRoot,Kh.hydrateRoot=Sx.hydrateRoot;/** +`+i.stack}return{value:e,source:t,stack:s,digest:null}}function xh(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Ep(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var n2=typeof WeakMap=="function"?WeakMap:Map;function F_(e,t,r){r=fs(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){id||(id=!0,Ip=n),Ep(e,t)},r}function z_(e,t,r){r=fs(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Ep(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Ep(e,t),typeof n!="function"&&(si===null?si=new Set([this]):si.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function lx(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new n2;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=v2.bind(null,e,t,r),t.then(e,e))}function cx(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 ux(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=fs(-1,1),t.tag=2,ni(r,t,1))),r.lanes|=1),e)}var s2=Es.ReactCurrentOwner,Sr=!1;function fr(e,t,r,n){t.child=e===null?p_(t,null,r,n):ia(t,e.child,r,n)}function dx(e,t,r,n,s){r=r.render;var i=t.ref;return Ho(t,s),n=sg(e,t,r,n,i,s),r=ig(),e!==null&&!Sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xs(e,t,s)):(Nt&&r&&Ym(t),t.flags|=1,fr(e,t,n,s),t.child)}function fx(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!mg(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,U_(e,t,i,n,s)):(e=Eu(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Cl,r(o,n)&&e.ref===t.ref)return xs(e,t,s)}return t.flags|=1,e=oi(i,n),e.ref=t.ref,e.return=t,t.child=e}function U_(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(Cl(i,n)&&e.ref===t.ref)if(Sr=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Sr=!0);else return t.lanes=e.lanes,xs(e,t,s)}return jp(e,t,r,n,s)}function V_(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xt(Mo,Rr),Rr|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xt(Mo,Rr),Rr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,xt(Mo,Rr),Rr|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,xt(Mo,Rr),Rr|=n;return fr(e,t,s,r),t.child}function $_(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function jp(e,t,r,n,s){var i=Cr(r)?Hi:lr.current;return i=na(t,i),Ho(t,s),r=sg(e,t,r,n,i,s),n=ig(),e!==null&&!Sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xs(e,t,s)):(Nt&&n&&Ym(t),t.flags|=1,fr(e,t,r,s),t.child)}function hx(e,t,r,n,s){if(Cr(r)){var i=!0;Gu(t)}else i=!1;if(Ho(t,s),t.stateNode===null)Su(e,t),L_(t,r,n),Cp(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=tn(u):(u=Cr(r)?Hi:lr.current,u=na(t,u));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&ax(t,o,n,u),$s=!1;var m=t.memoizedState;o.state=m,ed(t,n,o,s),l=t.memoizedState,a!==n||m!==l||kr.current||$s?(typeof f=="function"&&(kp(t,r,f,n),l=t.memoizedState),(a=$s||ox(t,r,a,n,m,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,g_(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:cn(t.type,a),o.props=u,d=t.pendingProps,m=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=tn(l):(l=Cr(r)?Hi:lr.current,l=na(t,l));var v=r.getDerivedStateFromProps;(f=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||m!==l)&&ax(t,o,n,l),$s=!1,m=t.memoizedState,o.state=m,ed(t,n,o,s);var w=t.memoizedState;a!==d||m!==w||kr.current||$s?(typeof v=="function"&&(kp(t,r,v,n),w=t.memoizedState),(u=$s||ox(t,r,u,n,m,w,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,w,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),o.props=n,o.state=w,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return Tp(e,t,r,n,i,s)}function Tp(e,t,r,n,s,i){$_(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&Qy(t,r,!1),xs(e,t,i);n=t.stateNode,s2.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=ia(t,e.child,null,i),t.child=ia(t,null,a,i)):fr(e,t,a,i),t.memoizedState=n.state,s&&Qy(t,r,!0),t.child}function B_(e){var t=e.stateNode;t.pendingContext?Xy(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Xy(e,t.context,!1),eg(e,t.containerInfo)}function px(e,t,r,n,s){return sa(),Km(s),t.flags|=256,fr(e,t,r,n),t.child}var Np={dehydrated:null,treeContext:null,retryLane:0};function Rp(e){return{baseLanes:e,cachePool:null,transitions:null}}function W_(e,t,r){var n=t.pendingProps,s=At.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),xt(At,s&1),e===null)return bp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=qd(o,n,0,null),e=$i(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Rp(r),t.memoizedState=Np,e):lg(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return i2(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=oi(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=oi(a,i):(i=$i(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?Rp(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=Np,n}return i=e.child,e=i.sibling,n=oi(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function lg(e,t){return t=qd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Xc(e,t,r,n){return n!==null&&Km(n),ia(t,e.child,null,r),e=lg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function i2(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=xh(Error(ie(422))),Xc(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=qd({mode:"visible",children:n.children},s,0,null),i=$i(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&ia(t,e.child,null,o),t.child.memoizedState=Rp(o),t.memoizedState=Np,i);if(!(t.mode&1))return Xc(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(ie(419)),n=xh(i,n,void 0),Xc(e,t,o,n)}if(a=(o&e.childLanes)!==0,Sr||a){if(n=Qt,n!==null){switch(o&-o){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&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,ys(e,s),yn(n,e,s,-1))}return pg(),n=xh(Error(ie(421))),Xc(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=y2.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Dr=ri(s.nextSibling),Or=t,Nt=!0,hn=null,e!==null&&(Gr[qr++]=ls,Gr[qr++]=cs,Gr[qr++]=Yi,ls=e.id,cs=e.overflow,Yi=t),t=lg(t,n.children),t.flags|=4096,t)}function mx(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Sp(e.return,t,r)}function wh(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function H_(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(fr(e,t,n.children,r),n=At.current,n&2)n=n&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&&mx(e,r,t);else if(e.tag===19)mx(e,r,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}n&=1}if(xt(At,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&td(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),wh(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&td(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}wh(t,!0,r,null,i);break;case"together":wh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Su(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xs(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ki|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,r=oi(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=oi(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function o2(e,t,r){switch(t.tag){case 3:B_(t),sa();break;case 5:v_(t);break;case 1:Cr(t.type)&&Gu(t);break;case 4:eg(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;xt(Qu,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(xt(At,At.current&1),t.flags|=128,null):r&t.child.childLanes?W_(e,t,r):(xt(At,At.current&1),e=xs(e,t,r),e!==null?e.sibling:null);xt(At,At.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return H_(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xt(At,At.current),n)break;return null;case 22:case 23:return t.lanes=0,V_(e,t,r)}return xs(e,t,r)}var Y_,Pp,Z_,K_;Y_=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Pp=function(){};Z_=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Mi(Un.current);var i=null;switch(r){case"input":s=Jh(e,s),n=Jh(e,n),i=[];break;case"select":s=Mt({},s,{value:void 0}),n=Mt({},n,{value:void 0}),i=[];break;case"textarea":s=rp(e,s),n=rp(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Zu)}sp(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(yl.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(yl.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&bt("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};K_=function(e,t,r,n){r!==n&&(t.flags|=4)};function La(e,t){if(!Nt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ir(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function a2(e,t,r){var n=t.pendingProps;switch(Zm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ir(t),null;case 1:return Cr(t.type)&&Ku(),ir(t),null;case 3:return n=t.stateNode,oa(),St(kr),St(lr),rg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,hn!==null&&(zp(hn),hn=null))),Pp(e,t),ir(t),null;case 5:tg(t);var s=Mi(Rl.current);if(r=t.type,e!==null&&t.stateNode!=null)Z_(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ie(166));return ir(t),null}if(e=Mi(Un.current),Gc(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Dn]=t,n[Tl]=i,e=(t.mode&1)!==0,r){case"dialog":bt("cancel",n),bt("close",n);break;case"iframe":case"object":case"embed":bt("load",n);break;case"video":case"audio":for(s=0;s<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Dn]=t,e[Tl]=n,Y_(e,t,!1,!1),t.stateNode=e;e:{switch(o=ip(r,n),r){case"dialog":bt("cancel",e),bt("close",e),s=n;break;case"iframe":case"object":case"embed":bt("load",e),s=n;break;case"video":case"audio":for(s=0;sla&&(t.flags|=128,n=!0,La(i,!1),t.lanes=4194304)}else{if(!n)if(e=td(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),La(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Nt)return ir(t),null}else 2*Ut()-i.renderingStartTime>la&&r!==1073741824&&(t.flags|=128,n=!0,La(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ut(),t.sibling=null,r=At.current,xt(At,n?r&1|2:r&1),t):(ir(t),null);case 22:case 23:return hg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Rr&1073741824&&(ir(t),t.subtreeFlags&6&&(t.flags|=8192)):ir(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function l2(e,t){switch(Zm(t),t.tag){case 1:return Cr(t.type)&&Ku(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(),St(kr),St(lr),rg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return tg(t),null;case 13:if(St(At),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return St(At),null;case 4:return oa(),null;case 10:return Xm(t.type._context),null;case 22:case 23:return hg(),null;case 24:return null;default:return null}}var Qc=!1,or=!1,c2=typeof WeakSet=="function"?WeakSet:Set,be=null;function Oo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Lt(e,t,n)}else r.current=null}function Ap(e,t,r){try{r()}catch(n){Lt(e,t,n)}}var gx=!1;function u2(e,t){if(mp=Wu,e=Jw(),Hm(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,f=0,d=e,m=null;t:for(;;){for(var v;d!==r||s!==0&&d.nodeType!==3||(a=o+s),d!==i||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(v=d.firstChild)!==null;)m=d,d=v;for(;;){if(d===e)break t;if(m===r&&++u===s&&(a=o),m===i&&++f===n&&(l=o),(v=d.nextSibling)!==null)break;d=m,m=d.parentNode}d=v}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(gp={focusedElem:e,selectionRange:r},Wu=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var g=w.memoizedProps,x=w.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?g:cn(t.type,g),x);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(C){Lt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,be=e;break}be=t.return}return w=gx,gx=!1,w}function cl(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Ap(t,r,i)}s=s.next}while(s!==n)}}function Kd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Dp(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function G_(e){var t=e.alternate;t!==null&&(e.alternate=null,G_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Dn],delete t[Tl],delete t[xp],delete t[YN],delete t[ZN])),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 q_(e){return e.tag===5||e.tag===3||e.tag===4}function vx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||q_(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 Op(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Zu));else if(n!==4&&(e=e.child,e!==null))for(Op(e,t,r),e=e.sibling;e!==null;)Op(e,t,r),e=e.sibling}function Mp(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Mp(e,t,r),e=e.sibling;e!==null;)Mp(e,t,r),e=e.sibling}var er=null,un=!1;function Is(e,t,r){for(r=r.child;r!==null;)X_(e,t,r),r=r.sibling}function X_(e,t,r){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(Ud,r)}catch{}switch(r.tag){case 5:or||Oo(r,t);case 6:var n=er,s=un;er=null,Is(e,t,r),er=n,un=s,er!==null&&(un?(e=er,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):er.removeChild(r.stateNode));break;case 18:er!==null&&(un?(e=er,r=r.stateNode,e.nodeType===8?hh(e.parentNode,r):e.nodeType===1&&hh(e,r),Sl(e)):hh(er,r.stateNode));break;case 4:n=er,s=un,er=r.stateNode.containerInfo,un=!0,Is(e,t,r),er=n,un=s;break;case 0:case 11:case 14:case 15:if(!or&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Ap(r,t,o),s=s.next}while(s!==n)}Is(e,t,r);break;case 1:if(!or&&(Oo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Lt(r,t,a)}Is(e,t,r);break;case 21:Is(e,t,r);break;case 22:r.mode&1?(or=(n=or)||r.memoizedState!==null,Is(e,t,r),or=n):Is(e,t,r);break;default:Is(e,t,r)}}function yx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new c2),t.forEach(function(n){var s=x2.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ln(e,t){var r=t.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=Ut()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*f2(n/1960))-n,10e?16:e,Gs===null)var n=!1;else{if(e=Gs,Gs=null,od=0,at&6)throw Error(ie(331));var s=at;for(at|=4,be=e.current;be!==null;){var i=be,o=i.child;if(be.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lUt()-dg?Vi(e,0):ug|=r),Er(e,t)}function i1(e,t){t===0&&(e.mode&1?(t=Bc,Bc<<=1,!(Bc&130023424)&&(Bc=4194304)):t=1);var r=pr();e=ys(e,t),e!==null&&(ac(e,t,r),Er(e,r))}function y2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),i1(e,r)}function x2(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ie(314))}n!==null&&n.delete(t),i1(e,r)}var o1;o1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||kr.current)Sr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Sr=!1,o2(e,t,r);Sr=!!(e.flags&131072)}else Sr=!1,Nt&&t.flags&1048576&&u_(t,Xu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Su(e,t),e=t.pendingProps;var s=na(t,lr.current);Ho(t,r),s=sg(null,t,n,e,s,r);var i=ig();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,Cr(n)?(i=!0,Gu(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Jm(t),s.updater=Zd,t.stateNode=s,s._reactInternals=t,Cp(t,n,e,r),t=Tp(null,t,n,!0,i,r)):(t.tag=0,Nt&&i&&Ym(t),fr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Su(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=_2(n),e=cn(n,e),s){case 0:t=jp(null,t,n,e,r);break e;case 1:t=hx(null,t,n,e,r);break e;case 11:t=dx(null,t,n,e,r);break e;case 14:t=fx(null,t,n,cn(n.type,e),r);break e}throw Error(ie(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),jp(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),hx(e,t,n,s,r);case 3:e:{if(B_(t),e===null)throw Error(ie(387));n=t.pendingProps,i=t.memoizedState,s=i.element,g_(e,t),ed(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=aa(Error(ie(423)),t),t=px(e,t,n,r,s);break e}else if(n!==s){s=aa(Error(ie(424)),t),t=px(e,t,n,r,s);break e}else for(Dr=ri(t.stateNode.containerInfo.firstChild),Or=t,Nt=!0,hn=null,r=p_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(sa(),n===s){t=xs(e,t,r);break e}fr(e,t,n,r)}t=t.child}return t;case 5:return v_(t),e===null&&bp(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,vp(n,s)?o=null:i!==null&&vp(n,i)&&(t.flags|=32),$_(e,t),fr(e,t,o,r),t.child;case 6:return e===null&&bp(t),null;case 13:return W_(e,t,r);case 4:return eg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ia(t,null,n,r):fr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),dx(e,t,n,s,r);case 7:return fr(e,t,t.pendingProps,r),t.child;case 8:return fr(e,t,t.pendingProps.children,r),t.child;case 12:return fr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,xt(Qu,n._currentValue),n._currentValue=o,i!==null)if(_n(i.value,o)){if(i.children===s.children&&!kr.current){t=xs(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=fs(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Sp(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ie(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Sp(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}fr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Ho(t,r),s=tn(s),n=n(s),t.flags|=1,fr(e,t,n,r),t.child;case 14:return n=t.type,s=cn(n,t.pendingProps),s=cn(n.type,s),fx(e,t,n,s,r);case 15:return U_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),Su(e,t),t.tag=1,Cr(n)?(e=!0,Gu(t)):e=!1,Ho(t,r),L_(t,n,s),Cp(t,n,s,r),Tp(null,t,n,!0,e,r);case 19:return H_(e,t,r);case 22:return V_(e,t,r)}throw Error(ie(156,t.tag))};function a1(e,t){return Ow(e,t)}function w2(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qr(e,t,r,n){return new w2(e,t,r,n)}function mg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _2(e){if(typeof e=="function")return mg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Om)return 11;if(e===Mm)return 14}return 2}function oi(e,t){var r=e.alternate;return r===null?(r=Qr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Eu(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")mg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Co:return $i(r.children,s,i,t);case Dm:o=8,s|=8;break;case Gh:return e=Qr(12,r,t,s|2),e.elementType=Gh,e.lanes=i,e;case qh:return e=Qr(13,r,t,s),e.elementType=qh,e.lanes=i,e;case Xh:return e=Qr(19,r,t,s),e.elementType=Xh,e.lanes=i,e;case vw:return qd(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mw:o=10;break e;case gw:o=9;break e;case Om:o=11;break e;case Mm:o=14;break e;case Vs:o=16,n=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=Qr(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function $i(e,t,r,n){return e=Qr(7,e,n,t),e.lanes=r,e}function qd(e,t,r,n){return e=Qr(22,e,n,t),e.elementType=vw,e.lanes=r,e.stateNode={isHidden:!1},e}function _h(e,t,r){return e=Qr(6,e,null,t),e.lanes=r,e}function bh(e,t,r){return t=Qr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function b2(e,t,r,n,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=rh(0),this.expirationTimes=rh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rh(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function gg(e,t,r,n,s,i,o,a,l){return e=new b2(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Qr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jm(i),e}function S2(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d1)}catch(e){console.error(e)}}d1(),dw.exports=zr;var js=dw.exports;const f1=Cm(js),T2=Q0({__proto__:null,default:f1},[js]);var Ex=js;Zh.createRoot=Ex.createRoot,Zh.hydrateRoot=Ex.hydrateRoot;/** * @remix-run/router v1.18.0 * * Copyright (c) Remix Software Inc. @@ -46,9 +46,9 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function qi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function u2(){return Math.random().toString(36).substr(2,8)}function Cx(e,t){return{usr:e.state,key:e.key,idx:t}}function Ml(e,t,r,n){return r===void 0&&(r=null),Pt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?js(t):t,{state:r,key:t&&t.key||n||u2()})}function Xi(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function js(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function d2(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=$t.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(Pt({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){a=$t.Pop;let x=f(),p=x==null?null:x-u;u=x,l&&l({action:a,location:g.location,delta:p})}function m(x,p){a=$t.Push;let h=Ml(g.location,x,p);r&&r(h,x),u=f()+1;let _=Cx(h,u),C=g.createHref(h);try{o.pushState(_,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(C)}i&&l&&l({action:a,location:g.location,delta:1})}function v(x,p){a=$t.Replace;let h=Ml(g.location,x,p);r&&r(h,x),u=f();let _=Cx(h,u),C=g.createHref(h);o.replaceState(_,"",C),i&&l&&l({action:a,location:g.location,delta:0})}function w(x){let p=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof x=="string"?x:Xi(x);return h=h.replace(/ $/,"%20"),Qe(p,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,p)}let g={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(kx,d),l=x,()=>{s.removeEventListener(kx,d),l=null}},createHref(x){return t(s,x)},createURL:w,encodeLocation(x){let p=w(x);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:m,replace:v,go(x){return o.go(x)}};return g}var yt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yt||(yt={}));const f2=new Set(["lazy","caseSensitive","path","id","index","children"]);function h2(e){return e.index===!0}function Il(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((s,i)=>{let o=[...r,String(i)],a=typeof s.id=="string"?s.id:o.join("-");if(Qe(s.index!==!0||!s.children,"Cannot specify children on an index route"),Qe(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),h2(s)){let l=Pt({},s,t(s),{id:a});return n[a]=l,l}else{let l=Pt({},s,t(s),{id:a,children:void 0});return n[a]=l,s.children&&(l.children=Il(s.children,t,o,n)),l}})}function Ri(e,t,r){return r===void 0&&(r="/"),Eu(e,t,r,!1)}function Eu(e,t,r,n){let s=typeof t=="string"?js(t):t,i=xa(s.pathname||"/",r);if(i==null)return null;let o=c1(e);m2(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Qe(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=hs([n,l.relativePath]),f=r.concat(l);i.children&&i.children.length>0&&(Qe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),c1(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:b2(u,i.index),routesMeta:f})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of u1(i.path))s(i,o,l)}),t}function u1(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=u1(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function m2(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:S2(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const g2=/^:[\w-]+$/,v2=3,y2=2,x2=1,w2=10,_2=-2,Ex=e=>e==="*";function b2(e,t){let r=e.split("/"),n=r.length;return r.some(Ex)&&(n+=_2),t&&(n+=y2),r.filter(s=>!Ex(s)).reduce((s,i)=>s+(g2.test(i)?v2:i===""?x2:w2),n)}function S2(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function k2(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a{let{paramName:m,isOptional:v}=f;if(m==="*"){let g=a[d]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const w=a[d];return v&&!w?u[m]=void 0:u[m]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function C2(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),qi(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 n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function E2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return qi(!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 xa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function j2(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?js(e):e;return{pathname:r?r.startsWith("/")?r:T2(r,t):t,search:R2(n),hash:P2(s)}}function T2(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function kh(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function d1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function tf(e,t){let r=d1(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function rf(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=js(e):(s=Pt({},e),Qe(!s.pathname||!s.pathname.includes("?"),kh("?","pathname","search",s)),Qe(!s.pathname||!s.pathname.includes("#"),kh("#","pathname","hash",s)),Qe(!s.search||!s.search.includes("#"),kh("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let d=t.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),d-=1;s.pathname=m.join("/")}a=d>=0?t[d]:"/"}let l=j2(s,a),u=o&&o!=="/"&&o.endsWith("/"),f=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const hs=e=>e.join("/").replace(/\/\/+/g,"/"),N2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,P2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class wg{constructor(t,r,n,s){s===void 0&&(s=!1),this.status=t,this.statusText=r||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function nf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const f1=["post","put","patch","delete"],A2=new Set(f1),D2=["get",...f1],O2=new Set(D2),M2=new Set([301,302,303,307,308]),I2=new Set([307,308]),Ch={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},L2={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},za={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},_g=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,F2=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),h1="remix-router-transitions";function z2(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Qe(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 U=e.detectErrorBoundary;s=B=>({hasErrorBoundary:U(B)})}else s=F2;let i={},o=Il(e.routes,s,void 0,i),a,l=e.basename||"/",u=e.unstable_dataStrategy||B2,f=e.unstable_patchRoutesOnMiss,d=Pt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,v=new Set,w=null,g=null,x=null,p=e.hydrationData!=null,h=Ri(o,e.history.location,l),_=null;if(h==null&&!f){let U=dr(404,{pathname:e.history.location.pathname}),{matches:B,route:G}=Lx(o);h=B,_={[G.id]:U}}h&&f&&!e.hydrationData&&Xf(h,o,e.history.location.pathname).active&&(h=null);let C;if(!h)C=!1,h=[];else if(h.some(U=>U.route.lazy))C=!1;else if(!h.some(U=>U.route.loader))C=!0;else if(d.v7_partialHydration){let U=e.hydrationData?e.hydrationData.loaderData:null,B=e.hydrationData?e.hydrationData.errors:null,G=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:U&&U[re.route.id]!==void 0||B&&B[re.route.id]!==void 0:!0;if(B){let re=h.findIndex(xe=>B[xe.route.id]!==void 0);C=h.slice(0,re+1).every(G)}else C=h.every(G)}else C=e.hydrationData!=null;let E,j={historyAction:e.history.action,location:e.history.location,matches:h,initialized:C,navigation:Ch,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||_,fetchers:new Map,blockers:new Map},R=$t.Pop,A=!1,P,L=!1,q=new Map,T=null,F=!1,b=!1,$=[],te=[],W=new Map,Z=0,I=-1,Q=new Map,z=new Set,V=new Map,fe=new Map,ne=new Set,se=new Map,Ae=new Map,he=new Map,ye=!1;function ke(){if(m=e.history.listen(U=>{let{action:B,location:G,delta:re}=U;if(ye){ye=!1;return}qi(Ae.size===0||re!=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 xe=Pc({currentLocation:j.location,nextLocation:G,historyAction:B});if(xe&&re!=null){ye=!0,e.history.go(re*-1),co(xe,{state:"blocked",location:G,proceed(){co(xe,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),e.history.go(re)},reset(){let Re=new Map(j.blockers);Re.set(xe,za),Ne({blockers:Re})}});return}return K(B,G)}),r){nR(t,q);let U=()=>sR(t,q);t.addEventListener("pagehide",U),T=()=>t.removeEventListener("pagehide",U)}return j.initialized||K($t.Pop,j.location,{initialHydration:!0}),E}function Ie(){m&&m(),T&&T(),v.clear(),P&&P.abort(),j.fetchers.forEach((U,B)=>Bt(B)),j.blockers.forEach((U,B)=>Rc(B))}function De(U){return v.add(U),()=>v.delete(U)}function Ne(U,B){B===void 0&&(B={}),j=Pt({},j,U);let G=[],re=[];d.v7_fetcherPersist&&j.fetchers.forEach((xe,Re)=>{xe.state==="idle"&&(ne.has(Re)?re.push(Re):G.push(Re))}),[...v].forEach(xe=>xe(j,{deletedFetchers:re,unstable_viewTransitionOpts:B.viewTransitionOpts,unstable_flushSync:B.flushSync===!0})),d.v7_fetcherPersist&&(G.forEach(xe=>j.fetchers.delete(xe)),re.forEach(xe=>Bt(xe)))}function nt(U,B,G){var re,xe;let{flushSync:Re}=G===void 0?{}:G,$e=j.actionData!=null&&j.navigation.formMethod!=null&&dn(j.navigation.formMethod)&&j.navigation.state==="loading"&&((re=U.state)==null?void 0:re._isRedirect)!==!0,ue;B.actionData?Object.keys(B.actionData).length>0?ue=B.actionData:ue=null:$e?ue=j.actionData:ue=null;let Ye=B.loaderData?Mx(j.loaderData,B.loaderData,B.matches||[],B.errors):j.loaderData,Me=j.blockers;Me.size>0&&(Me=new Map(Me),Me.forEach((ht,vt)=>Me.set(vt,za)));let Le=A===!0||j.navigation.formMethod!=null&&dn(j.navigation.formMethod)&&((xe=U.state)==null?void 0:xe._isRedirect)!==!0;a&&(o=a,a=void 0),F||R===$t.Pop||(R===$t.Push?e.history.push(U,U.state):R===$t.Replace&&e.history.replace(U,U.state));let mt;if(R===$t.Pop){let ht=q.get(j.location.pathname);ht&&ht.has(U.pathname)?mt={currentLocation:j.location,nextLocation:U}:q.has(U.pathname)&&(mt={currentLocation:U,nextLocation:j.location})}else if(L){let ht=q.get(j.location.pathname);ht?ht.add(U.pathname):(ht=new Set([U.pathname]),q.set(j.location.pathname,ht)),mt={currentLocation:j.location,nextLocation:U}}Ne(Pt({},B,{actionData:ue,loaderData:Ye,historyAction:R,location:U,initialized:!0,navigation:Ch,revalidation:"idle",restoreScrollPosition:hy(U,B.matches||j.matches),preventScrollReset:Le,blockers:Me}),{viewTransitionOpts:mt,flushSync:Re===!0}),R=$t.Pop,A=!1,L=!1,F=!1,b=!1,$=[],te=[]}async function k(U,B){if(typeof U=="number"){e.history.go(U);return}let G=Vp(j.location,j.matches,l,d.v7_prependBasename,U,d.v7_relativeSplatPath,B==null?void 0:B.fromRouteId,B==null?void 0:B.relative),{path:re,submission:xe,error:Re}=Tx(d.v7_normalizeFormMethod,!1,G,B),$e=j.location,ue=Ml(j.location,re,B&&B.state);ue=Pt({},ue,e.history.encodeLocation(ue));let Ye=B&&B.replace!=null?B.replace:void 0,Me=$t.Push;Ye===!0?Me=$t.Replace:Ye===!1||xe!=null&&dn(xe.formMethod)&&xe.formAction===j.location.pathname+j.location.search&&(Me=$t.Replace);let Le=B&&"preventScrollReset"in B?B.preventScrollReset===!0:void 0,mt=(B&&B.unstable_flushSync)===!0,ht=Pc({currentLocation:$e,nextLocation:ue,historyAction:Me});if(ht){co(ht,{state:"blocked",location:ue,proceed(){co(ht,{state:"proceeding",proceed:void 0,reset:void 0,location:ue}),k(U,B)},reset(){let vt=new Map(j.blockers);vt.set(ht,za),Ne({blockers:vt})}});return}return await K(Me,ue,{submission:xe,pendingError:Re,preventScrollReset:Le,replace:B&&B.replace,enableViewTransition:B&&B.unstable_viewTransition,flushSync:mt})}function J(){if(Be(),Ne({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){K(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}K(R||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function K(U,B,G){P&&P.abort(),P=null,R=U,F=(G&&G.startUninterruptedRevalidation)===!0,Aj(j.location,j.matches),A=(G&&G.preventScrollReset)===!0,L=(G&&G.enableViewTransition)===!0;let re=a||o,xe=G&&G.overrideNavigation,Re=Ri(re,B,l),$e=(G&&G.flushSync)===!0,ue=Xf(Re,re,B.pathname);if(ue.active&&ue.matches&&(Re=ue.matches),!Re){let{error:ut,notFoundMatches:Jt,route:Vt}=uo(B.pathname);nt(B,{matches:Jt,loaderData:{},errors:{[Vt.id]:ut}},{flushSync:$e});return}if(j.initialized&&!b&&q2(j.location,B)&&!(G&&G.submission&&dn(G.submission.formMethod))){nt(B,{matches:Re},{flushSync:$e});return}P=new AbortController;let Ye=go(e.history,B,P.signal,G&&G.submission),Me;if(G&&G.pendingError)Me=[Io(Re).route.id,{type:yt.error,error:G.pendingError}];else if(G&&G.submission&&dn(G.submission.formMethod)){let ut=await D(Ye,B,G.submission,Re,ue.active,{replace:G.replace,flushSync:$e});if(ut.shortCircuited)return;if(ut.pendingActionResult){let[Jt,Vt]=ut.pendingActionResult;if(Pr(Vt)&&nf(Vt.error)&&Vt.error.status===404){P=null,nt(B,{matches:ut.matches,loaderData:{},errors:{[Jt]:Vt.error}});return}}Re=ut.matches||Re,Me=ut.pendingActionResult,xe=Eh(B,G.submission),$e=!1,ue.active=!1,Ye=go(e.history,Ye.url,Ye.signal)}let{shortCircuited:Le,matches:mt,loaderData:ht,errors:vt}=await S(Ye,B,Re,ue.active,xe,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,G&&G.initialHydration===!0,$e,Me);Le||(P=null,nt(B,Pt({matches:mt||Re},Ix(Me),{loaderData:ht,errors:vt})))}async function D(U,B,G,re,xe,Re){Re===void 0&&(Re={}),Be();let $e=tR(B,G);if(Ne({navigation:$e},{flushSync:Re.flushSync===!0}),xe){let Me=await Ac(re,B.pathname,U.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){let{boundaryId:Le,error:mt}=Tn(B.pathname,Me);return{matches:Me.partialMatches,pendingActionResult:[Le,{type:yt.error,error:mt}]}}else if(Me.matches)re=Me.matches;else{let{notFoundMatches:Le,error:mt,route:ht}=uo(B.pathname);return{matches:Le,pendingActionResult:[ht.id,{type:yt.error,error:mt}]}}}let ue,Ye=Xa(re,B);if(!Ye.route.action&&!Ye.route.lazy)ue={type:yt.error,error:dr(405,{method:U.method,pathname:B.pathname,routeId:Ye.route.id})};else if(ue=(await ee("action",U,[Ye],re))[0],U.signal.aborted)return{shortCircuited:!0};if(Li(ue)){let Me;return Re&&Re.replace!=null?Me=Re.replace:Me=Ax(ue.response.headers.get("Location"),new URL(U.url),l)===j.location.pathname+j.location.search,await X(U,ue,{submission:G,replace:Me}),{shortCircuited:!0}}if(Ii(ue))throw dr(400,{type:"defer-action"});if(Pr(ue)){let Me=Io(re,Ye.route.id);return(Re&&Re.replace)!==!0&&(R=$t.Push),{matches:re,pendingActionResult:[Me.route.id,ue]}}return{matches:re,pendingActionResult:[Ye.route.id,ue]}}async function S(U,B,G,re,xe,Re,$e,ue,Ye,Me,Le){let mt=xe||Eh(B,Re),ht=Re||$e||Ux(mt),vt=!F&&(!d.v7_partialHydration||!Ye);if(re){if(vt){let It=N(Le);Ne(Pt({navigation:mt},It!==void 0?{actionData:It}:{}),{flushSync:Me})}let Ge=await Ac(G,B.pathname,U.signal);if(Ge.type==="aborted")return{shortCircuited:!0};if(Ge.type==="error"){let{boundaryId:It,error:jr}=Tn(B.pathname,Ge);return{matches:Ge.partialMatches,loaderData:{},errors:{[It]:jr}}}else if(Ge.matches)G=Ge.matches;else{let{error:It,notFoundMatches:jr,route:jt}=uo(B.pathname);return{matches:jr,loaderData:{},errors:{[jt.id]:It}}}}let ut=a||o,[Jt,Vt]=Nx(e.history,j,G,ht,B,d.v7_partialHydration&&Ye===!0,d.v7_skipActionErrorRevalidation,b,$,te,ne,V,z,ut,l,Le);if(Ds(Ge=>!(G&&G.some(It=>It.route.id===Ge))||Jt&&Jt.some(It=>It.route.id===Ge)),I=++Z,Jt.length===0&&Vt.length===0){let Ge=Qn();return nt(B,Pt({matches:G,loaderData:{},errors:Le&&Pr(Le[1])?{[Le[0]]:Le[1].error}:null},Ix(Le),Ge?{fetchers:new Map(j.fetchers)}:{}),{flushSync:Me}),{shortCircuited:!0}}if(vt){let Ge={};if(!re){Ge.navigation=mt;let It=N(Le);It!==void 0&&(Ge.actionData=It)}Vt.length>0&&(Ge.fetchers=O(Vt)),Ne(Ge,{flushSync:Me})}Vt.forEach(Ge=>{W.has(Ge.key)&&ot(Ge.key),Ge.controller&&W.set(Ge.key,Ge.controller)});let Ra=()=>Vt.forEach(Ge=>ot(Ge.key));P&&P.signal.addEventListener("abort",Ra);let{loaderResults:Os,fetcherResults:fo}=await pe(j.matches,G,Jt,Vt,U);if(U.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener("abort",Ra),Vt.forEach(Ge=>W.delete(Ge.key));let ho=Fx([...Os,...fo]);if(ho){if(ho.idx>=Jt.length){let Ge=Vt[ho.idx-Jt.length].key;z.add(Ge)}return await X(U,ho.result,{replace:ue}),{shortCircuited:!0}}let{loaderData:po,errors:Nn}=Ox(j,G,Jt,Os,Le,Vt,fo,se);se.forEach((Ge,It)=>{Ge.subscribe(jr=>{(jr||Ge.done)&&se.delete(It)})}),d.v7_partialHydration&&Ye&&j.errors&&Object.entries(j.errors).filter(Ge=>{let[It]=Ge;return!Jt.some(jr=>jr.route.id===It)}).forEach(Ge=>{let[It,jr]=Ge;Nn=Object.assign(Nn||{},{[It]:jr})});let Dc=Qn(),Oc=Zr(I),Mc=Dc||Oc||Vt.length>0;return Pt({matches:G,loaderData:po,errors:Nn},Mc?{fetchers:new Map(j.fetchers)}:{})}function N(U){if(U&&!Pr(U[1]))return{[U[0]]:U[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function O(U){return U.forEach(B=>{let G=j.fetchers.get(B.key),re=Ua(void 0,G?G.data:void 0);j.fetchers.set(B.key,re)}),new Map(j.fetchers)}function Y(U,B,G,re){if(n)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(U)&&ot(U);let xe=(re&&re.unstable_flushSync)===!0,Re=a||o,$e=Vp(j.location,j.matches,l,d.v7_prependBasename,G,d.v7_relativeSplatPath,B,re==null?void 0:re.relative),ue=Ri(Re,$e,l),Ye=Xf(ue,Re,$e);if(Ye.active&&Ye.matches&&(ue=Ye.matches),!ue){Et(U,B,dr(404,{pathname:$e}),{flushSync:xe});return}let{path:Me,submission:Le,error:mt}=Tx(d.v7_normalizeFormMethod,!0,$e,re);if(mt){Et(U,B,mt,{flushSync:xe});return}let ht=Xa(ue,Me);if(A=(re&&re.preventScrollReset)===!0,Le&&dn(Le.formMethod)){M(U,B,Me,ht,ue,Ye.active,xe,Le);return}V.set(U,{routeId:B,path:Me}),H(U,B,Me,ht,ue,Ye.active,xe,Le)}async function M(U,B,G,re,xe,Re,$e,ue){Be(),V.delete(U);function Ye(jt){if(!jt.route.action&&!jt.route.lazy){let Jn=dr(405,{method:ue.formMethod,pathname:G,routeId:B});return Et(U,B,Jn,{flushSync:$e}),!0}return!1}if(!Re&&Ye(re))return;let Me=j.fetchers.get(U);ze(U,rR(ue,Me),{flushSync:$e});let Le=new AbortController,mt=go(e.history,G,Le.signal,ue);if(Re){let jt=await Ac(xe,G,mt.signal);if(jt.type==="aborted")return;if(jt.type==="error"){let{error:Jn}=Tn(G,jt);Et(U,B,Jn,{flushSync:$e});return}else if(jt.matches){if(xe=jt.matches,re=Xa(xe,G),Ye(re))return}else{Et(U,B,dr(404,{pathname:G}),{flushSync:$e});return}}W.set(U,Le);let ht=Z,ut=(await ee("action",mt,[re],xe))[0];if(mt.signal.aborted){W.get(U)===Le&&W.delete(U);return}if(d.v7_fetcherPersist&&ne.has(U)){if(Li(ut)||Pr(ut)){ze(U,Fs(void 0));return}}else{if(Li(ut))if(W.delete(U),I>ht){ze(U,Fs(void 0));return}else return z.add(U),ze(U,Ua(ue)),X(mt,ut,{fetcherSubmission:ue});if(Pr(ut)){Et(U,B,ut.error);return}}if(Ii(ut))throw dr(400,{type:"defer-action"});let Jt=j.navigation.location||j.location,Vt=go(e.history,Jt,Le.signal),Ra=a||o,Os=j.navigation.state!=="idle"?Ri(Ra,j.navigation.location,l):j.matches;Qe(Os,"Didn't find any matches after fetcher action");let fo=++Z;Q.set(U,fo);let ho=Ua(ue,ut.data);j.fetchers.set(U,ho);let[po,Nn]=Nx(e.history,j,Os,ue,Jt,!1,d.v7_skipActionErrorRevalidation,b,$,te,ne,V,z,Ra,l,[re.route.id,ut]);Nn.filter(jt=>jt.key!==U).forEach(jt=>{let Jn=jt.key,py=j.fetchers.get(Jn),Mj=Ua(void 0,py?py.data:void 0);j.fetchers.set(Jn,Mj),W.has(Jn)&&ot(Jn),jt.controller&&W.set(Jn,jt.controller)}),Ne({fetchers:new Map(j.fetchers)});let Dc=()=>Nn.forEach(jt=>ot(jt.key));Le.signal.addEventListener("abort",Dc);let{loaderResults:Oc,fetcherResults:Mc}=await pe(j.matches,Os,po,Nn,Vt);if(Le.signal.aborted)return;Le.signal.removeEventListener("abort",Dc),Q.delete(U),W.delete(U),Nn.forEach(jt=>W.delete(jt.key));let Ge=Fx([...Oc,...Mc]);if(Ge){if(Ge.idx>=po.length){let jt=Nn[Ge.idx-po.length].key;z.add(jt)}return X(Vt,Ge.result)}let{loaderData:It,errors:jr}=Ox(j,j.matches,po,Oc,void 0,Nn,Mc,se);if(j.fetchers.has(U)){let jt=Fs(ut.data);j.fetchers.set(U,jt)}Zr(fo),j.navigation.state==="loading"&&fo>I?(Qe(R,"Expected pending action"),P&&P.abort(),nt(j.navigation.location,{matches:Os,loaderData:It,errors:jr,fetchers:new Map(j.fetchers)})):(Ne({errors:jr,loaderData:Mx(j.loaderData,It,Os,jr),fetchers:new Map(j.fetchers)}),b=!1)}async function H(U,B,G,re,xe,Re,$e,ue){let Ye=j.fetchers.get(U);ze(U,Ua(ue,Ye?Ye.data:void 0),{flushSync:$e});let Me=new AbortController,Le=go(e.history,G,Me.signal);if(Re){let ut=await Ac(xe,G,Le.signal);if(ut.type==="aborted")return;if(ut.type==="error"){let{error:Jt}=Tn(G,ut);Et(U,B,Jt,{flushSync:$e});return}else if(ut.matches)xe=ut.matches,re=Xa(xe,G);else{Et(U,B,dr(404,{pathname:G}),{flushSync:$e});return}}W.set(U,Me);let mt=Z,vt=(await ee("loader",Le,[re],xe))[0];if(Ii(vt)&&(vt=await y1(vt,Le.signal,!0)||vt),W.get(U)===Me&&W.delete(U),!Le.signal.aborted){if(ne.has(U)){ze(U,Fs(void 0));return}if(Li(vt))if(I>mt){ze(U,Fs(void 0));return}else{z.add(U),await X(Le,vt);return}if(Pr(vt)){Et(U,B,vt.error);return}Qe(!Ii(vt),"Unhandled fetcher deferred data"),ze(U,Fs(vt.data))}}async function X(U,B,G){let{submission:re,fetcherSubmission:xe,replace:Re}=G===void 0?{}:G;B.response.headers.has("X-Remix-Revalidate")&&(b=!0);let $e=B.response.headers.get("Location");Qe($e,"Expected a Location header on the redirect Response"),$e=Ax($e,new URL(U.url),l);let ue=Ml(j.location,$e,{_isRedirect:!0});if(r){let vt=!1;if(B.response.headers.has("X-Remix-Reload-Document"))vt=!0;else if(_g.test($e)){const ut=e.history.createURL($e);vt=ut.origin!==t.location.origin||xa(ut.pathname,l)==null}if(vt){Re?t.location.replace($e):t.location.assign($e);return}}P=null;let Ye=Re===!0?$t.Replace:$t.Push,{formMethod:Me,formAction:Le,formEncType:mt}=j.navigation;!re&&!xe&&Me&&Le&&mt&&(re=Ux(j.navigation));let ht=re||xe;if(I2.has(B.response.status)&&ht&&dn(ht.formMethod))await K(Ye,ue,{submission:Pt({},ht,{formAction:$e}),preventScrollReset:A});else{let vt=Eh(ue,re);await K(Ye,ue,{overrideNavigation:vt,fetcherSubmission:xe,preventScrollReset:A})}}async function ee(U,B,G,re){try{let xe=await H2(u,U,B,G,re,i,s);return await Promise.all(xe.map((Re,$e)=>{if(Q2(Re)){let ue=Re.result;return{type:yt.redirect,response:K2(ue,B,G[$e].route.id,re,l,d.v7_relativeSplatPath)}}return Z2(Re)}))}catch(xe){return G.map(()=>({type:yt.error,error:xe}))}}async function pe(U,B,G,re,xe){let[Re,...$e]=await Promise.all([G.length?ee("loader",xe,G,B):[],...re.map(ue=>{if(ue.matches&&ue.match&&ue.controller){let Ye=go(e.history,ue.path,ue.controller.signal);return ee("loader",Ye,[ue.match],ue.matches).then(Me=>Me[0])}else return Promise.resolve({type:yt.error,error:dr(404,{pathname:ue.path})})})]);return await Promise.all([zx(U,G,Re,Re.map(()=>xe.signal),!1,j.loaderData),zx(U,re.map(ue=>ue.match),$e,re.map(ue=>ue.controller?ue.controller.signal:null),!0)]),{loaderResults:Re,fetcherResults:$e}}function Be(){b=!0,$.push(...Ds()),V.forEach((U,B)=>{W.has(B)&&(te.push(B),ot(B))})}function ze(U,B,G){G===void 0&&(G={}),j.fetchers.set(U,B),Ne({fetchers:new Map(j.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function Et(U,B,G,re){re===void 0&&(re={});let xe=Io(j.matches,B);Bt(U),Ne({errors:{[xe.route.id]:G},fetchers:new Map(j.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Yr(U){return d.v7_fetcherPersist&&(fe.set(U,(fe.get(U)||0)+1),ne.has(U)&&ne.delete(U)),j.fetchers.get(U)||L2}function Bt(U){let B=j.fetchers.get(U);W.has(U)&&!(B&&B.state==="loading"&&Q.has(U))&&ot(U),V.delete(U),Q.delete(U),z.delete(U),ne.delete(U),j.fetchers.delete(U)}function qn(U){if(d.v7_fetcherPersist){let B=(fe.get(U)||0)-1;B<=0?(fe.delete(U),ne.add(U)):fe.set(U,B)}else Bt(U);Ne({fetchers:new Map(j.fetchers)})}function ot(U){let B=W.get(U);Qe(B,"Expected fetch controller: "+U),B.abort(),W.delete(U)}function Xn(U){for(let B of U){let G=Yr(B),re=Fs(G.data);j.fetchers.set(B,re)}}function Qn(){let U=[],B=!1;for(let G of z){let re=j.fetchers.get(G);Qe(re,"Expected fetcher: "+G),re.state==="loading"&&(z.delete(G),U.push(G),B=!0)}return Xn(U),B}function Zr(U){let B=[];for(let[G,re]of Q)if(re0}function Nc(U,B){let G=j.blockers.get(U)||za;return Ae.get(U)!==B&&Ae.set(U,B),G}function Rc(U){j.blockers.delete(U),Ae.delete(U)}function co(U,B){let G=j.blockers.get(U)||za;Qe(G.state==="unblocked"&&B.state==="blocked"||G.state==="blocked"&&B.state==="blocked"||G.state==="blocked"&&B.state==="proceeding"||G.state==="blocked"&&B.state==="unblocked"||G.state==="proceeding"&&B.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+B.state);let re=new Map(j.blockers);re.set(U,B),Ne({blockers:re})}function Pc(U){let{currentLocation:B,nextLocation:G,historyAction:re}=U;if(Ae.size===0)return;Ae.size>1&&qi(!1,"A router only supports one blocker at a time");let xe=Array.from(Ae.entries()),[Re,$e]=xe[xe.length-1],ue=j.blockers.get(Re);if(!(ue&&ue.state==="proceeding")&&$e({currentLocation:B,nextLocation:G,historyAction:re}))return Re}function uo(U){let B=dr(404,{pathname:U}),G=a||o,{matches:re,route:xe}=Lx(G);return Ds(),{notFoundMatches:re,route:xe,error:B}}function Tn(U,B){return{boundaryId:Io(B.partialMatches).route.id,error:dr(400,{type:"route-discovery",pathname:U,message:B.error!=null&&"message"in B.error?B.error:String(B.error)})}}function Ds(U){let B=[];return se.forEach((G,re)=>{(!U||U(re))&&(G.cancel(),B.push(re),se.delete(re))}),B}function Pj(U,B,G){if(w=U,x=B,g=G||null,!p&&j.navigation===Ch){p=!0;let re=hy(j.location,j.matches);re!=null&&Ne({restoreScrollPosition:re})}return()=>{w=null,x=null,g=null}}function fy(U,B){return g&&g(U,B.map(re=>p2(re,j.loaderData)))||U.key}function Aj(U,B){if(w&&x){let G=fy(U,B);w[G]=x()}}function hy(U,B){if(w){let G=fy(U,B),re=w[G];if(typeof re=="number")return re}return null}function Xf(U,B,G){if(f)if(U){let re=U[U.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:Eu(B,G,l,!0)}}else return{active:!0,matches:Eu(B,G,l,!0)||[]};return{active:!1,matches:null}}async function Ac(U,B,G){let re=U,xe=re.length>0?re[re.length-1].route:null;for(;;){let Re=a==null,$e=a||o;try{await W2(f,B,re,$e,i,s,he,G)}catch(Le){return{type:"error",error:Le,partialMatches:re}}finally{Re&&(o=[...o])}if(G.aborted)return{type:"aborted"};let ue=Ri($e,B,l),Ye=!1;if(ue){let Le=ue[ue.length-1].route;if(Le.index)return{type:"success",matches:ue};if(Le.path&&Le.path.length>0)if(Le.path==="*")Ye=!0;else return{type:"success",matches:ue}}let Me=Eu($e,B,l,!0);if(!Me||re.map(Le=>Le.route.id).join("-")===Me.map(Le=>Le.route.id).join("-"))return{type:"success",matches:Ye?ue:null};if(re=Me,xe=re[re.length-1].route,xe.path==="*")return{type:"success",matches:re}}}function Dj(U){i={},a=Il(U,s,void 0,i)}function Oj(U,B){let G=a==null;m1(U,B,a||o,i,s),G&&(o=[...o],Ne({}))}return E={get basename(){return l},get future(){return d},get state(){return j},get routes(){return o},get window(){return t},initialize:ke,subscribe:De,enableScrollRestoration:Pj,navigate:k,fetch:Y,revalidate:J,createHref:U=>e.history.createHref(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:Yr,deleteFetcher:qn,dispose:Ie,getBlocker:Nc,deleteBlocker:Rc,patchRoutes:Oj,_internalFetchControllers:W,_internalActiveDeferreds:se,_internalSetRoutes:Dj},E}function U2(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Vp(e,t,r,n,s,i,o,a){let l,u;if(o){l=[];for(let d of t)if(l.push(d),d.route.id===o){u=d;break}}else l=t,u=t[t.length-1];let f=rf(s||".",tf(l,i),xa(e.pathname,r)||e.pathname,a==="path");return s==null&&(f.search=e.search,f.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!bg(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(f.pathname=f.pathname==="/"?r:hs([r,f.pathname])),Xi(f)}function Tx(e,t,r,n){if(!n||!U2(n))return{path:r};if(n.formMethod&&!eR(n.formMethod))return{path:r,error:dr(405,{method:n.formMethod})};let s=()=>({path:r,error:dr(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),a=g1(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!dn(o))return s();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((v,w)=>{let[g,x]=w;return""+v+g+"="+x+` -`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!dn(o))return s();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=$p(n.formData),u=n.formData;else if(n.body instanceof FormData)l=$p(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=Dx(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=Dx(l)}catch{return s()}let f={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(dn(f.formMethod))return{path:r,submission:f};let d=js(r);return t&&d.search&&bg(d.search)&&l.append("index",""),d.search="?"+l,{path:Xi(d),submission:f}}function V2(e,t){let r=e;if(t){let n=e.findIndex(s=>s.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function Nx(e,t,r,n,s,i,o,a,l,u,f,d,m,v,w,g){let x=g?Pr(g[1])?g[1].error:g[1].data:void 0,p=e.createURL(t.location),h=e.createURL(s),_=g&&Pr(g[1])?g[0]:void 0,C=_?V2(r,_):r,E=g?g[1].statusCode:void 0,j=o&&E&&E>=400,R=C.filter((P,L)=>{let{route:q}=P;if(q.lazy)return!0;if(q.loader==null)return!1;if(i)return typeof q.loader!="function"||q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if($2(t.loaderData,t.matches[L],P)||l.some(b=>b===P.route.id))return!0;let T=t.matches[L],F=P;return Rx(P,Pt({currentUrl:p,currentParams:T.params,nextUrl:h,nextParams:F.params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:j?!1:a||p.pathname+p.search===h.pathname+h.search||p.search!==h.search||p1(T,F)}))}),A=[];return d.forEach((P,L)=>{if(i||!r.some($=>$.route.id===P.routeId)||f.has(L))return;let q=Ri(v,P.path,w);if(!q){A.push({key:L,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let T=t.fetchers.get(L),F=Xa(q,P.path),b=!1;m.has(L)?b=!1:u.includes(L)?b=!0:T&&T.state!=="idle"&&T.data===void 0?b=a:b=Rx(F,Pt({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:r[r.length-1].params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:j?!1:a})),b&&A.push({key:L,routeId:P.routeId,path:P.path,matches:q,match:F,controller:new AbortController})}),[R,A]}function $2(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function p1(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Rx(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function W2(e,t,r,n,s,i,o,a){let l=[t,...r.map(u=>u.route.id)].join("-");try{let u=o.get(l);u||(u=e({path:t,matches:r,patch:(f,d)=>{a.aborted||m1(f,d,n,s,i)}}),o.set(l,u)),u&&X2(u)&&await u}finally{o.delete(l)}}function m1(e,t,r,n,s){if(e){var i;let o=n[e];Qe(o,"No route found to patch children into: routeId = "+e);let a=Il(t,s,[e,"patch",String(((i=o.children)==null?void 0:i.length)||"0")],n);o.children?o.children.push(...a):o.children=a}else{let o=Il(t,s,["patch",String(r.length||"0")],n);r.push(...o)}}async function Px(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];Qe(s,"No route found in manifest");let i={};for(let o in n){let l=s[o]!==void 0&&o!=="hasErrorBoundary";qi(!l,'Route "'+s.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!f2.has(o)&&(i[o]=n[o])}Object.assign(s,i),Object.assign(s,Pt({},t(s),{lazy:void 0}))}function B2(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function H2(e,t,r,n,s,i,o,a){let l=n.reduce((d,m)=>d.add(m.route.id),new Set),u=new Set,f=await e({matches:s.map(d=>{let m=l.has(d.route.id);return Pt({},d,{shouldLoad:m,resolve:w=>(u.add(d.route.id),m?Y2(t,r,d,i,o,w,a):Promise.resolve({type:yt.data,result:void 0}))})}),request:r,params:s[0].params,context:a});return s.forEach(d=>Qe(u.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((d,m)=>l.has(s[m].route.id))}async function Y2(e,t,r,n,s,i,o){let a,l,u=f=>{let d,m=new Promise((g,x)=>d=x);l=()=>d(),t.signal.addEventListener("abort",l);let v=g=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):f({request:t,params:r.params,context:o},...g!==void 0?[g]:[]),w;return i?w=i(g=>v(g)):w=(async()=>{try{return{type:"data",result:await v()}}catch(g){return{type:"error",result:g}}})(),Promise.race([w,m])};try{let f=r.route[e];if(r.route.lazy)if(f){let d,[m]=await Promise.all([u(f).catch(v=>{d=v}),Px(r.route,s,n)]);if(d!==void 0)throw d;a=m}else if(await Px(r.route,s,n),f=r.route[e],f)a=await u(f);else if(e==="action"){let d=new URL(t.url),m=d.pathname+d.search;throw dr(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:yt.data,result:void 0};else if(f)a=await u(f);else{let d=new URL(t.url),m=d.pathname+d.search;throw dr(404,{pathname:m})}Qe(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:yt.error,result:f}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function Z2(e){let{result:t,type:r,status:n}=e;if(v1(t)){let o;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?o=null:o=await t.json():o=await t.text()}catch(a){return{type:yt.error,error:a}}return r===yt.error?{type:yt.error,error:new wg(t.status,t.statusText,o),statusCode:t.status,headers:t.headers}:{type:yt.data,data:o,statusCode:t.status,headers:t.headers}}if(r===yt.error)return{type:yt.error,error:t,statusCode:nf(t)?t.status:n};if(J2(t)){var s,i;return{type:yt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}return{type:yt.data,data:t,statusCode:n}}function K2(e,t,r,n,s,i){let o=e.headers.get("Location");if(Qe(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!_g.test(o)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=Vp(new URL(t.url),a,s,!0,o,i),e.headers.set("Location",o)}return e}function Ax(e,t,r){if(_g.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),i=xa(s.pathname,r)!=null;if(s.origin===t.origin&&i)return s.pathname+s.search+s.hash}return e}function go(e,t,r,n){let s=e.createURL(g1(t)).toString(),i={signal:r};if(n&&dn(n.formMethod)){let{formMethod:o,formEncType:a}=n;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(n.json)):a==="text/plain"?i.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?i.body=$p(n.formData):i.body=n.formData}return new Request(s,i)}function $p(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Dx(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function G2(e,t,r,n,s,i){let o={},a=null,l,u=!1,f={},d=n&&Pr(n[1])?n[1].error:void 0;return r.forEach((m,v)=>{let w=t[v].route.id;if(Qe(!Li(m),"Cannot handle redirect results in processLoaderData"),Pr(m)){let g=m.error;d!==void 0&&(g=d,d=void 0),a=a||{};{let x=Io(e,w);a[x.route.id]==null&&(a[x.route.id]=g)}o[w]=void 0,u||(u=!0,l=nf(m.error)?m.error.status:500),m.headers&&(f[w]=m.headers)}else Ii(m)?(s.set(w,m.deferredData),o[w]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!u&&(l=m.statusCode),m.headers&&(f[w]=m.headers)):(o[w]=m.data,m.statusCode&&m.statusCode!==200&&!u&&(l=m.statusCode),m.headers&&(f[w]=m.headers))}),d!==void 0&&n&&(a={[n[0]]:d},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:l||200,loaderHeaders:f}}function Ox(e,t,r,n,s,i,o,a){let{loaderData:l,errors:u}=G2(t,r,n,s,a);for(let f=0;fn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Lx(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function dr(e,t){let{pathname:r,routeId:n,method:s,type:i,message:o}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",i==="route-discovery"?l='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: -`+o):s&&r&&n?l="You made a "+s+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",s&&r&&n?l="You made a "+s.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new wg(e||500,a,new Error(l),!0)}function Fx(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Li(r))return{result:r,idx:t}}}function g1(e){let t=typeof e=="string"?js(e):e;return Xi(Pt({},t,{hash:""}))}function q2(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function X2(e){return typeof e=="object"&&e!=null&&"then"in e}function Q2(e){return v1(e.result)&&M2.has(e.result.status)}function Ii(e){return e.type===yt.deferred}function Pr(e){return e.type===yt.error}function Li(e){return(e&&e.type)===yt.redirect}function J2(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 v1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function eR(e){return O2.has(e.toLowerCase())}function dn(e){return A2.has(e.toLowerCase())}async function zx(e,t,r,n,s,i){for(let o=0;od.route.id===l.route.id),f=u!=null&&!p1(u,l)&&(i&&i[l.route.id])!==void 0;if(Ii(a)&&(s||f)){let d=n[o];Qe(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await y1(a,d,s).then(m=>{m&&(r[o]=m||r[o])})}}}async function y1(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:yt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:yt.error,error:s}}return{type:yt.data,data:e.deferredData.data}}}function bg(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Xa(e,t){let r=typeof t=="string"?js(t).search:t.search;if(e[e.length-1].route.index&&bg(r||""))return e[e.length-1];let n=d1(e);return n[n.length-1]}function Ux(e){let{formMethod:t,formAction:r,formEncType:n,text:s,formData:i,json:o}=e;if(!(!t||!r||!n)){if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Eh(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 tR(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 Ua(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 rR(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 Fs(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 nR(e,t){try{let r=e.sessionStorage.getItem(h1);if(r){let n=JSON.parse(r);for(let[s,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(s,new Set(i||[]))}}catch{}}function sR(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem(h1,JSON.stringify(r))}catch(n){qi(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + */function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function qi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function R2(){return Math.random().toString(36).substr(2,8)}function Tx(e,t){return{usr:e.state,key:e.key,idx:t}}function Ml(e,t,r,n){return r===void 0&&(r=null),Pt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ts(t):t,{state:r,key:t&&t.key||n||R2()})}function Xi(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ts(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function P2(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=$t.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(Pt({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){a=$t.Pop;let x=f(),p=x==null?null:x-u;u=x,l&&l({action:a,location:g.location,delta:p})}function m(x,p){a=$t.Push;let h=Ml(g.location,x,p);r&&r(h,x),u=f()+1;let _=Tx(h,u),C=g.createHref(h);try{o.pushState(_,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(C)}i&&l&&l({action:a,location:g.location,delta:1})}function v(x,p){a=$t.Replace;let h=Ml(g.location,x,p);r&&r(h,x),u=f();let _=Tx(h,u),C=g.createHref(h);o.replaceState(_,"",C),i&&l&&l({action:a,location:g.location,delta:0})}function w(x){let p=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof x=="string"?x:Xi(x);return h=h.replace(/ $/,"%20"),Qe(p,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,p)}let g={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(jx,d),l=x,()=>{s.removeEventListener(jx,d),l=null}},createHref(x){return t(s,x)},createURL:w,encodeLocation(x){let p=w(x);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:m,replace:v,go(x){return o.go(x)}};return g}var yt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yt||(yt={}));const A2=new Set(["lazy","caseSensitive","path","id","index","children"]);function D2(e){return e.index===!0}function Il(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((s,i)=>{let o=[...r,String(i)],a=typeof s.id=="string"?s.id:o.join("-");if(Qe(s.index!==!0||!s.children,"Cannot specify children on an index route"),Qe(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),D2(s)){let l=Pt({},s,t(s),{id:a});return n[a]=l,l}else{let l=Pt({},s,t(s),{id:a,children:void 0});return n[a]=l,s.children&&(l.children=Il(s.children,t,o,n)),l}})}function Ri(e,t,r){return r===void 0&&(r="/"),ju(e,t,r,!1)}function ju(e,t,r,n){let s=typeof t=="string"?Ts(t):t,i=xa(s.pathname||"/",r);if(i==null)return null;let o=h1(e);M2(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Qe(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=hs([n,l.relativePath]),f=r.concat(l);i.children&&i.children.length>0&&(Qe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),h1(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:$2(u,i.index),routesMeta:f})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of p1(i.path))s(i,o,l)}),t}function p1(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=p1(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function M2(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:B2(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const I2=/^:[\w-]+$/,L2=3,F2=2,z2=1,U2=10,V2=-2,Nx=e=>e==="*";function $2(e,t){let r=e.split("/"),n=r.length;return r.some(Nx)&&(n+=V2),t&&(n+=F2),r.filter(s=>!Nx(s)).reduce((s,i)=>s+(I2.test(i)?L2:i===""?z2:U2),n)}function B2(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function W2(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a{let{paramName:m,isOptional:v}=f;if(m==="*"){let g=a[d]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const w=a[d];return v&&!w?u[m]=void 0:u[m]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function H2(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),qi(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 n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function Y2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return qi(!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 xa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Z2(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Ts(e):e;return{pathname:r?r.startsWith("/")?r:K2(r,t):t,search:q2(n),hash:X2(s)}}function K2(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Sh(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function m1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function tf(e,t){let r=m1(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function rf(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Ts(e):(s=Pt({},e),Qe(!s.pathname||!s.pathname.includes("?"),Sh("?","pathname","search",s)),Qe(!s.pathname||!s.pathname.includes("#"),Sh("#","pathname","hash",s)),Qe(!s.search||!s.search.includes("#"),Sh("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let d=t.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),d-=1;s.pathname=m.join("/")}a=d>=0?t[d]:"/"}let l=Z2(s,a),u=o&&o!=="/"&&o.endsWith("/"),f=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const hs=e=>e.join("/").replace(/\/\/+/g,"/"),G2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),q2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,X2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class wg{constructor(t,r,n,s){s===void 0&&(s=!1),this.status=t,this.statusText=r||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function nf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const g1=["post","put","patch","delete"],Q2=new Set(g1),J2=["get",...g1],eR=new Set(J2),tR=new Set([301,302,303,307,308]),rR=new Set([307,308]),kh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},nR={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},za={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},_g=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sR=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),v1="remix-router-transitions";function iR(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Qe(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 U=e.detectErrorBoundary;s=W=>({hasErrorBoundary:U(W)})}else s=sR;let i={},o=Il(e.routes,s,void 0,i),a,l=e.basename||"/",u=e.unstable_dataStrategy||uR,f=e.unstable_patchRoutesOnMiss,d=Pt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,v=new Set,w=null,g=null,x=null,p=e.hydrationData!=null,h=Ri(o,e.history.location,l),_=null;if(h==null&&!f){let U=ur(404,{pathname:e.history.location.pathname}),{matches:W,route:G}=Ux(o);h=W,_={[G.id]:U}}h&&f&&!e.hydrationData&&qf(h,o,e.history.location.pathname).active&&(h=null);let C;if(!h)C=!1,h=[];else if(h.some(U=>U.route.lazy))C=!1;else if(!h.some(U=>U.route.loader))C=!0;else if(d.v7_partialHydration){let U=e.hydrationData?e.hydrationData.loaderData:null,W=e.hydrationData?e.hydrationData.errors:null,G=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:U&&U[re.route.id]!==void 0||W&&W[re.route.id]!==void 0:!0;if(W){let re=h.findIndex(xe=>W[xe.route.id]!==void 0);C=h.slice(0,re+1).every(G)}else C=h.every(G)}else C=e.hydrationData!=null;let E,j={historyAction:e.history.action,location:e.history.location,matches:h,initialized:C,navigation:kh,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||_,fetchers:new Map,blockers:new Map},R=$t.Pop,A=!1,P,L=!1,q=new Map,T=null,F=!1,b=!1,$=[],te=[],B=new Map,Z=0,I=-1,Q=new Map,z=new Set,V=new Map,fe=new Map,ne=new Set,se=new Map,Ae=new Map,he=new Map,ye=!1;function ke(){if(m=e.history.listen(U=>{let{action:W,location:G,delta:re}=U;if(ye){ye=!1;return}qi(Ae.size===0||re!=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 xe=Ac({currentLocation:j.location,nextLocation:G,historyAction:W});if(xe&&re!=null){ye=!0,e.history.go(re*-1),co(xe,{state:"blocked",location:G,proceed(){co(xe,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),e.history.go(re)},reset(){let Re=new Map(j.blockers);Re.set(xe,za),Ne({blockers:Re})}});return}return K(W,G)}),r){SR(t,q);let U=()=>kR(t,q);t.addEventListener("pagehide",U),T=()=>t.removeEventListener("pagehide",U)}return j.initialized||K($t.Pop,j.location,{initialHydration:!0}),E}function Le(){m&&m(),T&&T(),v.clear(),P&&P.abort(),j.fetchers.forEach((U,W)=>Wt(W)),j.blockers.forEach((U,W)=>Pc(W))}function De(U){return v.add(U),()=>v.delete(U)}function Ne(U,W){W===void 0&&(W={}),j=Pt({},j,U);let G=[],re=[];d.v7_fetcherPersist&&j.fetchers.forEach((xe,Re)=>{xe.state==="idle"&&(ne.has(Re)?re.push(Re):G.push(Re))}),[...v].forEach(xe=>xe(j,{deletedFetchers:re,unstable_viewTransitionOpts:W.viewTransitionOpts,unstable_flushSync:W.flushSync===!0})),d.v7_fetcherPersist&&(G.forEach(xe=>j.fetchers.delete(xe)),re.forEach(xe=>Wt(xe)))}function nt(U,W,G){var re,xe;let{flushSync:Re}=G===void 0?{}:G,$e=j.actionData!=null&&j.navigation.formMethod!=null&&dn(j.navigation.formMethod)&&j.navigation.state==="loading"&&((re=U.state)==null?void 0:re._isRedirect)!==!0,de;W.actionData?Object.keys(W.actionData).length>0?de=W.actionData:de=null:$e?de=j.actionData:de=null;let Ye=W.loaderData?Fx(j.loaderData,W.loaderData,W.matches||[],W.errors):j.loaderData,Me=j.blockers;Me.size>0&&(Me=new Map(Me),Me.forEach((ht,vt)=>Me.set(vt,za)));let Fe=A===!0||j.navigation.formMethod!=null&&dn(j.navigation.formMethod)&&((xe=U.state)==null?void 0:xe._isRedirect)!==!0;a&&(o=a,a=void 0),F||R===$t.Pop||(R===$t.Push?e.history.push(U,U.state):R===$t.Replace&&e.history.replace(U,U.state));let mt;if(R===$t.Pop){let ht=q.get(j.location.pathname);ht&&ht.has(U.pathname)?mt={currentLocation:j.location,nextLocation:U}:q.has(U.pathname)&&(mt={currentLocation:U,nextLocation:j.location})}else if(L){let ht=q.get(j.location.pathname);ht?ht.add(U.pathname):(ht=new Set([U.pathname]),q.set(j.location.pathname,ht)),mt={currentLocation:j.location,nextLocation:U}}Ne(Pt({},W,{actionData:de,loaderData:Ye,historyAction:R,location:U,initialized:!0,navigation:kh,revalidation:"idle",restoreScrollPosition:gy(U,W.matches||j.matches),preventScrollReset:Fe,blockers:Me}),{viewTransitionOpts:mt,flushSync:Re===!0}),R=$t.Pop,A=!1,L=!1,F=!1,b=!1,$=[],te=[]}async function k(U,W){if(typeof U=="number"){e.history.go(U);return}let G=Up(j.location,j.matches,l,d.v7_prependBasename,U,d.v7_relativeSplatPath,W==null?void 0:W.fromRouteId,W==null?void 0:W.relative),{path:re,submission:xe,error:Re}=Px(d.v7_normalizeFormMethod,!1,G,W),$e=j.location,de=Ml(j.location,re,W&&W.state);de=Pt({},de,e.history.encodeLocation(de));let Ye=W&&W.replace!=null?W.replace:void 0,Me=$t.Push;Ye===!0?Me=$t.Replace:Ye===!1||xe!=null&&dn(xe.formMethod)&&xe.formAction===j.location.pathname+j.location.search&&(Me=$t.Replace);let Fe=W&&"preventScrollReset"in W?W.preventScrollReset===!0:void 0,mt=(W&&W.unstable_flushSync)===!0,ht=Ac({currentLocation:$e,nextLocation:de,historyAction:Me});if(ht){co(ht,{state:"blocked",location:de,proceed(){co(ht,{state:"proceeding",proceed:void 0,reset:void 0,location:de}),k(U,W)},reset(){let vt=new Map(j.blockers);vt.set(ht,za),Ne({blockers:vt})}});return}return await K(Me,de,{submission:xe,pendingError:Re,preventScrollReset:Fe,replace:W&&W.replace,enableViewTransition:W&&W.unstable_viewTransition,flushSync:mt})}function J(){if(We(),Ne({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){K(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}K(R||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function K(U,W,G){P&&P.abort(),P=null,R=U,F=(G&&G.startUninterruptedRevalidation)===!0,Qj(j.location,j.matches),A=(G&&G.preventScrollReset)===!0,L=(G&&G.enableViewTransition)===!0;let re=a||o,xe=G&&G.overrideNavigation,Re=Ri(re,W,l),$e=(G&&G.flushSync)===!0,de=qf(Re,re,W.pathname);if(de.active&&de.matches&&(Re=de.matches),!Re){let{error:ut,notFoundMatches:Jt,route:Vt}=uo(W.pathname);nt(W,{matches:Jt,loaderData:{},errors:{[Vt.id]:ut}},{flushSync:$e});return}if(j.initialized&&!b&&gR(j.location,W)&&!(G&&G.submission&&dn(G.submission.formMethod))){nt(W,{matches:Re},{flushSync:$e});return}P=new AbortController;let Ye=go(e.history,W,P.signal,G&&G.submission),Me;if(G&&G.pendingError)Me=[Io(Re).route.id,{type:yt.error,error:G.pendingError}];else if(G&&G.submission&&dn(G.submission.formMethod)){let ut=await D(Ye,W,G.submission,Re,de.active,{replace:G.replace,flushSync:$e});if(ut.shortCircuited)return;if(ut.pendingActionResult){let[Jt,Vt]=ut.pendingActionResult;if(Pr(Vt)&&nf(Vt.error)&&Vt.error.status===404){P=null,nt(W,{matches:ut.matches,loaderData:{},errors:{[Jt]:Vt.error}});return}}Re=ut.matches||Re,Me=ut.pendingActionResult,xe=Ch(W,G.submission),$e=!1,de.active=!1,Ye=go(e.history,Ye.url,Ye.signal)}let{shortCircuited:Fe,matches:mt,loaderData:ht,errors:vt}=await S(Ye,W,Re,de.active,xe,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,G&&G.initialHydration===!0,$e,Me);Fe||(P=null,nt(W,Pt({matches:mt||Re},zx(Me),{loaderData:ht,errors:vt})))}async function D(U,W,G,re,xe,Re){Re===void 0&&(Re={}),We();let $e=_R(W,G);if(Ne({navigation:$e},{flushSync:Re.flushSync===!0}),xe){let Me=await Dc(re,W.pathname,U.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){let{boundaryId:Fe,error:mt}=Nn(W.pathname,Me);return{matches:Me.partialMatches,pendingActionResult:[Fe,{type:yt.error,error:mt}]}}else if(Me.matches)re=Me.matches;else{let{notFoundMatches:Fe,error:mt,route:ht}=uo(W.pathname);return{matches:Fe,pendingActionResult:[ht.id,{type:yt.error,error:mt}]}}}let de,Ye=Xa(re,W);if(!Ye.route.action&&!Ye.route.lazy)de={type:yt.error,error:ur(405,{method:U.method,pathname:W.pathname,routeId:Ye.route.id})};else if(de=(await ee("action",U,[Ye],re))[0],U.signal.aborted)return{shortCircuited:!0};if(Li(de)){let Me;return Re&&Re.replace!=null?Me=Re.replace:Me=Mx(de.response.headers.get("Location"),new URL(U.url),l)===j.location.pathname+j.location.search,await X(U,de,{submission:G,replace:Me}),{shortCircuited:!0}}if(Ii(de))throw ur(400,{type:"defer-action"});if(Pr(de)){let Me=Io(re,Ye.route.id);return(Re&&Re.replace)!==!0&&(R=$t.Push),{matches:re,pendingActionResult:[Me.route.id,de]}}return{matches:re,pendingActionResult:[Ye.route.id,de]}}async function S(U,W,G,re,xe,Re,$e,de,Ye,Me,Fe){let mt=xe||Ch(W,Re),ht=Re||$e||Bx(mt),vt=!F&&(!d.v7_partialHydration||!Ye);if(re){if(vt){let It=N(Fe);Ne(Pt({navigation:mt},It!==void 0?{actionData:It}:{}),{flushSync:Me})}let Ge=await Dc(G,W.pathname,U.signal);if(Ge.type==="aborted")return{shortCircuited:!0};if(Ge.type==="error"){let{boundaryId:It,error:jr}=Nn(W.pathname,Ge);return{matches:Ge.partialMatches,loaderData:{},errors:{[It]:jr}}}else if(Ge.matches)G=Ge.matches;else{let{error:It,notFoundMatches:jr,route:jt}=uo(W.pathname);return{matches:jr,loaderData:{},errors:{[jt.id]:It}}}}let ut=a||o,[Jt,Vt]=Ax(e.history,j,G,ht,W,d.v7_partialHydration&&Ye===!0,d.v7_skipActionErrorRevalidation,b,$,te,ne,V,z,ut,l,Fe);if(Os(Ge=>!(G&&G.some(It=>It.route.id===Ge))||Jt&&Jt.some(It=>It.route.id===Ge)),I=++Z,Jt.length===0&&Vt.length===0){let Ge=Qn();return nt(W,Pt({matches:G,loaderData:{},errors:Fe&&Pr(Fe[1])?{[Fe[0]]:Fe[1].error}:null},zx(Fe),Ge?{fetchers:new Map(j.fetchers)}:{}),{flushSync:Me}),{shortCircuited:!0}}if(vt){let Ge={};if(!re){Ge.navigation=mt;let It=N(Fe);It!==void 0&&(Ge.actionData=It)}Vt.length>0&&(Ge.fetchers=O(Vt)),Ne(Ge,{flushSync:Me})}Vt.forEach(Ge=>{B.has(Ge.key)&&ot(Ge.key),Ge.controller&&B.set(Ge.key,Ge.controller)});let Ra=()=>Vt.forEach(Ge=>ot(Ge.key));P&&P.signal.addEventListener("abort",Ra);let{loaderResults:Ms,fetcherResults:fo}=await pe(j.matches,G,Jt,Vt,U);if(U.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener("abort",Ra),Vt.forEach(Ge=>B.delete(Ge.key));let ho=Vx([...Ms,...fo]);if(ho){if(ho.idx>=Jt.length){let Ge=Vt[ho.idx-Jt.length].key;z.add(Ge)}return await X(U,ho.result,{replace:de}),{shortCircuited:!0}}let{loaderData:po,errors:Rn}=Lx(j,G,Jt,Ms,Fe,Vt,fo,se);se.forEach((Ge,It)=>{Ge.subscribe(jr=>{(jr||Ge.done)&&se.delete(It)})}),d.v7_partialHydration&&Ye&&j.errors&&Object.entries(j.errors).filter(Ge=>{let[It]=Ge;return!Jt.some(jr=>jr.route.id===It)}).forEach(Ge=>{let[It,jr]=Ge;Rn=Object.assign(Rn||{},{[It]:jr})});let Oc=Qn(),Mc=Kr(I),Ic=Oc||Mc||Vt.length>0;return Pt({matches:G,loaderData:po,errors:Rn},Ic?{fetchers:new Map(j.fetchers)}:{})}function N(U){if(U&&!Pr(U[1]))return{[U[0]]:U[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function O(U){return U.forEach(W=>{let G=j.fetchers.get(W.key),re=Ua(void 0,G?G.data:void 0);j.fetchers.set(W.key,re)}),new Map(j.fetchers)}function Y(U,W,G,re){if(n)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.");B.has(U)&&ot(U);let xe=(re&&re.unstable_flushSync)===!0,Re=a||o,$e=Up(j.location,j.matches,l,d.v7_prependBasename,G,d.v7_relativeSplatPath,W,re==null?void 0:re.relative),de=Ri(Re,$e,l),Ye=qf(de,Re,$e);if(Ye.active&&Ye.matches&&(de=Ye.matches),!de){Et(U,W,ur(404,{pathname:$e}),{flushSync:xe});return}let{path:Me,submission:Fe,error:mt}=Px(d.v7_normalizeFormMethod,!0,$e,re);if(mt){Et(U,W,mt,{flushSync:xe});return}let ht=Xa(de,Me);if(A=(re&&re.preventScrollReset)===!0,Fe&&dn(Fe.formMethod)){M(U,W,Me,ht,de,Ye.active,xe,Fe);return}V.set(U,{routeId:W,path:Me}),H(U,W,Me,ht,de,Ye.active,xe,Fe)}async function M(U,W,G,re,xe,Re,$e,de){We(),V.delete(U);function Ye(jt){if(!jt.route.action&&!jt.route.lazy){let Jn=ur(405,{method:de.formMethod,pathname:G,routeId:W});return Et(U,W,Jn,{flushSync:$e}),!0}return!1}if(!Re&&Ye(re))return;let Me=j.fetchers.get(U);Ue(U,bR(de,Me),{flushSync:$e});let Fe=new AbortController,mt=go(e.history,G,Fe.signal,de);if(Re){let jt=await Dc(xe,G,mt.signal);if(jt.type==="aborted")return;if(jt.type==="error"){let{error:Jn}=Nn(G,jt);Et(U,W,Jn,{flushSync:$e});return}else if(jt.matches){if(xe=jt.matches,re=Xa(xe,G),Ye(re))return}else{Et(U,W,ur(404,{pathname:G}),{flushSync:$e});return}}B.set(U,Fe);let ht=Z,ut=(await ee("action",mt,[re],xe))[0];if(mt.signal.aborted){B.get(U)===Fe&&B.delete(U);return}if(d.v7_fetcherPersist&&ne.has(U)){if(Li(ut)||Pr(ut)){Ue(U,zs(void 0));return}}else{if(Li(ut))if(B.delete(U),I>ht){Ue(U,zs(void 0));return}else return z.add(U),Ue(U,Ua(de)),X(mt,ut,{fetcherSubmission:de});if(Pr(ut)){Et(U,W,ut.error);return}}if(Ii(ut))throw ur(400,{type:"defer-action"});let Jt=j.navigation.location||j.location,Vt=go(e.history,Jt,Fe.signal),Ra=a||o,Ms=j.navigation.state!=="idle"?Ri(Ra,j.navigation.location,l):j.matches;Qe(Ms,"Didn't find any matches after fetcher action");let fo=++Z;Q.set(U,fo);let ho=Ua(de,ut.data);j.fetchers.set(U,ho);let[po,Rn]=Ax(e.history,j,Ms,de,Jt,!1,d.v7_skipActionErrorRevalidation,b,$,te,ne,V,z,Ra,l,[re.route.id,ut]);Rn.filter(jt=>jt.key!==U).forEach(jt=>{let Jn=jt.key,vy=j.fetchers.get(Jn),tT=Ua(void 0,vy?vy.data:void 0);j.fetchers.set(Jn,tT),B.has(Jn)&&ot(Jn),jt.controller&&B.set(Jn,jt.controller)}),Ne({fetchers:new Map(j.fetchers)});let Oc=()=>Rn.forEach(jt=>ot(jt.key));Fe.signal.addEventListener("abort",Oc);let{loaderResults:Mc,fetcherResults:Ic}=await pe(j.matches,Ms,po,Rn,Vt);if(Fe.signal.aborted)return;Fe.signal.removeEventListener("abort",Oc),Q.delete(U),B.delete(U),Rn.forEach(jt=>B.delete(jt.key));let Ge=Vx([...Mc,...Ic]);if(Ge){if(Ge.idx>=po.length){let jt=Rn[Ge.idx-po.length].key;z.add(jt)}return X(Vt,Ge.result)}let{loaderData:It,errors:jr}=Lx(j,j.matches,po,Mc,void 0,Rn,Ic,se);if(j.fetchers.has(U)){let jt=zs(ut.data);j.fetchers.set(U,jt)}Kr(fo),j.navigation.state==="loading"&&fo>I?(Qe(R,"Expected pending action"),P&&P.abort(),nt(j.navigation.location,{matches:Ms,loaderData:It,errors:jr,fetchers:new Map(j.fetchers)})):(Ne({errors:jr,loaderData:Fx(j.loaderData,It,Ms,jr),fetchers:new Map(j.fetchers)}),b=!1)}async function H(U,W,G,re,xe,Re,$e,de){let Ye=j.fetchers.get(U);Ue(U,Ua(de,Ye?Ye.data:void 0),{flushSync:$e});let Me=new AbortController,Fe=go(e.history,G,Me.signal);if(Re){let ut=await Dc(xe,G,Fe.signal);if(ut.type==="aborted")return;if(ut.type==="error"){let{error:Jt}=Nn(G,ut);Et(U,W,Jt,{flushSync:$e});return}else if(ut.matches)xe=ut.matches,re=Xa(xe,G);else{Et(U,W,ur(404,{pathname:G}),{flushSync:$e});return}}B.set(U,Me);let mt=Z,vt=(await ee("loader",Fe,[re],xe))[0];if(Ii(vt)&&(vt=await b1(vt,Fe.signal,!0)||vt),B.get(U)===Me&&B.delete(U),!Fe.signal.aborted){if(ne.has(U)){Ue(U,zs(void 0));return}if(Li(vt))if(I>mt){Ue(U,zs(void 0));return}else{z.add(U),await X(Fe,vt);return}if(Pr(vt)){Et(U,W,vt.error);return}Qe(!Ii(vt),"Unhandled fetcher deferred data"),Ue(U,zs(vt.data))}}async function X(U,W,G){let{submission:re,fetcherSubmission:xe,replace:Re}=G===void 0?{}:G;W.response.headers.has("X-Remix-Revalidate")&&(b=!0);let $e=W.response.headers.get("Location");Qe($e,"Expected a Location header on the redirect Response"),$e=Mx($e,new URL(U.url),l);let de=Ml(j.location,$e,{_isRedirect:!0});if(r){let vt=!1;if(W.response.headers.has("X-Remix-Reload-Document"))vt=!0;else if(_g.test($e)){const ut=e.history.createURL($e);vt=ut.origin!==t.location.origin||xa(ut.pathname,l)==null}if(vt){Re?t.location.replace($e):t.location.assign($e);return}}P=null;let Ye=Re===!0?$t.Replace:$t.Push,{formMethod:Me,formAction:Fe,formEncType:mt}=j.navigation;!re&&!xe&&Me&&Fe&&mt&&(re=Bx(j.navigation));let ht=re||xe;if(rR.has(W.response.status)&&ht&&dn(ht.formMethod))await K(Ye,de,{submission:Pt({},ht,{formAction:$e}),preventScrollReset:A});else{let vt=Ch(de,re);await K(Ye,de,{overrideNavigation:vt,fetcherSubmission:xe,preventScrollReset:A})}}async function ee(U,W,G,re){try{let xe=await dR(u,U,W,G,re,i,s);return await Promise.all(xe.map((Re,$e)=>{if(yR(Re)){let de=Re.result;return{type:yt.redirect,response:pR(de,W,G[$e].route.id,re,l,d.v7_relativeSplatPath)}}return hR(Re)}))}catch(xe){return G.map(()=>({type:yt.error,error:xe}))}}async function pe(U,W,G,re,xe){let[Re,...$e]=await Promise.all([G.length?ee("loader",xe,G,W):[],...re.map(de=>{if(de.matches&&de.match&&de.controller){let Ye=go(e.history,de.path,de.controller.signal);return ee("loader",Ye,[de.match],de.matches).then(Me=>Me[0])}else return Promise.resolve({type:yt.error,error:ur(404,{pathname:de.path})})})]);return await Promise.all([$x(U,G,Re,Re.map(()=>xe.signal),!1,j.loaderData),$x(U,re.map(de=>de.match),$e,re.map(de=>de.controller?de.controller.signal:null),!0)]),{loaderResults:Re,fetcherResults:$e}}function We(){b=!0,$.push(...Os()),V.forEach((U,W)=>{B.has(W)&&(te.push(W),ot(W))})}function Ue(U,W,G){G===void 0&&(G={}),j.fetchers.set(U,W),Ne({fetchers:new Map(j.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function Et(U,W,G,re){re===void 0&&(re={});let xe=Io(j.matches,W);Wt(U),Ne({errors:{[xe.route.id]:G},fetchers:new Map(j.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Zr(U){return d.v7_fetcherPersist&&(fe.set(U,(fe.get(U)||0)+1),ne.has(U)&&ne.delete(U)),j.fetchers.get(U)||nR}function Wt(U){let W=j.fetchers.get(U);B.has(U)&&!(W&&W.state==="loading"&&Q.has(U))&&ot(U),V.delete(U),Q.delete(U),z.delete(U),ne.delete(U),j.fetchers.delete(U)}function qn(U){if(d.v7_fetcherPersist){let W=(fe.get(U)||0)-1;W<=0?(fe.delete(U),ne.add(U)):fe.set(U,W)}else Wt(U);Ne({fetchers:new Map(j.fetchers)})}function ot(U){let W=B.get(U);Qe(W,"Expected fetch controller: "+U),W.abort(),B.delete(U)}function Xn(U){for(let W of U){let G=Zr(W),re=zs(G.data);j.fetchers.set(W,re)}}function Qn(){let U=[],W=!1;for(let G of z){let re=j.fetchers.get(G);Qe(re,"Expected fetcher: "+G),re.state==="loading"&&(z.delete(G),U.push(G),W=!0)}return Xn(U),W}function Kr(U){let W=[];for(let[G,re]of Q)if(re0}function Rc(U,W){let G=j.blockers.get(U)||za;return Ae.get(U)!==W&&Ae.set(U,W),G}function Pc(U){j.blockers.delete(U),Ae.delete(U)}function co(U,W){let G=j.blockers.get(U)||za;Qe(G.state==="unblocked"&&W.state==="blocked"||G.state==="blocked"&&W.state==="blocked"||G.state==="blocked"&&W.state==="proceeding"||G.state==="blocked"&&W.state==="unblocked"||G.state==="proceeding"&&W.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+W.state);let re=new Map(j.blockers);re.set(U,W),Ne({blockers:re})}function Ac(U){let{currentLocation:W,nextLocation:G,historyAction:re}=U;if(Ae.size===0)return;Ae.size>1&&qi(!1,"A router only supports one blocker at a time");let xe=Array.from(Ae.entries()),[Re,$e]=xe[xe.length-1],de=j.blockers.get(Re);if(!(de&&de.state==="proceeding")&&$e({currentLocation:W,nextLocation:G,historyAction:re}))return Re}function uo(U){let W=ur(404,{pathname:U}),G=a||o,{matches:re,route:xe}=Ux(G);return Os(),{notFoundMatches:re,route:xe,error:W}}function Nn(U,W){return{boundaryId:Io(W.partialMatches).route.id,error:ur(400,{type:"route-discovery",pathname:U,message:W.error!=null&&"message"in W.error?W.error:String(W.error)})}}function Os(U){let W=[];return se.forEach((G,re)=>{(!U||U(re))&&(G.cancel(),W.push(re),se.delete(re))}),W}function Xj(U,W,G){if(w=U,x=W,g=G||null,!p&&j.navigation===kh){p=!0;let re=gy(j.location,j.matches);re!=null&&Ne({restoreScrollPosition:re})}return()=>{w=null,x=null,g=null}}function my(U,W){return g&&g(U,W.map(re=>O2(re,j.loaderData)))||U.key}function Qj(U,W){if(w&&x){let G=my(U,W);w[G]=x()}}function gy(U,W){if(w){let G=my(U,W),re=w[G];if(typeof re=="number")return re}return null}function qf(U,W,G){if(f)if(U){let re=U[U.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:ju(W,G,l,!0)}}else return{active:!0,matches:ju(W,G,l,!0)||[]};return{active:!1,matches:null}}async function Dc(U,W,G){let re=U,xe=re.length>0?re[re.length-1].route:null;for(;;){let Re=a==null,$e=a||o;try{await cR(f,W,re,$e,i,s,he,G)}catch(Fe){return{type:"error",error:Fe,partialMatches:re}}finally{Re&&(o=[...o])}if(G.aborted)return{type:"aborted"};let de=Ri($e,W,l),Ye=!1;if(de){let Fe=de[de.length-1].route;if(Fe.index)return{type:"success",matches:de};if(Fe.path&&Fe.path.length>0)if(Fe.path==="*")Ye=!0;else return{type:"success",matches:de}}let Me=ju($e,W,l,!0);if(!Me||re.map(Fe=>Fe.route.id).join("-")===Me.map(Fe=>Fe.route.id).join("-"))return{type:"success",matches:Ye?de:null};if(re=Me,xe=re[re.length-1].route,xe.path==="*")return{type:"success",matches:re}}}function Jj(U){i={},a=Il(U,s,void 0,i)}function eT(U,W){let G=a==null;x1(U,W,a||o,i,s),G&&(o=[...o],Ne({}))}return E={get basename(){return l},get future(){return d},get state(){return j},get routes(){return o},get window(){return t},initialize:ke,subscribe:De,enableScrollRestoration:Xj,navigate:k,fetch:Y,revalidate:J,createHref:U=>e.history.createHref(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:Zr,deleteFetcher:qn,dispose:Le,getBlocker:Rc,deleteBlocker:Pc,patchRoutes:eT,_internalFetchControllers:B,_internalActiveDeferreds:se,_internalSetRoutes:Jj},E}function oR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Up(e,t,r,n,s,i,o,a){let l,u;if(o){l=[];for(let d of t)if(l.push(d),d.route.id===o){u=d;break}}else l=t,u=t[t.length-1];let f=rf(s||".",tf(l,i),xa(e.pathname,r)||e.pathname,a==="path");return s==null&&(f.search=e.search,f.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!bg(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(f.pathname=f.pathname==="/"?r:hs([r,f.pathname])),Xi(f)}function Px(e,t,r,n){if(!n||!oR(n))return{path:r};if(n.formMethod&&!wR(n.formMethod))return{path:r,error:ur(405,{method:n.formMethod})};let s=()=>({path:r,error:ur(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),a=w1(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!dn(o))return s();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((v,w)=>{let[g,x]=w;return""+v+g+"="+x+` +`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!dn(o))return s();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=Vp(n.formData),u=n.formData;else if(n.body instanceof FormData)l=Vp(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=Ix(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=Ix(l)}catch{return s()}let f={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(dn(f.formMethod))return{path:r,submission:f};let d=Ts(r);return t&&d.search&&bg(d.search)&&l.append("index",""),d.search="?"+l,{path:Xi(d),submission:f}}function aR(e,t){let r=e;if(t){let n=e.findIndex(s=>s.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function Ax(e,t,r,n,s,i,o,a,l,u,f,d,m,v,w,g){let x=g?Pr(g[1])?g[1].error:g[1].data:void 0,p=e.createURL(t.location),h=e.createURL(s),_=g&&Pr(g[1])?g[0]:void 0,C=_?aR(r,_):r,E=g?g[1].statusCode:void 0,j=o&&E&&E>=400,R=C.filter((P,L)=>{let{route:q}=P;if(q.lazy)return!0;if(q.loader==null)return!1;if(i)return typeof q.loader!="function"||q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if(lR(t.loaderData,t.matches[L],P)||l.some(b=>b===P.route.id))return!0;let T=t.matches[L],F=P;return Dx(P,Pt({currentUrl:p,currentParams:T.params,nextUrl:h,nextParams:F.params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:j?!1:a||p.pathname+p.search===h.pathname+h.search||p.search!==h.search||y1(T,F)}))}),A=[];return d.forEach((P,L)=>{if(i||!r.some($=>$.route.id===P.routeId)||f.has(L))return;let q=Ri(v,P.path,w);if(!q){A.push({key:L,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let T=t.fetchers.get(L),F=Xa(q,P.path),b=!1;m.has(L)?b=!1:u.includes(L)?b=!0:T&&T.state!=="idle"&&T.data===void 0?b=a:b=Dx(F,Pt({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:r[r.length-1].params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:j?!1:a})),b&&A.push({key:L,routeId:P.routeId,path:P.path,matches:q,match:F,controller:new AbortController})}),[R,A]}function lR(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function y1(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Dx(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function cR(e,t,r,n,s,i,o,a){let l=[t,...r.map(u=>u.route.id)].join("-");try{let u=o.get(l);u||(u=e({path:t,matches:r,patch:(f,d)=>{a.aborted||x1(f,d,n,s,i)}}),o.set(l,u)),u&&vR(u)&&await u}finally{o.delete(l)}}function x1(e,t,r,n,s){if(e){var i;let o=n[e];Qe(o,"No route found to patch children into: routeId = "+e);let a=Il(t,s,[e,"patch",String(((i=o.children)==null?void 0:i.length)||"0")],n);o.children?o.children.push(...a):o.children=a}else{let o=Il(t,s,["patch",String(r.length||"0")],n);r.push(...o)}}async function Ox(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];Qe(s,"No route found in manifest");let i={};for(let o in n){let l=s[o]!==void 0&&o!=="hasErrorBoundary";qi(!l,'Route "'+s.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!A2.has(o)&&(i[o]=n[o])}Object.assign(s,i),Object.assign(s,Pt({},t(s),{lazy:void 0}))}function uR(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function dR(e,t,r,n,s,i,o,a){let l=n.reduce((d,m)=>d.add(m.route.id),new Set),u=new Set,f=await e({matches:s.map(d=>{let m=l.has(d.route.id);return Pt({},d,{shouldLoad:m,resolve:w=>(u.add(d.route.id),m?fR(t,r,d,i,o,w,a):Promise.resolve({type:yt.data,result:void 0}))})}),request:r,params:s[0].params,context:a});return s.forEach(d=>Qe(u.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((d,m)=>l.has(s[m].route.id))}async function fR(e,t,r,n,s,i,o){let a,l,u=f=>{let d,m=new Promise((g,x)=>d=x);l=()=>d(),t.signal.addEventListener("abort",l);let v=g=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):f({request:t,params:r.params,context:o},...g!==void 0?[g]:[]),w;return i?w=i(g=>v(g)):w=(async()=>{try{return{type:"data",result:await v()}}catch(g){return{type:"error",result:g}}})(),Promise.race([w,m])};try{let f=r.route[e];if(r.route.lazy)if(f){let d,[m]=await Promise.all([u(f).catch(v=>{d=v}),Ox(r.route,s,n)]);if(d!==void 0)throw d;a=m}else if(await Ox(r.route,s,n),f=r.route[e],f)a=await u(f);else if(e==="action"){let d=new URL(t.url),m=d.pathname+d.search;throw ur(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:yt.data,result:void 0};else if(f)a=await u(f);else{let d=new URL(t.url),m=d.pathname+d.search;throw ur(404,{pathname:m})}Qe(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:yt.error,result:f}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function hR(e){let{result:t,type:r,status:n}=e;if(_1(t)){let o;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?o=null:o=await t.json():o=await t.text()}catch(a){return{type:yt.error,error:a}}return r===yt.error?{type:yt.error,error:new wg(t.status,t.statusText,o),statusCode:t.status,headers:t.headers}:{type:yt.data,data:o,statusCode:t.status,headers:t.headers}}if(r===yt.error)return{type:yt.error,error:t,statusCode:nf(t)?t.status:n};if(xR(t)){var s,i;return{type:yt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}return{type:yt.data,data:t,statusCode:n}}function pR(e,t,r,n,s,i){let o=e.headers.get("Location");if(Qe(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!_g.test(o)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=Up(new URL(t.url),a,s,!0,o,i),e.headers.set("Location",o)}return e}function Mx(e,t,r){if(_g.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),i=xa(s.pathname,r)!=null;if(s.origin===t.origin&&i)return s.pathname+s.search+s.hash}return e}function go(e,t,r,n){let s=e.createURL(w1(t)).toString(),i={signal:r};if(n&&dn(n.formMethod)){let{formMethod:o,formEncType:a}=n;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(n.json)):a==="text/plain"?i.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?i.body=Vp(n.formData):i.body=n.formData}return new Request(s,i)}function Vp(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Ix(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function mR(e,t,r,n,s,i){let o={},a=null,l,u=!1,f={},d=n&&Pr(n[1])?n[1].error:void 0;return r.forEach((m,v)=>{let w=t[v].route.id;if(Qe(!Li(m),"Cannot handle redirect results in processLoaderData"),Pr(m)){let g=m.error;d!==void 0&&(g=d,d=void 0),a=a||{};{let x=Io(e,w);a[x.route.id]==null&&(a[x.route.id]=g)}o[w]=void 0,u||(u=!0,l=nf(m.error)?m.error.status:500),m.headers&&(f[w]=m.headers)}else Ii(m)?(s.set(w,m.deferredData),o[w]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!u&&(l=m.statusCode),m.headers&&(f[w]=m.headers)):(o[w]=m.data,m.statusCode&&m.statusCode!==200&&!u&&(l=m.statusCode),m.headers&&(f[w]=m.headers))}),d!==void 0&&n&&(a={[n[0]]:d},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:l||200,loaderHeaders:f}}function Lx(e,t,r,n,s,i,o,a){let{loaderData:l,errors:u}=mR(t,r,n,s,a);for(let f=0;fn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Ux(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ur(e,t){let{pathname:r,routeId:n,method:s,type:i,message:o}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",i==="route-discovery"?l='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: +`+o):s&&r&&n?l="You made a "+s+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",s&&r&&n?l="You made a "+s.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new wg(e||500,a,new Error(l),!0)}function Vx(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Li(r))return{result:r,idx:t}}}function w1(e){let t=typeof e=="string"?Ts(e):e;return Xi(Pt({},t,{hash:""}))}function gR(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function vR(e){return typeof e=="object"&&e!=null&&"then"in e}function yR(e){return _1(e.result)&&tR.has(e.result.status)}function Ii(e){return e.type===yt.deferred}function Pr(e){return e.type===yt.error}function Li(e){return(e&&e.type)===yt.redirect}function xR(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 _1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function wR(e){return eR.has(e.toLowerCase())}function dn(e){return Q2.has(e.toLowerCase())}async function $x(e,t,r,n,s,i){for(let o=0;od.route.id===l.route.id),f=u!=null&&!y1(u,l)&&(i&&i[l.route.id])!==void 0;if(Ii(a)&&(s||f)){let d=n[o];Qe(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await b1(a,d,s).then(m=>{m&&(r[o]=m||r[o])})}}}async function b1(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:yt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:yt.error,error:s}}return{type:yt.data,data:e.deferredData.data}}}function bg(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Xa(e,t){let r=typeof t=="string"?Ts(t).search:t.search;if(e[e.length-1].route.index&&bg(r||""))return e[e.length-1];let n=m1(e);return n[n.length-1]}function Bx(e){let{formMethod:t,formAction:r,formEncType:n,text:s,formData:i,json:o}=e;if(!(!t||!r||!n)){if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Ch(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 _R(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 Ua(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 bR(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 zs(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 SR(e,t){try{let r=e.sessionStorage.getItem(v1);if(r){let n=JSON.parse(r);for(let[s,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(s,new Set(i||[]))}}catch{}}function kR(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem(v1,JSON.stringify(r))}catch(n){qi(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** * React Router v6.25.1 * * Copyright (c) Remix Software Inc. @@ -57,7 +57,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ld(){return ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),y.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let d=rf(u,JSON.parse(o),i,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:hs([t,d.pathname])),(f.replace?n.replace:n.push)(d,f.state,f)},[t,n,o,i,e])}const aR=y.createContext(null);function lR(e){let t=y.useContext(Ts).outlet;return t&&y.createElement(aR.Provider,{value:e},t)}function b1(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=y.useContext(_i),{matches:s}=y.useContext(Ts),{pathname:i}=Yn(),o=JSON.stringify(tf(s,n.v7_relativeSplatPath));return y.useMemo(()=>rf(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function cR(e,t,r,n){wa()||Qe(!1);let{navigator:s}=y.useContext(_i),{matches:i}=y.useContext(Ts),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Yn(),f;f=u;let d=f.pathname||"/",m=d;if(l!=="/"){let g=l.replace(/^\//,"").split("/");m="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=Ri(e,{pathname:m});return pR(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:hs([l,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:hs([l,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,r,n)}function uR(){let e=yR(),t=nf(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),r?y.createElement("pre",{style:s},r):null,null)}const dR=y.createElement(uR,null);class fR extends y.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(Ts.Provider,{value:this.props.routeContext},y.createElement(w1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hR(e){let{routeContext:t,match:r,children:n}=e,s=y.useContext(sf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Ts.Provider,{value:t},n)}function pR(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if((i=r)!=null&&i.errors)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let f=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);f>=0||Qe(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,d,m)=>{let v,w=!1,g=null,x=null;r&&(v=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||dR,l&&(u<0&&m===0?(wR("route-fallback"),w=!0,x=null):u===m&&(w=!0,x=d.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,m+1)),h=()=>{let _;return v?_=g:w?_=x:d.route.Component?_=y.createElement(d.route.Component,null):d.route.element?_=d.route.element:_=f,y.createElement(hR,{match:d,routeContext:{outlet:f,matches:p,isDataRoute:r!=null},children:_})};return r&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?y.createElement(fR,{location:r.location,revalidation:r.revalidation,component:g,error:v,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):h()},null)}var S1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(S1||{}),cd=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}(cd||{});function mR(e){let t=y.useContext(sf);return t||Qe(!1),t}function gR(e){let t=y.useContext(x1);return t||Qe(!1),t}function vR(e){let t=y.useContext(Ts);return t||Qe(!1),t}function k1(e){let t=vR(),r=t.matches[t.matches.length-1];return r.route.id||Qe(!1),r.route.id}function yR(){var e;let t=y.useContext(w1),r=gR(cd.UseRouteError),n=k1(cd.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function xR(){let{router:e}=mR(S1.UseNavigateStable),t=k1(cd.UseNavigateStable),r=y.useRef(!1);return _1(()=>{r.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ld({fromRouteId:t},i)))},[e,t])}const Vx={};function wR(e,t,r){Vx[e]||(Vx[e]=!0)}function C1(e){let{to:t,replace:r,state:n,relative:s}=e;wa()||Qe(!1);let{future:i,static:o}=y.useContext(_i),{matches:a}=y.useContext(Ts),{pathname:l}=Yn(),u=rn(),f=rf(t,tf(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(f);return y.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:s}),[u,d,s,r,n]),null}function kg(e){return lR(e.context)}function _R(e){let{basename:t="/",children:r=null,location:n,navigationType:s=$t.Pop,navigator:i,static:o=!1,future:a}=e;wa()&&Qe(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:i,static:o,future:ld({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=js(n));let{pathname:f="/",search:d="",hash:m="",state:v=null,key:w="default"}=n,g=y.useMemo(()=>{let x=xa(f,l);return x==null?null:{location:{pathname:x,search:d,hash:m,state:v,key:w},navigationType:s}},[l,f,d,m,v,w,s]);return g==null?null:y.createElement(_i.Provider,{value:u},y.createElement(Sg.Provider,{children:r,value:g}))}new Promise(()=>{});function bR(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),y.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let d=rf(u,JSON.parse(o),i,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:hs([t,d.pathname])),(f.replace?n.replace:n.push)(d,f.state,f)},[t,n,o,i,e])}const jR=y.createContext(null);function TR(e){let t=y.useContext(Ns).outlet;return t&&y.createElement(jR.Provider,{value:e},t)}function E1(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=y.useContext(_i),{matches:s}=y.useContext(Ns),{pathname:i}=Yn(),o=JSON.stringify(tf(s,n.v7_relativeSplatPath));return y.useMemo(()=>rf(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function NR(e,t,r,n){wa()||Qe(!1);let{navigator:s}=y.useContext(_i),{matches:i}=y.useContext(Ns),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Yn(),f;f=u;let d=f.pathname||"/",m=d;if(l!=="/"){let g=l.replace(/^\//,"").split("/");m="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=Ri(e,{pathname:m});return OR(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:hs([l,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:hs([l,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,r,n)}function RR(){let e=FR(),t=nf(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),r?y.createElement("pre",{style:s},r):null,null)}const PR=y.createElement(RR,null);class AR extends y.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(Ns.Provider,{value:this.props.routeContext},y.createElement(k1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function DR(e){let{routeContext:t,match:r,children:n}=e,s=y.useContext(sf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Ns.Provider,{value:t},n)}function OR(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if((i=r)!=null&&i.errors)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let f=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);f>=0||Qe(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,d,m)=>{let v,w=!1,g=null,x=null;r&&(v=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||PR,l&&(u<0&&m===0?(UR("route-fallback"),w=!0,x=null):u===m&&(w=!0,x=d.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,m+1)),h=()=>{let _;return v?_=g:w?_=x:d.route.Component?_=y.createElement(d.route.Component,null):d.route.element?_=d.route.element:_=f,y.createElement(DR,{match:d,routeContext:{outlet:f,matches:p,isDataRoute:r!=null},children:_})};return r&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?y.createElement(AR,{location:r.location,revalidation:r.revalidation,component:g,error:v,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):h()},null)}var j1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(j1||{}),ud=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}(ud||{});function MR(e){let t=y.useContext(sf);return t||Qe(!1),t}function IR(e){let t=y.useContext(S1);return t||Qe(!1),t}function LR(e){let t=y.useContext(Ns);return t||Qe(!1),t}function T1(e){let t=LR(),r=t.matches[t.matches.length-1];return r.route.id||Qe(!1),r.route.id}function FR(){var e;let t=y.useContext(k1),r=IR(ud.UseRouteError),n=T1(ud.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function zR(){let{router:e}=MR(j1.UseNavigateStable),t=T1(ud.UseNavigateStable),r=y.useRef(!1);return C1(()=>{r.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,cd({fromRouteId:t},i)))},[e,t])}const Wx={};function UR(e,t,r){Wx[e]||(Wx[e]=!0)}function N1(e){let{to:t,replace:r,state:n,relative:s}=e;wa()||Qe(!1);let{future:i,static:o}=y.useContext(_i),{matches:a}=y.useContext(Ns),{pathname:l}=Yn(),u=nn(),f=rf(t,tf(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(f);return y.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:s}),[u,d,s,r,n]),null}function kg(e){return TR(e.context)}function VR(e){let{basename:t="/",children:r=null,location:n,navigationType:s=$t.Pop,navigator:i,static:o=!1,future:a}=e;wa()&&Qe(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:i,static:o,future:cd({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Ts(n));let{pathname:f="/",search:d="",hash:m="",state:v=null,key:w="default"}=n,g=y.useMemo(()=>{let x=xa(f,l);return x==null?null:{location:{pathname:x,search:d,hash:m,state:v,key:w},navigationType:s}},[l,f,d,m,v,w,s]);return g==null?null:y.createElement(_i.Provider,{value:u},y.createElement(Sg.Provider,{children:r,value:g}))}new Promise(()=>{});function $R(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.25.1 * * Copyright (c) Remix Software Inc. @@ -66,62 +66,62 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[s]=e[s]);return r}function kR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function CR(e,t){return e.button===0&&(!t||t==="_self")&&!kR(e)}function Wp(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function ER(e,t){let r=Wp(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(i=>{r.append(s,i)})}),r}const jR=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],TR="6";try{window.__reactRouterVersion=TR}catch{}function NR(e,t){return z2({basename:void 0,future:Ll({},void 0,{v7_prependBasename:!0}),history:c2({window:void 0}),hydrationData:RR(),routes:e,mapRouteProperties:bR,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function RR(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ll({},t,{errors:PR(t.errors)})),t}function PR(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,s]of t)if(s&&s.__type==="RouteErrorResponse")r[n]=new wg(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let i=window[s.__subType];if(typeof i=="function")try{let o=new i(s.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let i=new Error(s.message);i.stack="",r[n]=i}}else r[n]=s;return r}const AR=y.createContext({isTransitioning:!1}),DR=y.createContext(new Map),OR="startTransition",$x=iw[OR],MR="flushSync",Wx=l2[MR];function IR(e){$x?$x(e):e()}function Va(e){Wx?Wx(e):e()}class LR{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function FR(e){let{fallbackElement:t,router:r,future:n}=e,[s,i]=y.useState(r.state),[o,a]=y.useState(),[l,u]=y.useState({isTransitioning:!1}),[f,d]=y.useState(),[m,v]=y.useState(),[w,g]=y.useState(),x=y.useRef(new Map),{v7_startTransition:p}=n||{},h=y.useCallback(A=>{p?IR(A):A()},[p]),_=y.useCallback((A,P)=>{let{deletedFetchers:L,unstable_flushSync:q,unstable_viewTransitionOpts:T}=P;L.forEach(b=>x.current.delete(b)),A.fetchers.forEach((b,$)=>{b.data!==void 0&&x.current.set($,b.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!T||F){q?Va(()=>i(A)):h(()=>i(A));return}if(q){Va(()=>{m&&(f&&f.resolve(),m.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:T.currentLocation,nextLocation:T.nextLocation})});let b=r.window.document.startViewTransition(()=>{Va(()=>i(A))});b.finished.finally(()=>{Va(()=>{d(void 0),v(void 0),a(void 0),u({isTransitioning:!1})})}),Va(()=>v(b));return}m?(f&&f.resolve(),m.skipTransition(),g({state:A,currentLocation:T.currentLocation,nextLocation:T.nextLocation})):(a(A),u({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}))},[r.window,m,f,x,h]);y.useLayoutEffect(()=>r.subscribe(_),[r,_]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new LR)},[l]),y.useEffect(()=>{if(f&&o&&r.window){let A=o,P=f.promise,L=r.window.document.startViewTransition(async()=>{h(()=>i(A)),await P});L.finished.finally(()=>{d(void 0),v(void 0),a(void 0),u({isTransitioning:!1})}),v(L)}},[h,o,f,r.window]),y.useEffect(()=>{f&&o&&s.location.key===o.location.key&&f.resolve()},[f,m,s.location,o]),y.useEffect(()=>{!l.isTransitioning&&w&&(a(w.state),u({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),g(void 0))},[l.isTransitioning,w]),y.useEffect(()=>{},[]);let C=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:A=>r.navigate(A),push:(A,P,L)=>r.navigate(A,{state:P,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(A,P,L)=>r.navigate(A,{replace:!0,state:P,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[r]),E=r.basename||"/",j=y.useMemo(()=>({router:r,navigator:C,static:!1,basename:E}),[r,C,E]),R=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(sf.Provider,{value:j},y.createElement(x1.Provider,{value:s},y.createElement(DR.Provider,{value:x.current},y.createElement(AR.Provider,{value:l},y.createElement(_R,{basename:E,location:s.location,navigationType:s.historyAction,navigator:C,future:R},s.initialized||r.future.v7_partialHydration?y.createElement(zR,{routes:r.routes,future:r.future,state:s}):t))))),null)}const zR=y.memo(UR);function UR(e){let{routes:t,future:r,state:n}=e;return cR(t,void 0,n,r)}const VR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$R=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tr=y.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:f,unstable_viewTransition:d}=t,m=SR(t,jR),{basename:v}=y.useContext(_i),w,g=!1;if(typeof u=="string"&&$R.test(u)&&(w=u,VR))try{let _=new URL(window.location.href),C=u.startsWith("//")?new URL(_.protocol+u):new URL(u),E=xa(C.pathname,v);C.origin===_.origin&&E!=null?u=E+C.search+C.hash:g=!0}catch{}let x=iR(u,{relative:s}),p=WR(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:s,unstable_viewTransition:d});function h(_){n&&n(_),_.defaultPrevented||p(_)}return y.createElement("a",Ll({},m,{href:w||x,onClick:g||i?n:h,ref:r,target:l}))});var Bx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Bx||(Bx={}));var Hx;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Hx||(Hx={}));function WR(e,t){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=rn(),u=Yn(),f=b1(e,{relative:o});return y.useCallback(d=>{if(CR(d,r)){d.preventDefault();let m=n!==void 0?n:Xi(u)===Xi(f);l(e,{replace:m,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[u,l,f,n,s,r,e,i,o,a])}function BR(e){let t=y.useRef(Wp(e)),r=y.useRef(!1),n=Yn(),s=y.useMemo(()=>ER(n.search,r.current?null:t.current),[n.search]),i=rn(),o=y.useCallback((a,l)=>{const u=Wp(typeof a=="function"?a(s):a);r.current=!0,i("?"+u,l)},[i,s]);return[s,o]}/** + */function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[s]=e[s]);return r}function WR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HR(e,t){return e.button===0&&(!t||t==="_self")&&!WR(e)}function $p(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function YR(e,t){let r=$p(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(i=>{r.append(s,i)})}),r}const ZR=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],KR="6";try{window.__reactRouterVersion=KR}catch{}function GR(e,t){return iR({basename:void 0,future:Ll({},void 0,{v7_prependBasename:!0}),history:N2({window:void 0}),hydrationData:qR(),routes:e,mapRouteProperties:$R,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function qR(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ll({},t,{errors:XR(t.errors)})),t}function XR(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,s]of t)if(s&&s.__type==="RouteErrorResponse")r[n]=new wg(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let i=window[s.__subType];if(typeof i=="function")try{let o=new i(s.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let i=new Error(s.message);i.stack="",r[n]=i}}else r[n]=s;return r}const QR=y.createContext({isTransitioning:!1}),JR=y.createContext(new Map),eP="startTransition",Hx=cw[eP],tP="flushSync",Yx=T2[tP];function rP(e){Hx?Hx(e):e()}function Va(e){Yx?Yx(e):e()}class nP{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function sP(e){let{fallbackElement:t,router:r,future:n}=e,[s,i]=y.useState(r.state),[o,a]=y.useState(),[l,u]=y.useState({isTransitioning:!1}),[f,d]=y.useState(),[m,v]=y.useState(),[w,g]=y.useState(),x=y.useRef(new Map),{v7_startTransition:p}=n||{},h=y.useCallback(A=>{p?rP(A):A()},[p]),_=y.useCallback((A,P)=>{let{deletedFetchers:L,unstable_flushSync:q,unstable_viewTransitionOpts:T}=P;L.forEach(b=>x.current.delete(b)),A.fetchers.forEach((b,$)=>{b.data!==void 0&&x.current.set($,b.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!T||F){q?Va(()=>i(A)):h(()=>i(A));return}if(q){Va(()=>{m&&(f&&f.resolve(),m.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:T.currentLocation,nextLocation:T.nextLocation})});let b=r.window.document.startViewTransition(()=>{Va(()=>i(A))});b.finished.finally(()=>{Va(()=>{d(void 0),v(void 0),a(void 0),u({isTransitioning:!1})})}),Va(()=>v(b));return}m?(f&&f.resolve(),m.skipTransition(),g({state:A,currentLocation:T.currentLocation,nextLocation:T.nextLocation})):(a(A),u({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}))},[r.window,m,f,x,h]);y.useLayoutEffect(()=>r.subscribe(_),[r,_]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new nP)},[l]),y.useEffect(()=>{if(f&&o&&r.window){let A=o,P=f.promise,L=r.window.document.startViewTransition(async()=>{h(()=>i(A)),await P});L.finished.finally(()=>{d(void 0),v(void 0),a(void 0),u({isTransitioning:!1})}),v(L)}},[h,o,f,r.window]),y.useEffect(()=>{f&&o&&s.location.key===o.location.key&&f.resolve()},[f,m,s.location,o]),y.useEffect(()=>{!l.isTransitioning&&w&&(a(w.state),u({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),g(void 0))},[l.isTransitioning,w]),y.useEffect(()=>{},[]);let C=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:A=>r.navigate(A),push:(A,P,L)=>r.navigate(A,{state:P,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(A,P,L)=>r.navigate(A,{replace:!0,state:P,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[r]),E=r.basename||"/",j=y.useMemo(()=>({router:r,navigator:C,static:!1,basename:E}),[r,C,E]),R=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(sf.Provider,{value:j},y.createElement(S1.Provider,{value:s},y.createElement(JR.Provider,{value:x.current},y.createElement(QR.Provider,{value:l},y.createElement(VR,{basename:E,location:s.location,navigationType:s.historyAction,navigator:C,future:R},s.initialized||r.future.v7_partialHydration?y.createElement(iP,{routes:r.routes,future:r.future,state:s}):t))))),null)}const iP=y.memo(oP);function oP(e){let{routes:t,future:r,state:n}=e;return NR(t,void 0,n,r)}const aP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dr=y.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:f,unstable_viewTransition:d}=t,m=BR(t,ZR),{basename:v}=y.useContext(_i),w,g=!1;if(typeof u=="string"&&lP.test(u)&&(w=u,aP))try{let _=new URL(window.location.href),C=u.startsWith("//")?new URL(_.protocol+u):new URL(u),E=xa(C.pathname,v);C.origin===_.origin&&E!=null?u=E+C.search+C.hash:g=!0}catch{}let x=CR(u,{relative:s}),p=cP(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:s,unstable_viewTransition:d});function h(_){n&&n(_),_.defaultPrevented||p(_)}return y.createElement("a",Ll({},m,{href:w||x,onClick:g||i?n:h,ref:r,target:l}))});var Zx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Zx||(Zx={}));var Kx;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Kx||(Kx={}));function cP(e,t){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=nn(),u=Yn(),f=E1(e,{relative:o});return y.useCallback(d=>{if(HR(d,r)){d.preventDefault();let m=n!==void 0?n:Xi(u)===Xi(f);l(e,{replace:m,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[u,l,f,n,s,r,e,i,o,a])}function uP(e){let t=y.useRef($p(e)),r=y.useRef(!1),n=Yn(),s=y.useMemo(()=>YR(n.search,r.current?null:t.current),[n.search]),i=nn(),o=y.useCallback((a,l)=>{const u=$p(typeof a=="function"?a(s):a);r.current=!0,i("?"+u,l)},[i,s]);return[s,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 HR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),E1=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/** + */const dP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),R1=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).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 YR={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"};/** + */var fP={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 ZR=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>y.createElement("svg",{ref:l,...YR,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:E1("lucide",s),...a},[...o.map(([u,f])=>y.createElement(u,f)),...Array.isArray(i)?i:[i]]));/** + */const hP=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>y.createElement("svg",{ref:l,...fP,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:R1("lucide",s),...a},[...o.map(([u,f])=>y.createElement(u,f)),...Array.isArray(i)?i:[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 wt=(e,t)=>{const r=y.forwardRef(({className:n,...s},i)=>y.createElement(ZR,{ref:i,iconNode:t,className:E1(`lucide-${HR(e)}`,n),...s}));return r.displayName=`${e}`,r};/** + */const wt=(e,t)=>{const r=y.forwardRef(({className:n,...s},i)=>y.createElement(hP,{ref:i,iconNode:t,className:R1(`lucide-${dP(e)}`,n),...s}));return r.displayName=`${e}`,r};/** * @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 KR=wt("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** + */const pP=wt("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** * @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 GR=wt("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** + */const mP=wt("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** * @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 qR=wt("CalendarX2",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m17 22 5-5",key:"1k6ppv"}],["path",{d:"m17 17 5 5",key:"p7ous7"}]]);/** + */const gP=wt("CalendarX2",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m17 22 5-5",key:"1k6ppv"}],["path",{d:"m17 17 5 5",key:"p7ous7"}]]);/** * @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 j1=wt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const P1=wt("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 T1=wt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const A1=wt("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 XR=wt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const vP=wt("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 QR=wt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + */const yP=wt("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. @@ -131,7 +131,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JR=wt("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"}]]);/** + */const xP=wt("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. @@ -141,7 +141,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eP=wt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + */const wP=wt("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. @@ -151,73 +151,73 @@ Error generating stack: `+i.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tP=wt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + */const _P=wt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** * @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 ud=wt("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/** + */const Gx=wt("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/** * @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 Yx=wt("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"}]]);/** + */const qx=wt("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 Zx=wt("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** + */const Xx=wt("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** * @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 rP=wt("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"}]]);/** + */const bP=wt("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 nP=wt("LoaderPinwheel",[["path",{d:"M2 12c0-2.8 2.2-5 5-5s5 2.2 5 5 2.2 5 5 5 5-2.2 5-5",key:"1cg5zf"}],["path",{d:"M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6",key:"1gnrpi"}],["path",{d:"M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6",key:"u9yy5q"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + */const SP=wt("LoaderPinwheel",[["path",{d:"M2 12c0-2.8 2.2-5 5-5s5 2.2 5 5 2.2 5 5 5 5-2.2 5-5",key:"1cg5zf"}],["path",{d:"M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6",key:"1gnrpi"}],["path",{d:"M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6",key:"u9yy5q"}],["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 sP=wt("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"}]]);/** + */const kP=wt("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 iP=wt("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + */const CP=wt("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** * @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 ju=wt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + */const Tu=wt("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 Kx=wt("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"}]]);/** + */const Qx=wt("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 N1=wt("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"}]]);/** + */const D1=wt("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 oP=wt("SquareSigma",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M16 8.9V7H8l4 5-4 5h8v-1.9",key:"9nih0i"}]]);/** + */const EP=wt("SquareSigma",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M16 8.9V7H8l4 5-4 5h8v-1.9",key:"9nih0i"}]]);/** * @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=wt("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + */const jP=wt("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @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 jg=wt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function lP(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function of(...e){return t=>e.forEach(r=>lP(r,t))}function Xe(...e){return y.useCallback(of(...e),e)}var ws=y.forwardRef((e,t)=>{const{children:r,...n}=e,s=y.Children.toArray(r),i=s.find(cP);if(i){const o=i.props.children,a=s.map(l=>l===i?y.Children.count(o)>1?y.Children.only(null):y.isValidElement(o)?o.props.children:null:l);return c.jsx(Hp,{...n,ref:t,children:y.isValidElement(o)?y.cloneElement(o,void 0,a):null})}return c.jsx(Hp,{...n,ref:t,children:r})});ws.displayName="Slot";var Hp=y.forwardRef((e,t)=>{const{children:r,...n}=e;if(y.isValidElement(r)){const s=dP(r);return y.cloneElement(r,{...uP(n,r.props),ref:t?of(t,s):s})}return y.Children.count(r)>1?y.Children.only(null):null});Hp.displayName="SlotClone";var Tg=({children:e})=>c.jsx(c.Fragment,{children:e});function cP(e){return y.isValidElement(e)&&e.type===Tg}function uP(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function dP(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function R1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,qx=fP,dc=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return qx(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const f=r==null?void 0:r[u],d=i==null?void 0:i[u];if(f===null)return null;const m=Gx(f)||Gx(d);return s[u][m]}),a=r&&Object.entries(r).reduce((u,f)=>{let[d,m]=f;return m===void 0||(u[d]=m),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:m,...v}=f;return Object.entries(v).every(w=>{let[g,x]=w;return Array.isArray(x)?x.includes({...i,...a}[g]):{...i,...a}[g]===x})?[...u,d,m]:u},[]);return qx(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function P1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;ta(i)))==null?void 0:o.classGroupId}const Xx=/^\[(.+)\]$/;function mP(e){if(Xx.test(e)){const t=Xx.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function gP(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return yP(Object.entries(e.classGroups),r).forEach(([i,o])=>{Yp(o,n,i,t)}),n}function Yp(e,t,r,n){e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Qx(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(vP(s)){Yp(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{Yp(o,Qx(t,i),r,n)})})}function Qx(e,t){let r=e;return t.split(Ng).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function vP(e){return e.isThemeGetter}function yP(e,t){return t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e}function xP(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function s(i,o){r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)}return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}}const D1="!";function wP(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length;function o(a){const l=[];let u=0,f=0,d;for(let x=0;xf?d-f:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:g}}return r?function(l){return r({className:l,parseClassName:o})}:o}function _P(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function bP(e){return{cache:xP(e.cacheSize),parseClassName:wP(e),...pP(e)}}const SP=/\s+/;function kP(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=new Set;return e.trim().split(SP).map(o=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:f}=r(o);let d=!!f,m=n(d?u.substring(0,f):u);if(!m){if(!d)return{isTailwindClass:!1,originalClassName:o};if(m=n(u),!m)return{isTailwindClass:!1,originalClassName:o};d=!1}const v=_P(a).join(":");return{isTailwindClass:!0,modifierId:l?v+D1:v,classGroupId:m,originalClassName:o,hasPostfixModifier:d}}).reverse().filter(o=>{if(!o.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=o,f=a+l;return i.has(f)?!1:(i.add(f),s(l,u).forEach(d=>i.add(a+d)),!0)}).reverse().map(o=>o.originalClassName).join(" ")}function CP(){let e=0,t,r,n="";for(;ed(f),e());return r=bP(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const f=kP(l,r);return s(l,f),f}return function(){return i(CP.apply(null,arguments))}}function _t(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const M1=/^\[(?:([a-z-]+):)?(.+)\]$/i,jP=/^\d+\/\d+$/,TP=new Set(["px","full","screen"]),NP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RP=/\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$/,PP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,AP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,DP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function es(e){return Fi(e)||TP.has(e)||jP.test(e)}function Is(e){return _a(e,"length",VP)}function Fi(e){return!!e&&!Number.isNaN(Number(e))}function eu(e){return _a(e,"number",Fi)}function $a(e){return!!e&&Number.isInteger(Number(e))}function OP(e){return e.endsWith("%")&&Fi(e.slice(0,-1))}function Ze(e){return M1.test(e)}function Ls(e){return NP.test(e)}const MP=new Set(["length","size","percentage"]);function IP(e){return _a(e,MP,I1)}function LP(e){return _a(e,"position",I1)}const FP=new Set(["image","url"]);function zP(e){return _a(e,FP,WP)}function UP(e){return _a(e,"",$P)}function Wa(){return!0}function _a(e,t,r){const n=M1.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function VP(e){return RP.test(e)&&!PP.test(e)}function I1(){return!1}function $P(e){return AP.test(e)}function WP(e){return DP.test(e)}function BP(){const e=_t("colors"),t=_t("spacing"),r=_t("blur"),n=_t("brightness"),s=_t("borderColor"),i=_t("borderRadius"),o=_t("borderSpacing"),a=_t("borderWidth"),l=_t("contrast"),u=_t("grayscale"),f=_t("hueRotate"),d=_t("invert"),m=_t("gap"),v=_t("gradientColorStops"),w=_t("gradientColorStopPositions"),g=_t("inset"),x=_t("margin"),p=_t("opacity"),h=_t("padding"),_=_t("saturate"),C=_t("scale"),E=_t("sepia"),j=_t("skew"),R=_t("space"),A=_t("translate"),P=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",Ze,t],T=()=>[Ze,t],F=()=>["",es,Is],b=()=>["auto",Fi,Ze],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["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"],Z=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Ze],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Fi,eu],V=()=>[Fi,Ze];return{cacheSize:500,separator:":",theme:{colors:[Wa],spacing:[es,Is],blur:["none","",Ls,Ze],brightness:z(),borderColor:[e],borderRadius:["none","","full",Ls,Ze],borderSpacing:T(),borderWidth:F(),contrast:z(),grayscale:I(),hueRotate:V(),invert:I(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[OP,Is],inset:q(),margin:q(),opacity:z(),padding:T(),saturate:z(),scale:z(),sepia:I(),skew:V(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",Ze]}],container:["container"],columns:[{columns:[Ls]}],"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:[...$(),Ze]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$a,Ze]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ze]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",$a,Ze]}],"grid-cols":[{"grid-cols":[Wa]}],"col-start-end":[{col:["auto",{span:["full",$a,Ze]},Ze]}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":[Wa]}],"row-start-end":[{row:["auto",{span:[$a,Ze]},Ze]}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ze]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ze,t]}],"min-w":[{"min-w":[Ze,t,"min","max","fit"]}],"max-w":[{"max-w":[Ze,t,"none","full","min","max","fit","prose",{screen:[Ls]},Ls]}],h:[{h:[Ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ls,Is]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",eu]}],"font-family":[{font:[Wa]}],"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",Ze]}],"line-clamp":[{"line-clamp":["none",Fi,eu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",es,Ze]}],"list-image":[{"list-image":["none",Ze]}],"list-style-type":[{list:["none","disc","decimal",Ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",es,Is]}],"underline-offset":[{"underline-offset":["auto",es,Ze]}],"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:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze]}],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",Ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),LP]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",IP]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zP]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[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":[p]}],"border-style":[{border:[...te(),"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":[p]}],"divide-style":[{divide:te()}],"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:["",...te()]}],"outline-offset":[{"outline-offset":[es,Ze]}],"outline-w":[{outline:[es,Is]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[es,Is]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ls,UP]}],"shadow-color":[{shadow:[Wa]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ls,Ze]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ze]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Ze]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[$a,Ze]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ze]}],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",Ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",Ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[es,Is,eu]}],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 HP=EP(BP);function le(...e){return HP(hP(e))}const af=dc("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"}}),Je=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?ws:"button";return c.jsx(o,{className:le(af({variant:t,size:r,className:e})),ref:i,...s})});Je.displayName="Button";function de(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function YP(e,t){const r=y.createContext(t);function n(i){const{children:o,...a}=i,l=y.useMemo(()=>a,Object.values(a));return c.jsx(r.Provider,{value:l,children:o})}function s(i){const o=y.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,s]}function nn(e,t=[]){let r=[];function n(i,o){const a=y.createContext(o),l=r.length;r=[...r,o];function u(d){const{scope:m,children:v,...w}=d,g=(m==null?void 0:m[e][l])||a,x=y.useMemo(()=>w,Object.values(w));return c.jsx(g.Provider,{value:x,children:v})}function f(d,m){const v=(m==null?void 0:m[e][l])||a,w=y.useContext(v);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const s=()=>{const i=r.map(o=>y.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,ZP(s,...t)]}function ZP(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Dt(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function ui({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=KP({defaultProp:t,onChange:r}),i=e!==void 0,o=i?e:n,a=Dt(r),l=y.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&a(d)}else s(u)},[i,e,s,a]);return[o,l]}function KP({defaultProp:e,onChange:t}){const r=y.useState(e),[n]=r,s=y.useRef(n),i=Dt(t);return y.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var GP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ve=GP.reduce((e,t)=>{const r=y.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?ws:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Rg(e,t){e&&Es.flushSync(()=>e.dispatchEvent(t))}function lf(e){const t=e+"CollectionProvider",[r,n]=nn(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:w,children:g}=v,x=tt.useRef(null),p=tt.useRef(new Map).current;return c.jsx(s,{scope:w,itemMap:p,collectionRef:x,children:g})};o.displayName=t;const a=e+"CollectionSlot",l=tt.forwardRef((v,w)=>{const{scope:g,children:x}=v,p=i(a,g),h=Xe(w,p.collectionRef);return c.jsx(ws,{ref:h,children:x})});l.displayName=a;const u=e+"CollectionItemSlot",f="data-radix-collection-item",d=tt.forwardRef((v,w)=>{const{scope:g,children:x,...p}=v,h=tt.useRef(null),_=Xe(w,h),C=i(u,g);return tt.useEffect(()=>(C.itemMap.set(h,{ref:h,...p}),()=>void C.itemMap.delete(h))),c.jsx(ws,{[f]:"",ref:_,children:x})});d.displayName=u;function m(v){const w=i(e+"CollectionConsumer",v);return tt.useCallback(()=>{const x=w.collectionRef.current;if(!x)return[];const p=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(w.itemMap.values()).sort((C,E)=>p.indexOf(C.ref.current)-p.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:l,ItemSlot:d},m,n]}var qP=y.createContext(void 0);function cf(e){const t=y.useContext(qP);return e||t||"ltr"}function XP(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e);y.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var QP="DismissableLayer",Zp="dismissableLayer.update",JP="dismissableLayer.pointerDownOutside",eA="dismissableLayer.focusOutside",Jx,L1=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ba=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=y.useContext(L1),[f,d]=y.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=y.useState({}),w=Xe(t,R=>d(R)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(x),h=f?g.indexOf(f):-1,_=u.layersWithOutsidePointerEventsDisabled.size>0,C=h>=p,E=rA(R=>{const A=R.target,P=[...u.branches].some(L=>L.contains(A));!C||P||(s==null||s(R),o==null||o(R),R.defaultPrevented||a==null||a())},m),j=nA(R=>{const A=R.target;[...u.branches].some(L=>L.contains(A))||(i==null||i(R),o==null||o(R),R.defaultPrevented||a==null||a())},m);return XP(R=>{h===u.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),y.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Jx=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),e0(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Jx)}},[f,m,r,u]),y.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),e0())},[f,u]),y.useEffect(()=>{const R=()=>v({});return document.addEventListener(Zp,R),()=>document.removeEventListener(Zp,R)},[]),c.jsx(Ve.div,{...l,ref:w,style:{pointerEvents:_?C?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,j.onFocusCapture),onBlurCapture:de(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,E.onPointerDownCapture)})});ba.displayName=QP;var tA="DismissableLayerBranch",F1=y.forwardRef((e,t)=>{const r=y.useContext(L1),n=y.useRef(null),s=Xe(t,n);return y.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),c.jsx(Ve.div,{...e,ref:s})});F1.displayName=tA;function rA(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){z1(JP,r,u,{discrete:!0})};const u={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);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function nA(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=y.useRef(!1);return y.useEffect(()=>{const s=i=>{i.target&&!n.current&&z1(eA,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function e0(){const e=new CustomEvent(Zp);document.dispatchEvent(e)}function z1(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Rg(s,i):s.dispatchEvent(i)}var sA=ba,iA=F1,jh=0;function Pg(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??t0()),document.body.insertAdjacentElement("beforeend",e[1]??t0()),jh++,()=>{jh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jh--}},[])}function t0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Th="focusScope.autoFocusOnMount",Nh="focusScope.autoFocusOnUnmount",r0={bubbles:!1,cancelable:!0},oA="FocusScope",uf=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=y.useState(null),u=Dt(s),f=Dt(i),d=y.useRef(null),m=Xe(t,g=>l(g)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let g=function(_){if(v.paused||!a)return;const C=_.target;a.contains(C)?d.current=C:zs(d.current,{select:!0})},x=function(_){if(v.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||zs(d.current,{select:!0}))},p=function(_){if(document.activeElement===document.body)for(const E of _)E.removedNodes.length>0&&zs(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const h=new MutationObserver(p);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),h.disconnect()}}},[n,a,v.paused]),y.useEffect(()=>{if(a){s0.add(v);const g=document.activeElement;if(!a.contains(g)){const p=new CustomEvent(Th,r0);a.addEventListener(Th,u),a.dispatchEvent(p),p.defaultPrevented||(aA(fA(U1(a)),{select:!0}),document.activeElement===g&&zs(a))}return()=>{a.removeEventListener(Th,u),setTimeout(()=>{const p=new CustomEvent(Nh,r0);a.addEventListener(Nh,f),a.dispatchEvent(p),p.defaultPrevented||zs(g??document.body,{select:!0}),a.removeEventListener(Nh,f),s0.remove(v)},0)}}},[a,u,f,v]);const w=y.useCallback(g=>{if(!r&&!n||v.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,p=document.activeElement;if(x&&p){const h=g.currentTarget,[_,C]=lA(h);_&&C?!g.shiftKey&&p===C?(g.preventDefault(),r&&zs(_,{select:!0})):g.shiftKey&&p===_&&(g.preventDefault(),r&&zs(C,{select:!0})):p===h&&g.preventDefault()}},[r,n,v.paused]);return c.jsx(Ve.div,{tabIndex:-1,...o,ref:m,onKeyDown:w})});uf.displayName=oA;function aA(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(zs(n,{select:t}),document.activeElement!==r)return}function lA(e){const t=U1(e),r=n0(t,e),n=n0(t.reverse(),e);return[r,n]}function U1(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function n0(e,t){for(const r of e)if(!cA(r,{upTo:t}))return r}function cA(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 uA(e){return e instanceof HTMLInputElement&&"select"in e}function zs(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&uA(e)&&t&&e.select()}}var s0=dA();function dA(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=i0(e,t),e.unshift(t)},remove(t){var r;e=i0(e,t),(r=e[0])==null||r.resume()}}}function i0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function fA(e){return e.filter(t=>t.tagName!=="A")}var sr=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},hA=iw.useId||(()=>{}),pA=0;function Un(e){const[t,r]=y.useState(hA());return sr(()=>{r(n=>n??String(pA++))},[e]),t?`radix-${t}`:""}const mA=["top","right","bottom","left"],In=Math.min,Ar=Math.max,dd=Math.round,tu=Math.floor,di=e=>({x:e,y:e}),gA={left:"right",right:"left",bottom:"top",top:"bottom"},vA={start:"end",end:"start"};function Kp(e,t,r){return Ar(e,In(t,r))}function _s(e,t){return typeof e=="function"?e(t):e}function bs(e){return e.split("-")[0]}function Sa(e){return e.split("-")[1]}function Ag(e){return e==="x"?"y":"x"}function Dg(e){return e==="y"?"height":"width"}function fi(e){return["top","bottom"].includes(bs(e))?"y":"x"}function Og(e){return Ag(fi(e))}function yA(e,t,r){r===void 0&&(r=!1);const n=Sa(e),s=Og(e),i=Dg(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=fd(o)),[o,fd(o)]}function xA(e){const t=fd(e);return[Gp(e),t,Gp(t)]}function Gp(e){return e.replace(/start|end/g,t=>vA[t])}function wA(e,t,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?i:o;default:return[]}}function _A(e,t,r,n){const s=Sa(e);let i=wA(bs(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Gp)))),i}function fd(e){return e.replace(/left|right|bottom|top/g,t=>gA[t])}function bA(e){return{top:0,right:0,bottom:0,left:0,...e}}function V1(e){return typeof e!="number"?bA(e):{top:e,right:e,bottom:e,left:e}}function hd(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function o0(e,t,r){let{reference:n,floating:s}=e;const i=fi(t),o=Og(t),a=Dg(o),l=bs(t),u=i==="y",f=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,m=n[a]/2-s[a]/2;let v;switch(l){case"top":v={x:f,y:n.y-s.height};break;case"bottom":v={x:f,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:d};break;case"left":v={x:n.x-s.width,y:d};break;default:v={x:n.x,y:n.y}}switch(Sa(t)){case"start":v[o]-=m*(r&&u?-1:1);break;case"end":v[o]+=m*(r&&u?-1:1);break}return v}const SA=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:d}=o0(u,n,l),m=n,v={},w=0;for(let g=0;g({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=_s(e,t)||{};if(u==null)return{};const d=V1(f),m={x:r,y:n},v=Og(s),w=Dg(v),g=await o.getDimensions(u),x=v==="y",p=x?"top":"left",h=x?"bottom":"right",_=x?"clientHeight":"clientWidth",C=i.reference[w]+i.reference[v]-m[v]-i.floating[w],E=m[v]-i.reference[v],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let R=j?j[_]:0;(!R||!await(o.isElement==null?void 0:o.isElement(j)))&&(R=a.floating[_]||i.floating[w]);const A=C/2-E/2,P=R/2-g[w]/2-1,L=In(d[p],P),q=In(d[h],P),T=L,F=R-g[w]-q,b=R/2-g[w]/2+A,$=Kp(T,b,F),te=!l.arrow&&Sa(s)!=null&&b!==$&&i.reference[w]/2-(bb<=0)){var q,T;const b=(((q=i.flip)==null?void 0:q.index)||0)+1,$=R[b];if($)return{data:{index:b,overflows:L},reset:{placement:$}};let te=(T=L.filter(W=>W.overflows[0]<=0).sort((W,Z)=>W.overflows[1]-Z.overflows[1])[0])==null?void 0:T.placement;if(!te)switch(v){case"bestFit":{var F;const W=(F=L.filter(Z=>{if(j){const I=fi(Z.placement);return I===h||I==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(I=>I>0).reduce((I,Q)=>I+Q,0)]).sort((Z,I)=>Z[1]-I[1])[0])==null?void 0:F[0];W&&(te=W);break}case"initialPlacement":te=a;break}if(s!==te)return{reset:{placement:te}}}return{}}}};function a0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function l0(e){return mA.some(t=>e[t]>=0)}const EA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=_s(e,t);switch(n){case"referenceHidden":{const i=await Fl(t,{...s,elementContext:"reference"}),o=a0(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:l0(o)}}}case"escaped":{const i=await Fl(t,{...s,altBoundary:!0}),o=a0(i,r.floating);return{data:{escapedOffsets:o,escaped:l0(o)}}}default:return{}}}}};async function jA(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=bs(r),a=Sa(r),l=fi(r)==="y",u=["left","top"].includes(o)?-1:1,f=i&&l?-1:1,d=_s(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof w=="number"&&(v=a==="end"?w*-1:w),l?{x:v*f,y:m*u}:{x:m*u,y:v*f}}const TA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await jA(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},NA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:p,y:h}=x;return{x:p,y:h}}},...l}=_s(e,t),u={x:r,y:n},f=await Fl(t,l),d=fi(bs(s)),m=Ag(d);let v=u[m],w=u[d];if(i){const x=m==="y"?"top":"left",p=m==="y"?"bottom":"right",h=v+f[x],_=v-f[p];v=Kp(h,v,_)}if(o){const x=d==="y"?"top":"left",p=d==="y"?"bottom":"right",h=w+f[x],_=w-f[p];w=Kp(h,w,_)}const g=a.fn({...t,[m]:v,[d]:w});return{...g,data:{x:g.x-r,y:g.y-n}}}}},RA=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=_s(e,t),f={x:r,y:n},d=fi(s),m=Ag(d);let v=f[m],w=f[d];const g=_s(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const _=m==="y"?"height":"width",C=i.reference[m]-i.floating[_]+x.mainAxis,E=i.reference[m]+i.reference[_]-x.mainAxis;vE&&(v=E)}if(u){var p,h;const _=m==="y"?"width":"height",C=["top","left"].includes(bs(s)),E=i.reference[d]-i.floating[_]+(C&&((p=o.offset)==null?void 0:p[d])||0)+(C?0:x.crossAxis),j=i.reference[d]+i.reference[_]+(C?0:((h=o.offset)==null?void 0:h[d])||0)-(C?x.crossAxis:0);wj&&(w=j)}return{[m]:v,[d]:w}}}},PA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:s,elements:i}=t,{apply:o=()=>{},...a}=_s(e,t),l=await Fl(t,a),u=bs(r),f=Sa(r),d=fi(r)==="y",{width:m,height:v}=n.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(g=u,w=f==="end"?"top":"bottom");const x=v-l.top-l.bottom,p=m-l.left-l.right,h=In(v-l[w],x),_=In(m-l[g],p),C=!t.middlewareData.shift;let E=h,j=_;if(d?j=f||C?In(_,p):p:E=f||C?In(h,x):x,C&&!f){const A=Ar(l.left,0),P=Ar(l.right,0),L=Ar(l.top,0),q=Ar(l.bottom,0);d?j=m-2*(A!==0||P!==0?A+P:Ar(l.left,l.right)):E=v-2*(L!==0||q!==0?L+q:Ar(l.top,l.bottom))}await o({...t,availableWidth:j,availableHeight:E});const R=await s.getDimensions(i.floating);return m!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function ka(e){return $1(e)?(e.nodeName||"").toLowerCase():"#document"}function Mr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ns(e){var t;return(t=($1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $1(e){return e instanceof Node||e instanceof Mr(e).Node}function _n(e){return e instanceof Element||e instanceof Mr(e).Element}function $n(e){return e instanceof HTMLElement||e instanceof Mr(e).HTMLElement}function c0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mr(e).ShadowRoot}function fc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=bn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function AA(e){return["table","td","th"].includes(ka(e))}function df(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Mg(e){const t=Ig(),r=_n(e)?bn(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function DA(e){let t=hi(e);for(;$n(t)&&!ca(t);){if(Mg(t))return t;if(df(t))return null;t=hi(t)}return null}function Ig(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ca(e){return["html","body","#document"].includes(ka(e))}function bn(e){return Mr(e).getComputedStyle(e)}function ff(e){return _n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(ka(e)==="html")return e;const t=e.assignedSlot||e.parentNode||c0(e)&&e.host||Ns(e);return c0(t)?t.host:t}function W1(e){const t=hi(e);return ca(t)?e.ownerDocument?e.ownerDocument.body:e.body:$n(t)&&fc(t)?t:W1(t)}function zl(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=W1(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=Mr(s);return i?t.concat(o,o.visualViewport||[],fc(s)?s:[],o.frameElement&&r?zl(o.frameElement):[]):t.concat(s,zl(s,[],r))}function B1(e){const t=bn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=$n(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=dd(r)!==i||dd(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Lg(e){return _n(e)?e:e.contextElement}function Zo(e){const t=Lg(e);if(!$n(t))return di(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=B1(t);let o=(i?dd(r.width):r.width)/n,a=(i?dd(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const OA=di(0);function H1(e){const t=Mr(e);return!Ig()||!t.visualViewport?OA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function MA(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Mr(e)?!1:t}function Qi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Lg(e);let o=di(1);t&&(n?_n(n)&&(o=Zo(n)):o=Zo(e));const a=MA(i,r,n)?H1(i):di(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,f=s.width/o.x,d=s.height/o.y;if(i){const m=Mr(i),v=n&&_n(n)?Mr(n):n;let w=m,g=w.frameElement;for(;g&&n&&v!==w;){const x=Zo(g),p=g.getBoundingClientRect(),h=bn(g),_=p.left+(g.clientLeft+parseFloat(h.paddingLeft))*x.x,C=p.top+(g.clientTop+parseFloat(h.paddingTop))*x.y;l*=x.x,u*=x.y,f*=x.x,d*=x.y,l+=_,u+=C,w=Mr(g),g=w.frameElement}}return hd({width:f,height:d,x:l,y:u})}function IA(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Ns(n),a=t?df(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=di(1);const f=di(0),d=$n(n);if((d||!d&&!i)&&((ka(n)!=="body"||fc(o))&&(l=ff(n)),$n(n))){const m=Qi(n);u=Zo(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+f.x,y:r.y*u.y-l.scrollTop*u.y+f.y}}function LA(e){return Array.from(e.getClientRects())}function Y1(e){return Qi(Ns(e)).left+ff(e).scrollLeft}function FA(e){const t=Ns(e),r=ff(e),n=e.ownerDocument.body,s=Ar(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ar(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Y1(e);const a=-r.scrollTop;return bn(n).direction==="rtl"&&(o+=Ar(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function zA(e,t){const r=Mr(e),n=Ns(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Ig();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function UA(e,t){const r=Qi(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=$n(e)?Zo(e):di(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function u0(e,t,r){let n;if(t==="viewport")n=zA(e,r);else if(t==="document")n=FA(Ns(e));else if(_n(t))n=UA(t,r);else{const s=H1(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return hd(n)}function Z1(e,t){const r=hi(e);return r===t||!_n(r)||ca(r)?!1:bn(r).position==="fixed"||Z1(r,t)}function VA(e,t){const r=t.get(e);if(r)return r;let n=zl(e,[],!1).filter(a=>_n(a)&&ka(a)!=="body"),s=null;const i=bn(e).position==="fixed";let o=i?hi(e):e;for(;_n(o)&&!ca(o);){const a=bn(o),l=Mg(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||fc(o)&&!l&&Z1(e,o))?n=n.filter(f=>f!==o):s=a,o=hi(o)}return t.set(e,n),n}function $A(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?df(t)?[]:VA(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,f)=>{const d=u0(t,f,s);return u.top=Ar(d.top,u.top),u.right=In(d.right,u.right),u.bottom=In(d.bottom,u.bottom),u.left=Ar(d.left,u.left),u},u0(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function WA(e){const{width:t,height:r}=B1(e);return{width:t,height:r}}function BA(e,t,r){const n=$n(t),s=Ns(t),i=r==="fixed",o=Qi(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=di(0);if(n||!n&&!i)if((ka(t)!=="body"||fc(s))&&(a=ff(t)),n){const d=Qi(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&(l.x=Y1(s));const u=o.left+a.scrollLeft-l.x,f=o.top+a.scrollTop-l.y;return{x:u,y:f,width:o.width,height:o.height}}function Rh(e){return bn(e).position==="static"}function d0(e,t){return!$n(e)||bn(e).position==="fixed"?null:t?t(e):e.offsetParent}function K1(e,t){const r=Mr(e);if(df(e))return r;if(!$n(e)){let s=hi(e);for(;s&&!ca(s);){if(_n(s)&&!Rh(s))return s;s=hi(s)}return r}let n=d0(e,t);for(;n&&AA(n)&&Rh(n);)n=d0(n,t);return n&&ca(n)&&Rh(n)&&!Mg(n)?r:n||DA(e)||r}const HA=async function(e){const t=this.getOffsetParent||K1,r=this.getDimensions,n=await r(e.floating);return{reference:BA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function YA(e){return bn(e).direction==="rtl"}const ZA={convertOffsetParentRelativeRectToViewportRelativeRect:IA,getDocumentElement:Ns,getClippingRect:$A,getOffsetParent:K1,getElementRects:HA,getClientRects:LA,getDimensions:WA,getScale:Zo,isElement:_n,isRTL:YA};function KA(e,t){let r=null,n;const s=Ns(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:f,width:d,height:m}=e.getBoundingClientRect();if(a||t(),!d||!m)return;const v=tu(f),w=tu(s.clientWidth-(u+d)),g=tu(s.clientHeight-(f+m)),x=tu(u),h={rootMargin:-v+"px "+-w+"px "+-g+"px "+-x+"px",threshold:Ar(0,In(1,l))||1};let _=!0;function C(E){const j=E[0].intersectionRatio;if(j!==l){if(!_)return o();j?o(!1,j):n=setTimeout(()=>{o(!1,1e-7)},1e3)}_=!1}try{r=new IntersectionObserver(C,{...h,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,h)}r.observe(e)}return o(!0),i}function GA(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Lg(e),f=s||i?[...u?zl(u):[],...zl(t)]:[];f.forEach(p=>{s&&p.addEventListener("scroll",r,{passive:!0}),i&&p.addEventListener("resize",r)});const d=u&&a?KA(u,r):null;let m=-1,v=null;o&&(v=new ResizeObserver(p=>{let[h]=p;h&&h.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),r()}),u&&!l&&v.observe(u),v.observe(t));let w,g=l?Qi(e):null;l&&x();function x(){const p=Qi(e);g&&(p.x!==g.x||p.y!==g.y||p.width!==g.width||p.height!==g.height)&&r(),g=p,w=requestAnimationFrame(x)}return r(),()=>{var p;f.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),d==null||d(),(p=v)==null||p.disconnect(),v=null,l&&cancelAnimationFrame(w)}}const qA=TA,XA=NA,QA=CA,JA=PA,eD=EA,f0=kA,tD=RA,rD=(e,t,r)=>{const n=new Map,s={platform:ZA,...r},i={...s.platform,_c:n};return SA(e,t,{...s,platform:i})};var Tu=typeof document<"u"?y.useLayoutEffect:y.useEffect;function pd(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 r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!pd(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!pd(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function G1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function h0(e,t){const r=G1(e);return Math.round(t*r)/r}function p0(e){const t=y.useRef(e);return Tu(()=>{t.current=e}),t}function nD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,d]=y.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=y.useState(n);pd(m,n)||v(n);const[w,g]=y.useState(null),[x,p]=y.useState(null),h=y.useCallback(W=>{W!==j.current&&(j.current=W,g(W))},[]),_=y.useCallback(W=>{W!==R.current&&(R.current=W,p(W))},[]),C=i||w,E=o||x,j=y.useRef(null),R=y.useRef(null),A=y.useRef(f),P=l!=null,L=p0(l),q=p0(s),T=y.useCallback(()=>{if(!j.current||!R.current)return;const W={placement:t,strategy:r,middleware:m};q.current&&(W.platform=q.current),rD(j.current,R.current,W).then(Z=>{const I={...Z,isPositioned:!0};F.current&&!pd(A.current,I)&&(A.current=I,Es.flushSync(()=>{d(I)}))})},[m,t,r,q]);Tu(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(W=>({...W,isPositioned:!1})))},[u]);const F=y.useRef(!1);Tu(()=>(F.current=!0,()=>{F.current=!1}),[]),Tu(()=>{if(C&&(j.current=C),E&&(R.current=E),C&&E){if(L.current)return L.current(C,E,T);T()}},[C,E,T,L,P]);const b=y.useMemo(()=>({reference:j,floating:R,setReference:h,setFloating:_}),[h,_]),$=y.useMemo(()=>({reference:C,floating:E}),[C,E]),te=y.useMemo(()=>{const W={position:r,left:0,top:0};if(!$.floating)return W;const Z=h0($.floating,f.x),I=h0($.floating,f.y);return a?{...W,transform:"translate("+Z+"px, "+I+"px)",...G1($.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:I}},[r,a,$.floating,f.x,f.y]);return y.useMemo(()=>({...f,update:T,refs:b,elements:$,floatingStyles:te}),[f,T,b,$,te])}const sD=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?f0({element:n.current,padding:s}).fn(r):{}:n?f0({element:n,padding:s}).fn(r):{}}}},iD=(e,t)=>({...qA(e),options:[e,t]}),oD=(e,t)=>({...XA(e),options:[e,t]}),aD=(e,t)=>({...tD(e),options:[e,t]}),lD=(e,t)=>({...QA(e),options:[e,t]}),cD=(e,t)=>({...JA(e),options:[e,t]}),uD=(e,t)=>({...eD(e),options:[e,t]}),dD=(e,t)=>({...sD(e),options:[e,t]});var fD="Arrow",q1=y.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return c.jsx(Ve.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});q1.displayName=fD;var hD=q1;function X1(e){const[t,r]=y.useState(void 0);return sr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Fg="Popper",[Q1,Ca]=nn(Fg),[pD,J1]=Q1(Fg),eb=e=>{const{__scopePopper:t,children:r}=e,[n,s]=y.useState(null);return c.jsx(pD,{scope:t,anchor:n,onAnchorChange:s,children:r})};eb.displayName=Fg;var tb="PopperAnchor",rb=y.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=J1(tb,r),o=y.useRef(null),a=Xe(t,o);return y.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:c.jsx(Ve.div,{...s,ref:a})});rb.displayName=tb;var zg="PopperContent",[mD,gD]=Q1(zg),nb=y.forwardRef((e,t)=>{var he,ye,ke,Ie,De,Ne;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:w,...g}=e,x=J1(zg,r),[p,h]=y.useState(null),_=Xe(t,nt=>h(nt)),[C,E]=y.useState(null),j=X1(C),R=(j==null?void 0:j.width)??0,A=(j==null?void 0:j.height)??0,P=n+(i!=="center"?"-"+i:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(u)?u:[u],T=q.length>0,F={padding:L,boundary:q.filter(yD),altBoundary:T},{refs:b,floatingStyles:$,placement:te,isPositioned:W,middlewareData:Z}=nD({strategy:"fixed",placement:P,whileElementsMounted:(...nt)=>GA(...nt,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[iD({mainAxis:s+A,alignmentAxis:o}),l&&oD({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?aD():void 0,...F}),l&&lD({...F}),cD({...F,apply:({elements:nt,rects:k,availableWidth:J,availableHeight:K})=>{const{width:D,height:S}=k.reference,N=nt.floating.style;N.setProperty("--radix-popper-available-width",`${J}px`),N.setProperty("--radix-popper-available-height",`${K}px`),N.setProperty("--radix-popper-anchor-width",`${D}px`),N.setProperty("--radix-popper-anchor-height",`${S}px`)}}),C&&dD({element:C,padding:a}),xD({arrowWidth:R,arrowHeight:A}),m&&uD({strategy:"referenceHidden",...F})]}),[I,Q]=ob(te),z=Dt(w);sr(()=>{W&&(z==null||z())},[W,z]);const V=(he=Z.arrow)==null?void 0:he.x,fe=(ye=Z.arrow)==null?void 0:ye.y,ne=((ke=Z.arrow)==null?void 0:ke.centerOffset)!==0,[se,Ae]=y.useState();return sr(()=>{p&&Ae(window.getComputedStyle(p).zIndex)},[p]),c.jsx("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:W?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Ie=Z.transformOrigin)==null?void 0:Ie.x,(De=Z.transformOrigin)==null?void 0:De.y].join(" "),...((Ne=Z.hide)==null?void 0:Ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(mD,{scope:r,placedSide:I,onArrowChange:E,arrowX:V,arrowY:fe,shouldHideArrow:ne,children:c.jsx(Ve.div,{"data-side":I,"data-align":Q,...g,ref:_,style:{...g.style,animation:W?void 0:"none"}})})})});nb.displayName=zg;var sb="PopperArrow",vD={top:"bottom",right:"left",bottom:"top",left:"right"},ib=y.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=gD(sb,n),o=vD[i.placedSide];return c.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:c.jsx(hD,{...s,ref:r,style:{...s.style,display:"block"}})})});ib.displayName=sb;function yD(e){return e!==null}var xD=e=>({name:"transformOrigin",options:e,fn(t){var x,p,h;const{placement:r,rects:n,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,f]=ob(r),d={start:"0%",center:"50%",end:"100%"}[f],m=(((p=s.arrow)==null?void 0:p.x)??0)+a/2,v=(((h=s.arrow)==null?void 0:h.y)??0)+l/2;let w="",g="";return u==="bottom"?(w=o?d:`${m}px`,g=`${-l}px`):u==="top"?(w=o?d:`${m}px`,g=`${n.floating.height+l}px`):u==="right"?(w=`${-l}px`,g=o?d:`${v}px`):u==="left"&&(w=`${n.floating.width+l}px`,g=o?d:`${v}px`),{data:{x:w,y:g}}}});function ob(e){const[t,r="center"]=e.split("-");return[t,r]}var Ug=eb,Vg=rb,$g=nb,Wg=ib,wD="Portal",hc=y.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=y.useState(!1);sr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?l1.createPortal(c.jsx(Ve.div,{...n,ref:t}),o):null});hc.displayName=wD;function _D(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var Er=e=>{const{present:t,children:r}=e,n=bD(t),s=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),i=Xe(n.ref,SD(s));return typeof r=="function"||n.isPresent?y.cloneElement(s,{ref:i}):null};Er.displayName="Presence";function bD(e){const[t,r]=y.useState(),n=y.useRef({}),s=y.useRef(e),i=y.useRef("none"),o=e?"mounted":"unmounted",[a,l]=_D(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=ru(n.current);i.current=a==="mounted"?u:"none"},[a]),sr(()=>{const u=n.current,f=s.current;if(f!==e){const m=i.current,v=ru(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),sr(()=>{if(t){const u=d=>{const v=ru(n.current).includes(d.animationName);d.target===t&&v&&Es.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=ru(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function ru(e){return(e==null?void 0:e.animationName)||"none"}function SD(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ph="rovingFocusGroup.onEntryFocus",kD={bubbles:!1,cancelable:!0},hf="RovingFocusGroup",[qp,ab,CD]=lf(hf),[ED,lb]=nn(hf,[CD]),[jD,TD]=ED(hf),cb=y.forwardRef((e,t)=>c.jsx(qp.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(qp.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(ND,{...e,ref:t})})}));cb.displayName=hf;var ND=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,m=y.useRef(null),v=Xe(t,m),w=cf(i),[g=null,x]=ui({prop:o,defaultProp:a,onChange:l}),[p,h]=y.useState(!1),_=Dt(u),C=ab(r),E=y.useRef(!1),[j,R]=y.useState(0);return y.useEffect(()=>{const A=m.current;if(A)return A.addEventListener(Ph,_),()=>A.removeEventListener(Ph,_)},[_]),c.jsx(jD,{scope:r,orientation:n,dir:w,loop:s,currentTabStopId:g,onItemFocus:y.useCallback(A=>x(A),[x]),onItemShiftTab:y.useCallback(()=>h(!0),[]),onFocusableItemAdd:y.useCallback(()=>R(A=>A+1),[]),onFocusableItemRemove:y.useCallback(()=>R(A=>A-1),[]),children:c.jsx(Ve.div,{tabIndex:p||j===0?-1:0,"data-orientation":n,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{E.current=!0}),onFocus:de(e.onFocus,A=>{const P=!E.current;if(A.target===A.currentTarget&&P&&!p){const L=new CustomEvent(Ph,kD);if(A.currentTarget.dispatchEvent(L),!L.defaultPrevented){const q=C().filter(te=>te.focusable),T=q.find(te=>te.active),F=q.find(te=>te.id===g),$=[T,F,...q].filter(Boolean).map(te=>te.ref.current);fb($,f)}}E.current=!1}),onBlur:de(e.onBlur,()=>h(!1))})})}),ub="RovingFocusGroupItem",db=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=e,a=Un(),l=i||a,u=TD(ub,r),f=u.currentTabStopId===l,d=ab(r),{onFocusableItemAdd:m,onFocusableItemRemove:v}=u;return y.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),c.jsx(qp.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:c.jsx(Ve.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:de(e.onMouseDown,w=>{n?u.onItemFocus(l):w.preventDefault()}),onFocus:de(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:de(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){u.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const g=AD(w,u.orientation,u.dir);if(g!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let p=d().filter(h=>h.focusable).map(h=>h.ref.current);if(g==="last")p.reverse();else if(g==="prev"||g==="next"){g==="prev"&&p.reverse();const h=p.indexOf(w.currentTarget);p=u.loop?DD(p,h+1):p.slice(h+1)}setTimeout(()=>fb(p))}})})})});db.displayName=ub;var RD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function PD(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function AD(e,t,r){const n=PD(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return RD[n]}function fb(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function DD(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var OD=cb,MD=db,ID=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vo=new WeakMap,nu=new WeakMap,su={},Ah=0,hb=function(e){return e&&(e.host||hb(e.parentNode))},LD=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=hb(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},FD=function(e,t,r,n){var s=LD(t,Array.isArray(e)?e:[e]);su[r]||(su[r]=new WeakMap);var i=su[r],o=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};s.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(a.has(m))f(m);else try{var v=m.getAttribute(n),w=v!==null&&v!=="false",g=(vo.get(m)||0)+1,x=(i.get(m)||0)+1;vo.set(m,g),i.set(m,x),o.push(m),g===1&&w&&nu.set(m,!0),x===1&&m.setAttribute(r,"true"),w||m.setAttribute(n,"true")}catch(p){console.error("aria-hidden: cannot operate on ",m,p)}})};return f(t),a.clear(),Ah++,function(){o.forEach(function(d){var m=vo.get(d)-1,v=i.get(d)-1;vo.set(d,m),i.set(d,v),m||(nu.has(d)||d.removeAttribute(n),nu.delete(d)),v||d.removeAttribute(r)}),Ah--,Ah||(vo=new WeakMap,vo=new WeakMap,nu=new WeakMap,su={})}},Bg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=ID(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),FD(n,s,r,"aria-hidden")):function(){return null}},Dn=function(){return Dn=Object.assign||function(t){for(var r,n=1,s=arguments.length;n"u")return tO;var t=rO(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},sO=vb(),Ko="data-scroll-locked",iO=function(e,t,r,n){var s=e.left,i=e.top,o=e.right,a=e.gap;return r===void 0&&(r="margin"),` - .`.concat(UD,` { + */const jg=wt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function TP(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function of(...e){return t=>e.forEach(r=>TP(r,t))}function Xe(...e){return y.useCallback(of(...e),e)}var ws=y.forwardRef((e,t)=>{const{children:r,...n}=e,s=y.Children.toArray(r),i=s.find(NP);if(i){const o=i.props.children,a=s.map(l=>l===i?y.Children.count(o)>1?y.Children.only(null):y.isValidElement(o)?o.props.children:null:l);return c.jsx(Wp,{...n,ref:t,children:y.isValidElement(o)?y.cloneElement(o,void 0,a):null})}return c.jsx(Wp,{...n,ref:t,children:r})});ws.displayName="Slot";var Wp=y.forwardRef((e,t)=>{const{children:r,...n}=e;if(y.isValidElement(r)){const s=PP(r);return y.cloneElement(r,{...RP(n,r.props),ref:t?of(t,s):s})}return y.Children.count(r)>1?y.Children.only(null):null});Wp.displayName="SlotClone";var Tg=({children:e})=>c.jsx(c.Fragment,{children:e});function NP(e){return y.isValidElement(e)&&e.type===Tg}function RP(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function PP(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function O1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,e0=AP,dc=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return e0(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const f=r==null?void 0:r[u],d=i==null?void 0:i[u];if(f===null)return null;const m=Jx(f)||Jx(d);return s[u][m]}),a=r&&Object.entries(r).reduce((u,f)=>{let[d,m]=f;return m===void 0||(u[d]=m),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:m,...v}=f;return Object.entries(v).every(w=>{let[g,x]=w;return Array.isArray(x)?x.includes({...i,...a}[g]):{...i,...a}[g]===x})?[...u,d,m]:u},[]);return e0(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function M1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;ta(i)))==null?void 0:o.classGroupId}const t0=/^\[(.+)\]$/;function MP(e){if(t0.test(e)){const t=t0.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function IP(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return FP(Object.entries(e.classGroups),r).forEach(([i,o])=>{Hp(o,n,i,t)}),n}function Hp(e,t,r,n){e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:r0(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(LP(s)){Hp(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{Hp(o,r0(t,i),r,n)})})}function r0(e,t){let r=e;return t.split(Ng).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function LP(e){return e.isThemeGetter}function FP(e,t){return t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e}function zP(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function s(i,o){r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)}return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}}const L1="!";function UP(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length;function o(a){const l=[];let u=0,f=0,d;for(let x=0;xf?d-f:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:g}}return r?function(l){return r({className:l,parseClassName:o})}:o}function VP(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function $P(e){return{cache:zP(e.cacheSize),parseClassName:UP(e),...OP(e)}}const BP=/\s+/;function WP(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=new Set;return e.trim().split(BP).map(o=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:f}=r(o);let d=!!f,m=n(d?u.substring(0,f):u);if(!m){if(!d)return{isTailwindClass:!1,originalClassName:o};if(m=n(u),!m)return{isTailwindClass:!1,originalClassName:o};d=!1}const v=VP(a).join(":");return{isTailwindClass:!0,modifierId:l?v+L1:v,classGroupId:m,originalClassName:o,hasPostfixModifier:d}}).reverse().filter(o=>{if(!o.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=o,f=a+l;return i.has(f)?!1:(i.add(f),s(l,u).forEach(d=>i.add(a+d)),!0)}).reverse().map(o=>o.originalClassName).join(" ")}function HP(){let e=0,t,r,n="";for(;ed(f),e());return r=$P(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const f=WP(l,r);return s(l,f),f}return function(){return i(HP.apply(null,arguments))}}function _t(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const z1=/^\[(?:([a-z-]+):)?(.+)\]$/i,ZP=/^\d+\/\d+$/,KP=new Set(["px","full","screen"]),GP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qP=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,XP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,QP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,JP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function es(e){return Fi(e)||KP.has(e)||ZP.test(e)}function Ls(e){return _a(e,"length",aA)}function Fi(e){return!!e&&!Number.isNaN(Number(e))}function tu(e){return _a(e,"number",Fi)}function $a(e){return!!e&&Number.isInteger(Number(e))}function eA(e){return e.endsWith("%")&&Fi(e.slice(0,-1))}function Ze(e){return z1.test(e)}function Fs(e){return GP.test(e)}const tA=new Set(["length","size","percentage"]);function rA(e){return _a(e,tA,U1)}function nA(e){return _a(e,"position",U1)}const sA=new Set(["image","url"]);function iA(e){return _a(e,sA,cA)}function oA(e){return _a(e,"",lA)}function Ba(){return!0}function _a(e,t,r){const n=z1.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function aA(e){return qP.test(e)&&!XP.test(e)}function U1(){return!1}function lA(e){return QP.test(e)}function cA(e){return JP.test(e)}function uA(){const e=_t("colors"),t=_t("spacing"),r=_t("blur"),n=_t("brightness"),s=_t("borderColor"),i=_t("borderRadius"),o=_t("borderSpacing"),a=_t("borderWidth"),l=_t("contrast"),u=_t("grayscale"),f=_t("hueRotate"),d=_t("invert"),m=_t("gap"),v=_t("gradientColorStops"),w=_t("gradientColorStopPositions"),g=_t("inset"),x=_t("margin"),p=_t("opacity"),h=_t("padding"),_=_t("saturate"),C=_t("scale"),E=_t("sepia"),j=_t("skew"),R=_t("space"),A=_t("translate"),P=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",Ze,t],T=()=>[Ze,t],F=()=>["",es,Ls],b=()=>["auto",Fi,Ze],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Ze],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Fi,tu],V=()=>[Fi,Ze];return{cacheSize:500,separator:":",theme:{colors:[Ba],spacing:[es,Ls],blur:["none","",Fs,Ze],brightness:z(),borderColor:[e],borderRadius:["none","","full",Fs,Ze],borderSpacing:T(),borderWidth:F(),contrast:z(),grayscale:I(),hueRotate:V(),invert:I(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[eA,Ls],inset:q(),margin:q(),opacity:z(),padding:T(),saturate:z(),scale:z(),sepia:I(),skew:V(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",Ze]}],container:["container"],columns:[{columns:[Fs]}],"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:[...$(),Ze]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$a,Ze]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ze]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",$a,Ze]}],"grid-cols":[{"grid-cols":[Ba]}],"col-start-end":[{col:["auto",{span:["full",$a,Ze]},Ze]}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":[Ba]}],"row-start-end":[{row:["auto",{span:[$a,Ze]},Ze]}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ze]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ze,t]}],"min-w":[{"min-w":[Ze,t,"min","max","fit"]}],"max-w":[{"max-w":[Ze,t,"none","full","min","max","fit","prose",{screen:[Fs]},Fs]}],h:[{h:[Ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fs,Ls]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tu]}],"font-family":[{font:[Ba]}],"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",Ze]}],"line-clamp":[{"line-clamp":["none",Fi,tu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",es,Ze]}],"list-image":[{"list-image":["none",Ze]}],"list-style-type":[{list:["none","disc","decimal",Ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",es,Ls]}],"underline-offset":[{"underline-offset":["auto",es,Ze]}],"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:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze]}],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",Ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),nA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},iA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[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":[p]}],"border-style":[{border:[...te(),"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":[p]}],"divide-style":[{divide:te()}],"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:["",...te()]}],"outline-offset":[{"outline-offset":[es,Ze]}],"outline-w":[{outline:[es,Ls]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[es,Ls]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fs,oA]}],"shadow-color":[{shadow:[Ba]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Fs,Ze]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ze]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Ze]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[$a,Ze]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ze]}],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",Ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",Ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[es,Ls,tu]}],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 dA=YP(uA);function le(...e){return dA(DP(e))}const af=dc("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"}}),Je=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?ws:"button";return c.jsx(o,{className:le(af({variant:t,size:r,className:e})),ref:i,...s})});Je.displayName="Button";function ce(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function fA(e,t){const r=y.createContext(t);function n(i){const{children:o,...a}=i,l=y.useMemo(()=>a,Object.values(a));return c.jsx(r.Provider,{value:l,children:o})}function s(i){const o=y.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,s]}function Vr(e,t=[]){let r=[];function n(i,o){const a=y.createContext(o),l=r.length;r=[...r,o];function u(d){const{scope:m,children:v,...w}=d,g=(m==null?void 0:m[e][l])||a,x=y.useMemo(()=>w,Object.values(w));return c.jsx(g.Provider,{value:x,children:v})}function f(d,m){const v=(m==null?void 0:m[e][l])||a,w=y.useContext(v);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const s=()=>{const i=r.map(o=>y.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,hA(s,...t)]}function hA(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Dt(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function _s({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=pA({defaultProp:t,onChange:r}),i=e!==void 0,o=i?e:n,a=Dt(r),l=y.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&a(d)}else s(u)},[i,e,s,a]);return[o,l]}function pA({defaultProp:e,onChange:t}){const r=y.useState(e),[n]=r,s=y.useRef(n),i=Dt(t);return y.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var mA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ie=mA.reduce((e,t)=>{const r=y.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?ws:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Rg(e,t){e&&js.flushSync(()=>e.dispatchEvent(t))}function lf(e){const t=e+"CollectionProvider",[r,n]=Vr(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:w,children:g}=v,x=tt.useRef(null),p=tt.useRef(new Map).current;return c.jsx(s,{scope:w,itemMap:p,collectionRef:x,children:g})};o.displayName=t;const a=e+"CollectionSlot",l=tt.forwardRef((v,w)=>{const{scope:g,children:x}=v,p=i(a,g),h=Xe(w,p.collectionRef);return c.jsx(ws,{ref:h,children:x})});l.displayName=a;const u=e+"CollectionItemSlot",f="data-radix-collection-item",d=tt.forwardRef((v,w)=>{const{scope:g,children:x,...p}=v,h=tt.useRef(null),_=Xe(w,h),C=i(u,g);return tt.useEffect(()=>(C.itemMap.set(h,{ref:h,...p}),()=>void C.itemMap.delete(h))),c.jsx(ws,{[f]:"",ref:_,children:x})});d.displayName=u;function m(v){const w=i(e+"CollectionConsumer",v);return tt.useCallback(()=>{const x=w.collectionRef.current;if(!x)return[];const p=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(w.itemMap.values()).sort((C,E)=>p.indexOf(C.ref.current)-p.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:l,ItemSlot:d},m,n]}var gA=y.createContext(void 0);function fc(e){const t=y.useContext(gA);return e||t||"ltr"}function vA(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e);y.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var yA="DismissableLayer",Yp="dismissableLayer.update",xA="dismissableLayer.pointerDownOutside",wA="dismissableLayer.focusOutside",n0,V1=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ba=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=y.useContext(V1),[f,d]=y.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=y.useState({}),w=Xe(t,R=>d(R)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(x),h=f?g.indexOf(f):-1,_=u.layersWithOutsidePointerEventsDisabled.size>0,C=h>=p,E=bA(R=>{const A=R.target,P=[...u.branches].some(L=>L.contains(A));!C||P||(s==null||s(R),o==null||o(R),R.defaultPrevented||a==null||a())},m),j=SA(R=>{const A=R.target;[...u.branches].some(L=>L.contains(A))||(i==null||i(R),o==null||o(R),R.defaultPrevented||a==null||a())},m);return vA(R=>{h===u.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),y.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(n0=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),s0(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=n0)}},[f,m,r,u]),y.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),s0())},[f,u]),y.useEffect(()=>{const R=()=>v({});return document.addEventListener(Yp,R),()=>document.removeEventListener(Yp,R)},[]),c.jsx(Ie.div,{...l,ref:w,style:{pointerEvents:_?C?"auto":"none":void 0,...e.style},onFocusCapture:ce(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ce(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ce(e.onPointerDownCapture,E.onPointerDownCapture)})});ba.displayName=yA;var _A="DismissableLayerBranch",$1=y.forwardRef((e,t)=>{const r=y.useContext(V1),n=y.useRef(null),s=Xe(t,n);return y.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),c.jsx(Ie.div,{...e,ref:s})});$1.displayName=_A;function bA(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){B1(xA,r,u,{discrete:!0})};const u={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);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function SA(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=y.useRef(!1);return y.useEffect(()=>{const s=i=>{i.target&&!n.current&&B1(wA,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function s0(){const e=new CustomEvent(Yp);document.dispatchEvent(e)}function B1(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Rg(s,i):s.dispatchEvent(i)}var kA=ba,CA=$1,Eh=0;function Pg(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??i0()),document.body.insertAdjacentElement("beforeend",e[1]??i0()),Eh++,()=>{Eh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Eh--}},[])}function i0(){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 jh="focusScope.autoFocusOnMount",Th="focusScope.autoFocusOnUnmount",o0={bubbles:!1,cancelable:!0},EA="FocusScope",cf=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=y.useState(null),u=Dt(s),f=Dt(i),d=y.useRef(null),m=Xe(t,g=>l(g)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let g=function(_){if(v.paused||!a)return;const C=_.target;a.contains(C)?d.current=C:Us(d.current,{select:!0})},x=function(_){if(v.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||Us(d.current,{select:!0}))},p=function(_){if(document.activeElement===document.body)for(const E of _)E.removedNodes.length>0&&Us(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const h=new MutationObserver(p);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),h.disconnect()}}},[n,a,v.paused]),y.useEffect(()=>{if(a){l0.add(v);const g=document.activeElement;if(!a.contains(g)){const p=new CustomEvent(jh,o0);a.addEventListener(jh,u),a.dispatchEvent(p),p.defaultPrevented||(jA(AA(W1(a)),{select:!0}),document.activeElement===g&&Us(a))}return()=>{a.removeEventListener(jh,u),setTimeout(()=>{const p=new CustomEvent(Th,o0);a.addEventListener(Th,f),a.dispatchEvent(p),p.defaultPrevented||Us(g??document.body,{select:!0}),a.removeEventListener(Th,f),l0.remove(v)},0)}}},[a,u,f,v]);const w=y.useCallback(g=>{if(!r&&!n||v.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,p=document.activeElement;if(x&&p){const h=g.currentTarget,[_,C]=TA(h);_&&C?!g.shiftKey&&p===C?(g.preventDefault(),r&&Us(_,{select:!0})):g.shiftKey&&p===_&&(g.preventDefault(),r&&Us(C,{select:!0})):p===h&&g.preventDefault()}},[r,n,v.paused]);return c.jsx(Ie.div,{tabIndex:-1,...o,ref:m,onKeyDown:w})});cf.displayName=EA;function jA(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Us(n,{select:t}),document.activeElement!==r)return}function TA(e){const t=W1(e),r=a0(t,e),n=a0(t.reverse(),e);return[r,n]}function W1(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function a0(e,t){for(const r of e)if(!NA(r,{upTo:t}))return r}function NA(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 RA(e){return e instanceof HTMLInputElement&&"select"in e}function Us(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&RA(e)&&t&&e.select()}}var l0=PA();function PA(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=c0(e,t),e.unshift(t)},remove(t){var r;e=c0(e,t),(r=e[0])==null||r.resume()}}}function c0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function AA(e){return e.filter(t=>t.tagName!=="A")}var nr=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},DA=cw.useId||(()=>{}),OA=0;function xn(e){const[t,r]=y.useState(DA());return nr(()=>{r(n=>n??String(OA++))},[e]),t?`radix-${t}`:""}const MA=["top","right","bottom","left"],Ln=Math.min,Ar=Math.max,dd=Math.round,ru=Math.floor,di=e=>({x:e,y:e}),IA={left:"right",right:"left",bottom:"top",top:"bottom"},LA={start:"end",end:"start"};function Zp(e,t,r){return Ar(e,Ln(t,r))}function bs(e,t){return typeof e=="function"?e(t):e}function Ss(e){return e.split("-")[0]}function Sa(e){return e.split("-")[1]}function Ag(e){return e==="x"?"y":"x"}function Dg(e){return e==="y"?"height":"width"}function fi(e){return["top","bottom"].includes(Ss(e))?"y":"x"}function Og(e){return Ag(fi(e))}function FA(e,t,r){r===void 0&&(r=!1);const n=Sa(e),s=Og(e),i=Dg(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=fd(o)),[o,fd(o)]}function zA(e){const t=fd(e);return[Kp(e),t,Kp(t)]}function Kp(e){return e.replace(/start|end/g,t=>LA[t])}function UA(e,t,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?i:o;default:return[]}}function VA(e,t,r,n){const s=Sa(e);let i=UA(Ss(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Kp)))),i}function fd(e){return e.replace(/left|right|bottom|top/g,t=>IA[t])}function $A(e){return{top:0,right:0,bottom:0,left:0,...e}}function H1(e){return typeof e!="number"?$A(e):{top:e,right:e,bottom:e,left:e}}function hd(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function u0(e,t,r){let{reference:n,floating:s}=e;const i=fi(t),o=Og(t),a=Dg(o),l=Ss(t),u=i==="y",f=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,m=n[a]/2-s[a]/2;let v;switch(l){case"top":v={x:f,y:n.y-s.height};break;case"bottom":v={x:f,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:d};break;case"left":v={x:n.x-s.width,y:d};break;default:v={x:n.x,y:n.y}}switch(Sa(t)){case"start":v[o]-=m*(r&&u?-1:1);break;case"end":v[o]+=m*(r&&u?-1:1);break}return v}const BA=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:d}=u0(u,n,l),m=n,v={},w=0;for(let g=0;g({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=bs(e,t)||{};if(u==null)return{};const d=H1(f),m={x:r,y:n},v=Og(s),w=Dg(v),g=await o.getDimensions(u),x=v==="y",p=x?"top":"left",h=x?"bottom":"right",_=x?"clientHeight":"clientWidth",C=i.reference[w]+i.reference[v]-m[v]-i.floating[w],E=m[v]-i.reference[v],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let R=j?j[_]:0;(!R||!await(o.isElement==null?void 0:o.isElement(j)))&&(R=a.floating[_]||i.floating[w]);const A=C/2-E/2,P=R/2-g[w]/2-1,L=Ln(d[p],P),q=Ln(d[h],P),T=L,F=R-g[w]-q,b=R/2-g[w]/2+A,$=Zp(T,b,F),te=!l.arrow&&Sa(s)!=null&&b!==$&&i.reference[w]/2-(bb<=0)){var q,T;const b=(((q=i.flip)==null?void 0:q.index)||0)+1,$=R[b];if($)return{data:{index:b,overflows:L},reset:{placement:$}};let te=(T=L.filter(B=>B.overflows[0]<=0).sort((B,Z)=>B.overflows[1]-Z.overflows[1])[0])==null?void 0:T.placement;if(!te)switch(v){case"bestFit":{var F;const B=(F=L.filter(Z=>{if(j){const I=fi(Z.placement);return I===h||I==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(I=>I>0).reduce((I,Q)=>I+Q,0)]).sort((Z,I)=>Z[1]-I[1])[0])==null?void 0:F[0];B&&(te=B);break}case"initialPlacement":te=a;break}if(s!==te)return{reset:{placement:te}}}return{}}}};function d0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function f0(e){return MA.some(t=>e[t]>=0)}const YA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=bs(e,t);switch(n){case"referenceHidden":{const i=await Fl(t,{...s,elementContext:"reference"}),o=d0(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:f0(o)}}}case"escaped":{const i=await Fl(t,{...s,altBoundary:!0}),o=d0(i,r.floating);return{data:{escapedOffsets:o,escaped:f0(o)}}}default:return{}}}}};async function ZA(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ss(r),a=Sa(r),l=fi(r)==="y",u=["left","top"].includes(o)?-1:1,f=i&&l?-1:1,d=bs(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof w=="number"&&(v=a==="end"?w*-1:w),l?{x:v*f,y:m*u}:{x:m*u,y:v*f}}const KA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await ZA(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},GA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:p,y:h}=x;return{x:p,y:h}}},...l}=bs(e,t),u={x:r,y:n},f=await Fl(t,l),d=fi(Ss(s)),m=Ag(d);let v=u[m],w=u[d];if(i){const x=m==="y"?"top":"left",p=m==="y"?"bottom":"right",h=v+f[x],_=v-f[p];v=Zp(h,v,_)}if(o){const x=d==="y"?"top":"left",p=d==="y"?"bottom":"right",h=w+f[x],_=w-f[p];w=Zp(h,w,_)}const g=a.fn({...t,[m]:v,[d]:w});return{...g,data:{x:g.x-r,y:g.y-n}}}}},qA=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=bs(e,t),f={x:r,y:n},d=fi(s),m=Ag(d);let v=f[m],w=f[d];const g=bs(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const _=m==="y"?"height":"width",C=i.reference[m]-i.floating[_]+x.mainAxis,E=i.reference[m]+i.reference[_]-x.mainAxis;vE&&(v=E)}if(u){var p,h;const _=m==="y"?"width":"height",C=["top","left"].includes(Ss(s)),E=i.reference[d]-i.floating[_]+(C&&((p=o.offset)==null?void 0:p[d])||0)+(C?0:x.crossAxis),j=i.reference[d]+i.reference[_]+(C?0:((h=o.offset)==null?void 0:h[d])||0)-(C?x.crossAxis:0);wj&&(w=j)}return{[m]:v,[d]:w}}}},XA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:s,elements:i}=t,{apply:o=()=>{},...a}=bs(e,t),l=await Fl(t,a),u=Ss(r),f=Sa(r),d=fi(r)==="y",{width:m,height:v}=n.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(g=u,w=f==="end"?"top":"bottom");const x=v-l.top-l.bottom,p=m-l.left-l.right,h=Ln(v-l[w],x),_=Ln(m-l[g],p),C=!t.middlewareData.shift;let E=h,j=_;if(d?j=f||C?Ln(_,p):p:E=f||C?Ln(h,x):x,C&&!f){const A=Ar(l.left,0),P=Ar(l.right,0),L=Ar(l.top,0),q=Ar(l.bottom,0);d?j=m-2*(A!==0||P!==0?A+P:Ar(l.left,l.right)):E=v-2*(L!==0||q!==0?L+q:Ar(l.top,l.bottom))}await o({...t,availableWidth:j,availableHeight:E});const R=await s.getDimensions(i.floating);return m!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function ka(e){return Y1(e)?(e.nodeName||"").toLowerCase():"#document"}function Mr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rs(e){var t;return(t=(Y1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Y1(e){return e instanceof Node||e instanceof Mr(e).Node}function bn(e){return e instanceof Element||e instanceof Mr(e).Element}function $n(e){return e instanceof HTMLElement||e instanceof Mr(e).HTMLElement}function h0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mr(e).ShadowRoot}function hc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function QA(e){return["table","td","th"].includes(ka(e))}function uf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Mg(e){const t=Ig(),r=bn(e)?Sn(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function JA(e){let t=hi(e);for(;$n(t)&&!ca(t);){if(Mg(t))return t;if(uf(t))return null;t=hi(t)}return null}function Ig(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ca(e){return["html","body","#document"].includes(ka(e))}function Sn(e){return Mr(e).getComputedStyle(e)}function df(e){return bn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(ka(e)==="html")return e;const t=e.assignedSlot||e.parentNode||h0(e)&&e.host||Rs(e);return h0(t)?t.host:t}function Z1(e){const t=hi(e);return ca(t)?e.ownerDocument?e.ownerDocument.body:e.body:$n(t)&&hc(t)?t:Z1(t)}function zl(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Z1(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=Mr(s);return i?t.concat(o,o.visualViewport||[],hc(s)?s:[],o.frameElement&&r?zl(o.frameElement):[]):t.concat(s,zl(s,[],r))}function K1(e){const t=Sn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=$n(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=dd(r)!==i||dd(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Lg(e){return bn(e)?e:e.contextElement}function Zo(e){const t=Lg(e);if(!$n(t))return di(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=K1(t);let o=(i?dd(r.width):r.width)/n,a=(i?dd(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const eD=di(0);function G1(e){const t=Mr(e);return!Ig()||!t.visualViewport?eD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Mr(e)?!1:t}function Qi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Lg(e);let o=di(1);t&&(n?bn(n)&&(o=Zo(n)):o=Zo(e));const a=tD(i,r,n)?G1(i):di(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,f=s.width/o.x,d=s.height/o.y;if(i){const m=Mr(i),v=n&&bn(n)?Mr(n):n;let w=m,g=w.frameElement;for(;g&&n&&v!==w;){const x=Zo(g),p=g.getBoundingClientRect(),h=Sn(g),_=p.left+(g.clientLeft+parseFloat(h.paddingLeft))*x.x,C=p.top+(g.clientTop+parseFloat(h.paddingTop))*x.y;l*=x.x,u*=x.y,f*=x.x,d*=x.y,l+=_,u+=C,w=Mr(g),g=w.frameElement}}return hd({width:f,height:d,x:l,y:u})}function rD(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Rs(n),a=t?uf(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=di(1);const f=di(0),d=$n(n);if((d||!d&&!i)&&((ka(n)!=="body"||hc(o))&&(l=df(n)),$n(n))){const m=Qi(n);u=Zo(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+f.x,y:r.y*u.y-l.scrollTop*u.y+f.y}}function nD(e){return Array.from(e.getClientRects())}function q1(e){return Qi(Rs(e)).left+df(e).scrollLeft}function sD(e){const t=Rs(e),r=df(e),n=e.ownerDocument.body,s=Ar(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ar(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+q1(e);const a=-r.scrollTop;return Sn(n).direction==="rtl"&&(o+=Ar(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function iD(e,t){const r=Mr(e),n=Rs(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Ig();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function oD(e,t){const r=Qi(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=$n(e)?Zo(e):di(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function p0(e,t,r){let n;if(t==="viewport")n=iD(e,r);else if(t==="document")n=sD(Rs(e));else if(bn(t))n=oD(t,r);else{const s=G1(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return hd(n)}function X1(e,t){const r=hi(e);return r===t||!bn(r)||ca(r)?!1:Sn(r).position==="fixed"||X1(r,t)}function aD(e,t){const r=t.get(e);if(r)return r;let n=zl(e,[],!1).filter(a=>bn(a)&&ka(a)!=="body"),s=null;const i=Sn(e).position==="fixed";let o=i?hi(e):e;for(;bn(o)&&!ca(o);){const a=Sn(o),l=Mg(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||hc(o)&&!l&&X1(e,o))?n=n.filter(f=>f!==o):s=a,o=hi(o)}return t.set(e,n),n}function lD(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?uf(t)?[]:aD(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,f)=>{const d=p0(t,f,s);return u.top=Ar(d.top,u.top),u.right=Ln(d.right,u.right),u.bottom=Ln(d.bottom,u.bottom),u.left=Ar(d.left,u.left),u},p0(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function cD(e){const{width:t,height:r}=K1(e);return{width:t,height:r}}function uD(e,t,r){const n=$n(t),s=Rs(t),i=r==="fixed",o=Qi(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=di(0);if(n||!n&&!i)if((ka(t)!=="body"||hc(s))&&(a=df(t)),n){const d=Qi(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&(l.x=q1(s));const u=o.left+a.scrollLeft-l.x,f=o.top+a.scrollTop-l.y;return{x:u,y:f,width:o.width,height:o.height}}function Nh(e){return Sn(e).position==="static"}function m0(e,t){return!$n(e)||Sn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Q1(e,t){const r=Mr(e);if(uf(e))return r;if(!$n(e)){let s=hi(e);for(;s&&!ca(s);){if(bn(s)&&!Nh(s))return s;s=hi(s)}return r}let n=m0(e,t);for(;n&&QA(n)&&Nh(n);)n=m0(n,t);return n&&ca(n)&&Nh(n)&&!Mg(n)?r:n||JA(e)||r}const dD=async function(e){const t=this.getOffsetParent||Q1,r=this.getDimensions,n=await r(e.floating);return{reference:uD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fD(e){return Sn(e).direction==="rtl"}const hD={convertOffsetParentRelativeRectToViewportRelativeRect:rD,getDocumentElement:Rs,getClippingRect:lD,getOffsetParent:Q1,getElementRects:dD,getClientRects:nD,getDimensions:cD,getScale:Zo,isElement:bn,isRTL:fD};function pD(e,t){let r=null,n;const s=Rs(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:f,width:d,height:m}=e.getBoundingClientRect();if(a||t(),!d||!m)return;const v=ru(f),w=ru(s.clientWidth-(u+d)),g=ru(s.clientHeight-(f+m)),x=ru(u),h={rootMargin:-v+"px "+-w+"px "+-g+"px "+-x+"px",threshold:Ar(0,Ln(1,l))||1};let _=!0;function C(E){const j=E[0].intersectionRatio;if(j!==l){if(!_)return o();j?o(!1,j):n=setTimeout(()=>{o(!1,1e-7)},1e3)}_=!1}try{r=new IntersectionObserver(C,{...h,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,h)}r.observe(e)}return o(!0),i}function mD(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Lg(e),f=s||i?[...u?zl(u):[],...zl(t)]:[];f.forEach(p=>{s&&p.addEventListener("scroll",r,{passive:!0}),i&&p.addEventListener("resize",r)});const d=u&&a?pD(u,r):null;let m=-1,v=null;o&&(v=new ResizeObserver(p=>{let[h]=p;h&&h.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),r()}),u&&!l&&v.observe(u),v.observe(t));let w,g=l?Qi(e):null;l&&x();function x(){const p=Qi(e);g&&(p.x!==g.x||p.y!==g.y||p.width!==g.width||p.height!==g.height)&&r(),g=p,w=requestAnimationFrame(x)}return r(),()=>{var p;f.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),d==null||d(),(p=v)==null||p.disconnect(),v=null,l&&cancelAnimationFrame(w)}}const gD=KA,vD=GA,yD=HA,xD=XA,wD=YA,g0=WA,_D=qA,bD=(e,t,r)=>{const n=new Map,s={platform:hD,...r},i={...s.platform,_c:n};return BA(e,t,{...s,platform:i})};var Nu=typeof document<"u"?y.useLayoutEffect:y.useEffect;function pd(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 r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!pd(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!pd(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function J1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function v0(e,t){const r=J1(e);return Math.round(t*r)/r}function y0(e){const t=y.useRef(e);return Nu(()=>{t.current=e}),t}function SD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,d]=y.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=y.useState(n);pd(m,n)||v(n);const[w,g]=y.useState(null),[x,p]=y.useState(null),h=y.useCallback(B=>{B!==j.current&&(j.current=B,g(B))},[]),_=y.useCallback(B=>{B!==R.current&&(R.current=B,p(B))},[]),C=i||w,E=o||x,j=y.useRef(null),R=y.useRef(null),A=y.useRef(f),P=l!=null,L=y0(l),q=y0(s),T=y.useCallback(()=>{if(!j.current||!R.current)return;const B={placement:t,strategy:r,middleware:m};q.current&&(B.platform=q.current),bD(j.current,R.current,B).then(Z=>{const I={...Z,isPositioned:!0};F.current&&!pd(A.current,I)&&(A.current=I,js.flushSync(()=>{d(I)}))})},[m,t,r,q]);Nu(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);const F=y.useRef(!1);Nu(()=>(F.current=!0,()=>{F.current=!1}),[]),Nu(()=>{if(C&&(j.current=C),E&&(R.current=E),C&&E){if(L.current)return L.current(C,E,T);T()}},[C,E,T,L,P]);const b=y.useMemo(()=>({reference:j,floating:R,setReference:h,setFloating:_}),[h,_]),$=y.useMemo(()=>({reference:C,floating:E}),[C,E]),te=y.useMemo(()=>{const B={position:r,left:0,top:0};if(!$.floating)return B;const Z=v0($.floating,f.x),I=v0($.floating,f.y);return a?{...B,transform:"translate("+Z+"px, "+I+"px)",...J1($.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:I}},[r,a,$.floating,f.x,f.y]);return y.useMemo(()=>({...f,update:T,refs:b,elements:$,floatingStyles:te}),[f,T,b,$,te])}const kD=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?g0({element:n.current,padding:s}).fn(r):{}:n?g0({element:n,padding:s}).fn(r):{}}}},CD=(e,t)=>({...gD(e),options:[e,t]}),ED=(e,t)=>({...vD(e),options:[e,t]}),jD=(e,t)=>({..._D(e),options:[e,t]}),TD=(e,t)=>({...yD(e),options:[e,t]}),ND=(e,t)=>({...xD(e),options:[e,t]}),RD=(e,t)=>({...wD(e),options:[e,t]}),PD=(e,t)=>({...kD(e),options:[e,t]});var AD="Arrow",eb=y.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return c.jsx(Ie.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});eb.displayName=AD;var DD=eb;function tb(e){const[t,r]=y.useState(void 0);return nr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Fg="Popper",[rb,Ca]=Vr(Fg),[OD,nb]=rb(Fg),sb=e=>{const{__scopePopper:t,children:r}=e,[n,s]=y.useState(null);return c.jsx(OD,{scope:t,anchor:n,onAnchorChange:s,children:r})};sb.displayName=Fg;var ib="PopperAnchor",ob=y.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=nb(ib,r),o=y.useRef(null),a=Xe(t,o);return y.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:c.jsx(Ie.div,{...s,ref:a})});ob.displayName=ib;var zg="PopperContent",[MD,ID]=rb(zg),ab=y.forwardRef((e,t)=>{var he,ye,ke,Le,De,Ne;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:w,...g}=e,x=nb(zg,r),[p,h]=y.useState(null),_=Xe(t,nt=>h(nt)),[C,E]=y.useState(null),j=tb(C),R=(j==null?void 0:j.width)??0,A=(j==null?void 0:j.height)??0,P=n+(i!=="center"?"-"+i:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(u)?u:[u],T=q.length>0,F={padding:L,boundary:q.filter(FD),altBoundary:T},{refs:b,floatingStyles:$,placement:te,isPositioned:B,middlewareData:Z}=SD({strategy:"fixed",placement:P,whileElementsMounted:(...nt)=>mD(...nt,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[CD({mainAxis:s+A,alignmentAxis:o}),l&&ED({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?jD():void 0,...F}),l&&TD({...F}),ND({...F,apply:({elements:nt,rects:k,availableWidth:J,availableHeight:K})=>{const{width:D,height:S}=k.reference,N=nt.floating.style;N.setProperty("--radix-popper-available-width",`${J}px`),N.setProperty("--radix-popper-available-height",`${K}px`),N.setProperty("--radix-popper-anchor-width",`${D}px`),N.setProperty("--radix-popper-anchor-height",`${S}px`)}}),C&&PD({element:C,padding:a}),zD({arrowWidth:R,arrowHeight:A}),m&&RD({strategy:"referenceHidden",...F})]}),[I,Q]=ub(te),z=Dt(w);nr(()=>{B&&(z==null||z())},[B,z]);const V=(he=Z.arrow)==null?void 0:he.x,fe=(ye=Z.arrow)==null?void 0:ye.y,ne=((ke=Z.arrow)==null?void 0:ke.centerOffset)!==0,[se,Ae]=y.useState();return nr(()=>{p&&Ae(window.getComputedStyle(p).zIndex)},[p]),c.jsx("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Le=Z.transformOrigin)==null?void 0:Le.x,(De=Z.transformOrigin)==null?void 0:De.y].join(" "),...((Ne=Z.hide)==null?void 0:Ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(MD,{scope:r,placedSide:I,onArrowChange:E,arrowX:V,arrowY:fe,shouldHideArrow:ne,children:c.jsx(Ie.div,{"data-side":I,"data-align":Q,...g,ref:_,style:{...g.style,animation:B?void 0:"none"}})})})});ab.displayName=zg;var lb="PopperArrow",LD={top:"bottom",right:"left",bottom:"top",left:"right"},cb=y.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=ID(lb,n),o=LD[i.placedSide];return c.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:c.jsx(DD,{...s,ref:r,style:{...s.style,display:"block"}})})});cb.displayName=lb;function FD(e){return e!==null}var zD=e=>({name:"transformOrigin",options:e,fn(t){var x,p,h;const{placement:r,rects:n,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,f]=ub(r),d={start:"0%",center:"50%",end:"100%"}[f],m=(((p=s.arrow)==null?void 0:p.x)??0)+a/2,v=(((h=s.arrow)==null?void 0:h.y)??0)+l/2;let w="",g="";return u==="bottom"?(w=o?d:`${m}px`,g=`${-l}px`):u==="top"?(w=o?d:`${m}px`,g=`${n.floating.height+l}px`):u==="right"?(w=`${-l}px`,g=o?d:`${v}px`):u==="left"&&(w=`${n.floating.width+l}px`,g=o?d:`${v}px`),{data:{x:w,y:g}}}});function ub(e){const[t,r="center"]=e.split("-");return[t,r]}var Ug=sb,Vg=ob,$g=ab,Bg=cb,UD="Portal",pc=y.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=y.useState(!1);nr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?f1.createPortal(c.jsx(Ie.div,{...n,ref:t}),o):null});pc.displayName=UD;function VD(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var yr=e=>{const{present:t,children:r}=e,n=$D(t),s=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),i=Xe(n.ref,BD(s));return typeof r=="function"||n.isPresent?y.cloneElement(s,{ref:i}):null};yr.displayName="Presence";function $D(e){const[t,r]=y.useState(),n=y.useRef({}),s=y.useRef(e),i=y.useRef("none"),o=e?"mounted":"unmounted",[a,l]=VD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=nu(n.current);i.current=a==="mounted"?u:"none"},[a]),nr(()=>{const u=n.current,f=s.current;if(f!==e){const m=i.current,v=nu(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),nr(()=>{if(t){const u=d=>{const v=nu(n.current).includes(d.animationName);d.target===t&&v&&js.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=nu(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function nu(e){return(e==null?void 0:e.animationName)||"none"}function BD(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Rh="rovingFocusGroup.onEntryFocus",WD={bubbles:!1,cancelable:!0},ff="RovingFocusGroup",[Gp,db,HD]=lf(ff),[YD,hf]=Vr(ff,[HD]),[ZD,KD]=YD(ff),fb=y.forwardRef((e,t)=>c.jsx(Gp.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Gp.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(GD,{...e,ref:t})})}));fb.displayName=ff;var GD=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,m=y.useRef(null),v=Xe(t,m),w=fc(i),[g=null,x]=_s({prop:o,defaultProp:a,onChange:l}),[p,h]=y.useState(!1),_=Dt(u),C=db(r),E=y.useRef(!1),[j,R]=y.useState(0);return y.useEffect(()=>{const A=m.current;if(A)return A.addEventListener(Rh,_),()=>A.removeEventListener(Rh,_)},[_]),c.jsx(ZD,{scope:r,orientation:n,dir:w,loop:s,currentTabStopId:g,onItemFocus:y.useCallback(A=>x(A),[x]),onItemShiftTab:y.useCallback(()=>h(!0),[]),onFocusableItemAdd:y.useCallback(()=>R(A=>A+1),[]),onFocusableItemRemove:y.useCallback(()=>R(A=>A-1),[]),children:c.jsx(Ie.div,{tabIndex:p||j===0?-1:0,"data-orientation":n,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:ce(e.onMouseDown,()=>{E.current=!0}),onFocus:ce(e.onFocus,A=>{const P=!E.current;if(A.target===A.currentTarget&&P&&!p){const L=new CustomEvent(Rh,WD);if(A.currentTarget.dispatchEvent(L),!L.defaultPrevented){const q=C().filter(te=>te.focusable),T=q.find(te=>te.active),F=q.find(te=>te.id===g),$=[T,F,...q].filter(Boolean).map(te=>te.ref.current);mb($,f)}}E.current=!1}),onBlur:ce(e.onBlur,()=>h(!1))})})}),hb="RovingFocusGroupItem",pb=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=e,a=xn(),l=i||a,u=KD(hb,r),f=u.currentTabStopId===l,d=db(r),{onFocusableItemAdd:m,onFocusableItemRemove:v}=u;return y.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),c.jsx(Gp.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:c.jsx(Ie.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:ce(e.onMouseDown,w=>{n?u.onItemFocus(l):w.preventDefault()}),onFocus:ce(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ce(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){u.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const g=QD(w,u.orientation,u.dir);if(g!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let p=d().filter(h=>h.focusable).map(h=>h.ref.current);if(g==="last")p.reverse();else if(g==="prev"||g==="next"){g==="prev"&&p.reverse();const h=p.indexOf(w.currentTarget);p=u.loop?JD(p,h+1):p.slice(h+1)}setTimeout(()=>mb(p))}})})})});pb.displayName=hb;var qD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function XD(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function QD(e,t,r){const n=XD(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return qD[n]}function mb(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function JD(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var gb=fb,vb=pb,eO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vo=new WeakMap,su=new WeakMap,iu={},Ph=0,yb=function(e){return e&&(e.host||yb(e.parentNode))},tO=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=yb(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},rO=function(e,t,r,n){var s=tO(t,Array.isArray(e)?e:[e]);iu[r]||(iu[r]=new WeakMap);var i=iu[r],o=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};s.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(a.has(m))f(m);else try{var v=m.getAttribute(n),w=v!==null&&v!=="false",g=(vo.get(m)||0)+1,x=(i.get(m)||0)+1;vo.set(m,g),i.set(m,x),o.push(m),g===1&&w&&su.set(m,!0),x===1&&m.setAttribute(r,"true"),w||m.setAttribute(n,"true")}catch(p){console.error("aria-hidden: cannot operate on ",m,p)}})};return f(t),a.clear(),Ph++,function(){o.forEach(function(d){var m=vo.get(d)-1,v=i.get(d)-1;vo.set(d,m),i.set(d,v),m||(su.has(d)||d.removeAttribute(n),su.delete(d)),v||d.removeAttribute(r)}),Ph--,Ph||(vo=new WeakMap,vo=new WeakMap,su=new WeakMap,iu={})}},Wg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=eO(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),rO(n,s,r,"aria-hidden")):function(){return null}},On=function(){return On=Object.assign||function(t){for(var r,n=1,s=arguments.length;n"u")return xO;var t=wO(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},bO=bb(),Ko="data-scroll-locked",SO=function(e,t,r,n){var s=e.left,i=e.top,o=e.right,a=e.gap;return r===void 0&&(r="margin"),` + .`.concat(sO,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -234,48 +234,48 @@ Error generating stack: `+i.message+` `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` } - .`).concat(Nu,` { + .`).concat(Ru,` { right: `).concat(a,"px ").concat(n,`; } - .`).concat(Ru,` { + .`).concat(Pu,` { margin-right: `).concat(a,"px ").concat(n,`; } - .`).concat(Nu," .").concat(Nu,` { + .`).concat(Ru," .").concat(Ru,` { right: 0 `).concat(n,`; } - .`).concat(Ru," .").concat(Ru,` { + .`).concat(Pu," .").concat(Pu,` { margin-right: 0 `).concat(n,`; } body[`).concat(Ko,`] { - `).concat(VD,": ").concat(a,`px; + `).concat(iO,": ").concat(a,`px; } -`)},g0=function(){var e=parseInt(document.body.getAttribute(Ko)||"0",10);return isFinite(e)?e:0},oO=function(){y.useEffect(function(){return document.body.setAttribute(Ko,(g0()+1).toString()),function(){var e=g0()-1;e<=0?document.body.removeAttribute(Ko):document.body.setAttribute(Ko,e.toString())}},[])},aO=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;oO();var i=y.useMemo(function(){return nO(s)},[s]);return y.createElement(sO,{styles:iO(i,!t,s,r?"":"!important")})},Xp=!1;if(typeof window<"u")try{var iu=Object.defineProperty({},"passive",{get:function(){return Xp=!0,!0}});window.addEventListener("test",iu,iu),window.removeEventListener("test",iu,iu)}catch{Xp=!1}var yo=Xp?{passive:!1}:!1,lO=function(e){return e.tagName==="TEXTAREA"},yb=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!lO(e)&&r[t]==="visible")},cO=function(e){return yb(e,"overflowY")},uO=function(e){return yb(e,"overflowX")},v0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=xb(e,n);if(s){var i=wb(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},dO=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},fO=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},xb=function(e,t){return e==="v"?cO(t):uO(t)},wb=function(e,t){return e==="v"?dO(t):fO(t)},hO=function(e,t){return e==="h"&&t==="rtl"?-1:1},pO=function(e,t,r,n,s){var i=hO(e,window.getComputedStyle(t).direction),o=i*n,a=r.target,l=t.contains(a),u=!1,f=o>0,d=0,m=0;do{var v=wb(e,a),w=v[0],g=v[1],x=v[2],p=g-x-i*w;(w||p)&&xb(e,a)&&(d+=p,m+=w),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&(Math.abs(d)<1||!s)||!f&&(Math.abs(m)<1||!s))&&(u=!0),u},ou=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},y0=function(e){return[e.deltaX,e.deltaY]},x0=function(e){return e&&"current"in e?e.current:e},mO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gO=function(e){return` +`)},w0=function(){var e=parseInt(document.body.getAttribute(Ko)||"0",10);return isFinite(e)?e:0},kO=function(){y.useEffect(function(){return document.body.setAttribute(Ko,(w0()+1).toString()),function(){var e=w0()-1;e<=0?document.body.removeAttribute(Ko):document.body.setAttribute(Ko,e.toString())}},[])},CO=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;kO();var i=y.useMemo(function(){return _O(s)},[s]);return y.createElement(bO,{styles:SO(i,!t,s,r?"":"!important")})},qp=!1;if(typeof window<"u")try{var ou=Object.defineProperty({},"passive",{get:function(){return qp=!0,!0}});window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch{qp=!1}var yo=qp?{passive:!1}:!1,EO=function(e){return e.tagName==="TEXTAREA"},Sb=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!EO(e)&&r[t]==="visible")},jO=function(e){return Sb(e,"overflowY")},TO=function(e){return Sb(e,"overflowX")},_0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=kb(e,n);if(s){var i=Cb(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},NO=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},RO=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},kb=function(e,t){return e==="v"?jO(t):TO(t)},Cb=function(e,t){return e==="v"?NO(t):RO(t)},PO=function(e,t){return e==="h"&&t==="rtl"?-1:1},AO=function(e,t,r,n,s){var i=PO(e,window.getComputedStyle(t).direction),o=i*n,a=r.target,l=t.contains(a),u=!1,f=o>0,d=0,m=0;do{var v=Cb(e,a),w=v[0],g=v[1],x=v[2],p=g-x-i*w;(w||p)&&kb(e,a)&&(d+=p,m+=w),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&(Math.abs(d)<1||!s)||!f&&(Math.abs(m)<1||!s))&&(u=!0),u},au=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},b0=function(e){return[e.deltaX,e.deltaY]},S0=function(e){return e&&"current"in e?e.current:e},DO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},OO=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},vO=0,xo=[];function yO(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),s=y.useState(vO++)[0],i=y.useState(vb)[0],o=y.useRef(e);y.useEffect(function(){o.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=zD([e.lockRef.current],(e.shards||[]).map(x0),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(g,x){if("touches"in g&&g.touches.length===2)return!o.current.allowPinchZoom;var p=ou(g),h=r.current,_="deltaX"in g?g.deltaX:h[0]-p[0],C="deltaY"in g?g.deltaY:h[1]-p[1],E,j=g.target,R=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in g&&R==="h"&&j.type==="range")return!1;var A=v0(R,j);if(!A)return!0;if(A?E=R:(E=R==="v"?"h":"v",A=v0(R,j)),!A)return!1;if(!n.current&&"changedTouches"in g&&(_||C)&&(n.current=E),!E)return!0;var P=n.current||E;return pO(P,x,g,P==="h"?_:C,!0)},[]),l=y.useCallback(function(g){var x=g;if(!(!xo.length||xo[xo.length-1]!==i)){var p="deltaY"in x?y0(x):ou(x),h=t.current.filter(function(E){return E.name===x.type&&(E.target===x.target||x.target===E.shadowParent)&&mO(E.delta,p)})[0];if(h&&h.should){x.cancelable&&x.preventDefault();return}if(!h){var _=(o.current.shards||[]).map(x0).filter(Boolean).filter(function(E){return E.contains(x.target)}),C=_.length>0?a(x,_[0]):!o.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),u=y.useCallback(function(g,x,p,h){var _={name:g,delta:x,target:p,should:h,shadowParent:xO(p)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),f=y.useCallback(function(g){r.current=ou(g),n.current=void 0},[]),d=y.useCallback(function(g){u(g.type,y0(g),g.target,a(g,e.lockRef.current))},[]),m=y.useCallback(function(g){u(g.type,ou(g),g.target,a(g,e.lockRef.current))},[]);y.useEffect(function(){return xo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",l,yo),document.addEventListener("touchmove",l,yo),document.addEventListener("touchstart",f,yo),function(){xo=xo.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,yo),document.removeEventListener("touchmove",l,yo),document.removeEventListener("touchstart",f,yo)}},[]);var v=e.removeScrollBar,w=e.inert;return y.createElement(y.Fragment,null,w?y.createElement(i,{styles:gO(s)}):null,v?y.createElement(aO,{gapMode:e.gapMode}):null)}function xO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wO=KD(gb,yO);var mf=y.forwardRef(function(e,t){return y.createElement(pf,Dn({},e,{ref:t,sideCar:wO}))});mf.classNames=pf.classNames;var Qp=["Enter"," "],_O=["ArrowDown","PageUp","Home"],_b=["ArrowUp","PageDown","End"],bO=[..._O,..._b],SO={ltr:[...Qp,"ArrowRight"],rtl:[...Qp,"ArrowLeft"]},kO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},pc="Menu",[Ul,CO,EO]=lf(pc),[io,bb]=nn(pc,[EO,Ca,lb]),gf=Ca(),Sb=lb(),[jO,oo]=io(pc),[TO,mc]=io(pc),kb=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:i,modal:o=!0}=e,a=gf(t),[l,u]=y.useState(null),f=y.useRef(!1),d=Dt(i),m=cf(s);return y.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),c.jsx(Ug,{...a,children:c.jsx(jO,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:c.jsx(TO,{scope:t,onClose:y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:m,modal:o,children:n})})})};kb.displayName=pc;var NO="MenuAnchor",Hg=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=gf(r);return c.jsx(Vg,{...s,...n,ref:t})});Hg.displayName=NO;var Yg="MenuPortal",[RO,Cb]=io(Yg,{forceMount:void 0}),Eb=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,i=oo(Yg,t);return c.jsx(RO,{scope:t,forceMount:r,children:c.jsx(Er,{present:r||i.open,children:c.jsx(hc,{asChild:!0,container:s,children:n})})})};Eb.displayName=Yg;var Jr="MenuContent",[PO,Zg]=io(Jr),jb=y.forwardRef((e,t)=>{const r=Cb(Jr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,i=oo(Jr,e.__scopeMenu),o=mc(Jr,e.__scopeMenu);return c.jsx(Ul.Provider,{scope:e.__scopeMenu,children:c.jsx(Er,{present:n||i.open,children:c.jsx(Ul.Slot,{scope:e.__scopeMenu,children:o.modal?c.jsx(AO,{...s,ref:t}):c.jsx(DO,{...s,ref:t})})})})}),AO=y.forwardRef((e,t)=>{const r=oo(Jr,e.__scopeMenu),n=y.useRef(null),s=Xe(t,n);return y.useEffect(()=>{const i=n.current;if(i)return Bg(i)},[]),c.jsx(Kg,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:de(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),DO=y.forwardRef((e,t)=>{const r=oo(Jr,e.__scopeMenu);return c.jsx(Kg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Kg=y.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:w,...g}=e,x=oo(Jr,r),p=mc(Jr,r),h=gf(r),_=Sb(r),C=CO(r),[E,j]=y.useState(null),R=y.useRef(null),A=Xe(t,R,x.onContentChange),P=y.useRef(0),L=y.useRef(""),q=y.useRef(0),T=y.useRef(null),F=y.useRef("right"),b=y.useRef(0),$=w?mf:y.Fragment,te=w?{as:ws,allowPinchZoom:!0}:void 0,W=I=>{var he,ye;const Q=L.current+I,z=C().filter(ke=>!ke.disabled),V=document.activeElement,fe=(he=z.find(ke=>ke.ref.current===V))==null?void 0:he.textValue,ne=z.map(ke=>ke.textValue),se=HO(ne,Q,fe),Ae=(ye=z.find(ke=>ke.textValue===se))==null?void 0:ye.ref.current;(function ke(Ie){L.current=Ie,window.clearTimeout(P.current),Ie!==""&&(P.current=window.setTimeout(()=>ke(""),1e3))})(Q),Ae&&setTimeout(()=>Ae.focus())};y.useEffect(()=>()=>window.clearTimeout(P.current),[]),Pg();const Z=y.useCallback(I=>{var z,V;return F.current===((z=T.current)==null?void 0:z.side)&&ZO(I,(V=T.current)==null?void 0:V.area)},[]);return c.jsx(PO,{scope:r,searchRef:L,onItemEnter:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),onItemLeave:y.useCallback(I=>{var Q;Z(I)||((Q=R.current)==null||Q.focus(),j(null))},[Z]),onTriggerLeave:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),pointerGraceTimerRef:q,onPointerGraceIntentChange:y.useCallback(I=>{T.current=I},[]),children:c.jsx($,{...te,children:c.jsx(uf,{asChild:!0,trapped:s,onMountAutoFocus:de(i,I=>{var Q;I.preventDefault(),(Q=R.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:c.jsx(ba,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,children:c.jsx(OD,{asChild:!0,..._,dir:p.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:j,onEntryFocus:de(l,I=>{p.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx($g,{role:"menu","aria-orientation":"vertical","data-state":Wb(x.open),"data-radix-menu-content":"",dir:p.dir,...h,...g,ref:A,style:{outline:"none",...g.style},onKeyDown:de(g.onKeyDown,I=>{const z=I.target.closest("[data-radix-menu-content]")===I.currentTarget,V=I.ctrlKey||I.altKey||I.metaKey,fe=I.key.length===1;z&&(I.key==="Tab"&&I.preventDefault(),!V&&fe&&W(I.key));const ne=R.current;if(I.target!==ne||!bO.includes(I.key))return;I.preventDefault();const Ae=C().filter(he=>!he.disabled).map(he=>he.ref.current);_b.includes(I.key)&&Ae.reverse(),WO(Ae)}),onBlur:de(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(P.current),L.current="")}),onPointerMove:de(e.onPointerMove,Vl(I=>{const Q=I.target,z=b.current!==I.clientX;if(I.currentTarget.contains(Q)&&z){const V=I.clientX>b.current?"right":"left";F.current=V,b.current=I.clientX}}))})})})})})})});jb.displayName=Jr;var OO="MenuGroup",Gg=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ve.div,{role:"group",...n,ref:t})});Gg.displayName=OO;var MO="MenuLabel",Tb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ve.div,{...n,ref:t})});Tb.displayName=MO;var md="MenuItem",w0="menu.itemSelect",vf=y.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,i=y.useRef(null),o=mc(md,e.__scopeMenu),a=Zg(md,e.__scopeMenu),l=Xe(t,i),u=y.useRef(!1),f=()=>{const d=i.current;if(!r&&d){const m=new CustomEvent(w0,{bubbles:!0,cancelable:!0});d.addEventListener(w0,v=>n==null?void 0:n(v),{once:!0}),Rg(d,m),m.defaultPrevented?u.current=!1:o.onClose()}};return c.jsx(Nb,{...s,ref:l,disabled:r,onClick:de(e.onClick,f),onPointerDown:d=>{var m;(m=e.onPointerDown)==null||m.call(e,d),u.current=!0},onPointerUp:de(e.onPointerUp,d=>{var m;u.current||(m=d.currentTarget)==null||m.click()}),onKeyDown:de(e.onKeyDown,d=>{const m=a.searchRef.current!=="";r||m&&d.key===" "||Qp.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});vf.displayName=md;var Nb=y.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=e,o=Zg(md,r),a=Sb(r),l=y.useRef(null),u=Xe(t,l),[f,d]=y.useState(!1),[m,v]=y.useState("");return y.useEffect(()=>{const w=l.current;w&&v((w.textContent??"").trim())},[i.children]),c.jsx(Ul.ItemSlot,{scope:r,disabled:n,textValue:s??m,children:c.jsx(MD,{asChild:!0,...a,focusable:!n,children:c.jsx(Ve.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:u,onPointerMove:de(e.onPointerMove,Vl(w=>{n?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:de(e.onPointerLeave,Vl(w=>o.onItemLeave(w))),onFocus:de(e.onFocus,()=>d(!0)),onBlur:de(e.onBlur,()=>d(!1))})})})}),IO="MenuCheckboxItem",Rb=y.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return c.jsx(Mb,{scope:e.__scopeMenu,checked:r,children:c.jsx(vf,{role:"menuitemcheckbox","aria-checked":gd(r)?"mixed":r,...s,ref:t,"data-state":Xg(r),onSelect:de(s.onSelect,()=>n==null?void 0:n(gd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Rb.displayName=IO;var Pb="MenuRadioGroup",[LO,FO]=io(Pb,{value:void 0,onValueChange:()=>{}}),Ab=y.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,i=Dt(n);return c.jsx(LO,{scope:e.__scopeMenu,value:r,onValueChange:i,children:c.jsx(Gg,{...s,ref:t})})});Ab.displayName=Pb;var Db="MenuRadioItem",Ob=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=FO(Db,e.__scopeMenu),i=r===s.value;return c.jsx(Mb,{scope:e.__scopeMenu,checked:i,children:c.jsx(vf,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":Xg(i),onSelect:de(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});Ob.displayName=Db;var qg="MenuItemIndicator",[Mb,zO]=io(qg,{checked:!1}),Ib=y.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,i=zO(qg,r);return c.jsx(Er,{present:n||gd(i.checked)||i.checked===!0,children:c.jsx(Ve.span,{...s,ref:t,"data-state":Xg(i.checked)})})});Ib.displayName=qg;var UO="MenuSeparator",Lb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ve.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Lb.displayName=UO;var VO="MenuArrow",Fb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=gf(r);return c.jsx(Wg,{...s,...n,ref:t})});Fb.displayName=VO;var $O="MenuSub",[A8,zb]=io($O),Qa="MenuSubTrigger",Ub=y.forwardRef((e,t)=>{const r=oo(Qa,e.__scopeMenu),n=mc(Qa,e.__scopeMenu),s=zb(Qa,e.__scopeMenu),i=Zg(Qa,e.__scopeMenu),o=y.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,u={__scopeMenu:e.__scopeMenu},f=y.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return y.useEffect(()=>f,[f]),y.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),c.jsx(Hg,{asChild:!0,...u,children:c.jsx(Nb,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":Wb(r.open),...e,ref:of(t,s.onTriggerChange),onClick:d=>{var m;(m=e.onClick)==null||m.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:de(e.onPointerMove,Vl(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:de(e.onPointerLeave,Vl(d=>{var v,w;f();const m=(v=r.content)==null?void 0:v.getBoundingClientRect();if(m){const g=(w=r.content)==null?void 0:w.dataset.side,x=g==="right",p=x?-5:5,h=m[x?"left":"right"],_=m[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+p,y:d.clientY},{x:h,y:m.top},{x:_,y:m.top},{x:_,y:m.bottom},{x:h,y:m.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:de(e.onKeyDown,d=>{var v;const m=i.searchRef.current!=="";e.disabled||m&&d.key===" "||SO[n.dir].includes(d.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),d.preventDefault())})})})});Ub.displayName=Qa;var Vb="MenuSubContent",$b=y.forwardRef((e,t)=>{const r=Cb(Jr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,i=oo(Jr,e.__scopeMenu),o=mc(Jr,e.__scopeMenu),a=zb(Vb,e.__scopeMenu),l=y.useRef(null),u=Xe(t,l);return c.jsx(Ul.Provider,{scope:e.__scopeMenu,children:c.jsx(Er,{present:n||i.open,children:c.jsx(Ul.Slot,{scope:e.__scopeMenu,children:c.jsx(Kg,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;o.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:de(e.onFocusOutside,f=>{f.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:de(e.onEscapeKeyDown,f=>{o.onClose(),f.preventDefault()}),onKeyDown:de(e.onKeyDown,f=>{var v;const d=f.currentTarget.contains(f.target),m=kO[o.dir].includes(f.key);d&&m&&(i.onOpenChange(!1),(v=a.trigger)==null||v.focus(),f.preventDefault())})})})})})});$b.displayName=Vb;function Wb(e){return e?"open":"closed"}function gd(e){return e==="indeterminate"}function Xg(e){return gd(e)?"indeterminate":e?"checked":"unchecked"}function WO(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function BO(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function HO(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=BO(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function YO(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;in!=f>n&&r<(u-a)*(n-l)/(f-l)+a&&(s=!s)}return s}function ZO(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return YO(r,t)}function Vl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var KO=kb,GO=Hg,qO=Eb,XO=jb,QO=Gg,JO=Tb,eM=vf,tM=Rb,rM=Ab,nM=Ob,sM=Ib,iM=Lb,oM=Fb,aM=Ub,lM=$b,Qg="DropdownMenu",[cM,D8]=nn(Qg,[bb]),yr=bb(),[uM,Bb]=cM(Qg),Hb=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=yr(t),u=y.useRef(null),[f=!1,d]=ui({prop:s,defaultProp:i,onChange:o});return c.jsx(uM,{scope:t,triggerId:Un(),triggerRef:u,contentId:Un(),open:f,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(m=>!m),[d]),modal:a,children:c.jsx(KO,{...l,open:f,onOpenChange:d,dir:n,modal:a,children:r})})};Hb.displayName=Qg;var Yb="DropdownMenuTrigger",Zb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,i=Bb(Yb,r),o=yr(r);return c.jsx(GO,{asChild:!0,...o,children:c.jsx(Ve.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:of(t,i.triggerRef),onPointerDown:de(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:de(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Zb.displayName=Yb;var dM="DropdownMenuPortal",Kb=e=>{const{__scopeDropdownMenu:t,...r}=e,n=yr(t);return c.jsx(qO,{...n,...r})};Kb.displayName=dM;var Gb="DropdownMenuContent",qb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Bb(Gb,r),i=yr(r),o=y.useRef(!1);return c.jsx(XO,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...n,ref:t,onCloseAutoFocus:de(e.onCloseAutoFocus,a=>{var l;o.current||(l=s.triggerRef.current)==null||l.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:de(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!s.modal||f)&&(o.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)"}})});qb.displayName=Gb;var fM="DropdownMenuGroup",hM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(QO,{...s,...n,ref:t})});hM.displayName=fM;var pM="DropdownMenuLabel",Xb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(JO,{...s,...n,ref:t})});Xb.displayName=pM;var mM="DropdownMenuItem",Qb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(eM,{...s,...n,ref:t})});Qb.displayName=mM;var gM="DropdownMenuCheckboxItem",Jb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(tM,{...s,...n,ref:t})});Jb.displayName=gM;var vM="DropdownMenuRadioGroup",yM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(rM,{...s,...n,ref:t})});yM.displayName=vM;var xM="DropdownMenuRadioItem",eS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(nM,{...s,...n,ref:t})});eS.displayName=xM;var wM="DropdownMenuItemIndicator",tS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(sM,{...s,...n,ref:t})});tS.displayName=wM;var _M="DropdownMenuSeparator",rS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(iM,{...s,...n,ref:t})});rS.displayName=_M;var bM="DropdownMenuArrow",SM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(oM,{...s,...n,ref:t})});SM.displayName=bM;var kM="DropdownMenuSubTrigger",nS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(aM,{...s,...n,ref:t})});nS.displayName=kM;var CM="DropdownMenuSubContent",sS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(lM,{...s,...n,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)"}})});sS.displayName=CM;var EM=Hb,jM=Zb,TM=Kb,iS=qb,oS=Xb,aS=Qb,lS=Jb,cS=eS,uS=tS,dS=rS,fS=nS,hS=sS;const pS=EM,mS=jM,NM=y.forwardRef(({className:e,inset:t,children:r,...n},s)=>c.jsxs(fS,{ref:s,className:le("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),...n,children:[r,c.jsx(XR,{className:"ml-auto h-4 w-4"})]}));NM.displayName=fS.displayName;const RM=y.forwardRef(({className:e,...t},r)=>c.jsx(hS,{ref:r,className:le("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}));RM.displayName=hS.displayName;const Jg=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(TM,{children:c.jsx(iS,{ref:n,sideOffset:t,className:le("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),...r})}));Jg.displayName=iS.displayName;const Go=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(aS,{ref:n,className:le("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),...r}));Go.displayName=aS.displayName;const PM=y.forwardRef(({className:e,children:t,checked:r,...n},s)=>c.jsxs(lS,{ref:s,className:le("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:r,...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(uS,{children:c.jsx(j1,{className:"h-4 w-4"})})}),t]}));PM.displayName=lS.displayName;const AM=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(cS,{ref:n,className:le("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),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(uS,{children:c.jsx(eP,{className:"h-2 w-2 fill-current"})})}),t]}));AM.displayName=cS.displayName;const gS=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(oS,{ref:n,className:le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));gS.displayName=oS.displayName;const vS=y.forwardRef(({className:e,...t},r)=>c.jsx(dS,{ref:r,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));vS.displayName=dS.displayName;var ev="Dialog",[yS,xS]=nn(ev),[DM,En]=yS(ev),wS=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=y.useRef(null),l=y.useRef(null),[u=!1,f]=ui({prop:n,defaultProp:s,onChange:i});return c.jsx(DM,{scope:t,triggerRef:a,contentRef:l,contentId:Un(),titleId:Un(),descriptionId:Un(),open:u,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(d=>!d),[f]),modal:o,children:r})};wS.displayName=ev;var _S="DialogTrigger",bS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=En(_S,r),i=Xe(t,s.triggerRef);return c.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":nv(s.open),...n,ref:i,onClick:de(e.onClick,s.onOpenToggle)})});bS.displayName=_S;var tv="DialogPortal",[OM,SS]=yS(tv,{forceMount:void 0}),kS=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,i=En(tv,t);return c.jsx(OM,{scope:t,forceMount:r,children:y.Children.map(n,o=>c.jsx(Er,{present:r||i.open,children:c.jsx(hc,{asChild:!0,container:s,children:o})}))})};kS.displayName=tv;var vd="DialogOverlay",CS=y.forwardRef((e,t)=>{const r=SS(vd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=En(vd,e.__scopeDialog);return i.modal?c.jsx(Er,{present:n||i.open,children:c.jsx(MM,{...s,ref:t})}):null});CS.displayName=vd;var MM=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=En(vd,r);return c.jsx(mf,{as:ws,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Ve.div,{"data-state":nv(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ji="DialogContent",ES=y.forwardRef((e,t)=>{const r=SS(Ji,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=En(Ji,e.__scopeDialog);return c.jsx(Er,{present:n||i.open,children:i.modal?c.jsx(IM,{...s,ref:t}):c.jsx(LM,{...s,ref:t})})});ES.displayName=Ji;var IM=y.forwardRef((e,t)=>{const r=En(Ji,e.__scopeDialog),n=y.useRef(null),s=Xe(t,r.contentRef,n);return y.useEffect(()=>{const i=n.current;if(i)return Bg(i)},[]),c.jsx(jS,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:de(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:de(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:de(e.onFocusOutside,i=>i.preventDefault())})}),LM=y.forwardRef((e,t)=>{const r=En(Ji,e.__scopeDialog),n=y.useRef(!1),s=y.useRef(!1);return c.jsx(jS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),jS=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=En(Ji,r),l=y.useRef(null),u=Xe(t,l);return Pg(),c.jsxs(c.Fragment,{children:[c.jsx(uf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(ba,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nv(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(zM,{titleId:a.titleId}),c.jsx(VM,{contentRef:l,descriptionId:a.descriptionId})]})]})}),rv="DialogTitle",TS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=En(rv,r);return c.jsx(Ve.h2,{id:s.titleId,...n,ref:t})});TS.displayName=rv;var NS="DialogDescription",RS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=En(NS,r);return c.jsx(Ve.p,{id:s.descriptionId,...n,ref:t})});RS.displayName=NS;var PS="DialogClose",AS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=En(PS,r);return c.jsx(Ve.button,{type:"button",...n,ref:t,onClick:de(e.onClick,()=>s.onOpenChange(!1))})});AS.displayName=PS;function nv(e){return e?"open":"closed"}var DS="DialogTitleWarning",[FM,OS]=YP(DS,{contentName:Ji,titleName:rv,docsSlug:"dialog"}),zM=({titleId:e})=>{const t=OS(DS),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. +`)},MO=0,xo=[];function IO(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),s=y.useState(MO++)[0],i=y.useState(bb)[0],o=y.useRef(e);y.useEffect(function(){o.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=nO([e.lockRef.current],(e.shards||[]).map(S0),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(g,x){if("touches"in g&&g.touches.length===2)return!o.current.allowPinchZoom;var p=au(g),h=r.current,_="deltaX"in g?g.deltaX:h[0]-p[0],C="deltaY"in g?g.deltaY:h[1]-p[1],E,j=g.target,R=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in g&&R==="h"&&j.type==="range")return!1;var A=_0(R,j);if(!A)return!0;if(A?E=R:(E=R==="v"?"h":"v",A=_0(R,j)),!A)return!1;if(!n.current&&"changedTouches"in g&&(_||C)&&(n.current=E),!E)return!0;var P=n.current||E;return AO(P,x,g,P==="h"?_:C,!0)},[]),l=y.useCallback(function(g){var x=g;if(!(!xo.length||xo[xo.length-1]!==i)){var p="deltaY"in x?b0(x):au(x),h=t.current.filter(function(E){return E.name===x.type&&(E.target===x.target||x.target===E.shadowParent)&&DO(E.delta,p)})[0];if(h&&h.should){x.cancelable&&x.preventDefault();return}if(!h){var _=(o.current.shards||[]).map(S0).filter(Boolean).filter(function(E){return E.contains(x.target)}),C=_.length>0?a(x,_[0]):!o.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),u=y.useCallback(function(g,x,p,h){var _={name:g,delta:x,target:p,should:h,shadowParent:LO(p)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),f=y.useCallback(function(g){r.current=au(g),n.current=void 0},[]),d=y.useCallback(function(g){u(g.type,b0(g),g.target,a(g,e.lockRef.current))},[]),m=y.useCallback(function(g){u(g.type,au(g),g.target,a(g,e.lockRef.current))},[]);y.useEffect(function(){return xo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",l,yo),document.addEventListener("touchmove",l,yo),document.addEventListener("touchstart",f,yo),function(){xo=xo.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,yo),document.removeEventListener("touchmove",l,yo),document.removeEventListener("touchstart",f,yo)}},[]);var v=e.removeScrollBar,w=e.inert;return y.createElement(y.Fragment,null,w?y.createElement(i,{styles:OO(s)}):null,v?y.createElement(CO,{gapMode:e.gapMode}):null)}function LO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const FO=fO(_b,IO);var mf=y.forwardRef(function(e,t){return y.createElement(pf,On({},e,{ref:t,sideCar:FO}))});mf.classNames=pf.classNames;var Xp=["Enter"," "],zO=["ArrowDown","PageUp","Home"],Eb=["ArrowUp","PageDown","End"],UO=[...zO,...Eb],VO={ltr:[...Xp,"ArrowRight"],rtl:[...Xp,"ArrowLeft"]},$O={ltr:["ArrowLeft"],rtl:["ArrowRight"]},mc="Menu",[Ul,BO,WO]=lf(mc),[io,jb]=Vr(mc,[WO,Ca,hf]),gf=Ca(),Tb=hf(),[HO,oo]=io(mc),[YO,gc]=io(mc),Nb=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:i,modal:o=!0}=e,a=gf(t),[l,u]=y.useState(null),f=y.useRef(!1),d=Dt(i),m=fc(s);return y.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),c.jsx(Ug,{...a,children:c.jsx(HO,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:c.jsx(YO,{scope:t,onClose:y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:m,modal:o,children:n})})})};Nb.displayName=mc;var ZO="MenuAnchor",Hg=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=gf(r);return c.jsx(Vg,{...s,...n,ref:t})});Hg.displayName=ZO;var Yg="MenuPortal",[KO,Rb]=io(Yg,{forceMount:void 0}),Pb=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,i=oo(Yg,t);return c.jsx(KO,{scope:t,forceMount:r,children:c.jsx(yr,{present:r||i.open,children:c.jsx(pc,{asChild:!0,container:s,children:n})})})};Pb.displayName=Yg;var en="MenuContent",[GO,Zg]=io(en),Ab=y.forwardRef((e,t)=>{const r=Rb(en,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,i=oo(en,e.__scopeMenu),o=gc(en,e.__scopeMenu);return c.jsx(Ul.Provider,{scope:e.__scopeMenu,children:c.jsx(yr,{present:n||i.open,children:c.jsx(Ul.Slot,{scope:e.__scopeMenu,children:o.modal?c.jsx(qO,{...s,ref:t}):c.jsx(XO,{...s,ref:t})})})})}),qO=y.forwardRef((e,t)=>{const r=oo(en,e.__scopeMenu),n=y.useRef(null),s=Xe(t,n);return y.useEffect(()=>{const i=n.current;if(i)return Wg(i)},[]),c.jsx(Kg,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ce(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),XO=y.forwardRef((e,t)=>{const r=oo(en,e.__scopeMenu);return c.jsx(Kg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Kg=y.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:w,...g}=e,x=oo(en,r),p=gc(en,r),h=gf(r),_=Tb(r),C=BO(r),[E,j]=y.useState(null),R=y.useRef(null),A=Xe(t,R,x.onContentChange),P=y.useRef(0),L=y.useRef(""),q=y.useRef(0),T=y.useRef(null),F=y.useRef("right"),b=y.useRef(0),$=w?mf:y.Fragment,te=w?{as:ws,allowPinchZoom:!0}:void 0,B=I=>{var he,ye;const Q=L.current+I,z=C().filter(ke=>!ke.disabled),V=document.activeElement,fe=(he=z.find(ke=>ke.ref.current===V))==null?void 0:he.textValue,ne=z.map(ke=>ke.textValue),se=cM(ne,Q,fe),Ae=(ye=z.find(ke=>ke.textValue===se))==null?void 0:ye.ref.current;(function ke(Le){L.current=Le,window.clearTimeout(P.current),Le!==""&&(P.current=window.setTimeout(()=>ke(""),1e3))})(Q),Ae&&setTimeout(()=>Ae.focus())};y.useEffect(()=>()=>window.clearTimeout(P.current),[]),Pg();const Z=y.useCallback(I=>{var z,V;return F.current===((z=T.current)==null?void 0:z.side)&&dM(I,(V=T.current)==null?void 0:V.area)},[]);return c.jsx(GO,{scope:r,searchRef:L,onItemEnter:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),onItemLeave:y.useCallback(I=>{var Q;Z(I)||((Q=R.current)==null||Q.focus(),j(null))},[Z]),onTriggerLeave:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),pointerGraceTimerRef:q,onPointerGraceIntentChange:y.useCallback(I=>{T.current=I},[]),children:c.jsx($,{...te,children:c.jsx(cf,{asChild:!0,trapped:s,onMountAutoFocus:ce(i,I=>{var Q;I.preventDefault(),(Q=R.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:c.jsx(ba,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,children:c.jsx(gb,{asChild:!0,..._,dir:p.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:j,onEntryFocus:ce(l,I=>{p.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx($g,{role:"menu","aria-orientation":"vertical","data-state":Kb(x.open),"data-radix-menu-content":"",dir:p.dir,...h,...g,ref:A,style:{outline:"none",...g.style},onKeyDown:ce(g.onKeyDown,I=>{const z=I.target.closest("[data-radix-menu-content]")===I.currentTarget,V=I.ctrlKey||I.altKey||I.metaKey,fe=I.key.length===1;z&&(I.key==="Tab"&&I.preventDefault(),!V&&fe&&B(I.key));const ne=R.current;if(I.target!==ne||!UO.includes(I.key))return;I.preventDefault();const Ae=C().filter(he=>!he.disabled).map(he=>he.ref.current);Eb.includes(I.key)&&Ae.reverse(),aM(Ae)}),onBlur:ce(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(P.current),L.current="")}),onPointerMove:ce(e.onPointerMove,Vl(I=>{const Q=I.target,z=b.current!==I.clientX;if(I.currentTarget.contains(Q)&&z){const V=I.clientX>b.current?"right":"left";F.current=V,b.current=I.clientX}}))})})})})})})});Ab.displayName=en;var QO="MenuGroup",Gg=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ie.div,{role:"group",...n,ref:t})});Gg.displayName=QO;var JO="MenuLabel",Db=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ie.div,{...n,ref:t})});Db.displayName=JO;var md="MenuItem",k0="menu.itemSelect",vf=y.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,i=y.useRef(null),o=gc(md,e.__scopeMenu),a=Zg(md,e.__scopeMenu),l=Xe(t,i),u=y.useRef(!1),f=()=>{const d=i.current;if(!r&&d){const m=new CustomEvent(k0,{bubbles:!0,cancelable:!0});d.addEventListener(k0,v=>n==null?void 0:n(v),{once:!0}),Rg(d,m),m.defaultPrevented?u.current=!1:o.onClose()}};return c.jsx(Ob,{...s,ref:l,disabled:r,onClick:ce(e.onClick,f),onPointerDown:d=>{var m;(m=e.onPointerDown)==null||m.call(e,d),u.current=!0},onPointerUp:ce(e.onPointerUp,d=>{var m;u.current||(m=d.currentTarget)==null||m.click()}),onKeyDown:ce(e.onKeyDown,d=>{const m=a.searchRef.current!=="";r||m&&d.key===" "||Xp.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});vf.displayName=md;var Ob=y.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=e,o=Zg(md,r),a=Tb(r),l=y.useRef(null),u=Xe(t,l),[f,d]=y.useState(!1),[m,v]=y.useState("");return y.useEffect(()=>{const w=l.current;w&&v((w.textContent??"").trim())},[i.children]),c.jsx(Ul.ItemSlot,{scope:r,disabled:n,textValue:s??m,children:c.jsx(vb,{asChild:!0,...a,focusable:!n,children:c.jsx(Ie.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:u,onPointerMove:ce(e.onPointerMove,Vl(w=>{n?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(e.onPointerLeave,Vl(w=>o.onItemLeave(w))),onFocus:ce(e.onFocus,()=>d(!0)),onBlur:ce(e.onBlur,()=>d(!1))})})})}),eM="MenuCheckboxItem",Mb=y.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return c.jsx(Ub,{scope:e.__scopeMenu,checked:r,children:c.jsx(vf,{role:"menuitemcheckbox","aria-checked":gd(r)?"mixed":r,...s,ref:t,"data-state":Xg(r),onSelect:ce(s.onSelect,()=>n==null?void 0:n(gd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Mb.displayName=eM;var Ib="MenuRadioGroup",[tM,rM]=io(Ib,{value:void 0,onValueChange:()=>{}}),Lb=y.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,i=Dt(n);return c.jsx(tM,{scope:e.__scopeMenu,value:r,onValueChange:i,children:c.jsx(Gg,{...s,ref:t})})});Lb.displayName=Ib;var Fb="MenuRadioItem",zb=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=rM(Fb,e.__scopeMenu),i=r===s.value;return c.jsx(Ub,{scope:e.__scopeMenu,checked:i,children:c.jsx(vf,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":Xg(i),onSelect:ce(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});zb.displayName=Fb;var qg="MenuItemIndicator",[Ub,nM]=io(qg,{checked:!1}),Vb=y.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,i=nM(qg,r);return c.jsx(yr,{present:n||gd(i.checked)||i.checked===!0,children:c.jsx(Ie.span,{...s,ref:t,"data-state":Xg(i.checked)})})});Vb.displayName=qg;var sM="MenuSeparator",$b=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ie.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});$b.displayName=sM;var iM="MenuArrow",Bb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=gf(r);return c.jsx(Bg,{...s,...n,ref:t})});Bb.displayName=iM;var oM="MenuSub",[eU,Wb]=io(oM),Qa="MenuSubTrigger",Hb=y.forwardRef((e,t)=>{const r=oo(Qa,e.__scopeMenu),n=gc(Qa,e.__scopeMenu),s=Wb(Qa,e.__scopeMenu),i=Zg(Qa,e.__scopeMenu),o=y.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,u={__scopeMenu:e.__scopeMenu},f=y.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return y.useEffect(()=>f,[f]),y.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),c.jsx(Hg,{asChild:!0,...u,children:c.jsx(Ob,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":Kb(r.open),...e,ref:of(t,s.onTriggerChange),onClick:d=>{var m;(m=e.onClick)==null||m.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ce(e.onPointerMove,Vl(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:ce(e.onPointerLeave,Vl(d=>{var v,w;f();const m=(v=r.content)==null?void 0:v.getBoundingClientRect();if(m){const g=(w=r.content)==null?void 0:w.dataset.side,x=g==="right",p=x?-5:5,h=m[x?"left":"right"],_=m[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+p,y:d.clientY},{x:h,y:m.top},{x:_,y:m.top},{x:_,y:m.bottom},{x:h,y:m.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ce(e.onKeyDown,d=>{var v;const m=i.searchRef.current!=="";e.disabled||m&&d.key===" "||VO[n.dir].includes(d.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),d.preventDefault())})})})});Hb.displayName=Qa;var Yb="MenuSubContent",Zb=y.forwardRef((e,t)=>{const r=Rb(en,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,i=oo(en,e.__scopeMenu),o=gc(en,e.__scopeMenu),a=Wb(Yb,e.__scopeMenu),l=y.useRef(null),u=Xe(t,l);return c.jsx(Ul.Provider,{scope:e.__scopeMenu,children:c.jsx(yr,{present:n||i.open,children:c.jsx(Ul.Slot,{scope:e.__scopeMenu,children:c.jsx(Kg,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;o.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ce(e.onFocusOutside,f=>{f.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ce(e.onEscapeKeyDown,f=>{o.onClose(),f.preventDefault()}),onKeyDown:ce(e.onKeyDown,f=>{var v;const d=f.currentTarget.contains(f.target),m=$O[o.dir].includes(f.key);d&&m&&(i.onOpenChange(!1),(v=a.trigger)==null||v.focus(),f.preventDefault())})})})})})});Zb.displayName=Yb;function Kb(e){return e?"open":"closed"}function gd(e){return e==="indeterminate"}function Xg(e){return gd(e)?"indeterminate":e?"checked":"unchecked"}function aM(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function lM(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function cM(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=lM(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function uM(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;in!=f>n&&r<(u-a)*(n-l)/(f-l)+a&&(s=!s)}return s}function dM(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return uM(r,t)}function Vl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var fM=Nb,hM=Hg,pM=Pb,mM=Ab,gM=Gg,vM=Db,yM=vf,xM=Mb,wM=Lb,_M=zb,bM=Vb,SM=$b,kM=Bb,CM=Hb,EM=Zb,Qg="DropdownMenu",[jM,tU]=Vr(Qg,[jb]),xr=jb(),[TM,Gb]=jM(Qg),qb=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=xr(t),u=y.useRef(null),[f=!1,d]=_s({prop:s,defaultProp:i,onChange:o});return c.jsx(TM,{scope:t,triggerId:xn(),triggerRef:u,contentId:xn(),open:f,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(m=>!m),[d]),modal:a,children:c.jsx(fM,{...l,open:f,onOpenChange:d,dir:n,modal:a,children:r})})};qb.displayName=Qg;var Xb="DropdownMenuTrigger",Qb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,i=Gb(Xb,r),o=xr(r);return c.jsx(hM,{asChild:!0,...o,children:c.jsx(Ie.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:of(t,i.triggerRef),onPointerDown:ce(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:ce(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Qb.displayName=Xb;var NM="DropdownMenuPortal",Jb=e=>{const{__scopeDropdownMenu:t,...r}=e,n=xr(t);return c.jsx(pM,{...n,...r})};Jb.displayName=NM;var eS="DropdownMenuContent",tS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Gb(eS,r),i=xr(r),o=y.useRef(!1);return c.jsx(mM,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...n,ref:t,onCloseAutoFocus:ce(e.onCloseAutoFocus,a=>{var l;o.current||(l=s.triggerRef.current)==null||l.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:ce(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!s.modal||f)&&(o.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)"}})});tS.displayName=eS;var RM="DropdownMenuGroup",PM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(gM,{...s,...n,ref:t})});PM.displayName=RM;var AM="DropdownMenuLabel",rS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(vM,{...s,...n,ref:t})});rS.displayName=AM;var DM="DropdownMenuItem",nS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(yM,{...s,...n,ref:t})});nS.displayName=DM;var OM="DropdownMenuCheckboxItem",sS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(xM,{...s,...n,ref:t})});sS.displayName=OM;var MM="DropdownMenuRadioGroup",IM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(wM,{...s,...n,ref:t})});IM.displayName=MM;var LM="DropdownMenuRadioItem",iS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(_M,{...s,...n,ref:t})});iS.displayName=LM;var FM="DropdownMenuItemIndicator",oS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(bM,{...s,...n,ref:t})});oS.displayName=FM;var zM="DropdownMenuSeparator",aS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(SM,{...s,...n,ref:t})});aS.displayName=zM;var UM="DropdownMenuArrow",VM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(kM,{...s,...n,ref:t})});VM.displayName=UM;var $M="DropdownMenuSubTrigger",lS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(CM,{...s,...n,ref:t})});lS.displayName=$M;var BM="DropdownMenuSubContent",cS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(EM,{...s,...n,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)"}})});cS.displayName=BM;var WM=qb,HM=Qb,YM=Jb,uS=tS,dS=rS,fS=nS,hS=sS,pS=iS,mS=oS,gS=aS,vS=lS,yS=cS;const xS=WM,wS=HM,ZM=y.forwardRef(({className:e,inset:t,children:r,...n},s)=>c.jsxs(vS,{ref:s,className:le("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),...n,children:[r,c.jsx(vP,{className:"ml-auto h-4 w-4"})]}));ZM.displayName=vS.displayName;const KM=y.forwardRef(({className:e,...t},r)=>c.jsx(yS,{ref:r,className:le("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}));KM.displayName=yS.displayName;const Jg=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(YM,{children:c.jsx(uS,{ref:n,sideOffset:t,className:le("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),...r})}));Jg.displayName=uS.displayName;const Go=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(fS,{ref:n,className:le("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),...r}));Go.displayName=fS.displayName;const GM=y.forwardRef(({className:e,children:t,checked:r,...n},s)=>c.jsxs(hS,{ref:s,className:le("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:r,...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(mS,{children:c.jsx(P1,{className:"h-4 w-4"})})}),t]}));GM.displayName=hS.displayName;const qM=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(pS,{ref:n,className:le("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),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(mS,{children:c.jsx(wP,{className:"h-2 w-2 fill-current"})})}),t]}));qM.displayName=pS.displayName;const _S=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(dS,{ref:n,className:le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));_S.displayName=dS.displayName;const bS=y.forwardRef(({className:e,...t},r)=>c.jsx(gS,{ref:r,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));bS.displayName=gS.displayName;var ev="Dialog",[SS,kS]=Vr(ev),[XM,jn]=SS(ev),CS=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=y.useRef(null),l=y.useRef(null),[u=!1,f]=_s({prop:n,defaultProp:s,onChange:i});return c.jsx(XM,{scope:t,triggerRef:a,contentRef:l,contentId:xn(),titleId:xn(),descriptionId:xn(),open:u,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(d=>!d),[f]),modal:o,children:r})};CS.displayName=ev;var ES="DialogTrigger",jS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=jn(ES,r),i=Xe(t,s.triggerRef);return c.jsx(Ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":nv(s.open),...n,ref:i,onClick:ce(e.onClick,s.onOpenToggle)})});jS.displayName=ES;var tv="DialogPortal",[QM,TS]=SS(tv,{forceMount:void 0}),NS=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,i=jn(tv,t);return c.jsx(QM,{scope:t,forceMount:r,children:y.Children.map(n,o=>c.jsx(yr,{present:r||i.open,children:c.jsx(pc,{asChild:!0,container:s,children:o})}))})};NS.displayName=tv;var vd="DialogOverlay",RS=y.forwardRef((e,t)=>{const r=TS(vd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=jn(vd,e.__scopeDialog);return i.modal?c.jsx(yr,{present:n||i.open,children:c.jsx(JM,{...s,ref:t})}):null});RS.displayName=vd;var JM=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=jn(vd,r);return c.jsx(mf,{as:ws,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Ie.div,{"data-state":nv(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ji="DialogContent",PS=y.forwardRef((e,t)=>{const r=TS(Ji,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=jn(Ji,e.__scopeDialog);return c.jsx(yr,{present:n||i.open,children:i.modal?c.jsx(eI,{...s,ref:t}):c.jsx(tI,{...s,ref:t})})});PS.displayName=Ji;var eI=y.forwardRef((e,t)=>{const r=jn(Ji,e.__scopeDialog),n=y.useRef(null),s=Xe(t,r.contentRef,n);return y.useEffect(()=>{const i=n.current;if(i)return Wg(i)},[]),c.jsx(AS,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ce(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ce(e.onFocusOutside,i=>i.preventDefault())})}),tI=y.forwardRef((e,t)=>{const r=jn(Ji,e.__scopeDialog),n=y.useRef(!1),s=y.useRef(!1);return c.jsx(AS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),AS=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=jn(Ji,r),l=y.useRef(null),u=Xe(t,l);return Pg(),c.jsxs(c.Fragment,{children:[c.jsx(cf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(ba,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nv(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(nI,{titleId:a.titleId}),c.jsx(iI,{contentRef:l,descriptionId:a.descriptionId})]})]})}),rv="DialogTitle",DS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=jn(rv,r);return c.jsx(Ie.h2,{id:s.titleId,...n,ref:t})});DS.displayName=rv;var OS="DialogDescription",MS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=jn(OS,r);return c.jsx(Ie.p,{id:s.descriptionId,...n,ref:t})});MS.displayName=OS;var IS="DialogClose",LS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=jn(IS,r);return c.jsx(Ie.button,{type:"button",...n,ref:t,onClick:ce(e.onClick,()=>s.onOpenChange(!1))})});LS.displayName=IS;function nv(e){return e?"open":"closed"}var FS="DialogTitleWarning",[rI,zS]=fA(FS,{contentName:Ji,titleName:rv,docsSlug:"dialog"}),nI=({titleId:e})=>{const t=zS(FS),r=`\`${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 y.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},UM="DialogDescriptionWarning",VM=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OS(UM).contentName}}.`;return y.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},sv=wS,iv=bS,ov=kS,gc=CS,vc=ES,yc=TS,xc=RS,yf=AS;const av=sv,lv=iv,$M=ov,MS=y.forwardRef(({className:e,...t},r)=>c.jsx(gc,{className:le("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:r}));MS.displayName=gc.displayName;const WM=dc("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"}}),xf=y.forwardRef(({side:e="right",className:t,children:r,...n},s)=>c.jsxs($M,{children:[c.jsx(MS,{}),c.jsxs(vc,{ref:s,className:le(WM({side:e}),t),...n,children:[r,c.jsxs(yf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(jg,{className:"h-4 w-4 dark:text-stone-200"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xf.displayName=vc.displayName;const cv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});cv.displayName="SheetHeader";const uv=y.forwardRef(({className:e,...t},r)=>c.jsx(yc,{ref:r,className:le("text-lg font-semibold text-foreground",e),...t}));uv.displayName=yc.displayName;const BM=y.forwardRef(({className:e,...t},r)=>c.jsx(xc,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));BM.displayName=xc.displayName;class Ir extends Error{constructor(t){var r,n,s,i;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Ir.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 Ir||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(r=this.response)==null?void 0:r.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.":(i=(s=(n=this.originalError)==null?void 0:n.cause)==null?void 0:s.message)!=null&&i.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 au=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function HM(e,t){const r={};if(typeof e!="string")return r;const n=Object.assign({},{}).decode||YM;let s=0;for(;s0&&(!r.exp||r.exp-t>Date.now()/1e3))}IS=typeof atob!="function"||KM?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 r,n,s=0,i=0,o="";n=t.charAt(i++);~n&&(r=s%4?64*r+n:n,s++%4)?o+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return o}:atob;const b0="pb_auth";class GM{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!LS(this.token)}get isAdmin(){return qo(this.token).type==="admin"}get isAuthRecord(){return qo(this.token).type==="authRecord"}save(t,r){this.baseToken=t||"",this.baseModel=r||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,r=b0){const n=HM(t||"")[r]||"";let s={};try{s=JSON.parse(n),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,r=b0){var l,u;const n={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=qo(this.token);n.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},n,t);const i={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let o=_0(r,JSON.stringify(i),t);const a=typeof Blob<"u"?new Blob([o]).size:o.length;if(i.model&&a>4096){i.model={id:(l=i==null?void 0:i.model)==null?void 0:l.id,email:(u=i==null?void 0:i.model)==null?void 0:u.email};const f=["collectionId","username","verified"];for(const d in this.model)f.includes(d)&&(i.model[d]=this.model[d]);o=_0(r,JSON.stringify(i),t)}return o}onChange(t,r=!1){return this._onChangeCallbacks.push(t),r&&t(this.token,this.model),()=>{for(let n=this._onChangeCallbacks.length-1;n>=0;n--)if(this._onChangeCallbacks[n]==t)return delete this._onChangeCallbacks[n],void this._onChangeCallbacks.splice(n,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class qM extends GM{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,r){this._storageSet(this.storageKey,{token:t,model:r}),super.save(t,r)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const r=window.localStorage.getItem(t)||"";try{return JSON.parse(r)}catch{return r}}return this.storageFallback[t]}_storageSet(t,r){if(typeof window<"u"&&(window!=null&&window.localStorage)){let n=r;typeof r!="string"&&(n=JSON.stringify(r)),window.localStorage.setItem(t,n)}else this.storageFallback[t]=r}_storageRemove(t){var r;typeof window<"u"&&(window!=null&&window.localStorage)&&((r=window.localStorage)==null||r.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 r=this._storageGet(this.storageKey)||{};super.save(r.token||"",r.model||null)})}}class ao{constructor(t){this.client=t}}class XM extends ao{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,r){return r=Object.assign({method:"PATCH",body:t},r),this.client.send("/api/settings",r)}async testS3(t="storage",r){return r=Object.assign({method:"POST",body:{filesystem:t}},r),this.client.send("/api/settings/test/s3",r).then(()=>!0)}async testEmail(t,r,n){return n=Object.assign({method:"POST",body:{email:t,template:r}},n),this.client.send("/api/settings/test/email",n).then(()=>!0)}async generateAppleClientSecret(t,r,n,s,i,o){return o=Object.assign({method:"POST",body:{clientId:t,teamId:r,keyId:n,privateKey:s,duration:i}},o),this.client.send("/api/settings/apple/generate-client-secret",o)}}class dv extends ao{decode(t){return t}async getFullList(t,r){if(typeof t=="number")return this._getFullList(t,r);let n=500;return(r=Object.assign({},t,r)).batch&&(n=r.batch,delete r.batch),this._getFullList(n,r)}async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send(this.baseCrudPath,n).then(s=>{var i;return s.items=((i=s.items)==null?void 0:i.map(o=>this.decode(o)))||[],s})}async getFirstListItem(t,r){return(r=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},r)).query=Object.assign({filter:t,skipTotal:1},r.query),this.getList(1,1,r).then(n=>{var s;if(!((s=n==null?void 0:n.items)!=null&&s.length))throw new Ir({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return n.items[0]})}async getOne(t,r){if(!t)throw new Ir({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(n=>this.decode(n))}async create(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send(this.baseCrudPath,r).then(n=>this.decode(n))}async update(t,r,n){return n=Object.assign({method:"PATCH",body:r},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(s=>this.decode(s))}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(()=>!0)}_getFullList(t=500,r){(r=r||{}).query=Object.assign({skipTotal:1},r.query);let n=[],s=async i=>this.getList(i,t||500,r).then(o=>{const a=o.items;return n=n.concat(a),a.length==o.perPage?s(i+1):n});return s(1)}}function Tr(e,t,r,n){const s=n!==void 0;return s||r!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,r),t.query=Object.assign({},t.query,n),t):Object.assign(t,r):t}function Ih(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class QM extends dv{get baseCrudPath(){return"/api/admins"}async update(t,r,n){return super.update(t,r,n).then(s=>{var i,o;return((i=this.client.authStore.model)==null?void 0:i.id)===s.id&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,r){return super.delete(t,r).then(n=>{var s,i;return n&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:r})}async authWithPassword(t,r,n,s){let i={method:"POST",body:{identity:t,password:r}};i=Tr("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",i,n,s);const o=i.autoRefreshThreshold;delete i.autoRefreshThreshold,i.autoRefresh||Ih(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",i);return a=this.authResponse(a),o&&function(u,f,d,m){Ih(u);const v=u.beforeSend,w=u.authStore.model,g=u.authStore.onChange((x,p)=>{(!x||(p==null?void 0:p.id)!=(w==null?void 0:w.id)||(p!=null&&p.collectionId||w!=null&&w.collectionId)&&(p==null?void 0:p.collectionId)!=(w==null?void 0:w.collectionId))&&Ih(u)});u._resetAutoRefresh=function(){g(),u.beforeSend=v,delete u._resetAutoRefresh},u.beforeSend=async(x,p)=>{var E;const h=u.authStore.token;if((E=p.query)!=null&&E.autoRefresh)return v?v(x,p):{url:x,sendOptions:p};let _=u.authStore.isValid;if(_&&LS(u.authStore.token,f))try{await d()}catch{_=!1}_||await m();const C=p.headers||{};for(let j in C)if(j.toLowerCase()=="authorization"&&h==C[j]&&u.authStore.token){C[j]=u.authStore.token;break}return p.headers=C,v?v(x,p):{url:x,sendOptions:p}}}(this.client,o,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,r,Object.assign({autoRefresh:!0},i))),a}async authRefresh(t,r){let n={method:"POST"};return n=Tr("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCrudPath+"/auth-refresh",n).then(this.authResponse.bind(this))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=Tr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,i){let o={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return o=Tr("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",o,s,i),this.client.send(this.baseCrudPath+"/confirm-password-reset",o).then(()=>!0)}}const JM=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function FS(e){if(e){e.query=e.query||{};for(let t in e)JM.includes(t)||(e.query[t]=e[t],delete e[t])}}class zS extends ao{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,r,n){var o;if(!t)throw new Error("topic must be set.");let s=t;if(n){FS(n);const a="options="+encodeURIComponent(JSON.stringify({query:n.query,headers:n.headers}));s+=(s.includes("?")?"&":"?")+a}const i=function(a){const l=a;let u;try{u=JSON.parse(l==null?void 0:l.data)}catch{}r(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(i),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(o=this.eventSource)==null||o.addEventListener(s,i):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,i)}async unsubscribe(t){var n;let r=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let i in s)if(this.hasSubscriptionListeners(i)){for(let o of this.subscriptions[i])(n=this.eventSource)==null||n.removeEventListener(i,o);delete this.subscriptions[i],r||(r=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var n;let r=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){r=!0;for(let i of this.subscriptions[s])(n=this.eventSource)==null||n.removeEventListener(s,i);delete this.subscriptions[s]}r&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,r){var i;let n=!1;const s=this.getSubscriptionsByTopic(t);for(let o in s){if(!Array.isArray(this.subscriptions[o])||!this.subscriptions[o].length)continue;let a=!1;for(let l=this.subscriptions[o].length-1;l>=0;l--)this.subscriptions[o][l]===r&&(a=!0,delete this.subscriptions[o][l],this.subscriptions[o].splice(l,1),(i=this.eventSource)==null||i.removeEventListener(o,r));a&&(this.subscriptions[o].length||delete this.subscriptions[o],n||this.hasSubscriptionListeners(o)||(n=!0))}this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var r,n;if(this.subscriptions=this.subscriptions||{},t)return!!((r=this.subscriptions[t])!=null&&r.length);for(let s in this.subscriptions)if((n=this.subscriptions[s])!=null&&n.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 r={};t=t.includes("?")?t:t+"?";for(let n in this.subscriptions)(n+"?").startsWith(t)&&(r[n]=this.subscriptions[n]);return r}getNonEmptySubscriptionKeys(){const t=[];for(let r in this.subscriptions)this.subscriptions[r].length&&t.push(r);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.addEventListener(t,r)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.removeEventListener(t,r)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,r)=>{this.pendingConnects.push({resolve:t,reject:r}),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 r=t;this.clientId=r==null?void 0:r.lastEventId,this.submitSubscriptions().then(async()=>{let n=3;for(;this.hasUnsentSubscriptions()&&n>0;)n--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const n=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in n)for(let i of n[s])i(t)}).catch(n=>{this.clientId="",this.connectErrorHandler(n)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const r of t)if(!this.lastSentSubscriptions.includes(r))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let n of this.pendingConnects)n.reject(new Ir(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const r=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},r)}disconnect(t=!1){var r;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(r=this.eventSource)==null||r.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let n of this.pendingConnects)n.resolve();this.pendingConnects=[]}}}class eI extends dv{constructor(t,r){super(t),this.collectionIdOrName=r}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,r,n){if(!t)throw new Error("Missing topic.");if(!r)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,r,n)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,r){if(typeof t=="number")return super.getFullList(t,r);const n=Object.assign({},t,r);return super.getFullList(n)}async getList(t=1,r=30,n){return super.getList(t,r,n)}async getFirstListItem(t,r){return super.getFirstListItem(t,r)}async getOne(t,r){return super.getOne(t,r)}async create(t,r){return super.create(t,r)}async update(t,r,n){return super.update(t,r,n).then(s=>{var i,o,a;return((i=this.client.authStore.model)==null?void 0:i.id)!==(s==null?void 0:s.id)||((o=this.client.authStore.model)==null?void 0:o.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,r){return super.delete(t,r).then(n=>{var s,i,o;return!n||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((o=this.client.authStore.model)==null?void 0:o.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:r})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(r=>Object.assign({},r,{usernamePassword:!!(r!=null&&r.usernamePassword),emailPassword:!!(r!=null&&r.emailPassword),authProviders:Array.isArray(r==null?void 0:r.authProviders)?r==null?void 0:r.authProviders:[]}))}async authWithPassword(t,r,n,s){let i={method:"POST",body:{identity:t,password:r}};return i=Tr("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",i,n,s),this.client.send(this.baseCollectionPath+"/auth-with-password",i).then(o=>this.authResponse(o))}async authWithOAuth2Code(t,r,n,s,i,o,a){let l={method:"POST",body:{provider:t,code:r,codeVerifier:n,redirectUrl:s,createData:i}};return l=Tr("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,o,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const r=(t==null?void 0:t[0])||{};let n=null;r.urlCallback||(n=S0(void 0));const s=new zS(this.client);function i(){n==null||n.close(),s.unsubscribe()}const o={},a=r.requestKey;return a&&(o.requestKey=a),this.listAuthMethods(o).then(l=>{var m;const u=l.authProviders.find(v=>v.name===r.provider);if(!u)throw new Ir(new Error(`Missing or invalid provider "${r.provider}".`));const f=this.client.buildUrl("/api/oauth2-redirect"),d=a?(m=this.client.cancelControllers)==null?void 0:m[a]:void 0;return d&&(d.signal.onabort=()=>{i()}),new Promise(async(v,w)=>{var g;try{await s.subscribe("@oauth2",async _=>{var E;const C=s.clientId;try{if(!_.state||C!==_.state)throw new Error("State parameters don't match.");if(_.error||!_.code)throw new Error("OAuth2 redirect error or missing code: "+_.error);const j=Object.assign({},r);delete j.provider,delete j.scopes,delete j.createData,delete j.urlCallback,(E=d==null?void 0:d.signal)!=null&&E.onabort&&(d.signal.onabort=null);const R=await this.authWithOAuth2Code(u.name,_.code,u.codeVerifier,f,r.createData,j);v(R)}catch(j){w(new Ir(j))}i()});const x={state:s.clientId};(g=r.scopes)!=null&&g.length&&(x.scope=r.scopes.join(" "));const p=this._replaceQueryParams(u.authUrl+f,x);await(r.urlCallback||function(_){n?n.location.href=_:n=S0(_)})(p)}catch(x){i(),w(new Ir(x))}})}).catch(l=>{throw i(),l})}async authRefresh(t,r){let n={method:"POST"};return n=Tr("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCollectionPath+"/auth-refresh",n).then(s=>this.authResponse(s))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=Tr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,i){let o={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return o=Tr("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",o,s,i),this.client.send(this.baseCollectionPath+"/confirm-password-reset",o).then(()=>!0)}async requestVerification(t,r,n){let s={method:"POST",body:{email:t}};return s=Tr("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,r,n){let s={method:"POST",body:{token:t}};return s=Tr("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const i=qo(t),o=this.client.authStore.model;return o&&!o.verified&&o.id===i.id&&o.collectionId===i.collectionId&&(o.verified=!0,this.client.authStore.save(this.client.authStore.token,o)),!0})}async requestEmailChange(t,r,n){let s={method:"POST",body:{newEmail:t}};return s=Tr("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,r,n,s){let i={method:"POST",body:{token:t,password:r}};return i=Tr("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",i,n,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",i).then(()=>{const o=qo(t),a=this.client.authStore.model;return a&&a.id===o.id&&a.collectionId===o.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,r){return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",r)}async unlinkExternalAuth(t,r,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(r),n).then(()=>!0)}_replaceQueryParams(t,r={}){let n=t,s="";t.indexOf("?")>=0&&(n=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const i={},o=s.split("&");for(const a of o){if(a=="")continue;const l=a.split("=");i[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let a in r)r.hasOwnProperty(a)&&(r[a]==null?delete i[a]:i[a]=r[a]);s="";for(let a in i)i.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(i[a].replace(/%20/g,"+")));return s!=""?n+"?"+s:n}}function S0(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Ir(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,r=768,n=window.innerWidth,s=window.innerHeight;t=t>n?n:t,r=r>s?s:r;let i=n/2-t/2,o=s/2-r/2;return window.open(e,"popup_window","width="+t+",height="+r+",top="+o+",left="+i+",resizable,menubar=no")}class tI extends dv{get baseCrudPath(){return"/api/collections"}async import(t,r=!1,n){return n=Object.assign({method:"PUT",body:{collections:t,deleteMissing:r}},n),this.client.send(this.baseCrudPath+"/import",n).then(()=>!0)}}class rI extends ao{async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send("/api/logs",n)}async getOne(t,r){if(!t)throw new Ir({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send("/api/logs/"+encodeURIComponent(t),r)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class nI extends ao{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class sI extends ao{getUrl(t,r,n={}){if(!r||!(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(r));let i=this.client.buildUrl(s.join("/"));if(Object.keys(n).length){n.download===!1&&delete n.download;const o=new URLSearchParams(n);i+=(i.includes("?")?"&":"?")+o}return i}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(r=>(r==null?void 0:r.token)||"")}}class iI extends ao{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,r){return r=Object.assign({method:"POST",body:{name:t}},r),this.client.send("/api/backups",r).then(()=>!0)}async upload(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send("/api/backups/upload",r).then(()=>!0)}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}`,r).then(()=>!0)}async restore(t,r){return r=Object.assign({method:"POST"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,r).then(()=>!0)}getDownloadUrl(t,r){return this.client.buildUrl(`/api/backups/${encodeURIComponent(r)}?token=${encodeURIComponent(t)}`)}}class oI{constructor(t="/",r,n="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=n,this.authStore=r||new qM,this.admins=new QM(this),this.collections=new tI(this),this.files=new sI(this),this.logs=new rI(this),this.settings=new XM(this),this.realtime=new zS(this),this.health=new nI(this),this.backups=new iI(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new eI(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,r){if(!r)return t;for(let n in r){let s=r[n];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("{:"+n+"}",s)}return t}getFileUrl(t,r,n={}){return this.files.getUrl(t,r,n)}buildUrl(t){var n;let r=this.baseUrl;return typeof window>"u"||!window.location||r.startsWith("https://")||r.startsWith("http://")||(r=(n=window.location.origin)!=null&&n.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(r+=window.location.pathname||"/",r+=r.endsWith("/")?"":"/"),r+=this.baseUrl),t&&(r+=r.endsWith("/")?"":"/",r+=t.startsWith("/")?t.substring(1):t),r}async send(t,r){r=this.initSendOptions(t,r);let n=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(n,r));s.url!==void 0||s.options!==void 0?(n=s.url||n,r=s.options||r):Object.keys(s).length&&(r=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(r.query!==void 0){const s=this.serializeQueryParams(r.query);s&&(n+=(n.includes("?")?"&":"?")+s),delete r.query}return this.getHeader(r.headers,"Content-Type")=="application/json"&&r.body&&typeof r.body!="string"&&(r.body=JSON.stringify(r.body)),(r.fetch||fetch)(n,r).then(async s=>{let i={};try{i=await s.json()}catch{}if(this.afterSend&&(i=await this.afterSend(s,i)),s.status>=400)throw new Ir({url:s.url,status:s.status,data:i});return i}).catch(s=>{throw new Ir(s)})}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=this.convertToFormDataIfNeeded(r.body),FS(r),r.query=Object.assign({},r.params,r.query),r.requestKey===void 0&&(r.$autoCancel===!1||r.query.$autoCancel===!1?r.requestKey=null:(r.$cancelKey||r.query.$cancelKey)&&(r.requestKey=r.$cancelKey||r.query.$cancelKey)),delete r.$autoCancel,delete r.query.$autoCancel,delete r.$cancelKey,delete r.query.$cancelKey,this.getHeader(r.headers,"Content-Type")!==null||this.isFormData(r.body)||(r.headers=Object.assign({},r.headers,{"Content-Type":"application/json"})),this.getHeader(r.headers,"Accept-Language")===null&&(r.headers=Object.assign({},r.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(r.headers,"Authorization")===null&&(r.headers=Object.assign({},r.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&r.requestKey!==null){const n=r.requestKey||(r.method||"GET")+t;delete r.requestKey,this.cancelRequest(n);const s=new AbortController;this.cancelControllers[n]=s,r.signal=s.signal}return r}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const r=new FormData;for(const n in t){const s=t[n];if(typeof s!="object"||this.hasBlobField({data:s})){const i=Array.isArray(s)?s:[s];for(let o of i)r.append(n,o)}else{let i={};i[n]=s,r.append("@jsonPayload",JSON.stringify(i))}}return r}hasBlobField(t){for(const r in t){const n=Array.isArray(t[r])?t[r]:[t[r]];for(const s of n)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,r){t=t||{},r=r.toLowerCase();for(let n in t)if(n.toLowerCase()==r)return t[n];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const r=[];for(const n in t){if(t[n]===null)continue;const s=t[n],i=encodeURIComponent(n);if(Array.isArray(s))for(const o of s)r.push(i+"="+encodeURIComponent(o));else s instanceof Date?r.push(i+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?r.push(i+"="+encodeURIComponent(JSON.stringify(s))):r.push(i+"="+encodeURIComponent(s))}return r.join("&")}}var aI={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const lI=aI.VITE_API_DOMAIN;console.log(lI);let lu;const ft=()=>lu||(lu=new oI("/"),lu);//! moment.js +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},sI="DialogDescriptionWarning",iI=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zS(sI).contentName}}.`;return y.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},sv=CS,iv=jS,ov=NS,vc=RS,yc=PS,xc=DS,wc=MS,yf=LS;const av=sv,lv=iv,oI=ov,US=y.forwardRef(({className:e,...t},r)=>c.jsx(vc,{className:le("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:r}));US.displayName=vc.displayName;const aI=dc("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"}}),xf=y.forwardRef(({side:e="right",className:t,children:r,...n},s)=>c.jsxs(oI,{children:[c.jsx(US,{}),c.jsxs(yc,{ref:s,className:le(aI({side:e}),t),...n,children:[r,c.jsxs(yf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(jg,{className:"h-4 w-4 dark:text-stone-200"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xf.displayName=yc.displayName;const cv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});cv.displayName="SheetHeader";const uv=y.forwardRef(({className:e,...t},r)=>c.jsx(xc,{ref:r,className:le("text-lg font-semibold text-foreground",e),...t}));uv.displayName=xc.displayName;const lI=y.forwardRef(({className:e,...t},r)=>c.jsx(wc,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));lI.displayName=wc.displayName;class Ir extends Error{constructor(t){var r,n,s,i;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Ir.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 Ir||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(r=this.response)==null?void 0:r.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.":(i=(s=(n=this.originalError)==null?void 0:n.cause)==null?void 0:s.message)!=null&&i.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 lu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function cI(e,t){const r={};if(typeof e!="string")return r;const n=Object.assign({},{}).decode||uI;let s=0;for(;s0&&(!r.exp||r.exp-t>Date.now()/1e3))}VS=typeof atob!="function"||fI?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 r,n,s=0,i=0,o="";n=t.charAt(i++);~n&&(r=s%4?64*r+n:n,s++%4)?o+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return o}:atob;const E0="pb_auth";class hI{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!$S(this.token)}get isAdmin(){return qo(this.token).type==="admin"}get isAuthRecord(){return qo(this.token).type==="authRecord"}save(t,r){this.baseToken=t||"",this.baseModel=r||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,r=E0){const n=cI(t||"")[r]||"";let s={};try{s=JSON.parse(n),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,r=E0){var l,u;const n={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=qo(this.token);n.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},n,t);const i={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let o=C0(r,JSON.stringify(i),t);const a=typeof Blob<"u"?new Blob([o]).size:o.length;if(i.model&&a>4096){i.model={id:(l=i==null?void 0:i.model)==null?void 0:l.id,email:(u=i==null?void 0:i.model)==null?void 0:u.email};const f=["collectionId","username","verified"];for(const d in this.model)f.includes(d)&&(i.model[d]=this.model[d]);o=C0(r,JSON.stringify(i),t)}return o}onChange(t,r=!1){return this._onChangeCallbacks.push(t),r&&t(this.token,this.model),()=>{for(let n=this._onChangeCallbacks.length-1;n>=0;n--)if(this._onChangeCallbacks[n]==t)return delete this._onChangeCallbacks[n],void this._onChangeCallbacks.splice(n,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class pI extends hI{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,r){this._storageSet(this.storageKey,{token:t,model:r}),super.save(t,r)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const r=window.localStorage.getItem(t)||"";try{return JSON.parse(r)}catch{return r}}return this.storageFallback[t]}_storageSet(t,r){if(typeof window<"u"&&(window!=null&&window.localStorage)){let n=r;typeof r!="string"&&(n=JSON.stringify(r)),window.localStorage.setItem(t,n)}else this.storageFallback[t]=r}_storageRemove(t){var r;typeof window<"u"&&(window!=null&&window.localStorage)&&((r=window.localStorage)==null||r.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 r=this._storageGet(this.storageKey)||{};super.save(r.token||"",r.model||null)})}}class ao{constructor(t){this.client=t}}class mI extends ao{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,r){return r=Object.assign({method:"PATCH",body:t},r),this.client.send("/api/settings",r)}async testS3(t="storage",r){return r=Object.assign({method:"POST",body:{filesystem:t}},r),this.client.send("/api/settings/test/s3",r).then(()=>!0)}async testEmail(t,r,n){return n=Object.assign({method:"POST",body:{email:t,template:r}},n),this.client.send("/api/settings/test/email",n).then(()=>!0)}async generateAppleClientSecret(t,r,n,s,i,o){return o=Object.assign({method:"POST",body:{clientId:t,teamId:r,keyId:n,privateKey:s,duration:i}},o),this.client.send("/api/settings/apple/generate-client-secret",o)}}class dv extends ao{decode(t){return t}async getFullList(t,r){if(typeof t=="number")return this._getFullList(t,r);let n=500;return(r=Object.assign({},t,r)).batch&&(n=r.batch,delete r.batch),this._getFullList(n,r)}async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send(this.baseCrudPath,n).then(s=>{var i;return s.items=((i=s.items)==null?void 0:i.map(o=>this.decode(o)))||[],s})}async getFirstListItem(t,r){return(r=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},r)).query=Object.assign({filter:t,skipTotal:1},r.query),this.getList(1,1,r).then(n=>{var s;if(!((s=n==null?void 0:n.items)!=null&&s.length))throw new Ir({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return n.items[0]})}async getOne(t,r){if(!t)throw new Ir({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(n=>this.decode(n))}async create(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send(this.baseCrudPath,r).then(n=>this.decode(n))}async update(t,r,n){return n=Object.assign({method:"PATCH",body:r},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(s=>this.decode(s))}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(()=>!0)}_getFullList(t=500,r){(r=r||{}).query=Object.assign({skipTotal:1},r.query);let n=[],s=async i=>this.getList(i,t||500,r).then(o=>{const a=o.items;return n=n.concat(a),a.length==o.perPage?s(i+1):n});return s(1)}}function Tr(e,t,r,n){const s=n!==void 0;return s||r!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,r),t.query=Object.assign({},t.query,n),t):Object.assign(t,r):t}function Mh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class gI extends dv{get baseCrudPath(){return"/api/admins"}async update(t,r,n){return super.update(t,r,n).then(s=>{var i,o;return((i=this.client.authStore.model)==null?void 0:i.id)===s.id&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,r){return super.delete(t,r).then(n=>{var s,i;return n&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:r})}async authWithPassword(t,r,n,s){let i={method:"POST",body:{identity:t,password:r}};i=Tr("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",i,n,s);const o=i.autoRefreshThreshold;delete i.autoRefreshThreshold,i.autoRefresh||Mh(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",i);return a=this.authResponse(a),o&&function(u,f,d,m){Mh(u);const v=u.beforeSend,w=u.authStore.model,g=u.authStore.onChange((x,p)=>{(!x||(p==null?void 0:p.id)!=(w==null?void 0:w.id)||(p!=null&&p.collectionId||w!=null&&w.collectionId)&&(p==null?void 0:p.collectionId)!=(w==null?void 0:w.collectionId))&&Mh(u)});u._resetAutoRefresh=function(){g(),u.beforeSend=v,delete u._resetAutoRefresh},u.beforeSend=async(x,p)=>{var E;const h=u.authStore.token;if((E=p.query)!=null&&E.autoRefresh)return v?v(x,p):{url:x,sendOptions:p};let _=u.authStore.isValid;if(_&&$S(u.authStore.token,f))try{await d()}catch{_=!1}_||await m();const C=p.headers||{};for(let j in C)if(j.toLowerCase()=="authorization"&&h==C[j]&&u.authStore.token){C[j]=u.authStore.token;break}return p.headers=C,v?v(x,p):{url:x,sendOptions:p}}}(this.client,o,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,r,Object.assign({autoRefresh:!0},i))),a}async authRefresh(t,r){let n={method:"POST"};return n=Tr("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCrudPath+"/auth-refresh",n).then(this.authResponse.bind(this))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=Tr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,i){let o={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return o=Tr("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",o,s,i),this.client.send(this.baseCrudPath+"/confirm-password-reset",o).then(()=>!0)}}const vI=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function BS(e){if(e){e.query=e.query||{};for(let t in e)vI.includes(t)||(e.query[t]=e[t],delete e[t])}}class WS extends ao{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,r,n){var o;if(!t)throw new Error("topic must be set.");let s=t;if(n){BS(n);const a="options="+encodeURIComponent(JSON.stringify({query:n.query,headers:n.headers}));s+=(s.includes("?")?"&":"?")+a}const i=function(a){const l=a;let u;try{u=JSON.parse(l==null?void 0:l.data)}catch{}r(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(i),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(o=this.eventSource)==null||o.addEventListener(s,i):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,i)}async unsubscribe(t){var n;let r=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let i in s)if(this.hasSubscriptionListeners(i)){for(let o of this.subscriptions[i])(n=this.eventSource)==null||n.removeEventListener(i,o);delete this.subscriptions[i],r||(r=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var n;let r=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){r=!0;for(let i of this.subscriptions[s])(n=this.eventSource)==null||n.removeEventListener(s,i);delete this.subscriptions[s]}r&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,r){var i;let n=!1;const s=this.getSubscriptionsByTopic(t);for(let o in s){if(!Array.isArray(this.subscriptions[o])||!this.subscriptions[o].length)continue;let a=!1;for(let l=this.subscriptions[o].length-1;l>=0;l--)this.subscriptions[o][l]===r&&(a=!0,delete this.subscriptions[o][l],this.subscriptions[o].splice(l,1),(i=this.eventSource)==null||i.removeEventListener(o,r));a&&(this.subscriptions[o].length||delete this.subscriptions[o],n||this.hasSubscriptionListeners(o)||(n=!0))}this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var r,n;if(this.subscriptions=this.subscriptions||{},t)return!!((r=this.subscriptions[t])!=null&&r.length);for(let s in this.subscriptions)if((n=this.subscriptions[s])!=null&&n.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 r={};t=t.includes("?")?t:t+"?";for(let n in this.subscriptions)(n+"?").startsWith(t)&&(r[n]=this.subscriptions[n]);return r}getNonEmptySubscriptionKeys(){const t=[];for(let r in this.subscriptions)this.subscriptions[r].length&&t.push(r);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.addEventListener(t,r)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.removeEventListener(t,r)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,r)=>{this.pendingConnects.push({resolve:t,reject:r}),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 r=t;this.clientId=r==null?void 0:r.lastEventId,this.submitSubscriptions().then(async()=>{let n=3;for(;this.hasUnsentSubscriptions()&&n>0;)n--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const n=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in n)for(let i of n[s])i(t)}).catch(n=>{this.clientId="",this.connectErrorHandler(n)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const r of t)if(!this.lastSentSubscriptions.includes(r))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let n of this.pendingConnects)n.reject(new Ir(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const r=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},r)}disconnect(t=!1){var r;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(r=this.eventSource)==null||r.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let n of this.pendingConnects)n.resolve();this.pendingConnects=[]}}}class yI extends dv{constructor(t,r){super(t),this.collectionIdOrName=r}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,r,n){if(!t)throw new Error("Missing topic.");if(!r)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,r,n)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,r){if(typeof t=="number")return super.getFullList(t,r);const n=Object.assign({},t,r);return super.getFullList(n)}async getList(t=1,r=30,n){return super.getList(t,r,n)}async getFirstListItem(t,r){return super.getFirstListItem(t,r)}async getOne(t,r){return super.getOne(t,r)}async create(t,r){return super.create(t,r)}async update(t,r,n){return super.update(t,r,n).then(s=>{var i,o,a;return((i=this.client.authStore.model)==null?void 0:i.id)!==(s==null?void 0:s.id)||((o=this.client.authStore.model)==null?void 0:o.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,r){return super.delete(t,r).then(n=>{var s,i,o;return!n||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((o=this.client.authStore.model)==null?void 0:o.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:r})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(r=>Object.assign({},r,{usernamePassword:!!(r!=null&&r.usernamePassword),emailPassword:!!(r!=null&&r.emailPassword),authProviders:Array.isArray(r==null?void 0:r.authProviders)?r==null?void 0:r.authProviders:[]}))}async authWithPassword(t,r,n,s){let i={method:"POST",body:{identity:t,password:r}};return i=Tr("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",i,n,s),this.client.send(this.baseCollectionPath+"/auth-with-password",i).then(o=>this.authResponse(o))}async authWithOAuth2Code(t,r,n,s,i,o,a){let l={method:"POST",body:{provider:t,code:r,codeVerifier:n,redirectUrl:s,createData:i}};return l=Tr("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,o,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const r=(t==null?void 0:t[0])||{};let n=null;r.urlCallback||(n=j0(void 0));const s=new WS(this.client);function i(){n==null||n.close(),s.unsubscribe()}const o={},a=r.requestKey;return a&&(o.requestKey=a),this.listAuthMethods(o).then(l=>{var m;const u=l.authProviders.find(v=>v.name===r.provider);if(!u)throw new Ir(new Error(`Missing or invalid provider "${r.provider}".`));const f=this.client.buildUrl("/api/oauth2-redirect"),d=a?(m=this.client.cancelControllers)==null?void 0:m[a]:void 0;return d&&(d.signal.onabort=()=>{i()}),new Promise(async(v,w)=>{var g;try{await s.subscribe("@oauth2",async _=>{var E;const C=s.clientId;try{if(!_.state||C!==_.state)throw new Error("State parameters don't match.");if(_.error||!_.code)throw new Error("OAuth2 redirect error or missing code: "+_.error);const j=Object.assign({},r);delete j.provider,delete j.scopes,delete j.createData,delete j.urlCallback,(E=d==null?void 0:d.signal)!=null&&E.onabort&&(d.signal.onabort=null);const R=await this.authWithOAuth2Code(u.name,_.code,u.codeVerifier,f,r.createData,j);v(R)}catch(j){w(new Ir(j))}i()});const x={state:s.clientId};(g=r.scopes)!=null&&g.length&&(x.scope=r.scopes.join(" "));const p=this._replaceQueryParams(u.authUrl+f,x);await(r.urlCallback||function(_){n?n.location.href=_:n=j0(_)})(p)}catch(x){i(),w(new Ir(x))}})}).catch(l=>{throw i(),l})}async authRefresh(t,r){let n={method:"POST"};return n=Tr("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCollectionPath+"/auth-refresh",n).then(s=>this.authResponse(s))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=Tr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,i){let o={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return o=Tr("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",o,s,i),this.client.send(this.baseCollectionPath+"/confirm-password-reset",o).then(()=>!0)}async requestVerification(t,r,n){let s={method:"POST",body:{email:t}};return s=Tr("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,r,n){let s={method:"POST",body:{token:t}};return s=Tr("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const i=qo(t),o=this.client.authStore.model;return o&&!o.verified&&o.id===i.id&&o.collectionId===i.collectionId&&(o.verified=!0,this.client.authStore.save(this.client.authStore.token,o)),!0})}async requestEmailChange(t,r,n){let s={method:"POST",body:{newEmail:t}};return s=Tr("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,r,n,s){let i={method:"POST",body:{token:t,password:r}};return i=Tr("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",i,n,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",i).then(()=>{const o=qo(t),a=this.client.authStore.model;return a&&a.id===o.id&&a.collectionId===o.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,r){return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",r)}async unlinkExternalAuth(t,r,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(r),n).then(()=>!0)}_replaceQueryParams(t,r={}){let n=t,s="";t.indexOf("?")>=0&&(n=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const i={},o=s.split("&");for(const a of o){if(a=="")continue;const l=a.split("=");i[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let a in r)r.hasOwnProperty(a)&&(r[a]==null?delete i[a]:i[a]=r[a]);s="";for(let a in i)i.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(i[a].replace(/%20/g,"+")));return s!=""?n+"?"+s:n}}function j0(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Ir(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,r=768,n=window.innerWidth,s=window.innerHeight;t=t>n?n:t,r=r>s?s:r;let i=n/2-t/2,o=s/2-r/2;return window.open(e,"popup_window","width="+t+",height="+r+",top="+o+",left="+i+",resizable,menubar=no")}class xI extends dv{get baseCrudPath(){return"/api/collections"}async import(t,r=!1,n){return n=Object.assign({method:"PUT",body:{collections:t,deleteMissing:r}},n),this.client.send(this.baseCrudPath+"/import",n).then(()=>!0)}}class wI extends ao{async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send("/api/logs",n)}async getOne(t,r){if(!t)throw new Ir({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send("/api/logs/"+encodeURIComponent(t),r)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class _I extends ao{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class bI extends ao{getUrl(t,r,n={}){if(!r||!(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(r));let i=this.client.buildUrl(s.join("/"));if(Object.keys(n).length){n.download===!1&&delete n.download;const o=new URLSearchParams(n);i+=(i.includes("?")?"&":"?")+o}return i}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(r=>(r==null?void 0:r.token)||"")}}class SI extends ao{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,r){return r=Object.assign({method:"POST",body:{name:t}},r),this.client.send("/api/backups",r).then(()=>!0)}async upload(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send("/api/backups/upload",r).then(()=>!0)}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}`,r).then(()=>!0)}async restore(t,r){return r=Object.assign({method:"POST"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,r).then(()=>!0)}getDownloadUrl(t,r){return this.client.buildUrl(`/api/backups/${encodeURIComponent(r)}?token=${encodeURIComponent(t)}`)}}class kI{constructor(t="/",r,n="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=n,this.authStore=r||new pI,this.admins=new gI(this),this.collections=new xI(this),this.files=new bI(this),this.logs=new wI(this),this.settings=new mI(this),this.realtime=new WS(this),this.health=new _I(this),this.backups=new SI(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new yI(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,r){if(!r)return t;for(let n in r){let s=r[n];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("{:"+n+"}",s)}return t}getFileUrl(t,r,n={}){return this.files.getUrl(t,r,n)}buildUrl(t){var n;let r=this.baseUrl;return typeof window>"u"||!window.location||r.startsWith("https://")||r.startsWith("http://")||(r=(n=window.location.origin)!=null&&n.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(r+=window.location.pathname||"/",r+=r.endsWith("/")?"":"/"),r+=this.baseUrl),t&&(r+=r.endsWith("/")?"":"/",r+=t.startsWith("/")?t.substring(1):t),r}async send(t,r){r=this.initSendOptions(t,r);let n=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(n,r));s.url!==void 0||s.options!==void 0?(n=s.url||n,r=s.options||r):Object.keys(s).length&&(r=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(r.query!==void 0){const s=this.serializeQueryParams(r.query);s&&(n+=(n.includes("?")?"&":"?")+s),delete r.query}return this.getHeader(r.headers,"Content-Type")=="application/json"&&r.body&&typeof r.body!="string"&&(r.body=JSON.stringify(r.body)),(r.fetch||fetch)(n,r).then(async s=>{let i={};try{i=await s.json()}catch{}if(this.afterSend&&(i=await this.afterSend(s,i)),s.status>=400)throw new Ir({url:s.url,status:s.status,data:i});return i}).catch(s=>{throw new Ir(s)})}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=this.convertToFormDataIfNeeded(r.body),BS(r),r.query=Object.assign({},r.params,r.query),r.requestKey===void 0&&(r.$autoCancel===!1||r.query.$autoCancel===!1?r.requestKey=null:(r.$cancelKey||r.query.$cancelKey)&&(r.requestKey=r.$cancelKey||r.query.$cancelKey)),delete r.$autoCancel,delete r.query.$autoCancel,delete r.$cancelKey,delete r.query.$cancelKey,this.getHeader(r.headers,"Content-Type")!==null||this.isFormData(r.body)||(r.headers=Object.assign({},r.headers,{"Content-Type":"application/json"})),this.getHeader(r.headers,"Accept-Language")===null&&(r.headers=Object.assign({},r.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(r.headers,"Authorization")===null&&(r.headers=Object.assign({},r.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&r.requestKey!==null){const n=r.requestKey||(r.method||"GET")+t;delete r.requestKey,this.cancelRequest(n);const s=new AbortController;this.cancelControllers[n]=s,r.signal=s.signal}return r}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const r=new FormData;for(const n in t){const s=t[n];if(typeof s!="object"||this.hasBlobField({data:s})){const i=Array.isArray(s)?s:[s];for(let o of i)r.append(n,o)}else{let i={};i[n]=s,r.append("@jsonPayload",JSON.stringify(i))}}return r}hasBlobField(t){for(const r in t){const n=Array.isArray(t[r])?t[r]:[t[r]];for(const s of n)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,r){t=t||{},r=r.toLowerCase();for(let n in t)if(n.toLowerCase()==r)return t[n];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const r=[];for(const n in t){if(t[n]===null)continue;const s=t[n],i=encodeURIComponent(n);if(Array.isArray(s))for(const o of s)r.push(i+"="+encodeURIComponent(o));else s instanceof Date?r.push(i+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?r.push(i+"="+encodeURIComponent(JSON.stringify(s))):r.push(i+"="+encodeURIComponent(s))}return r.join("&")}}var CI={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const EI=CI.VITE_API_DOMAIN;console.log(EI);let cu;const ft=()=>cu||(cu=new kI("/"),cu);//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var US;function ve(){return US.apply(null,arguments)}function cI(e){US=e}function Sn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Wi(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function lt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function fv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(lt(e,t))return!1;return!0}function xr(e){return e===void 0}function Ss(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function wc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function VS(e,t){var r=[],n,s=e.length;for(n=0;n>>0,n;for(n=0;n0)for(r=0;r>>0,n;for(n=0;n0)for(r=0;r=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var gv=/(\[[^\[]*\])|(\\)?([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,cu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Fh={},Xo={};function Oe(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Xo[e]=s),t&&(Xo[t[0]]=function(){return Wn(s.apply(this,arguments),t[1],t[2])}),r&&(Xo[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function pI(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function mI(e){var t=e.match(gv),r,n;for(r=0,n=t.length;r=0&&cu.test(e);)e=e.replace(cu,n),cu.lastIndex=0,r-=1;return e}var gI={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 vI(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(gv).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var yI="Invalid date";function xI(){return this._invalidDate}var wI="%d",_I=/\d{1,2}/;function bI(e){return this._ordinal.replace("%d",e)}var SI={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 kI(e,t,r,n){var s=this._relativeTime[r];return Kn(s)?s(e,t,r,n):s.replace(/%d/i,e)}function CI(e,t){var r=this._relativeTime[e>0?"future":"past"];return Kn(r)?r(t):r.replace(/%s/i,t)}var E0={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 on(e){return typeof e=="string"?E0[e]||E0[e.toLowerCase()]:void 0}function vv(e){var t={},r,n;for(n in e)lt(e,n)&&(r=on(n),r&&(t[r]=e[n]));return t}var EI={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 jI(e){var t=[],r;for(r in e)lt(e,r)&&t.push({unit:r,priority:EI[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var HS=/\d/,Vr=/\d\d/,YS=/\d{3}/,yv=/\d{4}/,_f=/[+-]?\d{6}/,Ct=/\d\d?/,ZS=/\d\d\d\d?/,KS=/\d\d\d\d\d\d?/,bf=/\d{1,3}/,xv=/\d{1,4}/,Sf=/[+-]?\d{1,6}/,Ea=/\d+/,kf=/[+-]?\d+/,TI=/Z|[+-]\d\d:?\d\d/gi,Cf=/Z|[+-]\d\d(?::?\d\d)?/gi,NI=/[+-]?\d+(\.\d{1,3})?/,bc=/[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,ja=/^[1-9]\d?/,wv=/^([1-9]\d|\d)/,yd;yd={};function _e(e,t,r){yd[e]=Kn(t)?t:function(n,s){return n&&r?r:t}}function RI(e,t){return lt(yd,e)?yd[e](t._strict,t._locale):new RegExp(PI(e))}function PI(e){return ps(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,i){return r||n||s||i}))}function ps(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function qr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rt(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=qr(t)),r}var rm={};function gt(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),Ss(t)&&(n=function(i,o){o[t]=rt(i)}),s=e.length,r=0;r68?1900:2e3)};var GS=Ta("FullYear",!0);function MI(){return Ef(this.year())}function Ta(e,t){return function(r){return r!=null?(qS(this,e,r),ve.updateOffset(this,t),this):$l(this,e)}}function $l(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function qS(e,t,r){var n,s,i,o,a;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}i=r,o=e.month(),a=e.date(),a=a===29&&o===1&&!Ef(i)?28:a,s?n.setUTCFullYear(i,o,a):n.setFullYear(i,o,a)}}function II(e){return e=on(e),Kn(this[e])?this[e]():this}function LI(e,t){if(typeof e=="object"){e=vv(e);var r=jI(e),n,s=r.length;for(n=0;n=0?(a=new Date(e+400,t,r,n,s,i,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,s,i,o),a}function Wl(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function xd(e,t,r){var n=7+t-r,s=(7+Wl(e,0,n).getUTCDay()-t)%7;return-s+n-1}function rk(e,t,r,n,s){var i=(7+r-n)%7,o=xd(e,n,s),a=1+7*(t-1)+i+o,l,u;return a<=0?(l=e-1,u=fl(l)+a):a>fl(e)?(l=e+1,u=a-fl(e)):(l=e,u=a),{year:l,dayOfYear:u}}function Bl(e,t,r){var n=xd(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,i,o;return s<1?(o=e.year()-1,i=s+ms(o,t,r)):s>ms(e.year(),t,r)?(i=s-ms(e.year(),t,r),o=e.year()+1):(o=e.year(),i=s),{week:i,year:o}}function ms(e,t,r){var n=xd(e,t,r),s=xd(e+1,t,r);return(fl(e)-n+s)/7}Oe("w",["ww",2],"wo","week");Oe("W",["WW",2],"Wo","isoWeek");_e("w",Ct,ja);_e("ww",Ct,Vr);_e("W",Ct,ja);_e("WW",Ct,Vr);Sc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=rt(e)});function qI(e){return Bl(e,this._week.dow,this._week.doy).week}var XI={dow:0,doy:6};function QI(){return this._week.dow}function JI(){return this._week.doy}function eL(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function tL(e){var t=Bl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Oe("d",0,"do","day");Oe("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Oe("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Oe("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Oe("e",0,0,"weekday");Oe("E",0,0,"isoWeekday");_e("d",Ct);_e("e",Ct);_e("E",Ct);_e("dd",function(e,t){return t.weekdaysMinRegex(e)});_e("ddd",function(e,t){return t.weekdaysShortRegex(e)});_e("dddd",function(e,t){return t.weekdaysRegex(e)});Sc(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Ke(r).invalidWeekday=e});Sc(["d","e","E"],function(e,t,r,n){t[n]=rt(e)});function rL(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function nL(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function bv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var sL="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),nk="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),iL="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),oL=bc,aL=bc,lL=bc;function cL(e,t){var r=Sn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?bv(r,this._week.dow):e?r[e.day()]:r}function uL(e){return e===!0?bv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function dL(e){return e===!0?bv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function fL(e,t,r){var n,s,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=Zn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(s=zt.call(this._weekdaysParse,o),s!==-1?s:null):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,o),s!==-1?s:null):(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null):t==="dddd"?(s=zt.call(this._weekdaysParse,o),s!==-1||(s=zt.call(this._shortWeekdaysParse,o),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null)):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,o),s!==-1||(s=zt.call(this._weekdaysParse,o),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null)):(s=zt.call(this._minWeekdaysParse,o),s!==-1||(s=zt.call(this._weekdaysParse,o),s!==-1)?s:(s=zt.call(this._shortWeekdaysParse,o),s!==-1?s:null))}function hL(e,t,r){var n,s,i;if(this._weekdaysParseExact)return fL.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Zn([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function pL(e){if(!this.isValid())return e!=null?this:NaN;var t=$l(this,"Day");return e!=null?(e=rL(e,this.localeData()),this.add(e-t,"d")):t}function mL(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 gL(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=nL(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function vL(e){return this._weekdaysParseExact?(lt(this,"_weekdaysRegex")||Sv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(lt(this,"_weekdaysRegex")||(this._weekdaysRegex=oL),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function yL(e){return this._weekdaysParseExact?(lt(this,"_weekdaysRegex")||Sv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(lt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=aL),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function xL(e){return this._weekdaysParseExact?(lt(this,"_weekdaysRegex")||Sv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(lt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=lL),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Sv(){function e(f,d){return d.length-f.length}var t=[],r=[],n=[],s=[],i,o,a,l,u;for(i=0;i<7;i++)o=Zn([2e3,1]).day(i),a=ps(this.weekdaysMin(o,"")),l=ps(this.weekdaysShort(o,"")),u=ps(this.weekdays(o,"")),t.push(a),r.push(l),n.push(u),s.push(a),s.push(l),s.push(u);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function kv(){return this.hours()%12||12}function wL(){return this.hours()||24}Oe("H",["HH",2],0,"hour");Oe("h",["hh",2],0,kv);Oe("k",["kk",2],0,wL);Oe("hmm",0,0,function(){return""+kv.apply(this)+Wn(this.minutes(),2)});Oe("hmmss",0,0,function(){return""+kv.apply(this)+Wn(this.minutes(),2)+Wn(this.seconds(),2)});Oe("Hmm",0,0,function(){return""+this.hours()+Wn(this.minutes(),2)});Oe("Hmmss",0,0,function(){return""+this.hours()+Wn(this.minutes(),2)+Wn(this.seconds(),2)});function sk(e,t){Oe(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}sk("a",!0);sk("A",!1);function ik(e,t){return t._meridiemParse}_e("a",ik);_e("A",ik);_e("H",Ct,wv);_e("h",Ct,ja);_e("k",Ct,ja);_e("HH",Ct,Vr);_e("hh",Ct,Vr);_e("kk",Ct,Vr);_e("hmm",ZS);_e("hmmss",KS);_e("Hmm",ZS);_e("Hmmss",KS);gt(["H","HH"],Gt);gt(["k","kk"],function(e,t,r){var n=rt(e);t[Gt]=n===24?0:n});gt(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});gt(["h","hh"],function(e,t,r){t[Gt]=rt(e),Ke(r).bigHour=!0});gt("hmm",function(e,t,r){var n=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n)),Ke(r).bigHour=!0});gt("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n,2)),t[ds]=rt(e.substr(s)),Ke(r).bigHour=!0});gt("Hmm",function(e,t,r){var n=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n))});gt("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n,2)),t[ds]=rt(e.substr(s))});function _L(e){return(e+"").toLowerCase().charAt(0)==="p"}var bL=/[ap]\.?m?\.?/i,SL=Ta("Hours",!0);function kL(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var ok={calendar:fI,longDateFormat:gI,invalidDate:yI,ordinal:wI,dayOfMonthOrdinalParse:_I,relativeTime:SI,months:zI,monthsShort:XS,week:XI,weekdays:sL,weekdaysMin:iL,weekdaysShort:nk,meridiemParse:bL},Tt={},Ba={},Hl;function CL(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r0;){if(s=jf(i.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&CL(i,n)>=r-1)break;r--}t++}return Hl}function jL(e){return!!(e&&e.match("^[^/\\\\]*$"))}function jf(e){var t=null,r;if(Tt[e]===void 0&&typeof Lu<"u"&&Lu&&Lu.exports&&jL(e))try{t=Hl._abbr,r=require,r("./locale/"+e),oi(t)}catch{Tt[e]=null}return Tt[e]}function oi(e,t){var r;return e&&(xr(t)?r=Rs(e):r=Cv(e,t),r?Hl=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Hl._abbr}function Cv(e,t){if(t!==null){var r,n=ok;if(t.abbr=e,Tt[e]!=null)WS("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."),n=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)n=Tt[t.parentLocale]._config;else if(r=jf(t.parentLocale),r!=null)n=r._config;else return Ba[t.parentLocale]||(Ba[t.parentLocale]=[]),Ba[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new mv(em(n,t)),Ba[e]&&Ba[e].forEach(function(s){Cv(s.name,s.config)}),oi(e),Tt[e]}else return delete Tt[e],null}function TL(e,t){if(t!=null){var r,n,s=ok;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(em(Tt[e]._config,t)):(n=jf(e),n!=null&&(s=n._config),t=em(s,t),n==null&&(t.abbr=e),r=new mv(t),r.parentLocale=Tt[e],Tt[e]=r),oi(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===oi()&&oi(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function Rs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Hl;if(!Sn(e)){if(t=jf(e),t)return t;e=[e]}return EL(e)}function NL(){return tm(Tt)}function Ev(e){var t,r=e._a;return r&&Ke(e).overflow===-2&&(t=r[us]<0||r[us]>11?us:r[On]<1||r[On]>_v(r[lr],r[us])?On:r[Gt]<0||r[Gt]>24||r[Gt]===24&&(r[mn]!==0||r[ds]!==0||r[zi]!==0)?Gt:r[mn]<0||r[mn]>59?mn:r[ds]<0||r[ds]>59?ds:r[zi]<0||r[zi]>999?zi:-1,Ke(e)._overflowDayOfYear&&(tOn)&&(t=On),Ke(e)._overflowWeeks&&t===-1&&(t=DI),Ke(e)._overflowWeekday&&t===-1&&(t=OI),Ke(e).overflow=t),e}var RL=/^\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)?)?$/,PL=/^\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)?)?$/,AL=/Z|[+-]\d\d(?::?\d\d)?/,uu=[["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]],zh=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],DL=/^\/?Date\((-?\d+)/i,OL=/^(?:(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}))$/,ML={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 ak(e){var t,r,n=e._i,s=RL.exec(n)||PL.exec(n),i,o,a,l,u=uu.length,f=zh.length;if(s){for(Ke(e).iso=!0,t=0,r=u;tfl(o)||e._dayOfYear===0)&&(Ke(e)._overflowDayOfYear=!0),r=Wl(o,0,e._dayOfYear),e._a[us]=r.getUTCMonth(),e._a[On]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Gt]===24&&e._a[mn]===0&&e._a[ds]===0&&e._a[zi]===0&&(e._nextDay=!0,e._a[Gt]=0),e._d=(e._useUTC?Wl:GI).apply(null,n),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Gt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(Ke(e).weekdayMismatch=!0)}}function WL(e){var t,r,n,s,i,o,a,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,o=4,r=bo(t.GG,e._a[lr],Bl(kt(),1,4).year),n=bo(t.W,1),s=bo(t.E,1),(s<1||s>7)&&(l=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,u=Bl(kt(),i,o),r=bo(t.gg,e._a[lr],u.year),n=bo(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(l=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(l=!0)):s=i),n<1||n>ms(r,i,o)?Ke(e)._overflowWeeks=!0:l!=null?Ke(e)._overflowWeekday=!0:(a=rk(r,n,s,i,o),e._a[lr]=a.year,e._dayOfYear=a.dayOfYear)}ve.ISO_8601=function(){};ve.RFC_2822=function(){};function Tv(e){if(e._f===ve.ISO_8601){ak(e);return}if(e._f===ve.RFC_2822){lk(e);return}e._a=[],Ke(e).empty=!0;var t=""+e._i,r,n,s,i,o,a=t.length,l=0,u,f;for(s=BS(e._f,e._locale).match(gv)||[],f=s.length,r=0;r0&&Ke(e).unusedInput.push(o),t=t.slice(t.indexOf(n)+n.length),l+=n.length),Xo[i]?(n?Ke(e).empty=!1:Ke(e).unusedTokens.push(i),AI(i,n,e)):e._strict&&!n&&Ke(e).unusedTokens.push(i);Ke(e).charsLeftOver=a-l,t.length>0&&Ke(e).unusedInput.push(t),e._a[Gt]<=12&&Ke(e).bigHour===!0&&e._a[Gt]>0&&(Ke(e).bigHour=void 0),Ke(e).parsedDateParts=e._a.slice(0),Ke(e).meridiem=e._meridiem,e._a[Gt]=BL(e._locale,e._a[Gt],e._meridiem),u=Ke(e).era,u!==null&&(e._a[lr]=e._locale.erasConvertYear(u,e._a[lr])),jv(e),Ev(e)}function BL(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function HL(e){var t,r,n,s,i,o,a=!1,l=e._f.length;if(l===0){Ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:wf()});function dk(e,t){var r,n;if(t.length===1&&Sn(t[0])&&(t=t[0]),!t.length)return kt();for(r=t[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function f4(){if(!xr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return pv(e,this),e=ck(e),e._a?(t=e._isUTC?Zn(e._a):kt(e._a),this._isDSTShifted=this.isValid()&&n4(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function h4(){return this.isValid()?!this._isUTC:!1}function p4(){return this.isValid()?this._isUTC:!1}function hk(){return this.isValid()?this._isUTC&&this._offset===0:!1}var m4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,g4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function jn(e,t){var r=e,n=null,s,i,o;return Au(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Ss(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=m4.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:rt(n[On])*s,h:rt(n[Gt])*s,m:rt(n[mn])*s,s:rt(n[ds])*s,ms:rt(nm(n[zi]*1e3))*s}):(n=g4.exec(e))?(s=n[1]==="-"?-1:1,r={y:ji(n[2],s),M:ji(n[3],s),w:ji(n[4],s),d:ji(n[5],s),h:ji(n[6],s),m:ji(n[7],s),s:ji(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(o=v4(kt(r.from),kt(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),i=new Tf(r),Au(e)&<(e,"_locale")&&(i._locale=e._locale),Au(e)&<(e,"_isValid")&&(i._isValid=e._isValid),i}jn.fn=Tf.prototype;jn.invalid=r4;function ji(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function T0(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function v4(e,t){var r;return e.isValid()&&t.isValid()?(t=Rv(t,e),e.isBefore(t)?r=T0(e,t):(r=T0(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function pk(e,t){return function(r,n){var s,i;return n!==null&&!isNaN(+n)&&(WS(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."),i=r,r=n,n=i),s=jn(r,n),mk(this,s,e),this}}function mk(e,t,r,n){var s=t._milliseconds,i=nm(t._days),o=nm(t._months);e.isValid()&&(n=n??!0,o&&JS(e,$l(e,"Month")+o*r),i&&qS(e,"Date",$l(e,"Date")+i*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&ve.updateOffset(e,i||o))}var y4=pk(1,"add"),x4=pk(-1,"subtract");function gk(e){return typeof e=="string"||e instanceof String}function w4(e){return kn(e)||wc(e)||gk(e)||Ss(e)||b4(e)||_4(e)||e===null||e===void 0}function _4(e){var t=Wi(e)&&!fv(e),r=!1,n=["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,i,o=n.length;for(s=0;sr.valueOf():r.valueOf()9999?Pu(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Kn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Pu(r,"Z")):Pu(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function I4(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(r+n+s+i)}function L4(e){e||(e=this.isUtc()?ve.defaultFormatUtc:ve.defaultFormat);var t=Pu(this,e);return this.localeData().postformat(t)}function F4(e,t){return this.isValid()&&(kn(e)&&e.isValid()||kt(e).isValid())?jn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function z4(e){return this.from(kt(),e)}function U4(e,t){return this.isValid()&&(kn(e)&&e.isValid()||kt(e).isValid())?jn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function V4(e){return this.to(kt(),e)}function vk(e){var t;return e===void 0?this._locale._abbr:(t=Rs(e),t!=null&&(this._locale=t),this)}var yk=sn("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 xk(){return this._locale}var wd=1e3,Qo=60*wd,_d=60*Qo,wk=(365*400+97)*24*_d;function Jo(e,t){return(e%t+t)%t}function _k(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-wk:new Date(e,t,r).valueOf()}function bk(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-wk:Date.UTC(e,t,r)}function $4(e){var t,r;if(e=on(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?bk:_k,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Jo(t+(this._isUTC?0:this.utcOffset()*Qo),_d);break;case"minute":t=this._d.valueOf(),t-=Jo(t,Qo);break;case"second":t=this._d.valueOf(),t-=Jo(t,wd);break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function W4(e){var t,r;if(e=on(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?bk:_k,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=_d-Jo(t+(this._isUTC?0:this.utcOffset()*Qo),_d)-1;break;case"minute":t=this._d.valueOf(),t+=Qo-Jo(t,Qo)-1;break;case"second":t=this._d.valueOf(),t+=wd-Jo(t,wd)-1;break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function B4(){return this._d.valueOf()-(this._offset||0)*6e4}function H4(){return Math.floor(this.valueOf()/1e3)}function Y4(){return new Date(this.valueOf())}function Z4(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function K4(){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 G4(){return this.isValid()?this.toISOString():null}function q4(){return hv(this)}function X4(){return Gs({},Ke(this))}function Q4(){return Ke(this).overflow}function J4(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Oe("N",0,0,"eraAbbr");Oe("NN",0,0,"eraAbbr");Oe("NNN",0,0,"eraAbbr");Oe("NNNN",0,0,"eraName");Oe("NNNNN",0,0,"eraNarrow");Oe("y",["y",1],"yo","eraYear");Oe("y",["yy",2],0,"eraYear");Oe("y",["yyy",3],0,"eraYear");Oe("y",["yyyy",4],0,"eraYear");_e("N",Pv);_e("NN",Pv);_e("NNN",Pv);_e("NNNN",u3);_e("NNNNN",d3);gt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Ke(r).era=s:Ke(r).invalidEra=e});_e("y",Ea);_e("yy",Ea);_e("yyy",Ea);_e("yyyy",Ea);_e("yo",f3);gt(["y","yy","yyy","yyyy"],lr);gt(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[lr]=r._locale.eraYearOrdinalParse(e,s):t[lr]=parseInt(e,10)});function e3(e,t){var r,n,s,i=this._eras||Rs("en")._eras;for(r=0,n=i.length;r=0)return i[n]}function r3(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ve(e.since).year():ve(e.since).year()+(t-e.offset)*r}function n3(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;ei&&(t=i),x3.call(this,e,t,r,n,s))}function x3(e,t,r,n,s){var i=rk(e,t,r,n,s),o=Wl(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Oe("Q",0,"Qo","quarter");_e("Q",HS);gt("Q",function(e,t){t[us]=(rt(e)-1)*3});function w3(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Oe("D",["DD",2],"Do","date");_e("D",Ct,ja);_e("DD",Ct,Vr);_e("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});gt(["D","DD"],On);gt("Do",function(e,t){t[On]=rt(e.match(Ct)[0])});var kk=Ta("Date",!0);Oe("DDD",["DDDD",3],"DDDo","dayOfYear");_e("DDD",bf);_e("DDDD",YS);gt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=rt(e)});function _3(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Oe("m",["mm",2],0,"minute");_e("m",Ct,wv);_e("mm",Ct,Vr);gt(["m","mm"],mn);var b3=Ta("Minutes",!1);Oe("s",["ss",2],0,"second");_e("s",Ct,wv);_e("ss",Ct,Vr);gt(["s","ss"],ds);var S3=Ta("Seconds",!1);Oe("S",0,0,function(){return~~(this.millisecond()/100)});Oe(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Oe(0,["SSS",3],0,"millisecond");Oe(0,["SSSS",4],0,function(){return this.millisecond()*10});Oe(0,["SSSSS",5],0,function(){return this.millisecond()*100});Oe(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Oe(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Oe(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Oe(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});_e("S",bf,HS);_e("SS",bf,Vr);_e("SSS",bf,YS);var qs,Ck;for(qs="SSSS";qs.length<=9;qs+="S")_e(qs,Ea);function k3(e,t){t[zi]=rt(("0."+e)*1e3)}for(qs="S";qs.length<=9;qs+="S")gt(qs,k3);Ck=Ta("Milliseconds",!1);Oe("z",0,0,"zoneAbbr");Oe("zz",0,0,"zoneName");function C3(){return this._isUTC?"UTC":""}function E3(){return this._isUTC?"Coordinated Universal Time":""}var ae=_c.prototype;ae.add=y4;ae.calendar=C4;ae.clone=E4;ae.diff=D4;ae.endOf=W4;ae.format=L4;ae.from=F4;ae.fromNow=z4;ae.to=U4;ae.toNow=V4;ae.get=II;ae.invalidAt=Q4;ae.isAfter=j4;ae.isBefore=T4;ae.isBetween=N4;ae.isSame=R4;ae.isSameOrAfter=P4;ae.isSameOrBefore=A4;ae.isValid=q4;ae.lang=yk;ae.locale=vk;ae.localeData=xk;ae.max=qL;ae.min=GL;ae.parsingFlags=X4;ae.set=LI;ae.startOf=$4;ae.subtract=x4;ae.toArray=Z4;ae.toObject=K4;ae.toDate=Y4;ae.toISOString=M4;ae.inspect=I4;typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ae.toJSON=G4;ae.toString=O4;ae.unix=H4;ae.valueOf=B4;ae.creationData=J4;ae.eraName=n3;ae.eraNarrow=s3;ae.eraAbbr=i3;ae.eraYear=o3;ae.year=GS;ae.isLeapYear=MI;ae.weekYear=h3;ae.isoWeekYear=p3;ae.quarter=ae.quarters=w3;ae.month=ek;ae.daysInMonth=YI;ae.week=ae.weeks=eL;ae.isoWeek=ae.isoWeeks=tL;ae.weeksInYear=v3;ae.weeksInWeekYear=y3;ae.isoWeeksInYear=m3;ae.isoWeeksInISOWeekYear=g3;ae.date=kk;ae.day=ae.days=pL;ae.weekday=mL;ae.isoWeekday=gL;ae.dayOfYear=_3;ae.hour=ae.hours=SL;ae.minute=ae.minutes=b3;ae.second=ae.seconds=S3;ae.millisecond=ae.milliseconds=Ck;ae.utcOffset=i4;ae.utc=a4;ae.local=l4;ae.parseZone=c4;ae.hasAlignedHourOffset=u4;ae.isDST=d4;ae.isLocal=h4;ae.isUtcOffset=p4;ae.isUtc=hk;ae.isUTC=hk;ae.zoneAbbr=C3;ae.zoneName=E3;ae.dates=sn("dates accessor is deprecated. Use date instead.",kk);ae.months=sn("months accessor is deprecated. Use month instead",ek);ae.years=sn("years accessor is deprecated. Use year instead",GS);ae.zone=sn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",o4);ae.isDSTShifted=sn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",f4);function j3(e){return kt(e*1e3)}function T3(){return kt.apply(null,arguments).parseZone()}function Ek(e){return e}var ct=mv.prototype;ct.calendar=hI;ct.longDateFormat=vI;ct.invalidDate=xI;ct.ordinal=bI;ct.preparse=Ek;ct.postformat=Ek;ct.relativeTime=kI;ct.pastFuture=CI;ct.set=dI;ct.eras=e3;ct.erasParse=t3;ct.erasConvertYear=r3;ct.erasAbbrRegex=l3;ct.erasNameRegex=a3;ct.erasNarrowRegex=c3;ct.months=$I;ct.monthsShort=WI;ct.monthsParse=HI;ct.monthsRegex=KI;ct.monthsShortRegex=ZI;ct.week=qI;ct.firstDayOfYear=JI;ct.firstDayOfWeek=QI;ct.weekdays=cL;ct.weekdaysMin=dL;ct.weekdaysShort=uL;ct.weekdaysParse=hL;ct.weekdaysRegex=vL;ct.weekdaysShortRegex=yL;ct.weekdaysMinRegex=xL;ct.isPM=_L;ct.meridiem=kL;function bd(e,t,r,n){var s=Rs(),i=Zn().set(n,t);return s[r](i,e)}function jk(e,t,r){if(Ss(e)&&(t=e,e=void 0),e=e||"",t!=null)return bd(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=bd(e,n,r,"month");return s}function Dv(e,t,r,n){typeof e=="boolean"?(Ss(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,Ss(t)&&(r=t,t=void 0),t=t||"");var s=Rs(),i=e?s._week.dow:0,o,a=[];if(r!=null)return bd(t,(r+i)%7,n,"day");for(o=0;o<7;o++)a[o]=bd(t,(o+i)%7,n,"day");return a}function N3(e,t){return jk(e,t,"months")}function R3(e,t){return jk(e,t,"monthsShort")}function P3(e,t,r){return Dv(e,t,r,"weekdays")}function A3(e,t,r){return Dv(e,t,r,"weekdaysShort")}function D3(e,t,r){return Dv(e,t,r,"weekdaysMin")}oi("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,r=rt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ve.lang=sn("moment.lang is deprecated. Use moment.locale instead.",oi);ve.langData=sn("moment.langData is deprecated. Use moment.localeData instead.",Rs);var ts=Math.abs;function O3(){var e=this._data;return this._milliseconds=ts(this._milliseconds),this._days=ts(this._days),this._months=ts(this._months),e.milliseconds=ts(e.milliseconds),e.seconds=ts(e.seconds),e.minutes=ts(e.minutes),e.hours=ts(e.hours),e.months=ts(e.months),e.years=ts(e.years),this}function Tk(e,t,r,n){var s=jn(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function M3(e,t){return Tk(this,e,t,1)}function I3(e,t){return Tk(this,e,t,-1)}function N0(e){return e<0?Math.floor(e):Math.ceil(e)}function L3(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,i,o,a,l;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=N0(im(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=qr(e/1e3),n.seconds=s%60,i=qr(s/60),n.minutes=i%60,o=qr(i/60),n.hours=o%24,t+=qr(o/24),l=qr(Nk(t)),r+=l,t-=N0(im(l)),a=qr(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function Nk(e){return e*4800/146097}function im(e){return e*146097/4800}function F3(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=on(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Nk(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(im(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function Ps(e){return function(){return this.as(e)}}var Rk=Ps("ms"),z3=Ps("s"),U3=Ps("m"),V3=Ps("h"),$3=Ps("d"),W3=Ps("w"),B3=Ps("M"),H3=Ps("Q"),Y3=Ps("y"),Z3=Rk;function K3(){return jn(this)}function G3(e){return e=on(e),this.isValid()?this[e+"s"]():NaN}function lo(e){return function(){return this.isValid()?this._data[e]:NaN}}var q3=lo("milliseconds"),X3=lo("seconds"),Q3=lo("minutes"),J3=lo("hours"),e5=lo("days"),t5=lo("months"),r5=lo("years");function n5(){return qr(this.days()/7)}var is=Math.round,Lo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function s5(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function i5(e,t,r,n){var s=jn(e).abs(),i=is(s.as("s")),o=is(s.as("m")),a=is(s.as("h")),l=is(s.as("d")),u=is(s.as("M")),f=is(s.as("w")),d=is(s.as("y")),m=i<=r.ss&&["s",i]||i0,m[4]=n,s5.apply(null,m)}function o5(e){return e===void 0?is:typeof e=="function"?(is=e,!0):!1}function a5(e,t){return Lo[e]===void 0?!1:t===void 0?Lo[e]:(Lo[e]=t,e==="s"&&(Lo.ss=t-1),!0)}function l5(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Lo,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Lo,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),i=i5(this,!r,n,s),r&&(i=s.pastFuture(+this,i)),s.postformat(i)}var Uh=Math.abs;function wo(e){return(e>0)-(e<0)||+e}function Rf(){if(!this.isValid())return this.localeData().invalidDate();var e=Uh(this._milliseconds)/1e3,t=Uh(this._days),r=Uh(this._months),n,s,i,o,a=this.asSeconds(),l,u,f,d;return a?(n=qr(e/60),s=qr(n/60),e%=60,n%=60,i=qr(r/12),r%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=wo(this._months)!==wo(a)?"-":"",f=wo(this._days)!==wo(a)?"-":"",d=wo(this._milliseconds)!==wo(a)?"-":"",l+"P"+(i?u+i+"Y":"")+(r?u+r+"M":"")+(t?f+t+"D":"")+(s||n||e?"T":"")+(s?d+s+"H":"")+(n?d+n+"M":"")+(e?d+o+"S":"")):"P0D"}var it=Tf.prototype;it.isValid=t4;it.abs=O3;it.add=M3;it.subtract=I3;it.as=F3;it.asMilliseconds=Rk;it.asSeconds=z3;it.asMinutes=U3;it.asHours=V3;it.asDays=$3;it.asWeeks=W3;it.asMonths=B3;it.asQuarters=H3;it.asYears=Y3;it.valueOf=Z3;it._bubble=L3;it.clone=K3;it.get=G3;it.milliseconds=q3;it.seconds=X3;it.minutes=Q3;it.hours=J3;it.days=e5;it.weeks=n5;it.months=t5;it.years=r5;it.humanize=l5;it.toISOString=Rf;it.toString=Rf;it.toJSON=Rf;it.locale=vk;it.localeData=xk;it.toIsoString=sn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rf);it.lang=yk;Oe("X",0,0,"unix");Oe("x",0,0,"valueOf");_e("x",kf);_e("X",NI);gt("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});gt("x",function(e,t,r){r._d=new Date(rt(e))});//! moment.js -ve.version="2.30.1";cI(kt);ve.fn=ae;ve.min=XL;ve.max=QL;ve.now=JL;ve.utc=Zn;ve.unix=j3;ve.months=N3;ve.isDate=wc;ve.locale=oi;ve.invalid=wf;ve.duration=jn;ve.isMoment=kn;ve.weekdays=P3;ve.parseZone=T3;ve.localeData=Rs;ve.isDuration=Au;ve.monthsShort=R3;ve.weekdaysMin=D3;ve.defineLocale=Cv;ve.updateLocale=TL;ve.locales=NL;ve.weekdaysShort=A3;ve.normalizeUnits=on;ve.relativeTimeRounding=o5;ve.relativeTimeThreshold=a5;ve.calendarFormat=k4;ve.prototype=ae;ve.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 c5=async()=>await ft().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),bi=async e=>e.id?await ft().collection("access").update(e.id,e):await ft().collection("access").create(e),u5=async e=>(e.deleted=ve.utc().format("YYYY-MM-DD HH:mm:ss"),await ft().collection("access").update(e.id,e)),R0=async()=>await ft().collection("access_groups").getFullList({sort:"-created",expand:"access"}),d5=async e=>{const t=ft();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},f5=async e=>{const t=ft();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},P0=async e=>await ft().collection("access_groups").update(e.id,e),h5=(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(r=>r.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(r=>r.id===t.payload.id?t.payload:r)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},p5=async()=>{try{return await ft().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},m5=async e=>{const t=ft();let r;return e.id?r=await t.collection("settings").update(e.id,e):r=await t.collection("settings").create(e),r},Pk=y.createContext({}),$r=()=>y.useContext(Pk),g5=({children:e})=>{const[t,r]=y.useReducer(h5,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});y.useEffect(()=>{(async()=>{const f=await c5();r({type:"SET_ACCESSES",payload:f})})()},[]),y.useEffect(()=>{(async()=>{const f=await p5();r({type:"SET_EMAILS",payload:f})})()},[]),y.useEffect(()=>{(async()=>{const f=await R0();r({type:"SET_ACCESS_GROUPS",payload:f})})()},[]);const n=y.useCallback(async()=>{const u=await R0();r({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=y.useCallback(u=>{r({type:"SET_EMAILS",payload:u})},[]),i=y.useCallback(u=>{r({type:"DELETE_ACCESS",payload:u})},[]),o=y.useCallback(u=>{r({type:"ADD_ACCESS",payload:u})},[]),a=y.useCallback(u=>{r({type:"UPDATE_ACCESS",payload:u})},[]),l=y.useCallback(u=>{r({type:"SET_ACCESS_GROUPS",payload:u})},[]);return c.jsx(Pk.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:i,addAccess:o,setEmails:s,updateAccess:a,setAccessGroups:l,reloadAccessGroups:n},children:e&&e})},v5={theme:"system",setTheme:()=>null},Ak=y.createContext(v5);function y5({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...n}){const[s,i]=y.useState(()=>localStorage.getItem(r)||t);y.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(s)},[s]);const o={theme:s,setTheme:a=>{localStorage.setItem(r,a),i(a)}};return c.jsx(Ak.Provider,{...n,value:o,children:e})}const x5=()=>{const e=y.useContext(Ak);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function w5(){const{setTheme:e}=x5();return c.jsxs(pS,{children:[c.jsx(mS,{asChild:!0,children:c.jsxs(Je,{variant:"outline",size:"icon",children:[c.jsx(aP,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),c.jsx(iP,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),c.jsxs(Jg,{align:"end",children:[c.jsx(Go,{onClick:()=>e("light"),children:"浅色"}),c.jsx(Go,{onClick:()=>e("dark"),children:"暗黑"}),c.jsx(Go,{onClick:()=>e("system"),children:"系统"})]})]})}var _5="Separator",A0="horizontal",b5=["horizontal","vertical"],Dk=y.forwardRef((e,t)=>{const{decorative:r,orientation:n=A0,...s}=e,i=S5(n)?n:A0,a=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return c.jsx(Ve.div,{"data-orientation":i,...a,...s,ref:t})});Dk.displayName=_5;function S5(e){return b5.includes(e)}var Ok=Dk;const Yt=y.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>c.jsx(Ok,{ref:s,decorative:r,orientation:t,className:le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Yt.displayName=Ok.displayName;function k5(){const e=rn(),t=Yn();if(!ft().authStore.isValid||!ft().authStore.isAdmin)return c.jsx(C1,{to:"/login"});const r=t.pathname,n=o=>(console.log(r),o==r?"bg-muted text-primary":"text-muted-foreground"),s=()=>{ft().authStore.clear(),e("/login")},i=()=>{e("/setting/password")};return c.jsx(c.Fragment,{children:c.jsx(g5,{children:c.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]",children:[c.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:c.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[c.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:c.jsxs(tr,{to:"/",className:"flex items-center gap-2 font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),c.jsx("div",{className:"flex-1",children:c.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[c.jsxs(tr,{to:"/",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/")),children:[c.jsx(Zx,{className:"h-4 w-4"}),"控制面板"]}),c.jsxs(tr,{to:"/domains",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/domains")),children:[c.jsx(Bp,{className:"h-4 w-4"}),"域名列表"]}),c.jsxs(tr,{to:"/access",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access")),children:[c.jsx(Kx,{className:"h-4 w-4"}),"授权管理"]}),c.jsxs(tr,{to:"/access_groups",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access_groups")),children:[c.jsx(ud,{className:"h-4 w-4"}),"部署授权组"]}),c.jsxs(tr,{to:"/history",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/history")),children:[c.jsx(Yx,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),c.jsxs("div",{className:"flex flex-col",children:[c.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[c.jsxs(av,{children:[c.jsx(lv,{asChild:!0,children:c.jsxs(Je,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[c.jsx(sP,{className:"h-5 w-5 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),c.jsx(xf,{side:"left",className:"flex flex-col",children:c.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[c.jsxs(tr,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"}),c.jsx("span",{className:"sr-only",children:"Certimate"})]}),c.jsxs(tr,{to:"/",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/")),children:[c.jsx(Zx,{className:"h-5 w-5"}),"控制面板"]}),c.jsxs(tr,{to:"/domains",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/domains")),children:[c.jsx(Bp,{className:"h-5 w-5"}),"域名列表"]}),c.jsxs(tr,{to:"/access",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/access")),children:[c.jsx(Kx,{className:"h-5 w-5"}),"授权管理"]}),c.jsxs(tr,{to:"/access_groups",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/access_groups")),children:[c.jsx(ud,{className:"h-5 w-5"}),"部署授权组"]}),c.jsxs(tr,{to:"/history",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/history")),children:[c.jsx(Yx,{className:"h-5 w-5"}),"部署历史"]})]})})]}),c.jsx("div",{className:"w-full flex-1"}),c.jsx(w5,{}),c.jsxs(pS,{children:[c.jsx(mS,{asChild:!0,children:c.jsxs(Je,{variant:"secondary",size:"icon",className:"rounded-full",children:[c.jsx(JR,{className:"h-5 w-5"}),c.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),c.jsxs(Jg,{align:"end",children:[c.jsx(gS,{children:"账户"}),c.jsx(vS,{}),c.jsx(Go,{onClick:i,children:"设置"}),c.jsx(Go,{onClick:s,children:"退出"})]})]})]}),c.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[c.jsx(kg,{}),c.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[c.jsx("div",{className:""}),c.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[c.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[c.jsx(GR,{size:16}),c.jsx("div",{className:"ml-1",children:"文档"})]}),c.jsx(Yt,{orientation:"vertical",className:"mx-2"}),c.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:"Certimate v0.1.6"})]})]})]})]})]})})})}const Ov=({phase:e,phaseSuccess:t})=>{let r=c.jsx(c.Fragment,{children:" "});return e==="check"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),r},Mk=({className:e,...t})=>c.jsx("nav",{role:"navigation","aria-label":"pagination",className:le("mx-auto flex w-full justify-center",e),...t});Mk.displayName="Pagination";const Ik=y.forwardRef(({className:e,...t},r)=>c.jsx("ul",{ref:r,className:le("flex flex-row items-center gap-1",e),...t}));Ik.displayName="PaginationContent";const om=y.forwardRef(({className:e,...t},r)=>c.jsx("li",{ref:r,className:le("",e),...t}));om.displayName="PaginationItem";const Lk=({className:e,isActive:t,size:r="icon",...n})=>c.jsx("a",{"aria-current":t?"page":void 0,className:le(af({variant:t?"outline":"ghost",size:r}),e),...n});Lk.displayName="PaginationLink";const Fk=({className:e,...t})=>c.jsxs("span",{"aria-hidden":!0,className:le("flex h-9 w-9 items-center justify-center",e),...t,children:[c.jsx(tP,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"More pages"})]});Fk.displayName="PaginationEllipsis";const zk=({totalPages:e,currentPage:t,onPageChange:r})=>{const s=()=>{if(e>7){let u=[];const f=Math.max(2,t-1),d=Math.min(e-1,t+1),m=e-1;return u=i(f,d),t>3&&u.unshift("..."),t{let f=a;const d=[];for(;f<=l;)d.push(f),f+=u;return d},o=s();return c.jsx(c.Fragment,{children:c.jsx(Mk,{className:"dark:text-stone-200 justify-end mt-3",children:c.jsx(Ik,{children:o.map((a,l)=>a==="..."?c.jsx(om,{children:c.jsx(Fk,{})},l):c.jsx(om,{children:c.jsx(Lk,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),r(a)},children:a})},l))})})})},hl=({when:e,children:t,fallback:r})=>e?t:r;var Uk="AlertDialog",[C5,O8]=nn(Uk,[xS]),As=xS(),Vk=e=>{const{__scopeAlertDialog:t,...r}=e,n=As(t);return c.jsx(sv,{...n,...r,modal:!0})};Vk.displayName=Uk;var E5="AlertDialogTrigger",$k=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(iv,{...s,...n,ref:t})});$k.displayName=E5;var j5="AlertDialogPortal",Wk=e=>{const{__scopeAlertDialog:t,...r}=e,n=As(t);return c.jsx(ov,{...n,...r})};Wk.displayName=j5;var T5="AlertDialogOverlay",Bk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(gc,{...s,...n,ref:t})});Bk.displayName=T5;var ea="AlertDialogContent",[N5,R5]=C5(ea),Hk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,i=As(r),o=y.useRef(null),a=Xe(t,o),l=y.useRef(null);return c.jsx(FM,{contentName:ea,titleName:Yk,docsSlug:"alert-dialog",children:c.jsx(N5,{scope:r,cancelRef:l,children:c.jsxs(vc,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:de(s.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(Tg,{children:n}),c.jsx(A5,{contentRef:o})]})})})});Hk.displayName=ea;var Yk="AlertDialogTitle",Zk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(yc,{...s,...n,ref:t})});Zk.displayName=Yk;var Kk="AlertDialogDescription",Gk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(xc,{...s,...n,ref:t})});Gk.displayName=Kk;var P5="AlertDialogAction",qk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(yf,{...s,...n,ref:t})});qk.displayName=P5;var Xk="AlertDialogCancel",Qk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=R5(Xk,r),i=As(r),o=Xe(t,s);return c.jsx(yf,{...i,...n,ref:o})});Qk.displayName=Xk;var A5=({contentRef:e})=>{const t=`\`${ea}\` requires a description for the component to be accessible for screen reader users. +`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var N0={};function KS(e,t){ve.deprecationHandler!=null&&ve.deprecationHandler(e,t),N0[e]||(ZS(t),N0[e]=!0)}ve.suppressDeprecationWarnings=!1;ve.deprecationHandler=null;function Kn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function NI(e){var t,r;for(r in e)lt(e,r)&&(t=e[r],Kn(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Jp(e,t){var r=qs({},e),n;for(n in t)lt(t,n)&&(Bi(e[n])&&Bi(t[n])?(r[n]={},qs(r[n],e[n]),qs(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)lt(e,n)&&!lt(t,n)&&Bi(e[n])&&(r[n]=qs({},r[n]));return r}function mv(e){e!=null&&this.set(e)}var em;Object.keys?em=Object.keys:em=function(e){var t,r=[];for(t in e)lt(e,t)&&r.push(t);return r};var RI={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function PI(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Kn(n)?n.call(t,r):n}function Bn(e,t,r){var n=""+Math.abs(e),s=t-n.length,i=e>=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var gv=/(\[[^\[]*\])|(\\)?([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,uu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Lh={},Xo={};function Oe(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Xo[e]=s),t&&(Xo[t[0]]=function(){return Bn(s.apply(this,arguments),t[1],t[2])}),r&&(Xo[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function AI(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function DI(e){var t=e.match(gv),r,n;for(r=0,n=t.length;r=0&&uu.test(e);)e=e.replace(uu,n),uu.lastIndex=0,r-=1;return e}var OI={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 MI(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(gv).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var II="Invalid date";function LI(){return this._invalidDate}var FI="%d",zI=/\d{1,2}/;function UI(e){return this._ordinal.replace("%d",e)}var VI={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 $I(e,t,r,n){var s=this._relativeTime[r];return Kn(s)?s(e,t,r,n):s.replace(/%d/i,e)}function BI(e,t){var r=this._relativeTime[e>0?"future":"past"];return Kn(r)?r(t):r.replace(/%s/i,t)}var R0={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 on(e){return typeof e=="string"?R0[e]||R0[e.toLowerCase()]:void 0}function vv(e){var t={},r,n;for(n in e)lt(e,n)&&(r=on(n),r&&(t[r]=e[n]));return t}var WI={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 HI(e){var t=[],r;for(r in e)lt(e,r)&&t.push({unit:r,priority:WI[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var qS=/\d/,$r=/\d\d/,XS=/\d{3}/,yv=/\d{4}/,_f=/[+-]?\d{6}/,Ct=/\d\d?/,QS=/\d\d\d\d?/,JS=/\d\d\d\d\d\d?/,bf=/\d{1,3}/,xv=/\d{1,4}/,Sf=/[+-]?\d{1,6}/,Ea=/\d+/,kf=/[+-]?\d+/,YI=/Z|[+-]\d\d:?\d\d/gi,Cf=/Z|[+-]\d\d(?::?\d\d)?/gi,ZI=/[+-]?\d+(\.\d{1,3})?/,Sc=/[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,ja=/^[1-9]\d?/,wv=/^([1-9]\d|\d)/,yd;yd={};function _e(e,t,r){yd[e]=Kn(t)?t:function(n,s){return n&&r?r:t}}function KI(e,t){return lt(yd,e)?yd[e](t._strict,t._locale):new RegExp(GI(e))}function GI(e){return ps(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,i){return r||n||s||i}))}function ps(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Xr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rt(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Xr(t)),r}var tm={};function gt(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),ks(t)&&(n=function(i,o){o[t]=rt(i)}),s=e.length,r=0;r68?1900:2e3)};var ek=Ta("FullYear",!0);function JI(){return Ef(this.year())}function Ta(e,t){return function(r){return r!=null?(tk(this,e,r),ve.updateOffset(this,t),this):$l(this,e)}}function $l(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function tk(e,t,r){var n,s,i,o,a;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}i=r,o=e.month(),a=e.date(),a=a===29&&o===1&&!Ef(i)?28:a,s?n.setUTCFullYear(i,o,a):n.setFullYear(i,o,a)}}function eL(e){return e=on(e),Kn(this[e])?this[e]():this}function tL(e,t){if(typeof e=="object"){e=vv(e);var r=HI(e),n,s=r.length;for(n=0;n=0?(a=new Date(e+400,t,r,n,s,i,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,s,i,o),a}function Bl(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function xd(e,t,r){var n=7+t-r,s=(7+Bl(e,0,n).getUTCDay()-t)%7;return-s+n-1}function ak(e,t,r,n,s){var i=(7+r-n)%7,o=xd(e,n,s),a=1+7*(t-1)+i+o,l,u;return a<=0?(l=e-1,u=fl(l)+a):a>fl(e)?(l=e+1,u=a-fl(e)):(l=e,u=a),{year:l,dayOfYear:u}}function Wl(e,t,r){var n=xd(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,i,o;return s<1?(o=e.year()-1,i=s+ms(o,t,r)):s>ms(e.year(),t,r)?(i=s-ms(e.year(),t,r),o=e.year()+1):(o=e.year(),i=s),{week:i,year:o}}function ms(e,t,r){var n=xd(e,t,r),s=xd(e+1,t,r);return(fl(e)-n+s)/7}Oe("w",["ww",2],"wo","week");Oe("W",["WW",2],"Wo","isoWeek");_e("w",Ct,ja);_e("ww",Ct,$r);_e("W",Ct,ja);_e("WW",Ct,$r);kc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=rt(e)});function pL(e){return Wl(e,this._week.dow,this._week.doy).week}var mL={dow:0,doy:6};function gL(){return this._week.dow}function vL(){return this._week.doy}function yL(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function xL(e){var t=Wl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Oe("d",0,"do","day");Oe("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Oe("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Oe("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Oe("e",0,0,"weekday");Oe("E",0,0,"isoWeekday");_e("d",Ct);_e("e",Ct);_e("E",Ct);_e("dd",function(e,t){return t.weekdaysMinRegex(e)});_e("ddd",function(e,t){return t.weekdaysShortRegex(e)});_e("dddd",function(e,t){return t.weekdaysRegex(e)});kc(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Ke(r).invalidWeekday=e});kc(["d","e","E"],function(e,t,r,n){t[n]=rt(e)});function wL(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function _L(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function bv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var bL="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lk="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),SL="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),kL=Sc,CL=Sc,EL=Sc;function jL(e,t){var r=kn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?bv(r,this._week.dow):e?r[e.day()]:r}function TL(e){return e===!0?bv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function NL(e){return e===!0?bv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function RL(e,t,r){var n,s,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=Zn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(s=zt.call(this._weekdaysParse,o),s!==-1?s:null):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,o),s!==-1?s:null):(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null):t==="dddd"?(s=zt.call(this._weekdaysParse,o),s!==-1||(s=zt.call(this._shortWeekdaysParse,o),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null)):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,o),s!==-1||(s=zt.call(this._weekdaysParse,o),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null)):(s=zt.call(this._minWeekdaysParse,o),s!==-1||(s=zt.call(this._weekdaysParse,o),s!==-1)?s:(s=zt.call(this._shortWeekdaysParse,o),s!==-1?s:null))}function PL(e,t,r){var n,s,i;if(this._weekdaysParseExact)return RL.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Zn([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function AL(e){if(!this.isValid())return e!=null?this:NaN;var t=$l(this,"Day");return e!=null?(e=wL(e,this.localeData()),this.add(e-t,"d")):t}function DL(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 OL(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=_L(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ML(e){return this._weekdaysParseExact?(lt(this,"_weekdaysRegex")||Sv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(lt(this,"_weekdaysRegex")||(this._weekdaysRegex=kL),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function IL(e){return this._weekdaysParseExact?(lt(this,"_weekdaysRegex")||Sv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(lt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=CL),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function LL(e){return this._weekdaysParseExact?(lt(this,"_weekdaysRegex")||Sv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(lt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=EL),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Sv(){function e(f,d){return d.length-f.length}var t=[],r=[],n=[],s=[],i,o,a,l,u;for(i=0;i<7;i++)o=Zn([2e3,1]).day(i),a=ps(this.weekdaysMin(o,"")),l=ps(this.weekdaysShort(o,"")),u=ps(this.weekdays(o,"")),t.push(a),r.push(l),n.push(u),s.push(a),s.push(l),s.push(u);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function kv(){return this.hours()%12||12}function FL(){return this.hours()||24}Oe("H",["HH",2],0,"hour");Oe("h",["hh",2],0,kv);Oe("k",["kk",2],0,FL);Oe("hmm",0,0,function(){return""+kv.apply(this)+Bn(this.minutes(),2)});Oe("hmmss",0,0,function(){return""+kv.apply(this)+Bn(this.minutes(),2)+Bn(this.seconds(),2)});Oe("Hmm",0,0,function(){return""+this.hours()+Bn(this.minutes(),2)});Oe("Hmmss",0,0,function(){return""+this.hours()+Bn(this.minutes(),2)+Bn(this.seconds(),2)});function ck(e,t){Oe(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}ck("a",!0);ck("A",!1);function uk(e,t){return t._meridiemParse}_e("a",uk);_e("A",uk);_e("H",Ct,wv);_e("h",Ct,ja);_e("k",Ct,ja);_e("HH",Ct,$r);_e("hh",Ct,$r);_e("kk",Ct,$r);_e("hmm",QS);_e("hmmss",JS);_e("Hmm",QS);_e("Hmmss",JS);gt(["H","HH"],Gt);gt(["k","kk"],function(e,t,r){var n=rt(e);t[Gt]=n===24?0:n});gt(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});gt(["h","hh"],function(e,t,r){t[Gt]=rt(e),Ke(r).bigHour=!0});gt("hmm",function(e,t,r){var n=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n)),Ke(r).bigHour=!0});gt("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n,2)),t[ds]=rt(e.substr(s)),Ke(r).bigHour=!0});gt("Hmm",function(e,t,r){var n=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n))});gt("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n,2)),t[ds]=rt(e.substr(s))});function zL(e){return(e+"").toLowerCase().charAt(0)==="p"}var UL=/[ap]\.?m?\.?/i,VL=Ta("Hours",!0);function $L(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var dk={calendar:RI,longDateFormat:OI,invalidDate:II,ordinal:FI,dayOfMonthOrdinalParse:zI,relativeTime:VI,months:nL,monthsShort:rk,week:mL,weekdays:bL,weekdaysMin:SL,weekdaysShort:lk,meridiemParse:UL},Tt={},Wa={},Hl;function BL(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r0;){if(s=jf(i.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&BL(i,n)>=r-1)break;r--}t++}return Hl}function HL(e){return!!(e&&e.match("^[^/\\\\]*$"))}function jf(e){var t=null,r;if(Tt[e]===void 0&&typeof Fu<"u"&&Fu&&Fu.exports&&HL(e))try{t=Hl._abbr,r=require,r("./locale/"+e),ai(t)}catch{Tt[e]=null}return Tt[e]}function ai(e,t){var r;return e&&(wr(t)?r=Ps(e):r=Cv(e,t),r?Hl=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Hl._abbr}function Cv(e,t){if(t!==null){var r,n=dk;if(t.abbr=e,Tt[e]!=null)KS("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."),n=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)n=Tt[t.parentLocale]._config;else if(r=jf(t.parentLocale),r!=null)n=r._config;else return Wa[t.parentLocale]||(Wa[t.parentLocale]=[]),Wa[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new mv(Jp(n,t)),Wa[e]&&Wa[e].forEach(function(s){Cv(s.name,s.config)}),ai(e),Tt[e]}else return delete Tt[e],null}function YL(e,t){if(t!=null){var r,n,s=dk;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(Jp(Tt[e]._config,t)):(n=jf(e),n!=null&&(s=n._config),t=Jp(s,t),n==null&&(t.abbr=e),r=new mv(t),r.parentLocale=Tt[e],Tt[e]=r),ai(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===ai()&&ai(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function Ps(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Hl;if(!kn(e)){if(t=jf(e),t)return t;e=[e]}return WL(e)}function ZL(){return em(Tt)}function Ev(e){var t,r=e._a;return r&&Ke(e).overflow===-2&&(t=r[us]<0||r[us]>11?us:r[Mn]<1||r[Mn]>_v(r[ar],r[us])?Mn:r[Gt]<0||r[Gt]>24||r[Gt]===24&&(r[mn]!==0||r[ds]!==0||r[zi]!==0)?Gt:r[mn]<0||r[mn]>59?mn:r[ds]<0||r[ds]>59?ds:r[zi]<0||r[zi]>999?zi:-1,Ke(e)._overflowDayOfYear&&(tMn)&&(t=Mn),Ke(e)._overflowWeeks&&t===-1&&(t=XI),Ke(e)._overflowWeekday&&t===-1&&(t=QI),Ke(e).overflow=t),e}var KL=/^\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)?)?$/,GL=/^\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)?)?$/,qL=/Z|[+-]\d\d(?::?\d\d)?/,du=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Fh=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],XL=/^\/?Date\((-?\d+)/i,QL=/^(?:(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}))$/,JL={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 fk(e){var t,r,n=e._i,s=KL.exec(n)||GL.exec(n),i,o,a,l,u=du.length,f=Fh.length;if(s){for(Ke(e).iso=!0,t=0,r=u;tfl(o)||e._dayOfYear===0)&&(Ke(e)._overflowDayOfYear=!0),r=Bl(o,0,e._dayOfYear),e._a[us]=r.getUTCMonth(),e._a[Mn]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Gt]===24&&e._a[mn]===0&&e._a[ds]===0&&e._a[zi]===0&&(e._nextDay=!0,e._a[Gt]=0),e._d=(e._useUTC?Bl:hL).apply(null,n),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Gt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(Ke(e).weekdayMismatch=!0)}}function a4(e){var t,r,n,s,i,o,a,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,o=4,r=bo(t.GG,e._a[ar],Wl(kt(),1,4).year),n=bo(t.W,1),s=bo(t.E,1),(s<1||s>7)&&(l=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,u=Wl(kt(),i,o),r=bo(t.gg,e._a[ar],u.year),n=bo(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(l=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(l=!0)):s=i),n<1||n>ms(r,i,o)?Ke(e)._overflowWeeks=!0:l!=null?Ke(e)._overflowWeekday=!0:(a=ak(r,n,s,i,o),e._a[ar]=a.year,e._dayOfYear=a.dayOfYear)}ve.ISO_8601=function(){};ve.RFC_2822=function(){};function Tv(e){if(e._f===ve.ISO_8601){fk(e);return}if(e._f===ve.RFC_2822){hk(e);return}e._a=[],Ke(e).empty=!0;var t=""+e._i,r,n,s,i,o,a=t.length,l=0,u,f;for(s=GS(e._f,e._locale).match(gv)||[],f=s.length,r=0;r0&&Ke(e).unusedInput.push(o),t=t.slice(t.indexOf(n)+n.length),l+=n.length),Xo[i]?(n?Ke(e).empty=!1:Ke(e).unusedTokens.push(i),qI(i,n,e)):e._strict&&!n&&Ke(e).unusedTokens.push(i);Ke(e).charsLeftOver=a-l,t.length>0&&Ke(e).unusedInput.push(t),e._a[Gt]<=12&&Ke(e).bigHour===!0&&e._a[Gt]>0&&(Ke(e).bigHour=void 0),Ke(e).parsedDateParts=e._a.slice(0),Ke(e).meridiem=e._meridiem,e._a[Gt]=l4(e._locale,e._a[Gt],e._meridiem),u=Ke(e).era,u!==null&&(e._a[ar]=e._locale.erasConvertYear(u,e._a[ar])),jv(e),Ev(e)}function l4(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function c4(e){var t,r,n,s,i,o,a=!1,l=e._f.length;if(l===0){Ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:wf()});function gk(e,t){var r,n;if(t.length===1&&kn(t[0])&&(t=t[0]),!t.length)return kt();for(r=t[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function R4(){if(!wr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return pv(e,this),e=pk(e),e._a?(t=e._isUTC?Zn(e._a):kt(e._a),this._isDSTShifted=this.isValid()&&_4(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function P4(){return this.isValid()?!this._isUTC:!1}function A4(){return this.isValid()?this._isUTC:!1}function yk(){return this.isValid()?this._isUTC&&this._offset===0:!1}var D4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,O4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Tn(e,t){var r=e,n=null,s,i,o;return Du(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ks(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=D4.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:rt(n[Mn])*s,h:rt(n[Gt])*s,m:rt(n[mn])*s,s:rt(n[ds])*s,ms:rt(rm(n[zi]*1e3))*s}):(n=O4.exec(e))?(s=n[1]==="-"?-1:1,r={y:ji(n[2],s),M:ji(n[3],s),w:ji(n[4],s),d:ji(n[5],s),h:ji(n[6],s),m:ji(n[7],s),s:ji(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(o=M4(kt(r.from),kt(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),i=new Tf(r),Du(e)&<(e,"_locale")&&(i._locale=e._locale),Du(e)&<(e,"_isValid")&&(i._isValid=e._isValid),i}Tn.fn=Tf.prototype;Tn.invalid=w4;function ji(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function A0(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function M4(e,t){var r;return e.isValid()&&t.isValid()?(t=Rv(t,e),e.isBefore(t)?r=A0(e,t):(r=A0(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function xk(e,t){return function(r,n){var s,i;return n!==null&&!isNaN(+n)&&(KS(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."),i=r,r=n,n=i),s=Tn(r,n),wk(this,s,e),this}}function wk(e,t,r,n){var s=t._milliseconds,i=rm(t._days),o=rm(t._months);e.isValid()&&(n=n??!0,o&&sk(e,$l(e,"Month")+o*r),i&&tk(e,"Date",$l(e,"Date")+i*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&ve.updateOffset(e,i||o))}var I4=xk(1,"add"),L4=xk(-1,"subtract");function _k(e){return typeof e=="string"||e instanceof String}function F4(e){return Cn(e)||_c(e)||_k(e)||ks(e)||U4(e)||z4(e)||e===null||e===void 0}function z4(e){var t=Bi(e)&&!fv(e),r=!1,n=["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,i,o=n.length;for(s=0;sr.valueOf():r.valueOf()9999?Au(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Kn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Au(r,"Z")):Au(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function e3(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(r+n+s+i)}function t3(e){e||(e=this.isUtc()?ve.defaultFormatUtc:ve.defaultFormat);var t=Au(this,e);return this.localeData().postformat(t)}function r3(e,t){return this.isValid()&&(Cn(e)&&e.isValid()||kt(e).isValid())?Tn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function n3(e){return this.from(kt(),e)}function s3(e,t){return this.isValid()&&(Cn(e)&&e.isValid()||kt(e).isValid())?Tn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function i3(e){return this.to(kt(),e)}function bk(e){var t;return e===void 0?this._locale._abbr:(t=Ps(e),t!=null&&(this._locale=t),this)}var Sk=sn("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 kk(){return this._locale}var wd=1e3,Qo=60*wd,_d=60*Qo,Ck=(365*400+97)*24*_d;function Jo(e,t){return(e%t+t)%t}function Ek(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Ck:new Date(e,t,r).valueOf()}function jk(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Ck:Date.UTC(e,t,r)}function o3(e){var t,r;if(e=on(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?jk:Ek,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Jo(t+(this._isUTC?0:this.utcOffset()*Qo),_d);break;case"minute":t=this._d.valueOf(),t-=Jo(t,Qo);break;case"second":t=this._d.valueOf(),t-=Jo(t,wd);break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function a3(e){var t,r;if(e=on(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?jk:Ek,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=_d-Jo(t+(this._isUTC?0:this.utcOffset()*Qo),_d)-1;break;case"minute":t=this._d.valueOf(),t+=Qo-Jo(t,Qo)-1;break;case"second":t=this._d.valueOf(),t+=wd-Jo(t,wd)-1;break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function l3(){return this._d.valueOf()-(this._offset||0)*6e4}function c3(){return Math.floor(this.valueOf()/1e3)}function u3(){return new Date(this.valueOf())}function d3(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function f3(){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 h3(){return this.isValid()?this.toISOString():null}function p3(){return hv(this)}function m3(){return qs({},Ke(this))}function g3(){return Ke(this).overflow}function v3(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Oe("N",0,0,"eraAbbr");Oe("NN",0,0,"eraAbbr");Oe("NNN",0,0,"eraAbbr");Oe("NNNN",0,0,"eraName");Oe("NNNNN",0,0,"eraNarrow");Oe("y",["y",1],"yo","eraYear");Oe("y",["yy",2],0,"eraYear");Oe("y",["yyy",3],0,"eraYear");Oe("y",["yyyy",4],0,"eraYear");_e("N",Pv);_e("NN",Pv);_e("NNN",Pv);_e("NNNN",T3);_e("NNNNN",N3);gt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Ke(r).era=s:Ke(r).invalidEra=e});_e("y",Ea);_e("yy",Ea);_e("yyy",Ea);_e("yyyy",Ea);_e("yo",R3);gt(["y","yy","yyy","yyyy"],ar);gt(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[ar]=r._locale.eraYearOrdinalParse(e,s):t[ar]=parseInt(e,10)});function y3(e,t){var r,n,s,i=this._eras||Ps("en")._eras;for(r=0,n=i.length;r=0)return i[n]}function w3(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ve(e.since).year():ve(e.since).year()+(t-e.offset)*r}function _3(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;ei&&(t=i),L3.call(this,e,t,r,n,s))}function L3(e,t,r,n,s){var i=ak(e,t,r,n,s),o=Bl(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Oe("Q",0,"Qo","quarter");_e("Q",qS);gt("Q",function(e,t){t[us]=(rt(e)-1)*3});function F3(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Oe("D",["DD",2],"Do","date");_e("D",Ct,ja);_e("DD",Ct,$r);_e("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});gt(["D","DD"],Mn);gt("Do",function(e,t){t[Mn]=rt(e.match(Ct)[0])});var Nk=Ta("Date",!0);Oe("DDD",["DDDD",3],"DDDo","dayOfYear");_e("DDD",bf);_e("DDDD",XS);gt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=rt(e)});function z3(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Oe("m",["mm",2],0,"minute");_e("m",Ct,wv);_e("mm",Ct,$r);gt(["m","mm"],mn);var U3=Ta("Minutes",!1);Oe("s",["ss",2],0,"second");_e("s",Ct,wv);_e("ss",Ct,$r);gt(["s","ss"],ds);var V3=Ta("Seconds",!1);Oe("S",0,0,function(){return~~(this.millisecond()/100)});Oe(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Oe(0,["SSS",3],0,"millisecond");Oe(0,["SSSS",4],0,function(){return this.millisecond()*10});Oe(0,["SSSSS",5],0,function(){return this.millisecond()*100});Oe(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Oe(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Oe(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Oe(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});_e("S",bf,qS);_e("SS",bf,$r);_e("SSS",bf,XS);var Xs,Rk;for(Xs="SSSS";Xs.length<=9;Xs+="S")_e(Xs,Ea);function $3(e,t){t[zi]=rt(("0."+e)*1e3)}for(Xs="S";Xs.length<=9;Xs+="S")gt(Xs,$3);Rk=Ta("Milliseconds",!1);Oe("z",0,0,"zoneAbbr");Oe("zz",0,0,"zoneName");function B3(){return this._isUTC?"UTC":""}function W3(){return this._isUTC?"Coordinated Universal Time":""}var ae=bc.prototype;ae.add=I4;ae.calendar=B4;ae.clone=W4;ae.diff=X4;ae.endOf=a3;ae.format=t3;ae.from=r3;ae.fromNow=n3;ae.to=s3;ae.toNow=i3;ae.get=eL;ae.invalidAt=g3;ae.isAfter=H4;ae.isBefore=Y4;ae.isBetween=Z4;ae.isSame=K4;ae.isSameOrAfter=G4;ae.isSameOrBefore=q4;ae.isValid=p3;ae.lang=Sk;ae.locale=bk;ae.localeData=kk;ae.max=p4;ae.min=h4;ae.parsingFlags=m3;ae.set=tL;ae.startOf=o3;ae.subtract=L4;ae.toArray=d3;ae.toObject=f3;ae.toDate=u3;ae.toISOString=J4;ae.inspect=e3;typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ae.toJSON=h3;ae.toString=Q4;ae.unix=c3;ae.valueOf=l3;ae.creationData=v3;ae.eraName=_3;ae.eraNarrow=b3;ae.eraAbbr=S3;ae.eraYear=k3;ae.year=ek;ae.isLeapYear=JI;ae.weekYear=P3;ae.isoWeekYear=A3;ae.quarter=ae.quarters=F3;ae.month=ik;ae.daysInMonth=uL;ae.week=ae.weeks=yL;ae.isoWeek=ae.isoWeeks=xL;ae.weeksInYear=M3;ae.weeksInWeekYear=I3;ae.isoWeeksInYear=D3;ae.isoWeeksInISOWeekYear=O3;ae.date=Nk;ae.day=ae.days=AL;ae.weekday=DL;ae.isoWeekday=OL;ae.dayOfYear=z3;ae.hour=ae.hours=VL;ae.minute=ae.minutes=U3;ae.second=ae.seconds=V3;ae.millisecond=ae.milliseconds=Rk;ae.utcOffset=S4;ae.utc=C4;ae.local=E4;ae.parseZone=j4;ae.hasAlignedHourOffset=T4;ae.isDST=N4;ae.isLocal=P4;ae.isUtcOffset=A4;ae.isUtc=yk;ae.isUTC=yk;ae.zoneAbbr=B3;ae.zoneName=W3;ae.dates=sn("dates accessor is deprecated. Use date instead.",Nk);ae.months=sn("months accessor is deprecated. Use month instead",ik);ae.years=sn("years accessor is deprecated. Use year instead",ek);ae.zone=sn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",k4);ae.isDSTShifted=sn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",R4);function H3(e){return kt(e*1e3)}function Y3(){return kt.apply(null,arguments).parseZone()}function Pk(e){return e}var ct=mv.prototype;ct.calendar=PI;ct.longDateFormat=MI;ct.invalidDate=LI;ct.ordinal=UI;ct.preparse=Pk;ct.postformat=Pk;ct.relativeTime=$I;ct.pastFuture=BI;ct.set=NI;ct.eras=y3;ct.erasParse=x3;ct.erasConvertYear=w3;ct.erasAbbrRegex=E3;ct.erasNameRegex=C3;ct.erasNarrowRegex=j3;ct.months=oL;ct.monthsShort=aL;ct.monthsParse=cL;ct.monthsRegex=fL;ct.monthsShortRegex=dL;ct.week=pL;ct.firstDayOfYear=vL;ct.firstDayOfWeek=gL;ct.weekdays=jL;ct.weekdaysMin=NL;ct.weekdaysShort=TL;ct.weekdaysParse=PL;ct.weekdaysRegex=ML;ct.weekdaysShortRegex=IL;ct.weekdaysMinRegex=LL;ct.isPM=zL;ct.meridiem=$L;function bd(e,t,r,n){var s=Ps(),i=Zn().set(n,t);return s[r](i,e)}function Ak(e,t,r){if(ks(e)&&(t=e,e=void 0),e=e||"",t!=null)return bd(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=bd(e,n,r,"month");return s}function Dv(e,t,r,n){typeof e=="boolean"?(ks(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,ks(t)&&(r=t,t=void 0),t=t||"");var s=Ps(),i=e?s._week.dow:0,o,a=[];if(r!=null)return bd(t,(r+i)%7,n,"day");for(o=0;o<7;o++)a[o]=bd(t,(o+i)%7,n,"day");return a}function Z3(e,t){return Ak(e,t,"months")}function K3(e,t){return Ak(e,t,"monthsShort")}function G3(e,t,r){return Dv(e,t,r,"weekdays")}function q3(e,t,r){return Dv(e,t,r,"weekdaysShort")}function X3(e,t,r){return Dv(e,t,r,"weekdaysMin")}ai("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,r=rt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ve.lang=sn("moment.lang is deprecated. Use moment.locale instead.",ai);ve.langData=sn("moment.langData is deprecated. Use moment.localeData instead.",Ps);var ts=Math.abs;function Q3(){var e=this._data;return this._milliseconds=ts(this._milliseconds),this._days=ts(this._days),this._months=ts(this._months),e.milliseconds=ts(e.milliseconds),e.seconds=ts(e.seconds),e.minutes=ts(e.minutes),e.hours=ts(e.hours),e.months=ts(e.months),e.years=ts(e.years),this}function Dk(e,t,r,n){var s=Tn(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function J3(e,t){return Dk(this,e,t,1)}function eF(e,t){return Dk(this,e,t,-1)}function D0(e){return e<0?Math.floor(e):Math.ceil(e)}function tF(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,i,o,a,l;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=D0(sm(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Xr(e/1e3),n.seconds=s%60,i=Xr(s/60),n.minutes=i%60,o=Xr(i/60),n.hours=o%24,t+=Xr(o/24),l=Xr(Ok(t)),r+=l,t-=D0(sm(l)),a=Xr(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function Ok(e){return e*4800/146097}function sm(e){return e*146097/4800}function rF(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=on(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Ok(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(sm(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function As(e){return function(){return this.as(e)}}var Mk=As("ms"),nF=As("s"),sF=As("m"),iF=As("h"),oF=As("d"),aF=As("w"),lF=As("M"),cF=As("Q"),uF=As("y"),dF=Mk;function fF(){return Tn(this)}function hF(e){return e=on(e),this.isValid()?this[e+"s"]():NaN}function lo(e){return function(){return this.isValid()?this._data[e]:NaN}}var pF=lo("milliseconds"),mF=lo("seconds"),gF=lo("minutes"),vF=lo("hours"),yF=lo("days"),xF=lo("months"),wF=lo("years");function _F(){return Xr(this.days()/7)}var is=Math.round,Lo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function bF(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function SF(e,t,r,n){var s=Tn(e).abs(),i=is(s.as("s")),o=is(s.as("m")),a=is(s.as("h")),l=is(s.as("d")),u=is(s.as("M")),f=is(s.as("w")),d=is(s.as("y")),m=i<=r.ss&&["s",i]||i0,m[4]=n,bF.apply(null,m)}function kF(e){return e===void 0?is:typeof e=="function"?(is=e,!0):!1}function CF(e,t){return Lo[e]===void 0?!1:t===void 0?Lo[e]:(Lo[e]=t,e==="s"&&(Lo.ss=t-1),!0)}function EF(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Lo,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Lo,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),i=SF(this,!r,n,s),r&&(i=s.pastFuture(+this,i)),s.postformat(i)}var zh=Math.abs;function wo(e){return(e>0)-(e<0)||+e}function Rf(){if(!this.isValid())return this.localeData().invalidDate();var e=zh(this._milliseconds)/1e3,t=zh(this._days),r=zh(this._months),n,s,i,o,a=this.asSeconds(),l,u,f,d;return a?(n=Xr(e/60),s=Xr(n/60),e%=60,n%=60,i=Xr(r/12),r%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=wo(this._months)!==wo(a)?"-":"",f=wo(this._days)!==wo(a)?"-":"",d=wo(this._milliseconds)!==wo(a)?"-":"",l+"P"+(i?u+i+"Y":"")+(r?u+r+"M":"")+(t?f+t+"D":"")+(s||n||e?"T":"")+(s?d+s+"H":"")+(n?d+n+"M":"")+(e?d+o+"S":"")):"P0D"}var it=Tf.prototype;it.isValid=x4;it.abs=Q3;it.add=J3;it.subtract=eF;it.as=rF;it.asMilliseconds=Mk;it.asSeconds=nF;it.asMinutes=sF;it.asHours=iF;it.asDays=oF;it.asWeeks=aF;it.asMonths=lF;it.asQuarters=cF;it.asYears=uF;it.valueOf=dF;it._bubble=tF;it.clone=fF;it.get=hF;it.milliseconds=pF;it.seconds=mF;it.minutes=gF;it.hours=vF;it.days=yF;it.weeks=_F;it.months=xF;it.years=wF;it.humanize=EF;it.toISOString=Rf;it.toString=Rf;it.toJSON=Rf;it.locale=bk;it.localeData=kk;it.toIsoString=sn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rf);it.lang=Sk;Oe("X",0,0,"unix");Oe("x",0,0,"valueOf");_e("x",kf);_e("X",ZI);gt("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});gt("x",function(e,t,r){r._d=new Date(rt(e))});//! moment.js +ve.version="2.30.1";jI(kt);ve.fn=ae;ve.min=m4;ve.max=g4;ve.now=v4;ve.utc=Zn;ve.unix=H3;ve.months=Z3;ve.isDate=_c;ve.locale=ai;ve.invalid=wf;ve.duration=Tn;ve.isMoment=Cn;ve.weekdays=G3;ve.parseZone=Y3;ve.localeData=Ps;ve.isDuration=Du;ve.monthsShort=K3;ve.weekdaysMin=X3;ve.defineLocale=Cv;ve.updateLocale=YL;ve.locales=ZL;ve.weekdaysShort=q3;ve.normalizeUnits=on;ve.relativeTimeRounding=kF;ve.relativeTimeThreshold=CF;ve.calendarFormat=$4;ve.prototype=ae;ve.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 jF=async()=>await ft().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),bi=async e=>e.id?await ft().collection("access").update(e.id,e):await ft().collection("access").create(e),TF=async e=>(e.deleted=ve.utc().format("YYYY-MM-DD HH:mm:ss"),await ft().collection("access").update(e.id,e)),O0=async()=>await ft().collection("access_groups").getFullList({sort:"-created",expand:"access"}),NF=async e=>{const t=ft();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},RF=async e=>{const t=ft();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},M0=async e=>await ft().collection("access_groups").update(e.id,e),PF=(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(r=>r.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(r=>r.id===t.payload.id?t.payload:r)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},AF=async()=>{try{return await ft().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},DF=async e=>{const t=ft();let r;return e.id?r=await t.collection("settings").update(e.id,e):r=await t.collection("settings").create(e),r},Ik=y.createContext({}),Br=()=>y.useContext(Ik),OF=({children:e})=>{const[t,r]=y.useReducer(PF,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});y.useEffect(()=>{(async()=>{const f=await jF();r({type:"SET_ACCESSES",payload:f})})()},[]),y.useEffect(()=>{(async()=>{const f=await AF();r({type:"SET_EMAILS",payload:f})})()},[]),y.useEffect(()=>{(async()=>{const f=await O0();r({type:"SET_ACCESS_GROUPS",payload:f})})()},[]);const n=y.useCallback(async()=>{const u=await O0();r({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=y.useCallback(u=>{r({type:"SET_EMAILS",payload:u})},[]),i=y.useCallback(u=>{r({type:"DELETE_ACCESS",payload:u})},[]),o=y.useCallback(u=>{r({type:"ADD_ACCESS",payload:u})},[]),a=y.useCallback(u=>{r({type:"UPDATE_ACCESS",payload:u})},[]),l=y.useCallback(u=>{r({type:"SET_ACCESS_GROUPS",payload:u})},[]);return c.jsx(Ik.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:i,addAccess:o,setEmails:s,updateAccess:a,setAccessGroups:l,reloadAccessGroups:n},children:e&&e})},MF={theme:"system",setTheme:()=>null},Lk=y.createContext(MF);function IF({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...n}){const[s,i]=y.useState(()=>localStorage.getItem(r)||t);y.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(s)},[s]);const o={theme:s,setTheme:a=>{localStorage.setItem(r,a),i(a)}};return c.jsx(Lk.Provider,{...n,value:o,children:e})}const LF=()=>{const e=y.useContext(Lk);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function FF(){const{setTheme:e}=LF();return c.jsxs(xS,{children:[c.jsx(wS,{asChild:!0,children:c.jsxs(Je,{variant:"outline",size:"icon",children:[c.jsx(jP,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),c.jsx(CP,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),c.jsxs(Jg,{align:"end",children:[c.jsx(Go,{onClick:()=>e("light"),children:"浅色"}),c.jsx(Go,{onClick:()=>e("dark"),children:"暗黑"}),c.jsx(Go,{onClick:()=>e("system"),children:"系统"})]})]})}var zF="Separator",I0="horizontal",UF=["horizontal","vertical"],Fk=y.forwardRef((e,t)=>{const{decorative:r,orientation:n=I0,...s}=e,i=VF(n)?n:I0,a=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return c.jsx(Ie.div,{"data-orientation":i,...a,...s,ref:t})});Fk.displayName=zF;function VF(e){return UF.includes(e)}var zk=Fk;const Yt=y.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>c.jsx(zk,{ref:s,decorative:r,orientation:t,className:le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Yt.displayName=zk.displayName;function $F(){const e=nn(),t=Yn();if(!ft().authStore.isValid||!ft().authStore.isAdmin)return c.jsx(N1,{to:"/login"});const r=t.pathname,n=o=>(console.log(r),o==r?"bg-muted text-primary":"text-muted-foreground"),s=()=>{ft().authStore.clear(),e("/login")},i=()=>{e("/setting/password")};return c.jsx(c.Fragment,{children:c.jsx(OF,{children:c.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]",children:[c.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:c.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[c.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:c.jsxs(dr,{to:"/",className:"flex items-center gap-2 font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),c.jsx("div",{className:"flex-1",children:c.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[c.jsxs(dr,{to:"/",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/")),children:[c.jsx(Xx,{className:"h-4 w-4"}),"控制面板"]}),c.jsxs(dr,{to:"/domains",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/domains")),children:[c.jsx(Bp,{className:"h-4 w-4"}),"域名列表"]}),c.jsxs(dr,{to:"/access",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access")),children:[c.jsx(Qx,{className:"h-4 w-4"}),"授权管理"]}),c.jsxs(dr,{to:"/history",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/history")),children:[c.jsx(qx,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),c.jsxs("div",{className:"flex flex-col",children:[c.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[c.jsxs(av,{children:[c.jsx(lv,{asChild:!0,children:c.jsxs(Je,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[c.jsx(kP,{className:"h-5 w-5 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),c.jsx(xf,{side:"left",className:"flex flex-col",children:c.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[c.jsxs(dr,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"}),c.jsx("span",{className:"sr-only",children:"Certimate"})]}),c.jsxs(dr,{to:"/",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/")),children:[c.jsx(Xx,{className:"h-5 w-5"}),"控制面板"]}),c.jsxs(dr,{to:"/domains",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/domains")),children:[c.jsx(Bp,{className:"h-5 w-5"}),"域名列表"]}),c.jsxs(dr,{to:"/access",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/access")),children:[c.jsx(Qx,{className:"h-5 w-5"}),"授权管理"]}),c.jsxs(dr,{to:"/history",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/history")),children:[c.jsx(qx,{className:"h-5 w-5"}),"部署历史"]})]})})]}),c.jsx("div",{className:"w-full flex-1"}),c.jsx(FF,{}),c.jsxs(xS,{children:[c.jsx(wS,{asChild:!0,children:c.jsxs(Je,{variant:"secondary",size:"icon",className:"rounded-full",children:[c.jsx(xP,{className:"h-5 w-5"}),c.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),c.jsxs(Jg,{align:"end",children:[c.jsx(_S,{children:"账户"}),c.jsx(bS,{}),c.jsx(Go,{onClick:i,children:"设置"}),c.jsx(Go,{onClick:s,children:"退出"})]})]})]}),c.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[c.jsx(kg,{}),c.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[c.jsx("div",{className:""}),c.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[c.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[c.jsx(mP,{size:16}),c.jsx("div",{className:"ml-1",children:"文档"})]}),c.jsx(Yt,{orientation:"vertical",className:"mx-2"}),c.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:"Certimate v0.1.7"})]})]})]})]})]})})})}const Ov=({phase:e,phaseSuccess:t})=>{let r=c.jsx(c.Fragment,{children:" "});return e==="check"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),r},Uk=({className:e,...t})=>c.jsx("nav",{role:"navigation","aria-label":"pagination",className:le("mx-auto flex w-full justify-center",e),...t});Uk.displayName="Pagination";const Vk=y.forwardRef(({className:e,...t},r)=>c.jsx("ul",{ref:r,className:le("flex flex-row items-center gap-1",e),...t}));Vk.displayName="PaginationContent";const im=y.forwardRef(({className:e,...t},r)=>c.jsx("li",{ref:r,className:le("",e),...t}));im.displayName="PaginationItem";const $k=({className:e,isActive:t,size:r="icon",...n})=>c.jsx("a",{"aria-current":t?"page":void 0,className:le(af({variant:t?"outline":"ghost",size:r}),e),...n});$k.displayName="PaginationLink";const Bk=({className:e,...t})=>c.jsxs("span",{"aria-hidden":!0,className:le("flex h-9 w-9 items-center justify-center",e),...t,children:[c.jsx(_P,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"More pages"})]});Bk.displayName="PaginationEllipsis";const Wk=({totalPages:e,currentPage:t,onPageChange:r})=>{const s=()=>{if(e>7){let u=[];const f=Math.max(2,t-1),d=Math.min(e-1,t+1),m=e-1;return u=i(f,d),t>3&&u.unshift("..."),t{let f=a;const d=[];for(;f<=l;)d.push(f),f+=u;return d},o=s();return c.jsx(c.Fragment,{children:c.jsx(Uk,{className:"dark:text-stone-200 justify-end mt-3",children:c.jsx(Vk,{children:o.map((a,l)=>a==="..."?c.jsx(im,{children:c.jsx(Bk,{})},l):c.jsx(im,{children:c.jsx($k,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),r(a)},children:a})},l))})})})},hl=({when:e,children:t,fallback:r})=>e?t:r;var Hk="AlertDialog",[BF,rU]=Vr(Hk,[kS]),Ds=kS(),Yk=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ds(t);return c.jsx(sv,{...n,...r,modal:!0})};Yk.displayName=Hk;var WF="AlertDialogTrigger",Zk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(iv,{...s,...n,ref:t})});Zk.displayName=WF;var HF="AlertDialogPortal",Kk=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ds(t);return c.jsx(ov,{...n,...r})};Kk.displayName=HF;var YF="AlertDialogOverlay",Gk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(vc,{...s,...n,ref:t})});Gk.displayName=YF;var ea="AlertDialogContent",[ZF,KF]=BF(ea),qk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,i=Ds(r),o=y.useRef(null),a=Xe(t,o),l=y.useRef(null);return c.jsx(rI,{contentName:ea,titleName:Xk,docsSlug:"alert-dialog",children:c.jsx(ZF,{scope:r,cancelRef:l,children:c.jsxs(yc,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:ce(s.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(Tg,{children:n}),c.jsx(qF,{contentRef:o})]})})})});qk.displayName=ea;var Xk="AlertDialogTitle",Qk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(xc,{...s,...n,ref:t})});Qk.displayName=Xk;var Jk="AlertDialogDescription",eC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(wc,{...s,...n,ref:t})});eC.displayName=Jk;var GF="AlertDialogAction",tC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(yf,{...s,...n,ref:t})});tC.displayName=GF;var rC="AlertDialogCancel",nC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=KF(rC,r),i=Ds(r),o=Xe(t,s);return c.jsx(yf,{...i,...n,ref:o})});nC.displayName=rC;var qF=({contentRef:e})=>{const t=`\`${ea}\` requires a description for the component to be accessible for screen reader users. -You can add a description to the \`${ea}\` by passing a \`${Kk}\` component as a child, which also benefits sighted users by adding visible context to the dialog. +You can add a description to the \`${ea}\` by passing a \`${Jk}\` component as a child, which also benefits sighted users by adding visible context to the dialog. Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ea}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},D5=Vk,O5=$k,M5=Wk,Jk=Bk,eC=Hk,tC=qk,rC=Qk,nC=Zk,sC=Gk;const iC=D5,oC=O5,I5=M5,aC=y.forwardRef(({className:e,...t},r)=>c.jsx(Jk,{className:le("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:r}));aC.displayName=Jk.displayName;const Mv=y.forwardRef(({className:e,...t},r)=>c.jsxs(I5,{children:[c.jsx(aC,{}),c.jsx(eC,{ref:r,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Mv.displayName=eC.displayName;const Iv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});Iv.displayName="AlertDialogHeader";const Lv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Lv.displayName="AlertDialogFooter";const Fv=y.forwardRef(({className:e,...t},r)=>c.jsx(nC,{ref:r,className:le("text-lg font-semibold",e),...t}));Fv.displayName=nC.displayName;const zv=y.forwardRef(({className:e,...t},r)=>c.jsx(sC,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));zv.displayName=sC.displayName;const Uv=y.forwardRef(({className:e,...t},r)=>c.jsx(tC,{ref:r,className:le(af(),e),...t}));Uv.displayName=tC.displayName;const Vv=y.forwardRef(({className:e,...t},r)=>c.jsx(rC,{ref:r,className:le(af({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vv.displayName=rC.displayName;function lC(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var $v="Switch",[L5,M8]=nn($v),[F5,z5]=L5($v),cC=y.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:u,...f}=e,[d,m]=y.useState(null),v=Xe(t,h=>m(h)),w=y.useRef(!1),g=d?!!d.closest("form"):!0,[x=!1,p]=ui({prop:s,defaultProp:i,onChange:u});return c.jsxs(F5,{scope:r,checked:x,disabled:a,children:[c.jsx(Ve.button,{type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":fC(x),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:v,onClick:de(e.onClick,h=>{p(_=>!_),g&&(w.current=h.isPropagationStopped(),w.current||h.stopPropagation())})}),g&&c.jsx(U5,{control:d,bubbles:!w.current,name:n,value:l,checked:x,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});cC.displayName=$v;var uC="SwitchThumb",dC=y.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=z5(uC,r);return c.jsx(Ve.span,{"data-state":fC(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});dC.displayName=uC;var U5=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,i=y.useRef(null),o=lC(r),a=X1(t);return y.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&d){const m=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(m)}},[o,r,n]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function fC(e){return e?"checked":"unchecked"}var hC=cC,V5=dC;const pC=y.forwardRef(({className:e,...t},r)=>c.jsx(hC,{className:le("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:r,children:c.jsx(V5,{className:le("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")})}));pC.displayName=hC.displayName;var $5="VisuallyHidden",kc=y.forwardRef((e,t)=>c.jsx(Ve.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));kc.displayName=$5;var W5=kc,Wv="ToastProvider",[Bv,B5,H5]=lf("Toast"),[mC,I8]=nn("Toast",[H5]),[Y5,Pf]=mC(Wv),gC=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=y.useState(null),[u,f]=y.useState(0),d=y.useRef(!1),m=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Wv}\`. Expected non-empty \`string\`.`),c.jsx(Bv.Provider,{scope:t,children:c.jsx(Y5,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>f(v=>v+1),[]),onToastRemove:y.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m,children:o})})};gC.displayName=Wv;var vC="ToastViewport",Z5=["F8"],am="toast.viewportPause",lm="toast.viewportResume",yC=y.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Z5,label:s="Notifications ({hotkey})",...i}=e,o=Pf(vC,r),a=B5(r),l=y.useRef(null),u=y.useRef(null),f=y.useRef(null),d=y.useRef(null),m=Xe(t,d,o.onViewportChange),v=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;y.useEffect(()=>{const x=p=>{var _;n.every(C=>p[C]||p.code===C)&&((_=d.current)==null||_.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),y.useEffect(()=>{const x=l.current,p=d.current;if(w&&x&&p){const h=()=>{if(!o.isClosePausedRef.current){const j=new CustomEvent(am);p.dispatchEvent(j),o.isClosePausedRef.current=!0}},_=()=>{if(o.isClosePausedRef.current){const j=new CustomEvent(lm);p.dispatchEvent(j),o.isClosePausedRef.current=!1}},C=j=>{!x.contains(j.relatedTarget)&&_()},E=()=>{x.contains(document.activeElement)||_()};return x.addEventListener("focusin",h),x.addEventListener("focusout",C),x.addEventListener("pointermove",h),x.addEventListener("pointerleave",E),window.addEventListener("blur",h),window.addEventListener("focus",_),()=>{x.removeEventListener("focusin",h),x.removeEventListener("focusout",C),x.removeEventListener("pointermove",h),x.removeEventListener("pointerleave",E),window.removeEventListener("blur",h),window.removeEventListener("focus",_)}}},[w,o.isClosePausedRef]);const g=y.useCallback(({tabbingDirection:x})=>{const h=a().map(_=>{const C=_.ref.current,E=[C,...oF(C)];return x==="forwards"?E:E.reverse()});return(x==="forwards"?h.reverse():h).flat()},[a]);return y.useEffect(()=>{const x=d.current;if(x){const p=h=>{var E,j,R;const _=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!_){const A=document.activeElement,P=h.shiftKey;if(h.target===x&&P){(E=u.current)==null||E.focus();return}const T=g({tabbingDirection:P?"backwards":"forwards"}),F=T.findIndex(b=>b===A);Vh(T.slice(F+1))?h.preventDefault():P?(j=u.current)==null||j.focus():(R=f.current)==null||R.focus()}};return x.addEventListener("keydown",p),()=>x.removeEventListener("keydown",p)}},[a,g]),c.jsxs(iA,{ref:l,role:"region","aria-label":s.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&c.jsx(cm,{ref:u,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"forwards"});Vh(x)}}),c.jsx(Bv.Slot,{scope:r,children:c.jsx(Ve.ol,{tabIndex:-1,...i,ref:m})}),w&&c.jsx(cm,{ref:f,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"backwards"});Vh(x)}})]})});yC.displayName=vC;var xC="ToastFocusProxy",cm=y.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=Pf(xC,r);return c.jsx(kc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});cm.displayName=xC;var Af="Toast",K5="toast.swipeStart",G5="toast.swipeMove",q5="toast.swipeCancel",X5="toast.swipeEnd",wC=y.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=ui({prop:n,defaultProp:s,onChange:i});return c.jsx(Er,{present:r||a,children:c.jsx(eF,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Dt(e.onPause),onResume:Dt(e.onResume),onSwipeStart:de(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:de(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:de(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:de(e.onSwipeEnd,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});wC.displayName=Af;var[Q5,J5]=mC(Af,{onClose(){}}),eF=y.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:v,...w}=e,g=Pf(Af,r),[x,p]=y.useState(null),h=Xe(t,b=>p(b)),_=y.useRef(null),C=y.useRef(null),E=s||g.duration,j=y.useRef(0),R=y.useRef(E),A=y.useRef(0),{onToastAdd:P,onToastRemove:L}=g,q=Dt(()=>{var $;(x==null?void 0:x.contains(document.activeElement))&&(($=g.viewport)==null||$.focus()),o()}),T=y.useCallback(b=>{!b||b===1/0||(window.clearTimeout(A.current),j.current=new Date().getTime(),A.current=window.setTimeout(q,b))},[q]);y.useEffect(()=>{const b=g.viewport;if(b){const $=()=>{T(R.current),u==null||u()},te=()=>{const W=new Date().getTime()-j.current;R.current=R.current-W,window.clearTimeout(A.current),l==null||l()};return b.addEventListener(am,te),b.addEventListener(lm,$),()=>{b.removeEventListener(am,te),b.removeEventListener(lm,$)}}},[g.viewport,E,l,u,T]),y.useEffect(()=>{i&&!g.isClosePausedRef.current&&T(E)},[i,E,g.isClosePausedRef,T]),y.useEffect(()=>(P(),()=>L()),[P,L]);const F=y.useMemo(()=>x?jC(x):null,[x]);return g.viewport?c.jsxs(c.Fragment,{children:[F&&c.jsx(tF,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),c.jsx(Q5,{scope:r,onClose:q,children:Es.createPortal(c.jsx(Bv.ItemSlot,{scope:r,children:c.jsx(sA,{asChild:!0,onEscapeKeyDown:de(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||q(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Ve.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...w,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:de(e.onKeyDown,b=>{b.key==="Escape"&&(a==null||a(b.nativeEvent),b.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:de(e.onPointerDown,b=>{b.button===0&&(_.current={x:b.clientX,y:b.clientY})}),onPointerMove:de(e.onPointerMove,b=>{if(!_.current)return;const $=b.clientX-_.current.x,te=b.clientY-_.current.y,W=!!C.current,Z=["left","right"].includes(g.swipeDirection),I=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,Q=Z?I(0,$):0,z=Z?0:I(0,te),V=b.pointerType==="touch"?10:2,fe={x:Q,y:z},ne={originalEvent:b,delta:fe};W?(C.current=fe,du(G5,d,ne,{discrete:!1})):D0(fe,g.swipeDirection,V)?(C.current=fe,du(K5,f,ne,{discrete:!1}),b.target.setPointerCapture(b.pointerId)):(Math.abs($)>V||Math.abs(te)>V)&&(_.current=null)}),onPointerUp:de(e.onPointerUp,b=>{const $=C.current,te=b.target;if(te.hasPointerCapture(b.pointerId)&&te.releasePointerCapture(b.pointerId),C.current=null,_.current=null,$){const W=b.currentTarget,Z={originalEvent:b,delta:$};D0($,g.swipeDirection,g.swipeThreshold)?du(X5,v,Z,{discrete:!0}):du(q5,m,Z,{discrete:!0}),W.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),tF=e=>{const{__scopeToast:t,children:r,...n}=e,s=Pf(Af,t),[i,o]=y.useState(!1),[a,l]=y.useState(!1);return sF(()=>o(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(hc,{asChild:!0,children:c.jsx(kc,{...n,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",r]})})})},rF="ToastTitle",_C=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Ve.div,{...n,ref:t})});_C.displayName=rF;var nF="ToastDescription",bC=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Ve.div,{...n,ref:t})});bC.displayName=nF;var SC="ToastAction",kC=y.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(EC,{altText:r,asChild:!0,children:c.jsx(Hv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${SC}\`. Expected non-empty \`string\`.`),null)});kC.displayName=SC;var CC="ToastClose",Hv=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=J5(CC,r);return c.jsx(EC,{asChild:!0,children:c.jsx(Ve.button,{type:"button",...n,ref:t,onClick:de(e.onClick,s.onClose)})})});Hv.displayName=CC;var EC=y.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return c.jsx(Ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function jC(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),iF(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...jC(n))}}),t}function du(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Rg(s,i):s.dispatchEvent(i)}var D0=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function sF(e=()=>{}){const t=Dt(e);sr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function iF(e){return e.nodeType===e.ELEMENT_NODE}function oF(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Vh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var aF=gC,TC=yC,NC=wC,RC=_C,PC=bC,AC=kC,DC=Hv;const lF=aF,OC=y.forwardRef(({className:e,...t},r)=>c.jsx(TC,{ref:r,className:le("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}));OC.displayName=TC.displayName;const cF=dc("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"}}),MC=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(NC,{ref:n,className:le(cF({variant:t}),e),...r}));MC.displayName=NC.displayName;const uF=y.forwardRef(({className:e,...t},r)=>c.jsx(AC,{ref:r,className:le("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}));uF.displayName=AC.displayName;const IC=y.forwardRef(({className:e,...t},r)=>c.jsx(DC,{ref:r,className:le("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(jg,{className:"h-4 w-4"})}));IC.displayName=DC.displayName;const LC=y.forwardRef(({className:e,...t},r)=>c.jsx(RC,{ref:r,className:le("text-sm font-semibold",e),...t}));LC.displayName=RC.displayName;const FC=y.forwardRef(({className:e,...t},r)=>c.jsx(PC,{ref:r,className:le("text-sm opacity-90",e),...t}));FC.displayName=PC.displayName;const dF=1,fF=1e6;let $h=0;function hF(){return $h=($h+1)%Number.MAX_SAFE_INTEGER,$h.toString()}const Wh=new Map,O0=e=>{if(Wh.has(e))return;const t=setTimeout(()=>{Wh.delete(e),pl({type:"REMOVE_TOAST",toastId:e})},fF);Wh.set(e,t)},pF=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,dF)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?O0(r):e.toasts.forEach(n=>{O0(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Ou=[];let Mu={toasts:[]};function pl(e){Mu=pF(Mu,e),Ou.forEach(t=>{t(Mu)})}function mF({...e}){const t=hF(),r=s=>pl({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>pl({type:"DISMISS_TOAST",toastId:t});return pl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Cc(){const[e,t]=y.useState(Mu);return y.useEffect(()=>(Ou.push(t),()=>{const r=Ou.indexOf(t);r>-1&&Ou.splice(r,1)}),[e]),{...e,toast:mF,dismiss:r=>pl({type:"DISMISS_TOAST",toastId:r})}}function Df(){const{toasts:e}=Cc();return c.jsxs(lF,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return c.jsxs(MC,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(LC,{children:r}),n&&c.jsx(FC,{children:n})]}),s,c.jsx(IC,{})]},t)}),c.jsx(OC,{})]})}var[Of,L8]=nn("Tooltip",[Ca]),Mf=Ca(),zC="TooltipProvider",gF=700,um="tooltip.open",[vF,Yv]=Of(zC),UC=e=>{const{__scopeTooltip:t,delayDuration:r=gF,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=y.useState(!0),l=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),c.jsx(vF,{scope:t,isOpenDelayed:o,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:y.useCallback(f=>{l.current=f},[]),disableHoverableContent:s,children:i})};UC.displayName=zC;var If="Tooltip",[yF,Lf]=Of(If),VC=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,l=Yv(If,e.__scopeTooltip),u=Mf(t),[f,d]=y.useState(null),m=Un(),v=y.useRef(0),w=o??l.disableHoverableContent,g=a??l.delayDuration,x=y.useRef(!1),[p=!1,h]=ui({prop:n,defaultProp:s,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(um))):l.onClose(),i==null||i(R)}}),_=y.useMemo(()=>p?x.current?"delayed-open":"instant-open":"closed",[p]),C=y.useCallback(()=>{window.clearTimeout(v.current),x.current=!1,h(!0)},[h]),E=y.useCallback(()=>{window.clearTimeout(v.current),h(!1)},[h]),j=y.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,h(!0)},g)},[g,h]);return y.useEffect(()=>()=>window.clearTimeout(v.current),[]),c.jsx(Ug,{...u,children:c.jsx(yF,{scope:t,contentId:m,open:p,stateAttribute:_,trigger:f,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayed?j():C()},[l.isOpenDelayed,j,C]),onTriggerLeave:y.useCallback(()=>{w?E():window.clearTimeout(v.current)},[E,w]),onOpen:C,onClose:E,disableHoverableContent:w,children:r})})};VC.displayName=If;var dm="TooltipTrigger",$C=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Lf(dm,r),i=Yv(dm,r),o=Mf(r),a=y.useRef(null),l=Xe(t,a,s.onTriggerChange),u=y.useRef(!1),f=y.useRef(!1),d=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),c.jsx(Vg,{asChild:!0,...o,children:c.jsx(Ve.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:de(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:de(e.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:de(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:de(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:de(e.onBlur,s.onClose),onClick:de(e.onClick,s.onClose)})})});$C.displayName=dm;var xF="TooltipPortal",[F8,wF]=Of(xF,{forceMount:void 0}),ua="TooltipContent",Zv=y.forwardRef((e,t)=>{const r=wF(ua,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=Lf(ua,e.__scopeTooltip);return c.jsx(Er,{present:n||o.open,children:o.disableHoverableContent?c.jsx(WC,{side:s,...i,ref:t}):c.jsx(_F,{side:s,...i,ref:t})})}),_F=y.forwardRef((e,t)=>{const r=Lf(ua,e.__scopeTooltip),n=Yv(ua,e.__scopeTooltip),s=y.useRef(null),i=Xe(t,s),[o,a]=y.useState(null),{trigger:l,onClose:u}=r,f=s.current,{onPointerInTransitChange:d}=n,m=y.useCallback(()=>{a(null),d(!1)},[d]),v=y.useCallback((w,g)=>{const x=w.currentTarget,p={x:w.clientX,y:w.clientY},h=CF(p,x.getBoundingClientRect()),_=EF(p,h),C=jF(g.getBoundingClientRect()),E=NF([..._,...C]);a(E),d(!0)},[d]);return y.useEffect(()=>()=>m(),[m]),y.useEffect(()=>{if(l&&f){const w=x=>v(x,f),g=x=>v(x,l);return l.addEventListener("pointerleave",w),f.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",g)}}},[l,f,v,m]),y.useEffect(()=>{if(o){const w=g=>{const x=g.target,p={x:g.clientX,y:g.clientY},h=(l==null?void 0:l.contains(x))||(f==null?void 0:f.contains(x)),_=!TF(p,o);h?m():_&&(m(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,f,o,u,m]),c.jsx(WC,{...e,ref:i})}),[bF,SF]=Of(If,{isInside:!1}),WC=y.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Lf(ua,r),u=Mf(r),{onClose:f}=l;return y.useEffect(()=>(document.addEventListener(um,f),()=>document.removeEventListener(um,f)),[f]),y.useEffect(()=>{if(l.trigger){const d=m=>{const v=m.target;v!=null&&v.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),c.jsx(ba,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:c.jsxs($g,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Tg,{children:n}),c.jsx(bF,{scope:r,isInside:!0,children:c.jsx(W5,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Zv.displayName=ua;var BC="TooltipArrow",kF=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Mf(r);return SF(BC,r).isInside?null:c.jsx(Wg,{...s,...n,ref:t})});kF.displayName=BC;function CF(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function EF(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function jF(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function TF(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;in!=f>n&&r<(u-a)*(n-l)/(f-l)+a&&(s=!s)}return s}function NF(e){const t=e.slice();return t.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),RF(t)}function RF(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var PF=VC,AF=$C,HC=Zv;const DF=PF,OF=AF,MF=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(HC,{ref:n,sideOffset:t,className:le("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),...r}));MF.displayName=HC.displayName;function fu(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var YC={exports:{}};/*! +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},XF=Yk,QF=Zk,JF=Kk,sC=Gk,iC=qk,oC=tC,aC=nC,lC=Qk,cC=eC;const uC=XF,dC=QF,e5=JF,fC=y.forwardRef(({className:e,...t},r)=>c.jsx(sC,{className:le("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:r}));fC.displayName=sC.displayName;const Mv=y.forwardRef(({className:e,...t},r)=>c.jsxs(e5,{children:[c.jsx(fC,{}),c.jsx(iC,{ref:r,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Mv.displayName=iC.displayName;const Iv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});Iv.displayName="AlertDialogHeader";const Lv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Lv.displayName="AlertDialogFooter";const Fv=y.forwardRef(({className:e,...t},r)=>c.jsx(lC,{ref:r,className:le("text-lg font-semibold",e),...t}));Fv.displayName=lC.displayName;const zv=y.forwardRef(({className:e,...t},r)=>c.jsx(cC,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));zv.displayName=cC.displayName;const Uv=y.forwardRef(({className:e,...t},r)=>c.jsx(oC,{ref:r,className:le(af(),e),...t}));Uv.displayName=oC.displayName;const Vv=y.forwardRef(({className:e,...t},r)=>c.jsx(aC,{ref:r,className:le(af({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vv.displayName=aC.displayName;function hC(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var $v="Switch",[t5,nU]=Vr($v),[r5,n5]=t5($v),pC=y.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:u,...f}=e,[d,m]=y.useState(null),v=Xe(t,h=>m(h)),w=y.useRef(!1),g=d?!!d.closest("form"):!0,[x=!1,p]=_s({prop:s,defaultProp:i,onChange:u});return c.jsxs(r5,{scope:r,checked:x,disabled:a,children:[c.jsx(Ie.button,{type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":vC(x),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:v,onClick:ce(e.onClick,h=>{p(_=>!_),g&&(w.current=h.isPropagationStopped(),w.current||h.stopPropagation())})}),g&&c.jsx(s5,{control:d,bubbles:!w.current,name:n,value:l,checked:x,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});pC.displayName=$v;var mC="SwitchThumb",gC=y.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=n5(mC,r);return c.jsx(Ie.span,{"data-state":vC(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});gC.displayName=mC;var s5=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,i=y.useRef(null),o=hC(r),a=tb(t);return y.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&d){const m=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(m)}},[o,r,n]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function vC(e){return e?"checked":"unchecked"}var yC=pC,i5=gC;const xC=y.forwardRef(({className:e,...t},r)=>c.jsx(yC,{className:le("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:r,children:c.jsx(i5,{className:le("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")})}));xC.displayName=yC.displayName;var o5="VisuallyHidden",Cc=y.forwardRef((e,t)=>c.jsx(Ie.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}}));Cc.displayName=o5;var a5=Cc,Bv="ToastProvider",[Wv,l5,c5]=lf("Toast"),[wC,sU]=Vr("Toast",[c5]),[u5,Pf]=wC(Bv),_C=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=y.useState(null),[u,f]=y.useState(0),d=y.useRef(!1),m=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Bv}\`. Expected non-empty \`string\`.`),c.jsx(Wv.Provider,{scope:t,children:c.jsx(u5,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>f(v=>v+1),[]),onToastRemove:y.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m,children:o})})};_C.displayName=Bv;var bC="ToastViewport",d5=["F8"],om="toast.viewportPause",am="toast.viewportResume",SC=y.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=d5,label:s="Notifications ({hotkey})",...i}=e,o=Pf(bC,r),a=l5(r),l=y.useRef(null),u=y.useRef(null),f=y.useRef(null),d=y.useRef(null),m=Xe(t,d,o.onViewportChange),v=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;y.useEffect(()=>{const x=p=>{var _;n.every(C=>p[C]||p.code===C)&&((_=d.current)==null||_.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),y.useEffect(()=>{const x=l.current,p=d.current;if(w&&x&&p){const h=()=>{if(!o.isClosePausedRef.current){const j=new CustomEvent(om);p.dispatchEvent(j),o.isClosePausedRef.current=!0}},_=()=>{if(o.isClosePausedRef.current){const j=new CustomEvent(am);p.dispatchEvent(j),o.isClosePausedRef.current=!1}},C=j=>{!x.contains(j.relatedTarget)&&_()},E=()=>{x.contains(document.activeElement)||_()};return x.addEventListener("focusin",h),x.addEventListener("focusout",C),x.addEventListener("pointermove",h),x.addEventListener("pointerleave",E),window.addEventListener("blur",h),window.addEventListener("focus",_),()=>{x.removeEventListener("focusin",h),x.removeEventListener("focusout",C),x.removeEventListener("pointermove",h),x.removeEventListener("pointerleave",E),window.removeEventListener("blur",h),window.removeEventListener("focus",_)}}},[w,o.isClosePausedRef]);const g=y.useCallback(({tabbingDirection:x})=>{const h=a().map(_=>{const C=_.ref.current,E=[C,...k5(C)];return x==="forwards"?E:E.reverse()});return(x==="forwards"?h.reverse():h).flat()},[a]);return y.useEffect(()=>{const x=d.current;if(x){const p=h=>{var E,j,R;const _=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!_){const A=document.activeElement,P=h.shiftKey;if(h.target===x&&P){(E=u.current)==null||E.focus();return}const T=g({tabbingDirection:P?"backwards":"forwards"}),F=T.findIndex(b=>b===A);Uh(T.slice(F+1))?h.preventDefault():P?(j=u.current)==null||j.focus():(R=f.current)==null||R.focus()}};return x.addEventListener("keydown",p),()=>x.removeEventListener("keydown",p)}},[a,g]),c.jsxs(CA,{ref:l,role:"region","aria-label":s.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&c.jsx(lm,{ref:u,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"forwards"});Uh(x)}}),c.jsx(Wv.Slot,{scope:r,children:c.jsx(Ie.ol,{tabIndex:-1,...i,ref:m})}),w&&c.jsx(lm,{ref:f,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"backwards"});Uh(x)}})]})});SC.displayName=bC;var kC="ToastFocusProxy",lm=y.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=Pf(kC,r);return c.jsx(Cc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});lm.displayName=kC;var Af="Toast",f5="toast.swipeStart",h5="toast.swipeMove",p5="toast.swipeCancel",m5="toast.swipeEnd",CC=y.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=_s({prop:n,defaultProp:s,onChange:i});return c.jsx(yr,{present:r||a,children:c.jsx(y5,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Dt(e.onPause),onResume:Dt(e.onResume),onSwipeStart:ce(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ce(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ce(e.onSwipeEnd,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});CC.displayName=Af;var[g5,v5]=wC(Af,{onClose(){}}),y5=y.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:v,...w}=e,g=Pf(Af,r),[x,p]=y.useState(null),h=Xe(t,b=>p(b)),_=y.useRef(null),C=y.useRef(null),E=s||g.duration,j=y.useRef(0),R=y.useRef(E),A=y.useRef(0),{onToastAdd:P,onToastRemove:L}=g,q=Dt(()=>{var $;(x==null?void 0:x.contains(document.activeElement))&&(($=g.viewport)==null||$.focus()),o()}),T=y.useCallback(b=>{!b||b===1/0||(window.clearTimeout(A.current),j.current=new Date().getTime(),A.current=window.setTimeout(q,b))},[q]);y.useEffect(()=>{const b=g.viewport;if(b){const $=()=>{T(R.current),u==null||u()},te=()=>{const B=new Date().getTime()-j.current;R.current=R.current-B,window.clearTimeout(A.current),l==null||l()};return b.addEventListener(om,te),b.addEventListener(am,$),()=>{b.removeEventListener(om,te),b.removeEventListener(am,$)}}},[g.viewport,E,l,u,T]),y.useEffect(()=>{i&&!g.isClosePausedRef.current&&T(E)},[i,E,g.isClosePausedRef,T]),y.useEffect(()=>(P(),()=>L()),[P,L]);const F=y.useMemo(()=>x?AC(x):null,[x]);return g.viewport?c.jsxs(c.Fragment,{children:[F&&c.jsx(x5,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),c.jsx(g5,{scope:r,onClose:q,children:js.createPortal(c.jsx(Wv.ItemSlot,{scope:r,children:c.jsx(kA,{asChild:!0,onEscapeKeyDown:ce(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||q(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Ie.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...w,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ce(e.onKeyDown,b=>{b.key==="Escape"&&(a==null||a(b.nativeEvent),b.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:ce(e.onPointerDown,b=>{b.button===0&&(_.current={x:b.clientX,y:b.clientY})}),onPointerMove:ce(e.onPointerMove,b=>{if(!_.current)return;const $=b.clientX-_.current.x,te=b.clientY-_.current.y,B=!!C.current,Z=["left","right"].includes(g.swipeDirection),I=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,Q=Z?I(0,$):0,z=Z?0:I(0,te),V=b.pointerType==="touch"?10:2,fe={x:Q,y:z},ne={originalEvent:b,delta:fe};B?(C.current=fe,fu(h5,d,ne,{discrete:!1})):L0(fe,g.swipeDirection,V)?(C.current=fe,fu(f5,f,ne,{discrete:!1}),b.target.setPointerCapture(b.pointerId)):(Math.abs($)>V||Math.abs(te)>V)&&(_.current=null)}),onPointerUp:ce(e.onPointerUp,b=>{const $=C.current,te=b.target;if(te.hasPointerCapture(b.pointerId)&&te.releasePointerCapture(b.pointerId),C.current=null,_.current=null,$){const B=b.currentTarget,Z={originalEvent:b,delta:$};L0($,g.swipeDirection,g.swipeThreshold)?fu(m5,v,Z,{discrete:!0}):fu(p5,m,Z,{discrete:!0}),B.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),x5=e=>{const{__scopeToast:t,children:r,...n}=e,s=Pf(Af,t),[i,o]=y.useState(!1),[a,l]=y.useState(!1);return b5(()=>o(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(pc,{asChild:!0,children:c.jsx(Cc,{...n,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",r]})})})},w5="ToastTitle",EC=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Ie.div,{...n,ref:t})});EC.displayName=w5;var _5="ToastDescription",jC=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Ie.div,{...n,ref:t})});jC.displayName=_5;var TC="ToastAction",NC=y.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(PC,{altText:r,asChild:!0,children:c.jsx(Hv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${TC}\`. Expected non-empty \`string\`.`),null)});NC.displayName=TC;var RC="ToastClose",Hv=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=v5(RC,r);return c.jsx(PC,{asChild:!0,children:c.jsx(Ie.button,{type:"button",...n,ref:t,onClick:ce(e.onClick,s.onClose)})})});Hv.displayName=RC;var PC=y.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return c.jsx(Ie.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function AC(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),S5(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...AC(n))}}),t}function fu(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Rg(s,i):s.dispatchEvent(i)}var L0=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function b5(e=()=>{}){const t=Dt(e);nr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function S5(e){return e.nodeType===e.ELEMENT_NODE}function k5(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Uh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var C5=_C,DC=SC,OC=CC,MC=EC,IC=jC,LC=NC,FC=Hv;const E5=C5,zC=y.forwardRef(({className:e,...t},r)=>c.jsx(DC,{ref:r,className:le("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}));zC.displayName=DC.displayName;const j5=dc("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"}}),UC=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(OC,{ref:n,className:le(j5({variant:t}),e),...r}));UC.displayName=OC.displayName;const T5=y.forwardRef(({className:e,...t},r)=>c.jsx(LC,{ref:r,className:le("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}));T5.displayName=LC.displayName;const VC=y.forwardRef(({className:e,...t},r)=>c.jsx(FC,{ref:r,className:le("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(jg,{className:"h-4 w-4"})}));VC.displayName=FC.displayName;const $C=y.forwardRef(({className:e,...t},r)=>c.jsx(MC,{ref:r,className:le("text-sm font-semibold",e),...t}));$C.displayName=MC.displayName;const BC=y.forwardRef(({className:e,...t},r)=>c.jsx(IC,{ref:r,className:le("text-sm opacity-90",e),...t}));BC.displayName=IC.displayName;const N5=1,R5=1e6;let Vh=0;function P5(){return Vh=(Vh+1)%Number.MAX_SAFE_INTEGER,Vh.toString()}const $h=new Map,F0=e=>{if($h.has(e))return;const t=setTimeout(()=>{$h.delete(e),pl({type:"REMOVE_TOAST",toastId:e})},R5);$h.set(e,t)},A5=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,N5)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?F0(r):e.toasts.forEach(n=>{F0(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Mu=[];let Iu={toasts:[]};function pl(e){Iu=A5(Iu,e),Mu.forEach(t=>{t(Iu)})}function D5({...e}){const t=P5(),r=s=>pl({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>pl({type:"DISMISS_TOAST",toastId:t});return pl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Ec(){const[e,t]=y.useState(Iu);return y.useEffect(()=>(Mu.push(t),()=>{const r=Mu.indexOf(t);r>-1&&Mu.splice(r,1)}),[e]),{...e,toast:D5,dismiss:r=>pl({type:"DISMISS_TOAST",toastId:r})}}function Yv(){const{toasts:e}=Ec();return c.jsxs(E5,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return c.jsxs(UC,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx($C,{children:r}),n&&c.jsx(BC,{children:n})]}),s,c.jsx(VC,{})]},t)}),c.jsx(zC,{})]})}var[Df,iU]=Vr("Tooltip",[Ca]),Of=Ca(),WC="TooltipProvider",O5=700,cm="tooltip.open",[M5,Zv]=Df(WC),HC=e=>{const{__scopeTooltip:t,delayDuration:r=O5,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=y.useState(!0),l=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),c.jsx(M5,{scope:t,isOpenDelayed:o,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:y.useCallback(f=>{l.current=f},[]),disableHoverableContent:s,children:i})};HC.displayName=WC;var Mf="Tooltip",[I5,If]=Df(Mf),YC=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,l=Zv(Mf,e.__scopeTooltip),u=Of(t),[f,d]=y.useState(null),m=xn(),v=y.useRef(0),w=o??l.disableHoverableContent,g=a??l.delayDuration,x=y.useRef(!1),[p=!1,h]=_s({prop:n,defaultProp:s,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(cm))):l.onClose(),i==null||i(R)}}),_=y.useMemo(()=>p?x.current?"delayed-open":"instant-open":"closed",[p]),C=y.useCallback(()=>{window.clearTimeout(v.current),x.current=!1,h(!0)},[h]),E=y.useCallback(()=>{window.clearTimeout(v.current),h(!1)},[h]),j=y.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,h(!0)},g)},[g,h]);return y.useEffect(()=>()=>window.clearTimeout(v.current),[]),c.jsx(Ug,{...u,children:c.jsx(I5,{scope:t,contentId:m,open:p,stateAttribute:_,trigger:f,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayed?j():C()},[l.isOpenDelayed,j,C]),onTriggerLeave:y.useCallback(()=>{w?E():window.clearTimeout(v.current)},[E,w]),onOpen:C,onClose:E,disableHoverableContent:w,children:r})})};YC.displayName=Mf;var um="TooltipTrigger",ZC=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=If(um,r),i=Zv(um,r),o=Of(r),a=y.useRef(null),l=Xe(t,a,s.onTriggerChange),u=y.useRef(!1),f=y.useRef(!1),d=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),c.jsx(Vg,{asChild:!0,...o,children:c.jsx(Ie.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ce(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:ce(e.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:ce(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ce(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ce(e.onBlur,s.onClose),onClick:ce(e.onClick,s.onClose)})})});ZC.displayName=um;var L5="TooltipPortal",[oU,F5]=Df(L5,{forceMount:void 0}),ua="TooltipContent",Kv=y.forwardRef((e,t)=>{const r=F5(ua,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=If(ua,e.__scopeTooltip);return c.jsx(yr,{present:n||o.open,children:o.disableHoverableContent?c.jsx(KC,{side:s,...i,ref:t}):c.jsx(z5,{side:s,...i,ref:t})})}),z5=y.forwardRef((e,t)=>{const r=If(ua,e.__scopeTooltip),n=Zv(ua,e.__scopeTooltip),s=y.useRef(null),i=Xe(t,s),[o,a]=y.useState(null),{trigger:l,onClose:u}=r,f=s.current,{onPointerInTransitChange:d}=n,m=y.useCallback(()=>{a(null),d(!1)},[d]),v=y.useCallback((w,g)=>{const x=w.currentTarget,p={x:w.clientX,y:w.clientY},h=B5(p,x.getBoundingClientRect()),_=W5(p,h),C=H5(g.getBoundingClientRect()),E=Z5([..._,...C]);a(E),d(!0)},[d]);return y.useEffect(()=>()=>m(),[m]),y.useEffect(()=>{if(l&&f){const w=x=>v(x,f),g=x=>v(x,l);return l.addEventListener("pointerleave",w),f.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",g)}}},[l,f,v,m]),y.useEffect(()=>{if(o){const w=g=>{const x=g.target,p={x:g.clientX,y:g.clientY},h=(l==null?void 0:l.contains(x))||(f==null?void 0:f.contains(x)),_=!Y5(p,o);h?m():_&&(m(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,f,o,u,m]),c.jsx(KC,{...e,ref:i})}),[U5,V5]=Df(Mf,{isInside:!1}),KC=y.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=If(ua,r),u=Of(r),{onClose:f}=l;return y.useEffect(()=>(document.addEventListener(cm,f),()=>document.removeEventListener(cm,f)),[f]),y.useEffect(()=>{if(l.trigger){const d=m=>{const v=m.target;v!=null&&v.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),c.jsx(ba,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:c.jsxs($g,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Tg,{children:n}),c.jsx(U5,{scope:r,isInside:!0,children:c.jsx(a5,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Kv.displayName=ua;var GC="TooltipArrow",$5=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Of(r);return V5(GC,r).isInside?null:c.jsx(Bg,{...s,...n,ref:t})});$5.displayName=GC;function B5(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function W5(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function H5(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Y5(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;in!=f>n&&r<(u-a)*(n-l)/(f-l)+a&&(s=!s)}return s}function Z5(e){const t=e.slice();return t.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),K5(t)}function K5(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var G5=YC,q5=ZC,qC=Kv;const X5=G5,Q5=q5,J5=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(qC,{ref:n,sideOffset:t,className:le("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),...r}));J5.displayName=qC.displayName;function hu(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var XC={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -285,7 +285,7 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE -*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,s,i){function o(u,f){if(!s[u]){if(!n[u]){var d=typeof fu=="function"&&fu;if(!f&&d)return d(u,!0);if(a)return a(u,!0);var m=new Error("Cannot find module '"+u+"'");throw m.code="MODULE_NOT_FOUND",m}var v=s[u]={exports:{}};n[u][0].call(v.exports,function(w){var g=n[u][1][w];return o(g||w)},v,v.exports,r,n,s,i)}return s[u].exports}for(var a=typeof fu=="function"&&fu,l=0;l>2,v=(3&u)<<4|f>>4,w=1<_?(15&f)<<2|d>>6:64,g=2<_?63&d:64,x.push(a.charAt(m)+a.charAt(v)+a.charAt(w)+a.charAt(g));return x.join("")},s.decode=function(l){var u,f,d,m,v,w,g=0,x=0,p="data:";if(l.substr(0,p.length)===p)throw new Error("Invalid base64 input, it looks like a data url.");var h,_=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&_--,l.charAt(l.length-2)===a.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=o.uint8array?new Uint8Array(0|_):new Array(0|_);g>4,f=(15&m)<<4|(v=a.indexOf(l.charAt(g++)))>>2,d=(3&v)<<6|(w=a.indexOf(l.charAt(g++))),h[x++]=u,v!==64&&(h[x++]=f),w!==64&&(h[x++]=d);return h}},{"./support":30,"./utils":32}],2:[function(r,n,s){var i=r("./external"),o=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function u(f,d,m,v,w){this.compressedSize=f,this.uncompressedSize=d,this.crc32=m,this.compression=v,this.compressedContent=w}u.prototype={getContentWorker:function(){var f=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return f.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(f,d,m){return f.pipe(new a).pipe(new l("uncompressedSize")).pipe(d.compressWorker(m)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var i=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var i=r("./utils"),o=function(){for(var a,l=[],u=0;u<256;u++){a=u;for(var f=0;f<8;f++)a=1&a?3988292384^a>>>1:a>>>1;l[u]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?function(u,f,d,m){var v=o,w=m+d;u^=-1;for(var g=m;g>>8^v[255&(u^f[g])];return-1^u}(0|l,a,a.length,0):function(u,f,d,m){var v=o,w=m+d;u^=-1;for(var g=m;g>>8^v[255&(u^f.charCodeAt(g))];return-1^u}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(r,n,s){var i=null;i=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:i}},{lie:37}],7:[function(r,n,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),u=i?"uint8array":"array";function f(d,m){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=m,this.meta={}}s.magic="\b\0",a.inherits(f,l),f.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,d.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(m){d.push({data:m,meta:d.meta})}},s.compressWorker=function(d){return new f("Deflate",d)},s.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,s){function i(v,w){var g,x="";for(g=0;g>>=8;return x}function o(v,w,g,x,p,h){var _,C,E=v.file,j=v.compression,R=h!==u.utf8encode,A=a.transformTo("string",h(E.name)),P=a.transformTo("string",u.utf8encode(E.name)),L=E.comment,q=a.transformTo("string",h(L)),T=a.transformTo("string",u.utf8encode(L)),F=P.length!==E.name.length,b=T.length!==L.length,$="",te="",W="",Z=E.dir,I=E.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};w&&!g||(Q.crc32=v.crc32,Q.compressedSize=v.compressedSize,Q.uncompressedSize=v.uncompressedSize);var z=0;w&&(z|=8),R||!F&&!b||(z|=2048);var V=0,fe=0;Z&&(V|=16),p==="UNIX"?(fe=798,V|=function(se,Ae){var he=se;return se||(he=Ae?16893:33204),(65535&he)<<16}(E.unixPermissions,Z)):(fe=20,V|=function(se){return 63&(se||0)}(E.dosPermissions)),_=I.getUTCHours(),_<<=6,_|=I.getUTCMinutes(),_<<=5,_|=I.getUTCSeconds()/2,C=I.getUTCFullYear()-1980,C<<=4,C|=I.getUTCMonth()+1,C<<=5,C|=I.getUTCDate(),F&&(te=i(1,1)+i(f(A),4)+P,$+="up"+i(te.length,2)+te),b&&(W=i(1,1)+i(f(q),4)+T,$+="uc"+i(W.length,2)+W);var ne="";return ne+=` -\0`,ne+=i(z,2),ne+=j.magic,ne+=i(_,2),ne+=i(C,2),ne+=i(Q.crc32,4),ne+=i(Q.compressedSize,4),ne+=i(Q.uncompressedSize,4),ne+=i(A.length,2),ne+=i($.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ne+A+$,dirRecord:d.CENTRAL_FILE_HEADER+i(fe,2)+ne+i(q.length,2)+"\0\0\0\0"+i(V,4)+i(x,4)+A+$+q}}var a=r("../utils"),l=r("../stream/GenericWorker"),u=r("../utf8"),f=r("../crc32"),d=r("../signature");function m(v,w,g,x){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=g,this.encodeFileName=x,this.streamFiles=v,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(v){var w=v.meta.percent||0,g=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(v):(this.bytesWritten+=v.data.length,l.prototype.push.call(this,{data:v.data,meta:{currentFile:this.currentFile,percent:g?(w+100*(g-x-1))/g:100}}))},m.prototype.openedSource=function(v){this.currentSourceOffset=this.bytesWritten,this.currentFile=v.file.name;var w=this.streamFiles&&!v.file.dir;if(w){var g=o(v,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(v){this.accumulate=!1;var w=this.streamFiles&&!v.file.dir,g=o(v,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),w)this.push({data:function(x){return d.DATA_DESCRIPTOR+i(x.crc32,4)+i(x.compressedSize,4)+i(x.uncompressedSize,4)}(v),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var v=this.bytesWritten,w=0;w=this.index;l--)u=(u<<8)+this.byteAt(l);return this.index+=a,u},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=o},{"../utils":32}],19:[function(r,n,s){var i=r("./Uint8ArrayReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var i=r("./DataReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var i=r("./ArrayReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var i=r("../utils"),o=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),u=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");n.exports=function(d){var m=i.getTypeOf(d);return i.checkSupport(m),m!=="string"||o.uint8array?m==="nodebuffer"?new u(d):o.uint8array?new f(i.transformTo("uint8array",d)):new a(i.transformTo("array",d)):new l(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var i=r("./GenericWorker"),o=r("../utils");function a(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,i),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var i=r("./GenericWorker"),o=r("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,i),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var i=r("../utils"),o=r("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(a,o),a.prototype.processChunk=function(l){if(l){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+l.data.length}o.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var i=r("../utils"),o=r("./GenericWorker");function a(l){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){u.dataIsReady=!0,u.data=f,u.max=f&&f.length||0,u.type=i.getTypeOf(f),u.isPaused||u._tickAndRepeat()},function(f){u.error(f)})}i.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,u);break;case"uint8array":l=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":l=this.data.slice(this.index,u)}return this.index=u,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l "+o:o}},n.exports=i},{}],29:[function(r,n,s){var i=r("../utils"),o=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),u=r("../support"),f=r("../external"),d=null;if(u.nodestream)try{d=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(w,g){return new f.Promise(function(x,p){var h=[],_=w._internalType,C=w._outputType,E=w._mimeType;w.on("data",function(j,R){h.push(j),g&&g(R)}).on("error",function(j){h=[],p(j)}).on("end",function(){try{var j=function(R,A,P){switch(R){case"blob":return i.newBlob(i.transformTo("arraybuffer",A),P);case"base64":return l.encode(A);default:return i.transformTo(R,A)}}(C,function(R,A){var P,L=0,q=null,T=0;for(P=0;P"u")s.blob=!1;else{var i=new ArrayBuffer(0);try{s.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),s.blob=o.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!r("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,s){for(var i=r("./utils"),o=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),u=new Array(256),f=0;f<256;f++)u[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;u[254]=u[254]=1;function d(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}s.utf8encode=function(v){return o.nodebuffer?a.newBufferFrom(v,"utf-8"):function(w){var g,x,p,h,_,C=w.length,E=0;for(h=0;h>>6:(x<65536?g[_++]=224|x>>>12:(g[_++]=240|x>>>18,g[_++]=128|x>>>12&63),g[_++]=128|x>>>6&63),g[_++]=128|63&x);return g}(v)},s.utf8decode=function(v){return o.nodebuffer?i.transformTo("nodebuffer",v).toString("utf-8"):function(w){var g,x,p,h,_=w.length,C=new Array(2*_);for(g=x=0;g<_;)if((p=w[g++])<128)C[x++]=p;else if(4<(h=u[p]))C[x++]=65533,g+=h-1;else{for(p&=h===2?31:h===3?15:7;1>10&1023,C[x++]=56320|1023&p)}return C.length!==x&&(C.subarray?C=C.subarray(0,x):C.length=x),i.applyFromCharCode(C)}(v=i.transformTo(o.uint8array?"uint8array":"array",v))},i.inherits(d,l),d.prototype.processChunk=function(v){var w=i.transformTo(o.uint8array?"uint8array":"array",v.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=w;(w=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),w.set(g,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var x=function(h,_){var C;for((_=_||h.length)>h.length&&(_=h.length),C=_-1;0<=C&&(192&h[C])==128;)C--;return C<0||C===0?_:C+u[h[C]]>_?C:_}(w),p=w;x!==w.length&&(o.uint8array?(p=w.subarray(0,x),this.leftOver=w.subarray(x,w.length)):(p=w.slice(0,x),this.leftOver=w.slice(x,w.length))),this.push({data:s.utf8decode(p),meta:v.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,i.inherits(m,l),m.prototype.processChunk=function(v){this.push({data:s.utf8encode(v.data),meta:v.meta})},s.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var i=r("./support"),o=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function u(g){return g}function f(g,x){for(var p=0;p>8;this.dir=!!(16&this.externalFileAttributes),v==0&&(this.dosPermissions=63&this.externalFileAttributes),v==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var v=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=v.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=v.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=v.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=v.readInt(4))}},readExtraFields:function(v){var w,g,x,p=v.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});v.index+4>>6:(v<65536?m[x++]=224|v>>>12:(m[x++]=240|v>>>18,m[x++]=128|v>>>12&63),m[x++]=128|v>>>6&63),m[x++]=128|63&v);return m},s.buf2binstring=function(d){return f(d,d.length)},s.binstring2buf=function(d){for(var m=new i.Buf8(d.length),v=0,w=m.length;v>10&1023,h[w++]=56320|1023&g)}return f(h,w)},s.utf8border=function(d,m){var v;for((m=m||d.length)>d.length&&(m=d.length),v=m-1;0<=v&&(192&d[v])==128;)v--;return v<0||v===0?m:v+l[d[v]]>m?v:m}},{"./common":41}],43:[function(r,n,s){n.exports=function(i,o,a,l){for(var u=65535&i|0,f=i>>>16&65535|0,d=0;a!==0;){for(a-=d=2e3>>1:o>>>1;a[l]=o}return a}();n.exports=function(o,a,l,u){var f=i,d=u+l;o^=-1;for(var m=u;m>>8^f[255&(o^a[m])];return-1^o}},{}],46:[function(r,n,s){var i,o=r("../utils/common"),a=r("./trees"),l=r("./adler32"),u=r("./crc32"),f=r("./messages"),d=0,m=4,v=0,w=-2,g=-1,x=4,p=2,h=8,_=9,C=286,E=30,j=19,R=2*C+1,A=15,P=3,L=258,q=L+P+1,T=42,F=113,b=1,$=2,te=3,W=4;function Z(k,J){return k.msg=f[J],J}function I(k){return(k<<1)-(4k.avail_out&&(K=k.avail_out),K!==0&&(o.arraySet(k.output,J.pending_buf,J.pending_out,K,k.next_out),k.next_out+=K,J.pending_out+=K,k.total_out+=K,k.avail_out-=K,J.pending-=K,J.pending===0&&(J.pending_out=0))}function V(k,J){a._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,J),k.block_start=k.strstart,z(k.strm)}function fe(k,J){k.pending_buf[k.pending++]=J}function ne(k,J){k.pending_buf[k.pending++]=J>>>8&255,k.pending_buf[k.pending++]=255&J}function se(k,J){var K,D,S=k.max_chain_length,N=k.strstart,O=k.prev_length,Y=k.nice_match,M=k.strstart>k.w_size-q?k.strstart-(k.w_size-q):0,H=k.window,X=k.w_mask,ee=k.prev,pe=k.strstart+L,Be=H[N+O-1],ze=H[N+O];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(K=J)+O]===ze&&H[K+O-1]===Be&&H[K]===H[N]&&H[++K]===H[N+1]){N+=2,K++;do;while(H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&NM&&--S!=0);return O<=k.lookahead?O:k.lookahead}function Ae(k){var J,K,D,S,N,O,Y,M,H,X,ee=k.w_size;do{if(S=k.window_size-k.lookahead-k.strstart,k.strstart>=ee+(ee-q)){for(o.arraySet(k.window,k.window,ee,ee,0),k.match_start-=ee,k.strstart-=ee,k.block_start-=ee,J=K=k.hash_size;D=k.head[--J],k.head[J]=ee<=D?D-ee:0,--K;);for(J=K=ee;D=k.prev[--J],k.prev[J]=ee<=D?D-ee:0,--K;);S+=ee}if(k.strm.avail_in===0)break;if(O=k.strm,Y=k.window,M=k.strstart+k.lookahead,H=S,X=void 0,X=O.avail_in,H=P)for(N=k.strstart-k.insert,k.ins_h=k.window[N],k.ins_h=(k.ins_h<=P&&(k.ins_h=(k.ins_h<=P)if(D=a._tr_tally(k,k.strstart-k.match_start,k.match_length-P),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=P){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<=P&&(k.ins_h=(k.ins_h<=P&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-P,D=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-P),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=S&&(k.ins_h=(k.ins_h<k.pending_buf_size-5&&(K=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Ae(k),k.lookahead===0&&J===d)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var D=k.block_start+K;if((k.strstart===0||k.strstart>=D)&&(k.lookahead=k.strstart-D,k.strstart=D,V(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-q&&(V(k,!1),k.strm.avail_out===0))return b}return k.insert=0,J===m?(V(k,!0),k.strm.avail_out===0?te:W):(k.strstart>k.block_start&&(V(k,!1),k.strm.avail_out),b)}),new ke(4,4,8,4,he),new ke(4,5,16,8,he),new ke(4,6,32,32,he),new ke(4,4,16,16,ye),new ke(8,16,32,32,ye),new ke(8,16,128,128,ye),new ke(8,32,128,256,ye),new ke(32,128,258,1024,ye),new ke(32,258,258,4096,ye)],s.deflateInit=function(k,J){return nt(k,J,h,15,8,0)},s.deflateInit2=nt,s.deflateReset=Ne,s.deflateResetKeep=De,s.deflateSetHeader=function(k,J){return k&&k.state?k.state.wrap!==2?w:(k.state.gzhead=J,v):w},s.deflate=function(k,J){var K,D,S,N;if(!k||!k.state||5>8&255),fe(D,D.gzhead.time>>16&255),fe(D,D.gzhead.time>>24&255),fe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),fe(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(fe(D,255&D.gzhead.extra.length),fe(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(k.adler=u(k.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(fe(D,0),fe(D,0),fe(D,0),fe(D,0),fe(D,0),fe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),fe(D,3),D.status=F);else{var O=h+(D.w_bits-8<<4)<<8;O|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(O|=32),O+=31-O%31,D.status=F,ne(D,O),D.strstart!==0&&(ne(D,k.adler>>>16),ne(D,65535&k.adler)),k.adler=1}if(D.status===69)if(D.gzhead.extra){for(S=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending!==D.pending_buf_size));)fe(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&z(k),D.pending+2<=D.pending_buf_size&&(fe(D,255&k.adler),fe(D,k.adler>>8&255),k.adler=0,D.status=F)):D.status=F),D.pending!==0){if(z(k),k.avail_out===0)return D.last_flush=-1,v}else if(k.avail_in===0&&I(J)<=I(K)&&J!==m)return Z(k,-5);if(D.status===666&&k.avail_in!==0)return Z(k,-5);if(k.avail_in!==0||D.lookahead!==0||J!==d&&D.status!==666){var Y=D.strategy===2?function(M,H){for(var X;;){if(M.lookahead===0&&(Ae(M),M.lookahead===0)){if(H===d)return b;break}if(M.match_length=0,X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,X&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?(V(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:$}(D,J):D.strategy===3?function(M,H){for(var X,ee,pe,Be,ze=M.window;;){if(M.lookahead<=L){if(Ae(M),M.lookahead<=L&&H===d)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=P&&0M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=P?(X=a._tr_tally(M,1,M.match_length-P),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),X&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?(V(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:$}(D,J):i[D.level].func(D,J);if(Y!==te&&Y!==W||(D.status=666),Y===b||Y===te)return k.avail_out===0&&(D.last_flush=-1),v;if(Y===$&&(J===1?a._tr_align(D):J!==5&&(a._tr_stored_block(D,0,0,!1),J===3&&(Q(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),z(k),k.avail_out===0))return D.last_flush=-1,v}return J!==m?v:D.wrap<=0?1:(D.wrap===2?(fe(D,255&k.adler),fe(D,k.adler>>8&255),fe(D,k.adler>>16&255),fe(D,k.adler>>24&255),fe(D,255&k.total_in),fe(D,k.total_in>>8&255),fe(D,k.total_in>>16&255),fe(D,k.total_in>>24&255)):(ne(D,k.adler>>>16),ne(D,65535&k.adler)),z(k),0=K.w_size&&(N===0&&(Q(K.head),K.strstart=0,K.block_start=0,K.insert=0),H=new o.Buf8(K.w_size),o.arraySet(H,J,X-K.w_size,K.w_size,0),J=H,X=K.w_size),O=k.avail_in,Y=k.next_in,M=k.input,k.avail_in=X,k.next_in=0,k.input=J,Ae(K);K.lookahead>=P;){for(D=K.strstart,S=K.lookahead-(P-1);K.ins_h=(K.ins_h<>>=P=A>>>24,_-=P,(P=A>>>16&255)===0)$[f++]=65535&A;else{if(!(16&P)){if(!(64&P)){A=C[(65535&A)+(h&(1<>>=P,_-=P),_<15&&(h+=b[l++]<<_,_+=8,h+=b[l++]<<_,_+=8),A=E[h&R];r:for(;;){if(h>>>=P=A>>>24,_-=P,!(16&(P=A>>>16&255))){if(!(64&P)){A=E[(65535&A)+(h&(1<>>=P,_-=P,(P=f-d)>3,h&=(1<<(_-=L<<3))-1,i.next_in=l,i.next_out=f,i.avail_in=l>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(T){var F;return T&&T.state?(F=T.state,T.total_in=T.total_out=F.total=0,T.msg="",F.wrap&&(T.adler=1&F.wrap),F.mode=w,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(g),F.distcode=F.distdyn=new i.Buf32(x),F.sane=1,F.back=-1,m):v}function C(T){var F;return T&&T.state?((F=T.state).wsize=0,F.whave=0,F.wnext=0,_(T)):v}function E(T,F){var b,$;return T&&T.state?($=T.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15=W.wsize?(i.arraySet(W.window,F,b-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):($<(te=W.wsize-W.wnext)&&(te=$),i.arraySet(W.window,F,b-$,te,W.wnext),($-=te)?(i.arraySet(W.window,F,b-$,$,0),W.wnext=$,W.whave=W.wsize):(W.wnext+=te,W.wnext===W.wsize&&(W.wnext=0),W.whave>>8&255,b.check=a(b.check,N,2,0),V=z=0,b.mode=2;break}if(b.flags=0,b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&z)<<8)+(z>>8))%31){T.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){T.msg="unknown compression method",b.mode=30;break}if(V-=4,k=8+(15&(z>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){T.msg="invalid window size",b.mode=30;break}b.dmax=1<>8&1),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=z=0,b.mode=3;case 3:for(;V<32;){if(I===0)break e;I--,z+=$[W++]<>>8&255,N[2]=z>>>16&255,N[3]=z>>>24&255,b.check=a(b.check,N,4,0)),V=z=0,b.mode=4;case 4:for(;V<16;){if(I===0)break e;I--,z+=$[W++]<>8),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=z=0,b.mode=5;case 5:if(1024&b.flags){for(;V<16;){if(I===0)break e;I--,z+=$[W++]<>>8&255,b.check=a(b.check,N,2,0)),V=z=0}else b.head&&(b.head.extra=null);b.mode=6;case 6:if(1024&b.flags&&(I<(se=b.length)&&(se=I),se&&(b.head&&(k=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),i.arraySet(b.head.extra,$,W,se,k)),512&b.flags&&(b.check=a(b.check,$,se,W)),I-=se,W+=se,b.length-=se),b.length))break e;b.length=0,b.mode=7;case 7:if(2048&b.flags){if(I===0)break e;for(se=0;k=$[W+se++],b.head&&k&&b.length<65536&&(b.head.name+=String.fromCharCode(k)),k&&se>9&1,b.head.done=!0),T.adler=b.check=0,b.mode=12;break;case 10:for(;V<32;){if(I===0)break e;I--,z+=$[W++]<>>=7&V,V-=7&V,b.mode=27;break}for(;V<3;){if(I===0)break e;I--,z+=$[W++]<>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;z>>>=2,V-=2;break e;case 2:b.mode=17;break;case 3:T.msg="invalid block type",b.mode=30}z>>>=2,V-=2;break;case 14:for(z>>>=7&V,V-=7&V;V<32;){if(I===0)break e;I--,z+=$[W++]<>>16^65535)){T.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&z,V=z=0,b.mode=15,F===6)break e;case 15:b.mode=16;case 16:if(se=b.length){if(I>>=5,V-=5,b.ndist=1+(31&z),z>>>=5,V-=5,b.ncode=4+(15&z),z>>>=4,V-=4,286>>=3,V-=3}for(;b.have<19;)b.lens[O[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,K={bits:b.lenbits},J=u(0,b.lens,0,19,b.lencode,0,b.work,K),b.lenbits=K.bits,J){T.msg="invalid code lengths set",b.mode=30;break}b.have=0,b.mode=19;case 19:for(;b.have>>16&255,Ie=65535&S,!((ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[W++]<>>=ye,V-=ye,b.lens[b.have++]=Ie;else{if(Ie===16){for(D=ye+2;V>>=ye,V-=ye,b.have===0){T.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&z),z>>>=2,V-=2}else if(Ie===17){for(D=ye+3;V>>=ye)),z>>>=3,V-=3}else{for(D=ye+7;V>>=ye)),z>>>=7,V-=7}if(b.have+se>b.nlen+b.ndist){T.msg="invalid bit length repeat",b.mode=30;break}for(;se--;)b.lens[b.have++]=k}}if(b.mode===30)break;if(b.lens[256]===0){T.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,K={bits:b.lenbits},J=u(f,b.lens,0,b.nlen,b.lencode,0,b.work,K),b.lenbits=K.bits,J){T.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,K={bits:b.distbits},J=u(d,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,K),b.distbits=K.bits,J){T.msg="invalid distances set",b.mode=30;break}if(b.mode=20,F===6)break e;case 20:b.mode=21;case 21:if(6<=I&&258<=Q){T.next_out=Z,T.avail_out=Q,T.next_in=W,T.avail_in=I,b.hold=z,b.bits=V,l(T,ne),Z=T.next_out,te=T.output,Q=T.avail_out,W=T.next_in,$=T.input,I=T.avail_in,z=b.hold,V=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;ke=(S=b.lencode[z&(1<>>16&255,Ie=65535&S,!((ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[W++]<>De)])>>>16&255,Ie=65535&S,!(De+(ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[W++]<>>=De,V-=De,b.back+=De}if(z>>>=ye,V-=ye,b.back+=ye,b.length=Ie,ke===0){b.mode=26;break}if(32&ke){b.back=-1,b.mode=12;break}if(64&ke){T.msg="invalid literal/length code",b.mode=30;break}b.extra=15&ke,b.mode=22;case 22:if(b.extra){for(D=b.extra;V>>=b.extra,V-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;ke=(S=b.distcode[z&(1<>>16&255,Ie=65535&S,!((ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[W++]<>De)])>>>16&255,Ie=65535&S,!(De+(ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[W++]<>>=De,V-=De,b.back+=De}if(z>>>=ye,V-=ye,b.back+=ye,64&ke){T.msg="invalid distance code",b.mode=30;break}b.offset=Ie,b.extra=15&ke,b.mode=24;case 24:if(b.extra){for(D=b.extra;V>>=b.extra,V-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){T.msg="invalid distance too far back",b.mode=30;break}b.mode=25;case 25:if(Q===0)break e;if(se=ne-Q,b.offset>se){if((se=b.offset-se)>b.whave&&b.sane){T.msg="invalid distance too far back",b.mode=30;break}Ae=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),he=b.window}else he=te,Ae=Z-b.offset,se=b.length;for(QR?(P=Ae[he+x[F]],V[fe+x[F]]):(P=96,0),h=1<>Z)+(_-=h)]=A<<24|P<<16|L|0,_!==0;);for(h=1<>=1;if(h!==0?(z&=h-1,z+=h):z=0,F++,--ne[T]==0){if(T===$)break;T=d[m+x[F]]}if(te>>7)]}function fe(S,N){S.pending_buf[S.pending++]=255&N,S.pending_buf[S.pending++]=N>>>8&255}function ne(S,N,O){S.bi_valid>p-O?(S.bi_buf|=N<>p-S.bi_valid,S.bi_valid+=O-p):(S.bi_buf|=N<>>=1,O<<=1,0<--N;);return O>>>1}function he(S,N,O){var Y,M,H=new Array(x+1),X=0;for(Y=1;Y<=x;Y++)H[Y]=X=X+O[Y-1]<<1;for(M=0;M<=N;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=Ae(H[ee]++,ee))}}function ye(S){var N;for(N=0;N>1;1<=O;O--)De(S,H,O);for(M=pe;O=S.heap[1],S.heap[1]=S.heap[S.heap_len--],De(S,H,1),Y=S.heap[1],S.heap[--S.heap_max]=O,S.heap[--S.heap_max]=Y,H[2*M]=H[2*O]+H[2*Y],S.depth[M]=(S.depth[O]>=S.depth[Y]?S.depth[O]:S.depth[Y])+1,H[2*O+1]=H[2*Y+1]=M,S.heap[1]=M++,De(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(ze,Et){var Yr,Bt,qn,ot,Xn,Qn,Zr=Et.dyn_tree,Nc=Et.max_code,Rc=Et.stat_desc.static_tree,co=Et.stat_desc.has_stree,Pc=Et.stat_desc.extra_bits,uo=Et.stat_desc.extra_base,Tn=Et.stat_desc.max_length,Ds=0;for(ot=0;ot<=x;ot++)ze.bl_count[ot]=0;for(Zr[2*ze.heap[ze.heap_max]+1]=0,Yr=ze.heap_max+1;Yr>=7;M>>=1)if(1&Be&&ee.dyn_ltree[2*pe]!==0)return o;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return a;for(pe=32;pe>>3,(H=S.static_len+3+7>>>3)<=M&&(M=H)):M=H=O+5,O+4<=M&&N!==-1?D(S,N,O,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),Ne(S,q,T)):(ne(S,4+(Y?1:0),3),function(ee,pe,Be,ze){var Et;for(ne(ee,pe-257,5),ne(ee,Be-1,5),ne(ee,ze-4,4),Et=0;Et>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&N,S.pending_buf[S.l_buf+S.last_lit]=255&O,S.last_lit++,N===0?S.dyn_ltree[2*O]++:(S.matches++,N--,S.dyn_ltree[2*(b[O]+d+1)]++,S.dyn_dtree[2*V(N)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,_,q),function(N){N.bi_valid===16?(fe(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(S)}},{"../utils/common":41}],53:[function(r,n,s){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,s){(function(i){(function(o,a){if(!o.setImmediate){var l,u,f,d,m=1,v={},w=!1,g=o.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(o);x=x&&x.setTimeout?x:o,l={}.toString.call(o.process)==="[object process]"?function(C){process.nextTick(function(){h(C)})}:function(){if(o.postMessage&&!o.importScripts){var C=!0,E=o.onmessage;return o.onmessage=function(){C=!1},o.postMessage("","*"),o.onmessage=E,C}}()?(d="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",_,!1):o.attachEvent("onmessage",_),function(C){o.postMessage(d+C,"*")}):o.MessageChannel?((f=new MessageChannel).port1.onmessage=function(C){h(C.data)},function(C){f.port2.postMessage(C)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(C){var E=g.createElement("script");E.onreadystatechange=function(){h(C),E.onreadystatechange=null,u.removeChild(E),E=null},u.appendChild(E)}):function(C){setTimeout(h,0,C)},x.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var E=new Array(arguments.length-1),j=0;j"u"?i===void 0?this:i:self)}).call(this,typeof Ic<"u"?Ic:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(YC);var IF=YC.exports;const LF=Cm(IF);function FF(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{n.result?t(n.result.toString()):r("No content found")},n.onerror=()=>r(n.error),n.readAsText(e)})}const zF=async(e,t)=>{const r=new LF;t.forEach(i=>{r.file(i.name,i.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},da=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)},UF=e=>da(e).split(" ")[0];function ZC(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const r=t.getUTCFullYear(),n=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),i=String(t.getUTCHours()).padStart(2,"0"),o=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${r}-${n}-${s} ${i}:${o}:${a}`}const VF=async e=>{let t=1;e.page&&(t=e.page);let r=2;e.perPage&&(r=e.perPage);const n=ft();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=n.filter("expiredAt<{:expiredAt}",{expiredAt:ZC(15)})),n.collection("domains").getList(t,r,{sort:"-created",expand:"lastDeployment",filter:s})},$F=async()=>{const e=ft(),t=await e.collection("domains").getList(1,1,{}),r=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:ZC(15)})}),n=await e.collection("domains").getList(1,1,{filter:"enabled=true"}),s=await e.collection("domains").getList(1,1,{filter:"enabled=false"});return{total:t.totalItems,expired:r.totalItems,enabled:n.totalItems,disabled:s.totalItems}},WF=async e=>await ft().collection("domains").getOne(e),fm=async e=>e.id?await ft().collection("domains").update(e.id,e):await ft().collection("domains").create(e),BF=async e=>await ft().collection("domains").delete(e),HF=(e,t)=>ft().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),YF=e=>{ft().collection("domains").unsubscribe(e)},ZF=()=>{const e=Cc(),t=rn(),r=Yn(),n=new URLSearchParams(r.search),s=n.get("page"),i=n.get("state"),[o,a]=y.useState(0),l=()=>{t("/edit")},u=h=>{n.set("page",h.toString()),t(`?${n.toString()}`)},f=h=>{t(`/edit?id=${h}`)},d=h=>{t(`/history?domain=${h}`)},m=async h=>{try{await BF(h),w(v.filter(_=>_.id!==h))}catch(_){console.error("Error deleting domain:",_)}},[v,w]=y.useState([]);y.useEffect(()=>{(async()=>{const _=await VF({page:s?Number(s):1,perPage:10,state:i||""});w(_.items),a(_.totalPages)})()},[s,i]);const g=async h=>{const _=v.filter(R=>R.id===h),C=_[0].enabled,E=_[0];E.enabled=!C,await fm(E);const j=v.map(R=>R.id===h?{...R,checked:!C}:R);w(j)},x=async h=>{try{YF(h.id),HF(h.id,_=>{console.log(_);const C=v.map(E=>E.id===_.id?{..._}:E);w(C)}),h.rightnow=!0,await fm(h),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:c.jsxs(c.Fragment,{children:["执行失败,请查看",c.jsx(tr,{to:`/history?domain=${h.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},p=async h=>{const _=`${h.id}-${h.domain}.zip`,C=[{name:`${h.domain}.pem`,content:h.certificate?h.certificate:""},{name:`${h.domain}.key`,content:h.privateKey?h.privateKey:""}];await zF(_,C)};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(Df,{}),c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),c.jsx(Je,{onClick:l,children:"新增域名"})]}),v.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-40",children:"域名"}),c.jsx("div",{className:"w-48",children:"有效期限"}),c.jsx("div",{className:"w-32",children:"最近执行状态"}),c.jsx("div",{className:"w-64",children:"最近执行阶段"}),c.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),c.jsx("div",{className:"w-32",children:"是否启用"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),v.map(h=>{var _,C,E,j,R,A;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:h.domain}),c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx("div",{children:h.expiredAt?c.jsxs(c.Fragment,{children:[c.jsx("div",{children:"有效期90天"}),c.jsxs("div",{children:[UF(h.expiredAt),"到期"]})]}):"---"})}),c.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:h.lastDeployedAt&&((_=h.expand)!=null&&_.lastDeployment)?c.jsx(c.Fragment,{children:((C=h.expand.lastDeployment)==null?void 0:C.phase)==="deploy"&&((E=h.expand.lastDeployment)!=null&&E.phaseSuccess)?c.jsx(Cg,{size:16,className:"text-green-700"}):c.jsx(Eg,{size:16,className:"text-red-700"})}):"---"}),c.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:h.lastDeployedAt&&((j=h.expand)!=null&&j.lastDeployment)?c.jsx(Ov,{phase:(R=h.expand.lastDeployment)==null?void 0:R.phase,phaseSuccess:(A=h.expand.lastDeployment)==null?void 0:A.phaseSuccess}):"---"}),c.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:h.lastDeployedAt?da(h.lastDeployedAt):"---"}),c.jsx("div",{className:"sm:w-32 flex items-center",children:c.jsx(UC,{children:c.jsxs(DF,{children:[c.jsx(OF,{children:c.jsx(pC,{checked:h.enabled,onCheckedChange:()=>{g(h.id)}})}),c.jsx(Zv,{children:c.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:h.enabled?"禁用":"启用"})})]})})}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>d(h.id),children:"部署历史"}),c.jsxs(hl,{when:!!h.enabled,children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>x(h),children:"立即部署"})]}),c.jsxs(hl,{when:!!h.expiredAt,children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>p(h),children:"下载"})]}),!h.enabled&&c.jsxs(c.Fragment,{children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsxs(iC,{children:[c.jsx(oC,{asChild:!0,children:c.jsx(Je,{variant:"link",className:"p-0",children:"删除"})}),c.jsxs(Mv,{children:[c.jsxs(Iv,{children:[c.jsx(Fv,{children:"删除域名"}),c.jsx(zv,{children:"确定要删除域名吗?"})]}),c.jsxs(Lv,{children:[c.jsx(Vv,{children:"取消"}),c.jsx(Uv,{onClick:()=>{m(h.id)},children:"确认"})]})]})]}),c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>f(h.id),children:"编辑"})]})]})]},h.id)}),c.jsx(zk,{totalPages:o,currentPage:s?Number(s):1,onPageChange:h=>{u(h)}})]}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(Bp,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(Je,{onClick:l,className:"mt-3",children:"添加域名"})]})})]})})},Fe=y.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:le("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:n,...r}));Fe.displayName="Input";var Ec=e=>e.type==="checkbox",Fo=e=>e instanceof Date,hr=e=>e==null;const KC=e=>typeof e=="object";var qt=e=>!hr(e)&&!Array.isArray(e)&&KC(e)&&!Fo(e),GC=e=>qt(e)&&e.target?Ec(e.target)?e.target.checked:e.target.value:e,KF=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,qC=(e,t)=>e.has(KF(t)),GF=e=>{const t=e.constructor&&e.constructor.prototype;return qt(t)&&t.hasOwnProperty("isPrototypeOf")},Kv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function wr(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Kv&&(e instanceof Blob||e instanceof FileList))&&(r||qt(e)))if(t=r?[]:{},!r&&!GF(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=wr(e[n]));else return e;return t}var Ff=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,ce=(e,t,r)=>{if(!t||!qt(e))return r;const n=Ff(t.split(/[,[\].]+?/)).reduce((s,i)=>hr(s)?s:s[i],e);return Ft(n)||n===e?Ft(e[t])?r:e[t]:n},Mn=e=>typeof e=="boolean",Gv=e=>/^\w*$/.test(e),XC=e=>Ff(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let n=-1;const s=Gv(t)?[t]:XC(t),i=s.length,o=i-1;for(;++ntt.useContext(QC),qF=e=>{const{children:t,...r}=e;return tt.createElement(QC.Provider,{value:r},t)};var JC=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==pn.all&&(t._proxyFormState[o]=!n||pn.all),r&&(r[o]=!0),e[o]}});return s},Nr=e=>qt(e)&&!Object.keys(e).length,eE=(e,t,r,n)=>{r(e);const{name:s,...i}=e;return Nr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||pn.all))},ml=e=>Array.isArray(e)?e:[e],tE=(e,t,r)=>!e||!t||e===t||ml(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function qv(e){const t=tt.useRef(e);t.current=e,tt.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function XF(e){const t=zf(),{control:r=t.control,disabled:n,name:s,exact:i}=e||{},[o,a]=tt.useState(r._formState),l=tt.useRef(!0),u=tt.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=tt.useRef(s);return f.current=s,qv({disabled:n,next:d=>l.current&&tE(f.current,d.name,i)&&eE(d,u.current,r._updateFormState)&&a({...r._formState,...d}),subject:r._subjects.state}),tt.useEffect(()=>(l.current=!0,u.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),JC(o,r,u.current,!1)}var Ln=e=>typeof e=="string",rE=(e,t,r,n,s)=>Ln(e)?(n&&t.watch.add(e),ce(r,e,s)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),ce(r,i))):(n&&(t.watchAll=!0),r);function QF(e){const t=zf(),{control:r=t.control,name:n,defaultValue:s,disabled:i,exact:o}=e||{},a=tt.useRef(n);a.current=n,qv({disabled:i,subject:r._subjects.values,next:f=>{tE(a.current,f.name,o)&&u(wr(rE(a.current,r._names,f.values||r._formValues,!1,s)))}});const[l,u]=tt.useState(r._getWatch(n,s));return tt.useEffect(()=>r._removeUnmounted()),l}function JF(e){const t=zf(),{name:r,disabled:n,control:s=t.control,shouldUnregister:i}=e,o=qC(s._names.array,r),a=QF({control:s,name:r,defaultValue:ce(s._formValues,r,ce(s._defaultValues,r,e.defaultValue)),exact:!0}),l=XF({control:s,name:r}),u=tt.useRef(s.register(r,{...e.rules,value:a,...Mn(e.disabled)?{disabled:e.disabled}:{}}));return tt.useEffect(()=>{const f=s._options.shouldUnregister||i,d=(m,v)=>{const w=ce(s._fields,m);w&&w._f&&(w._f.mount=v)};if(d(r,!0),f){const m=wr(ce(s._options.defaultValues,r));dt(s._defaultValues,r,m),Ft(ce(s._formValues,r))&&dt(s._formValues,r,m)}return()=>{(o?f&&!s._state.action:f)?s.unregister(r):d(r,!1)}},[r,s,o,i]),tt.useEffect(()=>{ce(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:ce(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...Mn(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:tt.useCallback(f=>u.current.onChange({target:{value:GC(f),name:r},type:Sd.CHANGE}),[r]),onBlur:tt.useCallback(()=>u.current.onBlur({target:{value:ce(s._formValues,r),name:r},type:Sd.BLUR}),[r,s]),ref:f=>{const d=ce(s._fields,r);d&&f&&(d._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:m=>f.setCustomValidity(m),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ce(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!ce(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ce(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ce(l.validatingFields,r)},error:{enumerable:!0,get:()=>ce(l.errors,r)}})}}const e6=e=>e.render(JF(e));var nE=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},M0=e=>({isOnSubmit:!e||e===pn.onSubmit,isOnBlur:e===pn.onBlur,isOnChange:e===pn.onChange,isOnAll:e===pn.all,isOnTouch:e===pn.onTouched}),I0=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const gl=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const i=ce(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!n)break;if(o.ref&&t(o.ref,o.name)&&!n)break;gl(a,t)}else qt(a)&&gl(a,t)}}};var t6=(e,t,r)=>{const n=ml(ce(e,r));return dt(n,"root",t[r]),dt(e,r,n),e},Xv=e=>e.type==="file",Xs=e=>typeof e=="function",kd=e=>{if(!Kv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Iu=e=>Ln(e),Qv=e=>e.type==="radio",Cd=e=>e instanceof RegExp;const L0={value:!1,isValid:!1},F0={value:!0,isValid:!0};var sE=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ft(e[0].attributes.value)?Ft(e[0].value)||e[0].value===""?F0:{value:e[0].value,isValid:!0}:F0:L0}return L0};const z0={isValid:!1,value:null};var iE=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,z0):z0;function U0(e,t,r="validate"){if(Iu(e)||Array.isArray(e)&&e.every(Iu)||Mn(e)&&!e)return{type:r,message:Iu(e)?e:"",ref:t}}var _o=e=>qt(e)&&!Cd(e)?e:{value:e,message:""},V0=async(e,t,r,n,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:u,min:f,max:d,pattern:m,validate:v,name:w,valueAsNumber:g,mount:x,disabled:p}=e._f,h=ce(t,w);if(!x||p)return{};const _=o?o[0]:i,C=T=>{n&&_.reportValidity&&(_.setCustomValidity(Mn(T)?"":T||""),_.reportValidity())},E={},j=Qv(i),R=Ec(i),A=j||R,P=(g||Xv(i))&&Ft(i.value)&&Ft(h)||kd(i)&&i.value===""||h===""||Array.isArray(h)&&!h.length,L=nE.bind(null,w,r,E),q=(T,F,b,$=rs.maxLength,te=rs.minLength)=>{const W=T?F:b;E[w]={type:T?$:te,message:W,ref:i,...L(T?$:te,W)}};if(s?!Array.isArray(h)||!h.length:a&&(!A&&(P||hr(h))||Mn(h)&&!h||R&&!sE(o).isValid||j&&!iE(o).isValid)){const{value:T,message:F}=Iu(a)?{value:!!a,message:a}:_o(a);if(T&&(E[w]={type:rs.required,message:F,ref:_,...L(rs.required,F)},!r))return C(F),E}if(!P&&(!hr(f)||!hr(d))){let T,F;const b=_o(d),$=_o(f);if(!hr(h)&&!isNaN(h)){const te=i.valueAsNumber||h&&+h;hr(b.value)||(T=te>b.value),hr($.value)||(F=te<$.value)}else{const te=i.valueAsDate||new Date(h),W=Q=>new Date(new Date().toDateString()+" "+Q),Z=i.type=="time",I=i.type=="week";Ln(b.value)&&h&&(T=Z?W(h)>W(b.value):I?h>b.value:te>new Date(b.value)),Ln($.value)&&h&&(F=Z?W(h)+T.value,$=!hr(F.value)&&h.length<+F.value;if((b||$)&&(q(b,T.message,F.message),!r))return C(E[w].message),E}if(m&&!P&&Ln(h)){const{value:T,message:F}=_o(m);if(Cd(T)&&!h.match(T)&&(E[w]={type:rs.pattern,message:F,ref:i,...L(rs.pattern,F)},!r))return C(F),E}if(v){if(Xs(v)){const T=await v(h,t),F=U0(T,_);if(F&&(E[w]={...F,...L(rs.validate,F.message)},!r))return C(F.message),E}else if(qt(v)){let T={};for(const F in v){if(!Nr(T)&&!r)break;const b=U0(await v[F](h,t),_,F);b&&(T={...b,...L(F,b.message)},C(b.message),r&&(E[w]=T))}if(!Nr(T)&&(E[w]={ref:_,...T},!r))return E}}return C(!0),E};function r6(e,t){const r=t.slice(0,-1).length;let n=0;for(;n{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},Ed=e=>hr(e)||!KC(e);function Ui(e,t){if(Ed(e)||Ed(t))return e===t;if(Fo(e)&&Fo(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const s of r){const i=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const o=t[s];if(Fo(i)&&Fo(o)||qt(i)&&qt(o)||Array.isArray(i)&&Array.isArray(o)?!Ui(i,o):i!==o)return!1}}return!0}var oE=e=>e.type==="select-multiple",s6=e=>Qv(e)||Ec(e),Hh=e=>kd(e)&&e.isConnected,aE=e=>{for(const t in e)if(Xs(e[t]))return!0;return!1};function jd(e,t={}){const r=Array.isArray(e);if(qt(e)||r)for(const n in e)Array.isArray(e[n])||qt(e[n])&&!aE(e[n])?(t[n]=Array.isArray(e[n])?[]:{},jd(e[n],t[n])):hr(e[n])||(t[n]=!0);return t}function lE(e,t,r){const n=Array.isArray(e);if(qt(e)||n)for(const s in e)Array.isArray(e[s])||qt(e[s])&&!aE(e[s])?Ft(t)||Ed(r[s])?r[s]=Array.isArray(e[s])?jd(e[s],[]):{...jd(e[s])}:lE(e[s],hr(t)?{}:t[s],r[s]):r[s]=!Ui(e[s],t[s]);return r}var hu=(e,t)=>lE(e,t,jd(t)),cE=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ft(e)?e:t?e===""?NaN:e&&+e:r&&Ln(e)?new Date(e):n?n(e):e;function Yh(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Xv(t)?t.files:Qv(t)?iE(e.refs).value:oE(t)?[...t.selectedOptions].map(({value:r})=>r):Ec(t)?sE(e.refs).value:cE(Ft(t.value)?e.ref.value:t.value,e)}var i6=(e,t,r,n)=>{const s={};for(const i of e){const o=ce(t,i);o&&dt(s,i,o._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Ya=e=>Ft(e)?e:Cd(e)?e.source:qt(e)?Cd(e.value)?e.value.source:e.value:e,o6=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function $0(e,t,r){const n=ce(e,r);if(n||Gv(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const i=s.join("."),o=ce(t,i),a=ce(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:r}}var a6=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,l6=(e,t)=>!Ff(ce(e,t)).length&&Ht(e,t);const c6={mode:pn.onSubmit,reValidateMode:pn.onChange,shouldFocusError:!0};function u6(e={}){let t={...c6,...e},r={submitCount:0,isDirty:!1,isLoading:Xs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=qt(t.defaultValues)||qt(t.values)?wr(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:wr(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Bh(),array:Bh(),state:Bh()},m=M0(t.mode),v=M0(t.reValidateMode),w=t.criteriaMode===pn.all,g=S=>N=>{clearTimeout(u),u=setTimeout(S,N)},x=async S=>{if(f.isValid||S){const N=t.resolver?Nr((await A()).errors):await L(n,!0);N!==r.isValid&&d.state.next({isValid:N})}},p=(S,N)=>{(f.isValidating||f.validatingFields)&&((S||Array.from(a.mount)).forEach(O=>{O&&(N?dt(r.validatingFields,O,N):Ht(r.validatingFields,O))}),d.state.next({validatingFields:r.validatingFields,isValidating:!Nr(r.validatingFields)}))},h=(S,N=[],O,Y,M=!0,H=!0)=>{if(Y&&O){if(o.action=!0,H&&Array.isArray(ce(n,S))){const X=O(ce(n,S),Y.argA,Y.argB);M&&dt(n,S,X)}if(H&&Array.isArray(ce(r.errors,S))){const X=O(ce(r.errors,S),Y.argA,Y.argB);M&&dt(r.errors,S,X),l6(r.errors,S)}if(f.touchedFields&&H&&Array.isArray(ce(r.touchedFields,S))){const X=O(ce(r.touchedFields,S),Y.argA,Y.argB);M&&dt(r.touchedFields,S,X)}f.dirtyFields&&(r.dirtyFields=hu(s,i)),d.state.next({name:S,isDirty:T(S,N),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(i,S,N)},_=(S,N)=>{dt(r.errors,S,N),d.state.next({errors:r.errors})},C=S=>{r.errors=S,d.state.next({errors:r.errors,isValid:!1})},E=(S,N,O,Y)=>{const M=ce(n,S);if(M){const H=ce(i,S,Ft(O)?ce(s,S):O);Ft(H)||Y&&Y.defaultChecked||N?dt(i,S,N?H:Yh(M._f)):$(S,H),o.mount&&x()}},j=(S,N,O,Y,M)=>{let H=!1,X=!1;const ee={name:S},pe=!!(ce(n,S)&&ce(n,S)._f&&ce(n,S)._f.disabled);if(!O||Y){f.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=T(),H=X!==ee.isDirty);const Be=pe||Ui(ce(s,S),N);X=!!(!pe&&ce(r.dirtyFields,S)),Be||pe?Ht(r.dirtyFields,S):dt(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||f.dirtyFields&&X!==!Be}if(O){const Be=ce(r.touchedFields,S);Be||(dt(r.touchedFields,S,O),ee.touchedFields=r.touchedFields,H=H||f.touchedFields&&Be!==O)}return H&&M&&d.state.next(ee),H?ee:{}},R=(S,N,O,Y)=>{const M=ce(r.errors,S),H=f.isValid&&Mn(N)&&r.isValid!==N;if(e.delayError&&O?(l=g(()=>_(S,O)),l(e.delayError)):(clearTimeout(u),l=null,O?dt(r.errors,S,O):Ht(r.errors,S)),(O?!Ui(M,O):M)||!Nr(Y)||H){const X={...Y,...H&&Mn(N)?{isValid:N}:{},errors:r.errors,name:S};r={...r,...X},d.state.next(X)}},A=async S=>{p(S,!0);const N=await t.resolver(i,t.context,i6(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return p(S),N},P=async S=>{const{errors:N}=await A(S);if(S)for(const O of S){const Y=ce(N,O);Y?dt(r.errors,O,Y):Ht(r.errors,O)}else r.errors=N;return N},L=async(S,N,O={valid:!0})=>{for(const Y in S){const M=S[Y];if(M){const{_f:H,...X}=M;if(H){const ee=a.array.has(H.name);p([Y],!0);const pe=await V0(M,i,w,t.shouldUseNativeValidation&&!N,ee);if(p([Y]),pe[H.name]&&(O.valid=!1,N))break;!N&&(ce(pe,H.name)?ee?t6(r.errors,pe,H.name):dt(r.errors,H.name,pe[H.name]):Ht(r.errors,H.name))}X&&await L(X,N,O)}}return O.valid},q=()=>{for(const S of a.unMount){const N=ce(n,S);N&&(N._f.refs?N._f.refs.every(O=>!Hh(O)):!Hh(N._f.ref))&&Ae(S)}a.unMount=new Set},T=(S,N)=>(S&&N&&dt(i,S,N),!Ui(z(),s)),F=(S,N,O)=>rE(S,a,{...o.mount?i:Ft(N)?s:Ln(S)?{[S]:N}:N},O,N),b=S=>Ff(ce(o.mount?i:s,S,e.shouldUnregister?ce(s,S,[]):[])),$=(S,N,O={})=>{const Y=ce(n,S);let M=N;if(Y){const H=Y._f;H&&(!H.disabled&&dt(i,S,cE(N,H)),M=kd(H.ref)&&hr(N)?"":N,oE(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?Ec(H.ref)?H.refs.length>1?H.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(M)?!!M.find(ee=>ee===X.value):M===X.value)):H.refs[0]&&(H.refs[0].checked=!!M):H.refs.forEach(X=>X.checked=X.value===M):Xv(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||d.values.next({name:S,values:{...i}})))}(O.shouldDirty||O.shouldTouch)&&j(S,M,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&Q(S)},te=(S,N,O)=>{for(const Y in N){const M=N[Y],H=`${S}.${Y}`,X=ce(n,H);(a.array.has(S)||!Ed(M)||X&&!X._f)&&!Fo(M)?te(H,M,O):$(H,M,O)}},W=(S,N,O={})=>{const Y=ce(n,S),M=a.array.has(S),H=wr(N);dt(i,S,H),M?(d.array.next({name:S,values:{...i}}),(f.isDirty||f.dirtyFields)&&O.shouldDirty&&d.state.next({name:S,dirtyFields:hu(s,i),isDirty:T(S,H)})):Y&&!Y._f&&!hr(H)?te(S,H,O):$(S,H,O),I0(S,a)&&d.state.next({...r}),d.values.next({name:o.mount?S:void 0,values:{...i}})},Z=async S=>{o.mount=!0;const N=S.target;let O=N.name,Y=!0;const M=ce(n,O),H=()=>N.type?Yh(M._f):GC(S),X=ee=>{Y=Number.isNaN(ee)||ee===ce(i,O,ee)};if(M){let ee,pe;const Be=H(),ze=S.type===Sd.BLUR||S.type===Sd.FOCUS_OUT,Et=!o6(M._f)&&!t.resolver&&!ce(r.errors,O)&&!M._f.deps||a6(ze,ce(r.touchedFields,O),r.isSubmitted,v,m),Yr=I0(O,a,ze);dt(i,O,Be),ze?(M._f.onBlur&&M._f.onBlur(S),l&&l(0)):M._f.onChange&&M._f.onChange(S);const Bt=j(O,Be,ze,!1),qn=!Nr(Bt)||Yr;if(!ze&&d.values.next({name:O,type:S.type,values:{...i}}),Et)return f.isValid&&x(),qn&&d.state.next({name:O,...Yr?{}:Bt});if(!ze&&Yr&&d.state.next({...r}),t.resolver){const{errors:ot}=await A([O]);if(X(Be),Y){const Xn=$0(r.errors,n,O),Qn=$0(ot,n,Xn.name||O);ee=Qn.error,O=Qn.name,pe=Nr(ot)}}else p([O],!0),ee=(await V0(M,i,w,t.shouldUseNativeValidation))[O],p([O]),X(Be),Y&&(ee?pe=!1:f.isValid&&(pe=await L(n,!0)));Y&&(M._f.deps&&Q(M._f.deps),R(O,pe,ee,Bt))}},I=(S,N)=>{if(ce(r.errors,N)&&S.focus)return S.focus(),1},Q=async(S,N={})=>{let O,Y;const M=ml(S);if(t.resolver){const H=await P(Ft(S)?S:M);O=Nr(H),Y=S?!M.some(X=>ce(H,X)):O}else S?(Y=(await Promise.all(M.map(async H=>{const X=ce(n,H);return await L(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!Y&&!r.isValid)&&x()):Y=O=await L(n);return d.state.next({...!Ln(S)||f.isValid&&O!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:O}:{},errors:r.errors}),N.shouldFocus&&!Y&&gl(n,I,S?M:a.mount),Y},z=S=>{const N={...o.mount?i:s};return Ft(S)?N:Ln(S)?ce(N,S):S.map(O=>ce(N,O))},V=(S,N)=>({invalid:!!ce((N||r).errors,S),isDirty:!!ce((N||r).dirtyFields,S),error:ce((N||r).errors,S),isValidating:!!ce(r.validatingFields,S),isTouched:!!ce((N||r).touchedFields,S)}),fe=S=>{S&&ml(S).forEach(N=>Ht(r.errors,N)),d.state.next({errors:S?r.errors:{}})},ne=(S,N,O)=>{const Y=(ce(n,S,{_f:{}})._f||{}).ref,M=ce(r.errors,S)||{},{ref:H,message:X,type:ee,...pe}=M;dt(r.errors,S,{...pe,...N,ref:Y}),d.state.next({name:S,errors:r.errors,isValid:!1}),O&&O.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,N)=>Xs(S)?d.values.subscribe({next:O=>S(F(void 0,N),O)}):F(S,N,!0),Ae=(S,N={})=>{for(const O of S?ml(S):a.mount)a.mount.delete(O),a.array.delete(O),N.keepValue||(Ht(n,O),Ht(i,O)),!N.keepError&&Ht(r.errors,O),!N.keepDirty&&Ht(r.dirtyFields,O),!N.keepTouched&&Ht(r.touchedFields,O),!N.keepIsValidating&&Ht(r.validatingFields,O),!t.shouldUnregister&&!N.keepDefaultValue&&Ht(s,O);d.values.next({values:{...i}}),d.state.next({...r,...N.keepDirty?{isDirty:T()}:{}}),!N.keepIsValid&&x()},he=({disabled:S,name:N,field:O,fields:Y,value:M})=>{if(Mn(S)&&o.mount||S){const H=S?void 0:Ft(M)?Yh(O?O._f:ce(Y,N)._f):M;dt(i,N,H),j(N,H,!1,!1,!0)}},ye=(S,N={})=>{let O=ce(n,S);const Y=Mn(N.disabled);return dt(n,S,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:S}},name:S,mount:!0,...N}}),a.mount.add(S),O?he({field:O,disabled:N.disabled,name:S,value:N.value}):E(S,!0,N.value),{...Y?{disabled:N.disabled}:{},...t.progressive?{required:!!N.required,min:Ya(N.min),max:Ya(N.max),minLength:Ya(N.minLength),maxLength:Ya(N.maxLength),pattern:Ya(N.pattern)}:{},name:S,onChange:Z,onBlur:Z,ref:M=>{if(M){ye(S,N),O=ce(n,S);const H=Ft(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=s6(H),ee=O._f.refs||[];if(X?ee.find(pe=>pe===H):H===O._f.ref)return;dt(n,S,{_f:{...O._f,...X?{refs:[...ee.filter(Hh),H,...Array.isArray(ce(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),E(S,!1,void 0,H)}else O=ce(n,S,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(qC(a.array,S)&&o.action)&&a.unMount.add(S)}}},ke=()=>t.shouldFocusError&&gl(n,I,a.mount),Ie=S=>{Mn(S)&&(d.state.next({disabled:S}),gl(n,(N,O)=>{const Y=ce(n,O);Y&&(N.disabled=Y._f.disabled||S,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(M=>{M.disabled=Y._f.disabled||S}))},0,!1))},De=(S,N)=>async O=>{let Y;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let M=wr(i);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:X}=await A();r.errors=H,M=X}else await L(n);if(Ht(r.errors,"root"),Nr(r.errors)){d.state.next({errors:{}});try{await S(M,O)}catch(H){Y=H}}else N&&await N({...r.errors},O),ke(),setTimeout(ke);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Nr(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},Ne=(S,N={})=>{ce(n,S)&&(Ft(N.defaultValue)?W(S,wr(ce(s,S))):(W(S,N.defaultValue),dt(s,S,wr(N.defaultValue))),N.keepTouched||Ht(r.touchedFields,S),N.keepDirty||(Ht(r.dirtyFields,S),r.isDirty=N.defaultValue?T(S,wr(ce(s,S))):T()),N.keepError||(Ht(r.errors,S),f.isValid&&x()),d.state.next({...r}))},nt=(S,N={})=>{const O=S?wr(S):s,Y=wr(O),M=Nr(S),H=M?s:Y;if(N.keepDefaultValues||(s=O),!N.keepValues){if(N.keepDirtyValues)for(const X of a.mount)ce(r.dirtyFields,X)?dt(H,X,ce(i,X)):W(X,ce(H,X));else{if(Kv&&Ft(S))for(const X of a.mount){const ee=ce(n,X);if(ee&&ee._f){const pe=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(kd(pe)){const Be=pe.closest("form");if(Be){Be.reset();break}}}}n={}}i=e.shouldUnregister?N.keepDefaultValues?wr(s):{}:wr(H),d.array.next({values:{...H}}),d.values.next({values:{...H}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!N.keepIsValid||!!N.keepDirtyValues,o.watch=!!e.shouldUnregister,d.state.next({submitCount:N.keepSubmitCount?r.submitCount:0,isDirty:M?!1:N.keepDirty?r.isDirty:!!(N.keepDefaultValues&&!Ui(S,s)),isSubmitted:N.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:N.keepDirtyValues?N.keepDefaultValues&&i?hu(s,i):r.dirtyFields:N.keepDefaultValues&&S?hu(s,S):N.keepDirty?r.dirtyFields:{},touchedFields:N.keepTouched?r.touchedFields:{},errors:N.keepErrors?r.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,N)=>nt(Xs(S)?S(i):S,N);return{control:{register:ye,unregister:Ae,getFieldState:V,handleSubmit:De,setError:ne,_executeSchema:A,_getWatch:F,_getDirty:T,_updateValid:x,_removeUnmounted:q,_updateFieldArray:h,_updateDisabledField:he,_getFieldArray:b,_reset:nt,_resetDefaultValues:()=>Xs(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:Ie,_subjects:d,_proxyFormState:f,_setErrors:C,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(S){o=S},get _defaultValues(){return s},get _names(){return a},set _names(S){a=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:Q,register:ye,handleSubmit:De,watch:se,setValue:W,getValues:z,reset:k,resetField:Ne,clearErrors:fe,unregister:Ae,setError:ne,setFocus:(S,N={})=>{const O=ce(n,S),Y=O&&O._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),N.shouldSelect&&M.select())}},getFieldState:V}}function Wr(e={}){const t=tt.useRef(),r=tt.useRef(),[n,s]=tt.useState({isDirty:!1,isValidating:!1,isLoading:Xs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Xs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...u6(e),formState:n});const i=t.current.control;return i._options=e,qv({subject:i._subjects.state,next:o=>{eE(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),tt.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),tt.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),tt.useEffect(()=>{e.values&&!Ui(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),tt.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),tt.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),tt.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=JC(n,i),t.current}const W0=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ce(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},uE=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?W0(n.ref,r,e):n.refs&&n.refs.forEach(s=>W0(s,r,e))}},d6=(e,t)=>{t.shouldUseNativeValidation&&uE(e,t);const r={};for(const n in e){const s=ce(t.fields,n),i=Object.assign(e[n]||{},{ref:s&&s.ref});if(f6(t.names||Object.keys(e),n)){const o=Object.assign({},ce(r,n));dt(o,"root",i),dt(r,n,o)}else dt(r,n,i)}return r},f6=(e,t)=>e.some(r=>r.startsWith(t+"."));var h6=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,i=n.message,o=n.path.join(".");if(!r[o])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[o]={message:a.message,type:a.code}}else r[o]={message:i,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(f){return f.errors.forEach(function(d){return e.push(d)})}),t){var l=r[o].types,u=l&&l[n.code];r[o]=nE(o,t,r,s,u?[].concat(u,n.message):n.message)}e.shift()}return r},Br=function(e,t,r){return r===void 0&&(r={}),function(n,s,i){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return i.shouldUseNativeValidation&&uE({},i),{errors:{},values:r.raw?n:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:d6(h6(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},st;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(st||(st={}));var hm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(hm||(hm={}));const we=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Bs=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},oe=st.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"]),p6=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lr extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;lr.message){const r={},n=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Lr.create=e=>new Lr(e);const fa=(e,t)=>{let r;switch(e.code){case oe.invalid_type:e.received===we.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:r=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case oe.invalid_union:r="Invalid input";break;case oe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case oe.invalid_enum_value:r=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:r="Invalid function arguments";break;case oe.invalid_return_type:r="Invalid function return type";break;case oe.invalid_date:r="Invalid date";break;case oe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:st.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case oe.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case oe.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case oe.custom:r="Invalid input";break;case oe.invalid_intersection_types:r="Intersection results could not be merged";break;case oe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:r="Number must be finite";break;default:r=t.defaultError,st.assertNever(e)}return{message:r}};let dE=fa;function m6(e){dE=e}function Td(){return dE}const Nd=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},g6=[];function ge(e,t){const r=Td(),n=Nd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===fa?void 0:fa].filter(s=>!!s)});e.common.issues.push(n)}class ur{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return We;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const i=await s.key,o=await s.value;n.push({key:i,value:o})}return ur.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return We;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const We=Object.freeze({status:"aborted"}),zo=e=>({status:"dirty",value:e}),mr=e=>({status:"valid",value:e}),pm=e=>e.status==="aborted",mm=e=>e.status==="dirty",Yl=e=>e.status==="valid",Zl=e=>typeof Promise<"u"&&e instanceof Promise;function Rd(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function fE(e,t,r,n,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,r),r}var Pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Pe||(Pe={}));var Ja,el;class Bn{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,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 B0=(e,t)=>{if(Yl(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 r=new Lr(e.common.issues);return this._error=r,this._error}}};function He(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))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:(o,a)=>{var l,u;const{message:f}=e;return o.code==="invalid_enum_value"?{message:f??a.defaultError}:typeof a.data>"u"?{message:(l=f??n)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=f??r)!==null&&u!==void 0?u:a.defaultError}},description:s}}class qe{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 Bs(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Bs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ur,ctx:{common:t.parent.common,data:t.data,parsedType:Bs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Zl(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Bs(t)},i=this._parseSync({data:t,path:s.path,parent:s});return B0(s,i)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Bs(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(Zl(s)?s:Promise.resolve(s));return B0(n,i)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:oe.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Cn({schema:this,typeName:Ue.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Vn.create(this,this._def)}nullable(){return vi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xn.create(this,this._def)}promise(){return pa.create(this,this._def)}or(t){return Xl.create([this,t],this._def)}and(t){return Ql.create(this,t,this._def)}transform(t){return new Cn({...He(this._def),schema:this,typeName:Ue.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new nc({...He(this._def),innerType:this,defaultValue:r,typeName:Ue.ZodDefault})}brand(){return new Jv({typeName:Ue.ZodBranded,type:this,...He(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new sc({...He(this._def),innerType:this,catchValue:r,typeName:Ue.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return jc.create(this,t)}readonly(){return ic.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const v6=/^c[^\s-]{8,}$/i,y6=/^[0-9a-z]+$/,x6=/^[0-9A-HJKMNP-TV-Z]{26}$/,w6=/^[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,_6=/^[a-z0-9_-]{21}$/i,b6=/^[-+]?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)?)??$/,S6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,k6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zh;const C6=/^(?:(?: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])$/,E6=/^(([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})))$/,j6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hE="((\\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])))",T6=new RegExp(`^${hE}$`);function pE(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 N6(e){return new RegExp(`^${pE(e)}$`)}function mE(e){let t=`${hE}T${pE(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function R6(e,t){return!!((t==="v4"||!t)&&C6.test(e)||(t==="v6"||!t)&&E6.test(e))}class gn extends qe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.string,received:i.parsedType}),We}const n=new ur;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.lengtht.test(s),{validation:r,code:oe.invalid_string,...Pe.errToObj(n)})}_addCheck(t){return new gn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Pe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Pe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Pe.errToObj(t)})}datetime(t){var r,n;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:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...Pe.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,...Pe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Pe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Pe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Pe.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Pe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Pe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Pe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Pe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Pe.errToObj(r)})}nonempty(t){return this.min(1,Pe.errToObj(t))}trim(){return new gn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new gn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new gn({...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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new gn({checks:[],typeName:Ue.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...He(e)})};function P6(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class pi extends qe{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)!==we.number){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.number,received:i.parsedType}),We}let n;const s=new ur;for(const i of this._def.checks)i.kind==="int"?st.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?P6(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.not_finite,message:i.message}),s.dirty()):st.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Pe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Pe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Pe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Pe.toString(r))}setLimit(t,r,n,s){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Pe.toString(s)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pe.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&st.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.valuenew pi({checks:[],typeName:Ue.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...He(e)});class mi extends qe{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)!==we.bigint){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.bigint,received:i.parsedType}),We}let n;const s=new ur;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):st.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Pe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Pe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Pe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Pe.toString(r))}setLimit(t,r,n,s){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Pe.toString(s)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new mi({checks:[],typeName:Ue.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...He(e)})};class Kl extends qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.boolean,received:n.parsedType}),We}return mr(t.data)}}Kl.create=e=>new Kl({typeName:Ue.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...He(e)});class eo extends qe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.date,received:i.parsedType}),We}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_date}),We}const n=new ur;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):st.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Pe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Pe.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew eo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ue.ZodDate,...He(e)});class Pd extends qe{_parse(t){if(this._getType(t)!==we.symbol){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.symbol,received:n.parsedType}),We}return mr(t.data)}}Pd.create=e=>new Pd({typeName:Ue.ZodSymbol,...He(e)});class Gl extends qe{_parse(t){if(this._getType(t)!==we.undefined){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.undefined,received:n.parsedType}),We}return mr(t.data)}}Gl.create=e=>new Gl({typeName:Ue.ZodUndefined,...He(e)});class ql extends qe{_parse(t){if(this._getType(t)!==we.null){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.null,received:n.parsedType}),We}return mr(t.data)}}ql.create=e=>new ql({typeName:Ue.ZodNull,...He(e)});class ha extends qe{constructor(){super(...arguments),this._any=!0}_parse(t){return mr(t.data)}}ha.create=e=>new ha({typeName:Ue.ZodAny,...He(e)});class Bi extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mr(t.data)}}Bi.create=e=>new Bi({typeName:Ue.ZodUnknown,...He(e)});class ks extends qe{_parse(t){const r=this._getOrReturnCtx(t);return ge(r,{code:oe.invalid_type,expected:we.never,received:r.parsedType}),We}}ks.create=e=>new ks({typeName:Ue.ZodNever,...He(e)});class Ad extends qe{_parse(t){if(this._getType(t)!==we.undefined){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.void,received:n.parsedType}),We}return mr(t.data)}}Ad.create=e=>new Ad({typeName:Ue.ZodVoid,...He(e)});class xn extends qe{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==we.array)return ge(r,{code:oe.invalid_type,expected:we.array,received:r.parsedType}),We;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,a=r.data.lengths.maxLength.value&&(ge(r,{code:oe.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Bn(r,o,r.path,a)))).then(o=>ur.mergeArray(n,o));const i=[...r.data].map((o,a)=>s.type._parseSync(new Bn(r,o,r.path,a)));return ur.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new xn({...this._def,minLength:{value:t,message:Pe.toString(r)}})}max(t,r){return new xn({...this._def,maxLength:{value:t,message:Pe.toString(r)}})}length(t,r){return new xn({...this._def,exactLength:{value:t,message:Pe.toString(r)}})}nonempty(t){return this.min(1,t)}}xn.create=(e,t)=>new xn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ue.ZodArray,...He(t)});function So(e){if(e instanceof Rt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Vn.create(So(n))}return new Rt({...e._def,shape:()=>t})}else return e instanceof xn?new xn({...e._def,type:So(e.element)}):e instanceof Vn?Vn.create(So(e.unwrap())):e instanceof vi?vi.create(So(e.unwrap())):e instanceof Hn?Hn.create(e.items.map(t=>So(t))):e}class Rt extends qe{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(),r=st.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==we.object){const u=this._getOrReturnCtx(t);return ge(u,{code:oe.invalid_type,expected:we.object,received:u.parsedType}),We}const{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof ks&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const f=i[u],d=s.data[u];l.push({key:{status:"valid",value:u},value:f._parse(new Bn(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof ks){const u=this._def.unknownKeys;if(u==="passthrough")for(const f of a)l.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(u==="strict")a.length>0&&(ge(s,{code:oe.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const f of a){const d=s.data[f];l.push({key:{status:"valid",value:f},value:u._parse(new Bn(s,d,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const f of l){const d=await f.key,m=await f.value;u.push({key:d,value:m,alwaysSet:f.alwaysSet})}return u}).then(u=>ur.mergeObjectSync(n,u)):ur.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Pe.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,i,o,a;const l=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Pe.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ue.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const r={};return st.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}omit(t){const r={};return st.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}deepPartial(){return So(this)}partial(t){const r={};return st.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new Rt({...this._def,shape:()=>r})}required(t){const r={};return st.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Vn;)i=i._def.innerType;r[n]=i}}),new Rt({...this._def,shape:()=>r})}keyof(){return gE(st.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:ks.create(),typeName:Ue.ZodObject,...He(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:ks.create(),typeName:Ue.ZodObject,...He(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:ks.create(),typeName:Ue.ZodObject,...He(t)});class Xl extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Lr(a.ctx.common.issues));return ge(r,{code:oe.invalid_union,unionErrors:o}),We}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},f=l._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new Lr(l));return ge(r,{code:oe.invalid_union,unionErrors:a}),We}}get options(){return this._def.options}}Xl.create=(e,t)=>new Xl({options:e,typeName:Ue.ZodUnion,...He(t)});const ns=e=>e instanceof ec?ns(e.schema):e instanceof Cn?ns(e.innerType()):e instanceof tc?[e.value]:e instanceof gi?e.options:e instanceof rc?st.objectValues(e.enum):e instanceof nc?ns(e._def.innerType):e instanceof Gl?[void 0]:e instanceof ql?[null]:e instanceof Vn?[void 0,...ns(e.unwrap())]:e instanceof vi?[null,...ns(e.unwrap())]:e instanceof Jv||e instanceof ic?ns(e.unwrap()):e instanceof sc?ns(e._def.innerType):[];class Uf extends qe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return ge(r,{code:oe.invalid_type,expected:we.object,received:r.parsedType}),We;const n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(ge(r,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),We)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const s=new Map;for(const i of r){const o=ns(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new Uf({typeName:Ue.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...He(n)})}}function gm(e,t){const r=Bs(e),n=Bs(t);if(e===t)return{valid:!0,data:e};if(r===we.object&&n===we.object){const s=st.objectKeys(t),i=st.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=gm(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===we.array&&n===we.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i{if(pm(i)||pm(o))return We;const a=gm(i.value,o.value);return a.valid?((mm(i)||mm(o))&&r.dirty(),{status:r.value,value:a.data}):(ge(n,{code:oe.invalid_intersection_types}),We)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Ql.create=(e,t,r)=>new Ql({left:e,right:t,typeName:Ue.ZodIntersection,...He(r)});class Hn extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.array)return ge(n,{code:oe.invalid_type,expected:we.array,received:n.parsedType}),We;if(n.data.lengththis._def.items.length&&(ge(n,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Bn(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>ur.mergeArray(r,o)):ur.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new Hn({...this._def,rest:t})}}Hn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Hn({items:e,typeName:Ue.ZodTuple,rest:null,...He(t)})};class Jl extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return ge(n,{code:oe.invalid_type,expected:we.object,received:n.parsedType}),We;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in n.data)s.push({key:i._parse(new Bn(n,a,n.path,a)),value:o._parse(new Bn(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ur.mergeObjectAsync(r,s):ur.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof qe?new Jl({keyType:t,valueType:r,typeName:Ue.ZodRecord,...He(n)}):new Jl({keyType:gn.create(),valueType:t,typeName:Ue.ZodRecord,...He(r)})}}class Dd extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.map)return ge(n,{code:oe.invalid_type,expected:we.map,received:n.parsedType}),We;const s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,l],u)=>({key:s._parse(new Bn(n,a,n.path,[u,"key"])),value:i._parse(new Bn(n,l,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,f=await l.value;if(u.status==="aborted"||f.status==="aborted")return We;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,f=l.value;if(u.status==="aborted"||f.status==="aborted")return We;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value)}return{status:r.value,value:a}}}}Dd.create=(e,t,r)=>new Dd({valueType:t,keyType:e,typeName:Ue.ZodMap,...He(r)});class to extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.set)return ge(n,{code:oe.invalid_type,expected:we.set,received:n.parsedType}),We;const s=this._def;s.minSize!==null&&n.data.sizes.maxSize.value&&(ge(n,{code:oe.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const f of l){if(f.status==="aborted")return We;f.status==="dirty"&&r.dirty(),u.add(f.value)}return{status:r.value,value:u}}const a=[...n.data.values()].map((l,u)=>i._parse(new Bn(n,l,n.path,u)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,r){return new to({...this._def,minSize:{value:t,message:Pe.toString(r)}})}max(t,r){return new to({...this._def,maxSize:{value:t,message:Pe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}to.create=(e,t)=>new to({valueType:e,minSize:null,maxSize:null,typeName:Ue.ZodSet,...He(t)});class ta extends qe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.function)return ge(r,{code:oe.invalid_type,expected:we.function,received:r.parsedType}),We;function n(a,l){return Nd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Td(),fa].filter(u=>!!u),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function s(a,l){return Nd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Td(),fa].filter(u=>!!u),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof pa){const a=this;return mr(async function(...l){const u=new Lr([]),f=await a._def.args.parseAsync(l,i).catch(v=>{throw u.addIssue(n(l,v)),u}),d=await Reflect.apply(o,this,f);return await a._def.returns._def.type.parseAsync(d,i).catch(v=>{throw u.addIssue(s(d,v)),u})})}else{const a=this;return mr(function(...l){const u=a._def.args.safeParse(l,i);if(!u.success)throw new Lr([n(l,u.error)]);const f=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(f,i);if(!d.success)throw new Lr([s(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ta({...this._def,args:Hn.create(t).rest(Bi.create())})}returns(t){return new ta({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new ta({args:t||Hn.create([]).rest(Bi.create()),returns:r||Bi.create(),typeName:Ue.ZodFunction,...He(n)})}}class ec extends qe{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ec.create=(e,t)=>new ec({getter:e,typeName:Ue.ZodLazy,...He(t)});class tc extends qe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ge(r,{received:r.data,code:oe.invalid_literal,expected:this._def.value}),We}return{status:"valid",value:t.data}}get value(){return this._def.value}}tc.create=(e,t)=>new tc({value:e,typeName:Ue.ZodLiteral,...He(t)});function gE(e,t){return new gi({values:e,typeName:Ue.ZodEnum,...He(t)})}class gi extends qe{constructor(){super(...arguments),Ja.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{expected:st.joinValues(n),received:r.parsedType,code:oe.invalid_type}),We}if(Rd(this,Ja)||fE(this,Ja,new Set(this._def.values)),!Rd(this,Ja).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{received:r.data,code:oe.invalid_enum_value,options:n}),We}return mr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return gi.create(t,{...this._def,...r})}exclude(t,r=this._def){return gi.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Ja=new WeakMap;gi.create=gE;class rc extends qe{constructor(){super(...arguments),el.set(this,void 0)}_parse(t){const r=st.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==we.string&&n.parsedType!==we.number){const s=st.objectValues(r);return ge(n,{expected:st.joinValues(s),received:n.parsedType,code:oe.invalid_type}),We}if(Rd(this,el)||fE(this,el,new Set(st.getValidEnumValues(this._def.values))),!Rd(this,el).has(t.data)){const s=st.objectValues(r);return ge(n,{received:n.data,code:oe.invalid_enum_value,options:s}),We}return mr(t.data)}get enum(){return this._def.values}}el=new WeakMap;rc.create=(e,t)=>new rc({values:e,typeName:Ue.ZodNativeEnum,...He(t)});class pa extends qe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.promise&&r.common.async===!1)return ge(r,{code:oe.invalid_type,expected:we.promise,received:r.parsedType}),We;const n=r.parsedType===we.promise?r.data:Promise.resolve(r.data);return mr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}pa.create=(e,t)=>new pa({type:e,typeName:Ue.ZodPromise,...He(t)});class Cn extends qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ge(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return We;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?We:l.status==="dirty"||r.value==="dirty"?zo(l.value):l});{if(r.value==="aborted")return We;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?We:a.status==="dirty"||r.value==="dirty"?zo(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(n.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(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?We:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?We:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Yl(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Yl(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):o);st.assertNever(s)}}Cn.create=(e,t,r)=>new Cn({schema:e,typeName:Ue.ZodEffects,effect:t,...He(r)});Cn.createWithPreprocess=(e,t,r)=>new Cn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ue.ZodEffects,...He(r)});class Vn extends qe{_parse(t){return this._getType(t)===we.undefined?mr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Vn.create=(e,t)=>new Vn({innerType:e,typeName:Ue.ZodOptional,...He(t)});class vi extends qe{_parse(t){return this._getType(t)===we.null?mr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vi.create=(e,t)=>new vi({innerType:e,typeName:Ue.ZodNullable,...He(t)});class nc extends qe{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===we.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}nc.create=(e,t)=>new nc({innerType:e,typeName:Ue.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...He(t)});class sc extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Zl(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}sc.create=(e,t)=>new sc({innerType:e,typeName:Ue.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...He(t)});class Od extends qe{_parse(t){if(this._getType(t)!==we.nan){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.nan,received:n.parsedType}),We}return{status:"valid",value:t.data}}}Od.create=e=>new Od({typeName:Ue.ZodNaN,...He(e)});const A6=Symbol("zod_brand");class Jv extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class jc extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?We:i.status==="dirty"?(r.dirty(),zo(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?We:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new jc({in:t,out:r,typeName:Ue.ZodPipeline})}}class ic extends qe{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Yl(s)&&(s.value=Object.freeze(s.value)),s);return Zl(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}ic.create=(e,t)=>new ic({innerType:e,typeName:Ue.ZodReadonly,...He(t)});function vE(e,t={},r){return e?ha.create().superRefine((n,s)=>{var i,o;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(o=(i=a.fatal)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:l})}}):ha.create()}const D6={object:Rt.lazycreate};var Ue;(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"})(Ue||(Ue={}));const O6=(e,t={message:`Input not instance of ${e.name}`})=>vE(r=>r instanceof e,t),yE=gn.create,xE=pi.create,M6=Od.create,I6=mi.create,wE=Kl.create,L6=eo.create,F6=Pd.create,z6=Gl.create,U6=ql.create,V6=ha.create,$6=Bi.create,W6=ks.create,B6=Ad.create,H6=xn.create,Y6=Rt.create,Z6=Rt.strictCreate,K6=Xl.create,G6=Uf.create,q6=Ql.create,X6=Hn.create,Q6=Jl.create,J6=Dd.create,ez=to.create,tz=ta.create,rz=ec.create,nz=tc.create,sz=gi.create,iz=rc.create,oz=pa.create,H0=Cn.create,az=Vn.create,lz=vi.create,cz=Cn.createWithPreprocess,uz=jc.create,dz=()=>yE().optional(),fz=()=>xE().optional(),hz=()=>wE().optional(),pz={string:e=>gn.create({...e,coerce:!0}),number:e=>pi.create({...e,coerce:!0}),boolean:e=>Kl.create({...e,coerce:!0}),bigint:e=>mi.create({...e,coerce:!0}),date:e=>eo.create({...e,coerce:!0})},mz=We;var me=Object.freeze({__proto__:null,defaultErrorMap:fa,setErrorMap:m6,getErrorMap:Td,makeIssue:Nd,EMPTY_PATH:g6,addIssueToContext:ge,ParseStatus:ur,INVALID:We,DIRTY:zo,OK:mr,isAborted:pm,isDirty:mm,isValid:Yl,isAsync:Zl,get util(){return st},get objectUtil(){return hm},ZodParsedType:we,getParsedType:Bs,ZodType:qe,datetimeRegex:mE,ZodString:gn,ZodNumber:pi,ZodBigInt:mi,ZodBoolean:Kl,ZodDate:eo,ZodSymbol:Pd,ZodUndefined:Gl,ZodNull:ql,ZodAny:ha,ZodUnknown:Bi,ZodNever:ks,ZodVoid:Ad,ZodArray:xn,ZodObject:Rt,ZodUnion:Xl,ZodDiscriminatedUnion:Uf,ZodIntersection:Ql,ZodTuple:Hn,ZodRecord:Jl,ZodMap:Dd,ZodSet:to,ZodFunction:ta,ZodLazy:ec,ZodLiteral:tc,ZodEnum:gi,ZodNativeEnum:rc,ZodPromise:pa,ZodEffects:Cn,ZodTransformer:Cn,ZodOptional:Vn,ZodNullable:vi,ZodDefault:nc,ZodCatch:sc,ZodNaN:Od,BRAND:A6,ZodBranded:Jv,ZodPipeline:jc,ZodReadonly:ic,custom:vE,Schema:qe,ZodSchema:qe,late:D6,get ZodFirstPartyTypeKind(){return Ue},coerce:pz,any:V6,array:H6,bigint:I6,boolean:wE,date:L6,discriminatedUnion:G6,effect:H0,enum:sz,function:tz,instanceof:O6,intersection:q6,lazy:rz,literal:nz,map:J6,nan:M6,nativeEnum:iz,never:W6,null:U6,nullable:lz,number:xE,object:Y6,oboolean:hz,onumber:fz,optional:az,ostring:dz,pipeline:uz,preprocess:cz,promise:oz,record:Q6,set:ez,strictObject:Z6,string:yE,symbol:F6,transformer:H0,tuple:X6,undefined:z6,union:K6,unknown:$6,void:B6,NEVER:mz,ZodIssueCode:oe,quotelessJson:p6,ZodError:Lr}),gz="Label",_E=y.forwardRef((e,t)=>c.jsx(Ve.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));_E.displayName=gz;var bE=_E;const vz=dc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ey=y.forwardRef(({className:e,...t},r)=>c.jsx(bE,{ref:r,className:le(vz(),e),...t}));ey.displayName=bE.displayName;const Hr=qF,SE=y.createContext({}),Te=({...e})=>c.jsx(SE.Provider,{value:{name:e.name},children:c.jsx(e6,{...e})}),Vf=()=>{const e=y.useContext(SE),t=y.useContext(kE),{getFieldState:r,formState:n}=zf(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within ");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},kE=y.createContext({}),Ce=y.forwardRef(({className:e,...t},r)=>{const n=y.useId();return c.jsx(kE.Provider,{value:{id:n},children:c.jsx("div",{ref:r,className:le("space-y-2",e),...t})})});Ce.displayName="FormItem";const Ee=y.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Vf();return c.jsx(ey,{ref:r,className:le(n&&"text-destructive",e),htmlFor:s,...t})});Ee.displayName="FormLabel";const je=y.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:i}=Vf();return c.jsx(ws,{ref:t,id:n,"aria-describedby":r?`${s} ${i}`:`${s}`,"aria-invalid":!!r,...e})});je.displayName="FormControl";const yz=y.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Vf();return c.jsx("p",{ref:r,id:n,className:le("text-sm text-muted-foreground",e),...t})});yz.displayName="FormDescription";const Se=y.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:i}=Vf(),o=s?String(s==null?void 0:s.message):t;return o?c.jsx("p",{ref:n,id:i,className:le("text-sm font-medium text-destructive",e),...r,children:o}):null});Se.displayName="FormMessage";function vm(e,[t,r]){return Math.min(r,Math.max(t,e))}var xz=[" ","Enter","ArrowUp","ArrowDown"],wz=[" ","Enter"],Tc="Select",[$f,Wf,_z]=lf(Tc),[Na,z8]=nn(Tc,[_z,Ca]),Bf=Ca(),[bz,Si]=Na(Tc),[Sz,kz]=Na(Tc),CE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:u,name:f,autoComplete:d,disabled:m,required:v}=e,w=Bf(t),[g,x]=y.useState(null),[p,h]=y.useState(null),[_,C]=y.useState(!1),E=cf(u),[j=!1,R]=ui({prop:n,defaultProp:s,onChange:i}),[A,P]=ui({prop:o,defaultProp:a,onChange:l}),L=y.useRef(null),q=g?!!g.closest("form"):!0,[T,F]=y.useState(new Set),b=Array.from(T).map($=>$.props.value).join(";");return c.jsx(Ug,{...w,children:c.jsxs(bz,{required:v,scope:t,trigger:g,onTriggerChange:x,valueNode:p,onValueNodeChange:h,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:Un(),value:A,onValueChange:P,open:j,onOpenChange:R,dir:E,triggerPointerDownPosRef:L,disabled:m,children:[c.jsx($f.Provider,{scope:t,children:c.jsx(Sz,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback($=>{F(te=>new Set(te).add($))},[]),onNativeOptionRemove:y.useCallback($=>{F(te=>{const W=new Set(te);return W.delete($),W})},[]),children:r})}),q?c.jsxs(XE,{"aria-hidden":!0,required:v,tabIndex:-1,name:f,autoComplete:d,value:A,onChange:$=>P($.target.value),disabled:m,children:[A===void 0?c.jsx("option",{value:""}):null,Array.from(T)]},b):null]})})};CE.displayName=Tc;var EE="SelectTrigger",jE=y.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,i=Bf(r),o=Si(EE,r),a=o.disabled||n,l=Xe(t,o.onTriggerChange),u=Wf(r),[f,d,m]=QE(w=>{const g=u().filter(h=>!h.disabled),x=g.find(h=>h.value===o.value),p=JE(g,w,x);p!==void 0&&o.onValueChange(p.value)}),v=()=>{a||(o.onOpenChange(!0),m())};return c.jsx(Vg,{asChild:!0,...i,children:c.jsx(Ve.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":qE(o.value)?"":void 0,...s,ref:l,onClick:de(s.onClick,w=>{w.currentTarget.focus()}),onPointerDown:de(s.onPointerDown,w=>{const g=w.target;g.hasPointerCapture(w.pointerId)&&g.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&(v(),o.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)},w.preventDefault())}),onKeyDown:de(s.onKeyDown,w=>{const g=f.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&d(w.key),!(g&&w.key===" ")&&xz.includes(w.key)&&(v(),w.preventDefault())})})})});jE.displayName=EE;var TE="SelectValue",NE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=e,l=Si(TE,r),{onValueNodeHasChildrenChange:u}=l,f=i!==void 0,d=Xe(t,l.onValueNodeChange);return sr(()=>{u(f)},[u,f]),c.jsx(Ve.span,{...a,ref:d,style:{pointerEvents:"none"},children:qE(l.value)?c.jsx(c.Fragment,{children:o}):i})});NE.displayName=TE;var Cz="SelectIcon",RE=y.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return c.jsx(Ve.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});RE.displayName=Cz;var Ez="SelectPortal",PE=e=>c.jsx(hc,{asChild:!0,...e});PE.displayName=Ez;var ro="SelectContent",AE=y.forwardRef((e,t)=>{const r=Si(ro,e.__scopeSelect),[n,s]=y.useState();if(sr(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Es.createPortal(c.jsx(DE,{scope:e.__scopeSelect,children:c.jsx($f.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),i):null}return c.jsx(OE,{...e,ref:t})});AE.displayName=ro;var os=10,[DE,ki]=Na(ro),jz="SelectContentImpl",OE=y.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:w,hideWhenDetached:g,avoidCollisions:x,...p}=e,h=Si(ro,r),[_,C]=y.useState(null),[E,j]=y.useState(null),R=Xe(t,he=>C(he)),[A,P]=y.useState(null),[L,q]=y.useState(null),T=Wf(r),[F,b]=y.useState(!1),$=y.useRef(!1);y.useEffect(()=>{if(_)return Bg(_)},[_]),Pg();const te=y.useCallback(he=>{const[ye,...ke]=T().map(Ne=>Ne.ref.current),[Ie]=ke.slice(-1),De=document.activeElement;for(const Ne of he)if(Ne===De||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===ye&&E&&(E.scrollTop=0),Ne===Ie&&E&&(E.scrollTop=E.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==De))return},[T,E]),W=y.useCallback(()=>te([A,_]),[te,A,_]);y.useEffect(()=>{F&&W()},[F,W]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=h;y.useEffect(()=>{if(_){let he={x:0,y:0};const ye=Ie=>{var De,Ne;he={x:Math.abs(Math.round(Ie.pageX)-(((De=I.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Ie.pageY)-(((Ne=I.current)==null?void 0:Ne.y)??0))}},ke=Ie=>{he.x<=10&&he.y<=10?Ie.preventDefault():_.contains(Ie.target)||Z(!1),document.removeEventListener("pointermove",ye),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",ke,{capture:!0})}}},[_,Z,I]),y.useEffect(()=>{const he=()=>Z(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[Z]);const[Q,z]=QE(he=>{const ye=T().filter(De=>!De.disabled),ke=ye.find(De=>De.ref.current===document.activeElement),Ie=JE(ye,he,ke);Ie&&setTimeout(()=>Ie.ref.current.focus())}),V=y.useCallback((he,ye,ke)=>{const Ie=!$.current&&!ke;(h.value!==void 0&&h.value===ye||Ie)&&(P(he),Ie&&($.current=!0))},[h.value]),fe=y.useCallback(()=>_==null?void 0:_.focus(),[_]),ne=y.useCallback((he,ye,ke)=>{const Ie=!$.current&&!ke;(h.value!==void 0&&h.value===ye||Ie)&&q(he)},[h.value]),se=n==="popper"?ym:ME,Ae=se===ym?{side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:w,hideWhenDetached:g,avoidCollisions:x}:{};return c.jsx(DE,{scope:r,content:_,viewport:E,onViewportChange:j,itemRefCallback:V,selectedItem:A,onItemLeave:fe,itemTextRefCallback:ne,focusSelectedItem:W,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:c.jsx(mf,{as:ws,allowPinchZoom:!0,children:c.jsx(uf,{asChild:!0,trapped:h.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:de(s,he=>{var ye;(ye=h.trigger)==null||ye.focus({preventScroll:!0}),he.preventDefault()}),children:c.jsx(ba,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:c.jsx(se,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:he=>he.preventDefault(),...p,...Ae,onPlaced:()=>b(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:de(p.onKeyDown,he=>{const ye=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!ye&&he.key.length===1&&z(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Ie=T().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(he.key)&&(Ie=Ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const De=he.target,Ne=Ie.indexOf(De);Ie=Ie.slice(Ne+1)}setTimeout(()=>te(Ie)),he.preventDefault()}})})})})})})});OE.displayName=jz;var Tz="SelectItemAlignedPosition",ME=y.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,i=Si(ro,r),o=ki(ro,r),[a,l]=y.useState(null),[u,f]=y.useState(null),d=Xe(t,R=>f(R)),m=Wf(r),v=y.useRef(!1),w=y.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:p,focusSelectedItem:h}=o,_=y.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&g&&x&&p){const R=i.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),P=i.valueNode.getBoundingClientRect(),L=p.getBoundingClientRect();if(i.dir!=="rtl"){const De=L.left-A.left,Ne=P.left-De,nt=R.left-Ne,k=R.width+nt,J=Math.max(k,A.width),K=window.innerWidth-os,D=vm(Ne,[os,K-J]);a.style.minWidth=k+"px",a.style.left=D+"px"}else{const De=A.right-L.right,Ne=window.innerWidth-P.right-De,nt=window.innerWidth-R.right-Ne,k=R.width+nt,J=Math.max(k,A.width),K=window.innerWidth-os,D=vm(Ne,[os,K-J]);a.style.minWidth=k+"px",a.style.right=D+"px"}const q=m(),T=window.innerHeight-os*2,F=g.scrollHeight,b=window.getComputedStyle(u),$=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),W=parseInt(b.borderBottomWidth,10),Z=parseInt(b.paddingBottom,10),I=$+te+F+Z+W,Q=Math.min(x.offsetHeight*5,I),z=window.getComputedStyle(g),V=parseInt(z.paddingTop,10),fe=parseInt(z.paddingBottom,10),ne=R.top+R.height/2-os,se=T-ne,Ae=x.offsetHeight/2,he=x.offsetTop+Ae,ye=$+te+he,ke=I-ye;if(ye<=ne){const De=x===q[q.length-1].ref.current;a.style.bottom="0px";const Ne=u.clientHeight-g.offsetTop-g.offsetHeight,nt=Math.max(se,Ae+(De?fe:0)+Ne+W),k=ye+nt;a.style.height=k+"px"}else{const De=x===q[0].ref.current;a.style.top="0px";const nt=Math.max(ne,$+g.offsetTop+(De?V:0)+Ae)+ke;a.style.height=nt+"px",g.scrollTop=ye-ne+g.offsetTop}a.style.margin=`${os}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=T+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[m,i.trigger,i.valueNode,a,u,g,x,p,i.dir,n]);sr(()=>_(),[_]);const[C,E]=y.useState();sr(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const j=y.useCallback(R=>{R&&w.current===!0&&(_(),h==null||h(),w.current=!1)},[_,h]);return c.jsx(Rz,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:j,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:c.jsx(Ve.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});ME.displayName=Tz;var Nz="SelectPopperPosition",ym=y.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=os,...i}=e,o=Bf(r);return c.jsx($g,{...o,...i,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}})});ym.displayName=Nz;var[Rz,ty]=Na(ro,{}),xm="SelectViewport",IE=y.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,i=ki(xm,r),o=ty(xm,r),a=Xe(t,i.onViewportChange),l=y.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx($f.Slot,{scope:r,children:c.jsx(Ve.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:de(s.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&d){const v=Math.abs(l.current-f.scrollTop);if(v>0){const w=window.innerHeight-os*2,g=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),p=Math.max(g,x);if(p0?C:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});IE.displayName=xm;var LE="SelectGroup",[Pz,Az]=Na(LE),FE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Un();return c.jsx(Pz,{scope:r,id:s,children:c.jsx(Ve.div,{role:"group","aria-labelledby":s,...n,ref:t})})});FE.displayName=LE;var zE="SelectLabel",UE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Az(zE,r);return c.jsx(Ve.div,{id:s.id,...n,ref:t})});UE.displayName=zE;var Md="SelectItem",[Dz,VE]=Na(Md),$E=y.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=e,a=Si(Md,r),l=ki(Md,r),u=a.value===n,[f,d]=y.useState(i??""),[m,v]=y.useState(!1),w=Xe(t,p=>{var h;return(h=l.itemRefCallback)==null?void 0:h.call(l,p,n,s)}),g=Un(),x=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Dz,{scope:r,value:n,disabled:s,textId:g,isSelected:u,onItemTextChange:y.useCallback(p=>{d(h=>h||((p==null?void 0:p.textContent)??"").trim())},[]),children:c.jsx($f.ItemSlot,{scope:r,value:n,disabled:s,textValue:f,children:c.jsx(Ve.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:w,onFocus:de(o.onFocus,()=>v(!0)),onBlur:de(o.onBlur,()=>v(!1)),onPointerUp:de(o.onPointerUp,x),onPointerMove:de(o.onPointerMove,p=>{var h;s?(h=l.onItemLeave)==null||h.call(l):p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:de(o.onPointerLeave,p=>{var h;p.currentTarget===document.activeElement&&((h=l.onItemLeave)==null||h.call(l))}),onKeyDown:de(o.onKeyDown,p=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&p.key===" "||(wz.includes(p.key)&&x(),p.key===" "&&p.preventDefault())})})})})});$E.displayName=Md;var tl="SelectItemText",WE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...i}=e,o=Si(tl,r),a=ki(tl,r),l=VE(tl,r),u=kz(tl,r),[f,d]=y.useState(null),m=Xe(t,p=>d(p),l.onItemTextChange,p=>{var h;return(h=a.itemTextRefCallback)==null?void 0:h.call(a,p,l.value,l.disabled)}),v=f==null?void 0:f.textContent,w=y.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:g,onNativeOptionRemove:x}=u;return sr(()=>(g(w),()=>x(w)),[g,x,w]),c.jsxs(c.Fragment,{children:[c.jsx(Ve.span,{id:l.textId,...i,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Es.createPortal(i.children,o.valueNode):null]})});WE.displayName=tl;var BE="SelectItemIndicator",HE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return VE(BE,r).isSelected?c.jsx(Ve.span,{"aria-hidden":!0,...n,ref:t}):null});HE.displayName=BE;var wm="SelectScrollUpButton",YE=y.forwardRef((e,t)=>{const r=ki(wm,e.__scopeSelect),n=ty(wm,e.__scopeSelect),[s,i]=y.useState(!1),o=Xe(t,n.onScrollButtonChange);return sr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(KE,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});YE.displayName=wm;var _m="SelectScrollDownButton",ZE=y.forwardRef((e,t)=>{const r=ki(_m,e.__scopeSelect),n=ty(_m,e.__scopeSelect),[s,i]=y.useState(!1),o=Xe(t,n.onScrollButtonChange);return sr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(KE,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});ZE.displayName=_m;var KE=y.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,i=ki("SelectScrollButton",r),o=y.useRef(null),a=Wf(r),l=y.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),sr(()=>{var f;const u=a().find(d=>d.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),c.jsx(Ve.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:de(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:de(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:de(s.onPointerLeave,()=>{l()})})}),Oz="SelectSeparator",GE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(Ve.div,{"aria-hidden":!0,...n,ref:t})});GE.displayName=Oz;var bm="SelectArrow",Mz=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Bf(r),i=Si(bm,r),o=ki(bm,r);return i.open&&o.position==="popper"?c.jsx(Wg,{...s,...n,ref:t}):null});Mz.displayName=bm;function qE(e){return e===""||e===void 0}var XE=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=y.useRef(null),i=Xe(t,s),o=lC(r);return y.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const d=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(d)}},[o,r]),c.jsx(kc,{asChild:!0,children:c.jsx("select",{...n,ref:i,defaultValue:r})})});XE.displayName="BubbleSelect";function QE(e){const t=Dt(e),r=y.useRef(""),n=y.useRef(0),s=y.useCallback(o=>{const a=r.current+o;t(a),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function JE(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=Iz(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function Iz(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Lz=CE,ej=jE,Fz=NE,zz=RE,Uz=PE,tj=AE,Vz=IE,$z=FE,rj=UE,nj=$E,Wz=WE,Bz=HE,sj=YE,ij=ZE,oj=GE;const Pi=Lz,rl=$z,Ai=Fz,Hs=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(ej,{ref:n,className:le("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),...r,children:[t,c.jsx(zz,{asChild:!0,children:c.jsx(T1,{className:"h-4 w-4 opacity-50"})})]}));Hs.displayName=ej.displayName;const aj=y.forwardRef(({className:e,...t},r)=>c.jsx(sj,{ref:r,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(QR,{className:"h-4 w-4"})}));aj.displayName=sj.displayName;const lj=y.forwardRef(({className:e,...t},r)=>c.jsx(ij,{ref:r,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(T1,{className:"h-4 w-4"})}));lj.displayName=ij.displayName;const Ys=y.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>c.jsx(Uz,{children:c.jsxs(tj,{ref:s,className:le("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",r==="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:r,...n,children:[c.jsx(aj,{}),c.jsx(Vz,{className:le("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(lj,{})]})}));Ys.displayName=tj.displayName;const Uo=y.forwardRef(({className:e,...t},r)=>c.jsx(rj,{ref:r,className:le("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Uo.displayName=rj.displayName;const fn=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(nj,{ref:n,className:le("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),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Bz,{children:c.jsx(j1,{className:"h-4 w-4"})})}),c.jsx(Wz,{children:t})]}));fn.displayName=nj.displayName;const Hz=y.forwardRef(({className:e,...t},r)=>c.jsx(oj,{ref:r,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));Hz.displayName=oj.displayName;const Sm=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["tencent-cdn",["腾讯云-CDN","/imgs/providers/tencent.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["qiniu-cdn",["七牛云-CDN","/imgs/providers/qiniu.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]]]),Yz=Array.from(Sm.keys()),ry=sv,ny=iv,Zz=ov,cj=y.forwardRef(({className:e,...t},r)=>c.jsx(gc,{ref:r,className:le("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}));cj.displayName=gc.displayName;const Hf=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Zz,{children:[c.jsx(cj,{}),c.jsxs(vc,{ref:n,className:le("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),...r,children:[t,c.jsxs(yf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(jg,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Hf.displayName=vc.displayName;const Yf=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Yf.displayName="DialogHeader";const Zf=y.forwardRef(({className:e,...t},r)=>c.jsx(yc,{ref:r,className:le("text-lg font-semibold leading-none tracking-tight",e),...t}));Zf.displayName=yc.displayName;const Kz=y.forwardRef(({className:e,...t},r)=>c.jsx(xc,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));Kz.displayName=xc.displayName;function Gz(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var sy="ScrollArea",[uj,U8]=nn(sy),[qz,an]=uj(sy),dj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,l]=y.useState(null),[u,f]=y.useState(null),[d,m]=y.useState(null),[v,w]=y.useState(null),[g,x]=y.useState(null),[p,h]=y.useState(0),[_,C]=y.useState(0),[E,j]=y.useState(!1),[R,A]=y.useState(!1),P=Xe(t,q=>l(q)),L=cf(s);return c.jsx(qz,{scope:r,type:n,dir:L,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:d,onContentChange:m,scrollbarX:v,onScrollbarXChange:w,scrollbarXEnabled:E,onScrollbarXEnabledChange:j,scrollbarY:g,onScrollbarYChange:x,scrollbarYEnabled:R,onScrollbarYEnabledChange:A,onCornerWidthChange:h,onCornerHeightChange:C,children:c.jsx(Ve.div,{dir:L,...o,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});dj.displayName=sy;var fj="ScrollAreaViewport",hj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...i}=e,o=an(fj,r),a=y.useRef(null),l=Xe(t,a,o.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),c.jsx(Ve.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});hj.displayName=fj;var Gn="ScrollAreaScrollbar",iy=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=an(Gn,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return y.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?c.jsx(Xz,{...n,ref:t,forceMount:r}):s.type==="scroll"?c.jsx(Qz,{...n,ref:t,forceMount:r}):s.type==="auto"?c.jsx(pj,{...n,ref:t,forceMount:r}):s.type==="always"?c.jsx(oy,{...n,ref:t}):null});iy.displayName=Gn;var Xz=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=an(Gn,e.__scopeScrollArea),[i,o]=y.useState(!1);return y.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),o(!0)},f=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),c.jsx(Er,{present:r||i,children:c.jsx(pj,{"data-state":i?"visible":"hidden",...n,ref:t})})}),Qz=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=an(Gn,e.__scopeScrollArea),i=e.orientation==="horizontal",o=Gf(()=>l("SCROLL_END"),100),[a,l]=Gz("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,l]),y.useEffect(()=>{const u=s.viewport,f=i?"scrollLeft":"scrollTop";if(u){let d=u[f];const m=()=>{const v=u[f];d!==v&&(l("SCROLL"),o()),d=v};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[s.viewport,i,l,o]),c.jsx(Er,{present:r||a!=="hidden",children:c.jsx(oy,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:de(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:de(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),pj=y.forwardRef((e,t)=>{const r=an(Gn,e.__scopeScrollArea),{forceMount:n,...s}=e,[i,o]=y.useState(!1),a=e.orientation==="horizontal",l=Gf(()=>{if(r.viewport){const u=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,s=an(Gn,e.__scopeScrollArea),i=y.useRef(null),o=y.useRef(0),[a,l]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=xj(a.viewport,a.content),f={...n,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:m=>i.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function d(m,v){return s8(m,o.current,a,v)}return r==="horizontal"?c.jsx(Jz,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const m=s.viewport.scrollLeft,v=Y0(m,a,s.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=d(m,s.dir))}}):r==="vertical"?c.jsx(e8,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const m=s.viewport.scrollTop,v=Y0(m,a);i.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=d(m))}}):null}),Jz=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=an(Gn,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),u=Xe(t,l,i.onScrollbarXChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(gj,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Kf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const m=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(m),_j(m,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ld(o.paddingLeft),paddingEnd:Ld(o.paddingRight)}})}})}),e8=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=an(Gn,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),u=Xe(t,l,i.onScrollbarYChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(gj,{"data-orientation":"vertical",...s,ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Kf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const m=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(m),_j(m,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ld(o.paddingTop),paddingEnd:Ld(o.paddingBottom)}})}})}),[t8,mj]=uj(Gn),gj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:d,...m}=e,v=an(Gn,r),[w,g]=y.useState(null),x=Xe(t,P=>g(P)),p=y.useRef(null),h=y.useRef(""),_=v.viewport,C=n.content-n.viewport,E=Dt(f),j=Dt(l),R=Gf(d,10);function A(P){if(p.current){const L=P.clientX-p.current.left,q=P.clientY-p.current.top;u({x:L,y:q})}}return y.useEffect(()=>{const P=L=>{const q=L.target;(w==null?void 0:w.contains(q))&&E(L,C)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[_,w,C,E]),y.useEffect(j,[n,j]),ma(w,R),ma(v.content,R),c.jsx(t8,{scope:r,scrollbar:w,hasThumb:s,onThumbChange:Dt(i),onThumbPointerUp:Dt(o),onThumbPositionChange:j,onThumbPointerDown:Dt(a),children:c.jsx(Ve.div,{...m,ref:x,style:{position:"absolute",...m.style},onPointerDown:de(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),p.current=w.getBoundingClientRect(),h.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),A(P))}),onPointerMove:de(e.onPointerMove,A),onPointerUp:de(e.onPointerUp,P=>{const L=P.target;L.hasPointerCapture(P.pointerId)&&L.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=h.current,v.viewport&&(v.viewport.style.scrollBehavior=""),p.current=null})})})}),Id="ScrollAreaThumb",vj=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=mj(Id,e.__scopeScrollArea);return c.jsx(Er,{present:r||s.hasThumb,children:c.jsx(r8,{ref:t,...n})})}),r8=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,i=an(Id,r),o=mj(Id,r),{onThumbPositionChange:a}=o,l=Xe(t,d=>o.onThumbChange(d)),u=y.useRef(),f=Gf(()=>{u.current&&(u.current(),u.current=void 0)},100);return y.useEffect(()=>{const d=i.viewport;if(d){const m=()=>{if(f(),!u.current){const v=i8(d,a);u.current=v,a()}};return a(),d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[i.viewport,f,a]),c.jsx(Ve.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:de(e.onPointerDownCapture,d=>{const v=d.target.getBoundingClientRect(),w=d.clientX-v.left,g=d.clientY-v.top;o.onThumbPointerDown({x:w,y:g})}),onPointerUp:de(e.onPointerUp,o.onThumbPointerUp)})});vj.displayName=Id;var ay="ScrollAreaCorner",yj=y.forwardRef((e,t)=>{const r=an(ay,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.jsx(n8,{...e,ref:t}):null});yj.displayName=ay;var n8=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=an(ay,r),[i,o]=y.useState(0),[a,l]=y.useState(0),u=!!(i&&a);return ma(s.scrollbarX,()=>{var d;const f=((d=s.scrollbarX)==null?void 0:d.offsetHeight)||0;s.onCornerHeightChange(f),l(f)}),ma(s.scrollbarY,()=>{var d;const f=((d=s.scrollbarY)==null?void 0:d.offsetWidth)||0;s.onCornerWidthChange(f),o(f)}),u?c.jsx(Ve.div,{...n,ref:t,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ld(e){return e?parseInt(e,10):0}function xj(e,t){const r=e/t;return isNaN(r)?0:r}function Kf(e){const t=xj(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function s8(e,t,r,n="ltr"){const s=Kf(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return wj([l,u],d)(e)}function Y0(e,t,r="ltr"){const n=Kf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],u=vm(e,l);return wj([0,o],[0,a])(u)}function wj(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function _j(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Gf(e,t){const r=Dt(e),n=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),y.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ma(e,t){const r=Dt(t);sr(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var bj=dj,o8=hj,a8=yj;const qf=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(bj,{ref:n,className:le("relative overflow-hidden",e),...r,children:[c.jsx(o8,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(Sj,{}),c.jsx(a8,{})]}));qf.displayName=bj.displayName;const Sj=y.forwardRef(({className:e,orientation:t="vertical",...r},n)=>c.jsx(iy,{ref:n,orientation:t,className:le("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:c.jsx(vj,{className:"relative flex-1 rounded-full bg-border"})}));Sj.displayName=iy.displayName;const ai=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["cloudflare",["Cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["Namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["GoDaddy","/imgs/providers/godaddy.svg"]],["qiniu",["七牛云","/imgs/providers/qiniu.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]]]),Z0=e=>ai.get(e),Ci=me.union([me.literal("aliyun"),me.literal("tencent"),me.literal("ssh"),me.literal("webhook"),me.literal("cloudflare"),me.literal("qiniu"),me.literal("namesilo"),me.literal("godaddy")],{message:"请选择云服务商"}),Ei=e=>{switch(e){case"aliyun":case"tencent":return"all";case"ssh":case"webhook":case"qiniu":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},l8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=$r(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,secretId:me.string().min(1).max(64),secretKey:me.string().min(1).max(64)});let i={secretId:"",secretKey:""};e&&(i=e.config);const o=Wr({resolver:Br(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:i.secretId,secretKey:i.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{secretId:l.secretId,secretKey:l.secretKey}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Hr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"secretId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretId"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入SecretId",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"secretKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretKey"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入SecretKey",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},c8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=$r(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,accessKeyId:me.string().min(1).max(64),accessSecretId:me.string().min(1).max(64)});let i={accessKeyId:"",accessKeySecret:""};e&&(i=e.config);const o=Wr({resolver:Br(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:i.accessKeyId,accessSecretId:i.accessKeySecret}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Hr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"accessKeyId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKeyId"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入AccessKeyId",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"accessSecretId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKeySecret"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入AccessKeySecret",...l})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},ly=y.forwardRef(({className:e,...t},r)=>c.jsx("textarea",{className:le("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));ly.displayName="Textarea";const km=({className:e,trigger:t})=>{const{reloadAccessGroups:r}=$r(),[n,s]=y.useState(!1),i=me.object({name:me.string().min(1).max(64)}),o=Wr({resolver:Br(i),defaultValues:{name:""}}),a=async l=>{try{await f5({name:l.name}),r(),s(!1)}catch(u){Object.entries(u.response.data).forEach(([d,m])=>{o.setError(d,{type:"manual",message:m.message})})}};return c.jsxs(ry,{onOpenChange:s,open:n,children:[c.jsx(ny,{asChild:!0,className:le(e),children:t}),c.jsxs(Hf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Yf,{children:c.jsx(Zf,{children:"添加分组"})}),c.jsx("div",{className:"container py-3",children:c.jsx(Hr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"组名"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入组名",...l,type:"text"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})]})]})},u8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n,reloadAccessGroups:s,config:{accessGroups:i}}=$r(),o=y.useRef(null),[a,l]=y.useState(""),u=e&&e.group?e.group:"",f=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,host:me.string().ip({message:"请输入合法的IP地址"}),group:me.string().optional(),port:me.string().min(1).max(5),username:me.string().min(1).max(64),password:me.string().min(0).max(64),key:me.string().min(0).max(20480),keyFile:me.any().optional(),command:me.string().min(1).max(2048),certPath:me.string().min(0).max(2048),keyPath:me.string().min(0).max(2048)});let d={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(d=e.config);const m=Wr({resolver:Br(f),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",group:e==null?void 0:e.group,host:d.host,port:d.port,username:d.username,password:d.password,key:d.key,keyFile:d.keyFile,certPath:d.certPath,keyPath:d.keyPath,command:d.command}}),v=async x=>{console.log(x);let p=x.group;p=="emptyId"&&(p="");const h={id:x.id,name:x.name,configType:x.configType,usage:Ei(x.configType),group:p,config:{host:x.host,port:x.port,username:x.username,password:x.password,key:x.key,command:x.command,certPath:x.certPath,keyPath:x.keyPath}};try{const _=await bi(h);t(),h.id=_.id,h.created=_.created,h.updated=_.updated,x.id?n(h):r(h),p!=u&&(u&&await P0({id:u,"access-":h.id}),p&&await P0({id:p,"access+":h.id})),s()}catch(_){Object.entries(_.response.data).forEach(([E,j])=>{m.setError(E,{type:"manual",message:j.message})});return}},w=async x=>{var C;const p=(C=x.target.files)==null?void 0:C[0];if(!p)return;const h=p;l(h.name);const _=await FF(h);m.setValue("key",_)},g=()=>{var x;console.log(o.current),(x=o.current)==null||x.click()};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Hr,{...m,children:c.jsxs("form",{onSubmit:x=>{x.stopPropagation(),m.handleSubmit(v)(x)},className:"space-y-3",children:[c.jsx(Te,{control:m.control,name:"name",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"group",render:({field:x})=>c.jsxs(Ce,{children:[c.jsxs(Ee,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"授权配置组(用于将一个域名证书部署到多个 ssh 主机)"}),c.jsx(km,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(ju,{size:14}),"新增"]})})]}),c.jsx(je,{children:c.jsxs(Pi,{...x,value:x.value,defaultValue:"emptyId",onValueChange:p=>{m.setValue("group",p)},children:[c.jsx(Hs,{children:c.jsx(Ai,{placeholder:"请选择分组"})}),c.jsxs(Ys,{children:[c.jsx(fn,{value:"emptyId",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(p=>c.jsx(fn,{value:p.id?p.id:"",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"id",render:({field:x})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"configType",render:({field:x})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...x})}),c.jsx(Se,{})]})}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx(Te,{control:m.control,name:"host",render:({field:x})=>c.jsxs(Ce,{className:"grow",children:[c.jsx(Ee,{children:"服务器IP"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入Host",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"port",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SSH端口"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入Port",...x,type:"number"})}),c.jsx(Se,{})]})})]}),c.jsx(Te,{control:m.control,name:"username",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"用户名"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入用户名",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"password",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入密码",...x,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"key",render:({field:x})=>c.jsxs(Ce,{hidden:!0,children:[c.jsx(Ee,{children:"Key(使用证书登录)"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入Key",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"keyFile",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Key(使用证书登录)"}),c.jsx(je,{children:c.jsxs("div",{children:[c.jsx(Je,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:g,children:a||"请选择文件"}),c.jsx(Fe,{placeholder:"请输入Key",...x,ref:o,className:"hidden",hidden:!0,type:"file",onChange:w})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"certPath",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"证书上传路径"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入证书上传路径",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"keyPath",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"私钥上传路径"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入私钥上传路径",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"command",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Command"}),c.jsx(je,{children:c.jsx(ly,{placeholder:"请输入要执行的命令",...x})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},d8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=$r(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,url:me.string().url()});let i={url:""};e&&(i=e.config);const o=Wr({resolver:Br(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"webhook",url:i.url}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{url:l.url}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Hr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"url",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Webhook Url"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入Webhook Url",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},f8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=$r(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,dnsApiToken:me.string().min(1).max(64)});let i={dnsApiToken:""};e&&(i=e.config);const o=Wr({resolver:Br(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"cloudflare",dnsApiToken:i.dnsApiToken}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{dnsApiToken:l.dnsApiToken}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Hr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"dnsApiToken",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"CLOUD_DNS_API_TOKEN"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入CLOUD_DNS_API_TOKEN",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},h8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=$r(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,accessKey:me.string().min(1).max(64),secretKey:me.string().min(1).max(64)});let i={accessKey:"",secretKey:""};e&&(i=e.config);const o=Wr({resolver:Br(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"qiniu",accessKey:i.accessKey,secretKey:i.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{accessKey:l.accessKey,secretKey:l.secretKey}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Hr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"accessKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKey"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入AccessKey",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"secretKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretKey"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入SecretKey",...l})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},p8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=$r(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,apiKey:me.string().min(1).max(64)});let i={apiKey:""};e&&(i=e.config);const o=Wr({resolver:Br(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"namesilo",apiKey:i.apiKey}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{apiKey:l.apiKey}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Hr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"apiKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"NAMESILO_API_KEY"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入NAMESILO_API_KEY",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},m8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=$r(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,apiKey:me.string().min(1).max(64),apiSecret:me.string().min(1).max(64)});let i={apiKey:"",apiSecret:""};e&&(i=e.config);const o=Wr({resolver:Br(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"godaddy",apiKey:i.apiKey,apiSecret:i.apiSecret}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{apiKey:l.apiKey,apiSecret:l.apiSecret}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Hr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"apiKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"GODADDY_API_KEY"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入GODADDY_API_KEY",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"apiSecret",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"GODADDY_API_SECRET"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入GODADDY_API_SECRET",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})};function vl({trigger:e,op:t,data:r,className:n}){const[s,i]=y.useState(!1),o=Array.from(ai.keys()),[a,l]=y.useState((r==null?void 0:r.configType)||"");let u=c.jsx(c.Fragment,{children:" "});switch(a){case"tencent":u=c.jsx(l8,{data:r,onAfterReq:()=>{i(!1)}});break;case"aliyun":u=c.jsx(c8,{data:r,onAfterReq:()=>{i(!1)}});break;case"ssh":u=c.jsx(u8,{data:r,onAfterReq:()=>{i(!1)}});break;case"webhook":u=c.jsx(d8,{data:r,onAfterReq:()=>{i(!1)}});break;case"cloudflare":u=c.jsx(f8,{data:r,onAfterReq:()=>{i(!1)}});break;case"qiniu":u=c.jsx(h8,{data:r,onAfterReq:()=>{i(!1)}});break;case"namesilo":u=c.jsx(p8,{data:r,onAfterReq:()=>{i(!1)}});break;case"godaddy":u=c.jsx(m8,{data:r,onAfterReq:()=>{i(!1)}});break}const f=d=>d==a?"border-primary":"";return c.jsxs(ry,{onOpenChange:i,open:s,children:[c.jsx(ny,{asChild:!0,className:le(n),children:e}),c.jsxs(Hf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Yf,{children:c.jsxs(Zf,{children:[t=="add"?"添加":"编辑","授权"]})}),c.jsx(qf,{className:"max-h-[80vh]",children:c.jsxs("div",{className:"container py-3",children:[c.jsx(ey,{children:"服务商"}),c.jsxs(Pi,{onValueChange:d=>{console.log(d),l(d)},defaultValue:a,children:[c.jsx(Hs,{className:"mt-3",children:c.jsx(Ai,{placeholder:"请选择服务商"})}),c.jsx(Ys,{children:c.jsxs(rl,{children:[c.jsx(Uo,{children:"服务商"}),o.map(d=>{var m,v;return c.jsx(fn,{value:d,children:c.jsxs("div",{className:le("flex items-center space-x-2 rounded cursor-pointer",f(d)),children:[c.jsx("img",{src:(m=ai.get(d))==null?void 0:m[1],className:"h-6 w-6"}),c.jsx("div",{children:(v=ai.get(d))==null?void 0:v[0]})]})},d)})]})})]}),u]})})]})]})}const g8=({className:e,trigger:t})=>{const{config:{emails:r},setEmails:n}=$r(),[s,i]=y.useState(!1),o=me.object({email:me.string().email()}),a=Wr({resolver:Br(o),defaultValues:{email:""}}),l=async u=>{if(r.content.emails.includes(u.email)){a.setError("email",{message:"邮箱已存在"});return}const f=[...r.content.emails,u.email];try{const d=await m5({...r,name:"emails",content:{emails:f}});n(d),a.reset(),a.clearErrors(),i(!1)}catch(d){Object.entries(d.response.data).forEach(([v,w])=>{a.setError(v,{type:"manual",message:w.message})})}};return c.jsxs(ry,{onOpenChange:i,open:s,children:[c.jsx(ny,{asChild:!0,className:le(e),children:t}),c.jsxs(Hf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Yf,{children:c.jsx(Zf,{children:"添加邮箱"})}),c.jsx("div",{className:"container py-3",children:c.jsx(Hr,{...a,children:c.jsxs("form",{onSubmit:u=>{console.log(u),u.stopPropagation(),a.handleSubmit(l)(u)},className:"space-y-8",children:[c.jsx(Te,{control:a.control,name:"email",render:({field:u})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"邮箱"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入邮箱",...u,type:"email"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})]})]})},v8=()=>{const{config:{accesses:e,emails:t,accessGroups:r}}=$r(),[n,s]=y.useState(),i=Yn(),[o,a]=y.useState("base"),[l,u]=y.useState(n?n.targetType:"");y.useEffect(()=>{const p=new URLSearchParams(i.search).get("id");p&&(async()=>{const _=await WF(p);s(_),u(_.targetType)})()},[i.search]);const f=me.object({id:me.string().optional(),domain:me.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),email:me.string().email().optional(),access:me.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:me.string().optional(),targetType:me.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"}),variables:me.string().optional(),group:me.string().optional()}),d=Wr({resolver:Br(f),defaultValues:{id:"",domain:"",email:"",access:"",targetAccess:"",targetType:"",variables:"",group:""}});y.useEffect(()=>{n&&d.reset({id:n.id,domain:n.domain,email:n.email,access:n.access,targetAccess:n.targetAccess,targetType:n.targetType,variables:n.variables,group:n.group})},[n,d]);const m=e.filter(x=>{if(x.usage=="apply")return!1;if(l=="")return!0;const p=l.split("-");return x.configType===p[0]}),{toast:v}=Cc(),w=rn(),g=async x=>{const p=x.group=="emptyId"?"":x.group,h=x.targetAccess==="emptyId"?"":x.targetAccess;if(p==""&&h==""){d.setError("group",{type:"manual",message:"部署授权和部署授权组至少选一个"}),d.setError("targetAccess",{type:"manual",message:"部署授权和部署授权组至少选一个"});return}const _={id:x.id,crontab:"0 0 * * *",domain:x.domain,email:x.email,access:x.access,group:p,targetAccess:h,targetType:x.targetType,variables:x.variables};try{await fm(_);let C="域名编辑成功";_.id==""&&(C="域名添加成功"),v({title:"成功",description:C}),w("/domains")}catch(C){Object.entries(C.response.data).forEach(([j,R])=>{d.setError(j,{type:"manual",message:R.message})});return}};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(Df,{}),c.jsxs("div",{className:" h-5 text-muted-foreground",children:[n!=null&&n.id?"编辑":"新增","域名"]}),c.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[c.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex",children:[c.jsx("div",{className:le("cursor-pointer text-right",o==="base"?"text-primary":""),onClick:()=>{a("base")},children:"基础设置"}),c.jsx("div",{className:le("cursor-pointer text-right",o==="advance"?"text-primary":""),onClick:()=>{a("advance")},children:"高级设置"})]}),c.jsx("div",{className:"w-full md:w-[35em] bg-gray-100 dark:bg-gray-900 p-5 rounded mt-3 md:mt-0",children:c.jsx(Hr,{...d,children:c.jsxs("form",{onSubmit:d.handleSubmit(g),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:d.control,name:"domain",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsx(Ee,{children:"域名"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入域名",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"email",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"Email(申请证书需要提供邮箱)"}),c.jsx(g8,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(ju,{size:14}),"新增"]})})]}),c.jsx(je,{children:c.jsxs(Pi,{...x,value:x.value,onValueChange:p=>{d.setValue("email",p)},children:[c.jsx(Hs,{children:c.jsx(Ai,{placeholder:"请选择邮箱"})}),c.jsx(Ys,{children:c.jsxs(rl,{children:[c.jsx(Uo,{children:"邮箱列表"}),t.content.emails.map(p=>c.jsx(fn,{value:p,children:c.jsx("div",{children:p})},p))]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"access",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"DNS 服务商授权配置"}),c.jsx(vl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(ju,{size:14}),"新增"]}),op:"add"})]}),c.jsx(je,{children:c.jsxs(Pi,{...x,value:x.value,onValueChange:p=>{d.setValue("access",p)},children:[c.jsx(Hs,{children:c.jsx(Ai,{placeholder:"请选择授权配置"})}),c.jsx(Ys,{children:c.jsxs(rl,{children:[c.jsx(Uo,{children:"服务商授权配置"}),e.filter(p=>p.usage!="deploy").map(p=>{var h;return c.jsx(fn,{value:p.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(h=ai.get(p.configType))==null?void 0:h[1]}),c.jsx("div",{children:p.name})]})},p.id)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"targetType",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsx(Ee,{children:"部署服务类型"}),c.jsx(je,{children:c.jsxs(Pi,{...x,onValueChange:p=>{u(p),d.setValue("targetType",p)},children:[c.jsx(Hs,{children:c.jsx(Ai,{placeholder:"请选择部署服务类型"})}),c.jsx(Ys,{children:c.jsxs(rl,{children:[c.jsx(Uo,{children:"部署服务类型"}),Yz.map(p=>{var h,_;return c.jsx(fn,{value:p,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(h=Sm.get(p))==null?void 0:h[1]}),c.jsx("div",{children:(_=Sm.get(p))==null?void 0:_[0]})]})},p)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"targetAccess",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"部署服务商授权配置"}),c.jsx(vl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(ju,{size:14}),"新增"]}),op:"add"})]}),c.jsx(je,{children:c.jsxs(Pi,{...x,onValueChange:p=>{d.setValue("targetAccess",p)},children:[c.jsx(Hs,{children:c.jsx(Ai,{placeholder:"请选择授权配置"})}),c.jsx(Ys,{children:c.jsxs(rl,{children:[c.jsxs(Uo,{children:["服务商授权配置",d.getValues().targetAccess]}),c.jsx(fn,{value:"emptyId",children:c.jsx("div",{className:"flex items-center space-x-2",children:"--"})}),m.map(p=>{var h;return c.jsx(fn,{value:p.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(h=ai.get(p.configType))==null?void 0:h[1]}),c.jsx("div",{children:p.name})]})},p.id)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"group",render:({field:x})=>c.jsxs(Ce,{hidden:o!="advance"||l!="ssh",children:[c.jsx(Ee,{className:"w-full flex justify-between",children:c.jsx("div",{children:"部署配置组(用于将一个域名证书部署到多个 ssh 主机)"})}),c.jsx(je,{children:c.jsxs(Pi,{...x,value:x.value,defaultValue:"emptyId",onValueChange:p=>{d.setValue("group",p)},children:[c.jsx(Hs,{children:c.jsx(Ai,{placeholder:"请选择分组"})}),c.jsxs(Ys,{children:[c.jsx(fn,{value:"emptyId",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),r.filter(p=>{var h;return p.expand&&((h=p.expand)==null?void 0:h.access.length)>0}).map(p=>c.jsx(fn,{value:p.id?p.id:"",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"variables",render:({field:x})=>c.jsxs(Ce,{hidden:o!="advance",children:[c.jsx(Ee,{children:"变量"}),c.jsx(je,{children:c.jsx(ly,{placeholder:`可在SSH部署中使用,形如: +*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,s,i){function o(u,f){if(!s[u]){if(!n[u]){var d=typeof hu=="function"&&hu;if(!f&&d)return d(u,!0);if(a)return a(u,!0);var m=new Error("Cannot find module '"+u+"'");throw m.code="MODULE_NOT_FOUND",m}var v=s[u]={exports:{}};n[u][0].call(v.exports,function(w){var g=n[u][1][w];return o(g||w)},v,v.exports,r,n,s,i)}return s[u].exports}for(var a=typeof hu=="function"&&hu,l=0;l>2,v=(3&u)<<4|f>>4,w=1<_?(15&f)<<2|d>>6:64,g=2<_?63&d:64,x.push(a.charAt(m)+a.charAt(v)+a.charAt(w)+a.charAt(g));return x.join("")},s.decode=function(l){var u,f,d,m,v,w,g=0,x=0,p="data:";if(l.substr(0,p.length)===p)throw new Error("Invalid base64 input, it looks like a data url.");var h,_=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&_--,l.charAt(l.length-2)===a.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=o.uint8array?new Uint8Array(0|_):new Array(0|_);g>4,f=(15&m)<<4|(v=a.indexOf(l.charAt(g++)))>>2,d=(3&v)<<6|(w=a.indexOf(l.charAt(g++))),h[x++]=u,v!==64&&(h[x++]=f),w!==64&&(h[x++]=d);return h}},{"./support":30,"./utils":32}],2:[function(r,n,s){var i=r("./external"),o=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function u(f,d,m,v,w){this.compressedSize=f,this.uncompressedSize=d,this.crc32=m,this.compression=v,this.compressedContent=w}u.prototype={getContentWorker:function(){var f=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return f.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(f,d,m){return f.pipe(new a).pipe(new l("uncompressedSize")).pipe(d.compressWorker(m)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var i=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var i=r("./utils"),o=function(){for(var a,l=[],u=0;u<256;u++){a=u;for(var f=0;f<8;f++)a=1&a?3988292384^a>>>1:a>>>1;l[u]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?function(u,f,d,m){var v=o,w=m+d;u^=-1;for(var g=m;g>>8^v[255&(u^f[g])];return-1^u}(0|l,a,a.length,0):function(u,f,d,m){var v=o,w=m+d;u^=-1;for(var g=m;g>>8^v[255&(u^f.charCodeAt(g))];return-1^u}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(r,n,s){var i=null;i=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:i}},{lie:37}],7:[function(r,n,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),u=i?"uint8array":"array";function f(d,m){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=m,this.meta={}}s.magic="\b\0",a.inherits(f,l),f.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,d.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(m){d.push({data:m,meta:d.meta})}},s.compressWorker=function(d){return new f("Deflate",d)},s.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,s){function i(v,w){var g,x="";for(g=0;g>>=8;return x}function o(v,w,g,x,p,h){var _,C,E=v.file,j=v.compression,R=h!==u.utf8encode,A=a.transformTo("string",h(E.name)),P=a.transformTo("string",u.utf8encode(E.name)),L=E.comment,q=a.transformTo("string",h(L)),T=a.transformTo("string",u.utf8encode(L)),F=P.length!==E.name.length,b=T.length!==L.length,$="",te="",B="",Z=E.dir,I=E.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};w&&!g||(Q.crc32=v.crc32,Q.compressedSize=v.compressedSize,Q.uncompressedSize=v.uncompressedSize);var z=0;w&&(z|=8),R||!F&&!b||(z|=2048);var V=0,fe=0;Z&&(V|=16),p==="UNIX"?(fe=798,V|=function(se,Ae){var he=se;return se||(he=Ae?16893:33204),(65535&he)<<16}(E.unixPermissions,Z)):(fe=20,V|=function(se){return 63&(se||0)}(E.dosPermissions)),_=I.getUTCHours(),_<<=6,_|=I.getUTCMinutes(),_<<=5,_|=I.getUTCSeconds()/2,C=I.getUTCFullYear()-1980,C<<=4,C|=I.getUTCMonth()+1,C<<=5,C|=I.getUTCDate(),F&&(te=i(1,1)+i(f(A),4)+P,$+="up"+i(te.length,2)+te),b&&(B=i(1,1)+i(f(q),4)+T,$+="uc"+i(B.length,2)+B);var ne="";return ne+=` +\0`,ne+=i(z,2),ne+=j.magic,ne+=i(_,2),ne+=i(C,2),ne+=i(Q.crc32,4),ne+=i(Q.compressedSize,4),ne+=i(Q.uncompressedSize,4),ne+=i(A.length,2),ne+=i($.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ne+A+$,dirRecord:d.CENTRAL_FILE_HEADER+i(fe,2)+ne+i(q.length,2)+"\0\0\0\0"+i(V,4)+i(x,4)+A+$+q}}var a=r("../utils"),l=r("../stream/GenericWorker"),u=r("../utf8"),f=r("../crc32"),d=r("../signature");function m(v,w,g,x){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=g,this.encodeFileName=x,this.streamFiles=v,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(v){var w=v.meta.percent||0,g=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(v):(this.bytesWritten+=v.data.length,l.prototype.push.call(this,{data:v.data,meta:{currentFile:this.currentFile,percent:g?(w+100*(g-x-1))/g:100}}))},m.prototype.openedSource=function(v){this.currentSourceOffset=this.bytesWritten,this.currentFile=v.file.name;var w=this.streamFiles&&!v.file.dir;if(w){var g=o(v,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(v){this.accumulate=!1;var w=this.streamFiles&&!v.file.dir,g=o(v,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),w)this.push({data:function(x){return d.DATA_DESCRIPTOR+i(x.crc32,4)+i(x.compressedSize,4)+i(x.uncompressedSize,4)}(v),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var v=this.bytesWritten,w=0;w=this.index;l--)u=(u<<8)+this.byteAt(l);return this.index+=a,u},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=o},{"../utils":32}],19:[function(r,n,s){var i=r("./Uint8ArrayReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var i=r("./DataReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var i=r("./ArrayReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var i=r("../utils"),o=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),u=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");n.exports=function(d){var m=i.getTypeOf(d);return i.checkSupport(m),m!=="string"||o.uint8array?m==="nodebuffer"?new u(d):o.uint8array?new f(i.transformTo("uint8array",d)):new a(i.transformTo("array",d)):new l(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var i=r("./GenericWorker"),o=r("../utils");function a(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,i),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var i=r("./GenericWorker"),o=r("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,i),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var i=r("../utils"),o=r("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(a,o),a.prototype.processChunk=function(l){if(l){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+l.data.length}o.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var i=r("../utils"),o=r("./GenericWorker");function a(l){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){u.dataIsReady=!0,u.data=f,u.max=f&&f.length||0,u.type=i.getTypeOf(f),u.isPaused||u._tickAndRepeat()},function(f){u.error(f)})}i.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,u);break;case"uint8array":l=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":l=this.data.slice(this.index,u)}return this.index=u,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l "+o:o}},n.exports=i},{}],29:[function(r,n,s){var i=r("../utils"),o=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),u=r("../support"),f=r("../external"),d=null;if(u.nodestream)try{d=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(w,g){return new f.Promise(function(x,p){var h=[],_=w._internalType,C=w._outputType,E=w._mimeType;w.on("data",function(j,R){h.push(j),g&&g(R)}).on("error",function(j){h=[],p(j)}).on("end",function(){try{var j=function(R,A,P){switch(R){case"blob":return i.newBlob(i.transformTo("arraybuffer",A),P);case"base64":return l.encode(A);default:return i.transformTo(R,A)}}(C,function(R,A){var P,L=0,q=null,T=0;for(P=0;P"u")s.blob=!1;else{var i=new ArrayBuffer(0);try{s.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),s.blob=o.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!r("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,s){for(var i=r("./utils"),o=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),u=new Array(256),f=0;f<256;f++)u[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;u[254]=u[254]=1;function d(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}s.utf8encode=function(v){return o.nodebuffer?a.newBufferFrom(v,"utf-8"):function(w){var g,x,p,h,_,C=w.length,E=0;for(h=0;h>>6:(x<65536?g[_++]=224|x>>>12:(g[_++]=240|x>>>18,g[_++]=128|x>>>12&63),g[_++]=128|x>>>6&63),g[_++]=128|63&x);return g}(v)},s.utf8decode=function(v){return o.nodebuffer?i.transformTo("nodebuffer",v).toString("utf-8"):function(w){var g,x,p,h,_=w.length,C=new Array(2*_);for(g=x=0;g<_;)if((p=w[g++])<128)C[x++]=p;else if(4<(h=u[p]))C[x++]=65533,g+=h-1;else{for(p&=h===2?31:h===3?15:7;1>10&1023,C[x++]=56320|1023&p)}return C.length!==x&&(C.subarray?C=C.subarray(0,x):C.length=x),i.applyFromCharCode(C)}(v=i.transformTo(o.uint8array?"uint8array":"array",v))},i.inherits(d,l),d.prototype.processChunk=function(v){var w=i.transformTo(o.uint8array?"uint8array":"array",v.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=w;(w=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),w.set(g,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var x=function(h,_){var C;for((_=_||h.length)>h.length&&(_=h.length),C=_-1;0<=C&&(192&h[C])==128;)C--;return C<0||C===0?_:C+u[h[C]]>_?C:_}(w),p=w;x!==w.length&&(o.uint8array?(p=w.subarray(0,x),this.leftOver=w.subarray(x,w.length)):(p=w.slice(0,x),this.leftOver=w.slice(x,w.length))),this.push({data:s.utf8decode(p),meta:v.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,i.inherits(m,l),m.prototype.processChunk=function(v){this.push({data:s.utf8encode(v.data),meta:v.meta})},s.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var i=r("./support"),o=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function u(g){return g}function f(g,x){for(var p=0;p>8;this.dir=!!(16&this.externalFileAttributes),v==0&&(this.dosPermissions=63&this.externalFileAttributes),v==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var v=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=v.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=v.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=v.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=v.readInt(4))}},readExtraFields:function(v){var w,g,x,p=v.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});v.index+4>>6:(v<65536?m[x++]=224|v>>>12:(m[x++]=240|v>>>18,m[x++]=128|v>>>12&63),m[x++]=128|v>>>6&63),m[x++]=128|63&v);return m},s.buf2binstring=function(d){return f(d,d.length)},s.binstring2buf=function(d){for(var m=new i.Buf8(d.length),v=0,w=m.length;v>10&1023,h[w++]=56320|1023&g)}return f(h,w)},s.utf8border=function(d,m){var v;for((m=m||d.length)>d.length&&(m=d.length),v=m-1;0<=v&&(192&d[v])==128;)v--;return v<0||v===0?m:v+l[d[v]]>m?v:m}},{"./common":41}],43:[function(r,n,s){n.exports=function(i,o,a,l){for(var u=65535&i|0,f=i>>>16&65535|0,d=0;a!==0;){for(a-=d=2e3>>1:o>>>1;a[l]=o}return a}();n.exports=function(o,a,l,u){var f=i,d=u+l;o^=-1;for(var m=u;m>>8^f[255&(o^a[m])];return-1^o}},{}],46:[function(r,n,s){var i,o=r("../utils/common"),a=r("./trees"),l=r("./adler32"),u=r("./crc32"),f=r("./messages"),d=0,m=4,v=0,w=-2,g=-1,x=4,p=2,h=8,_=9,C=286,E=30,j=19,R=2*C+1,A=15,P=3,L=258,q=L+P+1,T=42,F=113,b=1,$=2,te=3,B=4;function Z(k,J){return k.msg=f[J],J}function I(k){return(k<<1)-(4k.avail_out&&(K=k.avail_out),K!==0&&(o.arraySet(k.output,J.pending_buf,J.pending_out,K,k.next_out),k.next_out+=K,J.pending_out+=K,k.total_out+=K,k.avail_out-=K,J.pending-=K,J.pending===0&&(J.pending_out=0))}function V(k,J){a._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,J),k.block_start=k.strstart,z(k.strm)}function fe(k,J){k.pending_buf[k.pending++]=J}function ne(k,J){k.pending_buf[k.pending++]=J>>>8&255,k.pending_buf[k.pending++]=255&J}function se(k,J){var K,D,S=k.max_chain_length,N=k.strstart,O=k.prev_length,Y=k.nice_match,M=k.strstart>k.w_size-q?k.strstart-(k.w_size-q):0,H=k.window,X=k.w_mask,ee=k.prev,pe=k.strstart+L,We=H[N+O-1],Ue=H[N+O];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(K=J)+O]===Ue&&H[K+O-1]===We&&H[K]===H[N]&&H[++K]===H[N+1]){N+=2,K++;do;while(H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&NM&&--S!=0);return O<=k.lookahead?O:k.lookahead}function Ae(k){var J,K,D,S,N,O,Y,M,H,X,ee=k.w_size;do{if(S=k.window_size-k.lookahead-k.strstart,k.strstart>=ee+(ee-q)){for(o.arraySet(k.window,k.window,ee,ee,0),k.match_start-=ee,k.strstart-=ee,k.block_start-=ee,J=K=k.hash_size;D=k.head[--J],k.head[J]=ee<=D?D-ee:0,--K;);for(J=K=ee;D=k.prev[--J],k.prev[J]=ee<=D?D-ee:0,--K;);S+=ee}if(k.strm.avail_in===0)break;if(O=k.strm,Y=k.window,M=k.strstart+k.lookahead,H=S,X=void 0,X=O.avail_in,H=P)for(N=k.strstart-k.insert,k.ins_h=k.window[N],k.ins_h=(k.ins_h<=P&&(k.ins_h=(k.ins_h<=P)if(D=a._tr_tally(k,k.strstart-k.match_start,k.match_length-P),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=P){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<=P&&(k.ins_h=(k.ins_h<=P&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-P,D=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-P),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=S&&(k.ins_h=(k.ins_h<k.pending_buf_size-5&&(K=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Ae(k),k.lookahead===0&&J===d)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var D=k.block_start+K;if((k.strstart===0||k.strstart>=D)&&(k.lookahead=k.strstart-D,k.strstart=D,V(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-q&&(V(k,!1),k.strm.avail_out===0))return b}return k.insert=0,J===m?(V(k,!0),k.strm.avail_out===0?te:B):(k.strstart>k.block_start&&(V(k,!1),k.strm.avail_out),b)}),new ke(4,4,8,4,he),new ke(4,5,16,8,he),new ke(4,6,32,32,he),new ke(4,4,16,16,ye),new ke(8,16,32,32,ye),new ke(8,16,128,128,ye),new ke(8,32,128,256,ye),new ke(32,128,258,1024,ye),new ke(32,258,258,4096,ye)],s.deflateInit=function(k,J){return nt(k,J,h,15,8,0)},s.deflateInit2=nt,s.deflateReset=Ne,s.deflateResetKeep=De,s.deflateSetHeader=function(k,J){return k&&k.state?k.state.wrap!==2?w:(k.state.gzhead=J,v):w},s.deflate=function(k,J){var K,D,S,N;if(!k||!k.state||5>8&255),fe(D,D.gzhead.time>>16&255),fe(D,D.gzhead.time>>24&255),fe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),fe(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(fe(D,255&D.gzhead.extra.length),fe(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(k.adler=u(k.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(fe(D,0),fe(D,0),fe(D,0),fe(D,0),fe(D,0),fe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),fe(D,3),D.status=F);else{var O=h+(D.w_bits-8<<4)<<8;O|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(O|=32),O+=31-O%31,D.status=F,ne(D,O),D.strstart!==0&&(ne(D,k.adler>>>16),ne(D,65535&k.adler)),k.adler=1}if(D.status===69)if(D.gzhead.extra){for(S=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending!==D.pending_buf_size));)fe(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&z(k),D.pending+2<=D.pending_buf_size&&(fe(D,255&k.adler),fe(D,k.adler>>8&255),k.adler=0,D.status=F)):D.status=F),D.pending!==0){if(z(k),k.avail_out===0)return D.last_flush=-1,v}else if(k.avail_in===0&&I(J)<=I(K)&&J!==m)return Z(k,-5);if(D.status===666&&k.avail_in!==0)return Z(k,-5);if(k.avail_in!==0||D.lookahead!==0||J!==d&&D.status!==666){var Y=D.strategy===2?function(M,H){for(var X;;){if(M.lookahead===0&&(Ae(M),M.lookahead===0)){if(H===d)return b;break}if(M.match_length=0,X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,X&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?(V(M,!0),M.strm.avail_out===0?te:B):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:$}(D,J):D.strategy===3?function(M,H){for(var X,ee,pe,We,Ue=M.window;;){if(M.lookahead<=L){if(Ae(M),M.lookahead<=L&&H===d)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=P&&0M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=P?(X=a._tr_tally(M,1,M.match_length-P),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),X&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?(V(M,!0),M.strm.avail_out===0?te:B):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:$}(D,J):i[D.level].func(D,J);if(Y!==te&&Y!==B||(D.status=666),Y===b||Y===te)return k.avail_out===0&&(D.last_flush=-1),v;if(Y===$&&(J===1?a._tr_align(D):J!==5&&(a._tr_stored_block(D,0,0,!1),J===3&&(Q(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),z(k),k.avail_out===0))return D.last_flush=-1,v}return J!==m?v:D.wrap<=0?1:(D.wrap===2?(fe(D,255&k.adler),fe(D,k.adler>>8&255),fe(D,k.adler>>16&255),fe(D,k.adler>>24&255),fe(D,255&k.total_in),fe(D,k.total_in>>8&255),fe(D,k.total_in>>16&255),fe(D,k.total_in>>24&255)):(ne(D,k.adler>>>16),ne(D,65535&k.adler)),z(k),0=K.w_size&&(N===0&&(Q(K.head),K.strstart=0,K.block_start=0,K.insert=0),H=new o.Buf8(K.w_size),o.arraySet(H,J,X-K.w_size,K.w_size,0),J=H,X=K.w_size),O=k.avail_in,Y=k.next_in,M=k.input,k.avail_in=X,k.next_in=0,k.input=J,Ae(K);K.lookahead>=P;){for(D=K.strstart,S=K.lookahead-(P-1);K.ins_h=(K.ins_h<>>=P=A>>>24,_-=P,(P=A>>>16&255)===0)$[f++]=65535&A;else{if(!(16&P)){if(!(64&P)){A=C[(65535&A)+(h&(1<>>=P,_-=P),_<15&&(h+=b[l++]<<_,_+=8,h+=b[l++]<<_,_+=8),A=E[h&R];r:for(;;){if(h>>>=P=A>>>24,_-=P,!(16&(P=A>>>16&255))){if(!(64&P)){A=E[(65535&A)+(h&(1<>>=P,_-=P,(P=f-d)>3,h&=(1<<(_-=L<<3))-1,i.next_in=l,i.next_out=f,i.avail_in=l>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(T){var F;return T&&T.state?(F=T.state,T.total_in=T.total_out=F.total=0,T.msg="",F.wrap&&(T.adler=1&F.wrap),F.mode=w,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(g),F.distcode=F.distdyn=new i.Buf32(x),F.sane=1,F.back=-1,m):v}function C(T){var F;return T&&T.state?((F=T.state).wsize=0,F.whave=0,F.wnext=0,_(T)):v}function E(T,F){var b,$;return T&&T.state?($=T.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15=B.wsize?(i.arraySet(B.window,F,b-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):($<(te=B.wsize-B.wnext)&&(te=$),i.arraySet(B.window,F,b-$,te,B.wnext),($-=te)?(i.arraySet(B.window,F,b-$,$,0),B.wnext=$,B.whave=B.wsize):(B.wnext+=te,B.wnext===B.wsize&&(B.wnext=0),B.whave>>8&255,b.check=a(b.check,N,2,0),V=z=0,b.mode=2;break}if(b.flags=0,b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&z)<<8)+(z>>8))%31){T.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){T.msg="unknown compression method",b.mode=30;break}if(V-=4,k=8+(15&(z>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){T.msg="invalid window size",b.mode=30;break}b.dmax=1<>8&1),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=z=0,b.mode=3;case 3:for(;V<32;){if(I===0)break e;I--,z+=$[B++]<>>8&255,N[2]=z>>>16&255,N[3]=z>>>24&255,b.check=a(b.check,N,4,0)),V=z=0,b.mode=4;case 4:for(;V<16;){if(I===0)break e;I--,z+=$[B++]<>8),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=z=0,b.mode=5;case 5:if(1024&b.flags){for(;V<16;){if(I===0)break e;I--,z+=$[B++]<>>8&255,b.check=a(b.check,N,2,0)),V=z=0}else b.head&&(b.head.extra=null);b.mode=6;case 6:if(1024&b.flags&&(I<(se=b.length)&&(se=I),se&&(b.head&&(k=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),i.arraySet(b.head.extra,$,B,se,k)),512&b.flags&&(b.check=a(b.check,$,se,B)),I-=se,B+=se,b.length-=se),b.length))break e;b.length=0,b.mode=7;case 7:if(2048&b.flags){if(I===0)break e;for(se=0;k=$[B+se++],b.head&&k&&b.length<65536&&(b.head.name+=String.fromCharCode(k)),k&&se>9&1,b.head.done=!0),T.adler=b.check=0,b.mode=12;break;case 10:for(;V<32;){if(I===0)break e;I--,z+=$[B++]<>>=7&V,V-=7&V,b.mode=27;break}for(;V<3;){if(I===0)break e;I--,z+=$[B++]<>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;z>>>=2,V-=2;break e;case 2:b.mode=17;break;case 3:T.msg="invalid block type",b.mode=30}z>>>=2,V-=2;break;case 14:for(z>>>=7&V,V-=7&V;V<32;){if(I===0)break e;I--,z+=$[B++]<>>16^65535)){T.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&z,V=z=0,b.mode=15,F===6)break e;case 15:b.mode=16;case 16:if(se=b.length){if(I>>=5,V-=5,b.ndist=1+(31&z),z>>>=5,V-=5,b.ncode=4+(15&z),z>>>=4,V-=4,286>>=3,V-=3}for(;b.have<19;)b.lens[O[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,K={bits:b.lenbits},J=u(0,b.lens,0,19,b.lencode,0,b.work,K),b.lenbits=K.bits,J){T.msg="invalid code lengths set",b.mode=30;break}b.have=0,b.mode=19;case 19:for(;b.have>>16&255,Le=65535&S,!((ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<>>=ye,V-=ye,b.lens[b.have++]=Le;else{if(Le===16){for(D=ye+2;V>>=ye,V-=ye,b.have===0){T.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&z),z>>>=2,V-=2}else if(Le===17){for(D=ye+3;V>>=ye)),z>>>=3,V-=3}else{for(D=ye+7;V>>=ye)),z>>>=7,V-=7}if(b.have+se>b.nlen+b.ndist){T.msg="invalid bit length repeat",b.mode=30;break}for(;se--;)b.lens[b.have++]=k}}if(b.mode===30)break;if(b.lens[256]===0){T.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,K={bits:b.lenbits},J=u(f,b.lens,0,b.nlen,b.lencode,0,b.work,K),b.lenbits=K.bits,J){T.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,K={bits:b.distbits},J=u(d,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,K),b.distbits=K.bits,J){T.msg="invalid distances set",b.mode=30;break}if(b.mode=20,F===6)break e;case 20:b.mode=21;case 21:if(6<=I&&258<=Q){T.next_out=Z,T.avail_out=Q,T.next_in=B,T.avail_in=I,b.hold=z,b.bits=V,l(T,ne),Z=T.next_out,te=T.output,Q=T.avail_out,B=T.next_in,$=T.input,I=T.avail_in,z=b.hold,V=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;ke=(S=b.lencode[z&(1<>>16&255,Le=65535&S,!((ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<>De)])>>>16&255,Le=65535&S,!(De+(ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<>>=De,V-=De,b.back+=De}if(z>>>=ye,V-=ye,b.back+=ye,b.length=Le,ke===0){b.mode=26;break}if(32&ke){b.back=-1,b.mode=12;break}if(64&ke){T.msg="invalid literal/length code",b.mode=30;break}b.extra=15&ke,b.mode=22;case 22:if(b.extra){for(D=b.extra;V>>=b.extra,V-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;ke=(S=b.distcode[z&(1<>>16&255,Le=65535&S,!((ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<>De)])>>>16&255,Le=65535&S,!(De+(ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<>>=De,V-=De,b.back+=De}if(z>>>=ye,V-=ye,b.back+=ye,64&ke){T.msg="invalid distance code",b.mode=30;break}b.offset=Le,b.extra=15&ke,b.mode=24;case 24:if(b.extra){for(D=b.extra;V>>=b.extra,V-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){T.msg="invalid distance too far back",b.mode=30;break}b.mode=25;case 25:if(Q===0)break e;if(se=ne-Q,b.offset>se){if((se=b.offset-se)>b.whave&&b.sane){T.msg="invalid distance too far back",b.mode=30;break}Ae=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),he=b.window}else he=te,Ae=Z-b.offset,se=b.length;for(QR?(P=Ae[he+x[F]],V[fe+x[F]]):(P=96,0),h=1<>Z)+(_-=h)]=A<<24|P<<16|L|0,_!==0;);for(h=1<>=1;if(h!==0?(z&=h-1,z+=h):z=0,F++,--ne[T]==0){if(T===$)break;T=d[m+x[F]]}if(te>>7)]}function fe(S,N){S.pending_buf[S.pending++]=255&N,S.pending_buf[S.pending++]=N>>>8&255}function ne(S,N,O){S.bi_valid>p-O?(S.bi_buf|=N<>p-S.bi_valid,S.bi_valid+=O-p):(S.bi_buf|=N<>>=1,O<<=1,0<--N;);return O>>>1}function he(S,N,O){var Y,M,H=new Array(x+1),X=0;for(Y=1;Y<=x;Y++)H[Y]=X=X+O[Y-1]<<1;for(M=0;M<=N;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=Ae(H[ee]++,ee))}}function ye(S){var N;for(N=0;N>1;1<=O;O--)De(S,H,O);for(M=pe;O=S.heap[1],S.heap[1]=S.heap[S.heap_len--],De(S,H,1),Y=S.heap[1],S.heap[--S.heap_max]=O,S.heap[--S.heap_max]=Y,H[2*M]=H[2*O]+H[2*Y],S.depth[M]=(S.depth[O]>=S.depth[Y]?S.depth[O]:S.depth[Y])+1,H[2*O+1]=H[2*Y+1]=M,S.heap[1]=M++,De(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(Ue,Et){var Zr,Wt,qn,ot,Xn,Qn,Kr=Et.dyn_tree,Rc=Et.max_code,Pc=Et.stat_desc.static_tree,co=Et.stat_desc.has_stree,Ac=Et.stat_desc.extra_bits,uo=Et.stat_desc.extra_base,Nn=Et.stat_desc.max_length,Os=0;for(ot=0;ot<=x;ot++)Ue.bl_count[ot]=0;for(Kr[2*Ue.heap[Ue.heap_max]+1]=0,Zr=Ue.heap_max+1;Zr>=7;M>>=1)if(1&We&&ee.dyn_ltree[2*pe]!==0)return o;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return a;for(pe=32;pe>>3,(H=S.static_len+3+7>>>3)<=M&&(M=H)):M=H=O+5,O+4<=M&&N!==-1?D(S,N,O,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),Ne(S,q,T)):(ne(S,4+(Y?1:0),3),function(ee,pe,We,Ue){var Et;for(ne(ee,pe-257,5),ne(ee,We-1,5),ne(ee,Ue-4,4),Et=0;Et>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&N,S.pending_buf[S.l_buf+S.last_lit]=255&O,S.last_lit++,N===0?S.dyn_ltree[2*O]++:(S.matches++,N--,S.dyn_ltree[2*(b[O]+d+1)]++,S.dyn_dtree[2*V(N)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,_,q),function(N){N.bi_valid===16?(fe(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(S)}},{"../utils/common":41}],53:[function(r,n,s){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,s){(function(i){(function(o,a){if(!o.setImmediate){var l,u,f,d,m=1,v={},w=!1,g=o.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(o);x=x&&x.setTimeout?x:o,l={}.toString.call(o.process)==="[object process]"?function(C){process.nextTick(function(){h(C)})}:function(){if(o.postMessage&&!o.importScripts){var C=!0,E=o.onmessage;return o.onmessage=function(){C=!1},o.postMessage("","*"),o.onmessage=E,C}}()?(d="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",_,!1):o.attachEvent("onmessage",_),function(C){o.postMessage(d+C,"*")}):o.MessageChannel?((f=new MessageChannel).port1.onmessage=function(C){h(C.data)},function(C){f.port2.postMessage(C)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(C){var E=g.createElement("script");E.onreadystatechange=function(){h(C),E.onreadystatechange=null,u.removeChild(E),E=null},u.appendChild(E)}):function(C){setTimeout(h,0,C)},x.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var E=new Array(arguments.length-1),j=0;j"u"?i===void 0?this:i:self)}).call(this,typeof Lc<"u"?Lc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(XC);var e6=XC.exports;const t6=Cm(e6);function r6(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{n.result?t(n.result.toString()):r("No content found")},n.onerror=()=>r(n.error),n.readAsText(e)})}const n6=async(e,t)=>{const r=new t6;t.forEach(i=>{r.file(i.name,i.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},da=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)},s6=e=>da(e).split(" ")[0];function QC(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const r=t.getUTCFullYear(),n=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),i=String(t.getUTCHours()).padStart(2,"0"),o=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${r}-${n}-${s} ${i}:${o}:${a}`}const i6=async e=>{let t=1;e.page&&(t=e.page);let r=2;e.perPage&&(r=e.perPage);const n=ft();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=n.filter("expiredAt<{:expiredAt}",{expiredAt:QC(15)})),n.collection("domains").getList(t,r,{sort:"-created",expand:"lastDeployment",filter:s})},o6=async()=>{const e=ft(),t=await e.collection("domains").getList(1,1,{}),r=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:QC(15)})}),n=await e.collection("domains").getList(1,1,{filter:"enabled=true"}),s=await e.collection("domains").getList(1,1,{filter:"enabled=false"});return{total:t.totalItems,expired:r.totalItems,enabled:n.totalItems,disabled:s.totalItems}},a6=async e=>await ft().collection("domains").getOne(e),dm=async e=>e.id?await ft().collection("domains").update(e.id,e):await ft().collection("domains").create(e),l6=async e=>await ft().collection("domains").delete(e),c6=(e,t)=>ft().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),u6=e=>{ft().collection("domains").unsubscribe(e)},d6=()=>{const e=Ec(),t=nn(),r=Yn(),n=new URLSearchParams(r.search),s=n.get("page"),i=n.get("state"),[o,a]=y.useState(0),l=()=>{t("/edit")},u=h=>{n.set("page",h.toString()),t(`?${n.toString()}`)},f=h=>{t(`/edit?id=${h}`)},d=h=>{t(`/history?domain=${h}`)},m=async h=>{try{await l6(h),w(v.filter(_=>_.id!==h))}catch(_){console.error("Error deleting domain:",_)}},[v,w]=y.useState([]);y.useEffect(()=>{(async()=>{const _=await i6({page:s?Number(s):1,perPage:10,state:i||""});w(_.items),a(_.totalPages)})()},[s,i]);const g=async h=>{const _=v.filter(R=>R.id===h),C=_[0].enabled,E=_[0];E.enabled=!C,await dm(E);const j=v.map(R=>R.id===h?{...R,checked:!C}:R);w(j)},x=async h=>{try{u6(h.id),c6(h.id,_=>{console.log(_);const C=v.map(E=>E.id===_.id?{..._}:E);w(C)}),h.rightnow=!0,await dm(h),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:c.jsxs(c.Fragment,{children:["执行失败,请查看",c.jsx(dr,{to:`/history?domain=${h.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},p=async h=>{const _=`${h.id}-${h.domain}.zip`,C=[{name:`${h.domain}.pem`,content:h.certificate?h.certificate:""},{name:`${h.domain}.key`,content:h.privateKey?h.privateKey:""}];await n6(_,C)};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(Yv,{}),c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),c.jsx(Je,{onClick:l,children:"新增域名"})]}),v.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-40",children:"域名"}),c.jsx("div",{className:"w-48",children:"有效期限"}),c.jsx("div",{className:"w-32",children:"最近执行状态"}),c.jsx("div",{className:"w-64",children:"最近执行阶段"}),c.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),c.jsx("div",{className:"w-32",children:"是否启用"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),v.map(h=>{var _,C,E,j,R,A;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:h.domain}),c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx("div",{children:h.expiredAt?c.jsxs(c.Fragment,{children:[c.jsx("div",{children:"有效期90天"}),c.jsxs("div",{children:[s6(h.expiredAt),"到期"]})]}):"---"})}),c.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:h.lastDeployedAt&&((_=h.expand)!=null&&_.lastDeployment)?c.jsx(c.Fragment,{children:((C=h.expand.lastDeployment)==null?void 0:C.phase)==="deploy"&&((E=h.expand.lastDeployment)!=null&&E.phaseSuccess)?c.jsx(Cg,{size:16,className:"text-green-700"}):c.jsx(Eg,{size:16,className:"text-red-700"})}):"---"}),c.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:h.lastDeployedAt&&((j=h.expand)!=null&&j.lastDeployment)?c.jsx(Ov,{phase:(R=h.expand.lastDeployment)==null?void 0:R.phase,phaseSuccess:(A=h.expand.lastDeployment)==null?void 0:A.phaseSuccess}):"---"}),c.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:h.lastDeployedAt?da(h.lastDeployedAt):"---"}),c.jsx("div",{className:"sm:w-32 flex items-center",children:c.jsx(HC,{children:c.jsxs(X5,{children:[c.jsx(Q5,{children:c.jsx(xC,{checked:h.enabled,onCheckedChange:()=>{g(h.id)}})}),c.jsx(Kv,{children:c.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:h.enabled?"禁用":"启用"})})]})})}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>d(h.id),children:"部署历史"}),c.jsxs(hl,{when:!!h.enabled,children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>x(h),children:"立即部署"})]}),c.jsxs(hl,{when:!!h.expiredAt,children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>p(h),children:"下载"})]}),!h.enabled&&c.jsxs(c.Fragment,{children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsxs(uC,{children:[c.jsx(dC,{asChild:!0,children:c.jsx(Je,{variant:"link",className:"p-0",children:"删除"})}),c.jsxs(Mv,{children:[c.jsxs(Iv,{children:[c.jsx(Fv,{children:"删除域名"}),c.jsx(zv,{children:"确定要删除域名吗?"})]}),c.jsxs(Lv,{children:[c.jsx(Vv,{children:"取消"}),c.jsx(Uv,{onClick:()=>{m(h.id)},children:"确认"})]})]})]}),c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>f(h.id),children:"编辑"})]})]})]},h.id)}),c.jsx(Wk,{totalPages:o,currentPage:s?Number(s):1,onPageChange:h=>{u(h)}})]}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(Bp,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(Je,{onClick:l,className:"mt-3",children:"添加域名"})]})})]})})},ze=y.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:le("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:n,...r}));ze.displayName="Input";var jc=e=>e.type==="checkbox",Fo=e=>e instanceof Date,hr=e=>e==null;const JC=e=>typeof e=="object";var qt=e=>!hr(e)&&!Array.isArray(e)&&JC(e)&&!Fo(e),eE=e=>qt(e)&&e.target?jc(e.target)?e.target.checked:e.target.value:e,f6=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,tE=(e,t)=>e.has(f6(t)),h6=e=>{const t=e.constructor&&e.constructor.prototype;return qt(t)&&t.hasOwnProperty("isPrototypeOf")},Gv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _r(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Gv&&(e instanceof Blob||e instanceof FileList))&&(r||qt(e)))if(t=r?[]:{},!r&&!h6(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=_r(e[n]));else return e;return t}var Lf=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,ue=(e,t,r)=>{if(!t||!qt(e))return r;const n=Lf(t.split(/[,[\].]+?/)).reduce((s,i)=>hr(s)?s:s[i],e);return Ft(n)||n===e?Ft(e[t])?r:e[t]:n},In=e=>typeof e=="boolean",qv=e=>/^\w*$/.test(e),rE=e=>Lf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let n=-1;const s=qv(t)?[t]:rE(t),i=s.length,o=i-1;for(;++ntt.useContext(nE),p6=e=>{const{children:t,...r}=e;return tt.createElement(nE.Provider,{value:r},t)};var sE=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==pn.all&&(t._proxyFormState[o]=!n||pn.all),r&&(r[o]=!0),e[o]}});return s},Nr=e=>qt(e)&&!Object.keys(e).length,iE=(e,t,r,n)=>{r(e);const{name:s,...i}=e;return Nr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||pn.all))},ml=e=>Array.isArray(e)?e:[e],oE=(e,t,r)=>!e||!t||e===t||ml(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function Xv(e){const t=tt.useRef(e);t.current=e,tt.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function m6(e){const t=Ff(),{control:r=t.control,disabled:n,name:s,exact:i}=e||{},[o,a]=tt.useState(r._formState),l=tt.useRef(!0),u=tt.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=tt.useRef(s);return f.current=s,Xv({disabled:n,next:d=>l.current&&oE(f.current,d.name,i)&&iE(d,u.current,r._updateFormState)&&a({...r._formState,...d}),subject:r._subjects.state}),tt.useEffect(()=>(l.current=!0,u.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),sE(o,r,u.current,!1)}var Fn=e=>typeof e=="string",aE=(e,t,r,n,s)=>Fn(e)?(n&&t.watch.add(e),ue(r,e,s)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),ue(r,i))):(n&&(t.watchAll=!0),r);function g6(e){const t=Ff(),{control:r=t.control,name:n,defaultValue:s,disabled:i,exact:o}=e||{},a=tt.useRef(n);a.current=n,Xv({disabled:i,subject:r._subjects.values,next:f=>{oE(a.current,f.name,o)&&u(_r(aE(a.current,r._names,f.values||r._formValues,!1,s)))}});const[l,u]=tt.useState(r._getWatch(n,s));return tt.useEffect(()=>r._removeUnmounted()),l}function v6(e){const t=Ff(),{name:r,disabled:n,control:s=t.control,shouldUnregister:i}=e,o=tE(s._names.array,r),a=g6({control:s,name:r,defaultValue:ue(s._formValues,r,ue(s._defaultValues,r,e.defaultValue)),exact:!0}),l=m6({control:s,name:r}),u=tt.useRef(s.register(r,{...e.rules,value:a,...In(e.disabled)?{disabled:e.disabled}:{}}));return tt.useEffect(()=>{const f=s._options.shouldUnregister||i,d=(m,v)=>{const w=ue(s._fields,m);w&&w._f&&(w._f.mount=v)};if(d(r,!0),f){const m=_r(ue(s._options.defaultValues,r));dt(s._defaultValues,r,m),Ft(ue(s._formValues,r))&&dt(s._formValues,r,m)}return()=>{(o?f&&!s._state.action:f)?s.unregister(r):d(r,!1)}},[r,s,o,i]),tt.useEffect(()=>{ue(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:ue(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...In(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:tt.useCallback(f=>u.current.onChange({target:{value:eE(f),name:r},type:Sd.CHANGE}),[r]),onBlur:tt.useCallback(()=>u.current.onBlur({target:{value:ue(s._formValues,r),name:r},type:Sd.BLUR}),[r,s]),ref:f=>{const d=ue(s._fields,r);d&&f&&(d._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:m=>f.setCustomValidity(m),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ue(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!ue(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ue(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ue(l.validatingFields,r)},error:{enumerable:!0,get:()=>ue(l.errors,r)}})}}const y6=e=>e.render(v6(e));var lE=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},z0=e=>({isOnSubmit:!e||e===pn.onSubmit,isOnBlur:e===pn.onBlur,isOnChange:e===pn.onChange,isOnAll:e===pn.all,isOnTouch:e===pn.onTouched}),U0=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const gl=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const i=ue(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!n)break;if(o.ref&&t(o.ref,o.name)&&!n)break;gl(a,t)}else qt(a)&&gl(a,t)}}};var x6=(e,t,r)=>{const n=ml(ue(e,r));return dt(n,"root",t[r]),dt(e,r,n),e},Qv=e=>e.type==="file",Qs=e=>typeof e=="function",kd=e=>{if(!Gv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Lu=e=>Fn(e),Jv=e=>e.type==="radio",Cd=e=>e instanceof RegExp;const V0={value:!1,isValid:!1},$0={value:!0,isValid:!0};var cE=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ft(e[0].attributes.value)?Ft(e[0].value)||e[0].value===""?$0:{value:e[0].value,isValid:!0}:$0:V0}return V0};const B0={isValid:!1,value:null};var uE=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,B0):B0;function W0(e,t,r="validate"){if(Lu(e)||Array.isArray(e)&&e.every(Lu)||In(e)&&!e)return{type:r,message:Lu(e)?e:"",ref:t}}var _o=e=>qt(e)&&!Cd(e)?e:{value:e,message:""},H0=async(e,t,r,n,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:u,min:f,max:d,pattern:m,validate:v,name:w,valueAsNumber:g,mount:x,disabled:p}=e._f,h=ue(t,w);if(!x||p)return{};const _=o?o[0]:i,C=T=>{n&&_.reportValidity&&(_.setCustomValidity(In(T)?"":T||""),_.reportValidity())},E={},j=Jv(i),R=jc(i),A=j||R,P=(g||Qv(i))&&Ft(i.value)&&Ft(h)||kd(i)&&i.value===""||h===""||Array.isArray(h)&&!h.length,L=lE.bind(null,w,r,E),q=(T,F,b,$=rs.maxLength,te=rs.minLength)=>{const B=T?F:b;E[w]={type:T?$:te,message:B,ref:i,...L(T?$:te,B)}};if(s?!Array.isArray(h)||!h.length:a&&(!A&&(P||hr(h))||In(h)&&!h||R&&!cE(o).isValid||j&&!uE(o).isValid)){const{value:T,message:F}=Lu(a)?{value:!!a,message:a}:_o(a);if(T&&(E[w]={type:rs.required,message:F,ref:_,...L(rs.required,F)},!r))return C(F),E}if(!P&&(!hr(f)||!hr(d))){let T,F;const b=_o(d),$=_o(f);if(!hr(h)&&!isNaN(h)){const te=i.valueAsNumber||h&&+h;hr(b.value)||(T=te>b.value),hr($.value)||(F=te<$.value)}else{const te=i.valueAsDate||new Date(h),B=Q=>new Date(new Date().toDateString()+" "+Q),Z=i.type=="time",I=i.type=="week";Fn(b.value)&&h&&(T=Z?B(h)>B(b.value):I?h>b.value:te>new Date(b.value)),Fn($.value)&&h&&(F=Z?B(h)+T.value,$=!hr(F.value)&&h.length<+F.value;if((b||$)&&(q(b,T.message,F.message),!r))return C(E[w].message),E}if(m&&!P&&Fn(h)){const{value:T,message:F}=_o(m);if(Cd(T)&&!h.match(T)&&(E[w]={type:rs.pattern,message:F,ref:i,...L(rs.pattern,F)},!r))return C(F),E}if(v){if(Qs(v)){const T=await v(h,t),F=W0(T,_);if(F&&(E[w]={...F,...L(rs.validate,F.message)},!r))return C(F.message),E}else if(qt(v)){let T={};for(const F in v){if(!Nr(T)&&!r)break;const b=W0(await v[F](h,t),_,F);b&&(T={...b,...L(F,b.message)},C(b.message),r&&(E[w]=T))}if(!Nr(T)&&(E[w]={ref:_,...T},!r))return E}}return C(!0),E};function w6(e,t){const r=t.slice(0,-1).length;let n=0;for(;n{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},Ed=e=>hr(e)||!JC(e);function Ui(e,t){if(Ed(e)||Ed(t))return e===t;if(Fo(e)&&Fo(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const s of r){const i=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const o=t[s];if(Fo(i)&&Fo(o)||qt(i)&&qt(o)||Array.isArray(i)&&Array.isArray(o)?!Ui(i,o):i!==o)return!1}}return!0}var dE=e=>e.type==="select-multiple",b6=e=>Jv(e)||jc(e),Wh=e=>kd(e)&&e.isConnected,fE=e=>{for(const t in e)if(Qs(e[t]))return!0;return!1};function jd(e,t={}){const r=Array.isArray(e);if(qt(e)||r)for(const n in e)Array.isArray(e[n])||qt(e[n])&&!fE(e[n])?(t[n]=Array.isArray(e[n])?[]:{},jd(e[n],t[n])):hr(e[n])||(t[n]=!0);return t}function hE(e,t,r){const n=Array.isArray(e);if(qt(e)||n)for(const s in e)Array.isArray(e[s])||qt(e[s])&&!fE(e[s])?Ft(t)||Ed(r[s])?r[s]=Array.isArray(e[s])?jd(e[s],[]):{...jd(e[s])}:hE(e[s],hr(t)?{}:t[s],r[s]):r[s]=!Ui(e[s],t[s]);return r}var pu=(e,t)=>hE(e,t,jd(t)),pE=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ft(e)?e:t?e===""?NaN:e&&+e:r&&Fn(e)?new Date(e):n?n(e):e;function Hh(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Qv(t)?t.files:Jv(t)?uE(e.refs).value:dE(t)?[...t.selectedOptions].map(({value:r})=>r):jc(t)?cE(e.refs).value:pE(Ft(t.value)?e.ref.value:t.value,e)}var S6=(e,t,r,n)=>{const s={};for(const i of e){const o=ue(t,i);o&&dt(s,i,o._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Ya=e=>Ft(e)?e:Cd(e)?e.source:qt(e)?Cd(e.value)?e.value.source:e.value:e,k6=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Y0(e,t,r){const n=ue(e,r);if(n||qv(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const i=s.join("."),o=ue(t,i),a=ue(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:r}}var C6=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,E6=(e,t)=>!Lf(ue(e,t)).length&&Ht(e,t);const j6={mode:pn.onSubmit,reValidateMode:pn.onChange,shouldFocusError:!0};function T6(e={}){let t={...j6,...e},r={submitCount:0,isDirty:!1,isLoading:Qs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=qt(t.defaultValues)||qt(t.values)?_r(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:_r(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Bh(),array:Bh(),state:Bh()},m=z0(t.mode),v=z0(t.reValidateMode),w=t.criteriaMode===pn.all,g=S=>N=>{clearTimeout(u),u=setTimeout(S,N)},x=async S=>{if(f.isValid||S){const N=t.resolver?Nr((await A()).errors):await L(n,!0);N!==r.isValid&&d.state.next({isValid:N})}},p=(S,N)=>{(f.isValidating||f.validatingFields)&&((S||Array.from(a.mount)).forEach(O=>{O&&(N?dt(r.validatingFields,O,N):Ht(r.validatingFields,O))}),d.state.next({validatingFields:r.validatingFields,isValidating:!Nr(r.validatingFields)}))},h=(S,N=[],O,Y,M=!0,H=!0)=>{if(Y&&O){if(o.action=!0,H&&Array.isArray(ue(n,S))){const X=O(ue(n,S),Y.argA,Y.argB);M&&dt(n,S,X)}if(H&&Array.isArray(ue(r.errors,S))){const X=O(ue(r.errors,S),Y.argA,Y.argB);M&&dt(r.errors,S,X),E6(r.errors,S)}if(f.touchedFields&&H&&Array.isArray(ue(r.touchedFields,S))){const X=O(ue(r.touchedFields,S),Y.argA,Y.argB);M&&dt(r.touchedFields,S,X)}f.dirtyFields&&(r.dirtyFields=pu(s,i)),d.state.next({name:S,isDirty:T(S,N),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(i,S,N)},_=(S,N)=>{dt(r.errors,S,N),d.state.next({errors:r.errors})},C=S=>{r.errors=S,d.state.next({errors:r.errors,isValid:!1})},E=(S,N,O,Y)=>{const M=ue(n,S);if(M){const H=ue(i,S,Ft(O)?ue(s,S):O);Ft(H)||Y&&Y.defaultChecked||N?dt(i,S,N?H:Hh(M._f)):$(S,H),o.mount&&x()}},j=(S,N,O,Y,M)=>{let H=!1,X=!1;const ee={name:S},pe=!!(ue(n,S)&&ue(n,S)._f&&ue(n,S)._f.disabled);if(!O||Y){f.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=T(),H=X!==ee.isDirty);const We=pe||Ui(ue(s,S),N);X=!!(!pe&&ue(r.dirtyFields,S)),We||pe?Ht(r.dirtyFields,S):dt(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||f.dirtyFields&&X!==!We}if(O){const We=ue(r.touchedFields,S);We||(dt(r.touchedFields,S,O),ee.touchedFields=r.touchedFields,H=H||f.touchedFields&&We!==O)}return H&&M&&d.state.next(ee),H?ee:{}},R=(S,N,O,Y)=>{const M=ue(r.errors,S),H=f.isValid&&In(N)&&r.isValid!==N;if(e.delayError&&O?(l=g(()=>_(S,O)),l(e.delayError)):(clearTimeout(u),l=null,O?dt(r.errors,S,O):Ht(r.errors,S)),(O?!Ui(M,O):M)||!Nr(Y)||H){const X={...Y,...H&&In(N)?{isValid:N}:{},errors:r.errors,name:S};r={...r,...X},d.state.next(X)}},A=async S=>{p(S,!0);const N=await t.resolver(i,t.context,S6(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return p(S),N},P=async S=>{const{errors:N}=await A(S);if(S)for(const O of S){const Y=ue(N,O);Y?dt(r.errors,O,Y):Ht(r.errors,O)}else r.errors=N;return N},L=async(S,N,O={valid:!0})=>{for(const Y in S){const M=S[Y];if(M){const{_f:H,...X}=M;if(H){const ee=a.array.has(H.name);p([Y],!0);const pe=await H0(M,i,w,t.shouldUseNativeValidation&&!N,ee);if(p([Y]),pe[H.name]&&(O.valid=!1,N))break;!N&&(ue(pe,H.name)?ee?x6(r.errors,pe,H.name):dt(r.errors,H.name,pe[H.name]):Ht(r.errors,H.name))}X&&await L(X,N,O)}}return O.valid},q=()=>{for(const S of a.unMount){const N=ue(n,S);N&&(N._f.refs?N._f.refs.every(O=>!Wh(O)):!Wh(N._f.ref))&&Ae(S)}a.unMount=new Set},T=(S,N)=>(S&&N&&dt(i,S,N),!Ui(z(),s)),F=(S,N,O)=>aE(S,a,{...o.mount?i:Ft(N)?s:Fn(S)?{[S]:N}:N},O,N),b=S=>Lf(ue(o.mount?i:s,S,e.shouldUnregister?ue(s,S,[]):[])),$=(S,N,O={})=>{const Y=ue(n,S);let M=N;if(Y){const H=Y._f;H&&(!H.disabled&&dt(i,S,pE(N,H)),M=kd(H.ref)&&hr(N)?"":N,dE(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?jc(H.ref)?H.refs.length>1?H.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(M)?!!M.find(ee=>ee===X.value):M===X.value)):H.refs[0]&&(H.refs[0].checked=!!M):H.refs.forEach(X=>X.checked=X.value===M):Qv(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||d.values.next({name:S,values:{...i}})))}(O.shouldDirty||O.shouldTouch)&&j(S,M,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&Q(S)},te=(S,N,O)=>{for(const Y in N){const M=N[Y],H=`${S}.${Y}`,X=ue(n,H);(a.array.has(S)||!Ed(M)||X&&!X._f)&&!Fo(M)?te(H,M,O):$(H,M,O)}},B=(S,N,O={})=>{const Y=ue(n,S),M=a.array.has(S),H=_r(N);dt(i,S,H),M?(d.array.next({name:S,values:{...i}}),(f.isDirty||f.dirtyFields)&&O.shouldDirty&&d.state.next({name:S,dirtyFields:pu(s,i),isDirty:T(S,H)})):Y&&!Y._f&&!hr(H)?te(S,H,O):$(S,H,O),U0(S,a)&&d.state.next({...r}),d.values.next({name:o.mount?S:void 0,values:{...i}})},Z=async S=>{o.mount=!0;const N=S.target;let O=N.name,Y=!0;const M=ue(n,O),H=()=>N.type?Hh(M._f):eE(S),X=ee=>{Y=Number.isNaN(ee)||ee===ue(i,O,ee)};if(M){let ee,pe;const We=H(),Ue=S.type===Sd.BLUR||S.type===Sd.FOCUS_OUT,Et=!k6(M._f)&&!t.resolver&&!ue(r.errors,O)&&!M._f.deps||C6(Ue,ue(r.touchedFields,O),r.isSubmitted,v,m),Zr=U0(O,a,Ue);dt(i,O,We),Ue?(M._f.onBlur&&M._f.onBlur(S),l&&l(0)):M._f.onChange&&M._f.onChange(S);const Wt=j(O,We,Ue,!1),qn=!Nr(Wt)||Zr;if(!Ue&&d.values.next({name:O,type:S.type,values:{...i}}),Et)return f.isValid&&x(),qn&&d.state.next({name:O,...Zr?{}:Wt});if(!Ue&&Zr&&d.state.next({...r}),t.resolver){const{errors:ot}=await A([O]);if(X(We),Y){const Xn=Y0(r.errors,n,O),Qn=Y0(ot,n,Xn.name||O);ee=Qn.error,O=Qn.name,pe=Nr(ot)}}else p([O],!0),ee=(await H0(M,i,w,t.shouldUseNativeValidation))[O],p([O]),X(We),Y&&(ee?pe=!1:f.isValid&&(pe=await L(n,!0)));Y&&(M._f.deps&&Q(M._f.deps),R(O,pe,ee,Wt))}},I=(S,N)=>{if(ue(r.errors,N)&&S.focus)return S.focus(),1},Q=async(S,N={})=>{let O,Y;const M=ml(S);if(t.resolver){const H=await P(Ft(S)?S:M);O=Nr(H),Y=S?!M.some(X=>ue(H,X)):O}else S?(Y=(await Promise.all(M.map(async H=>{const X=ue(n,H);return await L(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!Y&&!r.isValid)&&x()):Y=O=await L(n);return d.state.next({...!Fn(S)||f.isValid&&O!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:O}:{},errors:r.errors}),N.shouldFocus&&!Y&&gl(n,I,S?M:a.mount),Y},z=S=>{const N={...o.mount?i:s};return Ft(S)?N:Fn(S)?ue(N,S):S.map(O=>ue(N,O))},V=(S,N)=>({invalid:!!ue((N||r).errors,S),isDirty:!!ue((N||r).dirtyFields,S),error:ue((N||r).errors,S),isValidating:!!ue(r.validatingFields,S),isTouched:!!ue((N||r).touchedFields,S)}),fe=S=>{S&&ml(S).forEach(N=>Ht(r.errors,N)),d.state.next({errors:S?r.errors:{}})},ne=(S,N,O)=>{const Y=(ue(n,S,{_f:{}})._f||{}).ref,M=ue(r.errors,S)||{},{ref:H,message:X,type:ee,...pe}=M;dt(r.errors,S,{...pe,...N,ref:Y}),d.state.next({name:S,errors:r.errors,isValid:!1}),O&&O.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,N)=>Qs(S)?d.values.subscribe({next:O=>S(F(void 0,N),O)}):F(S,N,!0),Ae=(S,N={})=>{for(const O of S?ml(S):a.mount)a.mount.delete(O),a.array.delete(O),N.keepValue||(Ht(n,O),Ht(i,O)),!N.keepError&&Ht(r.errors,O),!N.keepDirty&&Ht(r.dirtyFields,O),!N.keepTouched&&Ht(r.touchedFields,O),!N.keepIsValidating&&Ht(r.validatingFields,O),!t.shouldUnregister&&!N.keepDefaultValue&&Ht(s,O);d.values.next({values:{...i}}),d.state.next({...r,...N.keepDirty?{isDirty:T()}:{}}),!N.keepIsValid&&x()},he=({disabled:S,name:N,field:O,fields:Y,value:M})=>{if(In(S)&&o.mount||S){const H=S?void 0:Ft(M)?Hh(O?O._f:ue(Y,N)._f):M;dt(i,N,H),j(N,H,!1,!1,!0)}},ye=(S,N={})=>{let O=ue(n,S);const Y=In(N.disabled);return dt(n,S,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:S}},name:S,mount:!0,...N}}),a.mount.add(S),O?he({field:O,disabled:N.disabled,name:S,value:N.value}):E(S,!0,N.value),{...Y?{disabled:N.disabled}:{},...t.progressive?{required:!!N.required,min:Ya(N.min),max:Ya(N.max),minLength:Ya(N.minLength),maxLength:Ya(N.maxLength),pattern:Ya(N.pattern)}:{},name:S,onChange:Z,onBlur:Z,ref:M=>{if(M){ye(S,N),O=ue(n,S);const H=Ft(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=b6(H),ee=O._f.refs||[];if(X?ee.find(pe=>pe===H):H===O._f.ref)return;dt(n,S,{_f:{...O._f,...X?{refs:[...ee.filter(Wh),H,...Array.isArray(ue(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),E(S,!1,void 0,H)}else O=ue(n,S,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(tE(a.array,S)&&o.action)&&a.unMount.add(S)}}},ke=()=>t.shouldFocusError&&gl(n,I,a.mount),Le=S=>{In(S)&&(d.state.next({disabled:S}),gl(n,(N,O)=>{const Y=ue(n,O);Y&&(N.disabled=Y._f.disabled||S,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(M=>{M.disabled=Y._f.disabled||S}))},0,!1))},De=(S,N)=>async O=>{let Y;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let M=_r(i);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:X}=await A();r.errors=H,M=X}else await L(n);if(Ht(r.errors,"root"),Nr(r.errors)){d.state.next({errors:{}});try{await S(M,O)}catch(H){Y=H}}else N&&await N({...r.errors},O),ke(),setTimeout(ke);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Nr(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},Ne=(S,N={})=>{ue(n,S)&&(Ft(N.defaultValue)?B(S,_r(ue(s,S))):(B(S,N.defaultValue),dt(s,S,_r(N.defaultValue))),N.keepTouched||Ht(r.touchedFields,S),N.keepDirty||(Ht(r.dirtyFields,S),r.isDirty=N.defaultValue?T(S,_r(ue(s,S))):T()),N.keepError||(Ht(r.errors,S),f.isValid&&x()),d.state.next({...r}))},nt=(S,N={})=>{const O=S?_r(S):s,Y=_r(O),M=Nr(S),H=M?s:Y;if(N.keepDefaultValues||(s=O),!N.keepValues){if(N.keepDirtyValues)for(const X of a.mount)ue(r.dirtyFields,X)?dt(H,X,ue(i,X)):B(X,ue(H,X));else{if(Gv&&Ft(S))for(const X of a.mount){const ee=ue(n,X);if(ee&&ee._f){const pe=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(kd(pe)){const We=pe.closest("form");if(We){We.reset();break}}}}n={}}i=e.shouldUnregister?N.keepDefaultValues?_r(s):{}:_r(H),d.array.next({values:{...H}}),d.values.next({values:{...H}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!N.keepIsValid||!!N.keepDirtyValues,o.watch=!!e.shouldUnregister,d.state.next({submitCount:N.keepSubmitCount?r.submitCount:0,isDirty:M?!1:N.keepDirty?r.isDirty:!!(N.keepDefaultValues&&!Ui(S,s)),isSubmitted:N.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:N.keepDirtyValues?N.keepDefaultValues&&i?pu(s,i):r.dirtyFields:N.keepDefaultValues&&S?pu(s,S):N.keepDirty?r.dirtyFields:{},touchedFields:N.keepTouched?r.touchedFields:{},errors:N.keepErrors?r.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,N)=>nt(Qs(S)?S(i):S,N);return{control:{register:ye,unregister:Ae,getFieldState:V,handleSubmit:De,setError:ne,_executeSchema:A,_getWatch:F,_getDirty:T,_updateValid:x,_removeUnmounted:q,_updateFieldArray:h,_updateDisabledField:he,_getFieldArray:b,_reset:nt,_resetDefaultValues:()=>Qs(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:Le,_subjects:d,_proxyFormState:f,_setErrors:C,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(S){o=S},get _defaultValues(){return s},get _names(){return a},set _names(S){a=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:Q,register:ye,handleSubmit:De,watch:se,setValue:B,getValues:z,reset:k,resetField:Ne,clearErrors:fe,unregister:Ae,setError:ne,setFocus:(S,N={})=>{const O=ue(n,S),Y=O&&O._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),N.shouldSelect&&M.select())}},getFieldState:V}}function Wr(e={}){const t=tt.useRef(),r=tt.useRef(),[n,s]=tt.useState({isDirty:!1,isValidating:!1,isLoading:Qs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Qs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...T6(e),formState:n});const i=t.current.control;return i._options=e,Xv({subject:i._subjects.state,next:o=>{iE(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),tt.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),tt.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),tt.useEffect(()=>{e.values&&!Ui(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),tt.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),tt.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),tt.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=sE(n,i),t.current}const Z0=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ue(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},mE=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Z0(n.ref,r,e):n.refs&&n.refs.forEach(s=>Z0(s,r,e))}},N6=(e,t)=>{t.shouldUseNativeValidation&&mE(e,t);const r={};for(const n in e){const s=ue(t.fields,n),i=Object.assign(e[n]||{},{ref:s&&s.ref});if(R6(t.names||Object.keys(e),n)){const o=Object.assign({},ue(r,n));dt(o,"root",i),dt(r,n,o)}else dt(r,n,i)}return r},R6=(e,t)=>e.some(r=>r.startsWith(t+"."));var P6=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,i=n.message,o=n.path.join(".");if(!r[o])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[o]={message:a.message,type:a.code}}else r[o]={message:i,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(f){return f.errors.forEach(function(d){return e.push(d)})}),t){var l=r[o].types,u=l&&l[n.code];r[o]=lE(o,t,r,s,u?[].concat(u,n.message):n.message)}e.shift()}return r},Hr=function(e,t,r){return r===void 0&&(r={}),function(n,s,i){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return i.shouldUseNativeValidation&&mE({},i),{errors:{},values:r.raw?n:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:N6(P6(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},st;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(st||(st={}));var fm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(fm||(fm={}));const we=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Hs=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},oe=st.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"]),A6=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lr extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;lr.message){const r={},n=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Lr.create=e=>new Lr(e);const fa=(e,t)=>{let r;switch(e.code){case oe.invalid_type:e.received===we.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:r=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case oe.invalid_union:r="Invalid input";break;case oe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case oe.invalid_enum_value:r=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:r="Invalid function arguments";break;case oe.invalid_return_type:r="Invalid function return type";break;case oe.invalid_date:r="Invalid date";break;case oe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:st.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case oe.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case oe.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case oe.custom:r="Invalid input";break;case oe.invalid_intersection_types:r="Intersection results could not be merged";break;case oe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:r="Number must be finite";break;default:r=t.defaultError,st.assertNever(e)}return{message:r}};let gE=fa;function D6(e){gE=e}function Td(){return gE}const Nd=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},O6=[];function ge(e,t){const r=Td(),n=Nd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===fa?void 0:fa].filter(s=>!!s)});e.common.issues.push(n)}class cr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return Be;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const i=await s.key,o=await s.value;n.push({key:i,value:o})}return cr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Be;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const Be=Object.freeze({status:"aborted"}),zo=e=>({status:"dirty",value:e}),mr=e=>({status:"valid",value:e}),hm=e=>e.status==="aborted",pm=e=>e.status==="dirty",Yl=e=>e.status==="valid",Zl=e=>typeof Promise<"u"&&e instanceof Promise;function Rd(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function vE(e,t,r,n,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,r),r}var Pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Pe||(Pe={}));var Ja,el;class Wn{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,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 K0=(e,t)=>{if(Yl(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 r=new Lr(e.common.issues);return this._error=r,this._error}}};function He(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))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:(o,a)=>{var l,u;const{message:f}=e;return o.code==="invalid_enum_value"?{message:f??a.defaultError}:typeof a.data>"u"?{message:(l=f??n)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=f??r)!==null&&u!==void 0?u:a.defaultError}},description:s}}class qe{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 Hs(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Hs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cr,ctx:{common:t.parent.common,data:t.data,parsedType:Hs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Zl(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Hs(t)},i=this._parseSync({data:t,path:s.path,parent:s});return K0(s,i)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Hs(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(Zl(s)?s:Promise.resolve(s));return K0(n,i)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:oe.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new En({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Vn.create(this,this._def)}nullable(){return vi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wn.create(this,this._def)}promise(){return pa.create(this,this._def)}or(t){return Xl.create([this,t],this._def)}and(t){return Ql.create(this,t,this._def)}transform(t){return new En({...He(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new nc({...He(this._def),innerType:this,defaultValue:r,typeName:Ve.ZodDefault})}brand(){return new ey({typeName:Ve.ZodBranded,type:this,...He(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new sc({...He(this._def),innerType:this,catchValue:r,typeName:Ve.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Tc.create(this,t)}readonly(){return ic.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const M6=/^c[^\s-]{8,}$/i,I6=/^[0-9a-z]+$/,L6=/^[0-9A-HJKMNP-TV-Z]{26}$/,F6=/^[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,z6=/^[a-z0-9_-]{21}$/i,U6=/^[-+]?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)?)??$/,V6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Yh;const B6=/^(?:(?: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])$/,W6=/^(([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})))$/,H6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,yE="((\\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])))",Y6=new RegExp(`^${yE}$`);function xE(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 Z6(e){return new RegExp(`^${xE(e)}$`)}function wE(e){let t=`${yE}T${xE(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function K6(e,t){return!!((t==="v4"||!t)&&B6.test(e)||(t==="v6"||!t)&&W6.test(e))}class gn extends qe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.string,received:i.parsedType}),Be}const n=new cr;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.lengtht.test(s),{validation:r,code:oe.invalid_string,...Pe.errToObj(n)})}_addCheck(t){return new gn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Pe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Pe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Pe.errToObj(t)})}datetime(t){var r,n;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:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...Pe.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,...Pe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Pe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Pe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Pe.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Pe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Pe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Pe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Pe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Pe.errToObj(r)})}nonempty(t){return this.min(1,Pe.errToObj(t))}trim(){return new gn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new gn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new gn({...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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new gn({checks:[],typeName:Ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...He(e)})};function G6(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class pi extends qe{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)!==we.number){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.number,received:i.parsedType}),Be}let n;const s=new cr;for(const i of this._def.checks)i.kind==="int"?st.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?G6(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.not_finite,message:i.message}),s.dirty()):st.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Pe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Pe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Pe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Pe.toString(r))}setLimit(t,r,n,s){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Pe.toString(s)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pe.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&st.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.valuenew pi({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...He(e)});class mi extends qe{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)!==we.bigint){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.bigint,received:i.parsedType}),Be}let n;const s=new cr;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):st.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Pe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Pe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Pe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Pe.toString(r))}setLimit(t,r,n,s){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Pe.toString(s)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new mi({checks:[],typeName:Ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...He(e)})};class Kl extends qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.boolean,received:n.parsedType}),Be}return mr(t.data)}}Kl.create=e=>new Kl({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...He(e)});class eo extends qe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.date,received:i.parsedType}),Be}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_date}),Be}const n=new cr;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):st.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Pe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Pe.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew eo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...He(e)});class Pd extends qe{_parse(t){if(this._getType(t)!==we.symbol){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.symbol,received:n.parsedType}),Be}return mr(t.data)}}Pd.create=e=>new Pd({typeName:Ve.ZodSymbol,...He(e)});class Gl extends qe{_parse(t){if(this._getType(t)!==we.undefined){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.undefined,received:n.parsedType}),Be}return mr(t.data)}}Gl.create=e=>new Gl({typeName:Ve.ZodUndefined,...He(e)});class ql extends qe{_parse(t){if(this._getType(t)!==we.null){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.null,received:n.parsedType}),Be}return mr(t.data)}}ql.create=e=>new ql({typeName:Ve.ZodNull,...He(e)});class ha extends qe{constructor(){super(...arguments),this._any=!0}_parse(t){return mr(t.data)}}ha.create=e=>new ha({typeName:Ve.ZodAny,...He(e)});class Wi extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mr(t.data)}}Wi.create=e=>new Wi({typeName:Ve.ZodUnknown,...He(e)});class Cs extends qe{_parse(t){const r=this._getOrReturnCtx(t);return ge(r,{code:oe.invalid_type,expected:we.never,received:r.parsedType}),Be}}Cs.create=e=>new Cs({typeName:Ve.ZodNever,...He(e)});class Ad extends qe{_parse(t){if(this._getType(t)!==we.undefined){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.void,received:n.parsedType}),Be}return mr(t.data)}}Ad.create=e=>new Ad({typeName:Ve.ZodVoid,...He(e)});class wn extends qe{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==we.array)return ge(r,{code:oe.invalid_type,expected:we.array,received:r.parsedType}),Be;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,a=r.data.lengths.maxLength.value&&(ge(r,{code:oe.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Wn(r,o,r.path,a)))).then(o=>cr.mergeArray(n,o));const i=[...r.data].map((o,a)=>s.type._parseSync(new Wn(r,o,r.path,a)));return cr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new wn({...this._def,minLength:{value:t,message:Pe.toString(r)}})}max(t,r){return new wn({...this._def,maxLength:{value:t,message:Pe.toString(r)}})}length(t,r){return new wn({...this._def,exactLength:{value:t,message:Pe.toString(r)}})}nonempty(t){return this.min(1,t)}}wn.create=(e,t)=>new wn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...He(t)});function So(e){if(e instanceof Rt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Vn.create(So(n))}return new Rt({...e._def,shape:()=>t})}else return e instanceof wn?new wn({...e._def,type:So(e.element)}):e instanceof Vn?Vn.create(So(e.unwrap())):e instanceof vi?vi.create(So(e.unwrap())):e instanceof Hn?Hn.create(e.items.map(t=>So(t))):e}class Rt extends qe{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(),r=st.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==we.object){const u=this._getOrReturnCtx(t);return ge(u,{code:oe.invalid_type,expected:we.object,received:u.parsedType}),Be}const{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Cs&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const f=i[u],d=s.data[u];l.push({key:{status:"valid",value:u},value:f._parse(new Wn(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Cs){const u=this._def.unknownKeys;if(u==="passthrough")for(const f of a)l.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(u==="strict")a.length>0&&(ge(s,{code:oe.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const f of a){const d=s.data[f];l.push({key:{status:"valid",value:f},value:u._parse(new Wn(s,d,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const f of l){const d=await f.key,m=await f.value;u.push({key:d,value:m,alwaysSet:f.alwaysSet})}return u}).then(u=>cr.mergeObjectSync(n,u)):cr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Pe.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,i,o,a;const l=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Pe.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const r={};return st.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}omit(t){const r={};return st.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}deepPartial(){return So(this)}partial(t){const r={};return st.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new Rt({...this._def,shape:()=>r})}required(t){const r={};return st.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Vn;)i=i._def.innerType;r[n]=i}}),new Rt({...this._def,shape:()=>r})}keyof(){return _E(st.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Cs.create(),typeName:Ve.ZodObject,...He(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Cs.create(),typeName:Ve.ZodObject,...He(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Cs.create(),typeName:Ve.ZodObject,...He(t)});class Xl extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Lr(a.ctx.common.issues));return ge(r,{code:oe.invalid_union,unionErrors:o}),Be}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},f=l._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new Lr(l));return ge(r,{code:oe.invalid_union,unionErrors:a}),Be}}get options(){return this._def.options}}Xl.create=(e,t)=>new Xl({options:e,typeName:Ve.ZodUnion,...He(t)});const ns=e=>e instanceof ec?ns(e.schema):e instanceof En?ns(e.innerType()):e instanceof tc?[e.value]:e instanceof gi?e.options:e instanceof rc?st.objectValues(e.enum):e instanceof nc?ns(e._def.innerType):e instanceof Gl?[void 0]:e instanceof ql?[null]:e instanceof Vn?[void 0,...ns(e.unwrap())]:e instanceof vi?[null,...ns(e.unwrap())]:e instanceof ey||e instanceof ic?ns(e.unwrap()):e instanceof sc?ns(e._def.innerType):[];class zf extends qe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return ge(r,{code:oe.invalid_type,expected:we.object,received:r.parsedType}),Be;const n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(ge(r,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const s=new Map;for(const i of r){const o=ns(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new zf({typeName:Ve.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...He(n)})}}function mm(e,t){const r=Hs(e),n=Hs(t);if(e===t)return{valid:!0,data:e};if(r===we.object&&n===we.object){const s=st.objectKeys(t),i=st.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=mm(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===we.array&&n===we.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i{if(hm(i)||hm(o))return Be;const a=mm(i.value,o.value);return a.valid?((pm(i)||pm(o))&&r.dirty(),{status:r.value,value:a.data}):(ge(n,{code:oe.invalid_intersection_types}),Be)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Ql.create=(e,t,r)=>new Ql({left:e,right:t,typeName:Ve.ZodIntersection,...He(r)});class Hn extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.array)return ge(n,{code:oe.invalid_type,expected:we.array,received:n.parsedType}),Be;if(n.data.lengththis._def.items.length&&(ge(n,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Wn(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>cr.mergeArray(r,o)):cr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new Hn({...this._def,rest:t})}}Hn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Hn({items:e,typeName:Ve.ZodTuple,rest:null,...He(t)})};class Jl extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return ge(n,{code:oe.invalid_type,expected:we.object,received:n.parsedType}),Be;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in n.data)s.push({key:i._parse(new Wn(n,a,n.path,a)),value:o._parse(new Wn(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?cr.mergeObjectAsync(r,s):cr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof qe?new Jl({keyType:t,valueType:r,typeName:Ve.ZodRecord,...He(n)}):new Jl({keyType:gn.create(),valueType:t,typeName:Ve.ZodRecord,...He(r)})}}class Dd extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.map)return ge(n,{code:oe.invalid_type,expected:we.map,received:n.parsedType}),Be;const s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,l],u)=>({key:s._parse(new Wn(n,a,n.path,[u,"key"])),value:i._parse(new Wn(n,l,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,f=await l.value;if(u.status==="aborted"||f.status==="aborted")return Be;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,f=l.value;if(u.status==="aborted"||f.status==="aborted")return Be;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value)}return{status:r.value,value:a}}}}Dd.create=(e,t,r)=>new Dd({valueType:t,keyType:e,typeName:Ve.ZodMap,...He(r)});class to extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.set)return ge(n,{code:oe.invalid_type,expected:we.set,received:n.parsedType}),Be;const s=this._def;s.minSize!==null&&n.data.sizes.maxSize.value&&(ge(n,{code:oe.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const f of l){if(f.status==="aborted")return Be;f.status==="dirty"&&r.dirty(),u.add(f.value)}return{status:r.value,value:u}}const a=[...n.data.values()].map((l,u)=>i._parse(new Wn(n,l,n.path,u)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,r){return new to({...this._def,minSize:{value:t,message:Pe.toString(r)}})}max(t,r){return new to({...this._def,maxSize:{value:t,message:Pe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}to.create=(e,t)=>new to({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...He(t)});class ta extends qe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.function)return ge(r,{code:oe.invalid_type,expected:we.function,received:r.parsedType}),Be;function n(a,l){return Nd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Td(),fa].filter(u=>!!u),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function s(a,l){return Nd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Td(),fa].filter(u=>!!u),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof pa){const a=this;return mr(async function(...l){const u=new Lr([]),f=await a._def.args.parseAsync(l,i).catch(v=>{throw u.addIssue(n(l,v)),u}),d=await Reflect.apply(o,this,f);return await a._def.returns._def.type.parseAsync(d,i).catch(v=>{throw u.addIssue(s(d,v)),u})})}else{const a=this;return mr(function(...l){const u=a._def.args.safeParse(l,i);if(!u.success)throw new Lr([n(l,u.error)]);const f=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(f,i);if(!d.success)throw new Lr([s(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ta({...this._def,args:Hn.create(t).rest(Wi.create())})}returns(t){return new ta({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new ta({args:t||Hn.create([]).rest(Wi.create()),returns:r||Wi.create(),typeName:Ve.ZodFunction,...He(n)})}}class ec extends qe{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ec.create=(e,t)=>new ec({getter:e,typeName:Ve.ZodLazy,...He(t)});class tc extends qe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ge(r,{received:r.data,code:oe.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}tc.create=(e,t)=>new tc({value:e,typeName:Ve.ZodLiteral,...He(t)});function _E(e,t){return new gi({values:e,typeName:Ve.ZodEnum,...He(t)})}class gi extends qe{constructor(){super(...arguments),Ja.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{expected:st.joinValues(n),received:r.parsedType,code:oe.invalid_type}),Be}if(Rd(this,Ja)||vE(this,Ja,new Set(this._def.values)),!Rd(this,Ja).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{received:r.data,code:oe.invalid_enum_value,options:n}),Be}return mr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return gi.create(t,{...this._def,...r})}exclude(t,r=this._def){return gi.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Ja=new WeakMap;gi.create=_E;class rc extends qe{constructor(){super(...arguments),el.set(this,void 0)}_parse(t){const r=st.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==we.string&&n.parsedType!==we.number){const s=st.objectValues(r);return ge(n,{expected:st.joinValues(s),received:n.parsedType,code:oe.invalid_type}),Be}if(Rd(this,el)||vE(this,el,new Set(st.getValidEnumValues(this._def.values))),!Rd(this,el).has(t.data)){const s=st.objectValues(r);return ge(n,{received:n.data,code:oe.invalid_enum_value,options:s}),Be}return mr(t.data)}get enum(){return this._def.values}}el=new WeakMap;rc.create=(e,t)=>new rc({values:e,typeName:Ve.ZodNativeEnum,...He(t)});class pa extends qe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.promise&&r.common.async===!1)return ge(r,{code:oe.invalid_type,expected:we.promise,received:r.parsedType}),Be;const n=r.parsedType===we.promise?r.data:Promise.resolve(r.data);return mr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}pa.create=(e,t)=>new pa({type:e,typeName:Ve.ZodPromise,...He(t)});class En extends qe{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:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ge(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return Be;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?Be:l.status==="dirty"||r.value==="dirty"?zo(l.value):l});{if(r.value==="aborted")return Be;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?Be:a.status==="dirty"||r.value==="dirty"?zo(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(n.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(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Be:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Be:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Yl(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Yl(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):o);st.assertNever(s)}}En.create=(e,t,r)=>new En({schema:e,typeName:Ve.ZodEffects,effect:t,...He(r)});En.createWithPreprocess=(e,t,r)=>new En({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...He(r)});class Vn extends qe{_parse(t){return this._getType(t)===we.undefined?mr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Vn.create=(e,t)=>new Vn({innerType:e,typeName:Ve.ZodOptional,...He(t)});class vi extends qe{_parse(t){return this._getType(t)===we.null?mr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vi.create=(e,t)=>new vi({innerType:e,typeName:Ve.ZodNullable,...He(t)});class nc extends qe{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===we.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}nc.create=(e,t)=>new nc({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...He(t)});class sc extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Zl(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}sc.create=(e,t)=>new sc({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...He(t)});class Od extends qe{_parse(t){if(this._getType(t)!==we.nan){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.nan,received:n.parsedType}),Be}return{status:"valid",value:t.data}}}Od.create=e=>new Od({typeName:Ve.ZodNaN,...He(e)});const q6=Symbol("zod_brand");class ey extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Tc extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Be:i.status==="dirty"?(r.dirty(),zo(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Be:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new Tc({in:t,out:r,typeName:Ve.ZodPipeline})}}class ic extends qe{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Yl(s)&&(s.value=Object.freeze(s.value)),s);return Zl(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}ic.create=(e,t)=>new ic({innerType:e,typeName:Ve.ZodReadonly,...He(t)});function bE(e,t={},r){return e?ha.create().superRefine((n,s)=>{var i,o;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(o=(i=a.fatal)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:l})}}):ha.create()}const X6={object:Rt.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 Q6=(e,t={message:`Input not instance of ${e.name}`})=>bE(r=>r instanceof e,t),SE=gn.create,kE=pi.create,J6=Od.create,ez=mi.create,CE=Kl.create,tz=eo.create,rz=Pd.create,nz=Gl.create,sz=ql.create,iz=ha.create,oz=Wi.create,az=Cs.create,lz=Ad.create,cz=wn.create,uz=Rt.create,dz=Rt.strictCreate,fz=Xl.create,hz=zf.create,pz=Ql.create,mz=Hn.create,gz=Jl.create,vz=Dd.create,yz=to.create,xz=ta.create,wz=ec.create,_z=tc.create,bz=gi.create,Sz=rc.create,kz=pa.create,G0=En.create,Cz=Vn.create,Ez=vi.create,jz=En.createWithPreprocess,Tz=Tc.create,Nz=()=>SE().optional(),Rz=()=>kE().optional(),Pz=()=>CE().optional(),Az={string:e=>gn.create({...e,coerce:!0}),number:e=>pi.create({...e,coerce:!0}),boolean:e=>Kl.create({...e,coerce:!0}),bigint:e=>mi.create({...e,coerce:!0}),date:e=>eo.create({...e,coerce:!0})},Dz=Be;var me=Object.freeze({__proto__:null,defaultErrorMap:fa,setErrorMap:D6,getErrorMap:Td,makeIssue:Nd,EMPTY_PATH:O6,addIssueToContext:ge,ParseStatus:cr,INVALID:Be,DIRTY:zo,OK:mr,isAborted:hm,isDirty:pm,isValid:Yl,isAsync:Zl,get util(){return st},get objectUtil(){return fm},ZodParsedType:we,getParsedType:Hs,ZodType:qe,datetimeRegex:wE,ZodString:gn,ZodNumber:pi,ZodBigInt:mi,ZodBoolean:Kl,ZodDate:eo,ZodSymbol:Pd,ZodUndefined:Gl,ZodNull:ql,ZodAny:ha,ZodUnknown:Wi,ZodNever:Cs,ZodVoid:Ad,ZodArray:wn,ZodObject:Rt,ZodUnion:Xl,ZodDiscriminatedUnion:zf,ZodIntersection:Ql,ZodTuple:Hn,ZodRecord:Jl,ZodMap:Dd,ZodSet:to,ZodFunction:ta,ZodLazy:ec,ZodLiteral:tc,ZodEnum:gi,ZodNativeEnum:rc,ZodPromise:pa,ZodEffects:En,ZodTransformer:En,ZodOptional:Vn,ZodNullable:vi,ZodDefault:nc,ZodCatch:sc,ZodNaN:Od,BRAND:q6,ZodBranded:ey,ZodPipeline:Tc,ZodReadonly:ic,custom:bE,Schema:qe,ZodSchema:qe,late:X6,get ZodFirstPartyTypeKind(){return Ve},coerce:Az,any:iz,array:cz,bigint:ez,boolean:CE,date:tz,discriminatedUnion:hz,effect:G0,enum:bz,function:xz,instanceof:Q6,intersection:pz,lazy:wz,literal:_z,map:vz,nan:J6,nativeEnum:Sz,never:az,null:sz,nullable:Ez,number:kE,object:uz,oboolean:Pz,onumber:Rz,optional:Cz,ostring:Nz,pipeline:Tz,preprocess:jz,promise:kz,record:gz,set:yz,strictObject:dz,string:SE,symbol:rz,transformer:G0,tuple:mz,undefined:nz,union:fz,unknown:oz,void:lz,NEVER:Dz,ZodIssueCode:oe,quotelessJson:A6,ZodError:Lr}),Oz="Label",EE=y.forwardRef((e,t)=>c.jsx(Ie.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));EE.displayName=Oz;var jE=EE;const Mz=dc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ty=y.forwardRef(({className:e,...t},r)=>c.jsx(jE,{ref:r,className:le(Mz(),e),...t}));ty.displayName=jE.displayName;const Yr=p6,TE=y.createContext({}),Te=({...e})=>c.jsx(TE.Provider,{value:{name:e.name},children:c.jsx(y6,{...e})}),Uf=()=>{const e=y.useContext(TE),t=y.useContext(NE),{getFieldState:r,formState:n}=Ff(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within ");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},NE=y.createContext({}),Ce=y.forwardRef(({className:e,...t},r)=>{const n=y.useId();return c.jsx(NE.Provider,{value:{id:n},children:c.jsx("div",{ref:r,className:le("space-y-2",e),...t})})});Ce.displayName="FormItem";const Ee=y.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Uf();return c.jsx(ty,{ref:r,className:le(n&&"text-destructive",e),htmlFor:s,...t})});Ee.displayName="FormLabel";const je=y.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:i}=Uf();return c.jsx(ws,{ref:t,id:n,"aria-describedby":r?`${s} ${i}`:`${s}`,"aria-invalid":!!r,...e})});je.displayName="FormControl";const Iz=y.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Uf();return c.jsx("p",{ref:r,id:n,className:le("text-sm text-muted-foreground",e),...t})});Iz.displayName="FormDescription";const Se=y.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:i}=Uf(),o=s?String(s==null?void 0:s.message):t;return o?c.jsx("p",{ref:n,id:i,className:le("text-sm font-medium text-destructive",e),...r,children:o}):null});Se.displayName="FormMessage";function gm(e,[t,r]){return Math.min(r,Math.max(t,e))}var Lz=[" ","Enter","ArrowUp","ArrowDown"],Fz=[" ","Enter"],Nc="Select",[Vf,$f,zz]=lf(Nc),[Na,aU]=Vr(Nc,[zz,Ca]),Bf=Ca(),[Uz,Si]=Na(Nc),[Vz,$z]=Na(Nc),RE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:u,name:f,autoComplete:d,disabled:m,required:v}=e,w=Bf(t),[g,x]=y.useState(null),[p,h]=y.useState(null),[_,C]=y.useState(!1),E=fc(u),[j=!1,R]=_s({prop:n,defaultProp:s,onChange:i}),[A,P]=_s({prop:o,defaultProp:a,onChange:l}),L=y.useRef(null),q=g?!!g.closest("form"):!0,[T,F]=y.useState(new Set),b=Array.from(T).map($=>$.props.value).join(";");return c.jsx(Ug,{...w,children:c.jsxs(Uz,{required:v,scope:t,trigger:g,onTriggerChange:x,valueNode:p,onValueNodeChange:h,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:xn(),value:A,onValueChange:P,open:j,onOpenChange:R,dir:E,triggerPointerDownPosRef:L,disabled:m,children:[c.jsx(Vf.Provider,{scope:t,children:c.jsx(Vz,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback($=>{F(te=>new Set(te).add($))},[]),onNativeOptionRemove:y.useCallback($=>{F(te=>{const B=new Set(te);return B.delete($),B})},[]),children:r})}),q?c.jsxs(rj,{"aria-hidden":!0,required:v,tabIndex:-1,name:f,autoComplete:d,value:A,onChange:$=>P($.target.value),disabled:m,children:[A===void 0?c.jsx("option",{value:""}):null,Array.from(T)]},b):null]})})};RE.displayName=Nc;var PE="SelectTrigger",AE=y.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,i=Bf(r),o=Si(PE,r),a=o.disabled||n,l=Xe(t,o.onTriggerChange),u=$f(r),[f,d,m]=nj(w=>{const g=u().filter(h=>!h.disabled),x=g.find(h=>h.value===o.value),p=sj(g,w,x);p!==void 0&&o.onValueChange(p.value)}),v=()=>{a||(o.onOpenChange(!0),m())};return c.jsx(Vg,{asChild:!0,...i,children:c.jsx(Ie.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":tj(o.value)?"":void 0,...s,ref:l,onClick:ce(s.onClick,w=>{w.currentTarget.focus()}),onPointerDown:ce(s.onPointerDown,w=>{const g=w.target;g.hasPointerCapture(w.pointerId)&&g.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&(v(),o.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)},w.preventDefault())}),onKeyDown:ce(s.onKeyDown,w=>{const g=f.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&d(w.key),!(g&&w.key===" ")&&Lz.includes(w.key)&&(v(),w.preventDefault())})})})});AE.displayName=PE;var DE="SelectValue",OE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=e,l=Si(DE,r),{onValueNodeHasChildrenChange:u}=l,f=i!==void 0,d=Xe(t,l.onValueNodeChange);return nr(()=>{u(f)},[u,f]),c.jsx(Ie.span,{...a,ref:d,style:{pointerEvents:"none"},children:tj(l.value)?c.jsx(c.Fragment,{children:o}):i})});OE.displayName=DE;var Bz="SelectIcon",ME=y.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return c.jsx(Ie.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});ME.displayName=Bz;var Wz="SelectPortal",IE=e=>c.jsx(pc,{asChild:!0,...e});IE.displayName=Wz;var ro="SelectContent",LE=y.forwardRef((e,t)=>{const r=Si(ro,e.__scopeSelect),[n,s]=y.useState();if(nr(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?js.createPortal(c.jsx(FE,{scope:e.__scopeSelect,children:c.jsx(Vf.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),i):null}return c.jsx(zE,{...e,ref:t})});LE.displayName=ro;var os=10,[FE,ki]=Na(ro),Hz="SelectContentImpl",zE=y.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:w,hideWhenDetached:g,avoidCollisions:x,...p}=e,h=Si(ro,r),[_,C]=y.useState(null),[E,j]=y.useState(null),R=Xe(t,he=>C(he)),[A,P]=y.useState(null),[L,q]=y.useState(null),T=$f(r),[F,b]=y.useState(!1),$=y.useRef(!1);y.useEffect(()=>{if(_)return Wg(_)},[_]),Pg();const te=y.useCallback(he=>{const[ye,...ke]=T().map(Ne=>Ne.ref.current),[Le]=ke.slice(-1),De=document.activeElement;for(const Ne of he)if(Ne===De||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===ye&&E&&(E.scrollTop=0),Ne===Le&&E&&(E.scrollTop=E.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==De))return},[T,E]),B=y.useCallback(()=>te([A,_]),[te,A,_]);y.useEffect(()=>{F&&B()},[F,B]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=h;y.useEffect(()=>{if(_){let he={x:0,y:0};const ye=Le=>{var De,Ne;he={x:Math.abs(Math.round(Le.pageX)-(((De=I.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Le.pageY)-(((Ne=I.current)==null?void 0:Ne.y)??0))}},ke=Le=>{he.x<=10&&he.y<=10?Le.preventDefault():_.contains(Le.target)||Z(!1),document.removeEventListener("pointermove",ye),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",ke,{capture:!0})}}},[_,Z,I]),y.useEffect(()=>{const he=()=>Z(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[Z]);const[Q,z]=nj(he=>{const ye=T().filter(De=>!De.disabled),ke=ye.find(De=>De.ref.current===document.activeElement),Le=sj(ye,he,ke);Le&&setTimeout(()=>Le.ref.current.focus())}),V=y.useCallback((he,ye,ke)=>{const Le=!$.current&&!ke;(h.value!==void 0&&h.value===ye||Le)&&(P(he),Le&&($.current=!0))},[h.value]),fe=y.useCallback(()=>_==null?void 0:_.focus(),[_]),ne=y.useCallback((he,ye,ke)=>{const Le=!$.current&&!ke;(h.value!==void 0&&h.value===ye||Le)&&q(he)},[h.value]),se=n==="popper"?vm:UE,Ae=se===vm?{side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:w,hideWhenDetached:g,avoidCollisions:x}:{};return c.jsx(FE,{scope:r,content:_,viewport:E,onViewportChange:j,itemRefCallback:V,selectedItem:A,onItemLeave:fe,itemTextRefCallback:ne,focusSelectedItem:B,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:c.jsx(mf,{as:ws,allowPinchZoom:!0,children:c.jsx(cf,{asChild:!0,trapped:h.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:ce(s,he=>{var ye;(ye=h.trigger)==null||ye.focus({preventScroll:!0}),he.preventDefault()}),children:c.jsx(ba,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:c.jsx(se,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:he=>he.preventDefault(),...p,...Ae,onPlaced:()=>b(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:ce(p.onKeyDown,he=>{const ye=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!ye&&he.key.length===1&&z(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Le=T().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(he.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const De=he.target,Ne=Le.indexOf(De);Le=Le.slice(Ne+1)}setTimeout(()=>te(Le)),he.preventDefault()}})})})})})})});zE.displayName=Hz;var Yz="SelectItemAlignedPosition",UE=y.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,i=Si(ro,r),o=ki(ro,r),[a,l]=y.useState(null),[u,f]=y.useState(null),d=Xe(t,R=>f(R)),m=$f(r),v=y.useRef(!1),w=y.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:p,focusSelectedItem:h}=o,_=y.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&g&&x&&p){const R=i.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),P=i.valueNode.getBoundingClientRect(),L=p.getBoundingClientRect();if(i.dir!=="rtl"){const De=L.left-A.left,Ne=P.left-De,nt=R.left-Ne,k=R.width+nt,J=Math.max(k,A.width),K=window.innerWidth-os,D=gm(Ne,[os,K-J]);a.style.minWidth=k+"px",a.style.left=D+"px"}else{const De=A.right-L.right,Ne=window.innerWidth-P.right-De,nt=window.innerWidth-R.right-Ne,k=R.width+nt,J=Math.max(k,A.width),K=window.innerWidth-os,D=gm(Ne,[os,K-J]);a.style.minWidth=k+"px",a.style.right=D+"px"}const q=m(),T=window.innerHeight-os*2,F=g.scrollHeight,b=window.getComputedStyle(u),$=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),B=parseInt(b.borderBottomWidth,10),Z=parseInt(b.paddingBottom,10),I=$+te+F+Z+B,Q=Math.min(x.offsetHeight*5,I),z=window.getComputedStyle(g),V=parseInt(z.paddingTop,10),fe=parseInt(z.paddingBottom,10),ne=R.top+R.height/2-os,se=T-ne,Ae=x.offsetHeight/2,he=x.offsetTop+Ae,ye=$+te+he,ke=I-ye;if(ye<=ne){const De=x===q[q.length-1].ref.current;a.style.bottom="0px";const Ne=u.clientHeight-g.offsetTop-g.offsetHeight,nt=Math.max(se,Ae+(De?fe:0)+Ne+B),k=ye+nt;a.style.height=k+"px"}else{const De=x===q[0].ref.current;a.style.top="0px";const nt=Math.max(ne,$+g.offsetTop+(De?V:0)+Ae)+ke;a.style.height=nt+"px",g.scrollTop=ye-ne+g.offsetTop}a.style.margin=`${os}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=T+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[m,i.trigger,i.valueNode,a,u,g,x,p,i.dir,n]);nr(()=>_(),[_]);const[C,E]=y.useState();nr(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const j=y.useCallback(R=>{R&&w.current===!0&&(_(),h==null||h(),w.current=!1)},[_,h]);return c.jsx(Kz,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:j,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:c.jsx(Ie.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});UE.displayName=Yz;var Zz="SelectPopperPosition",vm=y.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=os,...i}=e,o=Bf(r);return c.jsx($g,{...o,...i,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}})});vm.displayName=Zz;var[Kz,ry]=Na(ro,{}),ym="SelectViewport",VE=y.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,i=ki(ym,r),o=ry(ym,r),a=Xe(t,i.onViewportChange),l=y.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx(Vf.Slot,{scope:r,children:c.jsx(Ie.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ce(s.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&d){const v=Math.abs(l.current-f.scrollTop);if(v>0){const w=window.innerHeight-os*2,g=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),p=Math.max(g,x);if(p0?C:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});VE.displayName=ym;var $E="SelectGroup",[Gz,qz]=Na($E),BE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=xn();return c.jsx(Gz,{scope:r,id:s,children:c.jsx(Ie.div,{role:"group","aria-labelledby":s,...n,ref:t})})});BE.displayName=$E;var WE="SelectLabel",HE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=qz(WE,r);return c.jsx(Ie.div,{id:s.id,...n,ref:t})});HE.displayName=WE;var Md="SelectItem",[Xz,YE]=Na(Md),ZE=y.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=e,a=Si(Md,r),l=ki(Md,r),u=a.value===n,[f,d]=y.useState(i??""),[m,v]=y.useState(!1),w=Xe(t,p=>{var h;return(h=l.itemRefCallback)==null?void 0:h.call(l,p,n,s)}),g=xn(),x=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Xz,{scope:r,value:n,disabled:s,textId:g,isSelected:u,onItemTextChange:y.useCallback(p=>{d(h=>h||((p==null?void 0:p.textContent)??"").trim())},[]),children:c.jsx(Vf.ItemSlot,{scope:r,value:n,disabled:s,textValue:f,children:c.jsx(Ie.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:w,onFocus:ce(o.onFocus,()=>v(!0)),onBlur:ce(o.onBlur,()=>v(!1)),onPointerUp:ce(o.onPointerUp,x),onPointerMove:ce(o.onPointerMove,p=>{var h;s?(h=l.onItemLeave)==null||h.call(l):p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(o.onPointerLeave,p=>{var h;p.currentTarget===document.activeElement&&((h=l.onItemLeave)==null||h.call(l))}),onKeyDown:ce(o.onKeyDown,p=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&p.key===" "||(Fz.includes(p.key)&&x(),p.key===" "&&p.preventDefault())})})})})});ZE.displayName=Md;var tl="SelectItemText",KE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...i}=e,o=Si(tl,r),a=ki(tl,r),l=YE(tl,r),u=$z(tl,r),[f,d]=y.useState(null),m=Xe(t,p=>d(p),l.onItemTextChange,p=>{var h;return(h=a.itemTextRefCallback)==null?void 0:h.call(a,p,l.value,l.disabled)}),v=f==null?void 0:f.textContent,w=y.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:g,onNativeOptionRemove:x}=u;return nr(()=>(g(w),()=>x(w)),[g,x,w]),c.jsxs(c.Fragment,{children:[c.jsx(Ie.span,{id:l.textId,...i,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?js.createPortal(i.children,o.valueNode):null]})});KE.displayName=tl;var GE="SelectItemIndicator",qE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return YE(GE,r).isSelected?c.jsx(Ie.span,{"aria-hidden":!0,...n,ref:t}):null});qE.displayName=GE;var xm="SelectScrollUpButton",XE=y.forwardRef((e,t)=>{const r=ki(xm,e.__scopeSelect),n=ry(xm,e.__scopeSelect),[s,i]=y.useState(!1),o=Xe(t,n.onScrollButtonChange);return nr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(JE,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});XE.displayName=xm;var wm="SelectScrollDownButton",QE=y.forwardRef((e,t)=>{const r=ki(wm,e.__scopeSelect),n=ry(wm,e.__scopeSelect),[s,i]=y.useState(!1),o=Xe(t,n.onScrollButtonChange);return nr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(JE,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});QE.displayName=wm;var JE=y.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,i=ki("SelectScrollButton",r),o=y.useRef(null),a=$f(r),l=y.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),nr(()=>{var f;const u=a().find(d=>d.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),c.jsx(Ie.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ce(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:ce(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:ce(s.onPointerLeave,()=>{l()})})}),Qz="SelectSeparator",ej=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(Ie.div,{"aria-hidden":!0,...n,ref:t})});ej.displayName=Qz;var _m="SelectArrow",Jz=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Bf(r),i=Si(_m,r),o=ki(_m,r);return i.open&&o.position==="popper"?c.jsx(Bg,{...s,...n,ref:t}):null});Jz.displayName=_m;function tj(e){return e===""||e===void 0}var rj=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=y.useRef(null),i=Xe(t,s),o=hC(r);return y.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const d=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(d)}},[o,r]),c.jsx(Cc,{asChild:!0,children:c.jsx("select",{...n,ref:i,defaultValue:r})})});rj.displayName="BubbleSelect";function nj(e){const t=Dt(e),r=y.useRef(""),n=y.useRef(0),s=y.useCallback(o=>{const a=r.current+o;t(a),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function sj(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=e8(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function e8(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var t8=RE,ij=AE,r8=OE,n8=ME,s8=IE,oj=LE,i8=VE,o8=BE,aj=HE,lj=ZE,a8=KE,l8=qE,cj=XE,uj=QE,dj=ej;const Pi=t8,rl=o8,Ai=r8,Ys=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(ij,{ref:n,className:le("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),...r,children:[t,c.jsx(n8,{asChild:!0,children:c.jsx(A1,{className:"h-4 w-4 opacity-50"})})]}));Ys.displayName=ij.displayName;const fj=y.forwardRef(({className:e,...t},r)=>c.jsx(cj,{ref:r,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(yP,{className:"h-4 w-4"})}));fj.displayName=cj.displayName;const hj=y.forwardRef(({className:e,...t},r)=>c.jsx(uj,{ref:r,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(A1,{className:"h-4 w-4"})}));hj.displayName=uj.displayName;const Zs=y.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>c.jsx(s8,{children:c.jsxs(oj,{ref:s,className:le("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",r==="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:r,...n,children:[c.jsx(fj,{}),c.jsx(i8,{className:le("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(hj,{})]})}));Zs.displayName=oj.displayName;const Uo=y.forwardRef(({className:e,...t},r)=>c.jsx(aj,{ref:r,className:le("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Uo.displayName=aj.displayName;const fn=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(lj,{ref:n,className:le("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),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(l8,{children:c.jsx(P1,{className:"h-4 w-4"})})}),c.jsx(a8,{children:t})]}));fn.displayName=lj.displayName;const c8=y.forwardRef(({className:e,...t},r)=>c.jsx(dj,{ref:r,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));c8.displayName=dj.displayName;const bm=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["tencent-cdn",["腾讯云-CDN","/imgs/providers/tencent.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["qiniu-cdn",["七牛云-CDN","/imgs/providers/qiniu.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]]]),u8=Array.from(bm.keys()),ny=sv,sy=iv,d8=ov,pj=y.forwardRef(({className:e,...t},r)=>c.jsx(vc,{ref:r,className:le("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}));pj.displayName=vc.displayName;const Wf=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(d8,{children:[c.jsx(pj,{}),c.jsxs(yc,{ref:n,className:le("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),...r,children:[t,c.jsxs(yf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(jg,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Wf.displayName=yc.displayName;const Hf=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Hf.displayName="DialogHeader";const Yf=y.forwardRef(({className:e,...t},r)=>c.jsx(xc,{ref:r,className:le("text-lg font-semibold leading-none tracking-tight",e),...t}));Yf.displayName=xc.displayName;const f8=y.forwardRef(({className:e,...t},r)=>c.jsx(wc,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));f8.displayName=wc.displayName;function h8(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var iy="ScrollArea",[mj,lU]=Vr(iy),[p8,an]=mj(iy),gj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,l]=y.useState(null),[u,f]=y.useState(null),[d,m]=y.useState(null),[v,w]=y.useState(null),[g,x]=y.useState(null),[p,h]=y.useState(0),[_,C]=y.useState(0),[E,j]=y.useState(!1),[R,A]=y.useState(!1),P=Xe(t,q=>l(q)),L=fc(s);return c.jsx(p8,{scope:r,type:n,dir:L,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:d,onContentChange:m,scrollbarX:v,onScrollbarXChange:w,scrollbarXEnabled:E,onScrollbarXEnabledChange:j,scrollbarY:g,onScrollbarYChange:x,scrollbarYEnabled:R,onScrollbarYEnabledChange:A,onCornerWidthChange:h,onCornerHeightChange:C,children:c.jsx(Ie.div,{dir:L,...o,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});gj.displayName=iy;var vj="ScrollAreaViewport",yj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...i}=e,o=an(vj,r),a=y.useRef(null),l=Xe(t,a,o.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),c.jsx(Ie.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});yj.displayName=vj;var Gn="ScrollAreaScrollbar",oy=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=an(Gn,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return y.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?c.jsx(m8,{...n,ref:t,forceMount:r}):s.type==="scroll"?c.jsx(g8,{...n,ref:t,forceMount:r}):s.type==="auto"?c.jsx(xj,{...n,ref:t,forceMount:r}):s.type==="always"?c.jsx(ay,{...n,ref:t}):null});oy.displayName=Gn;var m8=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=an(Gn,e.__scopeScrollArea),[i,o]=y.useState(!1);return y.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),o(!0)},f=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),c.jsx(yr,{present:r||i,children:c.jsx(xj,{"data-state":i?"visible":"hidden",...n,ref:t})})}),g8=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=an(Gn,e.__scopeScrollArea),i=e.orientation==="horizontal",o=Kf(()=>l("SCROLL_END"),100),[a,l]=h8("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,l]),y.useEffect(()=>{const u=s.viewport,f=i?"scrollLeft":"scrollTop";if(u){let d=u[f];const m=()=>{const v=u[f];d!==v&&(l("SCROLL"),o()),d=v};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[s.viewport,i,l,o]),c.jsx(yr,{present:r||a!=="hidden",children:c.jsx(ay,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ce(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ce(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),xj=y.forwardRef((e,t)=>{const r=an(Gn,e.__scopeScrollArea),{forceMount:n,...s}=e,[i,o]=y.useState(!1),a=e.orientation==="horizontal",l=Kf(()=>{if(r.viewport){const u=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,s=an(Gn,e.__scopeScrollArea),i=y.useRef(null),o=y.useRef(0),[a,l]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=kj(a.viewport,a.content),f={...n,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:m=>i.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function d(m,v){return b8(m,o.current,a,v)}return r==="horizontal"?c.jsx(v8,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const m=s.viewport.scrollLeft,v=q0(m,a,s.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=d(m,s.dir))}}):r==="vertical"?c.jsx(y8,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const m=s.viewport.scrollTop,v=q0(m,a);i.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=d(m))}}):null}),v8=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=an(Gn,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),u=Xe(t,l,i.onScrollbarXChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(_j,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Zf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const m=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(m),Ej(m,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ld(o.paddingLeft),paddingEnd:Ld(o.paddingRight)}})}})}),y8=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=an(Gn,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),u=Xe(t,l,i.onScrollbarYChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(_j,{"data-orientation":"vertical",...s,ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Zf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const m=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(m),Ej(m,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ld(o.paddingTop),paddingEnd:Ld(o.paddingBottom)}})}})}),[x8,wj]=mj(Gn),_j=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:d,...m}=e,v=an(Gn,r),[w,g]=y.useState(null),x=Xe(t,P=>g(P)),p=y.useRef(null),h=y.useRef(""),_=v.viewport,C=n.content-n.viewport,E=Dt(f),j=Dt(l),R=Kf(d,10);function A(P){if(p.current){const L=P.clientX-p.current.left,q=P.clientY-p.current.top;u({x:L,y:q})}}return y.useEffect(()=>{const P=L=>{const q=L.target;(w==null?void 0:w.contains(q))&&E(L,C)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[_,w,C,E]),y.useEffect(j,[n,j]),ma(w,R),ma(v.content,R),c.jsx(x8,{scope:r,scrollbar:w,hasThumb:s,onThumbChange:Dt(i),onThumbPointerUp:Dt(o),onThumbPositionChange:j,onThumbPointerDown:Dt(a),children:c.jsx(Ie.div,{...m,ref:x,style:{position:"absolute",...m.style},onPointerDown:ce(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),p.current=w.getBoundingClientRect(),h.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),A(P))}),onPointerMove:ce(e.onPointerMove,A),onPointerUp:ce(e.onPointerUp,P=>{const L=P.target;L.hasPointerCapture(P.pointerId)&&L.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=h.current,v.viewport&&(v.viewport.style.scrollBehavior=""),p.current=null})})})}),Id="ScrollAreaThumb",bj=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=wj(Id,e.__scopeScrollArea);return c.jsx(yr,{present:r||s.hasThumb,children:c.jsx(w8,{ref:t,...n})})}),w8=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,i=an(Id,r),o=wj(Id,r),{onThumbPositionChange:a}=o,l=Xe(t,d=>o.onThumbChange(d)),u=y.useRef(),f=Kf(()=>{u.current&&(u.current(),u.current=void 0)},100);return y.useEffect(()=>{const d=i.viewport;if(d){const m=()=>{if(f(),!u.current){const v=S8(d,a);u.current=v,a()}};return a(),d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[i.viewport,f,a]),c.jsx(Ie.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ce(e.onPointerDownCapture,d=>{const v=d.target.getBoundingClientRect(),w=d.clientX-v.left,g=d.clientY-v.top;o.onThumbPointerDown({x:w,y:g})}),onPointerUp:ce(e.onPointerUp,o.onThumbPointerUp)})});bj.displayName=Id;var ly="ScrollAreaCorner",Sj=y.forwardRef((e,t)=>{const r=an(ly,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.jsx(_8,{...e,ref:t}):null});Sj.displayName=ly;var _8=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=an(ly,r),[i,o]=y.useState(0),[a,l]=y.useState(0),u=!!(i&&a);return ma(s.scrollbarX,()=>{var d;const f=((d=s.scrollbarX)==null?void 0:d.offsetHeight)||0;s.onCornerHeightChange(f),l(f)}),ma(s.scrollbarY,()=>{var d;const f=((d=s.scrollbarY)==null?void 0:d.offsetWidth)||0;s.onCornerWidthChange(f),o(f)}),u?c.jsx(Ie.div,{...n,ref:t,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ld(e){return e?parseInt(e,10):0}function kj(e,t){const r=e/t;return isNaN(r)?0:r}function Zf(e){const t=kj(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function b8(e,t,r,n="ltr"){const s=Zf(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return Cj([l,u],d)(e)}function q0(e,t,r="ltr"){const n=Zf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],u=gm(e,l);return Cj([0,o],[0,a])(u)}function Cj(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Ej(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Kf(e,t){const r=Dt(e),n=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),y.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ma(e,t){const r=Dt(t);nr(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var jj=gj,k8=yj,C8=Sj;const Gf=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(jj,{ref:n,className:le("relative overflow-hidden",e),...r,children:[c.jsx(k8,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(Tj,{}),c.jsx(C8,{})]}));Gf.displayName=jj.displayName;const Tj=y.forwardRef(({className:e,orientation:t="vertical",...r},n)=>c.jsx(oy,{ref:n,orientation:t,className:le("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:c.jsx(bj,{className:"relative flex-1 rounded-full bg-border"})}));Tj.displayName=oy.displayName;const li=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["cloudflare",["Cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["Namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["GoDaddy","/imgs/providers/godaddy.svg"]],["qiniu",["七牛云","/imgs/providers/qiniu.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]]]),X0=e=>li.get(e),Ci=me.union([me.literal("aliyun"),me.literal("tencent"),me.literal("ssh"),me.literal("webhook"),me.literal("cloudflare"),me.literal("qiniu"),me.literal("namesilo"),me.literal("godaddy")],{message:"请选择云服务商"}),Ei=e=>{switch(e){case"aliyun":case"tencent":return"all";case"ssh":case"webhook":case"qiniu":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},E8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Br(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,secretId:me.string().min(1).max(64),secretKey:me.string().min(1).max(64)});let i={secretId:"",secretKey:""};e&&(i=e.config);const o=Wr({resolver:Hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:i.secretId,secretKey:i.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{secretId:l.secretId,secretKey:l.secretKey}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Yr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"secretId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretId"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入SecretId",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"secretKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretKey"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入SecretKey",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},j8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Br(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,accessKeyId:me.string().min(1).max(64),accessSecretId:me.string().min(1).max(64)});let i={accessKeyId:"",accessKeySecret:""};e&&(i=e.config);const o=Wr({resolver:Hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:i.accessKeyId,accessSecretId:i.accessKeySecret}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Yr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"accessKeyId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKeyId"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入AccessKeyId",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"accessSecretId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKeySecret"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入AccessKeySecret",...l})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},cy=y.forwardRef(({className:e,...t},r)=>c.jsx("textarea",{className:le("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));cy.displayName="Textarea";const Nj=({className:e,trigger:t})=>{const{reloadAccessGroups:r}=Br(),[n,s]=y.useState(!1),i=me.object({name:me.string().min(1).max(64)}),o=Wr({resolver:Hr(i),defaultValues:{name:""}}),a=async l=>{try{await RF({name:l.name}),r(),s(!1)}catch(u){Object.entries(u.response.data).forEach(([d,m])=>{o.setError(d,{type:"manual",message:m.message})})}};return c.jsxs(ny,{onOpenChange:s,open:n,children:[c.jsx(sy,{asChild:!0,className:le(e),children:t}),c.jsxs(Wf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Hf,{children:c.jsx(Yf,{children:"添加分组"})}),c.jsx("div",{className:"container py-3",children:c.jsx(Yr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"组名"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入组名",...l,type:"text"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})]})]})},T8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n,reloadAccessGroups:s,config:{accessGroups:i}}=Br(),o=y.useRef(null),[a,l]=y.useState(""),u=e&&e.group?e.group:"",f=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,host:me.string().ip({message:"请输入合法的IP地址"}),group:me.string().optional(),port:me.string().min(1).max(5),username:me.string().min(1).max(64),password:me.string().min(0).max(64),key:me.string().min(0).max(20480),keyFile:me.any().optional(),command:me.string().min(1).max(2048),certPath:me.string().min(0).max(2048),keyPath:me.string().min(0).max(2048)});let d={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(d=e.config);const m=Wr({resolver:Hr(f),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",group:e==null?void 0:e.group,host:d.host,port:d.port,username:d.username,password:d.password,key:d.key,keyFile:d.keyFile,certPath:d.certPath,keyPath:d.keyPath,command:d.command}}),v=async x=>{console.log(x);let p=x.group;p=="emptyId"&&(p="");const h={id:x.id,name:x.name,configType:x.configType,usage:Ei(x.configType),group:p,config:{host:x.host,port:x.port,username:x.username,password:x.password,key:x.key,command:x.command,certPath:x.certPath,keyPath:x.keyPath}};try{const _=await bi(h);t(),h.id=_.id,h.created=_.created,h.updated=_.updated,x.id?n(h):r(h),p!=u&&(u&&await M0({id:u,"access-":h.id}),p&&await M0({id:p,"access+":h.id})),s()}catch(_){Object.entries(_.response.data).forEach(([E,j])=>{m.setError(E,{type:"manual",message:j.message})});return}},w=async x=>{var C;const p=(C=x.target.files)==null?void 0:C[0];if(!p)return;const h=p;l(h.name);const _=await r6(h);m.setValue("key",_)},g=()=>{var x;console.log(o.current),(x=o.current)==null||x.click()};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Yr,{...m,children:c.jsxs("form",{onSubmit:x=>{x.stopPropagation(),m.handleSubmit(v)(x)},className:"space-y-3",children:[c.jsx(Te,{control:m.control,name:"name",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入授权名称",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"group",render:({field:x})=>c.jsxs(Ce,{children:[c.jsxs(Ee,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"授权配置组(用于将一个域名证书部署到多个 ssh 主机)"}),c.jsx(Nj,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Tu,{size:14}),"新增"]})})]}),c.jsx(je,{children:c.jsxs(Pi,{...x,value:x.value,defaultValue:"emptyId",onValueChange:p=>{m.setValue("group",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择分组"})}),c.jsxs(Zs,{children:[c.jsx(fn,{value:"emptyId",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(p=>c.jsx(fn,{value:p.id?p.id:"",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"id",render:({field:x})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"configType",render:({field:x})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...x})}),c.jsx(Se,{})]})}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx(Te,{control:m.control,name:"host",render:({field:x})=>c.jsxs(Ce,{className:"grow",children:[c.jsx(Ee,{children:"服务器IP"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入Host",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"port",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SSH端口"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入Port",...x,type:"number"})}),c.jsx(Se,{})]})})]}),c.jsx(Te,{control:m.control,name:"username",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"用户名"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入用户名",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"password",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"密码"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入密码",...x,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"key",render:({field:x})=>c.jsxs(Ce,{hidden:!0,children:[c.jsx(Ee,{children:"Key(使用证书登录)"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入Key",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"keyFile",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Key(使用证书登录)"}),c.jsx(je,{children:c.jsxs("div",{children:[c.jsx(Je,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:g,children:a||"请选择文件"}),c.jsx(ze,{placeholder:"请输入Key",...x,ref:o,className:"hidden",hidden:!0,type:"file",onChange:w})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"certPath",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"证书上传路径"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入证书上传路径",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"keyPath",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"私钥上传路径"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入私钥上传路径",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:m.control,name:"command",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Command"}),c.jsx(je,{children:c.jsx(cy,{placeholder:"请输入要执行的命令",...x})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},N8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Br(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,url:me.string().url()});let i={url:""};e&&(i=e.config);const o=Wr({resolver:Hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"webhook",url:i.url}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{url:l.url}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Yr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"url",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Webhook Url"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入Webhook Url",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},R8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Br(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,dnsApiToken:me.string().min(1).max(64)});let i={dnsApiToken:""};e&&(i=e.config);const o=Wr({resolver:Hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"cloudflare",dnsApiToken:i.dnsApiToken}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{dnsApiToken:l.dnsApiToken}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Yr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"dnsApiToken",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"CLOUD_DNS_API_TOKEN"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入CLOUD_DNS_API_TOKEN",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},P8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Br(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,accessKey:me.string().min(1).max(64),secretKey:me.string().min(1).max(64)});let i={accessKey:"",secretKey:""};e&&(i=e.config);const o=Wr({resolver:Hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"qiniu",accessKey:i.accessKey,secretKey:i.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{accessKey:l.accessKey,secretKey:l.secretKey}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Yr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"accessKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKey"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入AccessKey",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"secretKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretKey"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入SecretKey",...l})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},A8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Br(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,apiKey:me.string().min(1).max(64)});let i={apiKey:""};e&&(i=e.config);const o=Wr({resolver:Hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"namesilo",apiKey:i.apiKey}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{apiKey:l.apiKey}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Yr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"apiKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"NAMESILO_API_KEY"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入NAMESILO_API_KEY",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},D8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Br(),s=me.object({id:me.string().optional(),name:me.string().min(1).max(64),configType:Ci,apiKey:me.string().min(1).max(64),apiSecret:me.string().min(1).max(64)});let i={apiKey:"",apiSecret:""};e&&(i=e.config);const o=Wr({resolver:Hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"godaddy",apiKey:i.apiKey,apiSecret:i.apiSecret}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{apiKey:l.apiKey,apiSecret:l.apiSecret}};try{const f=await bi(u);if(t(),u.id=f.id,u.created=f.created,u.updated=f.updated,l.id){n(u);return}r(u)}catch(f){Object.entries(f.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Yr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(ze,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"apiKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"GODADDY_API_KEY"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入GODADDY_API_KEY",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"apiSecret",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"GODADDY_API_SECRET"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入GODADDY_API_SECRET",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})};function vl({trigger:e,op:t,data:r,className:n}){const[s,i]=y.useState(!1),o=Array.from(li.keys()),[a,l]=y.useState((r==null?void 0:r.configType)||"");let u=c.jsx(c.Fragment,{children:" "});switch(a){case"tencent":u=c.jsx(E8,{data:r,onAfterReq:()=>{i(!1)}});break;case"aliyun":u=c.jsx(j8,{data:r,onAfterReq:()=>{i(!1)}});break;case"ssh":u=c.jsx(T8,{data:r,onAfterReq:()=>{i(!1)}});break;case"webhook":u=c.jsx(N8,{data:r,onAfterReq:()=>{i(!1)}});break;case"cloudflare":u=c.jsx(R8,{data:r,onAfterReq:()=>{i(!1)}});break;case"qiniu":u=c.jsx(P8,{data:r,onAfterReq:()=>{i(!1)}});break;case"namesilo":u=c.jsx(A8,{data:r,onAfterReq:()=>{i(!1)}});break;case"godaddy":u=c.jsx(D8,{data:r,onAfterReq:()=>{i(!1)}});break}const f=d=>d==a?"border-primary":"";return c.jsxs(ny,{onOpenChange:i,open:s,children:[c.jsx(sy,{asChild:!0,className:le(n),children:e}),c.jsxs(Wf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Hf,{children:c.jsxs(Yf,{children:[t=="add"?"添加":"编辑","授权"]})}),c.jsx(Gf,{className:"max-h-[80vh]",children:c.jsxs("div",{className:"container py-3",children:[c.jsx(ty,{children:"服务商"}),c.jsxs(Pi,{onValueChange:d=>{console.log(d),l(d)},defaultValue:a,children:[c.jsx(Ys,{className:"mt-3",children:c.jsx(Ai,{placeholder:"请选择服务商"})}),c.jsx(Zs,{children:c.jsxs(rl,{children:[c.jsx(Uo,{children:"服务商"}),o.map(d=>{var m,v;return c.jsx(fn,{value:d,children:c.jsxs("div",{className:le("flex items-center space-x-2 rounded cursor-pointer",f(d)),children:[c.jsx("img",{src:(m=li.get(d))==null?void 0:m[1],className:"h-6 w-6"}),c.jsx("div",{children:(v=li.get(d))==null?void 0:v[0]})]})},d)})]})})]}),u]})})]})]})}const O8=({className:e,trigger:t})=>{const{config:{emails:r},setEmails:n}=Br(),[s,i]=y.useState(!1),o=me.object({email:me.string().email()}),a=Wr({resolver:Hr(o),defaultValues:{email:""}}),l=async u=>{if(r.content.emails.includes(u.email)){a.setError("email",{message:"邮箱已存在"});return}const f=[...r.content.emails,u.email];try{const d=await DF({...r,name:"emails",content:{emails:f}});n(d),a.reset(),a.clearErrors(),i(!1)}catch(d){Object.entries(d.response.data).forEach(([v,w])=>{a.setError(v,{type:"manual",message:w.message})})}};return c.jsxs(ny,{onOpenChange:i,open:s,children:[c.jsx(sy,{asChild:!0,className:le(e),children:t}),c.jsxs(Wf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Hf,{children:c.jsx(Yf,{children:"添加邮箱"})}),c.jsx("div",{className:"container py-3",children:c.jsx(Yr,{...a,children:c.jsxs("form",{onSubmit:u=>{console.log(u),u.stopPropagation(),a.handleSubmit(l)(u)},className:"space-y-8",children:[c.jsx(Te,{control:a.control,name:"email",render:({field:u})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"邮箱"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入邮箱",...u,type:"email"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})]})]})},M8=()=>{const{config:{accesses:e,emails:t,accessGroups:r}}=Br(),[n,s]=y.useState(),i=Yn(),[o,a]=y.useState("base"),[l,u]=y.useState(n?n.targetType:"");y.useEffect(()=>{const p=new URLSearchParams(i.search).get("id");p&&(async()=>{const _=await a6(p);s(_),u(_.targetType)})()},[i.search]);const f=me.object({id:me.string().optional(),domain:me.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),email:me.string().email().optional(),access:me.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:me.string().optional(),targetType:me.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"}),variables:me.string().optional(),group:me.string().optional()}),d=Wr({resolver:Hr(f),defaultValues:{id:"",domain:"",email:"",access:"",targetAccess:"",targetType:"",variables:"",group:""}});y.useEffect(()=>{n&&d.reset({id:n.id,domain:n.domain,email:n.email,access:n.access,targetAccess:n.targetAccess,targetType:n.targetType,variables:n.variables,group:n.group})},[n,d]);const m=e.filter(x=>{if(x.usage=="apply")return!1;if(l=="")return!0;const p=l.split("-");return x.configType===p[0]}),{toast:v}=Ec(),w=nn(),g=async x=>{const p=x.group=="emptyId"?"":x.group,h=x.targetAccess==="emptyId"?"":x.targetAccess;if(p==""&&h==""){d.setError("group",{type:"manual",message:"部署授权和部署授权组至少选一个"}),d.setError("targetAccess",{type:"manual",message:"部署授权和部署授权组至少选一个"});return}const _={id:x.id,crontab:"0 0 * * *",domain:x.domain,email:x.email,access:x.access,group:p,targetAccess:h,targetType:x.targetType,variables:x.variables};try{await dm(_);let C="域名编辑成功";_.id==""&&(C="域名添加成功"),v({title:"成功",description:C}),w("/domains")}catch(C){Object.entries(C.response.data).forEach(([j,R])=>{d.setError(j,{type:"manual",message:R.message})});return}};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(Yv,{}),c.jsxs("div",{className:" h-5 text-muted-foreground",children:[n!=null&&n.id?"编辑":"新增","域名"]}),c.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[c.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex",children:[c.jsx("div",{className:le("cursor-pointer text-right",o==="base"?"text-primary":""),onClick:()=>{a("base")},children:"基础设置"}),c.jsx("div",{className:le("cursor-pointer text-right",o==="advance"?"text-primary":""),onClick:()=>{a("advance")},children:"高级设置"})]}),c.jsx("div",{className:"w-full md:w-[35em] bg-gray-100 dark:bg-gray-900 p-5 rounded mt-3 md:mt-0",children:c.jsx(Yr,{...d,children:c.jsxs("form",{onSubmit:d.handleSubmit(g),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:d.control,name:"domain",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsx(Ee,{children:"域名"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"请输入域名",...x})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"email",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"Email(申请证书需要提供邮箱)"}),c.jsx(O8,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Tu,{size:14}),"新增"]})})]}),c.jsx(je,{children:c.jsxs(Pi,{...x,value:x.value,onValueChange:p=>{d.setValue("email",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择邮箱"})}),c.jsx(Zs,{children:c.jsxs(rl,{children:[c.jsx(Uo,{children:"邮箱列表"}),t.content.emails.map(p=>c.jsx(fn,{value:p,children:c.jsx("div",{children:p})},p))]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"access",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"DNS 服务商授权配置"}),c.jsx(vl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Tu,{size:14}),"新增"]}),op:"add"})]}),c.jsx(je,{children:c.jsxs(Pi,{...x,value:x.value,onValueChange:p=>{d.setValue("access",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择授权配置"})}),c.jsx(Zs,{children:c.jsxs(rl,{children:[c.jsx(Uo,{children:"服务商授权配置"}),e.filter(p=>p.usage!="deploy").map(p=>{var h;return c.jsx(fn,{value:p.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(h=li.get(p.configType))==null?void 0:h[1]}),c.jsx("div",{children:p.name})]})},p.id)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"targetType",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsx(Ee,{children:"部署服务类型"}),c.jsx(je,{children:c.jsxs(Pi,{...x,onValueChange:p=>{u(p),d.setValue("targetType",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择部署服务类型"})}),c.jsx(Zs,{children:c.jsxs(rl,{children:[c.jsx(Uo,{children:"部署服务类型"}),u8.map(p=>{var h,_;return c.jsx(fn,{value:p,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(h=bm.get(p))==null?void 0:h[1]}),c.jsx("div",{children:(_=bm.get(p))==null?void 0:_[0]})]})},p)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"targetAccess",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"部署服务商授权配置"}),c.jsx(vl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Tu,{size:14}),"新增"]}),op:"add"})]}),c.jsx(je,{children:c.jsxs(Pi,{...x,onValueChange:p=>{d.setValue("targetAccess",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择授权配置"})}),c.jsx(Zs,{children:c.jsxs(rl,{children:[c.jsxs(Uo,{children:["服务商授权配置",d.getValues().targetAccess]}),c.jsx(fn,{value:"emptyId",children:c.jsx("div",{className:"flex items-center space-x-2",children:"--"})}),m.map(p=>{var h;return c.jsx(fn,{value:p.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(h=li.get(p.configType))==null?void 0:h[1]}),c.jsx("div",{children:p.name})]})},p.id)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"group",render:({field:x})=>c.jsxs(Ce,{hidden:o!="advance"||l!="ssh",children:[c.jsx(Ee,{className:"w-full flex justify-between",children:c.jsx("div",{children:"部署配置组(用于将一个域名证书部署到多个 ssh 主机)"})}),c.jsx(je,{children:c.jsxs(Pi,{...x,value:x.value,defaultValue:"emptyId",onValueChange:p=>{d.setValue("group",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择分组"})}),c.jsxs(Zs,{children:[c.jsx(fn,{value:"emptyId",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),r.filter(p=>{var h;return p.expand&&((h=p.expand)==null?void 0:h.access.length)>0}).map(p=>c.jsx(fn,{value:p.id?p.id:"",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:d.control,name:"variables",render:({field:x})=>c.jsxs(Ce,{hidden:o!="advance",children:[c.jsx(Ee,{children:"变量"}),c.jsx(je,{children:c.jsx(cy,{placeholder:`可在SSH部署中使用,形如: key=val; -key2=val2;`,...x,className:"placeholder:whitespace-pre-wrap"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})]})]})})},y8=()=>{const{config:e,deleteAccess:t}=$r(),{accesses:r}=e,n=10,s=Math.ceil(r.length/n),i=rn(),o=Yn(),a=new URLSearchParams(o.search),l=a.get("page"),u=l?Number(l):1,f=a.get("accessGroupId"),d=(u-1)*n,m=d+n,v=async w=>{const g=await u5(w);t(g.id)};return c.jsxs("div",{className:"",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),c.jsx(vl,{trigger:c.jsx(Je,{children:"添加授权"}),op:"add"})]}),r.length===0?c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(rP,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),c.jsx(vl,{trigger:c.jsx(Je,{children:"添加授权"}),op:"add",className:"mt-3"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"名称"}),c.jsx("div",{className:"w-48",children:"服务商"}),c.jsx("div",{className:"w-52",children:"创建时间"}),c.jsx("div",{className:"w-52",children:"更新时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.filter(w=>f?w.group==f:!0).slice(d,m).map(w=>{var g,x;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:w.name}),c.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[c.jsx("img",{src:(g=ai.get(w.configType))==null?void 0:g[1],className:"w-6"}),c.jsx("div",{children:(x=ai.get(w.configType))==null?void 0:x[0]})]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",w.created&&da(w.created)]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",w.updated&&da(w.updated)]}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(vl,{trigger:c.jsx(Je,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:w}),c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>{v(w)},children:"删除"})]})]},w.id)}),c.jsx(zk,{totalPages:s,currentPage:u,onPageChange:w=>{a.set("page",w.toString()),i({search:a.toString()})}})]})]})},x8=dc("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"}}),cy=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx("div",{ref:n,role:"alert",className:le(x8({variant:t}),e),...r}));cy.displayName="Alert";const uy=y.forwardRef(({className:e,...t},r)=>c.jsx("h5",{ref:r,className:le("mb-1 font-medium leading-none tracking-tight",e),...t}));uy.displayName="AlertTitle";const dy=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("text-sm [&_p]:leading-relaxed",e),...t}));dy.displayName="AlertDescription";const kj=async e=>{let t=1;e.page&&(t=e.page);let r=50;e.perPage&&(r=e.perPage);let n="domain!=null";return e.domain&&(n=`domain="${e.domain}"`),await ft().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},w8=()=>{const e=rn(),[t,r]=y.useState(),[n]=BR(),s=n.get("domain");return y.useEffect(()=>{(async()=>{const o={};s&&(o.domain=s);const a=await kj(o);r(a.items)})()},[s]),c.jsxs(qf,{className:"h-[80vh] overflow-hidden",children:[c.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(i=>{var o,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(o=i.expand.domain)==null?void 0:o.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:i.phase==="deploy"&&i.phaseSuccess?c.jsx(Cg,{size:16,className:"text-green-700"}):c.jsx(Eg,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Ov,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:da(i.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(av,{children:[c.jsx(lv,{asChild:!0,children:c.jsx(Je,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(xf,{className:"sm:max-w-5xl",children:[c.jsx(cv,{children:c.jsxs(uv,{children:[(a=i.expand.domain)==null?void 0:a.domain,"-",i.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&c.jsx(c.Fragment,{children:i.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.apply&&c.jsx(c.Fragment,{children:i.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.deploy&&c.jsx(c.Fragment,{children:i.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},i.id)})]}):c.jsx(c.Fragment,{children:c.jsxs(cy,{className:"max-w-[40em] mx-auto mt-20",children:[c.jsx(uy,{children:"暂无数据"}),c.jsxs(dy,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(N1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(Je,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},Fd=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",_8=me.object({username:me.string().email({message:"请输入正确的邮箱地址"}),password:me.string().min(10,{message:"密码至少10个字符"})}),b8=()=>{const e=Wr({resolver:Br(_8),defaultValues:{username:"",password:""}}),t=async n=>{try{await ft().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const i=Fd(s);e.setError("username",{message:i}),e.setError("password",{message:i})}},r=rn();return c.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[c.jsx("div",{className:"flex justify-center mb-10",children:c.jsx("img",{src:"/vite.svg",className:"w-16"})}),c.jsx(Hr,{...e,children:c.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:e.control,name:"username",render:({field:n})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"用户名"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"email",...n})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:e.control,name:"password",render:({field:n})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"shadcn",...n,type:"password"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"登录"})})]})})]})},S8=()=>ft().authStore.isValid&&ft().authStore.isAdmin?c.jsx(C1,{to:"/"}):c.jsx("div",{className:"container",children:c.jsx(kg,{})}),k8=me.object({oldPassword:me.string().min(10,{message:"密码至少10个字符"}),newPassword:me.string().min(10,{message:"密码至少10个字符"}),confirmPassword:me.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),C8=()=>{const{toast:e}=Cc(),t=rn(),r=Wr({resolver:Br(k8),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var i,o;try{await ft().admins.authWithPassword((i=ft().authStore.model)==null?void 0:i.email,s.oldPassword)}catch(a){const l=Fd(a);r.setError("oldPassword",{message:l})}try{await ft().admins.update((o=ft().authStore.model)==null?void 0:o.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),ft().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const l=Fd(a);e({title:"修改密码失败",description:l,variant:"destructive"})}};return c.jsx(c.Fragment,{children:c.jsx(Hr,{...r,children:c.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:r.control,name:"oldPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"当前密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"当前密码",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:r.control,name:"newPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"新密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"newPassword",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:r.control,name:"confirmPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"确认密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"confirmPassword",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"确认修改"})})]})})})},E8=()=>c.jsxs("div",{children:[c.jsx(Df,{}),c.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:"设置密码"}),c.jsx("div",{className:"w-full sm:w-[35em] mt-10 flex flex-col p-3 mx-auto",children:c.jsx(kg,{})})]}),j8=()=>{const[e,t]=y.useState(),[r,n]=y.useState(),s=rn();return y.useEffect(()=>{(async()=>{const o=await $F();t(o)})()},[]),y.useEffect(()=>{(async()=>{const a=await kj({perPage:8});n(a.items)})()},[]),c.jsxs("div",{className:"flex flex-col",children:[c.jsx("div",{className:"flex justify-between items-center",children:c.jsx("div",{className:"text-muted-foreground",children:"控制面板"})}),c.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(oP,{size:48,strokeWidth:1,className:"text-blue-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"所有"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?c.jsx(tr,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(qR,{size:48,strokeWidth:1,className:"text-red-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"即将过期"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?c.jsx(tr,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(nP,{size:48,strokeWidth:1,className:"text-green-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"启用中"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?c.jsx(tr,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(KR,{size:48,strokeWidth:1,className:"text-gray-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"未启用"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?c.jsx(tr,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:"部署历史"}),(r==null?void 0:r.length)==0?c.jsx(c.Fragment,{children:c.jsxs(cy,{className:"max-w-[40em] mt-10",children:[c.jsx(uy,{children:"暂无数据"}),c.jsxs(dy,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(N1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(Je,{onClick:()=>{s("/edit")},children:"添加域名"})})]})]})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),r==null?void 0:r.map(i=>{var o,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(o=i.expand.domain)==null?void 0:o.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:i.phase==="deploy"&&i.phaseSuccess?c.jsx(Cg,{size:16,className:"text-green-700"}):c.jsx(Eg,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Ov,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:da(i.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(av,{children:[c.jsx(lv,{asChild:!0,children:c.jsx(Je,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(xf,{className:"sm:max-w-5xl",children:[c.jsx(cv,{children:c.jsxs(uv,{children:[(a=i.expand.domain)==null?void 0:a.domain,"-",i.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&c.jsx(c.Fragment,{children:i.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.apply&&c.jsx(c.Fragment,{children:i.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.deploy&&c.jsx(c.Fragment,{children:i.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},i.id)})]})]})]})},Cj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Cj.displayName="Card";const Ej=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("flex flex-col space-y-1.5 p-6",e),...t}));Ej.displayName="CardHeader";const jj=y.forwardRef(({className:e,...t},r)=>c.jsx("h3",{ref:r,className:le("text-2xl font-semibold leading-none tracking-tight",e),...t}));jj.displayName="CardTitle";const Tj=y.forwardRef(({className:e,...t},r)=>c.jsx("p",{ref:r,className:le("text-sm text-muted-foreground",e),...t}));Tj.displayName="CardDescription";const Nj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("p-6 pt-0",e),...t}));Nj.displayName="CardContent";const Rj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("flex items-center p-6 pt-0",e),...t}));Rj.displayName="CardFooter";const T8=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=$r(),{toast:r}=Cc(),n=rn(),s=async o=>{try{await d5(o),t()}catch(a){r({title:"删除失败",description:Fd(a),variant:"destructive"});return}},i=()=>{n("/access")};return c.jsxs("div",{children:[c.jsx(Df,{}),c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"部署授权组"}),c.jsx(km,{trigger:c.jsx(Je,{children:"新增授权组"})})]}),c.jsxs("div",{className:"mt-10",children:[c.jsx(hl,{when:e.length==0,children:c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(ud,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(km,{trigger:c.jsx(Je,{children:"新增授权组"}),className:"mt-3"})]})})}),c.jsx(qf,{className:"h-[75vh] overflow-hidden",children:c.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(o=>c.jsxs(Cj,{className:"w-full md:w-[350px]",children:[c.jsxs(Ej,{children:[c.jsx(jj,{children:o.name}),c.jsxs(Tj,{children:["共有",o.expand?o.expand.access.length:0,"个部署授权配置"]})]}),c.jsx(Nj,{className:"min-h-[180px]",children:o.expand?c.jsx(c.Fragment,{children:o.expand.access.slice(0,3).map(a=>c.jsx("div",{className:"flex flex-col mb-3",children:c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"",children:c.jsx("img",{src:Z0(a.configType)[1],alt:"provider",className:"w-8 h-8"})}),c.jsxs("div",{className:"ml-3",children:[c.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:a.name}),c.jsx("div",{className:"text-xs text-muted-foreground",children:Z0(a.configType)[0]})]})]})},a.id))}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[c.jsx("div",{children:c.jsx(ud,{size:40})}),c.jsx("div",{className:"ml-2",children:"暂无部署授权配置,请添加后开始使用吧"})]})})}),c.jsx(Rj,{children:c.jsxs("div",{className:"flex justify-end w-full",children:[c.jsx(hl,{when:!!(o.expand&&o.expand.access.length>0),children:c.jsx("div",{children:c.jsx(Je,{size:"sm",variant:"link",onClick:()=>{n(`/access?accessGroupId=${o.id}`)},children:"所有授权"})})}),c.jsx(hl,{when:!o.expand||o.expand.access.length==0,children:c.jsx("div",{children:c.jsx(Je,{size:"sm",onClick:i,children:"新增授权"})})}),c.jsx("div",{className:"ml-3",children:c.jsxs(iC,{children:[c.jsx(oC,{asChild:!0,children:c.jsx(Je,{variant:"destructive",size:"sm",children:"删除"})}),c.jsxs(Mv,{children:[c.jsxs(Iv,{children:[c.jsx(Fv,{className:"dark:text-gray-200",children:"删除组"}),c.jsx(zv,{children:"确定要删除部署授权组吗?"})]}),c.jsxs(Lv,{children:[c.jsx(Vv,{className:"dark:text-gray-200",children:"取消"}),c.jsx(Uv,{onClick:()=>{s(o.id?o.id:"")},children:"确认"})]})]})]})})]})})]}))})})]})]})},N8=NR([{path:"/",element:c.jsx(k5,{}),children:[{path:"/",element:c.jsx(j8,{})},{path:"/domains",element:c.jsx(ZF,{})},{path:"/edit",element:c.jsx(v8,{})},{path:"/access",element:c.jsx(y8,{})},{path:"/access_groups",element:c.jsx(T8,{})},{path:"/history",element:c.jsx(w8,{})},{path:"/setting",element:c.jsx(E8,{}),children:[{path:"/setting/password",element:c.jsx(C8,{})}]}]},{path:"/login",element:c.jsx(S8,{}),children:[{path:"/login",element:c.jsx(b8,{})}]},{path:"/about",element:c.jsx("div",{children:"About"})}]);Kh.createRoot(document.getElementById("root")).render(c.jsx(tt.StrictMode,{children:c.jsx(y5,{defaultTheme:"dark",storageKey:"vite-ui-theme",children:c.jsx(FR,{router:N8})})}))});export default R8(); +key2=val2;`,...x,className:"placeholder:whitespace-pre-wrap"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})]})]})})},Rj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Rj.displayName="Card";const Pj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("flex flex-col space-y-1.5 p-6",e),...t}));Pj.displayName="CardHeader";const Aj=y.forwardRef(({className:e,...t},r)=>c.jsx("h3",{ref:r,className:le("text-2xl font-semibold leading-none tracking-tight",e),...t}));Aj.displayName="CardTitle";const Dj=y.forwardRef(({className:e,...t},r)=>c.jsx("p",{ref:r,className:le("text-sm text-muted-foreground",e),...t}));Dj.displayName="CardDescription";const Oj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("p-6 pt-0",e),...t}));Oj.displayName="CardContent";const Mj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("flex items-center p-6 pt-0",e),...t}));Mj.displayName="CardFooter";const Fd=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",I8=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=Br(),{toast:r}=Ec(),n=nn(),s=async o=>{try{await NF(o),t()}catch(a){r({title:"删除失败",description:Fd(a),variant:"destructive"});return}},i=()=>{n("/access")};return c.jsxs("div",{className:"mt-10",children:[c.jsx(hl,{when:e.length==0,children:c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(Gx,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(Nj,{trigger:c.jsx(Je,{children:"新增授权组"}),className:"mt-3"})]})})}),c.jsx(Gf,{className:"h-[75vh] overflow-hidden",children:c.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(o=>c.jsxs(Rj,{className:"w-full md:w-[350px]",children:[c.jsxs(Pj,{children:[c.jsx(Aj,{children:o.name}),c.jsxs(Dj,{children:["共有",o.expand?o.expand.access.length:0,"个部署授权配置"]})]}),c.jsx(Oj,{className:"min-h-[180px]",children:o.expand?c.jsx(c.Fragment,{children:o.expand.access.slice(0,3).map(a=>c.jsx("div",{className:"flex flex-col mb-3",children:c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"",children:c.jsx("img",{src:X0(a.configType)[1],alt:"provider",className:"w-8 h-8"})}),c.jsxs("div",{className:"ml-3",children:[c.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:a.name}),c.jsx("div",{className:"text-xs text-muted-foreground",children:X0(a.configType)[0]})]})]})},a.id))}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[c.jsx("div",{children:c.jsx(Gx,{size:40})}),c.jsx("div",{className:"ml-2",children:"暂无部署授权配置,请添加后开始使用吧"})]})})}),c.jsx(Mj,{children:c.jsxs("div",{className:"flex justify-end w-full",children:[c.jsx(hl,{when:!!(o.expand&&o.expand.access.length>0),children:c.jsx("div",{children:c.jsx(Je,{size:"sm",variant:"link",onClick:()=>{n(`/access?accessGroupId=${o.id}&tab=access`,{replace:!0})},children:"所有授权"})})}),c.jsx(hl,{when:!o.expand||o.expand.access.length==0,children:c.jsx("div",{children:c.jsx(Je,{size:"sm",onClick:i,children:"新增授权"})})}),c.jsx("div",{className:"ml-3",children:c.jsxs(uC,{children:[c.jsx(dC,{asChild:!0,children:c.jsx(Je,{variant:"destructive",size:"sm",children:"删除"})}),c.jsxs(Mv,{children:[c.jsxs(Iv,{children:[c.jsx(Fv,{className:"dark:text-gray-200",children:"删除组"}),c.jsx(zv,{children:"确定要删除部署授权组吗?"})]}),c.jsxs(Lv,{children:[c.jsx(Vv,{className:"dark:text-gray-200",children:"取消"}),c.jsx(Uv,{onClick:()=>{s(o.id?o.id:"")},children:"确认"})]})]})]})})]})})]}))})})]})};var uy="Tabs",[L8,cU]=Vr(uy,[hf]),Ij=hf(),[F8,dy]=L8(uy),Lj=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...u}=e,f=fc(a),[d,m]=_s({prop:n,onChange:s,defaultProp:i});return c.jsx(F8,{scope:r,baseId:xn(),value:d,onValueChange:m,orientation:o,dir:f,activationMode:l,children:c.jsx(Ie.div,{dir:f,"data-orientation":o,...u,ref:t})})});Lj.displayName=uy;var Fj="TabsList",zj=y.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,i=dy(Fj,r),o=Ij(r);return c.jsx(gb,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:c.jsx(Ie.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});zj.displayName=Fj;var Uj="TabsTrigger",Vj=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=e,o=dy(Uj,r),a=Ij(r),l=Wj(o.baseId,n),u=Hj(o.baseId,n),f=n===o.value;return c.jsx(vb,{asChild:!0,...a,focusable:!s,active:f,children:c.jsx(Ie.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:t,onMouseDown:ce(e.onMouseDown,d=>{!s&&d.button===0&&d.ctrlKey===!1?o.onValueChange(n):d.preventDefault()}),onKeyDown:ce(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(n)}),onFocus:ce(e.onFocus,()=>{const d=o.activationMode!=="manual";!f&&!s&&d&&o.onValueChange(n)})})})});Vj.displayName=Uj;var $j="TabsContent",Bj=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=e,a=dy($j,r),l=Wj(a.baseId,n),u=Hj(a.baseId,n),f=n===a.value,d=y.useRef(f);return y.useEffect(()=>{const m=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(m)},[]),c.jsx(yr,{present:s||f,children:({present:m})=>c.jsx(Ie.div,{"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:m&&i})})});Bj.displayName=$j;function Wj(e,t){return`${e}-trigger-${t}`}function Hj(e,t){return`${e}-content-${t}`}var z8=Lj,Yj=zj,Zj=Vj,Kj=Bj;const U8=z8,Gj=y.forwardRef(({className:e,...t},r)=>c.jsx(Yj,{ref:r,className:le("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Gj.displayName=Yj.displayName;const Sm=y.forwardRef(({className:e,...t},r)=>c.jsx(Zj,{ref:r,className:le("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Sm.displayName=Zj.displayName;const km=y.forwardRef(({className:e,...t},r)=>c.jsx(Kj,{ref:r,className:le("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));km.displayName=Kj.displayName;const V8=()=>{const{config:e,deleteAccess:t}=Br(),{accesses:r}=e,n=10,s=Math.ceil(r.length/n),i=nn(),o=Yn(),a=new URLSearchParams(o.search),l=a.get("page"),u=l?Number(l):1,f=a.get("tab"),d=a.get("accessGroupId"),m=(u-1)*n,v=m+n,w=async x=>{const p=await TF(x);t(p.id)},g=x=>{a.set("tab",x),i({search:a.toString()})};return c.jsxs("div",{className:"",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),c.jsx(vl,{trigger:c.jsx(Je,{children:"添加授权"}),op:"add"})]}),c.jsxs(U8,{defaultValue:f||"access",value:f||"access",className:"w-full mt-5",children:[c.jsxs(Gj,{className:"space-x-5 px-3",children:[c.jsx(Sm,{value:"access",onClick:()=>{g("access")},children:"授权管理"}),c.jsx(Sm,{value:"access_group",onClick:()=>{g("access_group")},children:"授权组管理"})]}),c.jsx(km,{value:"access",children:r.length===0?c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(bP,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),c.jsx(vl,{trigger:c.jsx(Je,{children:"添加授权"}),op:"add",className:"mt-3"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"名称"}),c.jsx("div",{className:"w-48",children:"服务商"}),c.jsx("div",{className:"w-52",children:"创建时间"}),c.jsx("div",{className:"w-52",children:"更新时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.filter(x=>d?x.group==d:!0).slice(m,v).map(x=>{var p,h;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:x.name}),c.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[c.jsx("img",{src:(p=li.get(x.configType))==null?void 0:p[1],className:"w-6"}),c.jsx("div",{children:(h=li.get(x.configType))==null?void 0:h[0]})]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于"," ",x.created&&da(x.created)]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于"," ",x.updated&&da(x.updated)]}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(vl,{trigger:c.jsx(Je,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:x}),c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>{w(x)},children:"删除"})]})]},x.id)}),c.jsx(Wk,{totalPages:s,currentPage:u,onPageChange:x=>{a.set("page",x.toString()),i({search:a.toString()})}})]})}),c.jsx(km,{value:"access_group",children:c.jsx(I8,{})})]})]})},$8=dc("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"}}),fy=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx("div",{ref:n,role:"alert",className:le($8({variant:t}),e),...r}));fy.displayName="Alert";const hy=y.forwardRef(({className:e,...t},r)=>c.jsx("h5",{ref:r,className:le("mb-1 font-medium leading-none tracking-tight",e),...t}));hy.displayName="AlertTitle";const py=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("text-sm [&_p]:leading-relaxed",e),...t}));py.displayName="AlertDescription";const qj=async e=>{let t=1;e.page&&(t=e.page);let r=50;e.perPage&&(r=e.perPage);let n="domain!=null";return e.domain&&(n=`domain="${e.domain}"`),await ft().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},B8=()=>{const e=nn(),[t,r]=y.useState(),[n]=uP(),s=n.get("domain");return y.useEffect(()=>{(async()=>{const o={};s&&(o.domain=s);const a=await qj(o);r(a.items)})()},[s]),c.jsxs(Gf,{className:"h-[80vh] overflow-hidden",children:[c.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(i=>{var o,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(o=i.expand.domain)==null?void 0:o.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:i.phase==="deploy"&&i.phaseSuccess?c.jsx(Cg,{size:16,className:"text-green-700"}):c.jsx(Eg,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Ov,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:da(i.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(av,{children:[c.jsx(lv,{asChild:!0,children:c.jsx(Je,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(xf,{className:"sm:max-w-5xl",children:[c.jsx(cv,{children:c.jsxs(uv,{children:[(a=i.expand.domain)==null?void 0:a.domain,"-",i.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&c.jsx(c.Fragment,{children:i.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.apply&&c.jsx(c.Fragment,{children:i.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.deploy&&c.jsx(c.Fragment,{children:i.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},i.id)})]}):c.jsx(c.Fragment,{children:c.jsxs(fy,{className:"max-w-[40em] mx-auto mt-20",children:[c.jsx(hy,{children:"暂无数据"}),c.jsxs(py,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(D1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(Je,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},W8=me.object({username:me.string().email({message:"请输入正确的邮箱地址"}),password:me.string().min(10,{message:"密码至少10个字符"})}),H8=()=>{const e=Wr({resolver:Hr(W8),defaultValues:{username:"",password:""}}),t=async n=>{try{await ft().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const i=Fd(s);e.setError("username",{message:i}),e.setError("password",{message:i})}},r=nn();return c.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[c.jsx("div",{className:"flex justify-center mb-10",children:c.jsx("img",{src:"/vite.svg",className:"w-16"})}),c.jsx(Yr,{...e,children:c.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:e.control,name:"username",render:({field:n})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"用户名"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"email",...n})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:e.control,name:"password",render:({field:n})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"密码"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"shadcn",...n,type:"password"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"登录"})})]})})]})},Y8=()=>ft().authStore.isValid&&ft().authStore.isAdmin?c.jsx(N1,{to:"/"}):c.jsx("div",{className:"container",children:c.jsx(kg,{})}),Z8=me.object({oldPassword:me.string().min(10,{message:"密码至少10个字符"}),newPassword:me.string().min(10,{message:"密码至少10个字符"}),confirmPassword:me.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),K8=()=>{const{toast:e}=Ec(),t=nn(),r=Wr({resolver:Hr(Z8),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var i,o;try{await ft().admins.authWithPassword((i=ft().authStore.model)==null?void 0:i.email,s.oldPassword)}catch(a){const l=Fd(a);r.setError("oldPassword",{message:l})}try{await ft().admins.update((o=ft().authStore.model)==null?void 0:o.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),ft().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const l=Fd(a);e({title:"修改密码失败",description:l,variant:"destructive"})}};return c.jsx(c.Fragment,{children:c.jsx(Yr,{...r,children:c.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:r.control,name:"oldPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"当前密码"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"当前密码",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:r.control,name:"newPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"新密码"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"newPassword",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:r.control,name:"confirmPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"确认密码"}),c.jsx(je,{children:c.jsx(ze,{placeholder:"confirmPassword",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"确认修改"})})]})})})},G8=()=>c.jsxs("div",{children:[c.jsx(Yv,{}),c.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:"设置密码"}),c.jsx("div",{className:"w-full sm:w-[35em] mt-10 flex flex-col p-3 mx-auto",children:c.jsx(kg,{})})]}),q8=()=>{const[e,t]=y.useState(),[r,n]=y.useState(),s=nn();return y.useEffect(()=>{(async()=>{const o=await o6();t(o)})()},[]),y.useEffect(()=>{(async()=>{const a=await qj({perPage:8});n(a.items)})()},[]),c.jsxs("div",{className:"flex flex-col",children:[c.jsx("div",{className:"flex justify-between items-center",children:c.jsx("div",{className:"text-muted-foreground",children:"控制面板"})}),c.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(EP,{size:48,strokeWidth:1,className:"text-blue-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"所有"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?c.jsx(dr,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(gP,{size:48,strokeWidth:1,className:"text-red-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"即将过期"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?c.jsx(dr,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(SP,{size:48,strokeWidth:1,className:"text-green-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"启用中"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?c.jsx(dr,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(pP,{size:48,strokeWidth:1,className:"text-gray-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"未启用"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?c.jsx(dr,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:"部署历史"}),(r==null?void 0:r.length)==0?c.jsx(c.Fragment,{children:c.jsxs(fy,{className:"max-w-[40em] mt-10",children:[c.jsx(hy,{children:"暂无数据"}),c.jsxs(py,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(D1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(Je,{onClick:()=>{s("/edit")},children:"添加域名"})})]})]})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),r==null?void 0:r.map(i=>{var o,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(o=i.expand.domain)==null?void 0:o.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:i.phase==="deploy"&&i.phaseSuccess?c.jsx(Cg,{size:16,className:"text-green-700"}):c.jsx(Eg,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Ov,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:da(i.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(av,{children:[c.jsx(lv,{asChild:!0,children:c.jsx(Je,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(xf,{className:"sm:max-w-5xl",children:[c.jsx(cv,{children:c.jsxs(uv,{children:[(a=i.expand.domain)==null?void 0:a.domain,"-",i.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&c.jsx(c.Fragment,{children:i.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.apply&&c.jsx(c.Fragment,{children:i.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.deploy&&c.jsx(c.Fragment,{children:i.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},i.id)})]})]})]})},X8=GR([{path:"/",element:c.jsx($F,{}),children:[{path:"/",element:c.jsx(q8,{})},{path:"/domains",element:c.jsx(d6,{})},{path:"/edit",element:c.jsx(M8,{})},{path:"/access",element:c.jsx(V8,{})},{path:"/history",element:c.jsx(B8,{})},{path:"/setting",element:c.jsx(G8,{}),children:[{path:"/setting/password",element:c.jsx(K8,{})}]}]},{path:"/login",element:c.jsx(Y8,{}),children:[{path:"/login",element:c.jsx(H8,{})}]},{path:"/about",element:c.jsx("div",{children:"About"})}]);Zh.createRoot(document.getElementById("root")).render(c.jsx(tt.StrictMode,{children:c.jsx(IF,{defaultTheme:"dark",storageKey:"vite-ui-theme",children:c.jsx(sP,{router:X8})})}))});export default Q8(); diff --git a/ui/dist/assets/index-ChWRjRip.css b/ui/dist/assets/index-ChWRjRip.css new file mode 100644 index 00000000..466ebb27 --- /dev/null +++ b/ui/dist/assets/index-ChWRjRip.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 100%;--foreground: 20 14.3% 4.1%;--card: 0 0% 100%;--card-foreground: 20 14.3% 4.1%;--popover: 0 0% 100%;--popover-foreground: 20 14.3% 4.1%;--primary: 24.6 95% 53.1%;--primary-foreground: 60 9.1% 97.8%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 24.6 95% 53.1%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark{--background: 20 14.3% 4.1%;--foreground: 60 9.1% 97.8%;--card: 20 14.3% 4.1%;--card-foreground: 60 9.1% 97.8%;--popover: 20 14.3% 4.1%;--popover-foreground: 60 9.1% 97.8%;--primary: 20.5 90.2% 48.2%;--primary-foreground: 60 9.1% 97.8%;--secondary: 12 6.5% 15.1%;--secondary-foreground: 60 9.1% 97.8%;--muted: 12 6.5% 15.1%;--muted-foreground: 24 5.4% 63.9%;--accent: 12 6.5% 15.1%;--accent-foreground: 60 9.1% 97.8%;--destructive: 0 72.2% 50.6%;--destructive-foreground: 60 9.1% 97.8%;--border: 12 6.5% 15.1%;--input: 12 6.5% 15.1%;--ring: 20.5 90.2% 48.2%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}@media (min-width: 1920px){.container{max-width:1920px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-\[-0\.65rem\]{margin-left:-.65rem;margin-right:-.65rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1\.2rem\]{height:1.2rem}.h-\[1px\]{height:1px}.h-\[36px\]{height:36px}.h-\[75vh\]{height:75vh}.h-\[80dvh\]{height:80dvh}.h-\[80vh\]{height:80vh}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-\[80vh\]{max-height:80vh}.max-h-screen{max-height:100vh}.min-h-\[180px\]{min-height:180px}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[1\.2rem\]{width:1.2rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[36px\]{width:36px}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[35em\]{max-width:35em}.max-w-\[40em\]{max-width:40em}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-2\.5{padding-left:.625rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-stone-100{--tw-text-opacity: 1;color:rgb(245 245 244 / var(--tw-text-opacity))}.text-stone-700{--tw-text-opacity: 1;color:rgb(68 64 60 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:whitespace-pre-wrap::-moz-placeholder{white-space:pre-wrap}.placeholder\:whitespace-pre-wrap::placeholder{white-space:pre-wrap}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-stone-900:hover{--tw-text-opacity: 1;color:rgb(28 25 23 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.dark\:-rotate-90:is(.dark *){--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:rotate-0:is(.dark *){--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-0:is(.dark *){--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-100:is(.dark *){--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:border-stone-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 113 108 / var(--tw-border-opacity))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-stone-200:is(.dark *){--tw-text-opacity: 1;color:rgb(231 229 228 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:text-stone-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(231 229 228 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:ml-2{margin-left:.5rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-24{width:6rem}.sm\:w-32{width:8rem}.sm\:w-40{width:10rem}.sm\:w-48{width:12rem}.sm\:w-52{width:13rem}.sm\:w-56{width:14rem}.sm\:w-64{width:16rem}.sm\:w-\[35em\]{width:35em}.sm\:max-w-5xl{max-width:64rem}.sm\:max-w-\[600px\]{max-width:600px}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:p-2{padding:.5rem}.sm\:pt-0{padding-top:0}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:hidden{display:none}.md\:w-\[200px\]{width:200px}.md\:w-\[250px\]{width:250px}.md\:w-\[350px\]{width:350px}.md\:w-\[35em\]{width:35em}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2.5rem * var(--tw-space-x-reverse));margin-left:calc(2.5rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}}@media (min-width: 1024px){.lg\:h-\[60px\]{height:60px}.lg\:grid-cols-\[280px_1fr\]{grid-template-columns:280px 1fr}.lg\:gap-6{gap:1.5rem}.lg\:p-6{padding:1.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/ui/dist/assets/index-DXJTf3ck.css b/ui/dist/assets/index-DXJTf3ck.css deleted file mode 100644 index 672403e9..00000000 --- a/ui/dist/assets/index-DXJTf3ck.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 100%;--foreground: 20 14.3% 4.1%;--card: 0 0% 100%;--card-foreground: 20 14.3% 4.1%;--popover: 0 0% 100%;--popover-foreground: 20 14.3% 4.1%;--primary: 24.6 95% 53.1%;--primary-foreground: 60 9.1% 97.8%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 24.6 95% 53.1%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark{--background: 20 14.3% 4.1%;--foreground: 60 9.1% 97.8%;--card: 20 14.3% 4.1%;--card-foreground: 60 9.1% 97.8%;--popover: 20 14.3% 4.1%;--popover-foreground: 60 9.1% 97.8%;--primary: 20.5 90.2% 48.2%;--primary-foreground: 60 9.1% 97.8%;--secondary: 12 6.5% 15.1%;--secondary-foreground: 60 9.1% 97.8%;--muted: 12 6.5% 15.1%;--muted-foreground: 24 5.4% 63.9%;--accent: 12 6.5% 15.1%;--accent-foreground: 60 9.1% 97.8%;--destructive: 0 72.2% 50.6%;--destructive-foreground: 60 9.1% 97.8%;--border: 12 6.5% 15.1%;--input: 12 6.5% 15.1%;--ring: 20.5 90.2% 48.2%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}@media (min-width: 1920px){.container{max-width:1920px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-\[-0\.65rem\]{margin-left:-.65rem;margin-right:-.65rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1\.2rem\]{height:1.2rem}.h-\[1px\]{height:1px}.h-\[36px\]{height:36px}.h-\[75vh\]{height:75vh}.h-\[80dvh\]{height:80dvh}.h-\[80vh\]{height:80vh}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-\[80vh\]{max-height:80vh}.max-h-screen{max-height:100vh}.min-h-\[180px\]{min-height:180px}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[1\.2rem\]{width:1.2rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[36px\]{width:36px}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[35em\]{max-width:35em}.max-w-\[40em\]{max-width:40em}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-2\.5{padding-left:.625rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-stone-100{--tw-text-opacity: 1;color:rgb(245 245 244 / var(--tw-text-opacity))}.text-stone-700{--tw-text-opacity: 1;color:rgb(68 64 60 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:whitespace-pre-wrap::-moz-placeholder{white-space:pre-wrap}.placeholder\:whitespace-pre-wrap::placeholder{white-space:pre-wrap}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-stone-900:hover{--tw-text-opacity: 1;color:rgb(28 25 23 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.dark\:-rotate-90:is(.dark *){--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:rotate-0:is(.dark *){--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-0:is(.dark *){--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-100:is(.dark *){--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:border-stone-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 113 108 / var(--tw-border-opacity))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-stone-200:is(.dark *){--tw-text-opacity: 1;color:rgb(231 229 228 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:text-stone-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(231 229 228 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:ml-2{margin-left:.5rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-24{width:6rem}.sm\:w-32{width:8rem}.sm\:w-40{width:10rem}.sm\:w-48{width:12rem}.sm\:w-52{width:13rem}.sm\:w-56{width:14rem}.sm\:w-64{width:16rem}.sm\:w-\[35em\]{width:35em}.sm\:max-w-5xl{max-width:64rem}.sm\:max-w-\[600px\]{max-width:600px}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:p-2{padding:.5rem}.sm\:pt-0{padding-top:0}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:hidden{display:none}.md\:w-\[200px\]{width:200px}.md\:w-\[250px\]{width:250px}.md\:w-\[350px\]{width:350px}.md\:w-\[35em\]{width:35em}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2.5rem * var(--tw-space-x-reverse));margin-left:calc(2.5rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}}@media (min-width: 1024px){.lg\:h-\[60px\]{height:60px}.lg\:grid-cols-\[280px_1fr\]{grid-template-columns:280px 1fr}.lg\:gap-6{gap:1.5rem}.lg\:p-6{padding:1.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/ui/dist/index.html b/ui/dist/index.html index 124d5ac9..5ec1b415 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -5,8 +5,8 @@ Certimate - Your Trusted SSL Automation Partner - - + +
diff --git a/ui/package-lock.json b/ui/package-lock.json index eebcaeb3..5e240b1c 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -20,6 +20,7 @@ "@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-switch": "^1.1.0", + "@radix-ui/react-tabs": "^1.1.0", "@radix-ui/react-toast": "^1.2.1", "@radix-ui/react-tooltip": "^1.1.2", "class-variance-authority": "^0.7.0", @@ -1762,6 +1763,35 @@ } } }, + "node_modules/@radix-ui/react-tabs": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/@radix-ui/react-tabs/-/react-tabs-1.1.0.tgz", + "integrity": "sha512-bZgOKB/LtZIij75FSuPzyEti/XBhJH52ExgtdVqjCIh+Nx/FW+LhnbXtbCzIi34ccyMsyOja8T0thCzoHFXNKA==", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-roving-focus": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-toast": { "version": "1.2.1", "resolved": "https://registry.npmmirror.com/@radix-ui/react-toast/-/react-toast-1.2.1.tgz", diff --git a/ui/package.json b/ui/package.json index 17cb0ef4..5c66202f 100644 --- a/ui/package.json +++ b/ui/package.json @@ -22,6 +22,7 @@ "@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-switch": "^1.1.0", + "@radix-ui/react-tabs": "^1.1.0", "@radix-ui/react-toast": "^1.2.1", "@radix-ui/react-tooltip": "^1.1.2", "class-variance-authority": "^0.7.0", diff --git a/ui/src/components/certimate/AccessGroupList.tsx b/ui/src/components/certimate/AccessGroupList.tsx new file mode 100644 index 00000000..e0fe0395 --- /dev/null +++ b/ui/src/components/certimate/AccessGroupList.tsx @@ -0,0 +1,217 @@ +import AccessGroupEdit from "@/components/certimate/AccessGroupEdit"; +import Show from "@/components/Show"; +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, +} from "@/components/ui/alert-dialog"; +import { Button } from "@/components/ui/button"; +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { ScrollArea } from "@/components/ui/scroll-area"; +import { getProviderInfo } from "@/domain/access"; +import { getErrMessage } from "@/lib/error"; +import { useConfig } from "@/providers/config"; +import { remove } from "@/repository/access_group"; +import { Group } from "lucide-react"; +import { useToast } from "@/components/ui/use-toast"; + +import { useNavigate } from "react-router-dom"; + +const AccessGroupList = () => { + const { + config: { accessGroups }, + reloadAccessGroups, + } = useConfig(); + + const { toast } = useToast(); + + const navigate = useNavigate(); + + + + const handleRemoveClick = async (id: string) => { + try { + await remove(id); + reloadAccessGroups(); + } catch (e) { + toast({ + title: "删除失败", + description: getErrMessage(e), + variant: "destructive", + }); + return; + } + }; + + const handleAddAccess = () => { + navigate("/access"); + }; + return ( +
+ + <> +
+ + + + +
+ 请添加域名开始部署证书吧。 +
+ 新增授权组} + className="mt-3" + /> +
+ +
+ + +
+ {accessGroups.map((accessGroup) => ( + + + {accessGroup.name} + + 共有 + {accessGroup.expand ? accessGroup.expand.access.length : 0} + 个部署授权配置 + + + + {accessGroup.expand ? ( + <> + {accessGroup.expand.access.slice(0, 3).map((access) => ( +
+
+
+ provider +
+
+
+ {access.name} +
+
+ {getProviderInfo(access.configType)![0]} +
+
+
+
+ ))} + + ) : ( + <> +
+
+ +
+
+ 暂无部署授权配置,请添加后开始使用吧 +
+
+ + )} +
+ +
+ 0 + ? true + : false + } + > +
+ +
+
+ + +
+ +
+
+ +
+ + + + + + + + 删除组 + + + 确定要删除部署授权组吗? + + + + + 取消 + + { + handleRemoveClick( + accessGroup.id ? accessGroup.id : "" + ); + }} + > + 确认 + + + + +
+
+
+
+ ))} +
+
+
+ ); +}; + +export default AccessGroupList; diff --git a/ui/src/components/ui/tabs.tsx b/ui/src/components/ui/tabs.tsx new file mode 100644 index 00000000..f57fffdb --- /dev/null +++ b/ui/src/components/ui/tabs.tsx @@ -0,0 +1,53 @@ +import * as React from "react" +import * as TabsPrimitive from "@radix-ui/react-tabs" + +import { cn } from "@/lib/utils" + +const Tabs = TabsPrimitive.Root + +const TabsList = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +TabsList.displayName = TabsPrimitive.List.displayName + +const TabsTrigger = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +TabsTrigger.displayName = TabsPrimitive.Trigger.displayName + +const TabsContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +TabsContent.displayName = TabsPrimitive.Content.displayName + +export { Tabs, TabsList, TabsTrigger, TabsContent } diff --git a/ui/src/pages/DashboardLayout.tsx b/ui/src/pages/DashboardLayout.tsx index 74779695..e66056a1 100644 --- a/ui/src/pages/DashboardLayout.tsx +++ b/ui/src/pages/DashboardLayout.tsx @@ -9,7 +9,7 @@ import { BookOpen, CircleUser, Earth, - Group, + History, Home, Menu, @@ -101,17 +101,6 @@ export default function Dashboard() { 授权管理 - - - 部署授权组 - - - - - 部署授权组 - - - Certimate v0.1.6 + Certimate v0.1.7 diff --git a/ui/src/pages/access/Access.tsx b/ui/src/pages/access/Access.tsx index fda70b5c..de383fc5 100644 --- a/ui/src/pages/access/Access.tsx +++ b/ui/src/pages/access/Access.tsx @@ -1,7 +1,9 @@ import { AccessEdit } from "@/components/certimate/AccessEdit"; +import AccessGroupList from "@/components/certimate/AccessGroupList"; import XPagination from "@/components/certimate/XPagination"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Access as AccessType, accessTypeMap } from "@/domain/access"; import { convertZulu2Beijing } from "@/lib/time"; import { useConfig } from "@/providers/config"; @@ -23,6 +25,8 @@ const Access = () => { const page = query.get("page"); const pageNumber = page ? Number(page) : 1; + const tab = query.get("tab"); + const accessGroupId = query.get("accessGroupId"); const startIndex = (pageNumber - 1) * perPage; @@ -33,100 +37,137 @@ const Access = () => { deleteAccess(rs.id); }; + const handleTabItemClick = (tab: string) => { + query.set("tab", tab); + navigate({ search: query.toString() }); + }; + return (
授权管理
添加授权} op="add" />
- {accesses.length === 0 ? ( -
- - - -
- 请添加授权开始部署证书吧。 -
- 添加授权} - op="add" - className="mt-3" - /> -
- ) : ( - <> -
-
名称
-
服务商
- -
创建时间
-
更新时间
-
操作
-
-
- 授权列表 -
- {accesses - .filter((item) => { - return accessGroupId ? item.group == accessGroupId : true; - }) - .slice(startIndex, endIndex) - .map((access) => ( -
-
- {access.name} -
-
- -
{accessTypeMap.get(access.configType)?.[0]}
-
- -
- 创建于 {access.created && convertZulu2Beijing(access.created)} -
-
- 更新于 {access.updated && convertZulu2Beijing(access.updated)} -
-
- - 编辑 - - } - op="edit" - data={access} - /> - - -
-
- ))} - { - query.set("page", page.toString()); - navigate({ search: query.toString() }); + + + { + handleTabItemClick("access"); }} - /> - - )} + > + 授权管理 + + { + handleTabItemClick("access_group"); + }} + > + 授权组管理 + + + + {accesses.length === 0 ? ( +
+ + + + +
+ 请添加授权开始部署证书吧。 +
+ 添加授权} + op="add" + className="mt-3" + /> +
+ ) : ( + <> +
+
名称
+
服务商
+ +
创建时间
+
更新时间
+
操作
+
+
+ 授权列表 +
+ {accesses + .filter((item) => { + return accessGroupId ? item.group == accessGroupId : true; + }) + .slice(startIndex, endIndex) + .map((access) => ( +
+
+ {access.name} +
+
+ +
{accessTypeMap.get(access.configType)?.[0]}
+
+ +
+ 创建于{" "} + {access.created && convertZulu2Beijing(access.created)} +
+
+ 更新于{" "} + {access.updated && convertZulu2Beijing(access.updated)} +
+
+ + 编辑 + + } + op="edit" + data={access} + /> + + +
+
+ ))} + { + query.set("page", page.toString()); + navigate({ search: query.toString() }); + }} + /> + + )} +
+ + + +
); }; diff --git a/ui/src/pages/access_groups/AccessGroups.tsx b/ui/src/pages/access_groups/AccessGroups.tsx deleted file mode 100644 index a3c83e49..00000000 --- a/ui/src/pages/access_groups/AccessGroups.tsx +++ /dev/null @@ -1,219 +0,0 @@ -import AccessGroupEdit from "@/components/certimate/AccessGroupEdit"; -import Show from "@/components/Show"; -import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, -} from "@/components/ui/alert-dialog"; -import { Button } from "@/components/ui/button"; -import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/components/ui/card"; -import { ScrollArea } from "@/components/ui/scroll-area"; -import { getProviderInfo } from "@/domain/access"; -import { getErrMessage } from "@/lib/error"; -import { useConfig } from "@/providers/config"; -import { remove } from "@/repository/access_group"; -import { Group } from "lucide-react"; -import { useToast } from "@/components/ui/use-toast"; -import { Toaster } from "@/components/ui/toaster"; -import { useNavigate } from "react-router-dom"; -const AccessGroups = () => { - const { - config: { accessGroups }, - reloadAccessGroups, - } = useConfig(); - - const { toast } = useToast(); - - const navigate = useNavigate(); - - const handleRemoveClick = async (id: string) => { - try { - await remove(id); - reloadAccessGroups(); - } catch (e) { - toast({ - title: "删除失败", - description: getErrMessage(e), - variant: "destructive", - }); - return; - } - }; - - const handleAddAccess = () => { - navigate("/access"); - }; - return ( -
- -
-
部署授权组
- - 新增授权组} /> -
- -
- - <> -
- - - - -
- 请添加域名开始部署证书吧。 -
- 新增授权组} - className="mt-3" - /> -
- -
- - -
- {accessGroups.map((accessGroup) => ( - - - {accessGroup.name} - - 共有 - {accessGroup.expand ? accessGroup.expand.access.length : 0} - 个部署授权配置 - - - - {accessGroup.expand ? ( - <> - {accessGroup.expand.access.slice(0, 3).map((access) => ( -
-
-
- provider -
-
-
- {access.name} -
-
- {getProviderInfo(access.configType)![0]} -
-
-
-
- ))} - - ) : ( - <> -
-
- -
-
- 暂无部署授权配置,请添加后开始使用吧 -
-
- - )} -
- -
- 0 - ? true - : false - } - > -
- -
-
- - -
- -
-
- -
- - - - - - - - 删除组 - - - 确定要删除部署授权组吗? - - - - - 取消 - - { - handleRemoveClick( - accessGroup.id ? accessGroup.id : "" - ); - }} - > - 确认 - - - - -
-
-
-
- ))} -
-
-
-
- ); -}; - -export default AccessGroups; diff --git a/ui/src/router.tsx b/ui/src/router.tsx index 1ce38bd8..3dc7cade 100644 --- a/ui/src/router.tsx +++ b/ui/src/router.tsx @@ -10,7 +10,6 @@ import LoginLayout from "./pages/LoginLayout"; import Password from "./pages/setting/Password"; import SettingLayout from "./pages/SettingLayout"; import Dashboard from "./pages/dashboard/Dashboard"; -import AccessGroups from "./pages/access_groups/AccessGroups"; export const router = createHashRouter([ { @@ -33,10 +32,6 @@ export const router = createHashRouter([ path: "/access", element: , }, - { - path: "/access_groups", - element: , - }, { path: "/history", element: ,