certimate/ui/dist/assets/index-Dn4jGLHB.js

323 lines
849 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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

var h2=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var SH=h2((LH,fd)=>{function E1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var cu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N1={exports:{}},bf={},T1={exports:{}},tt={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ac=Symbol.for("react.element"),p2=Symbol.for("react.portal"),m2=Symbol.for("react.fragment"),g2=Symbol.for("react.strict_mode"),y2=Symbol.for("react.profiler"),v2=Symbol.for("react.provider"),x2=Symbol.for("react.context"),w2=Symbol.for("react.forward_ref"),b2=Symbol.for("react.suspense"),_2=Symbol.for("react.memo"),S2=Symbol.for("react.lazy"),jx=Symbol.iterator;function k2(e){return e===null||typeof e!="object"?null:(e=jx&&e[jx]||e["@@iterator"],typeof e=="function"?e:null)}var R1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P1=Object.assign,A1={};function Da(e,t,n){this.props=e,this.context=t,this.refs=A1,this.updater=n||R1}Da.prototype.isReactComponent={};Da.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")};Da.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function O1(){}O1.prototype=Da.prototype;function bg(e,t,n){this.props=e,this.context=t,this.refs=A1,this.updater=n||R1}var _g=bg.prototype=new O1;_g.constructor=bg;P1(_g,Da.prototype);_g.isPureReactComponent=!0;var Ex=Array.isArray,D1=Object.prototype.hasOwnProperty,Sg={current:null},I1={key:!0,ref:!0,__self:!0,__source:!0};function M1(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)D1.call(t,r)&&!I1.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Ac,type:e,key:o,ref:i,props:s,_owner:Sg.current}}function C2(e,t){return{$$typeof:Ac,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function kg(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ac}function j2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Nx=/\/+/g;function Uh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?j2(""+e.key):t.toString(36)}function Vu(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Ac:case p2:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+Uh(i,0):r,Ex(s)?(n="",e!=null&&(n=e.replace(Nx,"$&/")+"/"),Vu(s,t,n,"",function(u){return u})):s!=null&&(kg(s)&&(s=C2(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Nx,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",Ex(e))for(var a=0;a<e.length;a++){o=e[a];var c=r+Uh(o,a);i+=Vu(o,t,n,c,s)}else if(c=k2(e),typeof c=="function")for(e=c.call(e),a=0;!(o=e.next()).done;)o=o.value,c=r+Uh(o,a++),i+=Vu(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function uu(e,t,n){if(e==null)return e;var r=[],s=0;return Vu(e,r,"","",function(o){return t.call(n,o,s++)}),r}function E2(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var kn={current:null},Bu={transition:null},N2={ReactCurrentDispatcher:kn,ReactCurrentBatchConfig:Bu,ReactCurrentOwner:Sg};function L1(){throw Error("act(...) is not supported in production builds of React.")}tt.Children={map:uu,forEach:function(e,t,n){uu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return uu(e,function(){t++}),t},toArray:function(e){return uu(e,function(t){return t})||[]},only:function(e){if(!kg(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};tt.Component=Da;tt.Fragment=m2;tt.Profiler=y2;tt.PureComponent=bg;tt.StrictMode=g2;tt.Suspense=b2;tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N2;tt.act=L1;tt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=P1({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Sg.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)D1.call(t,c)&&!I1.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Ac,type:e.type,key:s,ref:o,props:r,_owner:i}};tt.createContext=function(e){return e={$$typeof:x2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:v2,_context:e},e.Consumer=e};tt.createElement=M1;tt.createFactory=function(e){var t=M1.bind(null,e);return t.type=e,t};tt.createRef=function(){return{current:null}};tt.forwardRef=function(e){return{$$typeof:w2,render:e}};tt.isValidElement=kg;tt.lazy=function(e){return{$$typeof:S2,_payload:{_status:-1,_result:e},_init:E2}};tt.memo=function(e,t){return{$$typeof:_2,type:e,compare:t===void 0?null:t}};tt.startTransition=function(e){var t=Bu.transition;Bu.transition={};try{e()}finally{Bu.transition=t}};tt.unstable_act=L1;tt.useCallback=function(e,t){return kn.current.useCallback(e,t)};tt.useContext=function(e){return kn.current.useContext(e)};tt.useDebugValue=function(){};tt.useDeferredValue=function(e){return kn.current.useDeferredValue(e)};tt.useEffect=function(e,t){return kn.current.useEffect(e,t)};tt.useId=function(){return kn.current.useId()};tt.useImperativeHandle=function(e,t,n){return kn.current.useImperativeHandle(e,t,n)};tt.useInsertionEffect=function(e,t){return kn.current.useInsertionEffect(e,t)};tt.useLayoutEffect=function(e,t){return kn.current.useLayoutEffect(e,t)};tt.useMemo=function(e,t){return kn.current.useMemo(e,t)};tt.useReducer=function(e,t,n){return kn.current.useReducer(e,t,n)};tt.useRef=function(e){return kn.current.useRef(e)};tt.useState=function(e){return kn.current.useState(e)};tt.useSyncExternalStore=function(e,t,n){return kn.current.useSyncExternalStore(e,t,n)};tt.useTransition=function(){return kn.current.useTransition()};tt.version="18.3.1";T1.exports=tt;var v=T1.exports;const We=wf(v),F1=E1({__proto__:null,default:We},[v]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var T2=v,R2=Symbol.for("react.element"),P2=Symbol.for("react.fragment"),A2=Object.prototype.hasOwnProperty,O2=T2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D2={key:!0,ref:!0,__self:!0,__source:!0};function z1(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)A2.call(t,r)&&!D2.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:R2,type:e,key:o,ref:i,props:s,_owner:O2.current}}bf.Fragment=P2;bf.jsx=z1;bf.jsxs=z1;N1.exports=bf;var l=N1.exports,Up={},$1={exports:{}},qn={},U1={exports:{}},V1={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(W,I){var X=W.length;W.push(I);e:for(;0<X;){var $=X-1>>>1,B=W[$];if(0<s(B,I))W[$]=I,W[X]=B,X=$;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var I=W[0],X=W.pop();if(X!==I){W[0]=X;e:for(var $=0,B=W.length,he=B>>>1;$<he;){var re=2*($+1)-1,se=W[re],De=re+1,pe=W[De];if(0>s(se,X))De<B&&0>s(pe,se)?(W[$]=pe,W[De]=X,$=De):(W[$]=se,W[re]=X,$=re);else if(De<B&&0>s(pe,X))W[$]=pe,W[De]=X,$=De;else break e}}return I}function s(W,I){var X=W.sortIndex-I.sortIndex;return X!==0?X:W.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var c=[],u=[],d=1,f=null,h=3,y=!1,x=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(W){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=W)r(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function _(W){if(g=!1,b(W),!x)if(n(c)!==null)x=!0,J(C);else{var I=n(u);I!==null&&z(_,I.startTime-W)}}function C(W,I){x=!1,g&&(g=!1,m(P),P=-1),y=!0;var X=h;try{for(b(I),f=n(c);f!==null&&(!(f.expirationTime>I)||W&&!G());){var $=f.callback;if(typeof $=="function"){f.callback=null,h=f.priorityLevel;var B=$(f.expirationTime<=I);I=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(I)}else r(c);f=n(c)}if(f!==null)var he=!0;else{var re=n(u);re!==null&&z(_,re.startTime-I),he=!1}return he}finally{f=null,h=X,y=!1}}var j=!1,T=null,P=-1,A=5,D=-1;function G(){return!(e.unstable_now()-D<A)}function N(){if(T!==null){var W=e.unstable_now();D=W;var I=!0;try{I=T(!0,W)}finally{I?F():(j=!1,T=null)}}else j=!1}var F;if(typeof p=="function")F=function(){p(N)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,U=S.port2;S.port1.onmessage=N,F=function(){U.postMessage(null)}}else F=function(){w(N,0)};function J(W){T=W,j||(j=!0,F())}function z(W,I){P=w(function(){W(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,J(C))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(W){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var X=h;h=I;try{return W()}finally{h=X}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,I){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var X=h;h=W;try{return I()}finally{h=X}},e.unstable_scheduleCallback=function(W,I,X){var $=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?$+X:$):X=$,W){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=X+B,W={id:d++,callback:I,priorityLevel:W,startTime:X,expirationTime:B,sortIndex:-1},X>$?(W.sortIndex=X,t(u,W),n(c)===null&&W===n(u)&&(g?(m(P),P=-1):g=!0,z(_,X-$))):(W.sortIndex=B,t(c,W),x||y||(x=!0,J(C))),W},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(W){var I=h;return function(){var X=h;h=I;try{return W.apply(this,arguments)}finally{h=X}}}})(V1);U1.exports=V1;var I2=U1.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var M2=v,Gn=I2;function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var B1=new Set,Bl={};function gi(e,t){wa(e,t),wa(e+"Capture",t)}function wa(e,t){for(Bl[e]=t,e=0;e<t.length;e++)B1.add(t[e])}var Ss=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vp=Object.prototype.hasOwnProperty,L2=/^[: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]*$/,Tx={},Rx={};function F2(e){return Vp.call(Rx,e)?!0:Vp.call(Tx,e)?!1:L2.test(e)?Rx[e]=!0:(Tx[e]=!0,!1)}function z2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $2(e,t,n,r){if(t===null||typeof t>"u"||z2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Cn(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var sn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){sn[e]=new Cn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];sn[t]=new Cn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){sn[e]=new Cn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){sn[e]=new Cn(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){sn[e]=new Cn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){sn[e]=new Cn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){sn[e]=new Cn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){sn[e]=new Cn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){sn[e]=new Cn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Cg=/[\-:]([a-z])/g;function jg(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(Cg,jg);sn[t]=new Cn(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(Cg,jg);sn[t]=new Cn(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(Cg,jg);sn[t]=new Cn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){sn[e]=new Cn(e,1,!1,e.toLowerCase(),null,!1,!1)});sn.xlinkHref=new Cn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){sn[e]=new Cn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Eg(e,t,n,r){var s=sn.hasOwnProperty(t)?sn[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($2(t,n,s,r)&&(n=null),r||s===null?F2(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Os=M2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,du=Symbol.for("react.element"),zi=Symbol.for("react.portal"),$i=Symbol.for("react.fragment"),Ng=Symbol.for("react.strict_mode"),Bp=Symbol.for("react.profiler"),W1=Symbol.for("react.provider"),H1=Symbol.for("react.context"),Tg=Symbol.for("react.forward_ref"),Wp=Symbol.for("react.suspense"),Hp=Symbol.for("react.suspense_list"),Rg=Symbol.for("react.memo"),Qs=Symbol.for("react.lazy"),Y1=Symbol.for("react.offscreen"),Px=Symbol.iterator;function Xa(e){return e===null||typeof e!="object"?null:(e=Px&&e[Px]||e["@@iterator"],typeof e=="function"?e:null)}var Lt=Object.assign,Vh;function gl(e){if(Vh===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Vh=t&&t[1]||""}return`
`+Vh+e}var Bh=!1;function Wh(e,t){if(!e||Bh)return"";Bh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
`),o=r.stack.split(`
`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var c=`
`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=a);break}}}finally{Bh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gl(e):""}function U2(e){switch(e.tag){case 5:return gl(e.type);case 16:return gl("Lazy");case 13:return gl("Suspense");case 19:return gl("SuspenseList");case 0:case 2:case 15:return e=Wh(e.type,!1),e;case 11:return e=Wh(e.type.render,!1),e;case 1:return e=Wh(e.type,!0),e;default:return""}}function Yp(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 $i:return"Fragment";case zi:return"Portal";case Bp:return"Profiler";case Ng:return"StrictMode";case Wp:return"Suspense";case Hp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case H1:return(e.displayName||"Context")+".Consumer";case W1:return(e._context.displayName||"Context")+".Provider";case Tg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Rg:return t=e.displayName||null,t!==null?t:Yp(e.type)||"Memo";case Qs:t=e._payload,e=e._init;try{return Yp(e(t))}catch{}}return null}function V2(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 Yp(t);case 8:return t===Ng?"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 bo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function K1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function B2(e){var t=K1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fu(e){e._valueTracker||(e._valueTracker=B2(e))}function G1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hd(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 Kp(e,t){var n=t.checked;return Lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ax(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=bo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Z1(e,t){t=t.checked,t!=null&&Eg(e,"checked",t,!1)}function Gp(e,t){Z1(e,t);var n=bo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zp(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zp(e,t.type,bo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ox(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Zp(e,t,n){(t!=="number"||hd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var yl=Array.isArray;function oa(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+bo(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function qp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return Lt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Dx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ie(92));if(yl(n)){if(1<n.length)throw Error(ie(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:bo(n)}}function q1(e,t){var n=bo(t.value),r=bo(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ix(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function X1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Xp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?X1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hu,Q1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hu=hu||document.createElement("div"),hu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tl={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},W2=["Webkit","ms","Moz","O"];Object.keys(Tl).forEach(function(e){W2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tl[t]=Tl[e]})});function J1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tl.hasOwnProperty(e)&&Tl[e]?(""+t).trim():t+"px"}function eb(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=J1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var H2=Lt({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 Qp(e,t){if(t){if(H2[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 Jp(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 em=null;function Pg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tm=null,ia=null,aa=null;function Mx(e){if(e=Ic(e)){if(typeof tm!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=jf(t),tm(e.stateNode,e.type,t))}}function tb(e){ia?aa?aa.push(e):aa=[e]:ia=e}function nb(){if(ia){var e=ia,t=aa;if(aa=ia=null,Mx(e),t)for(e=0;e<t.length;e++)Mx(t[e])}}function rb(e,t){return e(t)}function sb(){}var Hh=!1;function ob(e,t,n){if(Hh)return e(t,n);Hh=!0;try{return rb(e,t,n)}finally{Hh=!1,(ia!==null||aa!==null)&&(sb(),nb())}}function Hl(e,t){var n=e.stateNode;if(n===null)return null;var r=jf(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ie(231,t,typeof n));return n}var nm=!1;if(Ss)try{var Qa={};Object.defineProperty(Qa,"passive",{get:function(){nm=!0}}),window.addEventListener("test",Qa,Qa),window.removeEventListener("test",Qa,Qa)}catch{nm=!1}function Y2(e,t,n,r,s,o,i,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Rl=!1,pd=null,md=!1,rm=null,K2={onError:function(e){Rl=!0,pd=e}};function G2(e,t,n,r,s,o,i,a,c){Rl=!1,pd=null,Y2.apply(K2,arguments)}function Z2(e,t,n,r,s,o,i,a,c){if(G2.apply(this,arguments),Rl){if(Rl){var u=pd;Rl=!1,pd=null}else throw Error(ie(198));md||(md=!0,rm=u)}}function yi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ib(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Lx(e){if(yi(e)!==e)throw Error(ie(188))}function q2(e){var t=e.alternate;if(!t){if(t=yi(e),t===null)throw Error(ie(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Lx(s),e;if(o===r)return Lx(s),t;o=o.sibling}throw Error(ie(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(ie(189))}}if(n.alternate!==r)throw Error(ie(190))}if(n.tag!==3)throw Error(ie(188));return n.stateNode.current===n?e:t}function ab(e){return e=q2(e),e!==null?lb(e):null}function lb(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=lb(e);if(t!==null)return t;e=e.sibling}return null}var cb=Gn.unstable_scheduleCallback,Fx=Gn.unstable_cancelCallback,X2=Gn.unstable_shouldYield,Q2=Gn.unstable_requestPaint,Vt=Gn.unstable_now,J2=Gn.unstable_getCurrentPriorityLevel,Ag=Gn.unstable_ImmediatePriority,ub=Gn.unstable_UserBlockingPriority,gd=Gn.unstable_NormalPriority,eR=Gn.unstable_LowPriority,db=Gn.unstable_IdlePriority,_f=null,Kr=null;function tR(e){if(Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(_f,e,void 0,(e.current.flags&128)===128)}catch{}}var Sr=Math.clz32?Math.clz32:sR,nR=Math.log,rR=Math.LN2;function sR(e){return e>>>=0,e===0?32:31-(nR(e)/rR|0)|0}var pu=64,mu=4194304;function vl(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 yd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=vl(a):(o&=i,o!==0&&(r=vl(o)))}else i=n&~s,i!==0?r=vl(i):o!==0&&(r=vl(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Sr(t),s=1<<n,r|=e[n],t&=~s;return r}function oR(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function iR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Sr(o),a=1<<i,c=s[i];c===-1?(!(a&n)||a&r)&&(s[i]=oR(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}function sm(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function fb(){var e=pu;return pu<<=1,!(pu&4194240)&&(pu=64),e}function Yh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Oc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Sr(t),e[t]=n}function aR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Sr(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Og(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Sr(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var gt=0;function hb(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var pb,Dg,mb,gb,yb,om=!1,gu=[],uo=null,fo=null,ho=null,Yl=new Map,Kl=new Map,eo=[],lR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function zx(e,t){switch(e){case"focusin":case"focusout":uo=null;break;case"dragenter":case"dragleave":fo=null;break;case"mouseover":case"mouseout":ho=null;break;case"pointerover":case"pointerout":Yl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kl.delete(t.pointerId)}}function Ja(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Ic(t),t!==null&&Dg(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function cR(e,t,n,r,s){switch(t){case"focusin":return uo=Ja(uo,e,t,n,r,s),!0;case"dragenter":return fo=Ja(fo,e,t,n,r,s),!0;case"mouseover":return ho=Ja(ho,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Yl.set(o,Ja(Yl.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Kl.set(o,Ja(Kl.get(o)||null,e,t,n,r,s)),!0}return!1}function vb(e){var t=Bo(e.target);if(t!==null){var n=yi(t);if(n!==null){if(t=n.tag,t===13){if(t=ib(n),t!==null){e.blockedOn=t,yb(e.priority,function(){mb(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=im(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);em=r,n.target.dispatchEvent(r),em=null}else return t=Ic(n),t!==null&&Dg(t),e.blockedOn=n,!1;t.shift()}return!0}function $x(e,t,n){Wu(e)&&n.delete(t)}function uR(){om=!1,uo!==null&&Wu(uo)&&(uo=null),fo!==null&&Wu(fo)&&(fo=null),ho!==null&&Wu(ho)&&(ho=null),Yl.forEach($x),Kl.forEach($x)}function el(e,t){e.blockedOn===t&&(e.blockedOn=null,om||(om=!0,Gn.unstable_scheduleCallback(Gn.unstable_NormalPriority,uR)))}function Gl(e){function t(s){return el(s,e)}if(0<gu.length){el(gu[0],e);for(var n=1;n<gu.length;n++){var r=gu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(uo!==null&&el(uo,e),fo!==null&&el(fo,e),ho!==null&&el(ho,e),Yl.forEach(t),Kl.forEach(t),n=0;n<eo.length;n++)r=eo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<eo.length&&(n=eo[0],n.blockedOn===null);)vb(n),n.blockedOn===null&&eo.shift()}var la=Os.ReactCurrentBatchConfig,vd=!0;function dR(e,t,n,r){var s=gt,o=la.transition;la.transition=null;try{gt=1,Ig(e,t,n,r)}finally{gt=s,la.transition=o}}function fR(e,t,n,r){var s=gt,o=la.transition;la.transition=null;try{gt=4,Ig(e,t,n,r)}finally{gt=s,la.transition=o}}function Ig(e,t,n,r){if(vd){var s=im(e,t,n,r);if(s===null)np(e,t,r,xd,n),zx(e,r);else if(cR(s,e,t,n,r))r.stopPropagation();else if(zx(e,r),t&4&&-1<lR.indexOf(e)){for(;s!==null;){var o=Ic(s);if(o!==null&&pb(o),o=im(e,t,n,r),o===null&&np(e,t,r,xd,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else np(e,t,r,null,n)}}var xd=null;function im(e,t,n,r){if(xd=null,e=Pg(r),e=Bo(e),e!==null)if(t=yi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ib(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return xd=e,null}function xb(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(J2()){case Ag:return 1;case ub:return 4;case gd:case eR:return 16;case db:return 536870912;default:return 16}default:return 16}}var oo=null,Mg=null,Hu=null;function wb(){if(Hu)return Hu;var e,t=Mg,n=t.length,r,s="value"in oo?oo.value:oo.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return Hu=s.slice(e,1<r?1-r:void 0)}function Yu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yu(){return!0}function Ux(){return!1}function Xn(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?yu:Ux,this.isPropagationStopped=Ux,this}return Lt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yu)},persist:function(){},isPersistent:yu}),t}var Ia={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lg=Xn(Ia),Dc=Lt({},Ia,{view:0,detail:0}),hR=Xn(Dc),Kh,Gh,tl,Sf=Lt({},Dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==tl&&(tl&&e.type==="mousemove"?(Kh=e.screenX-tl.screenX,Gh=e.screenY-tl.screenY):Gh=Kh=0,tl=e),Kh)},movementY:function(e){return"movementY"in e?e.movementY:Gh}}),Vx=Xn(Sf),pR=Lt({},Sf,{dataTransfer:0}),mR=Xn(pR),gR=Lt({},Dc,{relatedTarget:0}),Zh=Xn(gR),yR=Lt({},Ia,{animationName:0,elapsedTime:0,pseudoElement:0}),vR=Xn(yR),xR=Lt({},Ia,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wR=Xn(xR),bR=Lt({},Ia,{data:0}),Bx=Xn(bR),_R={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function CR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kR[e])?!!t[e]:!1}function Fg(){return CR}var jR=Lt({},Dc,{key:function(e){if(e.key){var t=_R[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?SR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fg,charCode:function(e){return e.type==="keypress"?Yu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ER=Xn(jR),NR=Lt({},Sf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wx=Xn(NR),TR=Lt({},Dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fg}),RR=Xn(TR),PR=Lt({},Ia,{propertyName:0,elapsedTime:0,pseudoElement:0}),AR=Xn(PR),OR=Lt({},Sf,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),DR=Xn(OR),IR=[9,13,27,32],zg=Ss&&"CompositionEvent"in window,Pl=null;Ss&&"documentMode"in document&&(Pl=document.documentMode);var MR=Ss&&"TextEvent"in window&&!Pl,bb=Ss&&(!zg||Pl&&8<Pl&&11>=Pl),Hx=" ",Yx=!1;function _b(e,t){switch(e){case"keyup":return IR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ui=!1;function LR(e,t){switch(e){case"compositionend":return Sb(t);case"keypress":return t.which!==32?null:(Yx=!0,Hx);case"textInput":return e=t.data,e===Hx&&Yx?null:e;default:return null}}function FR(e,t){if(Ui)return e==="compositionend"||!zg&&_b(e,t)?(e=wb(),Hu=Mg=oo=null,Ui=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bb&&t.locale!=="ko"?null:t.data;default:return null}}var zR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Kx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zR[e.type]:t==="textarea"}function kb(e,t,n,r){tb(r),t=wd(t,"onChange"),0<t.length&&(n=new Lg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Al=null,Zl=null;function $R(e){Ib(e,0)}function kf(e){var t=Wi(e);if(G1(t))return e}function UR(e,t){if(e==="change")return t}var Cb=!1;if(Ss){var qh;if(Ss){var Xh="oninput"in document;if(!Xh){var Gx=document.createElement("div");Gx.setAttribute("oninput","return;"),Xh=typeof Gx.oninput=="function"}qh=Xh}else qh=!1;Cb=qh&&(!document.documentMode||9<document.documentMode)}function Zx(){Al&&(Al.detachEvent("onpropertychange",jb),Zl=Al=null)}function jb(e){if(e.propertyName==="value"&&kf(Zl)){var t=[];kb(t,Zl,e,Pg(e)),ob($R,t)}}function VR(e,t,n){e==="focusin"?(Zx(),Al=t,Zl=n,Al.attachEvent("onpropertychange",jb)):e==="focusout"&&Zx()}function BR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return kf(Zl)}function WR(e,t){if(e==="click")return kf(t)}function HR(e,t){if(e==="input"||e==="change")return kf(t)}function YR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jr=typeof Object.is=="function"?Object.is:YR;function ql(e,t){if(jr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Vp.call(t,s)||!jr(e[s],t[s]))return!1}return!0}function qx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xx(e,t){var n=qx(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qx(n)}}function Eb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Eb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nb(){for(var e=window,t=hd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hd(e.document)}return t}function $g(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 KR(e){var t=Nb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Eb(n.ownerDocument.documentElement,n)){if(r!==null&&$g(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Xx(n,o);var i=Xx(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var GR=Ss&&"documentMode"in document&&11>=document.documentMode,Vi=null,am=null,Ol=null,lm=!1;function Qx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lm||Vi==null||Vi!==hd(r)||(r=Vi,"selectionStart"in r&&$g(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ol&&ql(Ol,r)||(Ol=r,r=wd(am,"onSelect"),0<r.length&&(t=new Lg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Vi)))}function vu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Bi={animationend:vu("Animation","AnimationEnd"),animationiteration:vu("Animation","AnimationIteration"),animationstart:vu("Animation","AnimationStart"),transitionend:vu("Transition","TransitionEnd")},Qh={},Tb={};Ss&&(Tb=document.createElement("div").style,"AnimationEvent"in window||(delete Bi.animationend.animation,delete Bi.animationiteration.animation,delete Bi.animationstart.animation),"TransitionEvent"in window||delete Bi.transitionend.transition);function Cf(e){if(Qh[e])return Qh[e];if(!Bi[e])return e;var t=Bi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Tb)return Qh[e]=t[n];return e}var Rb=Cf("animationend"),Pb=Cf("animationiteration"),Ab=Cf("animationstart"),Ob=Cf("transitionend"),Db=new Map,Jx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Po(e,t){Db.set(e,t),gi(t,[e])}for(var Jh=0;Jh<Jx.length;Jh++){var ep=Jx[Jh],ZR=ep.toLowerCase(),qR=ep[0].toUpperCase()+ep.slice(1);Po(ZR,"on"+qR)}Po(Rb,"onAnimationEnd");Po(Pb,"onAnimationIteration");Po(Ab,"onAnimationStart");Po("dblclick","onDoubleClick");Po("focusin","onFocus");Po("focusout","onBlur");Po(Ob,"onTransitionEnd");wa("onMouseEnter",["mouseout","mouseover"]);wa("onMouseLeave",["mouseout","mouseover"]);wa("onPointerEnter",["pointerout","pointerover"]);wa("onPointerLeave",["pointerout","pointerover"]);gi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));gi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));gi("onBeforeInput",["compositionend","keypress","textInput","paste"]);gi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));gi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));gi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),XR=new Set("cancel close invalid load scroll toggle".split(" ").concat(xl));function e0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Z2(r,t,void 0,e),e.currentTarget=null}function Ib(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&s.isPropagationStopped())break e;e0(s,a,u),o=c}else for(i=0;i<r.length;i++){if(a=r[i],c=a.instance,u=a.currentTarget,a=a.listener,c!==o&&s.isPropagationStopped())break e;e0(s,a,u),o=c}}}if(md)throw e=rm,md=!1,rm=null,e}function St(e,t){var n=t[hm];n===void 0&&(n=t[hm]=new Set);var r=e+"__bubble";n.has(r)||(Mb(t,e,2,!1),n.add(r))}function tp(e,t,n){var r=0;t&&(r|=4),Mb(n,e,r,t)}var xu="_reactListening"+Math.random().toString(36).slice(2);function Xl(e){if(!e[xu]){e[xu]=!0,B1.forEach(function(n){n!=="selectionchange"&&(XR.has(n)||tp(n,!1,e),tp(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xu]||(t[xu]=!0,tp("selectionchange",!1,t))}}function Mb(e,t,n,r){switch(xb(t)){case 1:var s=dR;break;case 4:s=fR;break;default:s=Ig}n=s.bind(null,t,n,e),s=void 0,!nm||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function np(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Bo(a),i===null)return;if(c=i.tag,c===5||c===6){r=o=i;continue e}a=a.parentNode}}r=r.return}ob(function(){var u=o,d=Pg(n),f=[];e:{var h=Db.get(e);if(h!==void 0){var y=Lg,x=e;switch(e){case"keypress":if(Yu(n)===0)break e;case"keydown":case"keyup":y=ER;break;case"focusin":x="focus",y=Zh;break;case"focusout":x="blur",y=Zh;break;case"beforeblur":case"afterblur":y=Zh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Vx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=mR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=RR;break;case Rb:case Pb:case Ab:y=vR;break;case Ob:y=AR;break;case"scroll":y=hR;break;case"wheel":y=DR;break;case"copy":case"cut":case"paste":y=wR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Wx}var g=(t&4)!==0,w=!g&&e==="scroll",m=g?h!==null?h+"Capture":null:h;g=[];for(var p=u,b;p!==null;){b=p;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,m!==null&&(_=Hl(p,m),_!=null&&g.push(Ql(p,_,b)))),w)break;p=p.return}0<g.length&&(h=new y(h,x,null,n,d),f.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",h&&n!==em&&(x=n.relatedTarget||n.fromElement)&&(Bo(x)||x[ks]))break e;if((y||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,y?(x=n.relatedTarget||n.toElement,y=u,x=x?Bo(x):null,x!==null&&(w=yi(x),x!==w||x.tag!==5&&x.tag!==6)&&(x=null)):(y=null,x=u),y!==x)){if(g=Vx,_="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(g=Wx,_="onPointerLeave",m="onPointerEnter",p="pointer"),w=y==null?h:Wi(y),b=x==null?h:Wi(x),h=new g(_,p+"leave",y,n,d),h.target=w,h.relatedTarget=b,_=null,Bo(d)===u&&(g=new g(m,p+"enter",x,n,d),g.target=b,g.relatedTarget=w,_=g),w=_,y&&x)t:{for(g=y,m=x,p=0,b=g;b;b=Ni(b))p++;for(b=0,_=m;_;_=Ni(_))b++;for(;0<p-b;)g=Ni(g),p--;for(;0<b-p;)m=Ni(m),b--;for(;p--;){if(g===m||m!==null&&g===m.alternate)break t;g=Ni(g),m=Ni(m)}g=null}else g=null;y!==null&&t0(f,h,y,g,!1),x!==null&&w!==null&&t0(f,w,x,g,!0)}}e:{if(h=u?Wi(u):window,y=h.nodeName&&h.nodeName.toLowerCase(),y==="select"||y==="input"&&h.type==="file")var C=UR;else if(Kx(h))if(Cb)C=HR;else{C=BR;var j=VR}else(y=h.nodeName)&&y.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=WR);if(C&&(C=C(e,u))){kb(f,C,n,d);break e}j&&j(e,h,u),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&Zp(h,"number",h.value)}switch(j=u?Wi(u):window,e){case"focusin":(Kx(j)||j.contentEditable==="true")&&(Vi=j,am=u,Ol=null);break;case"focusout":Ol=am=Vi=null;break;case"mousedown":lm=!0;break;case"contextmenu":case"mouseup":case"dragend":lm=!1,Qx(f,n,d);break;case"selectionchange":if(GR)break;case"keydown":case"keyup":Qx(f,n,d)}var T;if(zg)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Ui?_b(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(bb&&n.locale!=="ko"&&(Ui||P!=="onCompositionStart"?P==="onCompositionEnd"&&Ui&&(T=wb()):(oo=d,Mg="value"in oo?oo.value:oo.textContent,Ui=!0)),j=wd(u,P),0<j.length&&(P=new Bx(P,e,null,n,d),f.push({event:P,listeners:j}),T?P.data=T:(T=Sb(n),T!==null&&(P.data=T)))),(T=MR?LR(e,n):FR(e,n))&&(u=wd(u,"onBeforeInput"),0<u.length&&(d=new Bx("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=T))}Ib(f,t)})}function Ql(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wd(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Hl(e,n),o!=null&&r.unshift(Ql(e,o,s)),o=Hl(e,t),o!=null&&r.push(Ql(e,o,s))),e=e.return}return r}function Ni(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function t0(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,s?(c=Hl(n,o),c!=null&&i.unshift(Ql(n,c,a))):s||(c=Hl(n,o),c!=null&&i.push(Ql(n,c,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var QR=/\r\n?/g,JR=/\u0000|\uFFFD/g;function n0(e){return(typeof e=="string"?e:""+e).replace(QR,`
`).replace(JR,"")}function wu(e,t,n){if(t=n0(t),n0(e)!==t&&n)throw Error(ie(425))}function bd(){}var cm=null,um=null;function dm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fm=typeof setTimeout=="function"?setTimeout:void 0,eP=typeof clearTimeout=="function"?clearTimeout:void 0,r0=typeof Promise=="function"?Promise:void 0,tP=typeof queueMicrotask=="function"?queueMicrotask:typeof r0<"u"?function(e){return r0.resolve(null).then(e).catch(nP)}:fm;function nP(e){setTimeout(function(){throw e})}function rp(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Gl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Gl(t)}function po(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function s0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ma=Math.random().toString(36).slice(2),$r="__reactFiber$"+Ma,Jl="__reactProps$"+Ma,ks="__reactContainer$"+Ma,hm="__reactEvents$"+Ma,rP="__reactListeners$"+Ma,sP="__reactHandles$"+Ma;function Bo(e){var t=e[$r];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ks]||n[$r]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=s0(e);e!==null;){if(n=e[$r])return n;e=s0(e)}return t}e=n,n=e.parentNode}return null}function Ic(e){return e=e[$r]||e[ks],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function jf(e){return e[Jl]||null}var pm=[],Hi=-1;function Ao(e){return{current:e}}function kt(e){0>Hi||(e.current=pm[Hi],pm[Hi]=null,Hi--)}function bt(e,t){Hi++,pm[Hi]=e.current,e.current=t}var _o={},fn=Ao(_o),Pn=Ao(!1),ri=_o;function ba(e,t){var n=e.type.contextTypes;if(!n)return _o;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function An(e){return e=e.childContextTypes,e!=null}function _d(){kt(Pn),kt(fn)}function o0(e,t,n){if(fn.current!==_o)throw Error(ie(168));bt(fn,t),bt(Pn,n)}function Lb(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(ie(108,V2(e)||"Unknown",s));return Lt({},n,r)}function Sd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_o,ri=fn.current,bt(fn,e),bt(Pn,Pn.current),!0}function i0(e,t,n){var r=e.stateNode;if(!r)throw Error(ie(169));n?(e=Lb(e,t,ri),r.__reactInternalMemoizedMergedChildContext=e,kt(Pn),kt(fn),bt(fn,e)):kt(Pn),bt(Pn,n)}var ps=null,Ef=!1,sp=!1;function Fb(e){ps===null?ps=[e]:ps.push(e)}function oP(e){Ef=!0,Fb(e)}function Oo(){if(!sp&&ps!==null){sp=!0;var e=0,t=gt;try{var n=ps;for(gt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ps=null,Ef=!1}catch(s){throw ps!==null&&(ps=ps.slice(e+1)),cb(Ag,Oo),s}finally{gt=t,sp=!1}}return null}var Yi=[],Ki=0,kd=null,Cd=0,tr=[],nr=0,si=null,ms=1,gs="";function Fo(e,t){Yi[Ki++]=Cd,Yi[Ki++]=kd,kd=e,Cd=t}function zb(e,t,n){tr[nr++]=ms,tr[nr++]=gs,tr[nr++]=si,si=e;var r=ms;e=gs;var s=32-Sr(r)-1;r&=~(1<<s),n+=1;var o=32-Sr(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,ms=1<<32-Sr(t)+s|n<<s|r,gs=o+e}else ms=1<<o|n<<s|r,gs=e}function Ug(e){e.return!==null&&(Fo(e,1),zb(e,1,0))}function Vg(e){for(;e===kd;)kd=Yi[--Ki],Yi[Ki]=null,Cd=Yi[--Ki],Yi[Ki]=null;for(;e===si;)si=tr[--nr],tr[nr]=null,gs=tr[--nr],tr[nr]=null,ms=tr[--nr],tr[nr]=null}var Bn=null,Vn=null,Rt=!1,vr=null;function $b(e,t){var n=sr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function a0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Bn=e,Vn=po(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Bn=e,Vn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=si!==null?{id:ms,overflow:gs}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=sr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Bn=e,Vn=null,!0):!1;default:return!1}}function mm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function gm(e){if(Rt){var t=Vn;if(t){var n=t;if(!a0(e,t)){if(mm(e))throw Error(ie(418));t=po(n.nextSibling);var r=Bn;t&&a0(e,t)?$b(r,n):(e.flags=e.flags&-4097|2,Rt=!1,Bn=e)}}else{if(mm(e))throw Error(ie(418));e.flags=e.flags&-4097|2,Rt=!1,Bn=e}}}function l0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Bn=e}function bu(e){if(e!==Bn)return!1;if(!Rt)return l0(e),Rt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!dm(e.type,e.memoizedProps)),t&&(t=Vn)){if(mm(e))throw Ub(),Error(ie(418));for(;t;)$b(e,t),t=po(t.nextSibling)}if(l0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vn=po(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vn=null}}else Vn=Bn?po(e.stateNode.nextSibling):null;return!0}function Ub(){for(var e=Vn;e;)e=po(e.nextSibling)}function _a(){Vn=Bn=null,Rt=!1}function Bg(e){vr===null?vr=[e]:vr.push(e)}var iP=Os.ReactCurrentBatchConfig;function nl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ie(309));var r=n.stateNode}if(!r)throw Error(ie(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(ie(284));if(!n._owner)throw Error(ie(290,e))}return e}function _u(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function c0(e){var t=e._init;return t(e._payload)}function Vb(e){function t(m,p){if(e){var b=m.deletions;b===null?(m.deletions=[p],m.flags|=16):b.push(p)}}function n(m,p){if(!e)return null;for(;p!==null;)t(m,p),p=p.sibling;return null}function r(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function s(m,p){return m=vo(m,p),m.index=0,m.sibling=null,m}function o(m,p,b){return m.index=b,e?(b=m.alternate,b!==null?(b=b.index,b<p?(m.flags|=2,p):b):(m.flags|=2,p)):(m.flags|=1048576,p)}function i(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,p,b,_){return p===null||p.tag!==6?(p=dp(b,m.mode,_),p.return=m,p):(p=s(p,b),p.return=m,p)}function c(m,p,b,_){var C=b.type;return C===$i?d(m,p,b.props.children,_,b.key):p!==null&&(p.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Qs&&c0(C)===p.type)?(_=s(p,b.props),_.ref=nl(m,p,b),_.return=m,_):(_=Ju(b.type,b.key,b.props,null,m.mode,_),_.ref=nl(m,p,b),_.return=m,_)}function u(m,p,b,_){return p===null||p.tag!==4||p.stateNode.containerInfo!==b.containerInfo||p.stateNode.implementation!==b.implementation?(p=fp(b,m.mode,_),p.return=m,p):(p=s(p,b.children||[]),p.return=m,p)}function d(m,p,b,_,C){return p===null||p.tag!==7?(p=Jo(b,m.mode,_,C),p.return=m,p):(p=s(p,b),p.return=m,p)}function f(m,p,b){if(typeof p=="string"&&p!==""||typeof p=="number")return p=dp(""+p,m.mode,b),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case du:return b=Ju(p.type,p.key,p.props,null,m.mode,b),b.ref=nl(m,null,p),b.return=m,b;case zi:return p=fp(p,m.mode,b),p.return=m,p;case Qs:var _=p._init;return f(m,_(p._payload),b)}if(yl(p)||Xa(p))return p=Jo(p,m.mode,b,null),p.return=m,p;_u(m,p)}return null}function h(m,p,b,_){var C=p!==null?p.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return C!==null?null:a(m,p,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case du:return b.key===C?c(m,p,b,_):null;case zi:return b.key===C?u(m,p,b,_):null;case Qs:return C=b._init,h(m,p,C(b._payload),_)}if(yl(b)||Xa(b))return C!==null?null:d(m,p,b,_,null);_u(m,b)}return null}function y(m,p,b,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return m=m.get(b)||null,a(p,m,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case du:return m=m.get(_.key===null?b:_.key)||null,c(p,m,_,C);case zi:return m=m.get(_.key===null?b:_.key)||null,u(p,m,_,C);case Qs:var j=_._init;return y(m,p,b,j(_._payload),C)}if(yl(_)||Xa(_))return m=m.get(b)||null,d(p,m,_,C,null);_u(p,_)}return null}function x(m,p,b,_){for(var C=null,j=null,T=p,P=p=0,A=null;T!==null&&P<b.length;P++){T.index>P?(A=T,T=null):A=T.sibling;var D=h(m,T,b[P],_);if(D===null){T===null&&(T=A);break}e&&T&&D.alternate===null&&t(m,T),p=o(D,p,P),j===null?C=D:j.sibling=D,j=D,T=A}if(P===b.length)return n(m,T),Rt&&Fo(m,P),C;if(T===null){for(;P<b.length;P++)T=f(m,b[P],_),T!==null&&(p=o(T,p,P),j===null?C=T:j.sibling=T,j=T);return Rt&&Fo(m,P),C}for(T=r(m,T);P<b.length;P++)A=y(T,m,P,b[P],_),A!==null&&(e&&A.alternate!==null&&T.delete(A.key===null?P:A.key),p=o(A,p,P),j===null?C=A:j.sibling=A,j=A);return e&&T.forEach(function(G){return t(m,G)}),Rt&&Fo(m,P),C}function g(m,p,b,_){var C=Xa(b);if(typeof C!="function")throw Error(ie(150));if(b=C.call(b),b==null)throw Error(ie(151));for(var j=C=null,T=p,P=p=0,A=null,D=b.next();T!==null&&!D.done;P++,D=b.next()){T.index>P?(A=T,T=null):A=T.sibling;var G=h(m,T,D.value,_);if(G===null){T===null&&(T=A);break}e&&T&&G.alternate===null&&t(m,T),p=o(G,p,P),j===null?C=G:j.sibling=G,j=G,T=A}if(D.done)return n(m,T),Rt&&Fo(m,P),C;if(T===null){for(;!D.done;P++,D=b.next())D=f(m,D.value,_),D!==null&&(p=o(D,p,P),j===null?C=D:j.sibling=D,j=D);return Rt&&Fo(m,P),C}for(T=r(m,T);!D.done;P++,D=b.next())D=y(T,m,P,D.value,_),D!==null&&(e&&D.alternate!==null&&T.delete(D.key===null?P:D.key),p=o(D,p,P),j===null?C=D:j.sibling=D,j=D);return e&&T.forEach(function(N){return t(m,N)}),Rt&&Fo(m,P),C}function w(m,p,b,_){if(typeof b=="object"&&b!==null&&b.type===$i&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case du:e:{for(var C=b.key,j=p;j!==null;){if(j.key===C){if(C=b.type,C===$i){if(j.tag===7){n(m,j.sibling),p=s(j,b.props.children),p.return=m,m=p;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Qs&&c0(C)===j.type){n(m,j.sibling),p=s(j,b.props),p.ref=nl(m,j,b),p.return=m,m=p;break e}n(m,j);break}else t(m,j);j=j.sibling}b.type===$i?(p=Jo(b.props.children,m.mode,_,b.key),p.return=m,m=p):(_=Ju(b.type,b.key,b.props,null,m.mode,_),_.ref=nl(m,p,b),_.return=m,m=_)}return i(m);case zi:e:{for(j=b.key;p!==null;){if(p.key===j)if(p.tag===4&&p.stateNode.containerInfo===b.containerInfo&&p.stateNode.implementation===b.implementation){n(m,p.sibling),p=s(p,b.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=fp(b,m.mode,_),p.return=m,m=p}return i(m);case Qs:return j=b._init,w(m,p,j(b._payload),_)}if(yl(b))return x(m,p,b,_);if(Xa(b))return g(m,p,b,_);_u(m,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,p!==null&&p.tag===6?(n(m,p.sibling),p=s(p,b),p.return=m,m=p):(n(m,p),p=dp(b,m.mode,_),p.return=m,m=p),i(m)):n(m,p)}return w}var Sa=Vb(!0),Bb=Vb(!1),jd=Ao(null),Ed=null,Gi=null,Wg=null;function Hg(){Wg=Gi=Ed=null}function Yg(e){var t=jd.current;kt(jd),e._currentValue=t}function ym(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ca(e,t){Ed=e,Wg=Gi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Rn=!0),e.firstContext=null)}function lr(e){var t=e._currentValue;if(Wg!==e)if(e={context:e,memoizedValue:t,next:null},Gi===null){if(Ed===null)throw Error(ie(308));Gi=e,Ed.dependencies={lanes:0,firstContext:e}}else Gi=Gi.next=e;return t}var Wo=null;function Kg(e){Wo===null?Wo=[e]:Wo.push(e)}function Wb(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Kg(t)):(n.next=s.next,s.next=n),t.interleaved=n,Cs(e,r)}function Cs(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Js=!1;function Gg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Hb(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 xs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,lt&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Cs(e,n)}return s=r.interleaved,s===null?(t.next=t,Kg(r)):(t.next=s.next,s.next=t),r.interleaved=t,Cs(e,n)}function Ku(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Og(e,n)}}function u0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Nd(e,t,n,r){var s=e.updateQueue;Js=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,a=o;do{var h=a.lane,y=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,g=a;switch(h=t,y=n,g.tag){case 1:if(x=g.payload,typeof x=="function"){f=x.call(y,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=g.payload,h=typeof x=="function"?x.call(y,f,h):x,h==null)break e;f=Lt({},f,h);break e;case 2:Js=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else y={eventTime:y,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=y,c=f):d=d.next=y,i|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);ii|=i,e.lanes=i,e.memoizedState=f}}function d0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(ie(191,s));s.call(r)}}}var Mc={},Gr=Ao(Mc),ec=Ao(Mc),tc=Ao(Mc);function Ho(e){if(e===Mc)throw Error(ie(174));return e}function Zg(e,t){switch(bt(tc,t),bt(ec,e),bt(Gr,Mc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Xp(t,e)}kt(Gr),bt(Gr,t)}function ka(){kt(Gr),kt(ec),kt(tc)}function Yb(e){Ho(tc.current);var t=Ho(Gr.current),n=Xp(t,e.type);t!==n&&(bt(ec,e),bt(Gr,n))}function qg(e){ec.current===e&&(kt(Gr),kt(ec))}var Dt=Ao(0);function Td(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var op=[];function Xg(){for(var e=0;e<op.length;e++)op[e]._workInProgressVersionPrimary=null;op.length=0}var Gu=Os.ReactCurrentDispatcher,ip=Os.ReactCurrentBatchConfig,oi=0,Mt=null,Gt=null,Qt=null,Rd=!1,Dl=!1,nc=0,aP=0;function ln(){throw Error(ie(321))}function Qg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jr(e[n],t[n]))return!1;return!0}function Jg(e,t,n,r,s,o){if(oi=o,Mt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gu.current=e===null||e.memoizedState===null?dP:fP,e=n(r,s),Dl){o=0;do{if(Dl=!1,nc=0,25<=o)throw Error(ie(301));o+=1,Qt=Gt=null,t.updateQueue=null,Gu.current=hP,e=n(r,s)}while(Dl)}if(Gu.current=Pd,t=Gt!==null&&Gt.next!==null,oi=0,Qt=Gt=Mt=null,Rd=!1,t)throw Error(ie(300));return e}function ey(){var e=nc!==0;return nc=0,e}function zr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?Mt.memoizedState=Qt=e:Qt=Qt.next=e,Qt}function cr(){if(Gt===null){var e=Mt.alternate;e=e!==null?e.memoizedState:null}else e=Gt.next;var t=Qt===null?Mt.memoizedState:Qt.next;if(t!==null)Qt=t,Gt=e;else{if(e===null)throw Error(ie(310));Gt=e,e={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},Qt===null?Mt.memoizedState=Qt=e:Qt=Qt.next=e}return Qt}function rc(e,t){return typeof t=="function"?t(e):t}function ap(e){var t=cr(),n=t.queue;if(n===null)throw Error(ie(311));n.lastRenderedReducer=e;var r=Gt,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,c=null,u=o;do{var d=u.lane;if((oi&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=f,i=r):c=c.next=f,Mt.lanes|=d,ii|=d}u=u.next}while(u!==null&&u!==o);c===null?i=r:c.next=a,jr(r,t.memoizedState)||(Rn=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,Mt.lanes|=o,ii|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function lp(e){var t=cr(),n=t.queue;if(n===null)throw Error(ie(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);jr(o,t.memoizedState)||(Rn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Kb(){}function Gb(e,t){var n=Mt,r=cr(),s=t(),o=!jr(r.memoizedState,s);if(o&&(r.memoizedState=s,Rn=!0),r=r.queue,ty(Xb.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Qt!==null&&Qt.memoizedState.tag&1){if(n.flags|=2048,sc(9,qb.bind(null,n,r,s,t),void 0,null),Jt===null)throw Error(ie(349));oi&30||Zb(n,t,s)}return s}function Zb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Mt.updateQueue,t===null?(t={lastEffect:null,stores:null},Mt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function qb(e,t,n,r){t.value=n,t.getSnapshot=r,Qb(t)&&Jb(e)}function Xb(e,t,n){return n(function(){Qb(t)&&Jb(e)})}function Qb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jr(e,n)}catch{return!0}}function Jb(e){var t=Cs(e,1);t!==null&&kr(t,e,1,-1)}function f0(e){var t=zr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rc,lastRenderedState:e},t.queue=e,e=e.dispatch=uP.bind(null,Mt,e),[t.memoizedState,e]}function sc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Mt.updateQueue,t===null?(t={lastEffect:null,stores:null},Mt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function e_(){return cr().memoizedState}function Zu(e,t,n,r){var s=zr();Mt.flags|=e,s.memoizedState=sc(1|t,n,void 0,r===void 0?null:r)}function Nf(e,t,n,r){var s=cr();r=r===void 0?null:r;var o=void 0;if(Gt!==null){var i=Gt.memoizedState;if(o=i.destroy,r!==null&&Qg(r,i.deps)){s.memoizedState=sc(t,n,o,r);return}}Mt.flags|=e,s.memoizedState=sc(1|t,n,o,r)}function h0(e,t){return Zu(8390656,8,e,t)}function ty(e,t){return Nf(2048,8,e,t)}function t_(e,t){return Nf(4,2,e,t)}function n_(e,t){return Nf(4,4,e,t)}function r_(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function s_(e,t,n){return n=n!=null?n.concat([e]):null,Nf(4,4,r_.bind(null,t,e),n)}function ny(){}function o_(e,t){var n=cr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Qg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function i_(e,t){var n=cr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Qg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function a_(e,t,n){return oi&21?(jr(n,t)||(n=fb(),Mt.lanes|=n,ii|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Rn=!0),e.memoizedState=n)}function lP(e,t){var n=gt;gt=n!==0&&4>n?n:4,e(!0);var r=ip.transition;ip.transition={};try{e(!1),t()}finally{gt=n,ip.transition=r}}function l_(){return cr().memoizedState}function cP(e,t,n){var r=yo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},c_(e))u_(t,n);else if(n=Wb(e,t,n,r),n!==null){var s=_n();kr(n,e,r,s),d_(n,t,r)}}function uP(e,t,n){var r=yo(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(c_(e))u_(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,jr(a,i)){var c=t.interleaved;c===null?(s.next=s,Kg(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=Wb(e,t,s,r),n!==null&&(s=_n(),kr(n,e,r,s),d_(n,t,r))}}function c_(e){var t=e.alternate;return e===Mt||t!==null&&t===Mt}function u_(e,t){Dl=Rd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function d_(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Og(e,n)}}var Pd={readContext:lr,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},dP={readContext:lr,useCallback:function(e,t){return zr().memoizedState=[e,t===void 0?null:t],e},useContext:lr,useEffect:h0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zu(4194308,4,r_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zu(4,2,e,t)},useMemo:function(e,t){var n=zr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=cP.bind(null,Mt,e),[r.memoizedState,e]},useRef:function(e){var t=zr();return e={current:e},t.memoizedState=e},useState:f0,useDebugValue:ny,useDeferredValue:function(e){return zr().memoizedState=e},useTransition:function(){var e=f0(!1),t=e[0];return e=lP.bind(null,e[1]),zr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mt,s=zr();if(Rt){if(n===void 0)throw Error(ie(407));n=n()}else{if(n=t(),Jt===null)throw Error(ie(349));oi&30||Zb(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,h0(Xb.bind(null,r,o,e),[e]),r.flags|=2048,sc(9,qb.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=zr(),t=Jt.identifierPrefix;if(Rt){var n=gs,r=ms;n=(r&~(1<<32-Sr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=nc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=aP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},fP={readContext:lr,useCallback:o_,useContext:lr,useEffect:ty,useImperativeHandle:s_,useInsertionEffect:t_,useLayoutEffect:n_,useMemo:i_,useReducer:ap,useRef:e_,useState:function(){return ap(rc)},useDebugValue:ny,useDeferredValue:function(e){var t=cr();return a_(t,Gt.memoizedState,e)},useTransition:function(){var e=ap(rc)[0],t=cr().memoizedState;return[e,t]},useMutableSource:Kb,useSyncExternalStore:Gb,useId:l_,unstable_isNewReconciler:!1},hP={readContext:lr,useCallback:o_,useContext:lr,useEffect:ty,useImperativeHandle:s_,useInsertionEffect:t_,useLayoutEffect:n_,useMemo:i_,useReducer:lp,useRef:e_,useState:function(){return lp(rc)},useDebugValue:ny,useDeferredValue:function(e){var t=cr();return Gt===null?t.memoizedState=e:a_(t,Gt.memoizedState,e)},useTransition:function(){var e=lp(rc)[0],t=cr().memoizedState;return[e,t]},useMutableSource:Kb,useSyncExternalStore:Gb,useId:l_,unstable_isNewReconciler:!1};function pr(e,t){if(e&&e.defaultProps){t=Lt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function vm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Lt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Tf={isMounted:function(e){return(e=e._reactInternals)?yi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_n(),s=yo(e),o=xs(r,s);o.payload=t,n!=null&&(o.callback=n),t=mo(e,o,s),t!==null&&(kr(t,e,s,r),Ku(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_n(),s=yo(e),o=xs(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=mo(e,o,s),t!==null&&(kr(t,e,s,r),Ku(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_n(),r=yo(e),s=xs(n,r);s.tag=2,t!=null&&(s.callback=t),t=mo(e,s,r),t!==null&&(kr(t,e,r,n),Ku(t,e,r))}};function p0(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!ql(n,r)||!ql(s,o):!0}function f_(e,t,n){var r=!1,s=_o,o=t.contextType;return typeof o=="object"&&o!==null?o=lr(o):(s=An(t)?ri:fn.current,r=t.contextTypes,o=(r=r!=null)?ba(e,s):_o),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Tf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function m0(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Tf.enqueueReplaceState(t,t.state,null)}function xm(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Gg(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=lr(o):(o=An(t)?ri:fn.current,s.context=ba(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(vm(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Tf.enqueueReplaceState(s,s.state,null),Nd(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ca(e,t){try{var n="",r=t;do n+=U2(r),r=r.return;while(r);var s=n}catch(o){s=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function cp(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function wm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var pP=typeof WeakMap=="function"?WeakMap:Map;function h_(e,t,n){n=xs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Od||(Od=!0,Rm=r),wm(e,t)},n}function p_(e,t,n){n=xs(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){wm(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){wm(e,t),typeof r!="function"&&(go===null?go=new Set([this]):go.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function g0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new pP;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=NP.bind(null,e,t,n),t.then(e,e))}function y0(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 v0(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=xs(-1,1),t.tag=2,mo(n,t,1))),n.lanes|=1),e)}var mP=Os.ReactCurrentOwner,Rn=!1;function wn(e,t,n,r){t.child=e===null?Bb(t,null,n,r):Sa(t,e.child,n,r)}function x0(e,t,n,r,s){n=n.render;var o=t.ref;return ca(t,s),r=Jg(e,t,n,r,o,s),n=ey(),e!==null&&!Rn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,js(e,t,s)):(Rt&&n&&Ug(t),t.flags|=1,wn(e,t,r,s),t.child)}function w0(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!uy(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,m_(e,t,o,r,s)):(e=Ju(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:ql,n(i,r)&&e.ref===t.ref)return js(e,t,s)}return t.flags|=1,e=vo(o,r),e.ref=t.ref,e.return=t,t.child=e}function m_(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(ql(o,r)&&e.ref===t.ref)if(Rn=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(Rn=!0);else return t.lanes=e.lanes,js(e,t,s)}return bm(e,t,n,r,s)}function g_(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(qi,zn),zn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,bt(qi,zn),zn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,bt(qi,zn),zn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,bt(qi,zn),zn|=r;return wn(e,t,s,n),t.child}function y_(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function bm(e,t,n,r,s){var o=An(n)?ri:fn.current;return o=ba(t,o),ca(t,s),n=Jg(e,t,n,r,o,s),r=ey(),e!==null&&!Rn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,js(e,t,s)):(Rt&&r&&Ug(t),t.flags|=1,wn(e,t,n,s),t.child)}function b0(e,t,n,r,s){if(An(n)){var o=!0;Sd(t)}else o=!1;if(ca(t,s),t.stateNode===null)qu(e,t),f_(t,n,r),xm(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=lr(u):(u=An(n)?ri:fn.current,u=ba(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||c!==u)&&m0(t,i,r,u),Js=!1;var h=t.memoizedState;i.state=h,Nd(t,r,i,s),c=t.memoizedState,a!==r||h!==c||Pn.current||Js?(typeof d=="function"&&(vm(t,n,d,r),c=t.memoizedState),(a=Js||p0(t,n,a,r,h,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Hb(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:pr(t.type,a),i.props=u,f=t.pendingProps,h=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=lr(c):(c=An(n)?ri:fn.current,c=ba(t,c));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||h!==c)&&m0(t,i,r,c),Js=!1,h=t.memoizedState,i.state=h,Nd(t,r,i,s);var x=t.memoizedState;a!==f||h!==x||Pn.current||Js?(typeof y=="function"&&(vm(t,n,y,r),x=t.memoizedState),(u=Js||p0(t,n,u,r,h,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return _m(e,t,n,r,o,s)}function _m(e,t,n,r,s,o){y_(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&i0(t,n,!1),js(e,t,o);r=t.stateNode,mP.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Sa(t,e.child,null,o),t.child=Sa(t,null,a,o)):wn(e,t,a,o),t.memoizedState=r.state,s&&i0(t,n,!0),t.child}function v_(e){var t=e.stateNode;t.pendingContext?o0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&o0(e,t.context,!1),Zg(e,t.containerInfo)}function _0(e,t,n,r,s){return _a(),Bg(s),t.flags|=256,wn(e,t,n,r),t.child}var Sm={dehydrated:null,treeContext:null,retryLane:0};function km(e){return{baseLanes:e,cachePool:null,transitions:null}}function x_(e,t,n){var r=t.pendingProps,s=Dt.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),bt(Dt,s&1),e===null)return gm(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Af(i,r,0,null),e=Jo(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=km(n),t.memoizedState=Sm,e):ry(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return gP(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=vo(s,c),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=vo(a,o):(o=Jo(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?km(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Sm,r}return o=e.child,e=o.sibling,r=vo(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ry(e,t){return t=Af({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Su(e,t,n,r){return r!==null&&Bg(r),Sa(t,e.child,null,n),e=ry(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gP(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=cp(Error(ie(422))),Su(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Af({mode:"visible",children:r.children},s,0,null),o=Jo(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Sa(t,e.child,null,i),t.child.memoizedState=km(i),t.memoizedState=Sm,o);if(!(t.mode&1))return Su(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(ie(419)),r=cp(o,r,void 0),Su(e,t,i,r)}if(a=(i&e.childLanes)!==0,Rn||a){if(r=Jt,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Cs(e,s),kr(r,e,s,-1))}return cy(),r=cp(Error(ie(421))),Su(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=TP.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Vn=po(s.nextSibling),Bn=t,Rt=!0,vr=null,e!==null&&(tr[nr++]=ms,tr[nr++]=gs,tr[nr++]=si,ms=e.id,gs=e.overflow,si=t),t=ry(t,r.children),t.flags|=4096,t)}function S0(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ym(e.return,t,n)}function up(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function w_(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(wn(e,t,r.children,n),r=Dt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&S0(e,n,t);else if(e.tag===19)S0(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(bt(Dt,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Td(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),up(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Td(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}up(t,!0,n,null,o);break;case"together":up(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function js(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ii|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,n=vo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=vo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function yP(e,t,n){switch(t.tag){case 3:v_(t),_a();break;case 5:Yb(t);break;case 1:An(t.type)&&Sd(t);break;case 4:Zg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;bt(jd,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(bt(Dt,Dt.current&1),t.flags|=128,null):n&t.child.childLanes?x_(e,t,n):(bt(Dt,Dt.current&1),e=js(e,t,n),e!==null?e.sibling:null);bt(Dt,Dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return w_(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(Dt,Dt.current),r)break;return null;case 22:case 23:return t.lanes=0,g_(e,t,n)}return js(e,t,n)}var b_,Cm,__,S_;b_=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Cm=function(){};__=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Ho(Gr.current);var o=null;switch(n){case"input":s=Kp(e,s),r=Kp(e,r),o=[];break;case"select":s=Lt({},s,{value:void 0}),r=Lt({},r,{value:void 0}),o=[];break;case"textarea":s=qp(e,s),r=qp(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bd)}Qp(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Bl.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&a[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Bl.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&St("scroll",e),o||a===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};S_=function(e,t,n,r){n!==r&&(t.flags|=4)};function rl(e,t){if(!Rt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function cn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function vP(e,t,n){var r=t.pendingProps;switch(Vg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cn(t),null;case 1:return An(t.type)&&_d(),cn(t),null;case 3:return r=t.stateNode,ka(),kt(Pn),kt(fn),Xg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(bu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vr!==null&&(Om(vr),vr=null))),Cm(e,t),cn(t),null;case 5:qg(t);var s=Ho(tc.current);if(n=t.type,e!==null&&t.stateNode!=null)__(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ie(166));return cn(t),null}if(e=Ho(Gr.current),bu(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[$r]=t,r[Jl]=o,e=(t.mode&1)!==0,n){case"dialog":St("cancel",r),St("close",r);break;case"iframe":case"object":case"embed":St("load",r);break;case"video":case"audio":for(s=0;s<xl.length;s++)St(xl[s],r);break;case"source":St("error",r);break;case"img":case"image":case"link":St("error",r),St("load",r);break;case"details":St("toggle",r);break;case"input":Ax(r,o),St("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},St("invalid",r);break;case"textarea":Dx(r,o),St("invalid",r)}Qp(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&wu(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&wu(r.textContent,a,e),s=["children",""+a]):Bl.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&St("scroll",r)}switch(n){case"input":fu(r),Ox(r,o,!0);break;case"textarea":fu(r),Ix(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=bd)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=X1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[$r]=t,e[Jl]=r,b_(e,t,!1,!1),t.stateNode=e;e:{switch(i=Jp(n,r),n){case"dialog":St("cancel",e),St("close",e),s=r;break;case"iframe":case"object":case"embed":St("load",e),s=r;break;case"video":case"audio":for(s=0;s<xl.length;s++)St(xl[s],e);s=r;break;case"source":St("error",e),s=r;break;case"img":case"image":case"link":St("error",e),St("load",e),s=r;break;case"details":St("toggle",e),s=r;break;case"input":Ax(e,r),s=Kp(e,r),St("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Lt({},r,{value:void 0}),St("invalid",e);break;case"textarea":Dx(e,r),s=qp(e,r),St("invalid",e);break;default:s=r}Qp(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var c=a[o];o==="style"?eb(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Q1(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Wl(e,c):typeof c=="number"&&Wl(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Bl.hasOwnProperty(o)?c!=null&&o==="onScroll"&&St("scroll",e):c!=null&&Eg(e,o,c,i))}switch(n){case"input":fu(e),Ox(e,r,!1);break;case"textarea":fu(e),Ix(e);break;case"option":r.value!=null&&e.setAttribute("value",""+bo(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?oa(e,!!r.multiple,o,!1):r.defaultValue!=null&&oa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=bd)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return cn(t),null;case 6:if(e&&t.stateNode!=null)S_(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ie(166));if(n=Ho(tc.current),Ho(Gr.current),bu(t)){if(r=t.stateNode,n=t.memoizedProps,r[$r]=t,(o=r.nodeValue!==n)&&(e=Bn,e!==null))switch(e.tag){case 3:wu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wu(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$r]=t,t.stateNode=r}return cn(t),null;case 13:if(kt(Dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Rt&&Vn!==null&&t.mode&1&&!(t.flags&128))Ub(),_a(),t.flags|=98560,o=!1;else if(o=bu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ie(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ie(317));o[$r]=t}else _a(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;cn(t),o=!1}else vr!==null&&(Om(vr),vr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Dt.current&1?Zt===0&&(Zt=3):cy())),t.updateQueue!==null&&(t.flags|=4),cn(t),null);case 4:return ka(),Cm(e,t),e===null&&Xl(t.stateNode.containerInfo),cn(t),null;case 10:return Yg(t.type._context),cn(t),null;case 17:return An(t.type)&&_d(),cn(t),null;case 19:if(kt(Dt),o=t.memoizedState,o===null)return cn(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)rl(o,!1);else{if(Zt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Td(e),i!==null){for(t.flags|=128,rl(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return bt(Dt,Dt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Vt()>ja&&(t.flags|=128,r=!0,rl(o,!1),t.lanes=4194304)}else{if(!r)if(e=Td(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Rt)return cn(t),null}else 2*Vt()-o.renderingStartTime>ja&&n!==1073741824&&(t.flags|=128,r=!0,rl(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Vt(),t.sibling=null,n=Dt.current,bt(Dt,r?n&1|2:n&1),t):(cn(t),null);case 22:case 23:return ly(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?zn&1073741824&&(cn(t),t.subtreeFlags&6&&(t.flags|=8192)):cn(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function xP(e,t){switch(Vg(t),t.tag){case 1:return An(t.type)&&_d(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ka(),kt(Pn),kt(fn),Xg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qg(t),null;case 13:if(kt(Dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));_a()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return kt(Dt),null;case 4:return ka(),null;case 10:return Yg(t.type._context),null;case 22:case 23:return ly(),null;case 24:return null;default:return null}}var ku=!1,un=!1,wP=typeof WeakSet=="function"?WeakSet:Set,Ee=null;function Zi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){zt(e,t,r)}else n.current=null}function jm(e,t,n){try{n()}catch(r){zt(e,t,r)}}var k0=!1;function bP(e,t){if(cm=vd,e=Nb(),$g(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var y;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(y=f.firstChild)!==null;)h=f,f=y;for(;;){if(f===e)break t;if(h===n&&++u===s&&(a=i),h===o&&++d===r&&(c=i),(y=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=y}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(um={focusedElem:e,selectionRange:n},vd=!1,Ee=t;Ee!==null;)if(t=Ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ee=e;else for(;Ee!==null;){t=Ee;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var g=x.memoizedProps,w=x.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:pr(t.type,g),w);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(_){zt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ee=e;break}Ee=t.return}return x=k0,k0=!1,x}function Il(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&jm(t,n,o)}s=s.next}while(s!==r)}}function Rf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Em(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function k_(e){var t=e.alternate;t!==null&&(e.alternate=null,k_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$r],delete t[Jl],delete t[hm],delete t[rP],delete t[sP])),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 C_(e){return e.tag===5||e.tag===3||e.tag===4}function C0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||C_(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 Nm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bd));else if(r!==4&&(e=e.child,e!==null))for(Nm(e,t,n),e=e.sibling;e!==null;)Nm(e,t,n),e=e.sibling}function Tm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Tm(e,t,n),e=e.sibling;e!==null;)Tm(e,t,n),e=e.sibling}var nn=null,mr=!1;function Ks(e,t,n){for(n=n.child;n!==null;)j_(e,t,n),n=n.sibling}function j_(e,t,n){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(_f,n)}catch{}switch(n.tag){case 5:un||Zi(n,t);case 6:var r=nn,s=mr;nn=null,Ks(e,t,n),nn=r,mr=s,nn!==null&&(mr?(e=nn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):nn.removeChild(n.stateNode));break;case 18:nn!==null&&(mr?(e=nn,n=n.stateNode,e.nodeType===8?rp(e.parentNode,n):e.nodeType===1&&rp(e,n),Gl(e)):rp(nn,n.stateNode));break;case 4:r=nn,s=mr,nn=n.stateNode.containerInfo,mr=!0,Ks(e,t,n),nn=r,mr=s;break;case 0:case 11:case 14:case 15:if(!un&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&jm(n,t,i),s=s.next}while(s!==r)}Ks(e,t,n);break;case 1:if(!un&&(Zi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){zt(n,t,a)}Ks(e,t,n);break;case 21:Ks(e,t,n);break;case 22:n.mode&1?(un=(r=un)||n.memoizedState!==null,Ks(e,t,n),un=r):Ks(e,t,n);break;default:Ks(e,t,n)}}function j0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wP),t.forEach(function(r){var s=RP.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function hr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:nn=a.stateNode,mr=!1;break e;case 3:nn=a.stateNode.containerInfo,mr=!0;break e;case 4:nn=a.stateNode.containerInfo,mr=!0;break e}a=a.return}if(nn===null)throw Error(ie(160));j_(o,i,s),nn=null,mr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){zt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)E_(t,e),t=t.sibling}function E_(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hr(t,e),Fr(e),r&4){try{Il(3,e,e.return),Rf(3,e)}catch(g){zt(e,e.return,g)}try{Il(5,e,e.return)}catch(g){zt(e,e.return,g)}}break;case 1:hr(t,e),Fr(e),r&512&&n!==null&&Zi(n,n.return);break;case 5:if(hr(t,e),Fr(e),r&512&&n!==null&&Zi(n,n.return),e.flags&32){var s=e.stateNode;try{Wl(s,"")}catch(g){zt(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Z1(s,o),Jp(a,i);var u=Jp(a,o);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?eb(s,f):d==="dangerouslySetInnerHTML"?Q1(s,f):d==="children"?Wl(s,f):Eg(s,d,f,u)}switch(a){case"input":Gp(s,o);break;case"textarea":q1(s,o);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?oa(s,!!o.multiple,y,!1):h!==!!o.multiple&&(o.defaultValue!=null?oa(s,!!o.multiple,o.defaultValue,!0):oa(s,!!o.multiple,o.multiple?[]:"",!1))}s[Jl]=o}catch(g){zt(e,e.return,g)}}break;case 6:if(hr(t,e),Fr(e),r&4){if(e.stateNode===null)throw Error(ie(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(g){zt(e,e.return,g)}}break;case 3:if(hr(t,e),Fr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(g){zt(e,e.return,g)}break;case 4:hr(t,e),Fr(e);break;case 13:hr(t,e),Fr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(iy=Vt())),r&4&&j0(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(un=(u=un)||d,hr(t,e),un=u):hr(t,e),Fr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ee=e,d=e.child;d!==null;){for(f=Ee=d;Ee!==null;){switch(h=Ee,y=h.child,h.tag){case 0:case 11:case 14:case 15:Il(4,h,h.return);break;case 1:Zi(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(g){zt(r,n,g)}}break;case 5:Zi(h,h.return);break;case 22:if(h.memoizedState!==null){N0(f);continue}}y!==null?(y.return=h,Ee=y):N0(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=J1("display",i))}catch(g){zt(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){zt(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:hr(t,e),Fr(e),r&4&&j0(e);break;case 21:break;default:hr(t,e),Fr(e)}}function Fr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(C_(n)){var r=n;break e}n=n.return}throw Error(ie(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Wl(s,""),r.flags&=-33);var o=C0(e);Tm(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=C0(e);Nm(e,a,i);break;default:throw Error(ie(161))}}catch(c){zt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _P(e,t,n){Ee=e,N_(e)}function N_(e,t,n){for(var r=(e.mode&1)!==0;Ee!==null;){var s=Ee,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||ku;if(!i){var a=s.alternate,c=a!==null&&a.memoizedState!==null||un;a=ku;var u=un;if(ku=i,(un=c)&&!u)for(Ee=s;Ee!==null;)i=Ee,c=i.child,i.tag===22&&i.memoizedState!==null?T0(s):c!==null?(c.return=i,Ee=c):T0(s);for(;o!==null;)Ee=o,N_(o),o=o.sibling;Ee=s,ku=a,un=u}E0(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Ee=o):E0(e)}}function E0(e){for(;Ee!==null;){var t=Ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:un||Rf(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!un)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:pr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&d0(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}d0(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Gl(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}un||t.flags&512&&Em(t)}catch(h){zt(t,t.return,h)}}if(t===e){Ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ee=n;break}Ee=t.return}}function N0(e){for(;Ee!==null;){var t=Ee;if(t===e){Ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ee=n;break}Ee=t.return}}function T0(e){for(;Ee!==null;){var t=Ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Rf(4,t)}catch(c){zt(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){zt(t,s,c)}}var o=t.return;try{Em(t)}catch(c){zt(t,o,c)}break;case 5:var i=t.return;try{Em(t)}catch(c){zt(t,i,c)}}}catch(c){zt(t,t.return,c)}if(t===e){Ee=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Ee=a;break}Ee=t.return}}var SP=Math.ceil,Ad=Os.ReactCurrentDispatcher,sy=Os.ReactCurrentOwner,or=Os.ReactCurrentBatchConfig,lt=0,Jt=null,Ht=null,rn=0,zn=0,qi=Ao(0),Zt=0,oc=null,ii=0,Pf=0,oy=0,Ml=null,Tn=null,iy=0,ja=1/0,ds=null,Od=!1,Rm=null,go=null,Cu=!1,io=null,Dd=0,Ll=0,Pm=null,Xu=-1,Qu=0;function _n(){return lt&6?Vt():Xu!==-1?Xu:Xu=Vt()}function yo(e){return e.mode&1?lt&2&&rn!==0?rn&-rn:iP.transition!==null?(Qu===0&&(Qu=fb()),Qu):(e=gt,e!==0||(e=window.event,e=e===void 0?16:xb(e.type)),e):1}function kr(e,t,n,r){if(50<Ll)throw Ll=0,Pm=null,Error(ie(185));Oc(e,n,r),(!(lt&2)||e!==Jt)&&(e===Jt&&(!(lt&2)&&(Pf|=n),Zt===4&&to(e,rn)),On(e,r),n===1&&lt===0&&!(t.mode&1)&&(ja=Vt()+500,Ef&&Oo()))}function On(e,t){var n=e.callbackNode;iR(e,t);var r=yd(e,e===Jt?rn:0);if(r===0)n!==null&&Fx(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Fx(n),t===1)e.tag===0?oP(R0.bind(null,e)):Fb(R0.bind(null,e)),tP(function(){!(lt&6)&&Oo()}),n=null;else{switch(hb(r)){case 1:n=Ag;break;case 4:n=ub;break;case 16:n=gd;break;case 536870912:n=db;break;default:n=gd}n=M_(n,T_.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function T_(e,t){if(Xu=-1,Qu=0,lt&6)throw Error(ie(327));var n=e.callbackNode;if(ua()&&e.callbackNode!==n)return null;var r=yd(e,e===Jt?rn:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Id(e,r);else{t=r;var s=lt;lt|=2;var o=P_();(Jt!==e||rn!==t)&&(ds=null,ja=Vt()+500,Qo(e,t));do try{jP();break}catch(a){R_(e,a)}while(!0);Hg(),Ad.current=o,lt=s,Ht!==null?t=0:(Jt=null,rn=0,t=Zt)}if(t!==0){if(t===2&&(s=sm(e),s!==0&&(r=s,t=Am(e,s))),t===1)throw n=oc,Qo(e,0),to(e,r),On(e,Vt()),n;if(t===6)to(e,r);else{if(s=e.current.alternate,!(r&30)&&!kP(s)&&(t=Id(e,r),t===2&&(o=sm(e),o!==0&&(r=o,t=Am(e,o))),t===1))throw n=oc,Qo(e,0),to(e,r),On(e,Vt()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(ie(345));case 2:zo(e,Tn,ds);break;case 3:if(to(e,r),(r&130023424)===r&&(t=iy+500-Vt(),10<t)){if(yd(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){_n(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=fm(zo.bind(null,e,Tn,ds),t);break}zo(e,Tn,ds);break;case 4:if(to(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-Sr(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=Vt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*SP(r/1960))-r,10<r){e.timeoutHandle=fm(zo.bind(null,e,Tn,ds),r);break}zo(e,Tn,ds);break;case 5:zo(e,Tn,ds);break;default:throw Error(ie(329))}}}return On(e,Vt()),e.callbackNode===n?T_.bind(null,e):null}function Am(e,t){var n=Ml;return e.current.memoizedState.isDehydrated&&(Qo(e,t).flags|=256),e=Id(e,t),e!==2&&(t=Tn,Tn=n,t!==null&&Om(t)),e}function Om(e){Tn===null?Tn=e:Tn.push.apply(Tn,e)}function kP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!jr(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function to(e,t){for(t&=~oy,t&=~Pf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Sr(t),r=1<<n;e[n]=-1,t&=~r}}function R0(e){if(lt&6)throw Error(ie(327));ua();var t=yd(e,0);if(!(t&1))return On(e,Vt()),null;var n=Id(e,t);if(e.tag!==0&&n===2){var r=sm(e);r!==0&&(t=r,n=Am(e,r))}if(n===1)throw n=oc,Qo(e,0),to(e,t),On(e,Vt()),n;if(n===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zo(e,Tn,ds),On(e,Vt()),null}function ay(e,t){var n=lt;lt|=1;try{return e(t)}finally{lt=n,lt===0&&(ja=Vt()+500,Ef&&Oo())}}function ai(e){io!==null&&io.tag===0&&!(lt&6)&&ua();var t=lt;lt|=1;var n=or.transition,r=gt;try{if(or.transition=null,gt=1,e)return e()}finally{gt=r,or.transition=n,lt=t,!(lt&6)&&Oo()}}function ly(){zn=qi.current,kt(qi)}function Qo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,eP(n)),Ht!==null)for(n=Ht.return;n!==null;){var r=n;switch(Vg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&_d();break;case 3:ka(),kt(Pn),kt(fn),Xg();break;case 5:qg(r);break;case 4:ka();break;case 13:kt(Dt);break;case 19:kt(Dt);break;case 10:Yg(r.type._context);break;case 22:case 23:ly()}n=n.return}if(Jt=e,Ht=e=vo(e.current,null),rn=zn=t,Zt=0,oc=null,oy=Pf=ii=0,Tn=Ml=null,Wo!==null){for(t=0;t<Wo.length;t++)if(n=Wo[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}Wo=null}return e}function R_(e,t){do{var n=Ht;try{if(Hg(),Gu.current=Pd,Rd){for(var r=Mt.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Rd=!1}if(oi=0,Qt=Gt=Mt=null,Dl=!1,nc=0,sy.current=null,n===null||n.return===null){Zt=1,oc=t,Ht=null;break}e:{var o=e,i=n.return,a=n,c=t;if(t=rn,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=y0(i);if(y!==null){y.flags&=-257,v0(y,i,a,o,t),y.mode&1&&g0(o,u,t),t=y,c=u;var x=t.updateQueue;if(x===null){var g=new Set;g.add(c),t.updateQueue=g}else x.add(c);break e}else{if(!(t&1)){g0(o,u,t),cy();break e}c=Error(ie(426))}}else if(Rt&&a.mode&1){var w=y0(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),v0(w,i,a,o,t),Bg(Ca(c,a));break e}}o=c=Ca(c,a),Zt!==4&&(Zt=2),Ml===null?Ml=[o]:Ml.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var m=h_(o,c,t);u0(o,m);break e;case 1:a=c;var p=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof p.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(go===null||!go.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=p_(o,a,t);u0(o,_);break e}}o=o.return}while(o!==null)}O_(n)}catch(C){t=C,Ht===n&&n!==null&&(Ht=n=n.return);continue}break}while(!0)}function P_(){var e=Ad.current;return Ad.current=Pd,e===null?Pd:e}function cy(){(Zt===0||Zt===3||Zt===2)&&(Zt=4),Jt===null||!(ii&268435455)&&!(Pf&268435455)||to(Jt,rn)}function Id(e,t){var n=lt;lt|=2;var r=P_();(Jt!==e||rn!==t)&&(ds=null,Qo(e,t));do try{CP();break}catch(s){R_(e,s)}while(!0);if(Hg(),lt=n,Ad.current=r,Ht!==null)throw Error(ie(261));return Jt=null,rn=0,Zt}function CP(){for(;Ht!==null;)A_(Ht)}function jP(){for(;Ht!==null&&!X2();)A_(Ht)}function A_(e){var t=I_(e.alternate,e,zn);e.memoizedProps=e.pendingProps,t===null?O_(e):Ht=t,sy.current=null}function O_(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=xP(n,t),n!==null){n.flags&=32767,Ht=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Zt=6,Ht=null;return}}else if(n=vP(n,t,zn),n!==null){Ht=n;return}if(t=t.sibling,t!==null){Ht=t;return}Ht=t=e}while(t!==null);Zt===0&&(Zt=5)}function zo(e,t,n){var r=gt,s=or.transition;try{or.transition=null,gt=1,EP(e,t,n,r)}finally{or.transition=s,gt=r}return null}function EP(e,t,n,r){do ua();while(io!==null);if(lt&6)throw Error(ie(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ie(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(aR(e,o),e===Jt&&(Ht=Jt=null,rn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Cu||(Cu=!0,M_(gd,function(){return ua(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=or.transition,or.transition=null;var i=gt;gt=1;var a=lt;lt|=4,sy.current=null,bP(e,n),E_(n,e),KR(um),vd=!!cm,um=cm=null,e.current=n,_P(n),Q2(),lt=a,gt=i,or.transition=o}else e.current=n;if(Cu&&(Cu=!1,io=e,Dd=s),o=e.pendingLanes,o===0&&(go=null),tR(n.stateNode),On(e,Vt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Od)throw Od=!1,e=Rm,Rm=null,e;return Dd&1&&e.tag!==0&&ua(),o=e.pendingLanes,o&1?e===Pm?Ll++:(Ll=0,Pm=e):Ll=0,Oo(),null}function ua(){if(io!==null){var e=hb(Dd),t=or.transition,n=gt;try{if(or.transition=null,gt=16>e?16:e,io===null)var r=!1;else{if(e=io,io=null,Dd=0,lt&6)throw Error(ie(331));var s=lt;for(lt|=4,Ee=e.current;Ee!==null;){var o=Ee,i=o.child;if(Ee.flags&16){var a=o.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(Ee=u;Ee!==null;){var d=Ee;switch(d.tag){case 0:case 11:case 15:Il(8,d,o)}var f=d.child;if(f!==null)f.return=d,Ee=f;else for(;Ee!==null;){d=Ee;var h=d.sibling,y=d.return;if(k_(d),d===u){Ee=null;break}if(h!==null){h.return=y,Ee=h;break}Ee=y}}}var x=o.alternate;if(x!==null){var g=x.child;if(g!==null){x.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}Ee=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,Ee=i;else e:for(;Ee!==null;){if(o=Ee,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Il(9,o,o.return)}var m=o.sibling;if(m!==null){m.return=o.return,Ee=m;break e}Ee=o.return}}var p=e.current;for(Ee=p;Ee!==null;){i=Ee;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,Ee=b;else e:for(i=p;Ee!==null;){if(a=Ee,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Rf(9,a)}}catch(C){zt(a,a.return,C)}if(a===i){Ee=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,Ee=_;break e}Ee=a.return}}if(lt=s,Oo(),Kr&&typeof Kr.onPostCommitFiberRoot=="function")try{Kr.onPostCommitFiberRoot(_f,e)}catch{}r=!0}return r}finally{gt=n,or.transition=t}}return!1}function P0(e,t,n){t=Ca(n,t),t=h_(e,t,1),e=mo(e,t,1),t=_n(),e!==null&&(Oc(e,1,t),On(e,t))}function zt(e,t,n){if(e.tag===3)P0(e,e,n);else for(;t!==null;){if(t.tag===3){P0(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(go===null||!go.has(r))){e=Ca(n,e),e=p_(t,e,1),t=mo(t,e,1),e=_n(),t!==null&&(Oc(t,1,e),On(t,e));break}}t=t.return}}function NP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_n(),e.pingedLanes|=e.suspendedLanes&n,Jt===e&&(rn&n)===n&&(Zt===4||Zt===3&&(rn&130023424)===rn&&500>Vt()-iy?Qo(e,0):oy|=n),On(e,t)}function D_(e,t){t===0&&(e.mode&1?(t=mu,mu<<=1,!(mu&130023424)&&(mu=4194304)):t=1);var n=_n();e=Cs(e,t),e!==null&&(Oc(e,t,n),On(e,n))}function TP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),D_(e,n)}function RP(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ie(314))}r!==null&&r.delete(t),D_(e,n)}var I_;I_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pn.current)Rn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Rn=!1,yP(e,t,n);Rn=!!(e.flags&131072)}else Rn=!1,Rt&&t.flags&1048576&&zb(t,Cd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qu(e,t),e=t.pendingProps;var s=ba(t,fn.current);ca(t,n),s=Jg(null,t,r,e,s,n);var o=ey();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,An(r)?(o=!0,Sd(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Gg(t),s.updater=Tf,t.stateNode=s,s._reactInternals=t,xm(t,r,e,n),t=_m(null,t,r,!0,o,n)):(t.tag=0,Rt&&o&&Ug(t),wn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qu(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=AP(r),e=pr(r,e),s){case 0:t=bm(null,t,r,e,n);break e;case 1:t=b0(null,t,r,e,n);break e;case 11:t=x0(null,t,r,e,n);break e;case 14:t=w0(null,t,r,pr(r.type,e),n);break e}throw Error(ie(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:pr(r,s),bm(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:pr(r,s),b0(e,t,r,s,n);case 3:e:{if(v_(t),e===null)throw Error(ie(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Hb(e,t),Nd(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Ca(Error(ie(423)),t),t=_0(e,t,r,n,s);break e}else if(r!==s){s=Ca(Error(ie(424)),t),t=_0(e,t,r,n,s);break e}else for(Vn=po(t.stateNode.containerInfo.firstChild),Bn=t,Rt=!0,vr=null,n=Bb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_a(),r===s){t=js(e,t,n);break e}wn(e,t,r,n)}t=t.child}return t;case 5:return Yb(t),e===null&&gm(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,dm(r,s)?i=null:o!==null&&dm(r,o)&&(t.flags|=32),y_(e,t),wn(e,t,i,n),t.child;case 6:return e===null&&gm(t),null;case 13:return x_(e,t,n);case 4:return Zg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Sa(t,null,r,n):wn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:pr(r,s),x0(e,t,r,s,n);case 7:return wn(e,t,t.pendingProps,n),t.child;case 8:return wn(e,t,t.pendingProps.children,n),t.child;case 12:return wn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,bt(jd,r._currentValue),r._currentValue=i,o!==null)if(jr(o.value,i)){if(o.children===s.children&&!Pn.current){t=js(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=xs(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ym(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(ie(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),ym(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}wn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,ca(t,n),s=lr(s),r=r(s),t.flags|=1,wn(e,t,r,n),t.child;case 14:return r=t.type,s=pr(r,t.pendingProps),s=pr(r.type,s),w0(e,t,r,s,n);case 15:return m_(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:pr(r,s),qu(e,t),t.tag=1,An(r)?(e=!0,Sd(t)):e=!1,ca(t,n),f_(t,r,s),xm(t,r,s,n),_m(null,t,r,!0,e,n);case 19:return w_(e,t,n);case 22:return g_(e,t,n)}throw Error(ie(156,t.tag))};function M_(e,t){return cb(e,t)}function PP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sr(e,t,n,r){return new PP(e,t,n,r)}function uy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function AP(e){if(typeof e=="function")return uy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Tg)return 11;if(e===Rg)return 14}return 2}function vo(e,t){var n=e.alternate;return n===null?(n=sr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ju(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")uy(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case $i:return Jo(n.children,s,o,t);case Ng:i=8,s|=8;break;case Bp:return e=sr(12,n,t,s|2),e.elementType=Bp,e.lanes=o,e;case Wp:return e=sr(13,n,t,s),e.elementType=Wp,e.lanes=o,e;case Hp:return e=sr(19,n,t,s),e.elementType=Hp,e.lanes=o,e;case Y1:return Af(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W1:i=10;break e;case H1:i=9;break e;case Tg:i=11;break e;case Rg:i=14;break e;case Qs:i=16,r=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=sr(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function Jo(e,t,n,r){return e=sr(7,e,r,t),e.lanes=n,e}function Af(e,t,n,r){return e=sr(22,e,r,t),e.elementType=Y1,e.lanes=n,e.stateNode={isHidden:!1},e}function dp(e,t,n){return e=sr(6,e,null,t),e.lanes=n,e}function fp(e,t,n){return t=sr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function OP(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yh(0),this.expirationTimes=Yh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yh(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function dy(e,t,n,r,s,o,i,a,c){return e=new OP(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=sr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gg(o),e}function DP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function L_(e){if(!e)return _o;e=e._reactInternals;e:{if(yi(e)!==e||e.tag!==1)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(An(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ie(171))}if(e.tag===1){var n=e.type;if(An(n))return Lb(e,n,t)}return t}function F_(e,t,n,r,s,o,i,a,c){return e=dy(n,r,!0,e,s,o,i,a,c),e.context=L_(null),n=e.current,r=_n(),s=yo(n),o=xs(r,s),o.callback=t??null,mo(n,o,s),e.current.lanes=s,Oc(e,s,r),On(e,r),e}function Of(e,t,n,r){var s=t.current,o=_n(),i=yo(s);return n=L_(n),t.context===null?t.context=n:t.pendingContext=n,t=xs(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=mo(s,t,i),e!==null&&(kr(e,s,i,o),Ku(e,s,i)),i}function Md(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function A0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fy(e,t){A0(e,t),(e=e.alternate)&&A0(e,t)}function IP(){return null}var z_=typeof reportError=="function"?reportError:function(e){console.error(e)};function hy(e){this._internalRoot=e}Df.prototype.render=hy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));Of(e,t,null,null)};Df.prototype.unmount=hy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ai(function(){Of(null,e,null,null)}),t[ks]=null}};function Df(e){this._internalRoot=e}Df.prototype.unstable_scheduleHydration=function(e){if(e){var t=gb();e={blockedOn:null,target:e,priority:t};for(var n=0;n<eo.length&&t!==0&&t<eo[n].priority;n++);eo.splice(n,0,e),n===0&&vb(e)}};function py(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function If(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function O0(){}function MP(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=Md(i);o.call(u)}}var i=F_(t,r,e,0,null,!1,!1,"",O0);return e._reactRootContainer=i,e[ks]=i.current,Xl(e.nodeType===8?e.parentNode:e),ai(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Md(c);a.call(u)}}var c=dy(e,0,!1,null,null,!1,!1,"",O0);return e._reactRootContainer=c,e[ks]=c.current,Xl(e.nodeType===8?e.parentNode:e),ai(function(){Of(t,c,n,r)}),c}function Mf(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var c=Md(i);a.call(c)}}Of(t,i,e,s)}else i=MP(n,t,e,s,r);return Md(i)}pb=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=vl(t.pendingLanes);n!==0&&(Og(t,n|1),On(t,Vt()),!(lt&6)&&(ja=Vt()+500,Oo()))}break;case 13:ai(function(){var r=Cs(e,1);if(r!==null){var s=_n();kr(r,e,1,s)}}),fy(e,1)}};Dg=function(e){if(e.tag===13){var t=Cs(e,134217728);if(t!==null){var n=_n();kr(t,e,134217728,n)}fy(e,134217728)}};mb=function(e){if(e.tag===13){var t=yo(e),n=Cs(e,t);if(n!==null){var r=_n();kr(n,e,t,r)}fy(e,t)}};gb=function(){return gt};yb=function(e,t){var n=gt;try{return gt=e,t()}finally{gt=n}};tm=function(e,t,n){switch(t){case"input":if(Gp(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=jf(r);if(!s)throw Error(ie(90));G1(r),Gp(r,s)}}}break;case"textarea":q1(e,n);break;case"select":t=n.value,t!=null&&oa(e,!!n.multiple,t,!1)}};rb=ay;sb=ai;var LP={usingClientEntryPoint:!1,Events:[Ic,Wi,jf,tb,nb,ay]},sl={findFiberByHostInstance:Bo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},FP={bundleType:sl.bundleType,version:sl.version,rendererPackageName:sl.rendererPackageName,rendererConfig:sl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Os.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ab(e),e===null?null:e.stateNode},findFiberByHostInstance:sl.findFiberByHostInstance||IP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ju.isDisabled&&ju.supportsFiber)try{_f=ju.inject(FP),Kr=ju}catch{}}qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LP;qn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!py(t))throw Error(ie(200));return DP(e,t,null,n)};qn.createRoot=function(e,t){if(!py(e))throw Error(ie(299));var n=!1,r="",s=z_;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=dy(e,1,!1,null,null,n,!1,r,s),e[ks]=t.current,Xl(e.nodeType===8?e.parentNode:e),new hy(t)};qn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ie(188)):(e=Object.keys(e).join(","),Error(ie(268,e)));return e=ab(t),e=e===null?null:e.stateNode,e};qn.flushSync=function(e){return ai(e)};qn.hydrate=function(e,t,n){if(!If(t))throw Error(ie(200));return Mf(null,e,t,!0,n)};qn.hydrateRoot=function(e,t,n){if(!py(e))throw Error(ie(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=z_;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=F_(t,null,e,1,n??null,s,!1,o,i),e[ks]=t.current,Xl(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Df(t)};qn.render=function(e,t,n){if(!If(t))throw Error(ie(200));return Mf(null,e,t,!1,n)};qn.unmountComponentAtNode=function(e){if(!If(e))throw Error(ie(40));return e._reactRootContainer?(ai(function(){Mf(null,null,e,!1,function(){e._reactRootContainer=null,e[ks]=null})}),!0):!1};qn.unstable_batchedUpdates=ay;qn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!If(n))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return Mf(e,t,n,!1,r)};qn.version="18.3.1-next-f1338f8080-20240426";function $_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($_)}catch(e){console.error(e)}}$_(),$1.exports=qn;var Ds=$1.exports;const U_=wf(Ds),zP=E1({__proto__:null,default:U_},[Ds]);var D0=Ds;Up.createRoot=D0.createRoot,Up.hydrateRoot=D0.hydrateRoot;/**
* @remix-run/router v1.18.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ot.apply(this,arguments)}var Wt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Wt||(Wt={}));const I0="popstate";function $P(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:a="",hash:c=""}=Is(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),ic("",{pathname:i,search:a,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(s,o){let i=s.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let c=s.location.href,u=c.indexOf("#");a=u===-1?c:c.slice(0,u)}return a+"#"+(typeof o=="string"?o:ci(o))}function r(s,o){li(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return VP(t,n,r,e)}function et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function li(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function UP(){return Math.random().toString(36).substr(2,8)}function M0(e,t){return{usr:e.state,key:e.key,idx:t}}function ic(e,t,n,r){return n===void 0&&(n=null),Ot({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Is(t):t,{state:n,key:t&&t.key||r||UP()})}function ci(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Is(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function VP(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=Wt.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(Ot({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Wt.Pop;let w=d(),m=w==null?null:w-u;u=w,c&&c({action:a,location:g.location,delta:m})}function h(w,m){a=Wt.Push;let p=ic(g.location,w,m);n&&n(p,w),u=d()+1;let b=M0(p,u),_=g.createHref(p);try{i.pushState(b,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(_)}o&&c&&c({action:a,location:g.location,delta:1})}function y(w,m){a=Wt.Replace;let p=ic(g.location,w,m);n&&n(p,w),u=d();let b=M0(p,u),_=g.createHref(p);i.replaceState(b,"",_),o&&c&&c({action:a,location:g.location,delta:0})}function x(w){let m=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof w=="string"?w:ci(w);return p=p.replace(/ $/,"%20"),et(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let g={get action(){return a},get location(){return e(s,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(I0,f),c=w,()=>{s.removeEventListener(I0,f),c=null}},createHref(w){return t(s,w)},createURL:x,encodeLocation(w){let m=x(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:y,go(w){return i.go(w)}};return g}var wt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wt||(wt={}));const BP=new Set(["lazy","caseSensitive","path","id","index","children"]);function WP(e){return e.index===!0}function ac(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(et(s.index!==!0||!s.children,"Cannot specify children on an index route"),et(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),WP(s)){let c=Ot({},s,t(s),{id:a});return r[a]=c,c}else{let c=Ot({},s,t(s),{id:a,children:void 0});return r[a]=c,s.children&&(c.children=ac(s.children,t,i,r)),c}})}function $o(e,t,n){return n===void 0&&(n="/"),ed(e,t,n,!1)}function ed(e,t,n,r){let s=typeof t=="string"?Is(t):t,o=La(s.pathname||"/",n);if(o==null)return null;let i=V_(e);YP(i);let a=null;for(let c=0;a==null&&c<i.length;++c){let u=rA(o);a=tA(i[c],u,r)}return a}function HP(e,t){let{route:n,pathname:r,params:s}=e;return{id:n.id,pathname:r,params:s,data:t[n.id],handle:n.handle}}function V_(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,a)=>{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(et(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=ws([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(et(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),V_(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:JP(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let c of B_(o.path))s(o,i,c)}),t}function B_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=B_(r.join("/")),a=[];return a.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&a.push(...i),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function YP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const KP=/^:[\w-]+$/,GP=3,ZP=2,qP=1,XP=10,QP=-2,L0=e=>e==="*";function JP(e,t){let n=e.split("/"),r=n.length;return n.some(L0)&&(r+=QP),t&&(r+=ZP),n.filter(s=>!L0(s)).reduce((s,o)=>s+(KP.test(o)?GP:o===""?qP:XP),r)}function eA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function tA(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a<r.length;++a){let c=r[a],u=a===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=F0({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=F0({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:ws([o,f.pathname]),pathnameBase:iA(ws([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=ws([o,f.pathnameBase]))}return i}function F0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=nA(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:h,isOptional:y}=d;if(h==="*"){let g=a[f]||"";i=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const x=a[f];return y&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function nA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),li(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function rA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return li(!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 La(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function sA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Is(e):e;return{pathname:n?n.startsWith("/")?n:oA(n,t):t,search:aA(r),hash:lA(s)}}function oA(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function hp(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function W_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Lf(e,t){let n=W_(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ff(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Is(e):(s=Ot({},e),et(!s.pathname||!s.pathname.includes("?"),hp("?","pathname","search",s)),et(!s.pathname||!s.pathname.includes("#"),hp("#","pathname","hash",s)),et(!s.search||!s.search.includes("#"),hp("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let c=sA(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const ws=e=>e.join("/").replace(/\/\/+/g,"/"),iA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),aA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class my{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function zf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const H_=["post","put","patch","delete"],cA=new Set(H_),uA=["get",...H_],dA=new Set(uA),fA=new Set([301,302,303,307,308]),hA=new Set([307,308]),pp={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},pA={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ol={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},gy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mA=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Y_="remix-router-transitions";function gA(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;et(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 V=e.detectErrorBoundary;s=H=>({hasErrorBoundary:V(H)})}else s=mA;let o={},i=ac(e.routes,s,void 0,o),a,c=e.basename||"/",u=e.unstable_dataStrategy||bA,d=e.unstable_patchRoutesOnMiss,f=Ot({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,y=new Set,x=null,g=null,w=null,m=e.hydrationData!=null,p=$o(i,e.history.location,c),b=null;if(p==null&&!d){let V=vn(404,{pathname:e.history.location.pathname}),{matches:H,route:q}=G0(i);p=H,b={[q.id]:V}}p&&d&&!e.hydrationData&&$h(p,i,e.history.location.pathname).active&&(p=null);let _;if(!p)_=!1,p=[];else if(p.some(V=>V.route.lazy))_=!1;else if(!p.some(V=>V.route.loader))_=!0;else if(f.v7_partialHydration){let V=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,q=ne=>ne.route.loader?typeof ne.route.loader=="function"&&ne.route.loader.hydrate===!0?!1:V&&V[ne.route.id]!==void 0||H&&H[ne.route.id]!==void 0:!0;if(H){let ne=p.findIndex(ke=>H[ke.route.id]!==void 0);_=p.slice(0,ne+1).every(q)}else _=p.every(q)}else _=e.hydrationData!=null;let C,j={historyAction:e.history.action,location:e.history.location,matches:p,initialized:_,navigation:pp,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||b,fetchers:new Map,blockers:new Map},T=Wt.Pop,P=!1,A,D=!1,G=new Map,N=null,F=!1,S=!1,U=[],J=[],z=new Map,W=0,I=-1,X=new Map,$=new Set,B=new Map,he=new Map,re=new Set,se=new Map,De=new Map,pe=new Map,_e=!1;function Te(){if(h=e.history.listen(V=>{let{action:H,location:q,delta:ne}=V;if(_e){_e=!1;return}li(De.size===0||ne!=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 ke=su({currentLocation:j.location,nextLocation:q,historyAction:H});if(ke&&ne!=null){_e=!0,e.history.go(ne*-1),Si(ke,{state:"blocked",location:q,proceed(){Si(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),e.history.go(ne)},reset(){let Ae=new Map(j.blockers);Ae.set(ke,ol),Pe({blockers:Ae})}});return}return Z(H,q)}),n){DA(t,G);let V=()=>IA(t,G);t.addEventListener("pagehide",V),N=()=>t.removeEventListener("pagehide",V)}return j.initialized||Z(Wt.Pop,j.location,{initialHydration:!0}),C}function Fe(){h&&h(),N&&N(),y.clear(),A&&A.abort(),j.fetchers.forEach((V,H)=>Yt(H)),j.blockers.forEach((V,H)=>ru(H))}function Ie(V){return y.add(V),()=>y.delete(V)}function Pe(V,H){H===void 0&&(H={}),j=Ot({},j,V);let q=[],ne=[];f.v7_fetcherPersist&&j.fetchers.forEach((ke,Ae)=>{ke.state==="idle"&&(re.has(Ae)?ne.push(Ae):q.push(Ae))}),[...y].forEach(ke=>ke(j,{deletedFetchers:ne,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),f.v7_fetcherPersist&&(q.forEach(ke=>j.fetchers.delete(ke)),ne.forEach(ke=>Yt(ke)))}function rt(V,H,q){var ne,ke;let{flushSync:Ae}=q===void 0?{}:q,Be=j.actionData!=null&&j.navigation.formMethod!=null&&gr(j.navigation.formMethod)&&j.navigation.state==="loading"&&((ne=V.state)==null?void 0:ne._isRedirect)!==!0,fe;H.actionData?Object.keys(H.actionData).length>0?fe=H.actionData:fe=null:Be?fe=j.actionData:fe=null;let Ze=H.loaderData?Y0(j.loaderData,H.loaderData,H.matches||[],H.errors):j.loaderData,Le=j.blockers;Le.size>0&&(Le=new Map(Le),Le.forEach((mt,xt)=>Le.set(xt,ol)));let ze=P===!0||j.navigation.formMethod!=null&&gr(j.navigation.formMethod)&&((ke=V.state)==null?void 0:ke._isRedirect)!==!0;a&&(i=a,a=void 0),F||T===Wt.Pop||(T===Wt.Push?e.history.push(V,V.state):T===Wt.Replace&&e.history.replace(V,V.state));let yt;if(T===Wt.Pop){let mt=G.get(j.location.pathname);mt&&mt.has(V.pathname)?yt={currentLocation:j.location,nextLocation:V}:G.has(V.pathname)&&(yt={currentLocation:V,nextLocation:j.location})}else if(D){let mt=G.get(j.location.pathname);mt?mt.add(V.pathname):(mt=new Set([V.pathname]),G.set(j.location.pathname,mt)),yt={currentLocation:j.location,nextLocation:V}}Pe(Ot({},H,{actionData:fe,loaderData:Ze,historyAction:T,location:V,initialized:!0,navigation:pp,revalidation:"idle",restoreScrollPosition:kx(V,H.matches||j.matches),preventScrollReset:ze,blockers:Le}),{viewTransitionOpts:yt,flushSync:Ae===!0}),T=Wt.Pop,P=!1,D=!1,F=!1,S=!1,U=[],J=[]}async function E(V,H){if(typeof V=="number"){e.history.go(V);return}let q=Dm(j.location,j.matches,c,f.v7_prependBasename,V,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:ne,submission:ke,error:Ae}=z0(f.v7_normalizeFormMethod,!1,q,H),Be=j.location,fe=ic(j.location,ne,H&&H.state);fe=Ot({},fe,e.history.encodeLocation(fe));let Ze=H&&H.replace!=null?H.replace:void 0,Le=Wt.Push;Ze===!0?Le=Wt.Replace:Ze===!1||ke!=null&&gr(ke.formMethod)&&ke.formAction===j.location.pathname+j.location.search&&(Le=Wt.Replace);let ze=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,yt=(H&&H.unstable_flushSync)===!0,mt=su({currentLocation:Be,nextLocation:fe,historyAction:Le});if(mt){Si(mt,{state:"blocked",location:fe,proceed(){Si(mt,{state:"proceeding",proceed:void 0,reset:void 0,location:fe}),E(V,H)},reset(){let xt=new Map(j.blockers);xt.set(mt,ol),Pe({blockers:xt})}});return}return await Z(Le,fe,{submission:ke,pendingError:Ae,preventScrollReset:ze,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:yt})}function ee(){if(Ye(),Pe({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){Z(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}Z(T||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function Z(V,H,q){A&&A.abort(),A=null,T=V,F=(q&&q.startUninterruptedRevalidation)===!0,c2(j.location,j.matches),P=(q&&q.preventScrollReset)===!0,D=(q&&q.enableViewTransition)===!0;let ne=a||i,ke=q&&q.overrideNavigation,Ae=$o(ne,H,c),Be=(q&&q.flushSync)===!0,fe=$h(Ae,ne,H.pathname);if(fe.active&&fe.matches&&(Ae=fe.matches),!Ae){let{error:ht,notFoundMatches:tn,route:Bt}=ki(H.pathname);rt(H,{matches:tn,loaderData:{},errors:{[Bt.id]:ht}},{flushSync:Be});return}if(j.initialized&&!S&&EA(j.location,H)&&!(q&&q.submission&&gr(q.submission.formMethod))){rt(H,{matches:Ae},{flushSync:Be});return}A=new AbortController;let Ze=Ti(e.history,H,A.signal,q&&q.submission),Le;if(q&&q.pendingError)Le=[Xi(Ae).route.id,{type:wt.error,error:q.pendingError}];else if(q&&q.submission&&gr(q.submission.formMethod)){let ht=await O(Ze,H,q.submission,Ae,fe.active,{replace:q.replace,flushSync:Be});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[tn,Bt]=ht.pendingActionResult;if($n(Bt)&&zf(Bt.error)&&Bt.error.status===404){A=null,rt(H,{matches:ht.matches,loaderData:{},errors:{[tn]:Bt.error}});return}}Ae=ht.matches||Ae,Le=ht.pendingActionResult,ke=mp(H,q.submission),Be=!1,fe.active=!1,Ze=Ti(e.history,Ze.url,Ze.signal)}let{shortCircuited:ze,matches:yt,loaderData:mt,errors:xt}=await k(Ze,H,Ae,fe.active,ke,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,Be,Le);ze||(A=null,rt(H,Ot({matches:yt||Ae},K0(Le),{loaderData:mt,errors:xt})))}async function O(V,H,q,ne,ke,Ae){Ae===void 0&&(Ae={}),Ye();let Be=AA(H,q);if(Pe({navigation:Be},{flushSync:Ae.flushSync===!0}),ke){let Le=await ou(ne,H.pathname,V.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let{boundaryId:ze,error:yt}=Mr(H.pathname,Le);return{matches:Le.partialMatches,pendingActionResult:[ze,{type:wt.error,error:yt}]}}else if(Le.matches)ne=Le.matches;else{let{notFoundMatches:ze,error:yt,route:mt}=ki(H.pathname);return{matches:ze,pendingActionResult:[mt.id,{type:wt.error,error:yt}]}}}let fe,Ze=wl(ne,H);if(!Ze.route.action&&!Ze.route.lazy)fe={type:wt.error,error:vn(405,{method:V.method,pathname:H.pathname,routeId:Ze.route.id})};else if(fe=(await te("action",V,[Ze],ne))[0],V.signal.aborted)return{shortCircuited:!0};if(Ko(fe)){let Le;return Ae&&Ae.replace!=null?Le=Ae.replace:Le=B0(fe.response.headers.get("Location"),new URL(V.url),c)===j.location.pathname+j.location.search,await Q(V,fe,{submission:q,replace:Le}),{shortCircuited:!0}}if(Yo(fe))throw vn(400,{type:"defer-action"});if($n(fe)){let Le=Xi(ne,Ze.route.id);return(Ae&&Ae.replace)!==!0&&(T=Wt.Push),{matches:ne,pendingActionResult:[Le.route.id,fe]}}return{matches:ne,pendingActionResult:[Ze.route.id,fe]}}async function k(V,H,q,ne,ke,Ae,Be,fe,Ze,Le,ze){let yt=ke||mp(H,Ae),mt=Ae||Be||X0(yt),xt=!F&&(!f.v7_partialHydration||!Ze);if(ne){if(xt){let Ft=R(ze);Pe(Ot({navigation:yt},Ft!==void 0?{actionData:Ft}:{}),{flushSync:Le})}let Qe=await ou(q,H.pathname,V.signal);if(Qe.type==="aborted")return{shortCircuited:!0};if(Qe.type==="error"){let{boundaryId:Ft,error:Mn}=Mr(H.pathname,Qe);return{matches:Qe.partialMatches,loaderData:{},errors:{[Ft]:Mn}}}else if(Qe.matches)q=Qe.matches;else{let{error:Ft,notFoundMatches:Mn,route:Nt}=ki(H.pathname);return{matches:Mn,loaderData:{},errors:{[Nt.id]:Ft}}}}let ht=a||i,[tn,Bt]=$0(e.history,j,q,mt,H,f.v7_partialHydration&&Ze===!0,f.v7_skipActionErrorRevalidation,S,U,J,re,B,$,ht,c,ze);if(Hs(Qe=>!(q&&q.some(Ft=>Ft.route.id===Qe))||tn&&tn.some(Ft=>Ft.route.id===Qe)),I=++W,tn.length===0&&Bt.length===0){let Qe=os();return rt(H,Ot({matches:q,loaderData:{},errors:ze&&$n(ze[1])?{[ze[0]]:ze[1].error}:null},K0(ze),Qe?{fetchers:new Map(j.fetchers)}:{}),{flushSync:Le}),{shortCircuited:!0}}if(xt){let Qe={};if(!ne){Qe.navigation=yt;let Ft=R(ze);Ft!==void 0&&(Qe.actionData=Ft)}Bt.length>0&&(Qe.fetchers=M(Bt)),Pe(Qe,{flushSync:Le})}Bt.forEach(Qe=>{z.has(Qe.key)&&at(Qe.key),Qe.controller&&z.set(Qe.key,Qe.controller)});let qa=()=>Bt.forEach(Qe=>at(Qe.key));A&&A.signal.addEventListener("abort",qa);let{loaderResults:Ys,fetcherResults:Ci}=await me(j.matches,q,tn,Bt,V);if(V.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",qa),Bt.forEach(Qe=>z.delete(Qe.key));let ji=Z0([...Ys,...Ci]);if(ji){if(ji.idx>=tn.length){let Qe=Bt[ji.idx-tn.length].key;$.add(Qe)}return await Q(V,ji.result,{replace:fe}),{shortCircuited:!0}}let{loaderData:Ei,errors:Lr}=H0(j,q,tn,Ys,ze,Bt,Ci,se);se.forEach((Qe,Ft)=>{Qe.subscribe(Mn=>{(Mn||Qe.done)&&se.delete(Ft)})}),f.v7_partialHydration&&Ze&&j.errors&&Object.entries(j.errors).filter(Qe=>{let[Ft]=Qe;return!tn.some(Mn=>Mn.route.id===Ft)}).forEach(Qe=>{let[Ft,Mn]=Qe;Lr=Object.assign(Lr||{},{[Ft]:Mn})});let iu=os(),au=er(I),lu=iu||au||Bt.length>0;return Ot({matches:q,loaderData:Ei,errors:Lr},lu?{fetchers:new Map(j.fetchers)}:{})}function R(V){if(V&&!$n(V[1]))return{[V[0]]:V[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function M(V){return V.forEach(H=>{let q=j.fetchers.get(H.key),ne=il(void 0,q?q.data:void 0);j.fetchers.set(H.key,ne)}),new Map(j.fetchers)}function K(V,H,q,ne){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");z.has(V)&&at(V);let ke=(ne&&ne.unstable_flushSync)===!0,Ae=a||i,Be=Dm(j.location,j.matches,c,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,ne==null?void 0:ne.relative),fe=$o(Ae,Be,c),Ze=$h(fe,Ae,Be);if(Ze.active&&Ze.matches&&(fe=Ze.matches),!fe){Et(V,H,vn(404,{pathname:Be}),{flushSync:ke});return}let{path:Le,submission:ze,error:yt}=z0(f.v7_normalizeFormMethod,!0,Be,ne);if(yt){Et(V,H,yt,{flushSync:ke});return}let mt=wl(fe,Le);if(P=(ne&&ne.preventScrollReset)===!0,ze&&gr(ze.formMethod)){L(V,H,Le,mt,fe,Ze.active,ke,ze);return}B.set(V,{routeId:H,path:Le}),Y(V,H,Le,mt,fe,Ze.active,ke,ze)}async function L(V,H,q,ne,ke,Ae,Be,fe){Ye(),B.delete(V);function Ze(Nt){if(!Nt.route.action&&!Nt.route.lazy){let is=vn(405,{method:fe.formMethod,pathname:q,routeId:H});return Et(V,H,is,{flushSync:Be}),!0}return!1}if(!Ae&&Ze(ne))return;let Le=j.fetchers.get(V);$e(V,OA(fe,Le),{flushSync:Be});let ze=new AbortController,yt=Ti(e.history,q,ze.signal,fe);if(Ae){let Nt=await ou(ke,q,yt.signal);if(Nt.type==="aborted")return;if(Nt.type==="error"){let{error:is}=Mr(q,Nt);Et(V,H,is,{flushSync:Be});return}else if(Nt.matches){if(ke=Nt.matches,ne=wl(ke,q),Ze(ne))return}else{Et(V,H,vn(404,{pathname:q}),{flushSync:Be});return}}z.set(V,ze);let mt=W,ht=(await te("action",yt,[ne],ke))[0];if(yt.signal.aborted){z.get(V)===ze&&z.delete(V);return}if(f.v7_fetcherPersist&&re.has(V)){if(Ko(ht)||$n(ht)){$e(V,qs(void 0));return}}else{if(Ko(ht))if(z.delete(V),I>mt){$e(V,qs(void 0));return}else return $.add(V),$e(V,il(fe)),Q(yt,ht,{fetcherSubmission:fe});if($n(ht)){Et(V,H,ht.error);return}}if(Yo(ht))throw vn(400,{type:"defer-action"});let tn=j.navigation.location||j.location,Bt=Ti(e.history,tn,ze.signal),qa=a||i,Ys=j.navigation.state!=="idle"?$o(qa,j.navigation.location,c):j.matches;et(Ys,"Didn't find any matches after fetcher action");let Ci=++W;X.set(V,Ci);let ji=il(fe,ht.data);j.fetchers.set(V,ji);let[Ei,Lr]=$0(e.history,j,Ys,fe,tn,!1,f.v7_skipActionErrorRevalidation,S,U,J,re,B,$,qa,c,[ne.route.id,ht]);Lr.filter(Nt=>Nt.key!==V).forEach(Nt=>{let is=Nt.key,Cx=j.fetchers.get(is),f2=il(void 0,Cx?Cx.data:void 0);j.fetchers.set(is,f2),z.has(is)&&at(is),Nt.controller&&z.set(is,Nt.controller)}),Pe({fetchers:new Map(j.fetchers)});let iu=()=>Lr.forEach(Nt=>at(Nt.key));ze.signal.addEventListener("abort",iu);let{loaderResults:au,fetcherResults:lu}=await me(j.matches,Ys,Ei,Lr,Bt);if(ze.signal.aborted)return;ze.signal.removeEventListener("abort",iu),X.delete(V),z.delete(V),Lr.forEach(Nt=>z.delete(Nt.key));let Qe=Z0([...au,...lu]);if(Qe){if(Qe.idx>=Ei.length){let Nt=Lr[Qe.idx-Ei.length].key;$.add(Nt)}return Q(Bt,Qe.result)}let{loaderData:Ft,errors:Mn}=H0(j,j.matches,Ei,au,void 0,Lr,lu,se);if(j.fetchers.has(V)){let Nt=qs(ht.data);j.fetchers.set(V,Nt)}er(Ci),j.navigation.state==="loading"&&Ci>I?(et(T,"Expected pending action"),A&&A.abort(),rt(j.navigation.location,{matches:Ys,loaderData:Ft,errors:Mn,fetchers:new Map(j.fetchers)})):(Pe({errors:Mn,loaderData:Y0(j.loaderData,Ft,Ys,Mn),fetchers:new Map(j.fetchers)}),S=!1)}async function Y(V,H,q,ne,ke,Ae,Be,fe){let Ze=j.fetchers.get(V);$e(V,il(fe,Ze?Ze.data:void 0),{flushSync:Be});let Le=new AbortController,ze=Ti(e.history,q,Le.signal);if(Ae){let ht=await ou(ke,q,ze.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:tn}=Mr(q,ht);Et(V,H,tn,{flushSync:Be});return}else if(ht.matches)ke=ht.matches,ne=wl(ke,q);else{Et(V,H,vn(404,{pathname:q}),{flushSync:Be});return}}z.set(V,Le);let yt=W,xt=(await te("loader",ze,[ne],ke))[0];if(Yo(xt)&&(xt=await X_(xt,ze.signal,!0)||xt),z.get(V)===Le&&z.delete(V),!ze.signal.aborted){if(re.has(V)){$e(V,qs(void 0));return}if(Ko(xt))if(I>yt){$e(V,qs(void 0));return}else{$.add(V),await Q(ze,xt);return}if($n(xt)){Et(V,H,xt.error);return}et(!Yo(xt),"Unhandled fetcher deferred data"),$e(V,qs(xt.data))}}async function Q(V,H,q){let{submission:ne,fetcherSubmission:ke,replace:Ae}=q===void 0?{}:q;H.response.headers.has("X-Remix-Revalidate")&&(S=!0);let Be=H.response.headers.get("Location");et(Be,"Expected a Location header on the redirect Response"),Be=B0(Be,new URL(V.url),c);let fe=ic(j.location,Be,{_isRedirect:!0});if(n){let xt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(gy.test(Be)){const ht=e.history.createURL(Be);xt=ht.origin!==t.location.origin||La(ht.pathname,c)==null}if(xt){Ae?t.location.replace(Be):t.location.assign(Be);return}}A=null;let Ze=Ae===!0?Wt.Replace:Wt.Push,{formMethod:Le,formAction:ze,formEncType:yt}=j.navigation;!ne&&!ke&&Le&&ze&&yt&&(ne=X0(j.navigation));let mt=ne||ke;if(hA.has(H.response.status)&&mt&&gr(mt.formMethod))await Z(Ze,fe,{submission:Ot({},mt,{formAction:Be}),preventScrollReset:P});else{let xt=mp(fe,ne);await Z(Ze,fe,{overrideNavigation:xt,fetcherSubmission:ke,preventScrollReset:P})}}async function te(V,H,q,ne){try{let ke=await _A(u,V,H,q,ne,o,s);return await Promise.all(ke.map((Ae,Be)=>{if(TA(Ae)){let fe=Ae.result;return{type:wt.redirect,response:CA(fe,H,q[Be].route.id,ne,c,f.v7_relativeSplatPath)}}return kA(Ae)}))}catch(ke){return q.map(()=>({type:wt.error,error:ke}))}}async function me(V,H,q,ne,ke){let[Ae,...Be]=await Promise.all([q.length?te("loader",ke,q,H):[],...ne.map(fe=>{if(fe.matches&&fe.match&&fe.controller){let Ze=Ti(e.history,fe.path,fe.controller.signal);return te("loader",Ze,[fe.match],fe.matches).then(Le=>Le[0])}else return Promise.resolve({type:wt.error,error:vn(404,{pathname:fe.path})})})]);return await Promise.all([q0(V,q,Ae,Ae.map(()=>ke.signal),!1,j.loaderData),q0(V,ne.map(fe=>fe.match),Be,ne.map(fe=>fe.controller?fe.controller.signal:null),!0)]),{loaderResults:Ae,fetcherResults:Be}}function Ye(){S=!0,U.push(...Hs()),B.forEach((V,H)=>{z.has(H)&&(J.push(H),at(H))})}function $e(V,H,q){q===void 0&&(q={}),j.fetchers.set(V,H),Pe({fetchers:new Map(j.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Et(V,H,q,ne){ne===void 0&&(ne={});let ke=Xi(j.matches,H);Yt(V),Pe({errors:{[ke.route.id]:q},fetchers:new Map(j.fetchers)},{flushSync:(ne&&ne.flushSync)===!0})}function Jn(V){return f.v7_fetcherPersist&&(he.set(V,(he.get(V)||0)+1),re.has(V)&&re.delete(V)),j.fetchers.get(V)||pA}function Yt(V){let H=j.fetchers.get(V);z.has(V)&&!(H&&H.state==="loading"&&X.has(V))&&at(V),B.delete(V),X.delete(V),$.delete(V),re.delete(V),j.fetchers.delete(V)}function rs(V){if(f.v7_fetcherPersist){let H=(he.get(V)||0)-1;H<=0?(he.delete(V),re.add(V)):he.set(V,H)}else Yt(V);Pe({fetchers:new Map(j.fetchers)})}function at(V){let H=z.get(V);et(H,"Expected fetch controller: "+V),H.abort(),z.delete(V)}function ss(V){for(let H of V){let q=Jn(H),ne=qs(q.data);j.fetchers.set(H,ne)}}function os(){let V=[],H=!1;for(let q of $){let ne=j.fetchers.get(q);et(ne,"Expected fetcher: "+q),ne.state==="loading"&&($.delete(q),V.push(q),H=!0)}return ss(V),H}function er(V){let H=[];for(let[q,ne]of X)if(ne<V){let ke=j.fetchers.get(q);et(ke,"Expected fetcher: "+q),ke.state==="loading"&&(at(q),X.delete(q),H.push(q))}return ss(H),H.length>0}function nu(V,H){let q=j.blockers.get(V)||ol;return De.get(V)!==H&&De.set(V,H),q}function ru(V){j.blockers.delete(V),De.delete(V)}function Si(V,H){let q=j.blockers.get(V)||ol;et(q.state==="unblocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="proceeding"||q.state==="blocked"&&H.state==="unblocked"||q.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+H.state);let ne=new Map(j.blockers);ne.set(V,H),Pe({blockers:ne})}function su(V){let{currentLocation:H,nextLocation:q,historyAction:ne}=V;if(De.size===0)return;De.size>1&&li(!1,"A router only supports one blocker at a time");let ke=Array.from(De.entries()),[Ae,Be]=ke[ke.length-1],fe=j.blockers.get(Ae);if(!(fe&&fe.state==="proceeding")&&Be({currentLocation:H,nextLocation:q,historyAction:ne}))return Ae}function ki(V){let H=vn(404,{pathname:V}),q=a||i,{matches:ne,route:ke}=G0(q);return Hs(),{notFoundMatches:ne,route:ke,error:H}}function Mr(V,H){return{boundaryId:Xi(H.partialMatches).route.id,error:vn(400,{type:"route-discovery",pathname:V,message:H.error!=null&&"message"in H.error?H.error:String(H.error)})}}function Hs(V){let H=[];return se.forEach((q,ne)=>{(!V||V(ne))&&(q.cancel(),H.push(ne),se.delete(ne))}),H}function l2(V,H,q){if(x=V,w=H,g=q||null,!m&&j.navigation===pp){m=!0;let ne=kx(j.location,j.matches);ne!=null&&Pe({restoreScrollPosition:ne})}return()=>{x=null,w=null,g=null}}function Sx(V,H){return g&&g(V,H.map(ne=>HP(ne,j.loaderData)))||V.key}function c2(V,H){if(x&&w){let q=Sx(V,H);x[q]=w()}}function kx(V,H){if(x){let q=Sx(V,H),ne=x[q];if(typeof ne=="number")return ne}return null}function $h(V,H,q){if(d)if(V){let ne=V[V.length-1].route;if(ne.path&&(ne.path==="*"||ne.path.endsWith("/*")))return{active:!0,matches:ed(H,q,c,!0)}}else return{active:!0,matches:ed(H,q,c,!0)||[]};return{active:!1,matches:null}}async function ou(V,H,q){let ne=V,ke=ne.length>0?ne[ne.length-1].route:null;for(;;){let Ae=a==null,Be=a||i;try{await wA(d,H,ne,Be,o,s,pe,q)}catch(ze){return{type:"error",error:ze,partialMatches:ne}}finally{Ae&&(i=[...i])}if(q.aborted)return{type:"aborted"};let fe=$o(Be,H,c),Ze=!1;if(fe){let ze=fe[fe.length-1].route;if(ze.index)return{type:"success",matches:fe};if(ze.path&&ze.path.length>0)if(ze.path==="*")Ze=!0;else return{type:"success",matches:fe}}let Le=ed(Be,H,c,!0);if(!Le||ne.map(ze=>ze.route.id).join("-")===Le.map(ze=>ze.route.id).join("-"))return{type:"success",matches:Ze?fe:null};if(ne=Le,ke=ne[ne.length-1].route,ke.path==="*")return{type:"success",matches:ne}}}function u2(V){o={},a=ac(V,s,void 0,o)}function d2(V,H){let q=a==null;G_(V,H,a||i,o,s),q&&(i=[...i],Pe({}))}return C={get basename(){return c},get future(){return f},get state(){return j},get routes(){return i},get window(){return t},initialize:Te,subscribe:Ie,enableScrollRestoration:l2,navigate:E,fetch:K,revalidate:ee,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:Jn,deleteFetcher:rs,dispose:Fe,getBlocker:nu,deleteBlocker:ru,patchRoutes:d2,_internalFetchControllers:z,_internalActiveDeferreds:se,_internalSetRoutes:u2},C}function yA(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Dm(e,t,n,r,s,o,i,a){let c,u;if(i){c=[];for(let f of t)if(c.push(f),f.route.id===i){u=f;break}}else c=t,u=t[t.length-1];let d=Ff(s||".",Lf(c,o),La(e.pathname,n)||e.pathname,a==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!yy(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:ws([n,d.pathname])),ci(d)}function z0(e,t,n,r){if(!r||!yA(r))return{path:n};if(r.formMethod&&!PA(r.formMethod))return{path:n,error:vn(405,{method:r.formMethod})};let s=()=>({path:n,error:vn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Z_(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!gr(i))return s();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,x)=>{let[g,w]=x;return""+y+g+"="+w+`
`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!gr(i))return s();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}et(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=Im(r.formData),u=r.formData;else if(r.body instanceof FormData)c=Im(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=W0(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=W0(c)}catch{return s()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(gr(d.formMethod))return{path:n,submission:d};let f=Is(n);return t&&f.search&&yy(f.search)&&c.append("index",""),f.search="?"+c,{path:ci(f),submission:d}}function vA(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function $0(e,t,n,r,s,o,i,a,c,u,d,f,h,y,x,g){let w=g?$n(g[1])?g[1].error:g[1].data:void 0,m=e.createURL(t.location),p=e.createURL(s),b=g&&$n(g[1])?g[0]:void 0,_=b?vA(n,b):n,C=g?g[1].statusCode:void 0,j=i&&C&&C>=400,T=_.filter((A,D)=>{let{route:G}=A;if(G.lazy)return!0;if(G.loader==null)return!1;if(o)return typeof G.loader!="function"||G.loader.hydrate?!0:t.loaderData[G.id]===void 0&&(!t.errors||t.errors[G.id]===void 0);if(xA(t.loaderData,t.matches[D],A)||c.some(S=>S===A.route.id))return!0;let N=t.matches[D],F=A;return U0(A,Ot({currentUrl:m,currentParams:N.params,nextUrl:p,nextParams:F.params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:a||m.pathname+m.search===p.pathname+p.search||m.search!==p.search||K_(N,F)}))}),P=[];return f.forEach((A,D)=>{if(o||!n.some(U=>U.route.id===A.routeId)||d.has(D))return;let G=$o(y,A.path,x);if(!G){P.push({key:D,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(D),F=wl(G,A.path),S=!1;h.has(D)?S=!1:u.includes(D)?S=!0:N&&N.state!=="idle"&&N.data===void 0?S=a:S=U0(F,Ot({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:p,nextParams:n[n.length-1].params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:a})),S&&P.push({key:D,routeId:A.routeId,path:A.path,matches:G,match:F,controller:new AbortController})}),[T,P]}function xA(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function K_(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function U0(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function wA(e,t,n,r,s,o,i,a){let c=[t,...n.map(u=>u.route.id)].join("-");try{let u=i.get(c);u||(u=e({path:t,matches:n,patch:(d,f)=>{a.aborted||G_(d,f,r,s,o)}}),i.set(c,u)),u&&NA(u)&&await u}finally{i.delete(c)}}function G_(e,t,n,r,s){if(e){var o;let i=r[e];et(i,"No route found to patch children into: routeId = "+e);let a=ac(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=ac(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function V0(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];et(s,"No route found in manifest");let o={};for(let i in r){let c=s[i]!==void 0&&i!=="hasErrorBoundary";li(!c,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!BP.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,Ot({},t(s),{lazy:void 0}))}function bA(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function _A(e,t,n,r,s,o,i,a){let c=r.reduce((f,h)=>f.add(h.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let h=c.has(f.route.id);return Ot({},f,{shouldLoad:h,resolve:x=>(u.add(f.route.id),h?SA(t,n,f,o,i,x,a):Promise.resolve({type:wt.data,result:void 0}))})}),request:n,params:s[0].params,context:a});return s.forEach(f=>et(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,h)=>c.has(s[h].route.id))}async function SA(e,t,n,r,s,o,i){let a,c,u=d=>{let f,h=new Promise((g,w)=>f=w);c=()=>f(),t.signal.addEventListener("abort",c);let y=g=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...g!==void 0?[g]:[]),x;return o?x=o(g=>y(g)):x=(async()=>{try{return{type:"data",result:await y()}}catch(g){return{type:"error",result:g}}})(),Promise.race([x,h])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[h]=await Promise.all([u(d).catch(y=>{f=y}),V0(n.route,s,r)]);if(f!==void 0)throw f;a=h}else if(await V0(n.route,s,r),d=n.route[e],d)a=await u(d);else if(e==="action"){let f=new URL(t.url),h=f.pathname+f.search;throw vn(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:wt.data,result:void 0};else if(d)a=await u(d);else{let f=new URL(t.url),h=f.pathname+f.search;throw vn(404,{pathname:h})}et(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:wt.error,result:d}}finally{c&&t.signal.removeEventListener("abort",c)}return a}async function kA(e){let{result:t,type:n,status:r}=e;if(q_(t)){let i;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(a){return{type:wt.error,error:a}}return n===wt.error?{type:wt.error,error:new my(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:wt.data,data:i,statusCode:t.status,headers:t.headers}}if(n===wt.error)return{type:wt.error,error:t,statusCode:zf(t)?t.status:r};if(RA(t)){var s,o;return{type:wt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:wt.data,data:t,statusCode:r}}function CA(e,t,n,r,s,o){let i=e.headers.get("Location");if(et(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!gy.test(i)){let a=r.slice(0,r.findIndex(c=>c.route.id===n)+1);i=Dm(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function B0(e,t,n){if(gy.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=La(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Ti(e,t,n,r){let s=e.createURL(Z_(t)).toString(),o={signal:n};if(r&&gr(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Im(r.formData):o.body=r.formData}return new Request(s,o)}function Im(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function W0(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function jA(e,t,n,r,s,o){let i={},a=null,c,u=!1,d={},f=r&&$n(r[1])?r[1].error:void 0;return n.forEach((h,y)=>{let x=t[y].route.id;if(et(!Ko(h),"Cannot handle redirect results in processLoaderData"),$n(h)){let g=h.error;f!==void 0&&(g=f,f=void 0),a=a||{};{let w=Xi(e,x);a[w.route.id]==null&&(a[w.route.id]=g)}i[x]=void 0,u||(u=!0,c=zf(h.error)?h.error.status:500),h.headers&&(d[x]=h.headers)}else Yo(h)?(s.set(x,h.deferredData),i[x]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers)):(i[x]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers))}),f!==void 0&&r&&(a={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:a,statusCode:c||200,loaderHeaders:d}}function H0(e,t,n,r,s,o,i,a){let{loaderData:c,errors:u}=jA(t,n,r,s,a);for(let d=0;d<o.length;d++){let{key:f,match:h,controller:y}=o[d];et(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(y&&y.signal.aborted))if($n(x)){let g=Xi(e.matches,h==null?void 0:h.route.id);u&&u[g.route.id]||(u=Ot({},u,{[g.route.id]:x.error})),e.fetchers.delete(f)}else if(Ko(x))et(!1,"Unhandled fetcher revalidation redirect");else if(Yo(x))et(!1,"Unhandled fetcher deferred data");else{let g=qs(x.data);e.fetchers.set(f,g)}}return{loaderData:c,errors:u}}function Y0(e,t,n,r){let s=Ot({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(s[i]=t[i]):e[i]!==void 0&&o.route.loader&&(s[i]=e[i]),r&&r.hasOwnProperty(i))break}return s}function K0(e){return e?$n(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Xi(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function G0(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function vn(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+i):s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(a="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",c='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new my(e||500,a,new Error(c),!0)}function Z0(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Ko(n))return{result:n,idx:t}}}function Z_(e){let t=typeof e=="string"?Is(e):e;return ci(Ot({},t,{hash:""}))}function EA(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function NA(e){return typeof e=="object"&&e!=null&&"then"in e}function TA(e){return q_(e.result)&&fA.has(e.result.status)}function Yo(e){return e.type===wt.deferred}function $n(e){return e.type===wt.error}function Ko(e){return(e&&e.type)===wt.redirect}function RA(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 q_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function PA(e){return dA.has(e.toLowerCase())}function gr(e){return cA.has(e.toLowerCase())}async function q0(e,t,n,r,s,o){for(let i=0;i<n.length;i++){let a=n[i],c=t[i];if(!c)continue;let u=e.find(f=>f.route.id===c.route.id),d=u!=null&&!K_(u,c)&&(o&&o[c.route.id])!==void 0;if(Yo(a)&&(s||d)){let f=r[i];et(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await X_(a,f,s).then(h=>{h&&(n[i]=h||n[i])})}}}async function X_(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:wt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:wt.error,error:s}}return{type:wt.data,data:e.deferredData.data}}}function yy(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function wl(e,t){let n=typeof t=="string"?Is(t).search:t.search;if(e[e.length-1].route.index&&yy(n||""))return e[e.length-1];let r=W_(e);return r[r.length-1]}function X0(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function mp(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 AA(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 il(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 OA(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 qs(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 DA(e,t){try{let n=e.sessionStorage.getItem(Y_);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function IA(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(Y_,JSON.stringify(n))}catch(r){li(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
* React Router v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ld(){return Ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ld.apply(this,arguments)}const $f=v.createContext(null),Q_=v.createContext(null),Do=v.createContext(null),vy=v.createContext(null),Ms=v.createContext({outlet:null,matches:[],isDataRoute:!1}),J_=v.createContext(null);function MA(e,t){let{relative:n}=t===void 0?{}:t;Fa()||et(!1);let{basename:r,navigator:s}=v.useContext(Do),{hash:o,pathname:i,search:a}=tS(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:ws([r,i])),s.createHref({pathname:c,search:a,hash:o})}function Fa(){return v.useContext(vy)!=null}function Ar(){return Fa()||et(!1),v.useContext(vy).location}function eS(e){v.useContext(Do).static||v.useLayoutEffect(e)}function Dn(){let{isDataRoute:e}=v.useContext(Ms);return e?qA():LA()}function LA(){Fa()||et(!1);let e=v.useContext($f),{basename:t,future:n,navigator:r}=v.useContext(Do),{matches:s}=v.useContext(Ms),{pathname:o}=Ar(),i=JSON.stringify(Lf(s,n.v7_relativeSplatPath)),a=v.useRef(!1);return eS(()=>{a.current=!0}),v.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=Ff(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ws([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const FA=v.createContext(null);function zA(e){let t=v.useContext(Ms).outlet;return t&&v.createElement(FA.Provider,{value:e},t)}function tS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(Do),{matches:s}=v.useContext(Ms),{pathname:o}=Ar(),i=JSON.stringify(Lf(s,r.v7_relativeSplatPath));return v.useMemo(()=>Ff(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function $A(e,t,n,r){Fa()||et(!1);let{navigator:s}=v.useContext(Do),{matches:o}=v.useContext(Ms),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Ar(),d;d=u;let f=d.pathname||"/",h=f;if(c!=="/"){let g=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=$o(e,{pathname:h});return HA(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:ws([c,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?c:ws([c,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r)}function UA(){let e=ZA(),t=zf(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:s},n):null,null)}const VA=v.createElement(UA,null);class BA extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(Ms.Provider,{value:this.props.routeContext},v.createElement(J_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function WA(e){let{routeContext:t,match:n,children:r}=e,s=v.useContext($f);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Ms.Provider,{value:t},r)}function HA(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||et(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:y}=n,x=f.route.loader&&h[f.route.id]===void 0&&(!y||y[f.route.id]===void 0);if(f.route.lazy||x){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,h)=>{let y,x=!1,g=null,w=null;n&&(y=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||VA,c&&(u<0&&h===0?(XA("route-fallback"),x=!0,w=null):u===h&&(x=!0,w=f.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,h+1)),p=()=>{let b;return y?b=g:x?b=w:f.route.Component?b=v.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,v.createElement(WA,{match:f,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?v.createElement(BA,{location:n.location,revalidation:n.revalidation,component:g,error:y,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}var nS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(nS||{}),Fd=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}(Fd||{});function YA(e){let t=v.useContext($f);return t||et(!1),t}function KA(e){let t=v.useContext(Q_);return t||et(!1),t}function GA(e){let t=v.useContext(Ms);return t||et(!1),t}function rS(e){let t=GA(),n=t.matches[t.matches.length-1];return n.route.id||et(!1),n.route.id}function ZA(){var e;let t=v.useContext(J_),n=KA(Fd.UseRouteError),r=rS(Fd.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function qA(){let{router:e}=YA(nS.UseNavigateStable),t=rS(Fd.UseNavigateStable),n=v.useRef(!1);return eS(()=>{n.current=!0}),v.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ld({fromRouteId:t},o)))},[e,t])}const Q0={};function XA(e,t,n){Q0[e]||(Q0[e]=!0)}function sS(e){let{to:t,replace:n,state:r,relative:s}=e;Fa()||et(!1);let{future:o,static:i}=v.useContext(Do),{matches:a}=v.useContext(Ms),{pathname:c}=Ar(),u=Dn(),d=Ff(t,Lf(a,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return v.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function xy(e){return zA(e.context)}function QA(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Wt.Pop,navigator:o,static:i=!1,future:a}=e;Fa()&&et(!1);let c=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:c,navigator:o,static:i,future:Ld({v7_relativeSplatPath:!1},a)}),[c,a,o,i]);typeof r=="string"&&(r=Is(r));let{pathname:d="/",search:f="",hash:h="",state:y=null,key:x="default"}=r,g=v.useMemo(()=>{let w=La(d,c);return w==null?null:{location:{pathname:w,search:f,hash:h,state:y,key:x},navigationType:s}},[c,d,f,h,y,x,s]);return g==null?null:v.createElement(Do.Provider,{value:u},v.createElement(vy.Provider,{children:n,value:g}))}new Promise(()=>{});function JA(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:v.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
* React Router DOM v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lc.apply(this,arguments)}function eO(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function tO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nO(e,t){return e.button===0&&(!t||t==="_self")&&!tO(e)}function Mm(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function rO(e,t){let n=Mm(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const sO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],oO="6";try{window.__reactRouterVersion=oO}catch{}function iO(e,t){return gA({basename:void 0,future:lc({},void 0,{v7_prependBasename:!0}),history:$P({window:void 0}),hydrationData:aO(),routes:e,mapRouteProperties:JA,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function aO(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=lc({},t,{errors:lO(t.errors)})),t}function lO(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new my(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const cO=v.createContext({isTransitioning:!1}),uO=v.createContext(new Map),dO="startTransition",J0=F1[dO],fO="flushSync",ew=zP[fO];function hO(e){J0?J0(e):e()}function al(e){ew?ew(e):e()}class pO{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function mO(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=v.useState(n.state),[i,a]=v.useState(),[c,u]=v.useState({isTransitioning:!1}),[d,f]=v.useState(),[h,y]=v.useState(),[x,g]=v.useState(),w=v.useRef(new Map),{v7_startTransition:m}=r||{},p=v.useCallback(P=>{m?hO(P):P()},[m]),b=v.useCallback((P,A)=>{let{deletedFetchers:D,unstable_flushSync:G,unstable_viewTransitionOpts:N}=A;D.forEach(S=>w.current.delete(S)),P.fetchers.forEach((S,U)=>{S.data!==void 0&&w.current.set(U,S.data)});let F=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||F){G?al(()=>o(P)):p(()=>o(P));return}if(G){al(()=>{h&&(d&&d.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let S=n.window.document.startViewTransition(()=>{al(()=>o(P))});S.finished.finally(()=>{al(()=>{f(void 0),y(void 0),a(void 0),u({isTransitioning:!1})})}),al(()=>y(S));return}h?(d&&d.resolve(),h.skipTransition(),g({state:P,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(a(P),u({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,h,d,w,p]);v.useLayoutEffect(()=>n.subscribe(b),[n,b]),v.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new pO)},[c]),v.useEffect(()=>{if(d&&i&&n.window){let P=i,A=d.promise,D=n.window.document.startViewTransition(async()=>{p(()=>o(P)),await A});D.finished.finally(()=>{f(void 0),y(void 0),a(void 0),u({isTransitioning:!1})}),y(D)}},[p,i,d,n.window]),v.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,h,s.location,i]),v.useEffect(()=>{!c.isTransitioning&&x&&(a(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),g(void 0))},[c.isTransitioning,x]),v.useEffect(()=>{},[]);let _=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,A,D)=>n.navigate(P,{state:A,preventScrollReset:D==null?void 0:D.preventScrollReset}),replace:(P,A,D)=>n.navigate(P,{replace:!0,state:A,preventScrollReset:D==null?void 0:D.preventScrollReset})}),[n]),C=n.basename||"/",j=v.useMemo(()=>({router:n,navigator:_,static:!1,basename:C}),[n,_,C]),T=v.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return v.createElement(v.Fragment,null,v.createElement($f.Provider,{value:j},v.createElement(Q_.Provider,{value:s},v.createElement(uO.Provider,{value:w.current},v.createElement(cO.Provider,{value:c},v.createElement(QA,{basename:C,location:s.location,navigationType:s.historyAction,navigator:_,future:T},s.initialized||n.future.v7_partialHydration?v.createElement(gO,{routes:n.routes,future:n.future,state:s}):t))))),null)}const gO=v.memo(yO);function yO(e){let{routes:t,future:n,state:r}=e;return $A(t,void 0,r,n)}const vO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xn=v.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,h=eO(t,sO),{basename:y}=v.useContext(Do),x,g=!1;if(typeof u=="string"&&xO.test(u)&&(x=u,vO))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),C=La(_.pathname,y);_.origin===b.origin&&C!=null?u=C+_.search+_.hash:g=!0}catch{}let w=MA(u,{relative:s}),m=wO(u,{replace:i,state:a,target:c,preventScrollReset:d,relative:s,unstable_viewTransition:f});function p(b){r&&r(b),b.defaultPrevented||m(b)}return v.createElement("a",lc({},h,{href:x||w,onClick:g||o?r:p,ref:n,target:c}))});var tw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(tw||(tw={}));var nw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(nw||(nw={}));function wO(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,c=Dn(),u=Ar(),d=tS(e,{relative:i});return v.useCallback(f=>{if(nO(f,n)){f.preventDefault();let h=r!==void 0?r:ci(u)===ci(d);c(e,{replace:h,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[u,c,d,r,s,n,e,o,i,a])}function bO(e){let t=v.useRef(Mm(e)),n=v.useRef(!1),r=Ar(),s=v.useMemo(()=>rO(r.search,n.current?null:t.current),[r.search]),o=Dn(),i=v.useCallback((a,c)=>{const u=Mm(typeof a=="function"?a(s):a);n.current=!0,o("?"+u,c)},[o,s]);return[s,i]}/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _O=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),oS=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var SO={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 kO=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>v.createElement("svg",{ref:c,...SO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:oS("lucide",s),...a},[...i.map(([u,d])=>v.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ft=(e,t)=>{const n=v.forwardRef(({className:r,...s},o)=>v.createElement(kO,{ref:o,iconNode:t,className:oS(`lucide-${_O(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const CO=ft("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 jO=ft("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 EO=ft("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 iS=ft("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 wy=ft("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 NO=ft("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 TO=ft("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RO=ft("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const PO=ft("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rw=ft("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aS=ft("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lm=ft("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AO=ft("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 sw=ft("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 ow=ft("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 iw=ft("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 OO=ft("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
* @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 DO=ft("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 IO=ft("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
* @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 MO=ft("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 LO=ft("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
* @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 FO=ft("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 zO=ft("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 td=ft("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 aw=ft("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 $O=ft("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lS=ft("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 UO=ft("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 VO=ft("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 BO=ft("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
* @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 by=ft("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var WO={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const HO=wf(WO);var YO=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function lw(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(HO[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var s=new RegExp(YO),o=null;(o=s.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),a=[i,""];i.indexOf("=")>-1&&(a=i.split("=")),t.attrs[a[0]]=a[1],s.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var KO=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,GO=/^\s*$/,ZO=Object.create(null);function cS(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(cS,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var qO={parse:function(e,t){t||(t={}),t.components||(t.components=ZO);var n,r=[],s=[],o=-1,i=!1;if(e.indexOf("<")!==0){var a=e.indexOf("<");r.push({type:"text",content:a===-1?e:e.substring(0,a)})}return e.replace(KO,function(c,u){if(i){if(c!=="</"+n.name+">")return;i=!1}var d,f=c.charAt(1)!=="/",h=c.startsWith("<!--"),y=u+c.length,x=e.charAt(y);if(h){var g=lw(c);return o<0?(r.push(g),r):((d=s[o]).children.push(g),r)}if(f&&(o++,(n=lw(c)).type==="tag"&&t.components[n.name]&&(n.type="component",i=!0),n.voidElement||i||!x||x==="<"||n.children.push({type:"text",content:e.slice(y,e.indexOf("<",y))}),o===0&&r.push(n),(d=s[o-1])&&d.children.push(n),s[o]=n),(!f||n.voidElement)&&(o>-1&&(n.voidElement||n.name===c.slice(2,-1))&&(o--,n=o===-1?r:s[o]),!i&&x!=="<"&&x)){d=o===-1?r:s[o].children;var w=e.indexOf("<",y),m=e.slice(y,w===-1?void 0:w);GO.test(m)&&(m=" "),(w>-1&&o+d.length>=0||m!==" ")&&d.push({type:"text",content:m})}}),r},stringify:function(e){return e.reduce(function(t,n){return t+cS("",n)},"")}};const nd=(...e)=>{console!=null&&console.warn&&(ir(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},cw={},zd=(...e)=>{ir(e[0])&&cw[e[0]]||(ir(e[0])&&(cw[e[0]]=new Date),nd(...e))},uS=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},uw=(e,t,n)=>{e.loadNamespaces(t,uS(e,n))},dw=(e,t,n,r)=>{ir(n)&&(n=[n]),n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,uS(e,r))},XO=(e,t,n={})=>!t.languages||!t.languages.length?(zd("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,s)=>{var o;if(((o=n.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),ir=e=>typeof e=="string",Qi=e=>typeof e=="object"&&e!==null,QO=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,JO={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},eD=e=>JO[e],tD=e=>e.replace(QO,eD);let Fm={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:tD};const nD=(e={})=>{Fm={...Fm,...e}},dS=()=>Fm;let fS;const rD=e=>{fS=e},_y=()=>fS,gp=(e,t)=>{var r;if(!e)return!1;const n=((r=e.props)==null?void 0:r.children)??e.children;return t?n.length>0:!!n},yp=e=>{var n,r;if(!e)return[];const t=((n=e.props)==null?void 0:n.children)??e.children;return(r=e.props)!=null&&r.i18nIsDynamicList?Ji(t):t},sD=e=>Array.isArray(e)&&e.every(v.isValidElement),Ji=e=>Array.isArray(e)?e:[e],oD=(e,t)=>{const n={...t};return n.props=Object.assign(e.props,t.props),n},hS=(e,t)=>{if(!e)return"";let n="";const r=Ji(e),s=t!=null&&t.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((o,i)=>{if(ir(o))n+=`${o}`;else if(v.isValidElement(o)){const{props:a,type:c}=o,u=Object.keys(a).length,d=s.indexOf(c)>-1,f=a.children;if(!f&&d&&!u)n+=`<${c}/>`;else if(!f&&(!d||u)||a.i18nIsDynamicList)n+=`<${i}></${i}>`;else if(d&&u===1&&ir(f))n+=`<${c}>${f}</${c}>`;else{const h=hS(f,t);n+=`<${i}>${h}</${i}>`}}else if(o===null)nd("Trans: the passed in value is invalid - seems you passed in a null child.");else if(Qi(o)){const{format:a,...c}=o,u=Object.keys(c);if(u.length===1){const d=a?`${u[0]}, ${a}`:u[0];n+=`{{${d}}}`}else nd("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else nd("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",o)}),n},iD=(e,t,n,r,s,o)=>{if(t==="")return[];const i=r.transKeepBasicHtmlNodesFor||[],a=t&&new RegExp(i.map(w=>`<${w}`).join("|")).test(t);if(!e&&!a&&!o)return[t];const c={},u=w=>{Ji(w).forEach(p=>{ir(p)||(gp(p)?u(yp(p)):Qi(p)&&!v.isValidElement(p)&&Object.assign(c,p))})};u(e);const d=qO.parse(`<0>${t}</0>`),f={...c,...s},h=(w,m,p)=>{var C;const b=yp(w),_=x(b,m.children,p);return sD(b)&&_.length===0||(C=w.props)!=null&&C.i18nIsDynamicList?b:_},y=(w,m,p,b,_)=>{w.dummy?(w.children=m,p.push(v.cloneElement(w,{key:b},_?void 0:m))):p.push(...v.Children.map([w],C=>{const j={...C.props};return delete j.i18nIsDynamicList,v.createElement(C.type,{...j,key:b,ref:C.ref},_?null:m)}))},x=(w,m,p)=>{const b=Ji(w);return Ji(m).reduce((C,j,T)=>{var A,D;const P=((D=(A=j.children)==null?void 0:A[0])==null?void 0:D.content)&&n.services.interpolator.interpolate(j.children[0].content,f,n.language);if(j.type==="tag"){let G=b[parseInt(j.name,10)];p.length===1&&!G&&(G=p[0][j.name]),G||(G={});const N=Object.keys(j.attrs).length!==0?oD({props:j.attrs},G):G,F=v.isValidElement(N),S=F&&gp(j,!0)&&!j.voidElement,U=a&&Qi(N)&&N.dummy&&!F,J=Qi(e)&&Object.hasOwnProperty.call(e,j.name);if(ir(N)){const z=n.services.interpolator.interpolate(N,f,n.language);C.push(z)}else if(gp(N)||S){const z=h(N,j,p);y(N,z,C,T)}else if(U){const z=x(b,j.children,p);y(N,z,C,T)}else if(Number.isNaN(parseFloat(j.name)))if(J){const z=h(N,j,p);y(N,z,C,T,j.voidElement)}else if(r.transSupportBasicHtmlNodes&&i.indexOf(j.name)>-1)if(j.voidElement)C.push(v.createElement(j.name,{key:`${j.name}-${T}`}));else{const z=x(b,j.children,p);C.push(v.createElement(j.name,{key:`${j.name}-${T}`},z))}else if(j.voidElement)C.push(`<${j.name} />`);else{const z=x(b,j.children,p);C.push(`<${j.name}>${z}</${j.name}>`)}else if(Qi(N)&&!F){const z=j.children[0]?P:null;z&&C.push(z)}else y(N,P,C,T,j.children.length!==1||!P)}else if(j.type==="text"){const G=r.transWrapTextNodes,N=o?r.unescape(n.services.interpolator.interpolate(j.content,f,n.language)):n.services.interpolator.interpolate(j.content,f,n.language);G?C.push(v.createElement(G,{key:`${j.name}-${T}`},N)):C.push(N)}return C},[])},g=x([{dummy:!0,children:e||[]}],d,Ji(e||[]));return yp(g[0])};function aD({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:a,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...y}){var G,N,F,S,U,J;const x=d||_y();if(!x)return zd("You will need to pass in an i18next instance by using i18nextReactModule"),e;const g=f||x.t.bind(x)||(z=>z),w={...dS(),...(G=x.options)==null?void 0:G.react};let m=u||g.ns||((N=x.options)==null?void 0:N.defaultNS);m=ir(m)?[m]:m||["translation"];const p=hS(e,w),b=a||p||w.transEmptyNodeValue||r,{hashTransKey:_}=w,C=r||(_?_(p||b):p||b);(S=(F=x.options)==null?void 0:F.interpolation)!=null&&S.defaultVariables&&(i=i&&Object.keys(i).length>0?{...i,...x.options.interpolation.defaultVariables}:{...x.options.interpolation.defaultVariables});const j=i||t!==void 0&&!((J=(U=x.options)==null?void 0:U.interpolation)!=null&&J.alwaysFormat)||!e?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},T={...o,context:s||o.context,count:t,...i,...j,defaultValue:b,ns:m},P=C?g(C,T):b;c&&Object.keys(c).forEach(z=>{const W=c[z];if(typeof W.type=="function"||!W.props||!W.props.children||P.indexOf(`${z}/>`)<0&&P.indexOf(`${z} />`)<0)return;function I(){return v.createElement(v.Fragment,null,W)}c[z]=v.createElement(I)});const A=iD(c||e,P,x,w,T,h),D=n??w.defaultTransParent;return D?v.createElement(D,y,A):A}const lD={type:"3rdParty",init(e){nD(e.options.react),rD(e)}},pS=v.createContext();class cD{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{var r;(r=this.usedNamespaces)[n]??(r[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function uD({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:a,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...y}){var p;const{i18n:x,defaultNS:g}=v.useContext(pS)||{},w=d||x||_y(),m=f||(w==null?void 0:w.t.bind(w));return aD({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o,values:i,defaults:a,components:c,ns:u||(m==null?void 0:m.ns)||g||((p=w==null?void 0:w.options)==null?void 0:p.defaultNS),i18n:w,t:f,shouldUnescape:h,...y})}const dD=(e,t)=>{const n=v.useRef();return v.useEffect(()=>{n.current=e},[e,t]),n.current},mS=(e,t,n,r)=>e.getFixedT(t,n,r),fD=(e,t,n,r)=>v.useCallback(mS(e,t,n,r),[e,t,n,r]),ct=(e,t={})=>{var _,C,j,T;const{i18n:n}=t,{i18n:r,defaultNS:s}=v.useContext(pS)||{},o=n||r||_y();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new cD),!o){zd("You will need to pass in an i18next instance by using initReactI18next");const P=(D,G)=>ir(G)?G:Qi(G)&&ir(G.defaultValue)?G.defaultValue:Array.isArray(D)?D[D.length-1]:D,A=[P,{},!1];return A.t=P,A.i18n={},A.ready=!1,A}(_=o.options.react)!=null&&_.wait&&zd("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...dS(),...o.options.react,...t},{useSuspense:a,keyPrefix:c}=i;let u=s||((C=o.options)==null?void 0:C.defaultNS);u=ir(u)?[u]:u||["translation"],(T=(j=o.reportNamespaces).addUsedNamespaces)==null||T.call(j,u);const d=(o.isInitialized||o.initializedStoreOnce)&&u.every(P=>XO(P,o,i)),f=fD(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),h=()=>f,y=()=>mS(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),[x,g]=v.useState(h);let w=u.join();t.lng&&(w=`${t.lng}${w}`);const m=dD(w),p=v.useRef(!0);v.useEffect(()=>{const{bindI18n:P,bindI18nStore:A}=i;p.current=!0,!d&&!a&&(t.lng?dw(o,t.lng,u,()=>{p.current&&g(y)}):uw(o,u,()=>{p.current&&g(y)})),d&&m&&m!==w&&p.current&&g(y);const D=()=>{p.current&&g(y)};return P&&(o==null||o.on(P,D)),A&&(o==null||o.store.on(A,D)),()=>{p.current=!1,o&&(P==null||P.split(" ").forEach(G=>o.off(G,D))),A&&o&&A.split(" ").forEach(G=>o.store.off(G,D))}},[o,w]),v.useEffect(()=>{p.current&&d&&g(h)},[o,c,d]);const b=[x,o,d];if(b.t=x,b.i18n=o,b.ready=d,d||!d&&!a)return b;throw new Promise(P=>{t.lng?dw(o,t.lng,u,()=>P()):uw(o,u,()=>P())})};function hD(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Uf(...e){return t=>e.forEach(n=>hD(n,t))}function Ke(...e){return v.useCallback(Uf(...e),e)}var Es=v.forwardRef((e,t)=>{const{children:n,...r}=e,s=v.Children.toArray(n),o=s.find(pD);if(o){const i=o.props.children,a=s.map(c=>c===o?v.Children.count(i)>1?v.Children.only(null):v.isValidElement(i)?i.props.children:null:c);return l.jsx(zm,{...r,ref:t,children:v.isValidElement(i)?v.cloneElement(i,void 0,a):null})}return l.jsx(zm,{...r,ref:t,children:n})});Es.displayName="Slot";var zm=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const s=gD(n);return v.cloneElement(n,{...mD(r,n.props),ref:t?Uf(t,s):s})}return v.Children.count(n)>1?v.Children.only(null):null});zm.displayName="SlotClone";var Sy=({children:e})=>l.jsx(l.Fragment,{children:e});function pD(e){return v.isValidElement(e)&&e.type===Sy}function mD(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function gD(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function gS(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=gS(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function yD(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=gS(e))&&(r&&(r+=" "),r+=t);return r}const fw=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,hw=yD,Lc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return hw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],f=o==null?void 0:o[u];if(d===null)return null;const h=fw(d)||fw(f);return s[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...y}=d;return Object.entries(y).every(x=>{let[g,w]=x;return Array.isArray(w)?w.includes({...o,...a}[g]):{...o,...a}[g]===w})?[...u,f,h]:u},[]);return hw(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)};function yS(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=yS(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function vD(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=yS(e))&&(r&&(r+=" "),r+=t);return r}const ky="-";function xD(e){const t=bD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(i){const a=i.split(ky);return a[0]===""&&a.length!==1&&a.shift(),vS(a,t)||wD(i)}function o(i,a){const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function vS(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?vS(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(ky);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId}const pw=/^\[(.+)\]$/;function wD(e){if(pw.test(e)){const t=pw.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function bD(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return SD(Object.entries(e.classGroups),n).forEach(([o,i])=>{$m(i,r,o,t)}),r}function $m(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:mw(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(_D(s)){$m(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{$m(i,mw(t,o),n,r)})})}function mw(e,t){let n=e;return t.split(ky).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function _D(e){return e.isThemeGetter}function SD(e,t){return t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e}function kD(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}}const xS="!";function CD(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length;function i(a){const c=[];let u=0,d=0,f;for(let w=0;w<a.length;w++){let m=a[w];if(u===0){if(m===s&&(r||a.slice(w,w+o)===t)){c.push(a.slice(d,w)),d=w+o;continue}if(m==="/"){f=w;continue}}m==="["?u++:m==="]"&&u--}const h=c.length===0?a:a.substring(d),y=h.startsWith(xS),x=y?h.substring(1):h,g=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:g}}return n?function(c){return n({className:c,parseClassName:i})}:i}function jD(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function ED(e){return{cache:kD(e.cacheSize),parseClassName:CD(e),...xD(e)}}const ND=/\s+/;function TD(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(ND).map(i=>{const{modifiers:a,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(i);let f=!!d,h=r(f?u.substring(0,d):u);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:i};if(h=r(u),!h)return{isTailwindClass:!1,originalClassName:i};f=!1}const y=jD(a).join(":");return{isTailwindClass:!0,modifierId:c?y+xS:y,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:c,hasPostfixModifier:u}=i,d=a+c;return o.has(d)?!1:(o.add(d),s(c,u).forEach(f=>o.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function RD(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=wS(t))&&(r&&(r+=" "),r+=n);return r}function wS(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=wS(e[r]))&&(n&&(n+=" "),n+=t);return n}function PD(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((d,f)=>f(d),e());return n=ED(u),r=n.cache.get,s=n.cache.set,o=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=TD(c,n);return s(c,d),d}return function(){return o(RD.apply(null,arguments))}}function _t(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const bS=/^\[(?:([a-z-]+):)?(.+)\]$/i,AD=/^\d+\/\d+$/,OD=new Set(["px","full","screen"]),DD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ID=/\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$/,MD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,LD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function as(e){return Go(e)||OD.has(e)||AD.test(e)}function Gs(e){return za(e,"length",YD)}function Go(e){return!!e&&!Number.isNaN(Number(e))}function Eu(e){return za(e,"number",Go)}function ll(e){return!!e&&Number.isInteger(Number(e))}function zD(e){return e.endsWith("%")&&Go(e.slice(0,-1))}function qe(e){return bS.test(e)}function Zs(e){return DD.test(e)}const $D=new Set(["length","size","percentage"]);function UD(e){return za(e,$D,_S)}function VD(e){return za(e,"position",_S)}const BD=new Set(["image","url"]);function WD(e){return za(e,BD,GD)}function HD(e){return za(e,"",KD)}function cl(){return!0}function za(e,t,n){const r=bS.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function YD(e){return ID.test(e)&&!MD.test(e)}function _S(){return!1}function KD(e){return LD.test(e)}function GD(e){return FD.test(e)}function ZD(){const e=_t("colors"),t=_t("spacing"),n=_t("blur"),r=_t("brightness"),s=_t("borderColor"),o=_t("borderRadius"),i=_t("borderSpacing"),a=_t("borderWidth"),c=_t("contrast"),u=_t("grayscale"),d=_t("hueRotate"),f=_t("invert"),h=_t("gap"),y=_t("gradientColorStops"),x=_t("gradientColorStopPositions"),g=_t("inset"),w=_t("margin"),m=_t("opacity"),p=_t("padding"),b=_t("saturate"),_=_t("scale"),C=_t("sepia"),j=_t("skew"),T=_t("space"),P=_t("translate"),A=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",qe,t],N=()=>[qe,t],F=()=>["",as,Gs],S=()=>["auto",Go,qe],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",qe],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Go,Eu],B=()=>[Go,qe];return{cacheSize:500,separator:":",theme:{colors:[cl],spacing:[as,Gs],blur:["none","",Zs,qe],brightness:$(),borderColor:[e],borderRadius:["none","","full",Zs,qe],borderSpacing:N(),borderWidth:F(),contrast:$(),grayscale:I(),hueRotate:B(),invert:I(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[zD,Gs],inset:G(),margin:G(),opacity:$(),padding:N(),saturate:$(),scale:$(),sepia:I(),skew:B(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",qe]}],container:["container"],columns:[{columns:[Zs]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),qe]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],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",ll,qe]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qe]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",ll,qe]}],"grid-cols":[{"grid-cols":[cl]}],"col-start-end":[{col:["auto",{span:["full",ll,qe]},qe]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[cl]}],"row-start-end":[{row:["auto",{span:[ll,qe]},qe]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qe,t]}],"min-w":[{"min-w":[qe,t,"min","max","fit"]}],"max-w":[{"max-w":[qe,t,"none","full","min","max","fit","prose",{screen:[Zs]},Zs]}],h:[{h:[qe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Zs,Gs]}],"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:[cl]}],"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",qe]}],"line-clamp":[{"line-clamp":["none",Go,Eu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",as,qe]}],"list-image":[{"list-image":["none",qe]}],"list-style-type":[{list:["none","disc","decimal",qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",as,Gs]}],"underline-offset":[{"underline-offset":["auto",as,qe]}],"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:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qe]}],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",qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),VD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",UD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},WD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...J(),"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":[m]}],"divide-style":[{divide:J()}],"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:["",...J()]}],"outline-offset":[{"outline-offset":[as,qe]}],"outline-w":[{outline:[as,Gs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[as,Gs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zs,HD]}],"shadow-color":[{shadow:[cl]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Zs,qe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qe]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",qe]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[ll,qe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",qe]}],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",qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[as,Gs,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 qD=PD(ZD);function oe(...e){return qD(vD(e))}const Vf=Lc("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"}}),Ue=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?Es:"button";return l.jsx(i,{className:oe(Vf({variant:t,size:n,className:e})),ref:o,...s})});Ue.displayName="Button";function ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function XD(e,t){const n=v.createContext(t);function r(o){const{children:i,...a}=o,c=v.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:i})}function s(o){const i=v.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function on(e,t=[]){let n=[];function r(o,i){const a=v.createContext(i),c=n.length;n=[...n,i];function u(f){const{scope:h,children:y,...x}=f,g=(h==null?void 0:h[e][c])||a,w=v.useMemo(()=>x,Object.values(x));return l.jsx(g.Provider,{value:w,children:y})}function d(f,h){const y=(h==null?void 0:h[e][c])||a,x=v.useContext(y);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=n.map(i=>v.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,QD(s,...t)]}function QD(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function It(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Zn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=JD({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,a=It(n),c=v.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[o,e,s,a]);return[i,c]}function JD({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,s=v.useRef(r),o=It(t);return v.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var eI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Re=eI.reduce((e,t)=>{const n=v.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?Es:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Cy(e,t){e&&Ds.flushSync(()=>e.dispatchEvent(t))}function Fc(e){const t=e+"CollectionProvider",[n,r]=on(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:x,children:g}=y,w=We.useRef(null),m=We.useRef(new Map).current;return l.jsx(s,{scope:x,itemMap:m,collectionRef:w,children:g})};i.displayName=t;const a=e+"CollectionSlot",c=We.forwardRef((y,x)=>{const{scope:g,children:w}=y,m=o(a,g),p=Ke(x,m.collectionRef);return l.jsx(Es,{ref:p,children:w})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=We.forwardRef((y,x)=>{const{scope:g,children:w,...m}=y,p=We.useRef(null),b=Ke(x,p),_=o(u,g);return We.useEffect(()=>(_.itemMap.set(p,{ref:p,...m}),()=>void _.itemMap.delete(p))),l.jsx(Es,{[d]:"",ref:b,children:w})});f.displayName=u;function h(y){const x=o(e+"CollectionConsumer",y);return We.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const m=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,C)=>m.indexOf(_.ref.current)-m.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},h,r]}var tI=v.createContext(void 0);function vi(e){const t=v.useContext(tI);return e||t||"ltr"}function nI(e,t=globalThis==null?void 0:globalThis.document){const n=It(e);v.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var rI="DismissableLayer",Um="dismissableLayer.update",sI="dismissableLayer.pointerDownOutside",oI="dismissableLayer.focusOutside",gw,SS=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$a=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...c}=e,u=v.useContext(SS),[d,f]=v.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=v.useState({}),x=Ke(t,T=>f(T)),g=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=g.indexOf(w),p=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=p>=m,C=aI(T=>{const P=T.target,A=[...u.branches].some(D=>D.contains(P));!_||A||(s==null||s(T),i==null||i(T),T.defaultPrevented||a==null||a())},h),j=lI(T=>{const P=T.target;[...u.branches].some(D=>D.contains(P))||(o==null||o(T),i==null||i(T),T.defaultPrevented||a==null||a())},h);return nI(T=>{p===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),v.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(gw=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),yw(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=gw)}},[d,h,n,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),yw())},[d,u]),v.useEffect(()=>{const T=()=>y({});return document.addEventListener(Um,T),()=>document.removeEventListener(Um,T)},[]),l.jsx(Re.div,{...c,ref:x,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,C.onPointerDownCapture)})});$a.displayName=rI;var iI="DismissableLayerBranch",kS=v.forwardRef((e,t)=>{const n=v.useContext(SS),r=v.useRef(null),s=Ke(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),l.jsx(Re.div,{...e,ref:s})});kS.displayName=iI;function aI(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let c=function(){CS(sI,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function lI(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=v.useRef(!1);return v.useEffect(()=>{const s=o=>{o.target&&!r.current&&CS(oI,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yw(){const e=new CustomEvent(Um);document.dispatchEvent(e)}function CS(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Cy(s,o):s.dispatchEvent(o)}var cI=$a,uI=kS,vp=0;function jy(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vw()),document.body.insertAdjacentElement("beforeend",e[1]??vw()),vp++,()=>{vp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),vp--}},[])}function vw(){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 xp="focusScope.autoFocusOnMount",wp="focusScope.autoFocusOnUnmount",xw={bubbles:!1,cancelable:!0},dI="FocusScope",Bf=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,c]=v.useState(null),u=It(s),d=It(o),f=v.useRef(null),h=Ke(t,g=>c(g)),y=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let g=function(b){if(y.paused||!a)return;const _=b.target;a.contains(_)?f.current=_:Xs(f.current,{select:!0})},w=function(b){if(y.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||Xs(f.current,{select:!0}))},m=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&Xs(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const p=new MutationObserver(m);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),p.disconnect()}}},[r,a,y.paused]),v.useEffect(()=>{if(a){bw.add(y);const g=document.activeElement;if(!a.contains(g)){const m=new CustomEvent(xp,xw);a.addEventListener(xp,u),a.dispatchEvent(m),m.defaultPrevented||(fI(yI(jS(a)),{select:!0}),document.activeElement===g&&Xs(a))}return()=>{a.removeEventListener(xp,u),setTimeout(()=>{const m=new CustomEvent(wp,xw);a.addEventListener(wp,d),a.dispatchEvent(m),m.defaultPrevented||Xs(g??document.body,{select:!0}),a.removeEventListener(wp,d),bw.remove(y)},0)}}},[a,u,d,y]);const x=v.useCallback(g=>{if(!n&&!r||y.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,m=document.activeElement;if(w&&m){const p=g.currentTarget,[b,_]=hI(p);b&&_?!g.shiftKey&&m===_?(g.preventDefault(),n&&Xs(b,{select:!0})):g.shiftKey&&m===b&&(g.preventDefault(),n&&Xs(_,{select:!0})):m===p&&g.preventDefault()}},[n,r,y.paused]);return l.jsx(Re.div,{tabIndex:-1,...i,ref:h,onKeyDown:x})});Bf.displayName=dI;function fI(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xs(r,{select:t}),document.activeElement!==n)return}function hI(e){const t=jS(e),n=ww(t,e),r=ww(t.reverse(),e);return[n,r]}function jS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ww(e,t){for(const n of e)if(!pI(n,{upTo:t}))return n}function pI(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 mI(e){return e instanceof HTMLInputElement&&"select"in e}function Xs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mI(e)&&t&&e.select()}}var bw=gI();function gI(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=_w(e,t),e.unshift(t)},remove(t){var n;e=_w(e,t),(n=e[0])==null||n.resume()}}}function _w(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yI(e){return e.filter(t=>t.tagName!=="A")}var en=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},vI=F1.useId||(()=>{}),xI=0;function Wn(e){const[t,n]=v.useState(vI());return en(()=>{n(r=>r??String(xI++))},[e]),t?`radix-${t}`:""}const wI=["top","right","bottom","left"],Wr=Math.min,Un=Math.max,$d=Math.round,Nu=Math.floor,So=e=>({x:e,y:e}),bI={left:"right",right:"left",bottom:"top",top:"bottom"},_I={start:"end",end:"start"};function Vm(e,t,n){return Un(e,Wr(t,n))}function Ns(e,t){return typeof e=="function"?e(t):e}function Ts(e){return e.split("-")[0]}function Ua(e){return e.split("-")[1]}function Ey(e){return e==="x"?"y":"x"}function Ny(e){return e==="y"?"height":"width"}function ko(e){return["top","bottom"].includes(Ts(e))?"y":"x"}function Ty(e){return Ey(ko(e))}function SI(e,t,n){n===void 0&&(n=!1);const r=Ua(e),s=Ty(e),o=Ny(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Ud(i)),[i,Ud(i)]}function kI(e){const t=Ud(e);return[Bm(e),t,Bm(t)]}function Bm(e){return e.replace(/start|end/g,t=>_I[t])}function CI(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function jI(e,t,n,r){const s=Ua(e);let o=CI(Ts(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Bm)))),o}function Ud(e){return e.replace(/left|right|bottom|top/g,t=>bI[t])}function EI(e){return{top:0,right:0,bottom:0,left:0,...e}}function ES(e){return typeof e!="number"?EI(e):{top:e,right:e,bottom:e,left:e}}function Vd(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Sw(e,t,n){let{reference:r,floating:s}=e;const o=ko(t),i=Ty(t),a=Ny(i),c=Ts(t),u=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let y;switch(c){case"top":y={x:d,y:r.y-s.height};break;case"bottom":y={x:d,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:f};break;case"left":y={x:r.x-s.width,y:f};break;default:y={x:r.x,y:r.y}}switch(Ua(t)){case"start":y[i]-=h*(n&&u?-1:1);break;case"end":y[i]+=h*(n&&u?-1:1);break}return y}const NI=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=Sw(u,r,c),h=r,y={},x=0;for(let g=0;g<a.length;g++){const{name:w,fn:m}=a[g],{x:p,y:b,data:_,reset:C}=await m({x:d,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:y,rects:u,platform:i,elements:{reference:e,floating:t}});d=p??d,f=b??f,y={...y,[w]:{...y[w],..._}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:d,y:f}=Sw(u,h,c)),g=-1)}return{x:d,y:f,placement:h,strategy:s,middlewareData:y}};async function cc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:y=0}=Ns(t,e),x=ES(y),w=a[h?f==="floating"?"reference":"floating":f],m=Vd(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),p=f==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},C=Vd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:b,strategy:c}):p);return{top:(m.top-C.top+x.top)/_.y,bottom:(C.bottom-m.bottom+x.bottom)/_.y,left:(m.left-C.left+x.left)/_.x,right:(C.right-m.right+x.right)/_.x}}const TI=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=Ns(e,t)||{};if(u==null)return{};const f=ES(d),h={x:n,y:r},y=Ty(s),x=Ny(y),g=await i.getDimensions(u),w=y==="y",m=w?"top":"left",p=w?"bottom":"right",b=w?"clientHeight":"clientWidth",_=o.reference[x]+o.reference[y]-h[y]-o.floating[x],C=h[y]-o.reference[y],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=j?j[b]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=a.floating[b]||o.floating[x]);const P=_/2-C/2,A=T/2-g[x]/2-1,D=Wr(f[m],A),G=Wr(f[p],A),N=D,F=T-g[x]-G,S=T/2-g[x]/2+P,U=Vm(N,S,F),J=!c.arrow&&Ua(s)!=null&&S!==U&&o.reference[x]/2-(S<N?D:G)-g[x]/2<0,z=J?S<N?S-N:S-F:0;return{[y]:h[y]+z,data:{[y]:U,centerOffset:S-U-z,...J&&{alignmentOffset:z}},reset:J}}}),RI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:g=!0,...w}=Ns(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const m=Ts(s),p=ko(a),b=Ts(a)===a,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=h||(b||!g?[Ud(a)]:kI(a)),j=x!=="none";!h&&j&&C.push(...jI(a,g,x,_));const T=[a,...C],P=await cc(t,w),A=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&A.push(P[m]),f){const S=SI(s,i,_);A.push(P[S[0]],P[S[1]])}if(D=[...D,{placement:s,overflows:A}],!A.every(S=>S<=0)){var G,N;const S=(((G=o.flip)==null?void 0:G.index)||0)+1,U=T[S];if(U)return{data:{index:S,overflows:D},reset:{placement:U}};let J=(N=D.filter(z=>z.overflows[0]<=0).sort((z,W)=>z.overflows[1]-W.overflows[1])[0])==null?void 0:N.placement;if(!J)switch(y){case"bestFit":{var F;const z=(F=D.filter(W=>{if(j){const I=ko(W.placement);return I===p||I==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(I=>I>0).reduce((I,X)=>I+X,0)]).sort((W,I)=>W[1]-I[1])[0])==null?void 0:F[0];z&&(J=z);break}case"initialPlacement":J=a;break}if(s!==J)return{reset:{placement:J}}}return{}}}};function kw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cw(e){return wI.some(t=>e[t]>=0)}const PI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Ns(e,t);switch(r){case"referenceHidden":{const o=await cc(t,{...s,elementContext:"reference"}),i=kw(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Cw(i)}}}case"escaped":{const o=await cc(t,{...s,altBoundary:!0}),i=kw(o,n.floating);return{data:{escapedOffsets:i,escaped:Cw(i)}}}default:return{}}}}};async function AI(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Ts(n),a=Ua(n),c=ko(n)==="y",u=["left","top"].includes(i)?-1:1,d=o&&c?-1:1,f=Ns(t,e);let{mainAxis:h,crossAxis:y,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof x=="number"&&(y=a==="end"?x*-1:x),c?{x:y*d,y:h*u}:{x:h*u,y:y*d}}const OI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,c=await AI(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},DI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:m,y:p}=w;return{x:m,y:p}}},...c}=Ns(e,t),u={x:n,y:r},d=await cc(t,c),f=ko(Ts(s)),h=Ey(f);let y=u[h],x=u[f];if(o){const w=h==="y"?"top":"left",m=h==="y"?"bottom":"right",p=y+d[w],b=y-d[m];y=Vm(p,y,b)}if(i){const w=f==="y"?"top":"left",m=f==="y"?"bottom":"right",p=x+d[w],b=x-d[m];x=Vm(p,x,b)}const g=a.fn({...t,[h]:y,[f]:x});return{...g,data:{x:g.x-n,y:g.y-r}}}}},II=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Ns(e,t),d={x:n,y:r},f=ko(s),h=Ey(f);let y=d[h],x=d[f];const g=Ns(a,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const b=h==="y"?"height":"width",_=o.reference[h]-o.floating[b]+w.mainAxis,C=o.reference[h]+o.reference[b]-w.mainAxis;y<_?y=_:y>C&&(y=C)}if(u){var m,p;const b=h==="y"?"width":"height",_=["top","left"].includes(Ts(s)),C=o.reference[f]-o.floating[b]+(_&&((m=i.offset)==null?void 0:m[f])||0)+(_?0:w.crossAxis),j=o.reference[f]+o.reference[b]+(_?0:((p=i.offset)==null?void 0:p[f])||0)-(_?w.crossAxis:0);x<C?x=C:x>j&&(x=j)}return{[h]:y,[f]:x}}}},MI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:o}=t,{apply:i=()=>{},...a}=Ns(e,t),c=await cc(t,a),u=Ts(n),d=Ua(n),f=ko(n)==="y",{width:h,height:y}=r.floating;let x,g;u==="top"||u==="bottom"?(x=u,g=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(g=u,x=d==="end"?"top":"bottom");const w=y-c.top-c.bottom,m=h-c.left-c.right,p=Wr(y-c[x],w),b=Wr(h-c[g],m),_=!t.middlewareData.shift;let C=p,j=b;if(f?j=d||_?Wr(b,m):m:C=d||_?Wr(p,w):w,_&&!d){const P=Un(c.left,0),A=Un(c.right,0),D=Un(c.top,0),G=Un(c.bottom,0);f?j=h-2*(P!==0||A!==0?P+A:Un(c.left,c.right)):C=y-2*(D!==0||G!==0?D+G:Un(c.top,c.bottom))}await i({...t,availableWidth:j,availableHeight:C});const T=await s.getDimensions(o.floating);return h!==T.width||y!==T.height?{reset:{rects:!0}}:{}}}};function Va(e){return NS(e)?(e.nodeName||"").toLowerCase():"#document"}function Hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ls(e){var t;return(t=(NS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function NS(e){return e instanceof Node||e instanceof Hn(e).Node}function Er(e){return e instanceof Element||e instanceof Hn(e).Element}function qr(e){return e instanceof HTMLElement||e instanceof Hn(e).HTMLElement}function jw(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Hn(e).ShadowRoot}function zc(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Nr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function LI(e){return["table","td","th"].includes(Va(e))}function Wf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ry(e){const t=Py(),n=Er(e)?Nr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function FI(e){let t=Co(e);for(;qr(t)&&!Ea(t);){if(Ry(t))return t;if(Wf(t))return null;t=Co(t)}return null}function Py(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ea(e){return["html","body","#document"].includes(Va(e))}function Nr(e){return Hn(e).getComputedStyle(e)}function Hf(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Co(e){if(Va(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jw(e)&&e.host||Ls(e);return jw(t)?t.host:t}function TS(e){const t=Co(e);return Ea(t)?e.ownerDocument?e.ownerDocument.body:e.body:qr(t)&&zc(t)?t:TS(t)}function uc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=TS(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Hn(s);return o?t.concat(i,i.visualViewport||[],zc(s)?s:[],i.frameElement&&n?uc(i.frameElement):[]):t.concat(s,uc(s,[],n))}function RS(e){const t=Nr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=qr(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=$d(n)!==o||$d(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function Ay(e){return Er(e)?e:e.contextElement}function da(e){const t=Ay(e);if(!qr(t))return So(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=RS(t);let i=(o?$d(n.width):n.width)/r,a=(o?$d(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const zI=So(0);function PS(e){const t=Hn(e);return!Py()||!t.visualViewport?zI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $I(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Hn(e)?!1:t}function ui(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=Ay(e);let i=So(1);t&&(r?Er(r)&&(i=da(r)):i=da(e));const a=$I(o,n,r)?PS(o):So(0);let c=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const h=Hn(o),y=r&&Er(r)?Hn(r):r;let x=h,g=x.frameElement;for(;g&&r&&y!==x;){const w=da(g),m=g.getBoundingClientRect(),p=Nr(g),b=m.left+(g.clientLeft+parseFloat(p.paddingLeft))*w.x,_=m.top+(g.clientTop+parseFloat(p.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,f*=w.y,c+=b,u+=_,x=Hn(g),g=x.frameElement}}return Vd({width:d,height:f,x:c,y:u})}function UI(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=Ls(r),a=t?Wf(t.floating):!1;if(r===i||a&&o)return n;let c={scrollLeft:0,scrollTop:0},u=So(1);const d=So(0),f=qr(r);if((f||!f&&!o)&&((Va(r)!=="body"||zc(i))&&(c=Hf(r)),qr(r))){const h=ui(r);u=da(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}}function VI(e){return Array.from(e.getClientRects())}function AS(e){return ui(Ls(e)).left+Hf(e).scrollLeft}function BI(e){const t=Ls(e),n=Hf(e),r=e.ownerDocument.body,s=Un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+AS(e);const a=-n.scrollTop;return Nr(r).direction==="rtl"&&(i+=Un(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function WI(e,t){const n=Hn(e),r=Ls(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,c=0;if(s){o=s.width,i=s.height;const u=Py();(!u||u&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:a,y:c}}function HI(e,t){const n=ui(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=qr(e)?da(e):So(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,c=s*o.x,u=r*o.y;return{width:i,height:a,x:c,y:u}}function Ew(e,t,n){let r;if(t==="viewport")r=WI(e,n);else if(t==="document")r=BI(Ls(e));else if(Er(t))r=HI(t,n);else{const s=PS(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return Vd(r)}function OS(e,t){const n=Co(e);return n===t||!Er(n)||Ea(n)?!1:Nr(n).position==="fixed"||OS(n,t)}function YI(e,t){const n=t.get(e);if(n)return n;let r=uc(e,[],!1).filter(a=>Er(a)&&Va(a)!=="body"),s=null;const o=Nr(e).position==="fixed";let i=o?Co(e):e;for(;Er(i)&&!Ea(i);){const a=Nr(i),c=Ry(i);!c&&a.position==="fixed"&&(s=null),(o?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||zc(i)&&!c&&OS(e,i))?r=r.filter(d=>d!==i):s=a,i=Co(i)}return t.set(e,r),r}function KI(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?Wf(t)?[]:YI(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,d)=>{const f=Ew(t,d,s);return u.top=Un(f.top,u.top),u.right=Wr(f.right,u.right),u.bottom=Wr(f.bottom,u.bottom),u.left=Un(f.left,u.left),u},Ew(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function GI(e){const{width:t,height:n}=RS(e);return{width:t,height:n}}function ZI(e,t,n){const r=qr(t),s=Ls(t),o=n==="fixed",i=ui(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=So(0);if(r||!r&&!o)if((Va(t)!=="body"||zc(s))&&(a=Hf(t)),r){const f=ui(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=AS(s));const u=i.left+a.scrollLeft-c.x,d=i.top+a.scrollTop-c.y;return{x:u,y:d,width:i.width,height:i.height}}function bp(e){return Nr(e).position==="static"}function Nw(e,t){return!qr(e)||Nr(e).position==="fixed"?null:t?t(e):e.offsetParent}function DS(e,t){const n=Hn(e);if(Wf(e))return n;if(!qr(e)){let s=Co(e);for(;s&&!Ea(s);){if(Er(s)&&!bp(s))return s;s=Co(s)}return n}let r=Nw(e,t);for(;r&&LI(r)&&bp(r);)r=Nw(r,t);return r&&Ea(r)&&bp(r)&&!Ry(r)?n:r||FI(e)||n}const qI=async function(e){const t=this.getOffsetParent||DS,n=this.getDimensions,r=await n(e.floating);return{reference:ZI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function XI(e){return Nr(e).direction==="rtl"}const QI={convertOffsetParentRelativeRectToViewportRelativeRect:UI,getDocumentElement:Ls,getClippingRect:KI,getOffsetParent:DS,getElementRects:qI,getClientRects:VI,getDimensions:GI,getScale:da,isElement:Er,isRTL:XI};function JI(e,t){let n=null,r;const s=Ls(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const y=Nu(d),x=Nu(s.clientWidth-(u+f)),g=Nu(s.clientHeight-(d+h)),w=Nu(u),p={rootMargin:-y+"px "+-x+"px "+-g+"px "+-w+"px",threshold:Un(0,Wr(1,c))||1};let b=!0;function _(C){const j=C[0].intersectionRatio;if(j!==c){if(!b)return i();j?i(!1,j):r=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...p,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,p)}n.observe(e)}return i(!0),o}function eM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ay(e),d=s||o?[...u?uc(u):[],...uc(t)]:[];d.forEach(m=>{s&&m.addEventListener("scroll",n,{passive:!0}),o&&m.addEventListener("resize",n)});const f=u&&a?JI(u,n):null;let h=-1,y=null;i&&(y=new ResizeObserver(m=>{let[p]=m;p&&p.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=y)==null||b.observe(t)})),n()}),u&&!c&&y.observe(u),y.observe(t));let x,g=c?ui(e):null;c&&w();function w(){const m=ui(e);g&&(m.x!==g.x||m.y!==g.y||m.width!==g.width||m.height!==g.height)&&n(),g=m,x=requestAnimationFrame(w)}return n(),()=>{var m;d.forEach(p=>{s&&p.removeEventListener("scroll",n),o&&p.removeEventListener("resize",n)}),f==null||f(),(m=y)==null||m.disconnect(),y=null,c&&cancelAnimationFrame(x)}}const tM=OI,nM=DI,rM=RI,sM=MI,oM=PI,Tw=TI,iM=II,aM=(e,t,n)=>{const r=new Map,s={platform:QI,...n},o={...s.platform,_c:r};return NI(e,t,{...s,platform:o})};var rd=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Bd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Bd(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!Bd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function IS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rw(e,t){const n=IS(e);return Math.round(t*n)/n}function Pw(e){const t=v.useRef(e);return rd(()=>{t.current=e}),t}function lM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,y]=v.useState(r);Bd(h,r)||y(r);const[x,g]=v.useState(null),[w,m]=v.useState(null),p=v.useCallback(z=>{z!==j.current&&(j.current=z,g(z))},[]),b=v.useCallback(z=>{z!==T.current&&(T.current=z,m(z))},[]),_=o||x,C=i||w,j=v.useRef(null),T=v.useRef(null),P=v.useRef(d),A=c!=null,D=Pw(c),G=Pw(s),N=v.useCallback(()=>{if(!j.current||!T.current)return;const z={placement:t,strategy:n,middleware:h};G.current&&(z.platform=G.current),aM(j.current,T.current,z).then(W=>{const I={...W,isPositioned:!0};F.current&&!Bd(P.current,I)&&(P.current=I,Ds.flushSync(()=>{f(I)}))})},[h,t,n,G]);rd(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[u]);const F=v.useRef(!1);rd(()=>(F.current=!0,()=>{F.current=!1}),[]),rd(()=>{if(_&&(j.current=_),C&&(T.current=C),_&&C){if(D.current)return D.current(_,C,N);N()}},[_,C,N,D,A]);const S=v.useMemo(()=>({reference:j,floating:T,setReference:p,setFloating:b}),[p,b]),U=v.useMemo(()=>({reference:_,floating:C}),[_,C]),J=v.useMemo(()=>{const z={position:n,left:0,top:0};if(!U.floating)return z;const W=Rw(U.floating,d.x),I=Rw(U.floating,d.y);return a?{...z,transform:"translate("+W+"px, "+I+"px)",...IS(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,a,U.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:N,refs:S,elements:U,floatingStyles:J}),[d,N,S,U,J])}const cM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Tw({element:r.current,padding:s}).fn(n):{}:r?Tw({element:r,padding:s}).fn(n):{}}}},uM=(e,t)=>({...tM(e),options:[e,t]}),dM=(e,t)=>({...nM(e),options:[e,t]}),fM=(e,t)=>({...iM(e),options:[e,t]}),hM=(e,t)=>({...rM(e),options:[e,t]}),pM=(e,t)=>({...sM(e),options:[e,t]}),mM=(e,t)=>({...oM(e),options:[e,t]}),gM=(e,t)=>({...cM(e),options:[e,t]});var yM="Arrow",MS=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return l.jsx(Re.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});MS.displayName=yM;var vM=MS;function Oy(e){const[t,n]=v.useState(void 0);return en(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Dy="Popper",[LS,Ba]=on(Dy),[xM,FS]=LS(Dy),zS=e=>{const{__scopePopper:t,children:n}=e,[r,s]=v.useState(null);return l.jsx(xM,{scope:t,anchor:r,onAnchorChange:s,children:n})};zS.displayName=Dy;var $S="PopperAnchor",US=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=FS($S,n),i=v.useRef(null),a=Ke(t,i);return v.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:l.jsx(Re.div,{...s,ref:a})});US.displayName=$S;var Iy="PopperContent",[wM,bM]=LS(Iy),VS=v.forwardRef((e,t)=>{var pe,_e,Te,Fe,Ie,Pe;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:y="optimized",onPlaced:x,...g}=e,w=FS(Iy,n),[m,p]=v.useState(null),b=Ke(t,rt=>p(rt)),[_,C]=v.useState(null),j=Oy(_),T=(j==null?void 0:j.width)??0,P=(j==null?void 0:j.height)??0,A=r+(o!=="center"?"-"+o:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(u)?u:[u],N=G.length>0,F={padding:D,boundary:G.filter(SM),altBoundary:N},{refs:S,floatingStyles:U,placement:J,isPositioned:z,middlewareData:W}=lM({strategy:"fixed",placement:A,whileElementsMounted:(...rt)=>eM(...rt,{animationFrame:y==="always"}),elements:{reference:w.anchor},middleware:[uM({mainAxis:s+P,alignmentAxis:i}),c&&dM({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?fM():void 0,...F}),c&&hM({...F}),pM({...F,apply:({elements:rt,rects:E,availableWidth:ee,availableHeight:Z})=>{const{width:O,height:k}=E.reference,R=rt.floating.style;R.setProperty("--radix-popper-available-width",`${ee}px`),R.setProperty("--radix-popper-available-height",`${Z}px`),R.setProperty("--radix-popper-anchor-width",`${O}px`),R.setProperty("--radix-popper-anchor-height",`${k}px`)}}),_&&gM({element:_,padding:a}),kM({arrowWidth:T,arrowHeight:P}),h&&mM({strategy:"referenceHidden",...F})]}),[I,X]=HS(J),$=It(x);en(()=>{z&&($==null||$())},[z,$]);const B=(pe=W.arrow)==null?void 0:pe.x,he=(_e=W.arrow)==null?void 0:_e.y,re=((Te=W.arrow)==null?void 0:Te.centerOffset)!==0,[se,De]=v.useState();return en(()=>{m&&De(window.getComputedStyle(m).zIndex)},[m]),l.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:z?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Fe=W.transformOrigin)==null?void 0:Fe.x,(Ie=W.transformOrigin)==null?void 0:Ie.y].join(" "),...((Pe=W.hide)==null?void 0:Pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(wM,{scope:n,placedSide:I,onArrowChange:C,arrowX:B,arrowY:he,shouldHideArrow:re,children:l.jsx(Re.div,{"data-side":I,"data-align":X,...g,ref:b,style:{...g.style,animation:z?void 0:"none"}})})})});VS.displayName=Iy;var BS="PopperArrow",_M={top:"bottom",right:"left",bottom:"top",left:"right"},WS=v.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=bM(BS,r),i=_M[o.placedSide];return l.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:l.jsx(vM,{...s,ref:n,style:{...s.style,display:"block"}})})});WS.displayName=BS;function SM(e){return e!==null}var kM=e=>({name:"transformOrigin",options:e,fn(t){var w,m,p;const{placement:n,rects:r,middlewareData:s}=t,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=HS(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((m=s.arrow)==null?void 0:m.x)??0)+a/2,y=(((p=s.arrow)==null?void 0:p.y)??0)+c/2;let x="",g="";return u==="bottom"?(x=i?f:`${h}px`,g=`${-c}px`):u==="top"?(x=i?f:`${h}px`,g=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,g=i?f:`${y}px`):u==="left"&&(x=`${r.floating.width+c}px`,g=i?f:`${y}px`),{data:{x,y:g}}}});function HS(e){const[t,n="center"]=e.split("-");return[t,n]}var My=zS,Ly=US,Fy=VS,zy=WS,CM="Portal",$c=v.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=v.useState(!1);en(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?U_.createPortal(l.jsx(Re.div,{...r,ref:t}),i):null});$c.displayName=CM;function jM(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var an=e=>{const{present:t,children:n}=e,r=EM(t),s=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=Ke(r.ref,NM(s));return typeof n=="function"||r.isPresent?v.cloneElement(s,{ref:o}):null};an.displayName="Presence";function EM(e){const[t,n]=v.useState(),r=v.useRef({}),s=v.useRef(e),o=v.useRef("none"),i=e?"mounted":"unmounted",[a,c]=jM(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=Tu(r.current);o.current=a==="mounted"?u:"none"},[a]),en(()=>{const u=r.current,d=s.current;if(d!==e){const h=o.current,y=Tu(u);e?c("MOUNT"):y==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),en(()=>{if(t){const u=f=>{const y=Tu(r.current).includes(f.animationName);f.target===t&&y&&Ds.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Tu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Tu(e){return(e==null?void 0:e.animationName)||"none"}function NM(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _p="rovingFocusGroup.onEntryFocus",TM={bubbles:!1,cancelable:!0},Yf="RovingFocusGroup",[Wm,YS,RM]=Fc(Yf),[PM,Wa]=on(Yf,[RM]),[AM,OM]=PM(Yf),KS=v.forwardRef((e,t)=>l.jsx(Wm.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Wm.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(DM,{...e,ref:t})})}));KS.displayName=Yf;var DM=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=v.useRef(null),y=Ke(t,h),x=vi(o),[g=null,w]=Zn({prop:i,defaultProp:a,onChange:c}),[m,p]=v.useState(!1),b=It(u),_=YS(n),C=v.useRef(!1),[j,T]=v.useState(0);return v.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(_p,b),()=>P.removeEventListener(_p,b)},[b]),l.jsx(AM,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:g,onItemFocus:v.useCallback(P=>w(P),[w]),onItemShiftTab:v.useCallback(()=>p(!0),[]),onFocusableItemAdd:v.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:v.useCallback(()=>T(P=>P-1),[]),children:l.jsx(Re.div,{tabIndex:m||j===0?-1:0,"data-orientation":r,...f,ref:y,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{C.current=!0}),onFocus:ue(e.onFocus,P=>{const A=!C.current;if(P.target===P.currentTarget&&A&&!m){const D=new CustomEvent(_p,TM);if(P.currentTarget.dispatchEvent(D),!D.defaultPrevented){const G=_().filter(J=>J.focusable),N=G.find(J=>J.active),F=G.find(J=>J.id===g),U=[N,F,...G].filter(Boolean).map(J=>J.ref.current);qS(U,d)}}C.current=!1}),onBlur:ue(e.onBlur,()=>p(!1))})})}),GS="RovingFocusGroupItem",ZS=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,a=Wn(),c=o||a,u=OM(GS,n),d=u.currentTabStopId===c,f=YS(n),{onFocusableItemAdd:h,onFocusableItemRemove:y}=u;return v.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),l.jsx(Wm.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:l.jsx(Re.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:ue(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ue(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const g=LM(x,u.orientation,u.dir);if(g!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let m=f().filter(p=>p.focusable).map(p=>p.ref.current);if(g==="last")m.reverse();else if(g==="prev"||g==="next"){g==="prev"&&m.reverse();const p=m.indexOf(x.currentTarget);m=u.loop?FM(m,p+1):m.slice(p+1)}setTimeout(()=>qS(m))}})})})});ZS.displayName=GS;var IM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MM(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function LM(e,t,n){const r=MM(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return IM[r]}function qS(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function FM(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $y=KS,Uy=ZS,zM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ri=new WeakMap,Ru=new WeakMap,Pu={},Sp=0,XS=function(e){return e&&(e.host||XS(e.parentNode))},$M=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=XS(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},UM=function(e,t,n,r){var s=$M(t,Array.isArray(e)?e:[e]);Pu[n]||(Pu[n]=new WeakMap);var o=Pu[n],i=[],a=new Set,c=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var y=h.getAttribute(r),x=y!==null&&y!=="false",g=(Ri.get(h)||0)+1,w=(o.get(h)||0)+1;Ri.set(h,g),o.set(h,w),i.push(h),g===1&&x&&Ru.set(h,!0),w===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",h,m)}})};return d(t),a.clear(),Sp++,function(){i.forEach(function(f){var h=Ri.get(f)-1,y=o.get(f)-1;Ri.set(f,h),o.set(f,y),h||(Ru.has(f)||f.removeAttribute(r),Ru.delete(f)),y||f.removeAttribute(n)}),Sp--,Sp||(Ri=new WeakMap,Ri=new WeakMap,Ru=new WeakMap,Pu={})}},Vy=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=zM(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),UM(r,s,n,"aria-hidden")):function(){return null}},Ur=function(){return Ur=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ur.apply(this,arguments)};function QS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function VM(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var sd="right-scroll-bar-position",od="width-before-scroll-bar",BM="with-scroll-bars-hidden",WM="--removed-body-scroll-bar-size";function kp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function HM(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var YM=typeof window<"u"?v.useLayoutEffect:v.useEffect,Aw=new WeakMap;function KM(e,t){var n=HM(null,function(r){return e.forEach(function(s){return kp(s,r)})});return YM(function(){var r=Aw.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||kp(a,null)}),o.forEach(function(a){s.has(a)||kp(a,i)})}Aw.set(n,e)},[e]),n}function GM(e){return e}function ZM(e,t){t===void 0&&(t=GM);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var c=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return s}function qM(e){e===void 0&&(e={});var t=ZM(null);return t.options=Ur({async:!0,ssr:!1},e),t}var JS=function(e){var t=e.sideCar,n=QS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Ur({},n))};JS.isSideCarExport=!0;function XM(e,t){return e.useMedium(t),JS}var ek=qM(),Cp=function(){},Kf=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Cp,onWheelCapture:Cp,onTouchMoveCapture:Cp}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,y=e.noIsolation,x=e.inert,g=e.allowPinchZoom,w=e.as,m=w===void 0?"div":w,p=e.gapMode,b=QS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,C=KM([n,t]),j=Ur(Ur({},b),s);return v.createElement(v.Fragment,null,d&&v.createElement(_,{sideCar:ek,removeScrollBar:u,shards:f,noIsolation:y,inert:x,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:p}),i?v.cloneElement(v.Children.only(a),Ur(Ur({},j),{ref:C})):v.createElement(m,Ur({},j,{className:c,ref:C}),a))});Kf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kf.classNames={fullWidth:od,zeroRight:sd};var QM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function JM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=QM();return t&&e.setAttribute("nonce",t),e}function eL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nL=function(){var e=0,t=null;return{add:function(n){e==0&&(t=JM())&&(eL(t,n),tL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rL=function(){var e=nL();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tk=function(){var e=rL(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},sL={left:0,top:0,right:0,gap:0},jp=function(e){return parseInt(e||"",10)||0},oL=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[jp(n),jp(r),jp(s)]},iL=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return sL;var t=oL(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},aL=tk(),fa="data-scroll-locked",lL=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
.`.concat(BM,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(a,"px ").concat(r,`;
}
body[`).concat(fa,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(sd,` {
right: `).concat(a,"px ").concat(r,`;
}
.`).concat(od,` {
margin-right: `).concat(a,"px ").concat(r,`;
}
.`).concat(sd," .").concat(sd,` {
right: 0 `).concat(r,`;
}
.`).concat(od," .").concat(od,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(fa,`] {
`).concat(WM,": ").concat(a,`px;
}
`)},Ow=function(){var e=parseInt(document.body.getAttribute(fa)||"0",10);return isFinite(e)?e:0},cL=function(){v.useEffect(function(){return document.body.setAttribute(fa,(Ow()+1).toString()),function(){var e=Ow()-1;e<=0?document.body.removeAttribute(fa):document.body.setAttribute(fa,e.toString())}},[])},uL=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;cL();var o=v.useMemo(function(){return iL(s)},[s]);return v.createElement(aL,{styles:lL(o,!t,s,n?"":"!important")})},Hm=!1;if(typeof window<"u")try{var Au=Object.defineProperty({},"passive",{get:function(){return Hm=!0,!0}});window.addEventListener("test",Au,Au),window.removeEventListener("test",Au,Au)}catch{Hm=!1}var Pi=Hm?{passive:!1}:!1,dL=function(e){return e.tagName==="TEXTAREA"},nk=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!dL(e)&&n[t]==="visible")},fL=function(e){return nk(e,"overflowY")},hL=function(e){return nk(e,"overflowX")},Dw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=rk(e,r);if(s){var o=sk(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pL=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},mL=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rk=function(e,t){return e==="v"?fL(t):hL(t)},sk=function(e,t){return e==="v"?pL(t):mL(t)},gL=function(e,t){return e==="h"&&t==="rtl"?-1:1},yL=function(e,t,n,r,s){var o=gL(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),u=!1,d=i>0,f=0,h=0;do{var y=sk(e,a),x=y[0],g=y[1],w=y[2],m=g-w-o*x;(x||m)&&rk(e,a)&&(f+=m,h+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(h)<1||!s))&&(u=!0),u},Ou=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Iw=function(e){return[e.deltaX,e.deltaY]},Mw=function(e){return e&&"current"in e?e.current:e},vL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xL=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},wL=0,Ai=[];function bL(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),s=v.useState(wL++)[0],o=v.useState(tk)[0],i=v.useRef(e);v.useEffect(function(){i.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=VM([e.lockRef.current],(e.shards||[]).map(Mw),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(g,w){if("touches"in g&&g.touches.length===2)return!i.current.allowPinchZoom;var m=Ou(g),p=n.current,b="deltaX"in g?g.deltaX:p[0]-m[0],_="deltaY"in g?g.deltaY:p[1]-m[1],C,j=g.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in g&&T==="h"&&j.type==="range")return!1;var P=Dw(T,j);if(!P)return!0;if(P?C=T:(C=T==="v"?"h":"v",P=Dw(T,j)),!P)return!1;if(!r.current&&"changedTouches"in g&&(b||_)&&(r.current=C),!C)return!0;var A=r.current||C;return yL(A,w,g,A==="h"?b:_,!0)},[]),c=v.useCallback(function(g){var w=g;if(!(!Ai.length||Ai[Ai.length-1]!==o)){var m="deltaY"in w?Iw(w):Ou(w),p=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&vL(C.delta,m)})[0];if(p&&p.should){w.cancelable&&w.preventDefault();return}if(!p){var b=(i.current.shards||[]).map(Mw).filter(Boolean).filter(function(C){return C.contains(w.target)}),_=b.length>0?a(w,b[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),u=v.useCallback(function(g,w,m,p){var b={name:g,delta:w,target:m,should:p,shadowParent:_L(m)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),d=v.useCallback(function(g){n.current=Ou(g),r.current=void 0},[]),f=v.useCallback(function(g){u(g.type,Iw(g),g.target,a(g,e.lockRef.current))},[]),h=v.useCallback(function(g){u(g.type,Ou(g),g.target,a(g,e.lockRef.current))},[]);v.useEffect(function(){return Ai.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Pi),document.addEventListener("touchmove",c,Pi),document.addEventListener("touchstart",d,Pi),function(){Ai=Ai.filter(function(g){return g!==o}),document.removeEventListener("wheel",c,Pi),document.removeEventListener("touchmove",c,Pi),document.removeEventListener("touchstart",d,Pi)}},[]);var y=e.removeScrollBar,x=e.inert;return v.createElement(v.Fragment,null,x?v.createElement(o,{styles:xL(s)}):null,y?v.createElement(uL,{gapMode:e.gapMode}):null)}function _L(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const SL=XM(ek,bL);var Gf=v.forwardRef(function(e,t){return v.createElement(Kf,Ur({},e,{ref:t,sideCar:SL}))});Gf.classNames=Kf.classNames;var Ym=["Enter"," "],kL=["ArrowDown","PageUp","Home"],ok=["ArrowUp","PageDown","End"],CL=[...kL,...ok],jL={ltr:[...Ym,"ArrowRight"],rtl:[...Ym,"ArrowLeft"]},EL={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Uc="Menu",[dc,NL,TL]=Fc(Uc),[xi,ik]=on(Uc,[TL,Ba,Wa]),Zf=Ba(),ak=Wa(),[RL,wi]=xi(Uc),[PL,Vc]=xi(Uc),lk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,a=Zf(t),[c,u]=v.useState(null),d=v.useRef(!1),f=It(o),h=vi(s);return v.useEffect(()=>{const y=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),l.jsx(My,{...a,children:l.jsx(RL,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:l.jsx(PL,{scope:t,onClose:v.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:i,children:r})})})};lk.displayName=Uc;var AL="MenuAnchor",By=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Zf(n);return l.jsx(Ly,{...s,...r,ref:t})});By.displayName=AL;var Wy="MenuPortal",[OL,ck]=xi(Wy,{forceMount:void 0}),uk=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=wi(Wy,t);return l.jsx(OL,{scope:t,forceMount:n,children:l.jsx(an,{present:n||o.open,children:l.jsx($c,{asChild:!0,container:s,children:r})})})};uk.displayName=Wy;var ar="MenuContent",[DL,Hy]=xi(ar),dk=v.forwardRef((e,t)=>{const n=ck(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=wi(ar,e.__scopeMenu),i=Vc(ar,e.__scopeMenu);return l.jsx(dc.Provider,{scope:e.__scopeMenu,children:l.jsx(an,{present:r||o.open,children:l.jsx(dc.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(IL,{...s,ref:t}):l.jsx(ML,{...s,ref:t})})})})}),IL=v.forwardRef((e,t)=>{const n=wi(ar,e.__scopeMenu),r=v.useRef(null),s=Ke(t,r);return v.useEffect(()=>{const o=r.current;if(o)return Vy(o)},[]),l.jsx(Yy,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ML=v.forwardRef((e,t)=>{const n=wi(ar,e.__scopeMenu);return l.jsx(Yy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Yy=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:y,disableOutsideScroll:x,...g}=e,w=wi(ar,n),m=Vc(ar,n),p=Zf(n),b=ak(n),_=NL(n),[C,j]=v.useState(null),T=v.useRef(null),P=Ke(t,T,w.onContentChange),A=v.useRef(0),D=v.useRef(""),G=v.useRef(0),N=v.useRef(null),F=v.useRef("right"),S=v.useRef(0),U=x?Gf:v.Fragment,J=x?{as:Es,allowPinchZoom:!0}:void 0,z=I=>{var pe,_e;const X=D.current+I,$=_().filter(Te=>!Te.disabled),B=document.activeElement,he=(pe=$.find(Te=>Te.ref.current===B))==null?void 0:pe.textValue,re=$.map(Te=>Te.textValue),se=GL(re,X,he),De=(_e=$.find(Te=>Te.textValue===se))==null?void 0:_e.ref.current;(function Te(Fe){D.current=Fe,window.clearTimeout(A.current),Fe!==""&&(A.current=window.setTimeout(()=>Te(""),1e3))})(X),De&&setTimeout(()=>De.focus())};v.useEffect(()=>()=>window.clearTimeout(A.current),[]),jy();const W=v.useCallback(I=>{var $,B;return F.current===(($=N.current)==null?void 0:$.side)&&qL(I,(B=N.current)==null?void 0:B.area)},[]);return l.jsx(DL,{scope:n,searchRef:D,onItemEnter:v.useCallback(I=>{W(I)&&I.preventDefault()},[W]),onItemLeave:v.useCallback(I=>{var X;W(I)||((X=T.current)==null||X.focus(),j(null))},[W]),onTriggerLeave:v.useCallback(I=>{W(I)&&I.preventDefault()},[W]),pointerGraceTimerRef:G,onPointerGraceIntentChange:v.useCallback(I=>{N.current=I},[]),children:l.jsx(U,{...J,children:l.jsx(Bf,{asChild:!0,trapped:s,onMountAutoFocus:ue(o,I=>{var X;I.preventDefault(),(X=T.current)==null||X.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx($a,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:y,children:l.jsx($y,{asChild:!0,...b,dir:m.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:j,onEntryFocus:ue(c,I=>{m.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Fy,{role:"menu","aria-orientation":"vertical","data-state":Ek(w.open),"data-radix-menu-content":"",dir:m.dir,...p,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:ue(g.onKeyDown,I=>{const $=I.target.closest("[data-radix-menu-content]")===I.currentTarget,B=I.ctrlKey||I.altKey||I.metaKey,he=I.key.length===1;$&&(I.key==="Tab"&&I.preventDefault(),!B&&he&&z(I.key));const re=T.current;if(I.target!==re||!CL.includes(I.key))return;I.preventDefault();const De=_().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);ok.includes(I.key)&&De.reverse(),YL(De)}),onBlur:ue(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(A.current),D.current="")}),onPointerMove:ue(e.onPointerMove,fc(I=>{const X=I.target,$=S.current!==I.clientX;if(I.currentTarget.contains(X)&&$){const B=I.clientX>S.current?"right":"left";F.current=B,S.current=I.clientX}}))})})})})})})});dk.displayName=ar;var LL="MenuGroup",Ky=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Re.div,{role:"group",...r,ref:t})});Ky.displayName=LL;var FL="MenuLabel",fk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Re.div,{...r,ref:t})});fk.displayName=FL;var Wd="MenuItem",Lw="menu.itemSelect",qf=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=v.useRef(null),i=Vc(Wd,e.__scopeMenu),a=Hy(Wd,e.__scopeMenu),c=Ke(t,o),u=v.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(Lw,{bubbles:!0,cancelable:!0});f.addEventListener(Lw,y=>r==null?void 0:r(y),{once:!0}),Cy(f,h),h.defaultPrevented?u.current=!1:i.onClose()}};return l.jsx(hk,{...s,ref:c,disabled:n,onClick:ue(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:ue(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:ue(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||Ym.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});qf.displayName=Wd;var hk=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=Hy(Wd,n),a=ak(n),c=v.useRef(null),u=Ke(t,c),[d,f]=v.useState(!1),[h,y]=v.useState("");return v.useEffect(()=>{const x=c.current;x&&y((x.textContent??"").trim())},[o.children]),l.jsx(dc.ItemSlot,{scope:n,disabled:r,textValue:s??h,children:l.jsx(Uy,{asChild:!0,...a,focusable:!r,children:l.jsx(Re.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:ue(e.onPointerMove,fc(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(e.onPointerLeave,fc(x=>i.onItemLeave(x))),onFocus:ue(e.onFocus,()=>f(!0)),onBlur:ue(e.onBlur,()=>f(!1))})})})}),zL="MenuCheckboxItem",pk=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return l.jsx(xk,{scope:e.__scopeMenu,checked:n,children:l.jsx(qf,{role:"menuitemcheckbox","aria-checked":Hd(n)?"mixed":n,...s,ref:t,"data-state":Zy(n),onSelect:ue(s.onSelect,()=>r==null?void 0:r(Hd(n)?!0:!n),{checkForDefaultPrevented:!1})})})});pk.displayName=zL;var mk="MenuRadioGroup",[$L,UL]=xi(mk,{value:void 0,onValueChange:()=>{}}),gk=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=It(r);return l.jsx($L,{scope:e.__scopeMenu,value:n,onValueChange:o,children:l.jsx(Ky,{...s,ref:t})})});gk.displayName=mk;var yk="MenuRadioItem",vk=v.forwardRef((e,t)=>{const{value:n,...r}=e,s=UL(yk,e.__scopeMenu),o=n===s.value;return l.jsx(xk,{scope:e.__scopeMenu,checked:o,children:l.jsx(qf,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Zy(o),onSelect:ue(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});vk.displayName=yk;var Gy="MenuItemIndicator",[xk,VL]=xi(Gy,{checked:!1}),wk=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=VL(Gy,n);return l.jsx(an,{present:r||Hd(o.checked)||o.checked===!0,children:l.jsx(Re.span,{...s,ref:t,"data-state":Zy(o.checked)})})});wk.displayName=Gy;var BL="MenuSeparator",bk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Re.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});bk.displayName=BL;var WL="MenuArrow",_k=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Zf(n);return l.jsx(zy,{...s,...r,ref:t})});_k.displayName=WL;var HL="MenuSub",[CH,Sk]=xi(HL),bl="MenuSubTrigger",kk=v.forwardRef((e,t)=>{const n=wi(bl,e.__scopeMenu),r=Vc(bl,e.__scopeMenu),s=Sk(bl,e.__scopeMenu),o=Hy(bl,e.__scopeMenu),i=v.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=v.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return v.useEffect(()=>d,[d]),v.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),l.jsx(By,{asChild:!0,...u,children:l.jsx(hk,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":Ek(n.open),...e,ref:Uf(t,s.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ue(e.onPointerMove,fc(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ue(e.onPointerLeave,fc(f=>{var y,x;d();const h=(y=n.content)==null?void 0:y.getBoundingClientRect();if(h){const g=(x=n.content)==null?void 0:x.dataset.side,w=g==="right",m=w?-5:5,p=h[w?"left":"right"],b=h[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:p,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x:p,y:h.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ue(e.onKeyDown,f=>{var y;const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||jL[r.dir].includes(f.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),f.preventDefault())})})})});kk.displayName=bl;var Ck="MenuSubContent",jk=v.forwardRef((e,t)=>{const n=ck(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=wi(ar,e.__scopeMenu),i=Vc(ar,e.__scopeMenu),a=Sk(Ck,e.__scopeMenu),c=v.useRef(null),u=Ke(t,c);return l.jsx(dc.Provider,{scope:e.__scopeMenu,children:l.jsx(an,{present:r||o.open,children:l.jsx(dc.Slot,{scope:e.__scopeMenu,children:l.jsx(Yy,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ue(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ue(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ue(e.onKeyDown,d=>{var y;const f=d.currentTarget.contains(d.target),h=EL[i.dir].includes(d.key);f&&h&&(o.onOpenChange(!1),(y=a.trigger)==null||y.focus(),d.preventDefault())})})})})})});jk.displayName=Ck;function Ek(e){return e?"open":"closed"}function Hd(e){return e==="indeterminate"}function Zy(e){return Hd(e)?"indeterminate":e?"checked":"unchecked"}function YL(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function KL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function GL(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=KL(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function ZL(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function qL(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ZL(n,t)}function fc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var XL=lk,QL=By,JL=uk,eF=dk,tF=Ky,nF=fk,rF=qf,sF=pk,oF=gk,iF=vk,aF=wk,lF=bk,cF=_k,uF=kk,dF=jk,qy="DropdownMenu",[fF,jH]=on(qy,[ik]),jn=ik(),[hF,Nk]=fF(qy),Tk=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=jn(t),u=v.useRef(null),[d=!1,f]=Zn({prop:s,defaultProp:o,onChange:i});return l.jsx(hF,{scope:t,triggerId:Wn(),triggerRef:u,contentId:Wn(),open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(h=>!h),[f]),modal:a,children:l.jsx(XL,{...c,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};Tk.displayName=qy;var Rk="DropdownMenuTrigger",Pk=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=Nk(Rk,n),i=jn(n);return l.jsx(QL,{asChild:!0,...i,children:l.jsx(Re.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:Uf(t,o.triggerRef),onPointerDown:ue(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ue(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Pk.displayName=Rk;var pF="DropdownMenuPortal",Ak=e=>{const{__scopeDropdownMenu:t,...n}=e,r=jn(t);return l.jsx(JL,{...r,...n})};Ak.displayName=pF;var Ok="DropdownMenuContent",Dk=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Nk(Ok,n),o=jn(n),i=v.useRef(!1);return l.jsx(eF,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:ue(e.onCloseAutoFocus,a=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ue(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dk.displayName=Ok;var mF="DropdownMenuGroup",gF=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(tF,{...s,...r,ref:t})});gF.displayName=mF;var yF="DropdownMenuLabel",Ik=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(nF,{...s,...r,ref:t})});Ik.displayName=yF;var vF="DropdownMenuItem",Mk=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(rF,{...s,...r,ref:t})});Mk.displayName=vF;var xF="DropdownMenuCheckboxItem",Lk=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(sF,{...s,...r,ref:t})});Lk.displayName=xF;var wF="DropdownMenuRadioGroup",bF=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(oF,{...s,...r,ref:t})});bF.displayName=wF;var _F="DropdownMenuRadioItem",Fk=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(iF,{...s,...r,ref:t})});Fk.displayName=_F;var SF="DropdownMenuItemIndicator",zk=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(aF,{...s,...r,ref:t})});zk.displayName=SF;var kF="DropdownMenuSeparator",$k=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(lF,{...s,...r,ref:t})});$k.displayName=kF;var CF="DropdownMenuArrow",jF=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(cF,{...s,...r,ref:t})});jF.displayName=CF;var EF="DropdownMenuSubTrigger",Uk=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(uF,{...s,...r,ref:t})});Uk.displayName=EF;var NF="DropdownMenuSubContent",Vk=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=jn(n);return l.jsx(dF,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Vk.displayName=NF;var TF=Tk,RF=Pk,PF=Ak,Bk=Dk,Wk=Ik,Hk=Mk,Yk=Lk,Kk=Fk,Gk=zk,Zk=$k,qk=Uk,Xk=Vk;const Xy=TF,Qy=RF,AF=v.forwardRef(({className:e,inset:t,children:n,...r},s)=>l.jsxs(qk,{ref:s,className:oe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,l.jsx(NO,{className:"ml-auto h-4 w-4"})]}));AF.displayName=qk.displayName;const OF=v.forwardRef(({className:e,...t},n)=>l.jsx(Xk,{ref:n,className:oe("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}));OF.displayName=Xk.displayName;const Xf=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(PF,{children:l.jsx(Bk,{ref:r,sideOffset:t,className:oe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Xf.displayName=Bk.displayName;const ei=v.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Hk,{ref:r,className:oe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));ei.displayName=Hk.displayName;const DF=v.forwardRef(({className:e,children:t,checked:n,...r},s)=>l.jsxs(Yk,{ref:s,className:oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Gk,{children:l.jsx(iS,{className:"h-4 w-4"})})}),t]}));DF.displayName=Yk.displayName;const IF=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Kk,{ref:r,className:oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Gk,{children:l.jsx(aS,{className:"h-2 w-2 fill-current"})})}),t]}));IF.displayName=Kk.displayName;const Qk=v.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Wk,{ref:r,className:oe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Qk.displayName=Wk.displayName;const Jk=v.forwardRef(({className:e,...t},n)=>l.jsx(Zk,{ref:n,className:oe("-mx-1 my-1 h-px bg-muted",e),...t}));Jk.displayName=Zk.displayName;var Jy="Dialog",[eC,tC]=on(Jy),[MF,Or]=eC(Jy),nC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=v.useRef(null),c=v.useRef(null),[u=!1,d]=Zn({prop:r,defaultProp:s,onChange:o});return l.jsx(MF,{scope:t,triggerRef:a,contentRef:c,contentId:Wn(),titleId:Wn(),descriptionId:Wn(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};nC.displayName=Jy;var rC="DialogTrigger",sC=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Or(rC,n),o=Ke(t,s.triggerRef);return l.jsx(Re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":nv(s.open),...r,ref:o,onClick:ue(e.onClick,s.onOpenToggle)})});sC.displayName=rC;var ev="DialogPortal",[LF,oC]=eC(ev,{forceMount:void 0}),iC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Or(ev,t);return l.jsx(LF,{scope:t,forceMount:n,children:v.Children.map(r,i=>l.jsx(an,{present:n||o.open,children:l.jsx($c,{asChild:!0,container:s,children:i})}))})};iC.displayName=ev;var Yd="DialogOverlay",aC=v.forwardRef((e,t)=>{const n=oC(Yd,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Or(Yd,e.__scopeDialog);return o.modal?l.jsx(an,{present:r||o.open,children:l.jsx(FF,{...s,ref:t})}):null});aC.displayName=Yd;var FF=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Or(Yd,n);return l.jsx(Gf,{as:Es,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Re.div,{"data-state":nv(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),di="DialogContent",lC=v.forwardRef((e,t)=>{const n=oC(di,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Or(di,e.__scopeDialog);return l.jsx(an,{present:r||o.open,children:o.modal?l.jsx(zF,{...s,ref:t}):l.jsx($F,{...s,ref:t})})});lC.displayName=di;var zF=v.forwardRef((e,t)=>{const n=Or(di,e.__scopeDialog),r=v.useRef(null),s=Ke(t,n.contentRef,r);return v.useEffect(()=>{const o=r.current;if(o)return Vy(o)},[]),l.jsx(cC,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault())})}),$F=v.forwardRef((e,t)=>{const n=Or(di,e.__scopeDialog),r=v.useRef(!1),s=v.useRef(!1);return l.jsx(cC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),cC=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=Or(di,n),c=v.useRef(null),u=Ke(t,c);return jy(),l.jsxs(l.Fragment,{children:[l.jsx(Bf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:l.jsx($a,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nv(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(VF,{titleId:a.titleId}),l.jsx(WF,{contentRef:c,descriptionId:a.descriptionId})]})]})}),tv="DialogTitle",uC=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Or(tv,n);return l.jsx(Re.h2,{id:s.titleId,...r,ref:t})});uC.displayName=tv;var dC="DialogDescription",fC=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Or(dC,n);return l.jsx(Re.p,{id:s.descriptionId,...r,ref:t})});fC.displayName=dC;var hC="DialogClose",pC=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Or(hC,n);return l.jsx(Re.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>s.onOpenChange(!1))})});pC.displayName=hC;function nv(e){return e?"open":"closed"}var mC="DialogTitleWarning",[UF,gC]=XD(mC,{contentName:di,titleName:tv,docsSlug:"dialog"}),VF=({titleId:e})=>{const t=gC(mC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},BF="DialogDescriptionWarning",WF=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gC(BF).contentName}}.`;return v.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},rv=nC,sv=sC,ov=iC,Bc=aC,Wc=lC,Hc=uC,Yc=fC,Qf=pC;const iv=rv,av=sv,HF=ov,yC=v.forwardRef(({className:e,...t},n)=>l.jsx(Bc,{className:oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));yC.displayName=Bc.displayName;const YF=Lc("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"}}),Jf=v.forwardRef(({side:e="right",className:t,children:n,...r},s)=>l.jsxs(HF,{children:[l.jsx(yC,{}),l.jsxs(Wc,{ref:s,className:oe(YF({side:e}),t),...r,children:[n,l.jsxs(Qf,{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:[l.jsx(by,{className:"h-4 w-4 dark:text-stone-200"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Jf.displayName=Wc.displayName;const lv=({className:e,...t})=>l.jsx("div",{className:oe("flex flex-col space-y-2 text-center sm:text-left",e),...t});lv.displayName="SheetHeader";const cv=v.forwardRef(({className:e,...t},n)=>l.jsx(Hc,{ref:n,className:oe("text-lg font-semibold text-foreground",e),...t}));cv.displayName=Hc.displayName;const KF=v.forwardRef(({className:e,...t},n)=>l.jsx(Yc,{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));KF.displayName=Yc.displayName;class Yn extends Error{constructor(t){var n,r,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Yn.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 Yn||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(n=this.response)==null?void 0:n.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(o=(s=(r=this.originalError)==null?void 0:r.cause)==null?void 0:s.message)!=null&&o.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return{...this}}}const Du=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function GF(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||ZF;let s=0;for(;s<e.length;){const o=e.indexOf("=",s);if(o===-1)break;let i=e.indexOf(";",s);if(i===-1)i=e.length;else if(i<o){s=e.lastIndexOf(";",o-1)+1;continue}const a=e.slice(s,o).trim();if(n[a]===void 0){let c=e.slice(o+1,i).trim();c.charCodeAt(0)===34&&(c=c.slice(1,-1));try{n[a]=r(c)}catch{n[a]=c}}s=i+1}return n}function Fw(e,t,n){const r=Object.assign({},n||{}),s=r.encode||qF;if(!Du.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!Du.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;if(r.maxAge!=null){const a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(a)}if(r.domain){if(!Du.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!Du.test(r.path))throw new TypeError("option path is invalid");i+="; Path="+r.path}if(r.expires){if(!function(c){return Object.prototype.toString.call(c)==="[object Date]"||c instanceof Date}(r.expires)||isNaN(r.expires.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():r.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}function ZF(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function qF(e){return encodeURIComponent(e)}const XF=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let vC;function ha(e){if(e)try{const t=decodeURIComponent(vC(e.split(".")[1]).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function xC(e,t=0){let n=ha(e);return!(Object.keys(n).length>0&&(!n.exp||n.exp-t>Date.now()/1e3))}vC=typeof atob!="function"||XF?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)?i+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i}:atob;const zw="pb_auth";class QF{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!xC(this.token)}get isAdmin(){return ha(this.token).type==="admin"}get isAuthRecord(){return ha(this.token).type==="authRecord"}save(t,n){this.baseToken=t||"",this.baseModel=n||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,n=zw){const r=GF(t||"")[n]||"";let s={};try{s=JSON.parse(r),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,n=zw){var c,u;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=ha(this.token);r.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},r,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=Fw(n,JSON.stringify(o),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&a>4096){o.model={id:(c=o==null?void 0:o.model)==null?void 0:c.id,email:(u=o==null?void 0:o.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=Fw(n,JSON.stringify(o),t)}return i}onChange(t,n=!1){return this._onChangeCallbacks.push(t),n&&t(this.token,this.model),()=>{for(let r=this._onChangeCallbacks.length-1;r>=0;r--)if(this._onChangeCallbacks[r]==t)return delete this._onChangeCallbacks[r],void this._onChangeCallbacks.splice(r,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class JF extends QF{constructor(t="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=t,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(t,n){this._storageSet(this.storageKey,{token:t,model:n}),super.save(t,n)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const n=window.localStorage.getItem(t)||"";try{return JSON.parse(n)}catch{return n}}return this.storageFallback[t]}_storageSet(t,n){if(typeof window<"u"&&(window!=null&&window.localStorage)){let r=n;typeof n!="string"&&(r=JSON.stringify(n)),window.localStorage.setItem(t,r)}else this.storageFallback[t]=n}_storageRemove(t){var n;typeof window<"u"&&(window!=null&&window.localStorage)&&((n=window.localStorage)==null||n.removeItem(t)),delete this.storageFallback[t]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",t=>{if(t.key!=this.storageKey)return;const n=this._storageGet(this.storageKey)||{};super.save(n.token||"",n.model||null)})}}class bi{constructor(t){this.client=t}}class e4 extends bi{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,n){return n=Object.assign({method:"PATCH",body:t},n),this.client.send("/api/settings",n)}async testS3(t="storage",n){return n=Object.assign({method:"POST",body:{filesystem:t}},n),this.client.send("/api/settings/test/s3",n).then(()=>!0)}async testEmail(t,n,r){return r=Object.assign({method:"POST",body:{email:t,template:n}},r),this.client.send("/api/settings/test/email",r).then(()=>!0)}async generateAppleClientSecret(t,n,r,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:n,keyId:r,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class uv extends bi{decode(t){return t}async getFullList(t,n){if(typeof t=="number")return this._getFullList(t,n);let r=500;return(n=Object.assign({},t,n)).batch&&(r=n.batch,delete n.batch),this._getFullList(r,n)}async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send(this.baseCrudPath,r).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,n){return(n=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},n)).query=Object.assign({filter:t,skipTotal:1},n.query),this.getList(1,1,n).then(r=>{var s;if(!((s=r==null?void 0:r.items)!=null&&s.length))throw new Yn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return r.items[0]})}async getOne(t,n){if(!t)throw new Yn({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(r=>this.decode(r))}async create(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send(this.baseCrudPath,n).then(r=>this.decode(r))}async update(t,n,r){return r=Object.assign({method:"PATCH",body:n},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(s=>this.decode(s))}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(()=>!0)}_getFullList(t=500,n){(n=n||{}).query=Object.assign({skipTotal:1},n.query);let r=[],s=async o=>this.getList(o,t||500,n).then(i=>{const a=i.items;return r=r.concat(a),a.length==i.perPage?s(o+1):r});return s(1)}}function Ln(e,t,n,r){const s=r!==void 0;return s||n!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,n),t.query=Object.assign({},t.query,r),t):Object.assign(t,n):t}function Ep(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class t4 extends uv{get baseCrudPath(){return"/api/admins"}async update(t,n,r){return super.update(t,n,r).then(s=>{var o,i;return((o=this.client.authStore.model)==null?void 0:o.id)===s.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o;return r&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:n})}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};o=Ln("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,r,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||Ep(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(u,d,f,h){Ep(u);const y=u.beforeSend,x=u.authStore.model,g=u.authStore.onChange((w,m)=>{(!w||(m==null?void 0:m.id)!=(x==null?void 0:x.id)||(m!=null&&m.collectionId||x!=null&&x.collectionId)&&(m==null?void 0:m.collectionId)!=(x==null?void 0:x.collectionId))&&Ep(u)});u._resetAutoRefresh=function(){g(),u.beforeSend=y,delete u._resetAutoRefresh},u.beforeSend=async(w,m)=>{var C;const p=u.authStore.token;if((C=m.query)!=null&&C.autoRefresh)return y?y(w,m):{url:w,sendOptions:m};let b=u.authStore.isValid;if(b&&xC(u.authStore.token,d))try{await f()}catch{b=!1}b||await h();const _=m.headers||{};for(let j in _)if(j.toLowerCase()=="authorization"&&p==_[j]&&u.authStore.token){_[j]=u.authStore.token;break}return m.headers=_,y?y(w,m):{url:w,sendOptions:m}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,n){let r={method:"POST"};return r=Ln("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCrudPath+"/auth-refresh",r).then(this.authResponse.bind(this))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Ln("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Ln("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const n4=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function wC(e){if(e){e.query=e.query||{};for(let t in e)n4.includes(t)||(e.query[t]=e[t],delete e[t])}}class bC extends bi{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(t,n,r){var i;if(!t)throw new Error("topic must be set.");let s=t;if(r){wC(r);const a="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const c=a;let u;try{u=JSON.parse(c==null?void 0:c.data)}catch{}n(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var r;let n=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(r=this.eventSource)==null||r.removeEventListener(o,i);delete this.subscriptions[o],n||(n=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var r;let n=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){n=!0;for(let o of this.subscriptions[s])(r=this.eventSource)==null||r.removeEventListener(s,o);delete this.subscriptions[s]}n&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,n){var o;let r=!1;const s=this.getSubscriptionsByTopic(t);for(let i in s){if(!Array.isArray(this.subscriptions[i])||!this.subscriptions[i].length)continue;let a=!1;for(let c=this.subscriptions[i].length-1;c>=0;c--)this.subscriptions[i][c]===n&&(a=!0,delete this.subscriptions[i][c],this.subscriptions[i].splice(c,1),(o=this.eventSource)==null||o.removeEventListener(i,n));a&&(this.subscriptions[i].length||delete this.subscriptions[i],r||this.hasSubscriptionListeners(i)||(r=!0))}this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var n,r;if(this.subscriptions=this.subscriptions||{},t)return!!((n=this.subscriptions[t])!=null&&n.length);for(let s in this.subscriptions)if((r=this.subscriptions[s])!=null&&r.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(t=>{if(!(t!=null&&t.isAbort))throw t})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(t){const n={};t=t.includes("?")?t:t+"?";for(let r in this.subscriptions)(r+"?").startsWith(t)&&(n[r]=this.subscriptions[r]);return n}getNonEmptySubscriptionKeys(){const t=[];for(let n in this.subscriptions)this.subscriptions[n].length&&t.push(n);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.addEventListener(t,n)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.removeEventListener(t,n)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,n)=>{this.pendingConnects.push({resolve:t,reject:n}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=t=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",t=>{const n=t;this.clientId=n==null?void 0:n.lastEventId,this.submitSubscriptions().then(async()=>{let r=3;for(;this.hasUnsentSubscriptions()&&r>0;)r--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const r=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in r)for(let o of r[s])o(t)}).catch(r=>{this.clientId="",this.connectErrorHandler(r)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const n of t)if(!this.lastSentSubscriptions.includes(n))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let r of this.pendingConnects)r.reject(new Yn(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const n=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},n)}disconnect(t=!1){var n;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(n=this.eventSource)==null||n.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let r of this.pendingConnects)r.resolve();this.pendingConnects=[]}}}class r4 extends uv{constructor(t,n){super(t),this.collectionIdOrName=n}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,n,r){if(!t)throw new Error("Missing topic.");if(!n)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,n,r)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,n){if(typeof t=="number")return super.getFullList(t,n);const r=Object.assign({},t,n);return super.getFullList(r)}async getList(t=1,n=30,r){return super.getList(t,n,r)}async getFirstListItem(t,n){return super.getFirstListItem(t,n)}async getOne(t,n){return super.getOne(t,n)}async create(t,n){return super.create(t,n)}async update(t,n,r){return super.update(t,n,r).then(s=>{var o,i,a;return((o=this.client.authStore.model)==null?void 0:o.id)!==(s==null?void 0:s.id)||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((a=this.client.authStore.model)==null?void 0:a.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o,i;return!r||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((o=this.client.authStore.model)==null?void 0:o.collectionId)!==this.collectionIdOrName&&((i=this.client.authStore.model)==null?void 0:i.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:n})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(n=>Object.assign({},n,{usernamePassword:!!(n!=null&&n.usernamePassword),emailPassword:!!(n!=null&&n.emailPassword),authProviders:Array.isArray(n==null?void 0:n.authProviders)?n==null?void 0:n.authProviders:[]}))}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};return o=Ln("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,n,r,s,o,i,a){let c={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:s,createData:o}};return c=Ln("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",c,i,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",c).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const n=(t==null?void 0:t[0])||{};let r=null;n.urlCallback||(r=$w(void 0));const s=new bC(this.client);function o(){r==null||r.close(),s.unsubscribe()}const i={},a=n.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(c=>{var h;const u=c.authProviders.find(y=>y.name===n.provider);if(!u)throw new Yn(new Error(`Missing or invalid provider "${n.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=a?(h=this.client.cancelControllers)==null?void 0:h[a]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(y,x)=>{var g;try{await s.subscribe("@oauth2",async b=>{var C;const _=s.clientId;try{if(!b.state||_!==b.state)throw new Error("State parameters don't match.");if(b.error||!b.code)throw new Error("OAuth2 redirect error or missing code: "+b.error);const j=Object.assign({},n);delete j.provider,delete j.scopes,delete j.createData,delete j.urlCallback,(C=f==null?void 0:f.signal)!=null&&C.onabort&&(f.signal.onabort=null);const T=await this.authWithOAuth2Code(u.name,b.code,u.codeVerifier,d,n.createData,j);y(T)}catch(j){x(new Yn(j))}o()});const w={state:s.clientId};(g=n.scopes)!=null&&g.length&&(w.scope=n.scopes.join(" "));const m=this._replaceQueryParams(u.authUrl+d,w);await(n.urlCallback||function(b){r?r.location.href=b:r=$w(b)})(m)}catch(w){o(),x(new Yn(w))}})}).catch(c=>{throw o(),c})}async authRefresh(t,n){let r={method:"POST"};return r=Ln("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCollectionPath+"/auth-refresh",r).then(s=>this.authResponse(s))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Ln("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Ln("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,n,r){let s={method:"POST",body:{email:t}};return s=Ln("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,n,r){let s={method:"POST",body:{token:t}};return s=Ln("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=ha(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===o.id&&i.collectionId===o.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,n,r){let s={method:"POST",body:{newEmail:t}};return s=Ln("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,n,r,s){let o={method:"POST",body:{token:t,password:n}};return o=Ln("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=ha(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",n)}async unlinkExternalAuth(t,n,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(n),r).then(()=>!0)}_replaceQueryParams(t,n={}){let r=t,s="";t.indexOf("?")>=0&&(r=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const o={},i=s.split("&");for(const a of i){if(a=="")continue;const c=a.split("=");o[decodeURIComponent(c[0].replace(/\+/g," "))]=decodeURIComponent((c[1]||"").replace(/\+/g," "))}for(let a in n)n.hasOwnProperty(a)&&(n[a]==null?delete o[a]:o[a]=n[a]);s="";for(let a in o)o.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(o[a].replace(/%20/g,"+")));return s!=""?r+"?"+s:r}}function $w(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Yn(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,n=768,r=window.innerWidth,s=window.innerHeight;t=t>r?r:t,n=n>s?s:n;let o=r/2-t/2,i=s/2-n/2;return window.open(e,"popup_window","width="+t+",height="+n+",top="+i+",left="+o+",resizable,menubar=no")}class s4 extends uv{get baseCrudPath(){return"/api/collections"}async import(t,n=!1,r){return r=Object.assign({method:"PUT",body:{collections:t,deleteMissing:n}},r),this.client.send(this.baseCrudPath+"/import",r).then(()=>!0)}}class o4 extends bi{async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send("/api/logs",r)}async getOne(t,n){if(!t)throw new Yn({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/"+encodeURIComponent(t),n)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class i4 extends bi{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class a4 extends bi{getUrl(t,n,r={}){if(!n||!(t!=null&&t.id)||!(t!=null&&t.collectionId)&&!(t!=null&&t.collectionName))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(t.collectionId||t.collectionName)),s.push(encodeURIComponent(t.id)),s.push(encodeURIComponent(n));let o=this.client.buildUrl(s.join("/"));if(Object.keys(r).length){r.download===!1&&delete r.download;const i=new URLSearchParams(r);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(n=>(n==null?void 0:n.token)||"")}}class l4 extends bi{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,n){return n=Object.assign({method:"POST",body:{name:t}},n),this.client.send("/api/backups",n).then(()=>!0)}async upload(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send("/api/backups/upload",n).then(()=>!0)}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}`,n).then(()=>!0)}async restore(t,n){return n=Object.assign({method:"POST"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,n).then(()=>!0)}getDownloadUrl(t,n){return this.client.buildUrl(`/api/backups/${encodeURIComponent(n)}?token=${encodeURIComponent(t)}`)}}class c4{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new JF,this.admins=new t4(this),this.collections=new s4(this),this.files=new a4(this),this.logs=new o4(this),this.settings=new e4(this),this.realtime=new bC(this),this.health=new i4(this),this.backups=new l4(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new r4(this,t)),this.recordServices[t]}autoCancellation(t){return this.enableAutoCancellation=!!t,this}cancelRequest(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this}cancelAllRequests(){for(let t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this}filter(t,n){if(!n)return t;for(let r in n){let s=n[r];switch(typeof s){case"boolean":case"number":s=""+s;break;case"string":s="'"+s.replace(/'/g,"\\'")+"'";break;default:s=s===null?"null":s instanceof Date?"'"+s.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(s).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+r+"}",s)}return t}getFileUrl(t,n,r={}){return this.files.getUrl(t,n,r)}buildUrl(t){var r;let n=this.baseUrl;return typeof window>"u"||!window.location||n.startsWith("https://")||n.startsWith("http://")||(n=(r=window.location.origin)!=null&&r.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(n+=window.location.pathname||"/",n+=n.endsWith("/")?"":"/"),n+=this.baseUrl),t&&(n+=n.endsWith("/")?"":"/",n+=t.startsWith("/")?t.substring(1):t),n}async send(t,n){n=this.initSendOptions(t,n);let r=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(r,n));s.url!==void 0||s.options!==void 0?(r=s.url||r,n=s.options||n):Object.keys(s).length&&(n=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(n.query!==void 0){const s=this.serializeQueryParams(n.query);s&&(r+=(r.includes("?")?"&":"?")+s),delete n.query}return this.getHeader(n.headers,"Content-Type")=="application/json"&&n.body&&typeof n.body!="string"&&(n.body=JSON.stringify(n.body)),(n.fetch||fetch)(r,n).then(async s=>{let o={};try{o=await s.json()}catch{}if(this.afterSend&&(o=await this.afterSend(s,o)),s.status>=400)throw new Yn({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Yn(s)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),wC(n),n.query=Object.assign({},n.params,n.query),n.requestKey===void 0&&(n.$autoCancel===!1||n.query.$autoCancel===!1?n.requestKey=null:(n.$cancelKey||n.query.$cancelKey)&&(n.requestKey=n.$cancelKey||n.query.$cancelKey)),delete n.$autoCancel,delete n.query.$autoCancel,delete n.$cancelKey,delete n.query.$cancelKey,this.getHeader(n.headers,"Content-Type")!==null||this.isFormData(n.body)||(n.headers=Object.assign({},n.headers,{"Content-Type":"application/json"})),this.getHeader(n.headers,"Accept-Language")===null&&(n.headers=Object.assign({},n.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(n.headers,"Authorization")===null&&(n.headers=Object.assign({},n.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&n.requestKey!==null){const r=n.requestKey||(n.method||"GET")+t;delete n.requestKey,this.cancelRequest(r);const s=new AbortController;this.cancelControllers[r]=s,n.signal=s.signal}return n}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const n=new FormData;for(const r in t){const s=t[r];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)n.append(r,i)}else{let o={};o[r]=s,n.append("@jsonPayload",JSON.stringify(o))}}return n}hasBlobField(t){for(const n in t){const r=Array.isArray(t[n])?t[n]:[t[n]];for(const s of r)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,n){t=t||{},n=n.toLowerCase();for(let r in t)if(r.toLowerCase()==n)return t[r];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const n=[];for(const r in t){if(t[r]===null)continue;const s=t[r],o=encodeURIComponent(r);if(Array.isArray(s))for(const i of s)n.push(o+"="+encodeURIComponent(i));else s instanceof Date?n.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?n.push(o+"="+encodeURIComponent(JSON.stringify(s))):n.push(o+"="+encodeURIComponent(s))}return n.join("&")}}const u4=void 0;console.log(u4);let Iu;const st=()=>Iu||(Iu=new c4("/"),Iu);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var _C;function be(){return _C.apply(null,arguments)}function d4(e){_C=e}function Tr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function ti(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ut(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function dv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(ut(e,t))return!1;return!0}function En(e){return e===void 0}function Rs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Kc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function SC(e,t){var n=[],r,s=e.length;for(r=0;r<s;++r)n.push(t(e[r],r));return n}function ao(e,t){for(var n in t)ut(t,n)&&(e[n]=t[n]);return ut(t,"toString")&&(e.toString=t.toString),ut(t,"valueOf")&&(e.valueOf=t.valueOf),e}function es(e,t,n,r){return YC(e,t,n,r,!0).utc()}function f4(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Xe(e){return e._pf==null&&(e._pf=f4()),e._pf}var Km;Array.prototype.some?Km=Array.prototype.some:Km=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function fv(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Xe(e),n=Km.call(t.parsedDateParts,function(s){return s!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function eh(e){var t=es(NaN);return e!=null?ao(Xe(t),e):Xe(t).userInvalidated=!0,t}var Uw=be.momentProperties=[],Np=!1;function hv(e,t){var n,r,s,o=Uw.length;if(En(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),En(t._i)||(e._i=t._i),En(t._f)||(e._f=t._f),En(t._l)||(e._l=t._l),En(t._strict)||(e._strict=t._strict),En(t._tzm)||(e._tzm=t._tzm),En(t._isUTC)||(e._isUTC=t._isUTC),En(t._offset)||(e._offset=t._offset),En(t._pf)||(e._pf=Xe(t)),En(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)r=Uw[n],s=t[r],En(s)||(e[r]=s);return e}function Gc(e){hv(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Np===!1&&(Np=!0,be.updateOffset(this),Np=!1)}function Rr(e){return e instanceof Gc||e!=null&&e._isAMomentObject!=null}function kC(e){be.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function ur(e,t){var n=!0;return ao(function(){if(be.deprecationHandler!=null&&be.deprecationHandler(null,e),n){var r=[],s,o,i,a=arguments.length;for(o=0;o<a;o++){if(s="",typeof arguments[o]=="object"){s+=`
[`+o+"] ";for(i in arguments[0])ut(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}kC(e+`
Arguments: `+Array.prototype.slice.call(r).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Vw={};function CC(e,t){be.deprecationHandler!=null&&be.deprecationHandler(e,t),Vw[e]||(kC(t),Vw[e]=!0)}be.suppressDeprecationWarnings=!1;be.deprecationHandler=null;function ts(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function h4(e){var t,n;for(n in e)ut(e,n)&&(t=e[n],ts(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Gm(e,t){var n=ao({},e),r;for(r in t)ut(t,r)&&(ti(e[r])&&ti(t[r])?(n[r]={},ao(n[r],e[r]),ao(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)ut(e,r)&&!ut(t,r)&&ti(e[r])&&(n[r]=ao({},n[r]));return n}function pv(e){e!=null&&this.set(e)}var Zm;Object.keys?Zm=Object.keys:Zm=function(e){var t,n=[];for(t in e)ut(e,t)&&n.push(t);return n};var p4={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function m4(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ts(r)?r.call(t,n):r}function Xr(e,t,n){var r=""+Math.abs(e),s=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var mv=/(\[[^\[]*\])|(\\)?([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,Mu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Tp={},pa={};function Me(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(pa[e]=s),t&&(pa[t[0]]=function(){return Xr(s.apply(this,arguments),t[1],t[2])}),n&&(pa[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function g4(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function y4(e){var t=e.match(mv),n,r;for(n=0,r=t.length;n<r;n++)pa[t[n]]?t[n]=pa[t[n]]:t[n]=g4(t[n]);return function(s){var o="",i;for(i=0;i<r;i++)o+=ts(t[i])?t[i].call(s,e):t[i];return o}}function id(e,t){return e.isValid()?(t=jC(t,e.localeData()),Tp[t]=Tp[t]||y4(t),Tp[t](e)):e.localeData().invalidDate()}function jC(e,t){var n=5;function r(s){return t.longDateFormat(s)||s}for(Mu.lastIndex=0;n>=0&&Mu.test(e);)e=e.replace(Mu,r),Mu.lastIndex=0,n-=1;return e}var v4={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 x4(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(mv).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var w4="Invalid date";function b4(){return this._invalidDate}var _4="%d",S4=/\d{1,2}/;function k4(e){return this._ordinal.replace("%d",e)}var C4={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 j4(e,t,n,r){var s=this._relativeTime[n];return ts(s)?s(e,t,n,r):s.replace(/%d/i,e)}function E4(e,t){var n=this._relativeTime[e>0?"future":"past"];return ts(n)?n(t):n.replace(/%s/i,t)}var Bw={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 dr(e){return typeof e=="string"?Bw[e]||Bw[e.toLowerCase()]:void 0}function gv(e){var t={},n,r;for(r in e)ut(e,r)&&(n=dr(r),n&&(t[n]=e[r]));return t}var N4={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 T4(e){var t=[],n;for(n in e)ut(e,n)&&t.push({unit:n,priority:N4[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var EC=/\d/,Qn=/\d\d/,NC=/\d{3}/,yv=/\d{4}/,th=/[+-]?\d{6}/,jt=/\d\d?/,TC=/\d\d\d\d?/,RC=/\d\d\d\d\d\d?/,nh=/\d{1,3}/,vv=/\d{1,4}/,rh=/[+-]?\d{1,6}/,Ha=/\d+/,sh=/[+-]?\d+/,R4=/Z|[+-]\d\d:?\d\d/gi,oh=/Z|[+-]\d\d(?::?\d\d)?/gi,P4=/[+-]?\d+(\.\d{1,3})?/,Zc=/[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,Ya=/^[1-9]\d?/,xv=/^([1-9]\d|\d)/,Kd;Kd={};function je(e,t,n){Kd[e]=ts(t)?t:function(r,s){return r&&n?n:t}}function A4(e,t){return ut(Kd,e)?Kd[e](t._strict,t._locale):new RegExp(O4(e))}function O4(e){return bs(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function bs(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function rr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function nt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=rr(t)),n}var qm={};function vt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),Rs(t)&&(r=function(o,i){i[t]=nt(o)}),s=e.length,n=0;n<s;n++)qm[e[n]]=r}function qc(e,t){vt(e,function(n,r,s,o){s._w=s._w||{},t(n,s._w,s,o)})}function D4(e,t,n){t!=null&&ut(qm,e)&&qm[e](t,n._a,n,e)}function ih(e){return e%4===0&&e%100!==0||e%400===0}var dn=0,ys=1,Vr=2,qt=3,br=4,vs=5,Zo=6,I4=7,M4=8;Me("Y",0,0,function(){var e=this.year();return e<=9999?Xr(e,4):"+"+e});Me(0,["YY",2],0,function(){return this.year()%100});Me(0,["YYYY",4],0,"year");Me(0,["YYYYY",5],0,"year");Me(0,["YYYYYY",6,!0],0,"year");je("Y",sh);je("YY",jt,Qn);je("YYYY",vv,yv);je("YYYYY",rh,th);je("YYYYYY",rh,th);vt(["YYYYY","YYYYYY"],dn);vt("YYYY",function(e,t){t[dn]=e.length===2?be.parseTwoDigitYear(e):nt(e)});vt("YY",function(e,t){t[dn]=be.parseTwoDigitYear(e)});vt("Y",function(e,t){t[dn]=parseInt(e,10)});function Fl(e){return ih(e)?366:365}be.parseTwoDigitYear=function(e){return nt(e)+(nt(e)>68?1900:2e3)};var PC=Ka("FullYear",!0);function L4(){return ih(this.year())}function Ka(e,t){return function(n){return n!=null?(AC(this,e,n),be.updateOffset(this,t),this):hc(this,e)}}function hc(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function AC(e,t,n){var r,s,o,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!ih(o)?28:a,s?r.setUTCFullYear(o,i,a):r.setFullYear(o,i,a)}}function F4(e){return e=dr(e),ts(this[e])?this[e]():this}function z4(e,t){if(typeof e=="object"){e=gv(e);var n=T4(e),r,s=n.length;for(r=0;r<s;r++)this[n[r].unit](e[n[r].unit])}else if(e=dr(e),ts(this[e]))return this[e](t);return this}function $4(e,t){return(e%t+t)%t}var Ut;Array.prototype.indexOf?Ut=Array.prototype.indexOf:Ut=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function wv(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=$4(t,12);return e+=(t-n)/12,n===1?ih(e)?29:28:31-n%7%2}Me("M",["MM",2],"Mo",function(){return this.month()+1});Me("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Me("MMMM",0,0,function(e){return this.localeData().months(this,e)});je("M",jt,Ya);je("MM",jt,Qn);je("MMM",function(e,t){return t.monthsShortRegex(e)});je("MMMM",function(e,t){return t.monthsRegex(e)});vt(["M","MM"],function(e,t){t[ys]=nt(e)-1});vt(["MMM","MMMM"],function(e,t,n,r){var s=n._locale.monthsParse(e,r,n._strict);s!=null?t[ys]=s:Xe(n).invalidMonth=e});var U4="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),OC="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),DC=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,V4=Zc,B4=Zc;function W4(e,t){return e?Tr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||DC).test(t)?"format":"standalone"][e.month()]:Tr(this._months)?this._months:this._months.standalone}function H4(e,t){return e?Tr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[DC.test(t)?"format":"standalone"][e.month()]:Tr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Y4(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=es([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?t==="MMM"?(s=Ut.call(this._shortMonthsParse,i),s!==-1?s:null):(s=Ut.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=Ut.call(this._shortMonthsParse,i),s!==-1?s:(s=Ut.call(this._longMonthsParse,i),s!==-1?s:null)):(s=Ut.call(this._longMonthsParse,i),s!==-1?s:(s=Ut.call(this._shortMonthsParse,i),s!==-1?s:null))}function K4(e,t,n){var r,s,o;if(this._monthsParseExact)return Y4.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=es([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function IC(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=nt(t);else if(t=e.localeData().monthsParse(t),!Rs(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,wv(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function MC(e){return e!=null?(IC(this,e),be.updateOffset(this,!0),this):hc(this,"Month")}function G4(){return wv(this.year(),this.month())}function Z4(e){return this._monthsParseExact?(ut(this,"_monthsRegex")||LC.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(ut(this,"_monthsShortRegex")||(this._monthsShortRegex=V4),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function q4(e){return this._monthsParseExact?(ut(this,"_monthsRegex")||LC.call(this),e?this._monthsStrictRegex:this._monthsRegex):(ut(this,"_monthsRegex")||(this._monthsRegex=B4),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function LC(){function e(c,u){return u.length-c.length}var t=[],n=[],r=[],s,o,i,a;for(s=0;s<12;s++)o=es([2e3,s]),i=bs(this.monthsShort(o,"")),a=bs(this.months(o,"")),t.push(i),n.push(a),r.push(a),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function X4(e,t,n,r,s,o,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,o,i),a}function pc(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Gd(e,t,n){var r=7+t-n,s=(7+pc(e,0,r).getUTCDay()-t)%7;return-s+r-1}function FC(e,t,n,r,s){var o=(7+n-r)%7,i=Gd(e,r,s),a=1+7*(t-1)+o+i,c,u;return a<=0?(c=e-1,u=Fl(c)+a):a>Fl(e)?(c=e+1,u=a-Fl(e)):(c=e,u=a),{year:c,dayOfYear:u}}function mc(e,t,n){var r=Gd(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+_s(i,t,n)):s>_s(e.year(),t,n)?(o=s-_s(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function _s(e,t,n){var r=Gd(e,t,n),s=Gd(e+1,t,n);return(Fl(e)-r+s)/7}Me("w",["ww",2],"wo","week");Me("W",["WW",2],"Wo","isoWeek");je("w",jt,Ya);je("ww",jt,Qn);je("W",jt,Ya);je("WW",jt,Qn);qc(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=nt(e)});function Q4(e){return mc(e,this._week.dow,this._week.doy).week}var J4={dow:0,doy:6};function e3(){return this._week.dow}function t3(){return this._week.doy}function n3(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function r3(e){var t=mc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Me("d",0,"do","day");Me("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Me("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Me("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Me("e",0,0,"weekday");Me("E",0,0,"isoWeekday");je("d",jt);je("e",jt);je("E",jt);je("dd",function(e,t){return t.weekdaysMinRegex(e)});je("ddd",function(e,t){return t.weekdaysShortRegex(e)});je("dddd",function(e,t){return t.weekdaysRegex(e)});qc(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Xe(n).invalidWeekday=e});qc(["d","e","E"],function(e,t,n,r){t[r]=nt(e)});function s3(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function o3(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 i3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),zC="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),a3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),l3=Zc,c3=Zc,u3=Zc;function d3(e,t){var n=Tr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?bv(n,this._week.dow):e?n[e.day()]:n}function f3(e){return e===!0?bv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function h3(e){return e===!0?bv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function p3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=es([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(s=Ut.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=Ut.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=Ut.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=Ut.call(this._weekdaysParse,i),s!==-1||(s=Ut.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=Ut.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=Ut.call(this._shortWeekdaysParse,i),s!==-1||(s=Ut.call(this._weekdaysParse,i),s!==-1)?s:(s=Ut.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=Ut.call(this._minWeekdaysParse,i),s!==-1||(s=Ut.call(this._weekdaysParse,i),s!==-1)?s:(s=Ut.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function m3(e,t,n){var r,s,o;if(this._weekdaysParseExact)return p3.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=es([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function g3(e){if(!this.isValid())return e!=null?this:NaN;var t=hc(this,"Day");return e!=null?(e=s3(e,this.localeData()),this.add(e-t,"d")):t}function y3(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 v3(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=o3(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function x3(e){return this._weekdaysParseExact?(ut(this,"_weekdaysRegex")||_v.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ut(this,"_weekdaysRegex")||(this._weekdaysRegex=l3),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function w3(e){return this._weekdaysParseExact?(ut(this,"_weekdaysRegex")||_v.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ut(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=c3),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function b3(e){return this._weekdaysParseExact?(ut(this,"_weekdaysRegex")||_v.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ut(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=u3),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function _v(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,a,c,u;for(o=0;o<7;o++)i=es([2e3,1]).day(o),a=bs(this.weekdaysMin(i,"")),c=bs(this.weekdaysShort(i,"")),u=bs(this.weekdays(i,"")),t.push(a),n.push(c),r.push(u),s.push(a),s.push(c),s.push(u);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Sv(){return this.hours()%12||12}function _3(){return this.hours()||24}Me("H",["HH",2],0,"hour");Me("h",["hh",2],0,Sv);Me("k",["kk",2],0,_3);Me("hmm",0,0,function(){return""+Sv.apply(this)+Xr(this.minutes(),2)});Me("hmmss",0,0,function(){return""+Sv.apply(this)+Xr(this.minutes(),2)+Xr(this.seconds(),2)});Me("Hmm",0,0,function(){return""+this.hours()+Xr(this.minutes(),2)});Me("Hmmss",0,0,function(){return""+this.hours()+Xr(this.minutes(),2)+Xr(this.seconds(),2)});function $C(e,t){Me(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}$C("a",!0);$C("A",!1);function UC(e,t){return t._meridiemParse}je("a",UC);je("A",UC);je("H",jt,xv);je("h",jt,Ya);je("k",jt,Ya);je("HH",jt,Qn);je("hh",jt,Qn);je("kk",jt,Qn);je("hmm",TC);je("hmmss",RC);je("Hmm",TC);je("Hmmss",RC);vt(["H","HH"],qt);vt(["k","kk"],function(e,t,n){var r=nt(e);t[qt]=r===24?0:r});vt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});vt(["h","hh"],function(e,t,n){t[qt]=nt(e),Xe(n).bigHour=!0});vt("hmm",function(e,t,n){var r=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r)),Xe(n).bigHour=!0});vt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r,2)),t[vs]=nt(e.substr(s)),Xe(n).bigHour=!0});vt("Hmm",function(e,t,n){var r=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r))});vt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r,2)),t[vs]=nt(e.substr(s))});function S3(e){return(e+"").toLowerCase().charAt(0)==="p"}var k3=/[ap]\.?m?\.?/i,C3=Ka("Hours",!0);function j3(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var VC={calendar:p4,longDateFormat:v4,invalidDate:w4,ordinal:_4,dayOfMonthOrdinalParse:S4,relativeTime:C4,months:U4,monthsShort:OC,week:J4,weekdays:i3,weekdaysMin:a3,weekdaysShort:zC,meridiemParse:k3},Tt={},ul={},gc;function E3(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Ww(e){return e&&e.toLowerCase().replace("_","-")}function N3(e){for(var t=0,n,r,s,o;t<e.length;){for(o=Ww(e[t]).split("-"),n=o.length,r=Ww(e[t+1]),r=r?r.split("-"):null;n>0;){if(s=ah(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&E3(o,r)>=n-1)break;n--}t++}return gc}function T3(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ah(e){var t=null,n;if(Tt[e]===void 0&&typeof fd<"u"&&fd&&fd.exports&&T3(e))try{t=gc._abbr,n=require,n("./locale/"+e),xo(t)}catch{Tt[e]=null}return Tt[e]}function xo(e,t){var n;return e&&(En(t)?n=Fs(e):n=kv(e,t),n?gc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),gc._abbr}function kv(e,t){if(t!==null){var n,r=VC;if(t.abbr=e,Tt[e]!=null)CC("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)r=Tt[t.parentLocale]._config;else if(n=ah(t.parentLocale),n!=null)r=n._config;else return ul[t.parentLocale]||(ul[t.parentLocale]=[]),ul[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new pv(Gm(r,t)),ul[e]&&ul[e].forEach(function(s){kv(s.name,s.config)}),xo(e),Tt[e]}else return delete Tt[e],null}function R3(e,t){if(t!=null){var n,r,s=VC;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(Gm(Tt[e]._config,t)):(r=ah(e),r!=null&&(s=r._config),t=Gm(s,t),r==null&&(t.abbr=e),n=new pv(t),n.parentLocale=Tt[e],Tt[e]=n),xo(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===xo()&&xo(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function Fs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return gc;if(!Tr(e)){if(t=ah(e),t)return t;e=[e]}return N3(e)}function P3(){return Zm(Tt)}function Cv(e){var t,n=e._a;return n&&Xe(e).overflow===-2&&(t=n[ys]<0||n[ys]>11?ys:n[Vr]<1||n[Vr]>wv(n[dn],n[ys])?Vr:n[qt]<0||n[qt]>24||n[qt]===24&&(n[br]!==0||n[vs]!==0||n[Zo]!==0)?qt:n[br]<0||n[br]>59?br:n[vs]<0||n[vs]>59?vs:n[Zo]<0||n[Zo]>999?Zo:-1,Xe(e)._overflowDayOfYear&&(t<dn||t>Vr)&&(t=Vr),Xe(e)._overflowWeeks&&t===-1&&(t=I4),Xe(e)._overflowWeekday&&t===-1&&(t=M4),Xe(e).overflow=t),e}var A3=/^\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)?)?$/,O3=/^\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)?)?$/,D3=/Z|[+-]\d\d(?::?\d\d)?/,Lu=[["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]],Rp=[["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/]],I3=/^\/?Date\((-?\d+)/i,M3=/^(?:(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}))$/,L3={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 BC(e){var t,n,r=e._i,s=A3.exec(r)||O3.exec(r),o,i,a,c,u=Lu.length,d=Rp.length;if(s){for(Xe(e).iso=!0,t=0,n=u;t<n;t++)if(Lu[t][1].exec(s[1])){i=Lu[t][0],o=Lu[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,n=d;t<n;t++)if(Rp[t][1].exec(s[3])){a=(s[2]||" ")+Rp[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(s[4])if(D3.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(c||""),Ev(e)}else e._isValid=!1}function F3(e,t,n,r,s,o){var i=[z3(e),OC.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function z3(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function $3(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function U3(e,t,n){if(e){var r=zC.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(r!==s)return Xe(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function V3(e,t,n){if(e)return L3[e];if(t)return 0;var r=parseInt(n,10),s=r%100,o=(r-s)/100;return o*60+s}function WC(e){var t=M3.exec($3(e._i)),n;if(t){if(n=F3(t[4],t[3],t[2],t[5],t[6],t[7]),!U3(t[1],n,e))return;e._a=n,e._tzm=V3(t[8],t[9],t[10]),e._d=pc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Xe(e).rfc2822=!0}else e._isValid=!1}function B3(e){var t=I3.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(BC(e),e._isValid===!1)delete e._isValid;else return;if(WC(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:be.createFromInputFallback(e)}be.createFromInputFallback=ur("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Li(e,t,n){return e??t??n}function W3(e){var t=new Date(be.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function jv(e){var t,n,r=[],s,o,i;if(!e._d){for(s=W3(e),e._w&&e._a[Vr]==null&&e._a[ys]==null&&H3(e),e._dayOfYear!=null&&(i=Li(e._a[dn],s[dn]),(e._dayOfYear>Fl(i)||e._dayOfYear===0)&&(Xe(e)._overflowDayOfYear=!0),n=pc(i,0,e._dayOfYear),e._a[ys]=n.getUTCMonth(),e._a[Vr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[qt]===24&&e._a[br]===0&&e._a[vs]===0&&e._a[Zo]===0&&(e._nextDay=!0,e._a[qt]=0),e._d=(e._useUTC?pc:X4).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Xe(e).weekdayMismatch=!0)}}function H3(e){var t,n,r,s,o,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=Li(t.GG,e._a[dn],mc(Ct(),1,4).year),r=Li(t.W,1),s=Li(t.E,1),(s<1||s>7)&&(c=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=mc(Ct(),o,i),n=Li(t.gg,e._a[dn],u.year),r=Li(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(c=!0)):s=o),r<1||r>_s(n,o,i)?Xe(e)._overflowWeeks=!0:c!=null?Xe(e)._overflowWeekday=!0:(a=FC(n,r,s,o,i),e._a[dn]=a.year,e._dayOfYear=a.dayOfYear)}be.ISO_8601=function(){};be.RFC_2822=function(){};function Ev(e){if(e._f===be.ISO_8601){BC(e);return}if(e._f===be.RFC_2822){WC(e);return}e._a=[],Xe(e).empty=!0;var t=""+e._i,n,r,s,o,i,a=t.length,c=0,u,d;for(s=jC(e._f,e._locale).match(mv)||[],d=s.length,n=0;n<d;n++)o=s[n],r=(t.match(A4(o,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&Xe(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),pa[o]?(r?Xe(e).empty=!1:Xe(e).unusedTokens.push(o),D4(o,r,e)):e._strict&&!r&&Xe(e).unusedTokens.push(o);Xe(e).charsLeftOver=a-c,t.length>0&&Xe(e).unusedInput.push(t),e._a[qt]<=12&&Xe(e).bigHour===!0&&e._a[qt]>0&&(Xe(e).bigHour=void 0),Xe(e).parsedDateParts=e._a.slice(0),Xe(e).meridiem=e._meridiem,e._a[qt]=Y3(e._locale,e._a[qt],e._meridiem),u=Xe(e).era,u!==null&&(e._a[dn]=e._locale.erasConvertYear(u,e._a[dn])),jv(e),Cv(e)}function Y3(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function K3(e){var t,n,r,s,o,i,a=!1,c=e._f.length;if(c===0){Xe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)o=0,i=!1,t=hv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],Ev(t),fv(t)&&(i=!0),o+=Xe(t).charsLeftOver,o+=Xe(t).unusedTokens.length*10,Xe(t).score=o,a?o<r&&(r=o,n=t):(r==null||o<r||i)&&(r=o,n=t,i&&(a=!0));ao(e,n||t)}function G3(e){if(!e._d){var t=gv(e._i),n=t.day===void 0?t.date:t.day;e._a=SC([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),jv(e)}}function Z3(e){var t=new Gc(Cv(HC(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function HC(e){var t=e._i,n=e._f;return e._locale=e._locale||Fs(e._l),t===null||n===void 0&&t===""?eh({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Rr(t)?new Gc(Cv(t)):(Kc(t)?e._d=t:Tr(n)?K3(e):n?Ev(e):q3(e),fv(e)||(e._d=null),e))}function q3(e){var t=e._i;En(t)?e._d=new Date(be.now()):Kc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?B3(e):Tr(t)?(e._a=SC(t.slice(0),function(n){return parseInt(n,10)}),jv(e)):ti(t)?G3(e):Rs(t)?e._d=new Date(t):be.createFromInputFallback(e)}function YC(e,t,n,r,s){var o={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(ti(e)&&dv(e)||Tr(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=n,o._i=e,o._f=t,o._strict=r,Z3(o)}function Ct(e,t,n,r){return YC(e,t,n,r,!1)}var X3=ur("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:eh()}),Q3=ur("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:eh()});function KC(e,t){var n,r;if(t.length===1&&Tr(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function J3(){var e=[].slice.call(arguments,0);return KC("isBefore",e)}function e5(){var e=[].slice.call(arguments,0);return KC("isAfter",e)}var t5=function(){return Date.now?Date.now():+new Date},dl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function n5(e){var t,n=!1,r,s=dl.length;for(t in e)if(ut(e,t)&&!(Ut.call(dl,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<s;++r)if(e[dl[r]]){if(n)return!1;parseFloat(e[dl[r]])!==nt(e[dl[r]])&&(n=!0)}return!0}function r5(){return this._isValid}function s5(){return Dr(NaN)}function lh(e){var t=gv(e),n=t.year||0,r=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=n5(t),this._milliseconds=+d+u*1e3+c*6e4+a*1e3*60*60,this._days=+i+o*7,this._months=+s+r*3+n*12,this._data={},this._locale=Fs(),this._bubble()}function ad(e){return e instanceof lh}function Xm(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function o5(e,t,n){var r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<r;i++)nt(e[i])!==nt(t[i])&&o++;return o+s}function GC(e,t){Me(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Xr(~~(n/60),2)+t+Xr(~~n%60,2)})}GC("Z",":");GC("ZZ","");je("Z",oh);je("ZZ",oh);vt(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Nv(oh,e)});var i5=/([\+\-]|\d\d)/gi;function Nv(e,t){var n=(t||"").match(e),r,s,o;return n===null?null:(r=n[n.length-1]||[],s=(r+"").match(i5)||["-",0,0],o=+(s[1]*60)+nt(s[2]),o===0?0:s[0]==="+"?o:-o)}function Tv(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Rr(e)||Kc(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),be.updateOffset(n,!1),n):Ct(e).local()}function Qm(e){return-Math.round(e._d.getTimezoneOffset())}be.updateOffset=function(){};function a5(e,t,n){var r=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Nv(oh,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(s=Qm(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),r!==e&&(!t||this._changeInProgress?XC(this,Dr(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,be.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Qm(this)}function l5(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function c5(e){return this.utcOffset(0,e)}function u5(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Qm(this),"m")),this}function d5(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Nv(R4,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function f5(e){return this.isValid()?(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function h5(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function p5(){if(!En(this._isDSTShifted))return this._isDSTShifted;var e={},t;return hv(e,this),e=HC(e),e._a?(t=e._isUTC?es(e._a):Ct(e._a),this._isDSTShifted=this.isValid()&&o5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function m5(){return this.isValid()?!this._isUTC:!1}function g5(){return this.isValid()?this._isUTC:!1}function ZC(){return this.isValid()?this._isUTC&&this._offset===0:!1}var y5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,v5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Dr(e,t){var n=e,r=null,s,o,i;return ad(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Rs(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=y5.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:nt(r[Vr])*s,h:nt(r[qt])*s,m:nt(r[br])*s,s:nt(r[vs])*s,ms:nt(Xm(r[Zo]*1e3))*s}):(r=v5.exec(e))?(s=r[1]==="-"?-1:1,n={y:Lo(r[2],s),M:Lo(r[3],s),w:Lo(r[4],s),d:Lo(r[5],s),h:Lo(r[6],s),m:Lo(r[7],s),s:Lo(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=x5(Ct(n.from),Ct(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new lh(n),ad(e)&&ut(e,"_locale")&&(o._locale=e._locale),ad(e)&&ut(e,"_isValid")&&(o._isValid=e._isValid),o}Dr.fn=lh.prototype;Dr.invalid=s5;function Lo(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Hw(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function x5(e,t){var n;return e.isValid()&&t.isValid()?(t=Tv(t,e),e.isBefore(t)?n=Hw(e,t):(n=Hw(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function qC(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(CC(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),s=Dr(n,r),XC(this,s,e),this}}function XC(e,t,n,r){var s=t._milliseconds,o=Xm(t._days),i=Xm(t._months);e.isValid()&&(r=r??!0,i&&IC(e,hc(e,"Month")+i*n),o&&AC(e,"Date",hc(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&be.updateOffset(e,o||i))}var w5=qC(1,"add"),b5=qC(-1,"subtract");function QC(e){return typeof e=="string"||e instanceof String}function _5(e){return Rr(e)||Kc(e)||QC(e)||Rs(e)||k5(e)||S5(e)||e===null||e===void 0}function S5(e){var t=ti(e)&&!dv(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=r.length;for(s=0;s<i;s+=1)o=r[s],n=n||ut(e,o);return t&&n}function k5(e){var t=Tr(e),n=!1;return t&&(n=e.filter(function(r){return!Rs(r)&&QC(e)}).length===0),t&&n}function C5(e){var t=ti(e)&&!dv(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<r.length;s+=1)o=r[s],n=n||ut(e,o);return t&&n}function j5(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function E5(e,t){arguments.length===1&&(arguments[0]?_5(arguments[0])?(e=arguments[0],t=void 0):C5(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Ct(),r=Tv(n,this).startOf("day"),s=be.calendarFormat(this,r)||"sameElse",o=t&&(ts(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,Ct(n)))}function N5(){return new Gc(this)}function T5(e,t){var n=Rr(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=dr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function R5(e,t){var n=Rr(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=dr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function P5(e,t,n,r){var s=Rr(e)?e:Ct(e),o=Rr(t)?t:Ct(t);return this.isValid()&&s.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(s,n):!this.isBefore(s,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function A5(e,t){var n=Rr(e)?e:Ct(e),r;return this.isValid()&&n.isValid()?(t=dr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function O5(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function D5(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function I5(e,t,n){var r,s,o;if(!this.isValid())return NaN;if(r=Tv(e,this),!r.isValid())return NaN;switch(s=(r.utcOffset()-this.utcOffset())*6e4,t=dr(t),t){case"year":o=ld(this,r)/12;break;case"month":o=ld(this,r);break;case"quarter":o=ld(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-s)/864e5;break;case"week":o=(this-r-s)/6048e5;break;default:o=this-r}return n?o:rr(o)}function ld(e,t){if(e.date()<t.date())return-ld(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),s,o;return t-r<0?(s=e.clone().add(n-1,"months"),o=(t-r)/(r-s)):(s=e.clone().add(n+1,"months"),o=(t-r)/(s-r)),-(n+o)||0}be.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";be.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function M5(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function L5(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?id(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ts(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",id(n,"Z")):id(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function F5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+s+o)}function z5(e){e||(e=this.isUtc()?be.defaultFormatUtc:be.defaultFormat);var t=id(this,e);return this.localeData().postformat(t)}function $5(e,t){return this.isValid()&&(Rr(e)&&e.isValid()||Ct(e).isValid())?Dr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function U5(e){return this.from(Ct(),e)}function V5(e,t){return this.isValid()&&(Rr(e)&&e.isValid()||Ct(e).isValid())?Dr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function B5(e){return this.to(Ct(),e)}function JC(e){var t;return e===void 0?this._locale._abbr:(t=Fs(e),t!=null&&(this._locale=t),this)}var ej=ur("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 tj(){return this._locale}var Zd=1e3,ma=60*Zd,qd=60*ma,nj=(365*400+97)*24*qd;function ga(e,t){return(e%t+t)%t}function rj(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-nj:new Date(e,t,n).valueOf()}function sj(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-nj:Date.UTC(e,t,n)}function W5(e){var t,n;if(e=dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?sj:rj,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ga(t+(this._isUTC?0:this.utcOffset()*ma),qd);break;case"minute":t=this._d.valueOf(),t-=ga(t,ma);break;case"second":t=this._d.valueOf(),t-=ga(t,Zd);break}return this._d.setTime(t),be.updateOffset(this,!0),this}function H5(e){var t,n;if(e=dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?sj:rj,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=qd-ga(t+(this._isUTC?0:this.utcOffset()*ma),qd)-1;break;case"minute":t=this._d.valueOf(),t+=ma-ga(t,ma)-1;break;case"second":t=this._d.valueOf(),t+=Zd-ga(t,Zd)-1;break}return this._d.setTime(t),be.updateOffset(this,!0),this}function Y5(){return this._d.valueOf()-(this._offset||0)*6e4}function K5(){return Math.floor(this.valueOf()/1e3)}function G5(){return new Date(this.valueOf())}function Z5(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function q5(){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 X5(){return this.isValid()?this.toISOString():null}function Q5(){return fv(this)}function J5(){return ao({},Xe(this))}function ez(){return Xe(this).overflow}function tz(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Me("N",0,0,"eraAbbr");Me("NN",0,0,"eraAbbr");Me("NNN",0,0,"eraAbbr");Me("NNNN",0,0,"eraName");Me("NNNNN",0,0,"eraNarrow");Me("y",["y",1],"yo","eraYear");Me("y",["yy",2],0,"eraYear");Me("y",["yyy",3],0,"eraYear");Me("y",["yyyy",4],0,"eraYear");je("N",Rv);je("NN",Rv);je("NNN",Rv);je("NNNN",fz);je("NNNNN",hz);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Xe(n).era=s:Xe(n).invalidEra=e});je("y",Ha);je("yy",Ha);je("yyy",Ha);je("yyyy",Ha);je("yo",pz);vt(["y","yy","yyy","yyyy"],dn);vt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[dn]=n._locale.eraYearOrdinalParse(e,s):t[dn]=parseInt(e,10)});function nz(e,t){var n,r,s,o=this._eras||Fs("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":s=be(o[n].since).startOf("day"),o[n].since=s.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=be(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf();break}}return o}function rz(e,t,n){var r,s,o=this.eras(),i,a,c;for(e=e.toUpperCase(),r=0,s=o.length;r<s;++r)if(i=o[r].name.toUpperCase(),a=o[r].abbr.toUpperCase(),c=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return o[r];break;case"NNNN":if(i===e)return o[r];break;case"NNNNN":if(c===e)return o[r];break}else if([i,a,c].indexOf(e)>=0)return o[r]}function sz(e,t){var n=e.since<=e.until?1:-1;return t===void 0?be(e.since).year():be(e.since).year()+(t-e.offset)*n}function oz(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function iz(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function az(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function lz(){var e,t,n,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return(this.year()-be(s[e].since).year())*n+s[e].offset;return this.year()}function cz(e){return ut(this,"_erasNameRegex")||Pv.call(this),e?this._erasNameRegex:this._erasRegex}function uz(e){return ut(this,"_erasAbbrRegex")||Pv.call(this),e?this._erasAbbrRegex:this._erasRegex}function dz(e){return ut(this,"_erasNarrowRegex")||Pv.call(this),e?this._erasNarrowRegex:this._erasRegex}function Rv(e,t){return t.erasAbbrRegex(e)}function fz(e,t){return t.erasNameRegex(e)}function hz(e,t){return t.erasNarrowRegex(e)}function pz(e,t){return t._eraYearOrdinalRegex||Ha}function Pv(){var e=[],t=[],n=[],r=[],s,o,i,a,c,u=this.eras();for(s=0,o=u.length;s<o;++s)i=bs(u[s].name),a=bs(u[s].abbr),c=bs(u[s].narrow),t.push(i),e.push(a),n.push(c),r.push(i),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Me(0,["gg",2],0,function(){return this.weekYear()%100});Me(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ch(e,t){Me(0,[e,e.length],0,t)}ch("gggg","weekYear");ch("ggggg","weekYear");ch("GGGG","isoWeekYear");ch("GGGGG","isoWeekYear");je("G",sh);je("g",sh);je("GG",jt,Qn);je("gg",jt,Qn);je("GGGG",vv,yv);je("gggg",vv,yv);je("GGGGG",rh,th);je("ggggg",rh,th);qc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=nt(e)});qc(["gg","GG"],function(e,t,n,r){t[r]=be.parseTwoDigitYear(e)});function mz(e){return oj.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function gz(e){return oj.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function yz(){return _s(this.year(),1,4)}function vz(){return _s(this.isoWeekYear(),1,4)}function xz(){var e=this.localeData()._week;return _s(this.year(),e.dow,e.doy)}function wz(){var e=this.localeData()._week;return _s(this.weekYear(),e.dow,e.doy)}function oj(e,t,n,r,s){var o;return e==null?mc(this,r,s).year:(o=_s(e,r,s),t>o&&(t=o),bz.call(this,e,t,n,r,s))}function bz(e,t,n,r,s){var o=FC(e,t,n,r,s),i=pc(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Me("Q",0,"Qo","quarter");je("Q",EC);vt("Q",function(e,t){t[ys]=(nt(e)-1)*3});function _z(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Me("D",["DD",2],"Do","date");je("D",jt,Ya);je("DD",jt,Qn);je("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Vr);vt("Do",function(e,t){t[Vr]=nt(e.match(jt)[0])});var ij=Ka("Date",!0);Me("DDD",["DDDD",3],"DDDo","dayOfYear");je("DDD",nh);je("DDDD",NC);vt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=nt(e)});function Sz(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Me("m",["mm",2],0,"minute");je("m",jt,xv);je("mm",jt,Qn);vt(["m","mm"],br);var kz=Ka("Minutes",!1);Me("s",["ss",2],0,"second");je("s",jt,xv);je("ss",jt,Qn);vt(["s","ss"],vs);var Cz=Ka("Seconds",!1);Me("S",0,0,function(){return~~(this.millisecond()/100)});Me(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Me(0,["SSS",3],0,"millisecond");Me(0,["SSSS",4],0,function(){return this.millisecond()*10});Me(0,["SSSSS",5],0,function(){return this.millisecond()*100});Me(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Me(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Me(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Me(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});je("S",nh,EC);je("SS",nh,Qn);je("SSS",nh,NC);var lo,aj;for(lo="SSSS";lo.length<=9;lo+="S")je(lo,Ha);function jz(e,t){t[Zo]=nt(("0."+e)*1e3)}for(lo="S";lo.length<=9;lo+="S")vt(lo,jz);aj=Ka("Milliseconds",!1);Me("z",0,0,"zoneAbbr");Me("zz",0,0,"zoneName");function Ez(){return this._isUTC?"UTC":""}function Nz(){return this._isUTC?"Coordinated Universal Time":""}var le=Gc.prototype;le.add=w5;le.calendar=E5;le.clone=N5;le.diff=I5;le.endOf=H5;le.format=z5;le.from=$5;le.fromNow=U5;le.to=V5;le.toNow=B5;le.get=F4;le.invalidAt=ez;le.isAfter=T5;le.isBefore=R5;le.isBetween=P5;le.isSame=A5;le.isSameOrAfter=O5;le.isSameOrBefore=D5;le.isValid=Q5;le.lang=ej;le.locale=JC;le.localeData=tj;le.max=Q3;le.min=X3;le.parsingFlags=J5;le.set=z4;le.startOf=W5;le.subtract=b5;le.toArray=Z5;le.toObject=q5;le.toDate=G5;le.toISOString=L5;le.inspect=F5;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=X5;le.toString=M5;le.unix=K5;le.valueOf=Y5;le.creationData=tz;le.eraName=oz;le.eraNarrow=iz;le.eraAbbr=az;le.eraYear=lz;le.year=PC;le.isLeapYear=L4;le.weekYear=mz;le.isoWeekYear=gz;le.quarter=le.quarters=_z;le.month=MC;le.daysInMonth=G4;le.week=le.weeks=n3;le.isoWeek=le.isoWeeks=r3;le.weeksInYear=xz;le.weeksInWeekYear=wz;le.isoWeeksInYear=yz;le.isoWeeksInISOWeekYear=vz;le.date=ij;le.day=le.days=g3;le.weekday=y3;le.isoWeekday=v3;le.dayOfYear=Sz;le.hour=le.hours=C3;le.minute=le.minutes=kz;le.second=le.seconds=Cz;le.millisecond=le.milliseconds=aj;le.utcOffset=a5;le.utc=c5;le.local=u5;le.parseZone=d5;le.hasAlignedHourOffset=f5;le.isDST=h5;le.isLocal=m5;le.isUtcOffset=g5;le.isUtc=ZC;le.isUTC=ZC;le.zoneAbbr=Ez;le.zoneName=Nz;le.dates=ur("dates accessor is deprecated. Use date instead.",ij);le.months=ur("months accessor is deprecated. Use month instead",MC);le.years=ur("years accessor is deprecated. Use year instead",PC);le.zone=ur("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",l5);le.isDSTShifted=ur("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",p5);function Tz(e){return Ct(e*1e3)}function Rz(){return Ct.apply(null,arguments).parseZone()}function lj(e){return e}var dt=pv.prototype;dt.calendar=m4;dt.longDateFormat=x4;dt.invalidDate=b4;dt.ordinal=k4;dt.preparse=lj;dt.postformat=lj;dt.relativeTime=j4;dt.pastFuture=E4;dt.set=h4;dt.eras=nz;dt.erasParse=rz;dt.erasConvertYear=sz;dt.erasAbbrRegex=uz;dt.erasNameRegex=cz;dt.erasNarrowRegex=dz;dt.months=W4;dt.monthsShort=H4;dt.monthsParse=K4;dt.monthsRegex=q4;dt.monthsShortRegex=Z4;dt.week=Q4;dt.firstDayOfYear=t3;dt.firstDayOfWeek=e3;dt.weekdays=d3;dt.weekdaysMin=h3;dt.weekdaysShort=f3;dt.weekdaysParse=m3;dt.weekdaysRegex=x3;dt.weekdaysShortRegex=w3;dt.weekdaysMinRegex=b3;dt.isPM=S3;dt.meridiem=j3;function Xd(e,t,n,r){var s=Fs(),o=es().set(r,t);return s[n](o,e)}function cj(e,t,n){if(Rs(e)&&(t=e,e=void 0),e=e||"",t!=null)return Xd(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=Xd(e,r,n,"month");return s}function Av(e,t,n,r){typeof e=="boolean"?(Rs(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Rs(t)&&(n=t,t=void 0),t=t||"");var s=Fs(),o=e?s._week.dow:0,i,a=[];if(n!=null)return Xd(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=Xd(t,(i+o)%7,r,"day");return a}function Pz(e,t){return cj(e,t,"months")}function Az(e,t){return cj(e,t,"monthsShort")}function Oz(e,t,n){return Av(e,t,n,"weekdays")}function Dz(e,t,n){return Av(e,t,n,"weekdaysShort")}function Iz(e,t,n){return Av(e,t,n,"weekdaysMin")}xo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=nt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});be.lang=ur("moment.lang is deprecated. Use moment.locale instead.",xo);be.langData=ur("moment.langData is deprecated. Use moment.localeData instead.",Fs);var ls=Math.abs;function Mz(){var e=this._data;return this._milliseconds=ls(this._milliseconds),this._days=ls(this._days),this._months=ls(this._months),e.milliseconds=ls(e.milliseconds),e.seconds=ls(e.seconds),e.minutes=ls(e.minutes),e.hours=ls(e.hours),e.months=ls(e.months),e.years=ls(e.years),this}function uj(e,t,n,r){var s=Dr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function Lz(e,t){return uj(this,e,t,1)}function Fz(e,t){return uj(this,e,t,-1)}function Yw(e){return e<0?Math.floor(e):Math.ceil(e)}function zz(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,a,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Yw(Jm(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=rr(e/1e3),r.seconds=s%60,o=rr(s/60),r.minutes=o%60,i=rr(o/60),r.hours=i%24,t+=rr(i/24),c=rr(dj(t)),n+=c,t-=Yw(Jm(c)),a=rr(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function dj(e){return e*4800/146097}function Jm(e){return e*146097/4800}function $z(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=dr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+dj(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Jm(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function zs(e){return function(){return this.as(e)}}var fj=zs("ms"),Uz=zs("s"),Vz=zs("m"),Bz=zs("h"),Wz=zs("d"),Hz=zs("w"),Yz=zs("M"),Kz=zs("Q"),Gz=zs("y"),Zz=fj;function qz(){return Dr(this)}function Xz(e){return e=dr(e),this.isValid()?this[e+"s"]():NaN}function _i(e){return function(){return this.isValid()?this._data[e]:NaN}}var Qz=_i("milliseconds"),Jz=_i("seconds"),e6=_i("minutes"),t6=_i("hours"),n6=_i("days"),r6=_i("months"),s6=_i("years");function o6(){return rr(this.days()/7)}var fs=Math.round,ea={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function i6(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function a6(e,t,n,r){var s=Dr(e).abs(),o=fs(s.as("s")),i=fs(s.as("m")),a=fs(s.as("h")),c=fs(s.as("d")),u=fs(s.as("M")),d=fs(s.as("w")),f=fs(s.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||i<=1&&["m"]||i<n.m&&["mm",i]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=t,h[3]=+e>0,h[4]=r,i6.apply(null,h)}function l6(e){return e===void 0?fs:typeof e=="function"?(fs=e,!0):!1}function c6(e,t){return ea[e]===void 0?!1:t===void 0?ea[e]:(ea[e]=t,e==="s"&&(ea.ss=t-1),!0)}function u6(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ea,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ea,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=a6(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var Pp=Math.abs;function Oi(e){return(e>0)-(e<0)||+e}function uh(){if(!this.isValid())return this.localeData().invalidDate();var e=Pp(this._milliseconds)/1e3,t=Pp(this._days),n=Pp(this._months),r,s,o,i,a=this.asSeconds(),c,u,d,f;return a?(r=rr(e/60),s=rr(r/60),e%=60,r%=60,o=rr(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Oi(this._months)!==Oi(a)?"-":"",d=Oi(this._days)!==Oi(a)?"-":"",f=Oi(this._milliseconds)!==Oi(a)?"-":"",c+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var it=lh.prototype;it.isValid=r5;it.abs=Mz;it.add=Lz;it.subtract=Fz;it.as=$z;it.asMilliseconds=fj;it.asSeconds=Uz;it.asMinutes=Vz;it.asHours=Bz;it.asDays=Wz;it.asWeeks=Hz;it.asMonths=Yz;it.asQuarters=Kz;it.asYears=Gz;it.valueOf=Zz;it._bubble=zz;it.clone=qz;it.get=Xz;it.milliseconds=Qz;it.seconds=Jz;it.minutes=e6;it.hours=t6;it.days=n6;it.weeks=o6;it.months=r6;it.years=s6;it.humanize=u6;it.toISOString=uh;it.toString=uh;it.toJSON=uh;it.locale=JC;it.localeData=tj;it.toIsoString=ur("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",uh);it.lang=ej;Me("X",0,0,"unix");Me("x",0,0,"valueOf");je("x",sh);je("X",P4);vt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,n){n._d=new Date(nt(e))});//! moment.js
be.version="2.30.1";d4(Ct);be.fn=le;be.min=J3;be.max=e5;be.now=t5;be.utc=es;be.unix=Tz;be.months=Pz;be.isDate=Kc;be.locale=xo;be.invalid=eh;be.duration=Dr;be.isMoment=Rr;be.weekdays=Oz;be.parseZone=Rz;be.localeData=Fs;be.isDuration=ad;be.monthsShort=Az;be.weekdaysMin=Iz;be.defineLocale=kv;be.updateLocale=R3;be.locales=P3;be.weekdaysShort=Dz;be.normalizeUnits=dr;be.relativeTimeRounding=l6;be.relativeTimeThreshold=c6;be.calendarFormat=j5;be.prototype=le;be.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 d6=async()=>await st().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),$s=async e=>e.id?await st().collection("access").update(e.id,e):await st().collection("access").create(e),f6=async e=>(e.deleted=be.utc().format("YYYY-MM-DD HH:mm:ss"),await st().collection("access").update(e.id,e)),Kw=async()=>await st().collection("access_groups").getFullList({sort:"-created",expand:"access"}),h6=async e=>{const t=st();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)},p6=async e=>{const t=st();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Gw=async e=>await st().collection("access_groups").update(e.id,e),m6=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};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}},g6=async()=>{try{return await st().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},Ov=async e=>{try{return await st().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},Ga=async e=>{const t=st();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},hj=v.createContext({}),In=()=>v.useContext(hj),y6=({children:e})=>{const[t,n]=v.useReducer(m6,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});v.useEffect(()=>{(async()=>{const d=await d6();n({type:"SET_ACCESSES",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await g6();n({type:"SET_EMAILS",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await Kw();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=v.useCallback(async()=>{const u=await Kw();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=v.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),o=v.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),i=v.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=v.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=v.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(hj.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})},v6={theme:"system",setTheme:()=>null},pj=v.createContext(v6);function x6({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,o]=v.useState(()=>localStorage.getItem(n)||t);v.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(c);return}a.classList.add(s)},[s]);const i={theme:s,setTheme:a=>{localStorage.setItem(n,a),o(a)}};return l.jsx(pj.Provider,{...r,value:i,children:e})}const w6=()=>{const e=v.useContext(pj);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function b6(){const{setTheme:e}=w6(),{t}=ct();return l.jsxs(Xy,{children:[l.jsx(Qy,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(VO,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(zO,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsxs(Xf,{align:"end",children:[l.jsx(ei,{onClick:()=>e("light"),children:t("theme.light")}),l.jsx(ei,{onClick:()=>e("dark"),children:t("theme.dark")}),l.jsx(ei,{onClick:()=>e("system"),children:t("theme.system")})]})]})}function _6(){const{i18n:e}=ct();return l.jsxs(Xy,{children:[l.jsx(Qy,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(IO,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(Xf,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(ei,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}var S6="Separator",Zw="horizontal",k6=["horizontal","vertical"],mj=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=Zw,...s}=e,o=C6(r)?r:Zw,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return l.jsx(Re.div,{"data-orientation":o,...a,...s,ref:t})});mj.displayName=S6;function C6(e){return k6.includes(e)}var gj=mj;const xr=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(gj,{ref:s,decorative:n,orientation:t,className:oe("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));xr.displayName=gj.displayName;const j6="Certimate v0.1.15",yj=()=>{const{t:e}=ct();return l.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[l.jsx("div",{className:""}),l.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[l.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[l.jsx(jO,{size:16}),l.jsx("div",{className:"ml-1",children:e("document")})]}),l.jsx(xr,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:j6})]})]})};function E6(){const e=Dn(),t=Ar(),{t:n}=ct();if(!st().authStore.isValid||!st().authStore.isAdmin)return l.jsx(sS,{to:"/login"});const r=t.pathname,s=a=>(console.log(r),a==r?"bg-muted text-primary":"text-muted-foreground"),o=()=>{st().authStore.clear(),e("/login")},i=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(y6,{children:l.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[l.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:l.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[l.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:l.jsxs(xn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),l.jsx("div",{className:"flex-1",children:l.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[l.jsxs(xn,{to:"/",className:oe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(iw,{className:"h-4 w-4"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:oe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx(Lm,{className:"h-4 w-4"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:oe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(aw,{className:"h-4 w-4"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:oe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(ow,{className:"h-4 w-4"}),n("deployment.log.name")]})]})})]})}),l.jsxs("div",{className:"flex flex-col",children:[l.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:[l.jsxs(iv,{children:[l.jsx(av,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx(FO,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(Jf,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(xn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"}),l.jsx("span",{className:"sr-only",children:"Certimate"})]}),l.jsxs(xn,{to:"/",className:oe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(iw,{className:"h-5 w-5"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:oe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx(Lm,{className:"h-5 w-5"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:oe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(aw,{className:"h-5 w-5"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:oe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(ow,{className:"h-5 w-5"}),n("deployment.log.name")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(b6,{}),l.jsx(_6,{}),l.jsxs(Xy,{children:[l.jsx(Qy,{asChild:!0,children:l.jsxs(Ue,{variant:"secondary",size:"icon",className:"rounded-full",children:[l.jsx(PO,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),l.jsxs(Xf,{align:"end",children:[l.jsx(Qk,{children:n("account")}),l.jsx(Jk,{}),l.jsx(ei,{onClick:i,children:n("setting")}),l.jsx(ei,{onClick:o,children:n("logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(xy,{}),l.jsx(yj,{})]})]})]})})})}const Dv=({phase:e,phaseSuccess:t})=>{const{t:n}=ct();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:oe("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("deploy.progress.check")}),l.jsx(xr,{className:oe("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:oe("text-xs text-nowrap",r<2?"text-muted-foreground":"",r===2?t?"text-green-600":"text-red-600":"",r>2?"text-green-600":""),children:n("deploy.progress.apply")}),l.jsx(xr,{className:oe("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:oe("text-xs text-nowrap",r<3?"text-muted-foreground":"",r===3?t?"text-green-600":"text-red-600":"",r>3?"text-green-600":""),children:n("deploy.progress.deploy")})]})};var N6="VisuallyHidden",Xc=v.forwardRef((e,t)=>l.jsx(Re.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}}));Xc.displayName=N6;var T6=Xc,[dh,EH]=on("Tooltip",[Ba]),fh=Ba(),vj="TooltipProvider",R6=700,eg="tooltip.open",[P6,Iv]=dh(vj),Mv=e=>{const{__scopeTooltip:t,delayDuration:n=R6,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=v.useState(!0),c=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(P6,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};Mv.displayName=vj;var hh="Tooltip",[A6,ph]=dh(hh),xj=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,c=Iv(hh,e.__scopeTooltip),u=fh(t),[d,f]=v.useState(null),h=Wn(),y=v.useRef(0),x=i??c.disableHoverableContent,g=a??c.delayDuration,w=v.useRef(!1),[m=!1,p]=Zn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(eg))):c.onClose(),o==null||o(T)}}),b=v.useMemo(()=>m?w.current?"delayed-open":"instant-open":"closed",[m]),_=v.useCallback(()=>{window.clearTimeout(y.current),w.current=!1,p(!0)},[p]),C=v.useCallback(()=>{window.clearTimeout(y.current),p(!1)},[p]),j=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{w.current=!0,p(!0)},g)},[g,p]);return v.useEffect(()=>()=>window.clearTimeout(y.current),[]),l.jsx(My,{...u,children:l.jsx(A6,{scope:t,contentId:h,open:m,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:v.useCallback(()=>{x?C():window.clearTimeout(y.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};xj.displayName=hh;var tg="TooltipTrigger",wj=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ph(tg,n),o=Iv(tg,n),i=fh(n),a=v.useRef(null),c=Ke(t,a,s.onTriggerChange),u=v.useRef(!1),d=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(Ly,{asChild:!0,...i,children:l.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});wj.displayName=tg;var O6="TooltipPortal",[NH,D6]=dh(O6,{forceMount:void 0}),Na="TooltipContent",Lv=v.forwardRef((e,t)=>{const n=D6(Na,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=ph(Na,e.__scopeTooltip);return l.jsx(an,{present:r||i.open,children:i.disableHoverableContent?l.jsx(bj,{side:s,...o,ref:t}):l.jsx(I6,{side:s,...o,ref:t})})}),I6=v.forwardRef((e,t)=>{const n=ph(Na,e.__scopeTooltip),r=Iv(Na,e.__scopeTooltip),s=v.useRef(null),o=Ke(t,s),[i,a]=v.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=v.useCallback(()=>{a(null),f(!1)},[f]),y=v.useCallback((x,g)=>{const w=x.currentTarget,m={x:x.clientX,y:x.clientY},p=z6(m,w.getBoundingClientRect()),b=$6(m,p),_=U6(g.getBoundingClientRect()),C=B6([...b,..._]);a(C),f(!0)},[f]);return v.useEffect(()=>()=>h(),[h]),v.useEffect(()=>{if(c&&d){const x=w=>y(w,d),g=w=>y(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[c,d,y,h]),v.useEffect(()=>{if(i){const x=g=>{const w=g.target,m={x:g.clientX,y:g.clientY},p=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!V6(m,i);p?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,h]),l.jsx(bj,{...e,ref:o})}),[M6,L6]=dh(hh,{isInside:!1}),bj=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,c=ph(Na,n),u=fh(n),{onClose:d}=c;return v.useEffect(()=>(document.addEventListener(eg,d),()=>document.removeEventListener(eg,d)),[d]),v.useEffect(()=>{if(c.trigger){const f=h=>{const y=h.target;y!=null&&y.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx($a,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Fy,{"data-state":c.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:[l.jsx(Sy,{children:r}),l.jsx(M6,{scope:n,isInside:!0,children:l.jsx(T6,{id:c.contentId,role:"tooltip",children:s||r})})]})})});Lv.displayName=Na;var _j="TooltipArrow",F6=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=fh(n);return L6(_j,n).isInside?null:l.jsx(zy,{...s,...r,ref:t})});F6.displayName=_j;function z6(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function $6(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function U6(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function V6(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function B6(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),W6(t)}function W6(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var H6=Mv,Y6=xj,K6=wj,Sj=Lv;const G6=H6,kj=Y6,Cj=K6,jj=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(Sj,{ref:r,sideOffset:t,className:oe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));jj.displayName=Sj.displayName;const Fv=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return l.jsx(l.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?l.jsx(RO,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(G6,{children:l.jsxs(kj,{children:[l.jsx(Cj,{asChild:!0,className:"cursor-pointer",children:l.jsx(rw,{size:16,className:"text-red-700"})}),l.jsx(jj,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx(rw,{size:16,className:"text-red-700"})})})},Ej=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:oe("mx-auto flex w-full justify-center",e),...t});Ej.displayName="Pagination";const Nj=v.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:oe("flex flex-row items-center gap-1",e),...t}));Nj.displayName="PaginationContent";const ng=v.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:oe("",e),...t}));ng.displayName="PaginationItem";const Tj=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:oe(Vf({variant:t?"outline":"ghost",size:n}),e),...r});Tj.displayName="PaginationLink";const Rj=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:oe("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(AO,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});Rj.displayName="PaginationEllipsis";const Pj=({totalPages:e,currentPage:t,onPageChange:n})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),h=e-1;return u=o(d,f),t>3&&u.unshift("..."),t<h-1&&u.push("..."),u.unshift(1),u.push(e),u}return o(1,e)},o=(a,c,u=1)=>{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return l.jsx(l.Fragment,{children:l.jsx(Ej,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(Nj,{children:i.map((a,c)=>a==="..."?l.jsx(ng,{children:l.jsx(Rj,{})},c):l.jsx(ng,{children:l.jsx(Tj,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})},ya=({when:e,children:t,fallback:n})=>e?t:n;var Aj="AlertDialog",[Z6,TH]=on(Aj,[tC]),Us=tC(),Oj=e=>{const{__scopeAlertDialog:t,...n}=e,r=Us(t);return l.jsx(rv,{...r,...n,modal:!0})};Oj.displayName=Aj;var q6="AlertDialogTrigger",Dj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Us(n);return l.jsx(sv,{...s,...r,ref:t})});Dj.displayName=q6;var X6="AlertDialogPortal",Ij=e=>{const{__scopeAlertDialog:t,...n}=e,r=Us(t);return l.jsx(ov,{...r,...n})};Ij.displayName=X6;var Q6="AlertDialogOverlay",Mj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Us(n);return l.jsx(Bc,{...s,...r,ref:t})});Mj.displayName=Q6;var va="AlertDialogContent",[J6,e$]=Z6(va),Lj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=Us(n),i=v.useRef(null),a=Ke(t,i),c=v.useRef(null);return l.jsx(UF,{contentName:va,titleName:Fj,docsSlug:"alert-dialog",children:l.jsx(J6,{scope:n,cancelRef:c,children:l.jsxs(Wc,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(Sy,{children:r}),l.jsx(n$,{contentRef:i})]})})})});Lj.displayName=va;var Fj="AlertDialogTitle",zj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Us(n);return l.jsx(Hc,{...s,...r,ref:t})});zj.displayName=Fj;var $j="AlertDialogDescription",Uj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Us(n);return l.jsx(Yc,{...s,...r,ref:t})});Uj.displayName=$j;var t$="AlertDialogAction",Vj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Us(n);return l.jsx(Qf,{...s,...r,ref:t})});Vj.displayName=t$;var Bj="AlertDialogCancel",Wj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=e$(Bj,n),o=Us(n),i=Ke(t,s);return l.jsx(Qf,{...o,...r,ref:i})});Wj.displayName=Bj;var n$=({contentRef:e})=>{const t=`\`${va}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${va}\` by passing a \`${$j}\` 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 \`${va}\`. 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 v.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},r$=Oj,s$=Dj,o$=Ij,Hj=Mj,Yj=Lj,Kj=Vj,Gj=Wj,Zj=zj,qj=Uj;const zv=r$,$v=s$,i$=o$,Xj=v.forwardRef(({className:e,...t},n)=>l.jsx(Hj,{className:oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Xj.displayName=Hj.displayName;const mh=v.forwardRef(({className:e,...t},n)=>l.jsxs(i$,{children:[l.jsx(Xj,{}),l.jsx(Yj,{ref:n,className:oe("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})]}));mh.displayName=Yj.displayName;const gh=({className:e,...t})=>l.jsx("div",{className:oe("flex flex-col space-y-2 text-center sm:text-left",e),...t});gh.displayName="AlertDialogHeader";const yh=({className:e,...t})=>l.jsx("div",{className:oe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});yh.displayName="AlertDialogFooter";const vh=v.forwardRef(({className:e,...t},n)=>l.jsx(Zj,{ref:n,className:oe("text-lg font-semibold",e),...t}));vh.displayName=Zj.displayName;const xh=v.forwardRef(({className:e,...t},n)=>l.jsx(qj,{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));xh.displayName=qj.displayName;const wh=v.forwardRef(({className:e,...t},n)=>l.jsx(Kj,{ref:n,className:oe(Vf(),e),...t}));wh.displayName=Kj.displayName;const bh=v.forwardRef(({className:e,...t},n)=>l.jsx(Gj,{ref:n,className:oe(Vf({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));bh.displayName=Gj.displayName;function Uv(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Vv="Switch",[a$,RH]=on(Vv),[l$,c$]=a$(Vv),Qj=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:i,disabled:a,value:c="on",onCheckedChange:u,...d}=e,[f,h]=v.useState(null),y=Ke(t,p=>h(p)),x=v.useRef(!1),g=f?!!f.closest("form"):!0,[w=!1,m]=Zn({prop:s,defaultProp:o,onChange:u});return l.jsxs(l$,{scope:n,checked:w,disabled:a,children:[l.jsx(Re.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":tE(w),"data-disabled":a?"":void 0,disabled:a,value:c,...d,ref:y,onClick:ue(e.onClick,p=>{m(b=>!b),g&&(x.current=p.isPropagationStopped(),x.current||p.stopPropagation())})}),g&&l.jsx(u$,{control:f,bubbles:!x.current,name:r,value:c,checked:w,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});Qj.displayName=Vv;var Jj="SwitchThumb",eE=v.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=c$(Jj,n);return l.jsx(Re.span,{"data-state":tE(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});eE.displayName=Jj;var u$=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=v.useRef(null),i=Uv(n),a=Oy(t);return v.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function tE(e){return e?"checked":"unchecked"}var nE=Qj,d$=eE;const Qc=v.forwardRef(({className:e,...t},n)=>l.jsx(nE,{className:oe("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:l.jsx(d$,{className:oe("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")})}));Qc.displayName=nE.displayName;var Bv="ToastProvider",[Wv,f$,h$]=Fc("Toast"),[rE,PH]=on("Toast",[h$]),[p$,_h]=rE(Bv),sE=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,c]=v.useState(null),[u,d]=v.useState(0),f=v.useRef(!1),h=v.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Bv}\`. Expected non-empty \`string\`.`),l.jsx(Wv.Provider,{scope:t,children:l.jsx(p$,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:v.useCallback(()=>d(y=>y+1),[]),onToastRemove:v.useCallback(()=>d(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};sE.displayName=Bv;var oE="ToastViewport",m$=["F8"],rg="toast.viewportPause",sg="toast.viewportResume",iE=v.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=m$,label:s="Notifications ({hotkey})",...o}=e,i=_h(oE,n),a=f$(n),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),h=Ke(t,f,i.onViewportChange),y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;v.useEffect(()=>{const w=m=>{var b;r.every(_=>m[_]||m.code===_)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),v.useEffect(()=>{const w=c.current,m=f.current;if(x&&w&&m){const p=()=>{if(!i.isClosePausedRef.current){const j=new CustomEvent(rg);m.dispatchEvent(j),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const j=new CustomEvent(sg);m.dispatchEvent(j),i.isClosePausedRef.current=!1}},_=j=>{!w.contains(j.relatedTarget)&&b()},C=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",p),w.addEventListener("focusout",_),w.addEventListener("pointermove",p),w.addEventListener("pointerleave",C),window.addEventListener("blur",p),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",p),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",p),w.removeEventListener("pointerleave",C),window.removeEventListener("blur",p),window.removeEventListener("focus",b)}}},[x,i.isClosePausedRef]);const g=v.useCallback(({tabbingDirection:w})=>{const p=a().map(b=>{const _=b.ref.current,C=[_,...N$(_)];return w==="forwards"?C:C.reverse()});return(w==="forwards"?p.reverse():p).flat()},[a]);return v.useEffect(()=>{const w=f.current;if(w){const m=p=>{var C,j,T;const b=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!b){const P=document.activeElement,A=p.shiftKey;if(p.target===w&&A){(C=u.current)==null||C.focus();return}const N=g({tabbingDirection:A?"backwards":"forwards"}),F=N.findIndex(S=>S===P);Ap(N.slice(F+1))?p.preventDefault():A?(j=u.current)==null||j.focus():(T=d.current)==null||T.focus()}};return w.addEventListener("keydown",m),()=>w.removeEventListener("keydown",m)}},[a,g]),l.jsxs(uI,{ref:c,role:"region","aria-label":s.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&l.jsx(og,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});Ap(w)}}),l.jsx(Wv.Slot,{scope:n,children:l.jsx(Re.ol,{tabIndex:-1,...o,ref:h})}),x&&l.jsx(og,{ref:d,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});Ap(w)}})]})});iE.displayName=oE;var aE="ToastFocusProxy",og=v.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=_h(aE,n);return l.jsx(Xc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&r()}})});og.displayName=aE;var Sh="Toast",g$="toast.swipeStart",y$="toast.swipeMove",v$="toast.swipeCancel",x$="toast.swipeEnd",lE=v.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,c]=Zn({prop:r,defaultProp:s,onChange:o});return l.jsx(an,{present:n||a,children:l.jsx(_$,{open:a,...i,ref:t,onClose:()=>c(!1),onPause:It(e.onPause),onResume:It(e.onResume),onSwipeStart:ue(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ue(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});lE.displayName=Sh;var[w$,b$]=rE(Sh,{onClose(){}}),_$=v.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:y,...x}=e,g=_h(Sh,n),[w,m]=v.useState(null),p=Ke(t,S=>m(S)),b=v.useRef(null),_=v.useRef(null),C=s||g.duration,j=v.useRef(0),T=v.useRef(C),P=v.useRef(0),{onToastAdd:A,onToastRemove:D}=g,G=It(()=>{var U;(w==null?void 0:w.contains(document.activeElement))&&((U=g.viewport)==null||U.focus()),i()}),N=v.useCallback(S=>{!S||S===1/0||(window.clearTimeout(P.current),j.current=new Date().getTime(),P.current=window.setTimeout(G,S))},[G]);v.useEffect(()=>{const S=g.viewport;if(S){const U=()=>{N(T.current),u==null||u()},J=()=>{const z=new Date().getTime()-j.current;T.current=T.current-z,window.clearTimeout(P.current),c==null||c()};return S.addEventListener(rg,J),S.addEventListener(sg,U),()=>{S.removeEventListener(rg,J),S.removeEventListener(sg,U)}}},[g.viewport,C,c,u,N]),v.useEffect(()=>{o&&!g.isClosePausedRef.current&&N(C)},[o,C,g.isClosePausedRef,N]),v.useEffect(()=>(A(),()=>D()),[A,D]);const F=v.useMemo(()=>w?mE(w):null,[w]);return g.viewport?l.jsxs(l.Fragment,{children:[F&&l.jsx(S$,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),l.jsx(w$,{scope:n,onClose:G,children:Ds.createPortal(l.jsx(Wv.ItemSlot,{scope:n,children:l.jsx(cI,{asChild:!0,onEscapeKeyDown:ue(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||G(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Re.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...x,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,S=>{S.key==="Escape"&&(a==null||a(S.nativeEvent),S.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:ue(e.onPointerDown,S=>{S.button===0&&(b.current={x:S.clientX,y:S.clientY})}),onPointerMove:ue(e.onPointerMove,S=>{if(!b.current)return;const U=S.clientX-b.current.x,J=S.clientY-b.current.y,z=!!_.current,W=["left","right"].includes(g.swipeDirection),I=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,X=W?I(0,U):0,$=W?0:I(0,J),B=S.pointerType==="touch"?10:2,he={x:X,y:$},re={originalEvent:S,delta:he};z?(_.current=he,Fu(y$,f,re,{discrete:!1})):qw(he,g.swipeDirection,B)?(_.current=he,Fu(g$,d,re,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs(U)>B||Math.abs(J)>B)&&(b.current=null)}),onPointerUp:ue(e.onPointerUp,S=>{const U=_.current,J=S.target;if(J.hasPointerCapture(S.pointerId)&&J.releasePointerCapture(S.pointerId),_.current=null,b.current=null,U){const z=S.currentTarget,W={originalEvent:S,delta:U};qw(U,g.swipeDirection,g.swipeThreshold)?Fu(x$,y,W,{discrete:!0}):Fu(v$,h,W,{discrete:!0}),z.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),S$=e=>{const{__scopeToast:t,children:n,...r}=e,s=_h(Sh,t),[o,i]=v.useState(!1),[a,c]=v.useState(!1);return j$(()=>i(!0)),v.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:l.jsx($c,{asChild:!0,children:l.jsx(Xc,{...r,children:o&&l.jsxs(l.Fragment,{children:[s.label," ",n]})})})},k$="ToastTitle",cE=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Re.div,{...r,ref:t})});cE.displayName=k$;var C$="ToastDescription",uE=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Re.div,{...r,ref:t})});uE.displayName=C$;var dE="ToastAction",fE=v.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(pE,{altText:n,asChild:!0,children:l.jsx(Hv,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${dE}\`. Expected non-empty \`string\`.`),null)});fE.displayName=dE;var hE="ToastClose",Hv=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=b$(hE,n);return l.jsx(pE,{asChild:!0,children:l.jsx(Re.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,s.onClose)})})});Hv.displayName=hE;var pE=v.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return l.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function mE(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),E$(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...mE(r))}}),t}function Fu(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Cy(s,o):s.dispatchEvent(o)}var qw=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function j$(e=()=>{}){const t=It(e);en(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function E$(e){return e.nodeType===e.ELEMENT_NODE}function N$(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ap(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var T$=sE,gE=iE,yE=lE,vE=cE,xE=uE,wE=fE,bE=Hv;const R$=T$,_E=v.forwardRef(({className:e,...t},n)=>l.jsx(gE,{ref:n,className:oe("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}));_E.displayName=gE.displayName;const P$=Lc("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"}}),SE=v.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(yE,{ref:r,className:oe(P$({variant:t}),e),...n}));SE.displayName=yE.displayName;const A$=v.forwardRef(({className:e,...t},n)=>l.jsx(wE,{ref:n,className:oe("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}));A$.displayName=wE.displayName;const kE=v.forwardRef(({className:e,...t},n)=>l.jsx(bE,{ref:n,className:oe("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:l.jsx(by,{className:"h-4 w-4"})}));kE.displayName=bE.displayName;const CE=v.forwardRef(({className:e,...t},n)=>l.jsx(vE,{ref:n,className:oe("text-sm font-semibold",e),...t}));CE.displayName=vE.displayName;const jE=v.forwardRef(({className:e,...t},n)=>l.jsx(xE,{ref:n,className:oe("text-sm opacity-90",e),...t}));jE.displayName=xE.displayName;const O$=1,D$=1e6;let Op=0;function I$(){return Op=(Op+1)%Number.MAX_SAFE_INTEGER,Op.toString()}const Dp=new Map,Xw=e=>{if(Dp.has(e))return;const t=setTimeout(()=>{Dp.delete(e),zl({type:"REMOVE_TOAST",toastId:e})},D$);Dp.set(e,t)},M$=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,O$)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Xw(n):e.toasts.forEach(r=>{Xw(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},cd=[];let ud={toasts:[]};function zl(e){ud=M$(ud,e),cd.forEach(t=>{t(ud)})}function L$({...e}){const t=I$(),n=s=>zl({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>zl({type:"DISMISS_TOAST",toastId:t});return zl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Ir(){const[e,t]=v.useState(ud);return v.useEffect(()=>(cd.push(t),()=>{const n=cd.indexOf(t);n>-1&&cd.splice(n,1)}),[e]),{...e,toast:L$,dismiss:n=>zl({type:"DISMISS_TOAST",toastId:n})}}function Yv(){const{toasts:e}=Ir();return l.jsxs(R$,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return l.jsxs(SE,{...o,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(CE,{children:n}),r&&l.jsx(jE,{children:r})]}),s,l.jsx(kE,{})]},t)}),l.jsx(_E,{})]})}function zu(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 EE={exports:{}};/*!
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/(function(e,t){(function(n){e.exports=n()})(function(){return function n(r,s,o){function i(u,d){if(!s[u]){if(!r[u]){var f=typeof zu=="function"&&zu;if(!d&&f)return f(u,!0);if(a)return a(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var y=s[u]={exports:{}};r[u][0].call(y.exports,function(x){var g=r[u][1][x];return i(g||x)},y,y.exports,n,r,s,o)}return s[u].exports}for(var a=typeof zu=="function"&&zu,c=0;c<o.length;c++)i(o[c]);return i}({1:[function(n,r,s){var o=n("./utils"),i=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(c){for(var u,d,f,h,y,x,g,w=[],m=0,p=c.length,b=p,_=o.getTypeOf(c)!=="string";m<c.length;)b=p-m,f=_?(u=c[m++],d=m<p?c[m++]:0,m<p?c[m++]:0):(u=c.charCodeAt(m++),d=m<p?c.charCodeAt(m++):0,m<p?c.charCodeAt(m++):0),h=u>>2,y=(3&u)<<4|d>>4,x=1<b?(15&d)<<2|f>>6:64,g=2<b?63&f:64,w.push(a.charAt(h)+a.charAt(y)+a.charAt(x)+a.charAt(g));return w.join("")},s.decode=function(c){var u,d,f,h,y,x,g=0,w=0,m="data:";if(c.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");var p,b=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===a.charAt(64)&&b--,c.charAt(c.length-2)===a.charAt(64)&&b--,b%1!=0)throw new Error("Invalid base64 input, bad content length.");for(p=i.uint8array?new Uint8Array(0|b):new Array(0|b);g<c.length;)u=a.indexOf(c.charAt(g++))<<2|(h=a.indexOf(c.charAt(g++)))>>4,d=(15&h)<<4|(y=a.indexOf(c.charAt(g++)))>>2,f=(3&y)<<6|(x=a.indexOf(c.charAt(g++))),p[w++]=u,y!==64&&(p[w++]=d),x!==64&&(p[w++]=f);return p}},{"./support":30,"./utils":32}],2:[function(n,r,s){var o=n("./external"),i=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,h,y,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=h,this.compression=y,this.compressedContent=x}u.prototype={getContentWorker:function(){var d=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,h){return d.pipe(new a).pipe(new c("uncompressedSize")).pipe(f.compressWorker(h)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},r.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,s){var o=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,s){var o=n("./utils"),i=function(){for(var a,c=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;c[u]=a}return c}();r.exports=function(a,c){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(u,d,f,h){var y=i,x=h+f;u^=-1;for(var g=h;g<x;g++)u=u>>>8^y[255&(u^d[g])];return-1^u}(0|c,a,a.length,0):function(u,d,f,h){var y=i,x=h+f;u^=-1;for(var g=h;g<x;g++)u=u>>>8^y[255&(u^d.charCodeAt(g))];return-1^u}(0|c,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,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(n,r,s){var o=null;o=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:o}},{lie:37}],7:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=n("pako"),a=n("./utils"),c=n("./stream/GenericWorker"),u=o?"uint8array":"array";function d(f,h){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=h,this.meta={}}s.magic="\b\0",a.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,f.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(h){f.push({data:h,meta:f.meta})}},s.compressWorker=function(f){return new d("Deflate",f)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,s){function o(y,x){var g,w="";for(g=0;g<x;g++)w+=String.fromCharCode(255&y),y>>>=8;return w}function i(y,x,g,w,m,p){var b,_,C=y.file,j=y.compression,T=p!==u.utf8encode,P=a.transformTo("string",p(C.name)),A=a.transformTo("string",u.utf8encode(C.name)),D=C.comment,G=a.transformTo("string",p(D)),N=a.transformTo("string",u.utf8encode(D)),F=A.length!==C.name.length,S=N.length!==D.length,U="",J="",z="",W=C.dir,I=C.date,X={crc32:0,compressedSize:0,uncompressedSize:0};x&&!g||(X.crc32=y.crc32,X.compressedSize=y.compressedSize,X.uncompressedSize=y.uncompressedSize);var $=0;x&&($|=8),T||!F&&!S||($|=2048);var B=0,he=0;W&&(B|=16),m==="UNIX"?(he=798,B|=function(se,De){var pe=se;return se||(pe=De?16893:33204),(65535&pe)<<16}(C.unixPermissions,W)):(he=20,B|=function(se){return 63&(se||0)}(C.dosPermissions)),b=I.getUTCHours(),b<<=6,b|=I.getUTCMinutes(),b<<=5,b|=I.getUTCSeconds()/2,_=I.getUTCFullYear()-1980,_<<=4,_|=I.getUTCMonth()+1,_<<=5,_|=I.getUTCDate(),F&&(J=o(1,1)+o(d(P),4)+A,U+="up"+o(J.length,2)+J),S&&(z=o(1,1)+o(d(G),4)+N,U+="uc"+o(z.length,2)+z);var re="";return re+=`
\0`,re+=o($,2),re+=j.magic,re+=o(b,2),re+=o(_,2),re+=o(X.crc32,4),re+=o(X.compressedSize,4),re+=o(X.uncompressedSize,4),re+=o(P.length,2),re+=o(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+re+P+U,dirRecord:f.CENTRAL_FILE_HEADER+o(he,2)+re+o(G.length,2)+"\0\0\0\0"+o(B,4)+o(w,4)+P+U+G}}var a=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(y,x,g,w){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=g,this.encodeFileName=w,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,c),h.prototype.push=function(y){var x=y.meta.percent||0,g=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,c.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:g?(x+100*(g-w-1))/g:100}}))},h.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var x=this.streamFiles&&!y.file.dir;if(x){var g=i(y,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(y){this.accumulate=!1;var x=this.streamFiles&&!y.file.dir,g=i(y,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),x)this.push({data:function(w){return f.DATA_DESCRIPTOR+o(w.crc32,4)+o(w.compressedSize,4)+o(w.uncompressedSize,4)}(y),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var y=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var g=this.bytesWritten-y,w=function(m,p,b,_,C){var j=a.transformTo("string",C(_));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(m,2)+o(m,2)+o(p,4)+o(b,4)+o(j.length,2)+j}(this.dirRecords.length,g,y,this.zipComment,this.encodeFileName);this.push({data:w,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(y){this._sources.push(y);var x=this;return y.on("data",function(g){x.processChunk(g)}),y.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),y.on("error",function(g){x.error(g)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(y){var x=this._sources;if(!c.prototype.error.call(this,y))return!1;for(var g=0;g<x.length;g++)try{x[g].error(y)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var y=this._sources,x=0;x<y.length;x++)y[x].lock()},r.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,s){var o=n("../compressions"),i=n("./ZipFileWorker");s.generateWorker=function(a,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{a.forEach(function(h,y){f++;var x=function(p,b){var _=p||b,C=o[_];if(!C)throw new Error(_+" is not a valid compression method !");return C}(y.options.compression,c.compression),g=y.options.compressionOptions||c.compressionOptions||{},w=y.dir,m=y.date;y._compressWorker(x,g).withStreamInfo("file",{name:h,dir:w,date:m,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,s){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new o;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(o.prototype=n("./object")).loadAsync=n("./load"),o.support=n("./support"),o.defaults=n("./defaults"),o.version="3.10.1",o.loadAsync=function(i,a){return new o().loadAsync(i,a)},o.external=n("./external"),r.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,s){var o=n("./utils"),i=n("./external"),a=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new i.Promise(function(y,x){var g=h.decompressed.getContentWorker().pipe(new u);g.on("error",function(w){x(w)}).on("end",function(){g.streamInfo.crc32!==h.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}r.exports=function(h,y){var x=this;return y=o.extend(y||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(h)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",h,!0,y.optimizedBinaryString,y.base64).then(function(g){var w=new c(y);return w.load(g),w}).then(function(g){var w=[i.Promise.resolve(g)],m=g.files;if(y.checkCRC32)for(var p=0;p<m.length;p++)w.push(f(m[p]));return i.Promise.all(w)}).then(function(g){for(var w=g.shift(),m=w.files,p=0;p<m.length;p++){var b=m[p],_=b.fileNameStr,C=o.resolve(b.fileNameStr);x.file(C,b.decompressed,{binary:!0,optimizedBinaryString:!0,date:b.date,dir:b.dir,comment:b.fileCommentStr.length?b.fileCommentStr:null,unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions,createFolders:y.createFolders}),b.dir||(x.file(C).unsafeOriginalName=_)}return w.zipComment.length&&(x.comment=w.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,s){var o=n("../utils"),i=n("../stream/GenericWorker");function a(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}o.inherits(a,i),a.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,s){var o=n("readable-stream").Readable;function i(a,c,u){o.call(this,c),this._helper=a;var d=this;a.on("data",function(f,h){d.push(f)||d._helper.pause(),u&&u(h)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}n("../utils").inherits(i,o),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,s){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,i);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,i)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var i=new Buffer(o);return i.fill(0),i},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(n,r,s){function o(C,j,T){var P,A=a.getTypeOf(j),D=a.extend(T||{},d);D.date=D.date||new Date,D.compression!==null&&(D.compression=D.compression.toUpperCase()),typeof D.unixPermissions=="string"&&(D.unixPermissions=parseInt(D.unixPermissions,8)),D.unixPermissions&&16384&D.unixPermissions&&(D.dir=!0),D.dosPermissions&&16&D.dosPermissions&&(D.dir=!0),D.dir&&(C=m(C)),D.createFolders&&(P=w(C))&&p.call(this,P,!0);var G=A==="string"&&D.binary===!1&&D.base64===!1;T&&T.binary!==void 0||(D.binary=!G),(j instanceof f&&j.uncompressedSize===0||D.dir||!j||j.length===0)&&(D.base64=!1,D.binary=!0,j="",D.compression="STORE",A="string");var N=null;N=j instanceof f||j instanceof c?j:x.isNode&&x.isStream(j)?new g(C,j):a.prepareContent(C,j,D.binary,D.optimizedBinaryString,D.base64);var F=new h(C,N,D);this.files[C]=F}var i=n("./utf8"),a=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),y=n("./generate"),x=n("./nodejsUtils"),g=n("./nodejs/NodejsStreamInputAdapter"),w=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var j=C.lastIndexOf("/");return 0<j?C.substring(0,j):""},m=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},p=function(C,j){return j=j!==void 0?j:d.createFolders,C=m(C),this.files[C]||o.call(this,C,null,{dir:!0,createFolders:j}),this.files[C]};function b(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var j,T,P;for(j in this.files)P=this.files[j],(T=j.slice(this.root.length,j.length))&&j.slice(0,this.root.length)===this.root&&C(T,P)},filter:function(C){var j=[];return this.forEach(function(T,P){C(T,P)&&j.push(P)}),j},file:function(C,j,T){if(arguments.length!==1)return C=this.root+C,o.call(this,C,j,T),this;if(b(C)){var P=C;return this.filter(function(D,G){return!G.dir&&P.test(D)})}var A=this.files[this.root+C];return A&&!A.dir?A:null},folder:function(C){if(!C)return this;if(b(C))return this.filter(function(A,D){return D.dir&&C.test(A)});var j=this.root+C,T=p.call(this,j),P=this.clone();return P.root=T.name,P},remove:function(C){C=this.root+C;var j=this.files[C];if(j||(C.slice(-1)!=="/"&&(C+="/"),j=this.files[C]),j&&!j.dir)delete this.files[C];else for(var T=this.filter(function(A,D){return D.name.slice(0,C.length)===C}),P=0;P<T.length;P++)delete this.files[T[P].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var j,T={};try{if((T=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=T.type.toLowerCase(),T.compression=T.compression.toUpperCase(),T.type==="binarystring"&&(T.type="string"),!T.type)throw new Error("No output type specified.");a.checkSupport(T.type),T.platform!=="darwin"&&T.platform!=="freebsd"&&T.platform!=="linux"&&T.platform!=="sunos"||(T.platform="UNIX"),T.platform==="win32"&&(T.platform="DOS");var P=T.comment||this.comment||"";j=y.generateWorker(this,T,P)}catch(A){(j=new c("error")).error(A)}return new u(j,T.type||"string",T.mimeType)},generateAsync:function(C,j){return this.generateInternalStream(C).accumulate(j)},generateNodeStream:function(C,j){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(j)}};r.exports=_},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,s){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,s){var o=n("./DataReader");function i(a){o.call(this,a);for(var c=0;c<this.data.length;c++)a[c]=255&a[c]}n("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===c&&this.data[h+1]===u&&this.data[h+2]===d&&this.data[h+3]===f)return h-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),h=this.readData(4);return c===h[0]&&u===h[1]&&d===h[2]&&f===h[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,s){var o=n("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var c,u=0;for(this.checkOffset(a),c=this.index+a-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=a,u},readString:function(a){return o.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))}},r.exports=i},{"../utils":32}],19:[function(n,r,s){var o=n("./Uint8ArrayReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,s){var o=n("./DataReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,s){var o=n("./ArrayReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,s){var o=n("../utils"),i=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var h=o.getTypeOf(f);return o.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new u(f):i.uint8array?new d(o.transformTo("uint8array",f)):new a(o.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,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(n,r,s){var o=n("./GenericWorker"),i=n("../utils");function a(c){o.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(a,o),a.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,s){var o=n("./GenericWorker"),i=n("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,o),a.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(a,i),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=o.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}o.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,s){function o(i){this.name=i||"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}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(c){a.processChunk(c)}),i.on("end",function(){a.end()}),i.on("error",function(c){a.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=o},{}],29:[function(n,r,s){var o=n("../utils"),i=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(x,g){return new d.Promise(function(w,m){var p=[],b=x._internalType,_=x._outputType,C=x._mimeType;x.on("data",function(j,T){p.push(j),g&&g(T)}).on("error",function(j){p=[],m(j)}).on("end",function(){try{var j=function(T,P,A){switch(T){case"blob":return o.newBlob(o.transformTo("arraybuffer",P),A);case"base64":return c.encode(P);default:return o.transformTo(T,P)}}(_,function(T,P){var A,D=0,G=null,N=0;for(A=0;A<P.length;A++)N+=P[A].length;switch(T){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(G=new Uint8Array(N),A=0;A<P.length;A++)G.set(P[A],D),D+=P[A].length;return G;case"nodebuffer":return Buffer.concat(P);default:throw new Error("concat : unsupported type '"+T+"'")}}(b,p),C);w(j)}catch(T){m(T)}p=[]}).resume()})}function y(x,g,w){var m=g;switch(g){case"blob":case"arraybuffer":m="uint8array";break;case"base64":m="string"}try{this._internalType=m,this._outputType=g,this._mimeType=w,o.checkSupport(m),this._worker=x.pipe(new i(m)),x.lock()}catch(p){this._worker=new a("error"),this._worker.error(p)}}y.prototype={accumulate:function(x){return h(this,x)},on:function(x,g){var w=this;return x==="data"?this._worker.on(x,function(m){g.call(w,m.data,m.meta)}):this._worker.on(x,function(){o.delay(g,arguments,w)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},x)}},r.exports=y},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,s){for(var o=n("./utils"),i=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}s.utf8encode=function(y){return i.nodebuffer?a.newBufferFrom(y,"utf-8"):function(x){var g,w,m,p,b,_=x.length,C=0;for(p=0;p<_;p++)(64512&(w=x.charCodeAt(p)))==55296&&p+1<_&&(64512&(m=x.charCodeAt(p+1)))==56320&&(w=65536+(w-55296<<10)+(m-56320),p++),C+=w<128?1:w<2048?2:w<65536?3:4;for(g=i.uint8array?new Uint8Array(C):new Array(C),p=b=0;b<C;p++)(64512&(w=x.charCodeAt(p)))==55296&&p+1<_&&(64512&(m=x.charCodeAt(p+1)))==56320&&(w=65536+(w-55296<<10)+(m-56320),p++),w<128?g[b++]=w:(w<2048?g[b++]=192|w>>>6:(w<65536?g[b++]=224|w>>>12:(g[b++]=240|w>>>18,g[b++]=128|w>>>12&63),g[b++]=128|w>>>6&63),g[b++]=128|63&w);return g}(y)},s.utf8decode=function(y){return i.nodebuffer?o.transformTo("nodebuffer",y).toString("utf-8"):function(x){var g,w,m,p,b=x.length,_=new Array(2*b);for(g=w=0;g<b;)if((m=x[g++])<128)_[w++]=m;else if(4<(p=u[m]))_[w++]=65533,g+=p-1;else{for(m&=p===2?31:p===3?15:7;1<p&&g<b;)m=m<<6|63&x[g++],p--;1<p?_[w++]=65533:m<65536?_[w++]=m:(m-=65536,_[w++]=55296|m>>10&1023,_[w++]=56320|1023&m)}return _.length!==w&&(_.subarray?_=_.subarray(0,w):_.length=w),o.applyFromCharCode(_)}(y=o.transformTo(i.uint8array?"uint8array":"array",y))},o.inherits(f,c),f.prototype.processChunk=function(y){var x=o.transformTo(i.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var g=x;(x=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),x.set(g,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var w=function(p,b){var _;for((b=b||p.length)>p.length&&(b=p.length),_=b-1;0<=_&&(192&p[_])==128;)_--;return _<0||_===0?b:_+u[p[_]]>b?_:b}(x),m=x;w!==x.length&&(i.uint8array?(m=x.subarray(0,w),this.leftOver=x.subarray(w,x.length)):(m=x.slice(0,w),this.leftOver=x.slice(w,x.length))),this.push({data:s.utf8decode(m),meta:y.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,o.inherits(h,c),h.prototype.processChunk=function(y){this.push({data:s.utf8encode(y.data),meta:y.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,s){var o=n("./support"),i=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function u(g){return g}function d(g,w){for(var m=0;m<g.length;++m)w[m]=255&g.charCodeAt(m);return w}n("setimmediate"),s.newBlob=function(g,w){s.checkSupport("blob");try{return new Blob([g],{type:w})}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return m.append(g),m.getBlob(w)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(g,w,m){var p=[],b=0,_=g.length;if(_<=m)return String.fromCharCode.apply(null,g);for(;b<_;)w==="array"||w==="nodebuffer"?p.push(String.fromCharCode.apply(null,g.slice(b,Math.min(b+m,_)))):p.push(String.fromCharCode.apply(null,g.subarray(b,Math.min(b+m,_)))),b+=m;return p.join("")},stringifyByChar:function(g){for(var w="",m=0;m<g.length;m++)w+=String.fromCharCode(g[m]);return w},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function h(g){var w=65536,m=s.getTypeOf(g),p=!0;if(m==="uint8array"?p=f.applyCanBeUsed.uint8array:m==="nodebuffer"&&(p=f.applyCanBeUsed.nodebuffer),p)for(;1<w;)try{return f.stringifyByChunk(g,m,w)}catch{w=Math.floor(w/2)}return f.stringifyByChar(g)}function y(g,w){for(var m=0;m<g.length;m++)w[m]=g[m];return w}s.applyFromCharCode=h;var x={};x.string={string:u,array:function(g){return d(g,new Array(g.length))},arraybuffer:function(g){return x.string.uint8array(g).buffer},uint8array:function(g){return d(g,new Uint8Array(g.length))},nodebuffer:function(g){return d(g,a.allocBuffer(g.length))}},x.array={string:h,array:u,arraybuffer:function(g){return new Uint8Array(g).buffer},uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(g)}},x.arraybuffer={string:function(g){return h(new Uint8Array(g))},array:function(g){return y(new Uint8Array(g),new Array(g.byteLength))},arraybuffer:u,uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(new Uint8Array(g))}},x.uint8array={string:h,array:function(g){return y(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:u,nodebuffer:function(g){return a.newBufferFrom(g)}},x.nodebuffer={string:h,array:function(g){return y(g,new Array(g.length))},arraybuffer:function(g){return x.nodebuffer.uint8array(g).buffer},uint8array:function(g){return y(g,new Uint8Array(g.length))},nodebuffer:u},s.transformTo=function(g,w){if(w=w||"",!g)return w;s.checkSupport(g);var m=s.getTypeOf(w);return x[m][g](w)},s.resolve=function(g){for(var w=g.split("/"),m=[],p=0;p<w.length;p++){var b=w[p];b==="."||b===""&&p!==0&&p!==w.length-1||(b===".."?m.pop():m.push(b))}return m.join("/")},s.getTypeOf=function(g){return typeof g=="string"?"string":Object.prototype.toString.call(g)==="[object Array]"?"array":o.nodebuffer&&a.isBuffer(g)?"nodebuffer":o.uint8array&&g instanceof Uint8Array?"uint8array":o.arraybuffer&&g instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(g){if(!o[g.toLowerCase()])throw new Error(g+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(g){var w,m,p="";for(m=0;m<(g||"").length;m++)p+="\\x"+((w=g.charCodeAt(m))<16?"0":"")+w.toString(16).toUpperCase();return p},s.delay=function(g,w,m){setImmediate(function(){g.apply(m||null,w||[])})},s.inherits=function(g,w){function m(){}m.prototype=w.prototype,g.prototype=new m},s.extend=function(){var g,w,m={};for(g=0;g<arguments.length;g++)for(w in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],w)&&m[w]===void 0&&(m[w]=arguments[g][w]);return m},s.prepareContent=function(g,w,m,p,b){return c.Promise.resolve(w).then(function(_){return o.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new c.Promise(function(C,j){var T=new FileReader;T.onload=function(P){C(P.target.result)},T.onerror=function(P){j(P.target.error)},T.readAsArrayBuffer(_)}):_}).then(function(_){var C=s.getTypeOf(_);return C?(C==="arraybuffer"?_=s.transformTo("uint8array",_):C==="string"&&(b?_=i.decode(_):m&&p!==!0&&(_=function(j){return d(j,o.uint8array?new Uint8Array(j.length):new Array(j.length))}(_))),_):c.Promise.reject(new Error("Can't read the data of '"+g+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),a=n("./signature"),c=n("./zipEntry"),u=n("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(h)+", expected "+i.pretty(f)+")")}},isSignature:function(f,h){var y=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===h;return this.reader.setIndex(y),x},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),h=u.uint8array?"uint8array":"array",y=i.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(y)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,h,y,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),h=this.reader.readInt(4),y=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:y}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,h;for(f=0;f<this.files.length;f++)h=this.files[f],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var h=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var x=h-y;if(0<x)this.isSignature(h,a.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(x<0)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),a=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(y,x){this.options=y,this.loadOptions=x}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var x,g;if(y.skip(22),this.fileNameLength=y.readInt(2),g=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.skip(g),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((x=function(w){for(var m in d)if(Object.prototype.hasOwnProperty.call(d,m)&&d[m].magic===w)return d[m];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,x,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var x=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(x),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var x,g,w,m=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<m;)x=y.readInt(2),g=y.readInt(2),w=y.readData(g),this.extraFields[x]={id:x,length:g,value:w};y.setIndex(m)},handleUTF8:function(){var y=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var g=i.transformTo(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var w=this.findExtraFieldUnicodeComment();if(w!==null)this.fileCommentStr=w;else{var m=i.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(m)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var x=o(y.value);return x.readInt(1)!==1||c(this.fileName)!==x.readInt(4)?null:u.utf8decode(x.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var x=o(y.value);return x.readInt(1)!==1||c(this.fileComment)!==x.readInt(4)?null:u.utf8decode(x.readData(y.length-5))}return null}},r.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,s){function o(x,g,w){this.name=x,this.dir=w.dir,this.date=w.date,this.comment=w.comment,this.unixPermissions=w.unixPermissions,this.dosPermissions=w.dosPermissions,this._data=g,this._dataBinary=w.binary,this.options={compression:w.compression,compressionOptions:w.compressionOptions}}var i=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");o.prototype={internalStream:function(x){var g=null,w="string";try{if(!x)throw new Error("No output type specified.");var m=(w=x.toLowerCase())==="string"||w==="text";w!=="binarystring"&&w!=="text"||(w="string"),g=this._decompressWorker();var p=!this._dataBinary;p&&!m&&(g=g.pipe(new c.Utf8EncodeWorker)),!p&&m&&(g=g.pipe(new c.Utf8DecodeWorker))}catch(b){(g=new d("error")).error(b)}return new i(g,w,"")},async:function(x,g){return this.internalStream(x).accumulate(g)},nodeStream:function(x,g){return this.internalStream(x||"nodebuffer").toNodejsStream(g)},_compressWorker:function(x,g){if(this._data instanceof u&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var w=this._decompressWorker();return this._dataBinary||(w=w.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(w,x,g)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},y=0;y<f.length;y++)o.prototype[f[y]]=h;r.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,s){(function(o){var i,a,c=o.MutationObserver||o.WebKitMutationObserver;if(c){var u=0,d=new c(x),f=o.document.createTextNode("");d.observe(f,{characterData:!0}),i=function(){f.data=u=++u%2}}else if(o.setImmediate||o.MessageChannel===void 0)i="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var g=o.document.createElement("script");g.onreadystatechange=function(){x(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},o.document.documentElement.appendChild(g)}:function(){setTimeout(x,0)};else{var h=new o.MessageChannel;h.port1.onmessage=x,i=function(){h.port2.postMessage(0)}}var y=[];function x(){var g,w;a=!0;for(var m=y.length;m;){for(w=y,y=[],g=-1;++g<m;)w[g]();m=y.length}a=!1}r.exports=function(g){y.push(g)!==1||a||i()}}).call(this,typeof cu<"u"?cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,s){var o=n("immediate");function i(){}var a={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(m){if(typeof m!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,m!==i&&g(this,m)}function h(m,p,b){this.promise=m,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof b=="function"&&(this.onRejected=b,this.callRejected=this.otherCallRejected)}function y(m,p,b){o(function(){var _;try{_=p(b)}catch(C){return a.reject(m,C)}_===m?a.reject(m,new TypeError("Cannot resolve promise with itself")):a.resolve(m,_)})}function x(m){var p=m&&m.then;if(m&&(typeof m=="object"||typeof m=="function")&&typeof p=="function")return function(){p.apply(m,arguments)}}function g(m,p){var b=!1;function _(T){b||(b=!0,a.reject(m,T))}function C(T){b||(b=!0,a.resolve(m,T))}var j=w(function(){p(C,_)});j.status==="error"&&_(j.value)}function w(m,p){var b={};try{b.value=m(p),b.status="success"}catch(_){b.status="error",b.value=_}return b}(r.exports=f).prototype.finally=function(m){if(typeof m!="function")return this;var p=this.constructor;return this.then(function(b){return p.resolve(m()).then(function(){return b})},function(b){return p.resolve(m()).then(function(){throw b})})},f.prototype.catch=function(m){return this.then(null,m)},f.prototype.then=function(m,p){if(typeof m!="function"&&this.state===u||typeof p!="function"&&this.state===c)return this;var b=new this.constructor(i);return this.state!==d?y(b,this.state===u?m:p,this.outcome):this.queue.push(new h(b,m,p)),b},h.prototype.callFulfilled=function(m){a.resolve(this.promise,m)},h.prototype.otherCallFulfilled=function(m){y(this.promise,this.onFulfilled,m)},h.prototype.callRejected=function(m){a.reject(this.promise,m)},h.prototype.otherCallRejected=function(m){y(this.promise,this.onRejected,m)},a.resolve=function(m,p){var b=w(x,p);if(b.status==="error")return a.reject(m,b.value);var _=b.value;if(_)g(m,_);else{m.state=u,m.outcome=p;for(var C=-1,j=m.queue.length;++C<j;)m.queue[C].callFulfilled(p)}return m},a.reject=function(m,p){m.state=c,m.outcome=p;for(var b=-1,_=m.queue.length;++b<_;)m.queue[b].callRejected(p);return m},f.resolve=function(m){return m instanceof this?m:a.resolve(new this(i),m)},f.reject=function(m){var p=new this(i);return a.reject(p,m)},f.all=function(m){var p=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=m.length,_=!1;if(!b)return this.resolve([]);for(var C=new Array(b),j=0,T=-1,P=new this(i);++T<b;)A(m[T],T);return P;function A(D,G){p.resolve(D).then(function(N){C[G]=N,++j!==b||_||(_=!0,a.resolve(P,C))},function(N){_||(_=!0,a.reject(P,N))})}},f.race=function(m){var p=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=m.length,_=!1;if(!b)return this.resolve([]);for(var C=-1,j=new this(i);++C<b;)T=m[C],p.resolve(T).then(function(P){_||(_=!0,a.resolve(j,P))},function(P){_||(_=!0,a.reject(j,P))});var T;return j}},{immediate:36}],38:[function(n,r,s){var o={};(0,n("./lib/utils/common").assign)(o,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,s){var o=n("./zlib/deflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,y=0,x=8;function g(m){if(!(this instanceof g))return new g(m);this.options=i.assign({level:h,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},m||{});var p=this.options;p.raw&&0<p.windowBits?p.windowBits=-p.windowBits:p.gzip&&0<p.windowBits&&p.windowBits<16&&(p.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var b=o.deflateInit2(this.strm,p.level,p.method,p.windowBits,p.memLevel,p.strategy);if(b!==f)throw new Error(c[b]);if(p.header&&o.deflateSetHeader(this.strm,p.header),p.dictionary){var _;if(_=typeof p.dictionary=="string"?a.string2buf(p.dictionary):d.call(p.dictionary)==="[object ArrayBuffer]"?new Uint8Array(p.dictionary):p.dictionary,(b=o.deflateSetDictionary(this.strm,_))!==f)throw new Error(c[b]);this._dict_set=!0}}function w(m,p){var b=new g(p);if(b.push(m,!0),b.err)throw b.msg||c[b.err];return b.result}g.prototype.push=function(m,p){var b,_,C=this.strm,j=this.options.chunkSize;if(this.ended)return!1;_=p===~~p?p:p===!0?4:0,typeof m=="string"?C.input=a.string2buf(m):d.call(m)==="[object ArrayBuffer]"?C.input=new Uint8Array(m):C.input=m,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new i.Buf8(j),C.next_out=0,C.avail_out=j),(b=o.deflate(C,_))!==1&&b!==f)return this.onEnd(b),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(C.output,C.next_out))):this.onData(i.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&b!==1);return _===4?(b=o.deflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===f):_!==2||(this.onEnd(f),!(C.avail_out=0))},g.prototype.onData=function(m){this.chunks.push(m)},g.prototype.onEnd=function(m){m===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},s.Deflate=g,s.deflate=w,s.deflateRaw=function(m,p){return(p=p||{}).raw=!0,w(m,p)},s.gzip=function(m,p){return(p=p||{}).gzip=!0,w(m,p)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,s){var o=n("./zlib/inflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),f=n("./zlib/gzheader"),h=Object.prototype.toString;function y(g){if(!(this instanceof y))return new y(g);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},g||{});var w=this.options;w.raw&&0<=w.windowBits&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),!(0<=w.windowBits&&w.windowBits<16)||g&&g.windowBits||(w.windowBits+=32),15<w.windowBits&&w.windowBits<48&&!(15&w.windowBits)&&(w.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var m=o.inflateInit2(this.strm,w.windowBits);if(m!==c.Z_OK)throw new Error(u[m]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function x(g,w){var m=new y(w);if(m.push(g,!0),m.err)throw m.msg||u[m.err];return m.result}y.prototype.push=function(g,w){var m,p,b,_,C,j,T=this.strm,P=this.options.chunkSize,A=this.options.dictionary,D=!1;if(this.ended)return!1;p=w===~~w?w:w===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof g=="string"?T.input=a.binstring2buf(g):h.call(g)==="[object ArrayBuffer]"?T.input=new Uint8Array(g):T.input=g,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new i.Buf8(P),T.next_out=0,T.avail_out=P),(m=o.inflate(T,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(j=typeof A=="string"?a.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,m=o.inflateSetDictionary(this.strm,j)),m===c.Z_BUF_ERROR&&D===!0&&(m=c.Z_OK,D=!1),m!==c.Z_STREAM_END&&m!==c.Z_OK)return this.onEnd(m),!(this.ended=!0);T.next_out&&(T.avail_out!==0&&m!==c.Z_STREAM_END&&(T.avail_in!==0||p!==c.Z_FINISH&&p!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(b=a.utf8border(T.output,T.next_out),_=T.next_out-b,C=a.buf2string(T.output,b),T.next_out=_,T.avail_out=P-_,_&&i.arraySet(T.output,T.output,b,_,0),this.onData(C)):this.onData(i.shrinkBuf(T.output,T.next_out)))),T.avail_in===0&&T.avail_out===0&&(D=!0)}while((0<T.avail_in||T.avail_out===0)&&m!==c.Z_STREAM_END);return m===c.Z_STREAM_END&&(p=c.Z_FINISH),p===c.Z_FINISH?(m=o.inflateEnd(this.strm),this.onEnd(m),this.ended=!0,m===c.Z_OK):p!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(T.avail_out=0))},y.prototype.onData=function(g){this.chunks.push(g)},y.prototype.onEnd=function(g){g===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},s.Inflate=y,s.inflate=x,s.inflateRaw=function(g,w){return(w=w||{}).raw=!0,x(g,w)},s.ungzip=x},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])}}return c},s.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,f,h){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),h);else for(var y=0;y<f;y++)c[h+y]=u[d+y]},flattenChunks:function(c){var u,d,f,h,y,x;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(x=new Uint8Array(f),u=h=0,d=c.length;u<d;u++)y=c[u],x.set(y,h),h+=y.length;return x}},a={arraySet:function(c,u,d,f,h){for(var y=0;y<f;y++)c[h+y]=u[d+y]},flattenChunks:function(c){return[].concat.apply([],c)}};s.setTyped=function(c){c?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,i)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,a))},s.setTyped(o)},{}],42:[function(n,r,s){var o=n("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var c=new o.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,h){if(h<65537&&(f.subarray&&a||!f.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(f,h));for(var y="",x=0;x<h;x++)y+=String.fromCharCode(f[x]);return y}c[254]=c[254]=1,s.string2buf=function(f){var h,y,x,g,w,m=f.length,p=0;for(g=0;g<m;g++)(64512&(y=f.charCodeAt(g)))==55296&&g+1<m&&(64512&(x=f.charCodeAt(g+1)))==56320&&(y=65536+(y-55296<<10)+(x-56320),g++),p+=y<128?1:y<2048?2:y<65536?3:4;for(h=new o.Buf8(p),g=w=0;w<p;g++)(64512&(y=f.charCodeAt(g)))==55296&&g+1<m&&(64512&(x=f.charCodeAt(g+1)))==56320&&(y=65536+(y-55296<<10)+(x-56320),g++),y<128?h[w++]=y:(y<2048?h[w++]=192|y>>>6:(y<65536?h[w++]=224|y>>>12:(h[w++]=240|y>>>18,h[w++]=128|y>>>12&63),h[w++]=128|y>>>6&63),h[w++]=128|63&y);return h},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var h=new o.Buf8(f.length),y=0,x=h.length;y<x;y++)h[y]=f.charCodeAt(y);return h},s.buf2string=function(f,h){var y,x,g,w,m=h||f.length,p=new Array(2*m);for(y=x=0;y<m;)if((g=f[y++])<128)p[x++]=g;else if(4<(w=c[g]))p[x++]=65533,y+=w-1;else{for(g&=w===2?31:w===3?15:7;1<w&&y<m;)g=g<<6|63&f[y++],w--;1<w?p[x++]=65533:g<65536?p[x++]=g:(g-=65536,p[x++]=55296|g>>10&1023,p[x++]=56320|1023&g)}return d(p,x)},s.utf8border=function(f,h){var y;for((h=h||f.length)>f.length&&(h=f.length),y=h-1;0<=y&&(192&f[y])==128;)y--;return y<0||y===0?h:y+c[f[y]]>h?y:h}},{"./common":41}],43:[function(n,r,s){r.exports=function(o,i,a,c){for(var u=65535&o|0,d=o>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(u=u+i[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,r,s){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,s){var o=function(){for(var i,a=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;a[c]=i}return a}();r.exports=function(i,a,c,u){var d=o,f=u+c;i^=-1;for(var h=u;h<f;h++)i=i>>>8^d[255&(i^a[h])];return-1^i}},{}],46:[function(n,r,s){var o,i=n("../utils/common"),a=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,y=0,x=-2,g=-1,w=4,m=2,p=8,b=9,_=286,C=30,j=19,T=2*_+1,P=15,A=3,D=258,G=D+A+1,N=42,F=113,S=1,U=2,J=3,z=4;function W(E,ee){return E.msg=d[ee],ee}function I(E){return(E<<1)-(4<E?9:0)}function X(E){for(var ee=E.length;0<=--ee;)E[ee]=0}function $(E){var ee=E.state,Z=ee.pending;Z>E.avail_out&&(Z=E.avail_out),Z!==0&&(i.arraySet(E.output,ee.pending_buf,ee.pending_out,Z,E.next_out),E.next_out+=Z,ee.pending_out+=Z,E.total_out+=Z,E.avail_out-=Z,ee.pending-=Z,ee.pending===0&&(ee.pending_out=0))}function B(E,ee){a._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,ee),E.block_start=E.strstart,$(E.strm)}function he(E,ee){E.pending_buf[E.pending++]=ee}function re(E,ee){E.pending_buf[E.pending++]=ee>>>8&255,E.pending_buf[E.pending++]=255&ee}function se(E,ee){var Z,O,k=E.max_chain_length,R=E.strstart,M=E.prev_length,K=E.nice_match,L=E.strstart>E.w_size-G?E.strstart-(E.w_size-G):0,Y=E.window,Q=E.w_mask,te=E.prev,me=E.strstart+D,Ye=Y[R+M-1],$e=Y[R+M];E.prev_length>=E.good_match&&(k>>=2),K>E.lookahead&&(K=E.lookahead);do if(Y[(Z=ee)+M]===$e&&Y[Z+M-1]===Ye&&Y[Z]===Y[R]&&Y[++Z]===Y[R+1]){R+=2,Z++;do;while(Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&R<me);if(O=D-(me-R),R=me-D,M<O){if(E.match_start=ee,K<=(M=O))break;Ye=Y[R+M-1],$e=Y[R+M]}}while((ee=te[ee&Q])>L&&--k!=0);return M<=E.lookahead?M:E.lookahead}function De(E){var ee,Z,O,k,R,M,K,L,Y,Q,te=E.w_size;do{if(k=E.window_size-E.lookahead-E.strstart,E.strstart>=te+(te-G)){for(i.arraySet(E.window,E.window,te,te,0),E.match_start-=te,E.strstart-=te,E.block_start-=te,ee=Z=E.hash_size;O=E.head[--ee],E.head[ee]=te<=O?O-te:0,--Z;);for(ee=Z=te;O=E.prev[--ee],E.prev[ee]=te<=O?O-te:0,--Z;);k+=te}if(E.strm.avail_in===0)break;if(M=E.strm,K=E.window,L=E.strstart+E.lookahead,Y=k,Q=void 0,Q=M.avail_in,Y<Q&&(Q=Y),Z=Q===0?0:(M.avail_in-=Q,i.arraySet(K,M.input,M.next_in,Q,L),M.state.wrap===1?M.adler=c(M.adler,K,Q,L):M.state.wrap===2&&(M.adler=u(M.adler,K,Q,L)),M.next_in+=Q,M.total_in+=Q,Q),E.lookahead+=Z,E.lookahead+E.insert>=A)for(R=E.strstart-E.insert,E.ins_h=E.window[R],E.ins_h=(E.ins_h<<E.hash_shift^E.window[R+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[R+A-1])&E.hash_mask,E.prev[R&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=R,R++,E.insert--,!(E.lookahead+E.insert<A)););}while(E.lookahead<G&&E.strm.avail_in!==0)}function pe(E,ee){for(var Z,O;;){if(E.lookahead<G){if(De(E),E.lookahead<G&&ee===f)return S;if(E.lookahead===0)break}if(Z=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),Z!==0&&E.strstart-Z<=E.w_size-G&&(E.match_length=se(E,Z)),E.match_length>=A)if(O=a._tr_tally(E,E.strstart-E.match_start,E.match_length-A),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=A){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else O=a._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(O&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:z):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function _e(E,ee){for(var Z,O,k;;){if(E.lookahead<G){if(De(E),E.lookahead<G&&ee===f)return S;if(E.lookahead===0)break}if(Z=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=A-1,Z!==0&&E.prev_length<E.max_lazy_match&&E.strstart-Z<=E.w_size-G&&(E.match_length=se(E,Z),E.match_length<=5&&(E.strategy===1||E.match_length===A&&4096<E.strstart-E.match_start)&&(E.match_length=A-1)),E.prev_length>=A&&E.match_length<=E.prev_length){for(k=E.strstart+E.lookahead-A,O=a._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-A),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=k&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=A-1,E.strstart++,O&&(B(E,!1),E.strm.avail_out===0))return S}else if(E.match_available){if((O=a._tr_tally(E,0,E.window[E.strstart-1]))&&B(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return S}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(O=a._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:z):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function Te(E,ee,Z,O,k){this.good_length=E,this.max_lazy=ee,this.nice_length=Z,this.max_chain=O,this.func=k}function Fe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=p,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*T),this.dyn_dtree=new i.Buf16(2*(2*C+1)),this.bl_tree=new i.Buf16(2*(2*j+1)),X(this.dyn_ltree),X(this.dyn_dtree),X(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(P+1),this.heap=new i.Buf16(2*_+1),X(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*_+1),X(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ie(E){var ee;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=m,(ee=E.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?N:F,E.adler=ee.wrap===2?0:1,ee.last_flush=f,a._tr_init(ee),y):W(E,x)}function Pe(E){var ee=Ie(E);return ee===y&&function(Z){Z.window_size=2*Z.w_size,X(Z.head),Z.max_lazy_match=o[Z.level].max_lazy,Z.good_match=o[Z.level].good_length,Z.nice_match=o[Z.level].nice_length,Z.max_chain_length=o[Z.level].max_chain,Z.strstart=0,Z.block_start=0,Z.lookahead=0,Z.insert=0,Z.match_length=Z.prev_length=A-1,Z.match_available=0,Z.ins_h=0}(E.state),ee}function rt(E,ee,Z,O,k,R){if(!E)return x;var M=1;if(ee===g&&(ee=6),O<0?(M=0,O=-O):15<O&&(M=2,O-=16),k<1||b<k||Z!==p||O<8||15<O||ee<0||9<ee||R<0||w<R)return W(E,x);O===8&&(O=9);var K=new Fe;return(E.state=K).strm=E,K.wrap=M,K.gzhead=null,K.w_bits=O,K.w_size=1<<K.w_bits,K.w_mask=K.w_size-1,K.hash_bits=k+7,K.hash_size=1<<K.hash_bits,K.hash_mask=K.hash_size-1,K.hash_shift=~~((K.hash_bits+A-1)/A),K.window=new i.Buf8(2*K.w_size),K.head=new i.Buf16(K.hash_size),K.prev=new i.Buf16(K.w_size),K.lit_bufsize=1<<k+6,K.pending_buf_size=4*K.lit_bufsize,K.pending_buf=new i.Buf8(K.pending_buf_size),K.d_buf=1*K.lit_bufsize,K.l_buf=3*K.lit_bufsize,K.level=ee,K.strategy=R,K.method=Z,Pe(E)}o=[new Te(0,0,0,0,function(E,ee){var Z=65535;for(Z>E.pending_buf_size-5&&(Z=E.pending_buf_size-5);;){if(E.lookahead<=1){if(De(E),E.lookahead===0&&ee===f)return S;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var O=E.block_start+Z;if((E.strstart===0||E.strstart>=O)&&(E.lookahead=E.strstart-O,E.strstart=O,B(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-G&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=0,ee===h?(B(E,!0),E.strm.avail_out===0?J:z):(E.strstart>E.block_start&&(B(E,!1),E.strm.avail_out),S)}),new Te(4,4,8,4,pe),new Te(4,5,16,8,pe),new Te(4,6,32,32,pe),new Te(4,4,16,16,_e),new Te(8,16,32,32,_e),new Te(8,16,128,128,_e),new Te(8,32,128,256,_e),new Te(32,128,258,1024,_e),new Te(32,258,258,4096,_e)],s.deflateInit=function(E,ee){return rt(E,ee,p,15,8,0)},s.deflateInit2=rt,s.deflateReset=Pe,s.deflateResetKeep=Ie,s.deflateSetHeader=function(E,ee){return E&&E.state?E.state.wrap!==2?x:(E.state.gzhead=ee,y):x},s.deflate=function(E,ee){var Z,O,k,R;if(!E||!E.state||5<ee||ee<0)return E?W(E,x):x;if(O=E.state,!E.output||!E.input&&E.avail_in!==0||O.status===666&&ee!==h)return W(E,E.avail_out===0?-5:x);if(O.strm=E,Z=O.last_flush,O.last_flush=ee,O.status===N)if(O.wrap===2)E.adler=0,he(O,31),he(O,139),he(O,8),O.gzhead?(he(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),he(O,255&O.gzhead.time),he(O,O.gzhead.time>>8&255),he(O,O.gzhead.time>>16&255),he(O,O.gzhead.time>>24&255),he(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),he(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(he(O,255&O.gzhead.extra.length),he(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(E.adler=u(E.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69):(he(O,0),he(O,0),he(O,0),he(O,0),he(O,0),he(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),he(O,3),O.status=F);else{var M=p+(O.w_bits-8<<4)<<8;M|=(2<=O.strategy||O.level<2?0:O.level<6?1:O.level===6?2:3)<<6,O.strstart!==0&&(M|=32),M+=31-M%31,O.status=F,re(O,M),O.strstart!==0&&(re(O,E.adler>>>16),re(O,65535&E.adler)),E.adler=1}if(O.status===69)if(O.gzhead.extra){for(k=O.pending;O.gzindex<(65535&O.gzhead.extra.length)&&(O.pending!==O.pending_buf_size||(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending!==O.pending_buf_size));)he(O,255&O.gzhead.extra[O.gzindex]),O.gzindex++;O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),O.gzindex===O.gzhead.extra.length&&(O.gzindex=0,O.status=73)}else O.status=73;if(O.status===73)if(O.gzhead.name){k=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending===O.pending_buf_size)){R=1;break}R=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,he(O,R)}while(R!==0);O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),R===0&&(O.gzindex=0,O.status=91)}else O.status=91;if(O.status===91)if(O.gzhead.comment){k=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending===O.pending_buf_size)){R=1;break}R=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,he(O,R)}while(R!==0);O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),R===0&&(O.status=103)}else O.status=103;if(O.status===103&&(O.gzhead.hcrc?(O.pending+2>O.pending_buf_size&&$(E),O.pending+2<=O.pending_buf_size&&(he(O,255&E.adler),he(O,E.adler>>8&255),E.adler=0,O.status=F)):O.status=F),O.pending!==0){if($(E),E.avail_out===0)return O.last_flush=-1,y}else if(E.avail_in===0&&I(ee)<=I(Z)&&ee!==h)return W(E,-5);if(O.status===666&&E.avail_in!==0)return W(E,-5);if(E.avail_in!==0||O.lookahead!==0||ee!==f&&O.status!==666){var K=O.strategy===2?function(L,Y){for(var Q;;){if(L.lookahead===0&&(De(L),L.lookahead===0)){if(Y===f)return S;break}if(L.match_length=0,Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++,Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:z):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(O,ee):O.strategy===3?function(L,Y){for(var Q,te,me,Ye,$e=L.window;;){if(L.lookahead<=D){if(De(L),L.lookahead<=D&&Y===f)return S;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=A&&0<L.strstart&&(te=$e[me=L.strstart-1])===$e[++me]&&te===$e[++me]&&te===$e[++me]){Ye=L.strstart+D;do;while(te===$e[++me]&&te===$e[++me]&&te===$e[++me]&&te===$e[++me]&&te===$e[++me]&&te===$e[++me]&&te===$e[++me]&&te===$e[++me]&&me<Ye);L.match_length=D-(Ye-me),L.match_length>L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=A?(Q=a._tr_tally(L,1,L.match_length-A),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++),Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:z):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(O,ee):o[O.level].func(O,ee);if(K!==J&&K!==z||(O.status=666),K===S||K===J)return E.avail_out===0&&(O.last_flush=-1),y;if(K===U&&(ee===1?a._tr_align(O):ee!==5&&(a._tr_stored_block(O,0,0,!1),ee===3&&(X(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),$(E),E.avail_out===0))return O.last_flush=-1,y}return ee!==h?y:O.wrap<=0?1:(O.wrap===2?(he(O,255&E.adler),he(O,E.adler>>8&255),he(O,E.adler>>16&255),he(O,E.adler>>24&255),he(O,255&E.total_in),he(O,E.total_in>>8&255),he(O,E.total_in>>16&255),he(O,E.total_in>>24&255)):(re(O,E.adler>>>16),re(O,65535&E.adler)),$(E),0<O.wrap&&(O.wrap=-O.wrap),O.pending!==0?y:1)},s.deflateEnd=function(E){var ee;return E&&E.state?(ee=E.state.status)!==N&&ee!==69&&ee!==73&&ee!==91&&ee!==103&&ee!==F&&ee!==666?W(E,x):(E.state=null,ee===F?W(E,-3):y):x},s.deflateSetDictionary=function(E,ee){var Z,O,k,R,M,K,L,Y,Q=ee.length;if(!E||!E.state||(R=(Z=E.state).wrap)===2||R===1&&Z.status!==N||Z.lookahead)return x;for(R===1&&(E.adler=c(E.adler,ee,Q,0)),Z.wrap=0,Q>=Z.w_size&&(R===0&&(X(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),Y=new i.Buf8(Z.w_size),i.arraySet(Y,ee,Q-Z.w_size,Z.w_size,0),ee=Y,Q=Z.w_size),M=E.avail_in,K=E.next_in,L=E.input,E.avail_in=Q,E.next_in=0,E.input=ee,De(Z);Z.lookahead>=A;){for(O=Z.strstart,k=Z.lookahead-(A-1);Z.ins_h=(Z.ins_h<<Z.hash_shift^Z.window[O+A-1])&Z.hash_mask,Z.prev[O&Z.w_mask]=Z.head[Z.ins_h],Z.head[Z.ins_h]=O,O++,--k;);Z.strstart=O,Z.lookahead=A-1,De(Z)}return Z.strstart+=Z.lookahead,Z.block_start=Z.strstart,Z.insert=Z.lookahead,Z.lookahead=0,Z.match_length=Z.prev_length=A-1,Z.match_available=0,E.next_in=K,E.input=L,E.avail_in=M,Z.wrap=R,y},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,s){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,s){r.exports=function(o,i){var a,c,u,d,f,h,y,x,g,w,m,p,b,_,C,j,T,P,A,D,G,N,F,S,U;a=o.state,c=o.next_in,S=o.input,u=c+(o.avail_in-5),d=o.next_out,U=o.output,f=d-(i-o.avail_out),h=d+(o.avail_out-257),y=a.dmax,x=a.wsize,g=a.whave,w=a.wnext,m=a.window,p=a.hold,b=a.bits,_=a.lencode,C=a.distcode,j=(1<<a.lenbits)-1,T=(1<<a.distbits)-1;e:do{b<15&&(p+=S[c++]<<b,b+=8,p+=S[c++]<<b,b+=8),P=_[p&j];t:for(;;){if(p>>>=A=P>>>24,b-=A,(A=P>>>16&255)===0)U[d++]=65535&P;else{if(!(16&A)){if(!(64&A)){P=_[(65535&P)+(p&(1<<A)-1)];continue t}if(32&A){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}D=65535&P,(A&=15)&&(b<A&&(p+=S[c++]<<b,b+=8),D+=p&(1<<A)-1,p>>>=A,b-=A),b<15&&(p+=S[c++]<<b,b+=8,p+=S[c++]<<b,b+=8),P=C[p&T];n:for(;;){if(p>>>=A=P>>>24,b-=A,!(16&(A=P>>>16&255))){if(!(64&A)){P=C[(65535&P)+(p&(1<<A)-1)];continue n}o.msg="invalid distance code",a.mode=30;break e}if(G=65535&P,b<(A&=15)&&(p+=S[c++]<<b,(b+=8)<A&&(p+=S[c++]<<b,b+=8)),y<(G+=p&(1<<A)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(p>>>=A,b-=A,(A=d-f)<G){if(g<(A=G-A)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(F=m,(N=0)===w){if(N+=x-A,A<D){for(D-=A;U[d++]=m[N++],--A;);N=d-G,F=U}}else if(w<A){if(N+=x+w-A,(A-=w)<D){for(D-=A;U[d++]=m[N++],--A;);if(N=0,w<D){for(D-=A=w;U[d++]=m[N++],--A;);N=d-G,F=U}}}else if(N+=w-A,A<D){for(D-=A;U[d++]=m[N++],--A;);N=d-G,F=U}for(;2<D;)U[d++]=F[N++],U[d++]=F[N++],U[d++]=F[N++],D-=3;D&&(U[d++]=F[N++],1<D&&(U[d++]=F[N++]))}else{for(N=d-G;U[d++]=U[N++],U[d++]=U[N++],U[d++]=U[N++],2<(D-=3););D&&(U[d++]=U[N++],1<D&&(U[d++]=U[N++]))}break}}break}}while(c<u&&d<h);c-=D=b>>3,p&=(1<<(b-=D<<3))-1,o.next_in=c,o.next_out=d,o.avail_in=c<u?u-c+5:5-(c-u),o.avail_out=d<h?h-d+257:257-(d-h),a.hold=p,a.bits=b}},{}],49:[function(n,r,s){var o=n("../utils/common"),i=n("./adler32"),a=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,y=-2,x=1,g=852,w=592;function m(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function p(){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 o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(N){var F;return N&&N.state?(F=N.state,N.total_in=N.total_out=F.total=0,N.msg="",F.wrap&&(N.adler=1&F.wrap),F.mode=x,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new o.Buf32(g),F.distcode=F.distdyn=new o.Buf32(w),F.sane=1,F.back=-1,h):y}function _(N){var F;return N&&N.state?((F=N.state).wsize=0,F.whave=0,F.wnext=0,b(N)):y}function C(N,F){var S,U;return N&&N.state?(U=N.state,F<0?(S=0,F=-F):(S=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?y:(U.window!==null&&U.wbits!==F&&(U.window=null),U.wrap=S,U.wbits=F,_(N))):y}function j(N,F){var S,U;return N?(U=new p,(N.state=U).window=null,(S=C(N,F))!==h&&(N.state=null),S):y}var T,P,A=!0;function D(N){if(A){var F;for(T=new o.Buf32(512),P=new o.Buf32(32),F=0;F<144;)N.lens[F++]=8;for(;F<256;)N.lens[F++]=9;for(;F<280;)N.lens[F++]=7;for(;F<288;)N.lens[F++]=8;for(u(d,N.lens,0,288,T,0,N.work,{bits:9}),F=0;F<32;)N.lens[F++]=5;u(f,N.lens,0,32,P,0,N.work,{bits:5}),A=!1}N.lencode=T,N.lenbits=9,N.distcode=P,N.distbits=5}function G(N,F,S,U){var J,z=N.state;return z.window===null&&(z.wsize=1<<z.wbits,z.wnext=0,z.whave=0,z.window=new o.Buf8(z.wsize)),U>=z.wsize?(o.arraySet(z.window,F,S-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(U<(J=z.wsize-z.wnext)&&(J=U),o.arraySet(z.window,F,S-U,J,z.wnext),(U-=J)?(o.arraySet(z.window,F,S-U,U,0),z.wnext=U,z.whave=z.wsize):(z.wnext+=J,z.wnext===z.wsize&&(z.wnext=0),z.whave<z.wsize&&(z.whave+=J))),0}s.inflateReset=_,s.inflateReset2=C,s.inflateResetKeep=b,s.inflateInit=function(N){return j(N,15)},s.inflateInit2=j,s.inflate=function(N,F){var S,U,J,z,W,I,X,$,B,he,re,se,De,pe,_e,Te,Fe,Ie,Pe,rt,E,ee,Z,O,k=0,R=new o.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return y;(S=N.state).mode===12&&(S.mode=13),W=N.next_out,J=N.output,X=N.avail_out,z=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,he=I,re=X,ee=h;e:for(;;)switch(S.mode){case x:if(S.wrap===0){S.mode=13;break}for(;B<16;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if(2&S.wrap&&$===35615){R[S.check=0]=255&$,R[1]=$>>>8&255,S.check=a(S.check,R,2,0),B=$=0,S.mode=2;break}if(S.flags=0,S.head&&(S.head.done=!1),!(1&S.wrap)||(((255&$)<<8)+($>>8))%31){N.msg="incorrect header check",S.mode=30;break}if((15&$)!=8){N.msg="unknown compression method",S.mode=30;break}if(B-=4,E=8+(15&($>>>=4)),S.wbits===0)S.wbits=E;else if(E>S.wbits){N.msg="invalid window size",S.mode=30;break}S.dmax=1<<E,N.adler=S.check=1,S.mode=512&$?10:12,B=$=0;break;case 2:for(;B<16;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if(S.flags=$,(255&S.flags)!=8){N.msg="unknown compression method",S.mode=30;break}if(57344&S.flags){N.msg="unknown header flags set",S.mode=30;break}S.head&&(S.head.text=$>>8&1),512&S.flags&&(R[0]=255&$,R[1]=$>>>8&255,S.check=a(S.check,R,2,0)),B=$=0,S.mode=3;case 3:for(;B<32;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}S.head&&(S.head.time=$),512&S.flags&&(R[0]=255&$,R[1]=$>>>8&255,R[2]=$>>>16&255,R[3]=$>>>24&255,S.check=a(S.check,R,4,0)),B=$=0,S.mode=4;case 4:for(;B<16;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}S.head&&(S.head.xflags=255&$,S.head.os=$>>8),512&S.flags&&(R[0]=255&$,R[1]=$>>>8&255,S.check=a(S.check,R,2,0)),B=$=0,S.mode=5;case 5:if(1024&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}S.length=$,S.head&&(S.head.extra_len=$),512&S.flags&&(R[0]=255&$,R[1]=$>>>8&255,S.check=a(S.check,R,2,0)),B=$=0}else S.head&&(S.head.extra=null);S.mode=6;case 6:if(1024&S.flags&&(I<(se=S.length)&&(se=I),se&&(S.head&&(E=S.head.extra_len-S.length,S.head.extra||(S.head.extra=new Array(S.head.extra_len)),o.arraySet(S.head.extra,U,z,se,E)),512&S.flags&&(S.check=a(S.check,U,se,z)),I-=se,z+=se,S.length-=se),S.length))break e;S.length=0,S.mode=7;case 7:if(2048&S.flags){if(I===0)break e;for(se=0;E=U[z+se++],S.head&&E&&S.length<65536&&(S.head.name+=String.fromCharCode(E)),E&&se<I;);if(512&S.flags&&(S.check=a(S.check,U,se,z)),I-=se,z+=se,E)break e}else S.head&&(S.head.name=null);S.length=0,S.mode=8;case 8:if(4096&S.flags){if(I===0)break e;for(se=0;E=U[z+se++],S.head&&E&&S.length<65536&&(S.head.comment+=String.fromCharCode(E)),E&&se<I;);if(512&S.flags&&(S.check=a(S.check,U,se,z)),I-=se,z+=se,E)break e}else S.head&&(S.head.comment=null);S.mode=9;case 9:if(512&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if($!==(65535&S.check)){N.msg="header crc mismatch",S.mode=30;break}B=$=0}S.head&&(S.head.hcrc=S.flags>>9&1,S.head.done=!0),N.adler=S.check=0,S.mode=12;break;case 10:for(;B<32;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}N.adler=S.check=m($),B=$=0,S.mode=11;case 11:if(S.havedict===0)return N.next_out=W,N.avail_out=X,N.next_in=z,N.avail_in=I,S.hold=$,S.bits=B,2;N.adler=S.check=1,S.mode=12;case 12:if(F===5||F===6)break e;case 13:if(S.last){$>>>=7&B,B-=7&B,S.mode=27;break}for(;B<3;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}switch(S.last=1&$,B-=1,3&($>>>=1)){case 0:S.mode=14;break;case 1:if(D(S),S.mode=20,F!==6)break;$>>>=2,B-=2;break e;case 2:S.mode=17;break;case 3:N.msg="invalid block type",S.mode=30}$>>>=2,B-=2;break;case 14:for($>>>=7&B,B-=7&B;B<32;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if((65535&$)!=($>>>16^65535)){N.msg="invalid stored block lengths",S.mode=30;break}if(S.length=65535&$,B=$=0,S.mode=15,F===6)break e;case 15:S.mode=16;case 16:if(se=S.length){if(I<se&&(se=I),X<se&&(se=X),se===0)break e;o.arraySet(J,U,z,se,W),I-=se,z+=se,X-=se,W+=se,S.length-=se;break}S.mode=12;break;case 17:for(;B<14;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if(S.nlen=257+(31&$),$>>>=5,B-=5,S.ndist=1+(31&$),$>>>=5,B-=5,S.ncode=4+(15&$),$>>>=4,B-=4,286<S.nlen||30<S.ndist){N.msg="too many length or distance symbols",S.mode=30;break}S.have=0,S.mode=18;case 18:for(;S.have<S.ncode;){for(;B<3;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}S.lens[M[S.have++]]=7&$,$>>>=3,B-=3}for(;S.have<19;)S.lens[M[S.have++]]=0;if(S.lencode=S.lendyn,S.lenbits=7,Z={bits:S.lenbits},ee=u(0,S.lens,0,19,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid code lengths set",S.mode=30;break}S.have=0,S.mode=19;case 19:for(;S.have<S.nlen+S.ndist;){for(;Te=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if(Fe<16)$>>>=_e,B-=_e,S.lens[S.have++]=Fe;else{if(Fe===16){for(O=_e+2;B<O;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if($>>>=_e,B-=_e,S.have===0){N.msg="invalid bit length repeat",S.mode=30;break}E=S.lens[S.have-1],se=3+(3&$),$>>>=2,B-=2}else if(Fe===17){for(O=_e+3;B<O;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}B-=_e,E=0,se=3+(7&($>>>=_e)),$>>>=3,B-=3}else{for(O=_e+7;B<O;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}B-=_e,E=0,se=11+(127&($>>>=_e)),$>>>=7,B-=7}if(S.have+se>S.nlen+S.ndist){N.msg="invalid bit length repeat",S.mode=30;break}for(;se--;)S.lens[S.have++]=E}}if(S.mode===30)break;if(S.lens[256]===0){N.msg="invalid code -- missing end-of-block",S.mode=30;break}if(S.lenbits=9,Z={bits:S.lenbits},ee=u(d,S.lens,0,S.nlen,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid literal/lengths set",S.mode=30;break}if(S.distbits=6,S.distcode=S.distdyn,Z={bits:S.distbits},ee=u(f,S.lens,S.nlen,S.ndist,S.distcode,0,S.work,Z),S.distbits=Z.bits,ee){N.msg="invalid distances set",S.mode=30;break}if(S.mode=20,F===6)break e;case 20:S.mode=21;case 21:if(6<=I&&258<=X){N.next_out=W,N.avail_out=X,N.next_in=z,N.avail_in=I,S.hold=$,S.bits=B,c(N,re),W=N.next_out,J=N.output,X=N.avail_out,z=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,S.mode===12&&(S.back=-1);break}for(S.back=0;Te=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if(Te&&!(240&Te)){for(Ie=_e,Pe=Te,rt=Fe;Te=(k=S.lencode[rt+(($&(1<<Ie+Pe)-1)>>Ie)])>>>16&255,Fe=65535&k,!(Ie+(_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}$>>>=Ie,B-=Ie,S.back+=Ie}if($>>>=_e,B-=_e,S.back+=_e,S.length=Fe,Te===0){S.mode=26;break}if(32&Te){S.back=-1,S.mode=12;break}if(64&Te){N.msg="invalid literal/length code",S.mode=30;break}S.extra=15&Te,S.mode=22;case 22:if(S.extra){for(O=S.extra;B<O;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}S.length+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}S.was=S.length,S.mode=23;case 23:for(;Te=(k=S.distcode[$&(1<<S.distbits)-1])>>>16&255,Fe=65535&k,!((_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if(!(240&Te)){for(Ie=_e,Pe=Te,rt=Fe;Te=(k=S.distcode[rt+(($&(1<<Ie+Pe)-1)>>Ie)])>>>16&255,Fe=65535&k,!(Ie+(_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}$>>>=Ie,B-=Ie,S.back+=Ie}if($>>>=_e,B-=_e,S.back+=_e,64&Te){N.msg="invalid distance code",S.mode=30;break}S.offset=Fe,S.extra=15&Te,S.mode=24;case 24:if(S.extra){for(O=S.extra;B<O;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}S.offset+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}if(S.offset>S.dmax){N.msg="invalid distance too far back",S.mode=30;break}S.mode=25;case 25:if(X===0)break e;if(se=re-X,S.offset>se){if((se=S.offset-se)>S.whave&&S.sane){N.msg="invalid distance too far back",S.mode=30;break}De=se>S.wnext?(se-=S.wnext,S.wsize-se):S.wnext-se,se>S.length&&(se=S.length),pe=S.window}else pe=J,De=W-S.offset,se=S.length;for(X<se&&(se=X),X-=se,S.length-=se;J[W++]=pe[De++],--se;);S.length===0&&(S.mode=21);break;case 26:if(X===0)break e;J[W++]=S.length,X--,S.mode=21;break;case 27:if(S.wrap){for(;B<32;){if(I===0)break e;I--,$|=U[z++]<<B,B+=8}if(re-=X,N.total_out+=re,S.total+=re,re&&(N.adler=S.check=S.flags?a(S.check,J,re,W-re):i(S.check,J,re,W-re)),re=X,(S.flags?$:m($))!==S.check){N.msg="incorrect data check",S.mode=30;break}B=$=0}S.mode=28;case 28:if(S.wrap&&S.flags){for(;B<32;){if(I===0)break e;I--,$+=U[z++]<<B,B+=8}if($!==(4294967295&S.total)){N.msg="incorrect length check",S.mode=30;break}B=$=0}S.mode=29;case 29:ee=1;break e;case 30:ee=-3;break e;case 31:return-4;case 32:default:return y}return N.next_out=W,N.avail_out=X,N.next_in=z,N.avail_in=I,S.hold=$,S.bits=B,(S.wsize||re!==N.avail_out&&S.mode<30&&(S.mode<27||F!==4))&&G(N,N.output,N.next_out,re-N.avail_out)?(S.mode=31,-4):(he-=N.avail_in,re-=N.avail_out,N.total_in+=he,N.total_out+=re,S.total+=re,S.wrap&&re&&(N.adler=S.check=S.flags?a(S.check,J,re,N.next_out-re):i(S.check,J,re,N.next_out-re)),N.data_type=S.bits+(S.last?64:0)+(S.mode===12?128:0)+(S.mode===20||S.mode===15?256:0),(he==0&&re===0||F===4)&&ee===h&&(ee=-5),ee)},s.inflateEnd=function(N){if(!N||!N.state)return y;var F=N.state;return F.window&&(F.window=null),N.state=null,h},s.inflateGetHeader=function(N,F){var S;return N&&N.state&&2&(S=N.state).wrap?((S.head=F).done=!1,h):y},s.inflateSetDictionary=function(N,F){var S,U=F.length;return N&&N.state?(S=N.state).wrap!==0&&S.mode!==11?y:S.mode===11&&i(1,F,U,0)!==S.check?-3:G(N,F,U,U)?(S.mode=31,-4):(S.havedict=1,h):y},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,s){var o=n("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,f,h,y,x,g,w,m){var p,b,_,C,j,T,P,A,D,G=m.bits,N=0,F=0,S=0,U=0,J=0,z=0,W=0,I=0,X=0,$=0,B=null,he=0,re=new o.Buf16(16),se=new o.Buf16(16),De=null,pe=0;for(N=0;N<=15;N++)re[N]=0;for(F=0;F<y;F++)re[f[h+F]]++;for(J=G,U=15;1<=U&&re[U]===0;U--);if(U<J&&(J=U),U===0)return x[g++]=20971520,x[g++]=20971520,m.bits=1,0;for(S=1;S<U&&re[S]===0;S++);for(J<S&&(J=S),N=I=1;N<=15;N++)if(I<<=1,(I-=re[N])<0)return-1;if(0<I&&(d===0||U!==1))return-1;for(se[1]=0,N=1;N<15;N++)se[N+1]=se[N]+re[N];for(F=0;F<y;F++)f[h+F]!==0&&(w[se[f[h+F]]++]=F);if(T=d===0?(B=De=w,19):d===1?(B=i,he-=257,De=a,pe-=257,256):(B=c,De=u,-1),N=S,j=g,W=F=$=0,_=-1,C=(X=1<<(z=J))-1,d===1&&852<X||d===2&&592<X)return 1;for(;;){for(P=N-W,D=w[F]<T?(A=0,w[F]):w[F]>T?(A=De[pe+w[F]],B[he+w[F]]):(A=96,0),p=1<<N-W,S=b=1<<z;x[j+($>>W)+(b-=p)]=P<<24|A<<16|D|0,b!==0;);for(p=1<<N-1;$&p;)p>>=1;if(p!==0?($&=p-1,$+=p):$=0,F++,--re[N]==0){if(N===U)break;N=f[h+w[F]]}if(J<N&&($&C)!==_){for(W===0&&(W=J),j+=S,I=1<<(z=N-W);z+W<U&&!((I-=re[z+W])<=0);)z++,I<<=1;if(X+=1<<z,d===1&&852<X||d===2&&592<X)return 1;x[_=$&C]=J<<24|z<<16|j-g|0}}return $!==0&&(x[j+$]=N-W<<24|64<<16|0),m.bits=J,0}},{"../utils/common":41}],51:[function(n,r,s){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,s){var o=n("../utils/common"),i=0,a=1;function c(k){for(var R=k.length;0<=--R;)k[R]=0}var u=0,d=29,f=256,h=f+1+d,y=30,x=19,g=2*h+1,w=15,m=16,p=7,b=256,_=16,C=17,j=18,T=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],P=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(2*(h+2));c(G);var N=new Array(2*y);c(N);var F=new Array(512);c(F);var S=new Array(256);c(S);var U=new Array(d);c(U);var J,z,W,I=new Array(y);function X(k,R,M,K,L){this.static_tree=k,this.extra_bits=R,this.extra_base=M,this.elems=K,this.max_length=L,this.has_stree=k&&k.length}function $(k,R){this.dyn_tree=k,this.max_code=0,this.stat_desc=R}function B(k){return k<256?F[k]:F[256+(k>>>7)]}function he(k,R){k.pending_buf[k.pending++]=255&R,k.pending_buf[k.pending++]=R>>>8&255}function re(k,R,M){k.bi_valid>m-M?(k.bi_buf|=R<<k.bi_valid&65535,he(k,k.bi_buf),k.bi_buf=R>>m-k.bi_valid,k.bi_valid+=M-m):(k.bi_buf|=R<<k.bi_valid&65535,k.bi_valid+=M)}function se(k,R,M){re(k,M[2*R],M[2*R+1])}function De(k,R){for(var M=0;M|=1&k,k>>>=1,M<<=1,0<--R;);return M>>>1}function pe(k,R,M){var K,L,Y=new Array(w+1),Q=0;for(K=1;K<=w;K++)Y[K]=Q=Q+M[K-1]<<1;for(L=0;L<=R;L++){var te=k[2*L+1];te!==0&&(k[2*L]=De(Y[te]++,te))}}function _e(k){var R;for(R=0;R<h;R++)k.dyn_ltree[2*R]=0;for(R=0;R<y;R++)k.dyn_dtree[2*R]=0;for(R=0;R<x;R++)k.bl_tree[2*R]=0;k.dyn_ltree[2*b]=1,k.opt_len=k.static_len=0,k.last_lit=k.matches=0}function Te(k){8<k.bi_valid?he(k,k.bi_buf):0<k.bi_valid&&(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0}function Fe(k,R,M,K){var L=2*R,Y=2*M;return k[L]<k[Y]||k[L]===k[Y]&&K[R]<=K[M]}function Ie(k,R,M){for(var K=k.heap[M],L=M<<1;L<=k.heap_len&&(L<k.heap_len&&Fe(R,k.heap[L+1],k.heap[L],k.depth)&&L++,!Fe(R,K,k.heap[L],k.depth));)k.heap[M]=k.heap[L],M=L,L<<=1;k.heap[M]=K}function Pe(k,R,M){var K,L,Y,Q,te=0;if(k.last_lit!==0)for(;K=k.pending_buf[k.d_buf+2*te]<<8|k.pending_buf[k.d_buf+2*te+1],L=k.pending_buf[k.l_buf+te],te++,K===0?se(k,L,R):(se(k,(Y=S[L])+f+1,R),(Q=T[Y])!==0&&re(k,L-=U[Y],Q),se(k,Y=B(--K),M),(Q=P[Y])!==0&&re(k,K-=I[Y],Q)),te<k.last_lit;);se(k,b,R)}function rt(k,R){var M,K,L,Y=R.dyn_tree,Q=R.stat_desc.static_tree,te=R.stat_desc.has_stree,me=R.stat_desc.elems,Ye=-1;for(k.heap_len=0,k.heap_max=g,M=0;M<me;M++)Y[2*M]!==0?(k.heap[++k.heap_len]=Ye=M,k.depth[M]=0):Y[2*M+1]=0;for(;k.heap_len<2;)Y[2*(L=k.heap[++k.heap_len]=Ye<2?++Ye:0)]=1,k.depth[L]=0,k.opt_len--,te&&(k.static_len-=Q[2*L+1]);for(R.max_code=Ye,M=k.heap_len>>1;1<=M;M--)Ie(k,Y,M);for(L=me;M=k.heap[1],k.heap[1]=k.heap[k.heap_len--],Ie(k,Y,1),K=k.heap[1],k.heap[--k.heap_max]=M,k.heap[--k.heap_max]=K,Y[2*L]=Y[2*M]+Y[2*K],k.depth[L]=(k.depth[M]>=k.depth[K]?k.depth[M]:k.depth[K])+1,Y[2*M+1]=Y[2*K+1]=L,k.heap[1]=L++,Ie(k,Y,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],function($e,Et){var Jn,Yt,rs,at,ss,os,er=Et.dyn_tree,nu=Et.max_code,ru=Et.stat_desc.static_tree,Si=Et.stat_desc.has_stree,su=Et.stat_desc.extra_bits,ki=Et.stat_desc.extra_base,Mr=Et.stat_desc.max_length,Hs=0;for(at=0;at<=w;at++)$e.bl_count[at]=0;for(er[2*$e.heap[$e.heap_max]+1]=0,Jn=$e.heap_max+1;Jn<g;Jn++)Mr<(at=er[2*er[2*(Yt=$e.heap[Jn])+1]+1]+1)&&(at=Mr,Hs++),er[2*Yt+1]=at,nu<Yt||($e.bl_count[at]++,ss=0,ki<=Yt&&(ss=su[Yt-ki]),os=er[2*Yt],$e.opt_len+=os*(at+ss),Si&&($e.static_len+=os*(ru[2*Yt+1]+ss)));if(Hs!==0){do{for(at=Mr-1;$e.bl_count[at]===0;)at--;$e.bl_count[at]--,$e.bl_count[at+1]+=2,$e.bl_count[Mr]--,Hs-=2}while(0<Hs);for(at=Mr;at!==0;at--)for(Yt=$e.bl_count[at];Yt!==0;)nu<(rs=$e.heap[--Jn])||(er[2*rs+1]!==at&&($e.opt_len+=(at-er[2*rs+1])*er[2*rs],er[2*rs+1]=at),Yt--)}}(k,R),pe(Y,Ye,k.bl_count)}function E(k,R,M){var K,L,Y=-1,Q=R[1],te=0,me=7,Ye=4;for(Q===0&&(me=138,Ye=3),R[2*(M+1)+1]=65535,K=0;K<=M;K++)L=Q,Q=R[2*(K+1)+1],++te<me&&L===Q||(te<Ye?k.bl_tree[2*L]+=te:L!==0?(L!==Y&&k.bl_tree[2*L]++,k.bl_tree[2*_]++):te<=10?k.bl_tree[2*C]++:k.bl_tree[2*j]++,Y=L,Ye=(te=0)===Q?(me=138,3):L===Q?(me=6,3):(me=7,4))}function ee(k,R,M){var K,L,Y=-1,Q=R[1],te=0,me=7,Ye=4;for(Q===0&&(me=138,Ye=3),K=0;K<=M;K++)if(L=Q,Q=R[2*(K+1)+1],!(++te<me&&L===Q)){if(te<Ye)for(;se(k,L,k.bl_tree),--te!=0;);else L!==0?(L!==Y&&(se(k,L,k.bl_tree),te--),se(k,_,k.bl_tree),re(k,te-3,2)):te<=10?(se(k,C,k.bl_tree),re(k,te-3,3)):(se(k,j,k.bl_tree),re(k,te-11,7));Y=L,Ye=(te=0)===Q?(me=138,3):L===Q?(me=6,3):(me=7,4)}}c(I);var Z=!1;function O(k,R,M,K){re(k,(u<<1)+(K?1:0),3),function(L,Y,Q,te){Te(L),he(L,Q),he(L,~Q),o.arraySet(L.pending_buf,L.window,Y,Q,L.pending),L.pending+=Q}(k,R,M)}s._tr_init=function(k){Z||(function(){var R,M,K,L,Y,Q=new Array(w+1);for(L=K=0;L<d-1;L++)for(U[L]=K,R=0;R<1<<T[L];R++)S[K++]=L;for(S[K-1]=L,L=Y=0;L<16;L++)for(I[L]=Y,R=0;R<1<<P[L];R++)F[Y++]=L;for(Y>>=7;L<y;L++)for(I[L]=Y<<7,R=0;R<1<<P[L]-7;R++)F[256+Y++]=L;for(M=0;M<=w;M++)Q[M]=0;for(R=0;R<=143;)G[2*R+1]=8,R++,Q[8]++;for(;R<=255;)G[2*R+1]=9,R++,Q[9]++;for(;R<=279;)G[2*R+1]=7,R++,Q[7]++;for(;R<=287;)G[2*R+1]=8,R++,Q[8]++;for(pe(G,h+1,Q),R=0;R<y;R++)N[2*R+1]=5,N[2*R]=De(R,5);J=new X(G,T,f+1,h,w),z=new X(N,P,0,y,w),W=new X(new Array(0),A,0,x,p)}(),Z=!0),k.l_desc=new $(k.dyn_ltree,J),k.d_desc=new $(k.dyn_dtree,z),k.bl_desc=new $(k.bl_tree,W),k.bi_buf=0,k.bi_valid=0,_e(k)},s._tr_stored_block=O,s._tr_flush_block=function(k,R,M,K){var L,Y,Q=0;0<k.level?(k.strm.data_type===2&&(k.strm.data_type=function(te){var me,Ye=4093624447;for(me=0;me<=31;me++,Ye>>>=1)if(1&Ye&&te.dyn_ltree[2*me]!==0)return i;if(te.dyn_ltree[18]!==0||te.dyn_ltree[20]!==0||te.dyn_ltree[26]!==0)return a;for(me=32;me<f;me++)if(te.dyn_ltree[2*me]!==0)return a;return i}(k)),rt(k,k.l_desc),rt(k,k.d_desc),Q=function(te){var me;for(E(te,te.dyn_ltree,te.l_desc.max_code),E(te,te.dyn_dtree,te.d_desc.max_code),rt(te,te.bl_desc),me=x-1;3<=me&&te.bl_tree[2*D[me]+1]===0;me--);return te.opt_len+=3*(me+1)+5+5+4,me}(k),L=k.opt_len+3+7>>>3,(Y=k.static_len+3+7>>>3)<=L&&(L=Y)):L=Y=M+5,M+4<=L&&R!==-1?O(k,R,M,K):k.strategy===4||Y===L?(re(k,2+(K?1:0),3),Pe(k,G,N)):(re(k,4+(K?1:0),3),function(te,me,Ye,$e){var Et;for(re(te,me-257,5),re(te,Ye-1,5),re(te,$e-4,4),Et=0;Et<$e;Et++)re(te,te.bl_tree[2*D[Et]+1],3);ee(te,te.dyn_ltree,me-1),ee(te,te.dyn_dtree,Ye-1)}(k,k.l_desc.max_code+1,k.d_desc.max_code+1,Q+1),Pe(k,k.dyn_ltree,k.dyn_dtree)),_e(k),K&&Te(k)},s._tr_tally=function(k,R,M){return k.pending_buf[k.d_buf+2*k.last_lit]=R>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&R,k.pending_buf[k.l_buf+k.last_lit]=255&M,k.last_lit++,R===0?k.dyn_ltree[2*M]++:(k.matches++,R--,k.dyn_ltree[2*(S[M]+f+1)]++,k.dyn_dtree[2*B(R)]++),k.last_lit===k.lit_bufsize-1},s._tr_align=function(k){re(k,2,3),se(k,b,G),function(R){R.bi_valid===16?(he(R,R.bi_buf),R.bi_buf=0,R.bi_valid=0):8<=R.bi_valid&&(R.pending_buf[R.pending++]=255&R.bi_buf,R.bi_buf>>=8,R.bi_valid-=8)}(k)}},{"../utils/common":41}],53:[function(n,r,s){r.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(n,r,s){(function(o){(function(i,a){if(!i.setImmediate){var c,u,d,f,h=1,y={},x=!1,g=i.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(i);w=w&&w.setTimeout?w:i,c={}.toString.call(i.process)==="[object process]"?function(_){process.nextTick(function(){p(_)})}:function(){if(i.postMessage&&!i.importScripts){var _=!0,C=i.onmessage;return i.onmessage=function(){_=!1},i.postMessage("","*"),i.onmessage=C,_}}()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",b,!1):i.attachEvent("onmessage",b),function(_){i.postMessage(f+_,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){p(_.data)},function(_){d.port2.postMessage(_)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(_){var C=g.createElement("script");C.onreadystatechange=function(){p(_),C.onreadystatechange=null,u.removeChild(C),C=null},u.appendChild(C)}):function(_){setTimeout(p,0,_)},w.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var C=new Array(arguments.length-1),j=0;j<C.length;j++)C[j]=arguments[j+1];var T={callback:_,args:C};return y[h]=T,c(h),h++},w.clearImmediate=m}function m(_){delete y[_]}function p(_){if(x)setTimeout(p,0,_);else{var C=y[_];if(C){x=!0;try{(function(j){var T=j.callback,P=j.args;switch(P.length){case 0:T();break;case 1:T(P[0]);break;case 2:T(P[0],P[1]);break;case 3:T(P[0],P[1],P[2]);break;default:T.apply(a,P)}})(C)}finally{m(_),x=!1}}}}function b(_){_.source===i&&typeof _.data=="string"&&_.data.indexOf(f)===0&&p(+_.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof cu<"u"?cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(EE);var F$=EE.exports;const z$=wf(F$);function $$(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{r.result?t(r.result.toString()):n("No content found")},r.onerror=()=>n(r.error),r.readAsText(e)})}const U$=async(e,t)=>{const n=new z$;t.forEach(o=>{n.file(o.name,o.content)});const r=await n.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,s.click()},Ta=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)},V$=e=>Ta(e).split(" ")[0];function NE(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),o=String(t.getUTCHours()).padStart(2,"0"),i=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${n}-${r}-${s} ${o}:${i}:${a}`}const B$=async e=>{let t=1;e.page&&(t=e.page);let n=2;e.perPage&&(n=e.perPage);const r=st();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=r.filter("expiredAt<{:expiredAt}",{expiredAt:NE(15)})),r.collection("domains").getList(t,n,{sort:"-created",expand:"lastDeployment",filter:s})},W$=async()=>{const e=st(),t=await e.collection("domains").getList(1,1,{}),n=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:NE(15)})}),r=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:n.totalItems,enabled:r.totalItems,disabled:s.totalItems}},H$=async e=>await st().collection("domains").getOne(e),ig=async e=>e.id?await st().collection("domains").update(e.id,e):await st().collection("domains").create(e),Y$=async e=>await st().collection("domains").delete(e),K$=(e,t)=>st().collection("domains").subscribe(e,n=>{n.action==="update"&&t(n.record)},{expand:"lastDeployment"}),G$=e=>{st().collection("domains").unsubscribe(e)},Z$=()=>{const e=Ir(),t=Dn(),{t:n}=ct(),r=Ar(),s=new URLSearchParams(r.search),o=s.get("page"),i=s.get("state"),[a,c]=v.useState(0),u=()=>{t("/edit")},d=_=>{s.set("page",_.toString()),t(`?${s.toString()}`)},f=_=>{t(`/edit?id=${_}`)},h=_=>{t(`/history?domain=${_}`)},y=async _=>{try{await Y$(_),g(x.filter(C=>C.id!==_))}catch(C){console.error("Error deleting domain:",C)}},[x,g]=v.useState([]);v.useEffect(()=>{(async()=>{const C=await B$({page:o?Number(o):1,perPage:10,state:i||""});g(C.items),c(C.totalPages)})()},[o,i]);const w=async _=>{const C=x.filter(A=>A.id===_),j=C[0].enabled,T=C[0];T.enabled=!j,await ig(T);const P=x.map(A=>A.id===_?{...A,checked:!j}:A);g(P)},m=async _=>{try{G$(_.id),K$(_.id,C=>{console.log(C);const j=x.map(T=>T.id===C.id?{...C}:T);g(j)}),_.rightnow=!0,await ig(_),e.toast({title:n("operation.succeed"),description:n("domain.management.start.deploy.succeed.tips")})}catch{e.toast({title:n("domain.management.execution.failed"),description:l.jsxs(uD,{i18nKey:"domain.management.execution.failed.tips",children:["text1",l.jsx(xn,{to:`/history?domain=${_.id}`,className:"underline text-blue-500",children:"text2"}),"text3"]}),variant:"destructive"})}},p=async _=>{await m({..._,deployed:!1})},b=async _=>{const C=`${_.id}-${_.domain}.zip`,j=[{name:`${_.domain}.pem`,content:_.certificate?_.certificate:""},{name:`${_.domain}.key`,content:_.privateKey?_.privateKey:""}];await U$(C,j)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Yv,{}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:n("domain.management.name")}),l.jsx(Ue,{onClick:u,children:n("domain.add")})]}),x.length?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-36",children:n("domain")}),l.jsx("div",{className:"w-40",children:n("domain.management.expiry.date")}),l.jsx("div",{className:"w-32",children:n("domain.management.last.execution.status")}),l.jsx("div",{className:"w-64",children:n("domain.management.last.execution.stage")}),l.jsx("div",{className:"w-40 sm:ml-2",children:n("domain.management.last.execution.time")}),l.jsx("div",{className:"w-24",children:n("domain.management.enable")}),l.jsx("div",{className:"grow",children:n("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:n("domain")}),x.map(_=>{var C,j,T,P;return l.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:[l.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center",children:_.domain}),l.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx("div",{children:_.expiredAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:n("domain.management.expiry.date1",{date:90})}),l.jsx("div",{children:n("domain.management.expiry.date2",{date:V$(_.expiredAt)})})]}):"---"})}),l.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((C=_.expand)!=null&&C.lastDeployment)?l.jsx(l.Fragment,{children:l.jsx(Fv,{deployment:_.expand.lastDeployment})}):"---"}),l.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((j=_.expand)!=null&&j.lastDeployment)?l.jsx(Dv,{phase:(T=_.expand.lastDeployment)==null?void 0:T.phase,phaseSuccess:(P=_.expand.lastDeployment)==null?void 0:P.phaseSuccess}):"---"}),l.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:_.lastDeployedAt?Ta(_.lastDeployedAt):"---"}),l.jsx("div",{className:"sm:w-24 flex items-center",children:l.jsx(Mv,{children:l.jsxs(kj,{children:[l.jsx(Cj,{children:l.jsx(Qc,{checked:_.enabled,onCheckedChange:()=>{w(_.id)}})}),l.jsx(Lv,{children:l.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:_.enabled?n("disable"):n("enable")})})]})})}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>h(_.id),children:n("deployment.log.name")}),l.jsxs(ya,{when:!!_.enabled,children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>m(_),children:n("domain.management.start.deploying")})]}),l.jsxs(ya,{when:!!(_.enabled&&_.deployed),children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>p(_),children:n("domain.management.forced.deployment")})]}),l.jsxs(ya,{when:!!_.expiredAt,children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>b(_),children:n("download")})]}),!_.enabled&&l.jsxs(l.Fragment,{children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(zv,{children:[l.jsx($v,{asChild:!0,children:l.jsx(Ue,{variant:"link",className:"p-0",children:n("delete")})}),l.jsxs(mh,{children:[l.jsxs(gh,{children:[l.jsx(vh,{children:n("domain.delete")}),l.jsx(xh,{children:n("domain.management.delete.confirm")})]}),l.jsxs(yh,{children:[l.jsx(bh,{children:n("cancel")}),l.jsx(wh,{onClick:()=>{y(_.id)},children:n("confirm")})]})]})]}),l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>f(_.id),children:n("edit")})]})]})]},_.id)}),l.jsx(Pj,{totalPages:a,currentPage:o?Number(o):1,onPageChange:_=>{d(_)}})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(Lm,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:n("domain.management.empty")}),l.jsx(Ue,{onClick:u,className:"mt-3",children:n("domain.add")})]})})]})})},Ne=v.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:oe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Ne.displayName="Input";var Jc=e=>e.type==="checkbox",ta=e=>e instanceof Date,bn=e=>e==null;const TE=e=>typeof e=="object";var Xt=e=>!bn(e)&&!Array.isArray(e)&&TE(e)&&!ta(e),RE=e=>Xt(e)&&e.target?Jc(e.target)?e.target.checked:e.target.value:e,q$=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,PE=(e,t)=>e.has(q$(t)),X$=e=>{const t=e.constructor&&e.constructor.prototype;return Xt(t)&&t.hasOwnProperty("isPrototypeOf")},Kv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Nn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Kv&&(e instanceof Blob||e instanceof FileList))&&(n||Xt(e)))if(t=n?[]:{},!n&&!X$(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Nn(e[r]));else return e;return t}var kh=e=>Array.isArray(e)?e.filter(Boolean):[],$t=e=>e===void 0,de=(e,t,n)=>{if(!t||!Xt(e))return n;const r=kh(t.split(/[,[\].]+?/)).reduce((s,o)=>bn(s)?s:s[o],e);return $t(r)||r===e?$t(e[t])?n:e[t]:r},Br=e=>typeof e=="boolean",Gv=e=>/^\w*$/.test(e),AE=e=>kh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),pt=(e,t,n)=>{let r=-1;const s=Gv(t)?[t]:AE(t),o=s.length,i=o-1;for(;++r<o;){const a=s[r];let c=n;if(r!==i){const u=e[a];c=Xt(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(a==="__proto__")return;e[a]=c,e=e[a]}return e};const Qd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},wr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},cs={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},OE=We.createContext(null),Ch=()=>We.useContext(OE),Q$=e=>{const{children:t,...n}=e;return We.createElement(OE.Provider,{value:n},t)};var DE=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==wr.all&&(t._proxyFormState[i]=!r||wr.all),n&&(n[i]=!0),e[i]}});return s},Fn=e=>Xt(e)&&!Object.keys(e).length,IE=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return Fn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||wr.all))},$l=e=>Array.isArray(e)?e:[e],ME=(e,t,n)=>!e||!t||e===t||$l(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Zv(e){const t=We.useRef(e);t.current=e,We.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function J$(e){const t=Ch(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,a]=We.useState(n._formState),c=We.useRef(!0),u=We.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=We.useRef(s);return d.current=s,Zv({disabled:r,next:f=>c.current&&ME(d.current,f.name,o)&&IE(f,u.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),We.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),DE(i,n,u.current,!1)}var Hr=e=>typeof e=="string",LE=(e,t,n,r,s)=>Hr(e)?(r&&t.watch.add(e),de(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),de(n,o))):(r&&(t.watchAll=!0),n);function e8(e){const t=Ch(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},a=We.useRef(r);a.current=r,Zv({disabled:o,subject:n._subjects.values,next:d=>{ME(a.current,d.name,i)&&u(Nn(LE(a.current,n._names,d.values||n._formValues,!1,s)))}});const[c,u]=We.useState(n._getWatch(r,s));return We.useEffect(()=>n._removeUnmounted()),c}function t8(e){const t=Ch(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=PE(s._names.array,n),a=e8({control:s,name:n,defaultValue:de(s._formValues,n,de(s._defaultValues,n,e.defaultValue)),exact:!0}),c=J$({control:s,name:n}),u=We.useRef(s.register(n,{...e.rules,value:a,...Br(e.disabled)?{disabled:e.disabled}:{}}));return We.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(h,y)=>{const x=de(s._fields,h);x&&x._f&&(x._f.mount=y)};if(f(n,!0),d){const h=Nn(de(s._options.defaultValues,n));pt(s._defaultValues,n,h),$t(de(s._formValues,n))&&pt(s._formValues,n,h)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),We.useEffect(()=>{de(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:de(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Br(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:We.useCallback(d=>u.current.onChange({target:{value:RE(d),name:n},type:Qd.CHANGE}),[n]),onBlur:We.useCallback(()=>u.current.onBlur({target:{value:de(s._formValues,n),name:n},type:Qd.BLUR}),[n,s]),ref:d=>{const f=de(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:h=>d.setCustomValidity(h),reportValidity:()=>d.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!de(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!de(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!de(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!de(c.validatingFields,n)},error:{enumerable:!0,get:()=>de(c.errors,n)}})}}const n8=e=>e.render(t8(e));var FE=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Qw=e=>({isOnSubmit:!e||e===wr.onSubmit,isOnBlur:e===wr.onBlur,isOnChange:e===wr.onChange,isOnAll:e===wr.all,isOnTouch:e===wr.onTouched}),Jw=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ul=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=de(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)break;if(i.ref&&t(i.ref,i.name)&&!r)break;Ul(a,t)}else Xt(a)&&Ul(a,t)}}};var r8=(e,t,n)=>{const r=$l(de(e,n));return pt(r,"root",t[n]),pt(e,n,r),e},qv=e=>e.type==="file",co=e=>typeof e=="function",Jd=e=>{if(!Kv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},dd=e=>Hr(e),Xv=e=>e.type==="radio",ef=e=>e instanceof RegExp;const e1={value:!1,isValid:!1},t1={value:!0,isValid:!0};var zE=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!$t(e[0].attributes.value)?$t(e[0].value)||e[0].value===""?t1:{value:e[0].value,isValid:!0}:t1:e1}return e1};const n1={isValid:!1,value:null};var $E=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,n1):n1;function r1(e,t,n="validate"){if(dd(e)||Array.isArray(e)&&e.every(dd)||Br(e)&&!e)return{type:n,message:dd(e)?e:"",ref:t}}var Di=e=>Xt(e)&&!ef(e)?e:{value:e,message:""},s1=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:a,maxLength:c,minLength:u,min:d,max:f,pattern:h,validate:y,name:x,valueAsNumber:g,mount:w,disabled:m}=e._f,p=de(t,x);if(!w||m)return{};const b=i?i[0]:o,_=N=>{r&&b.reportValidity&&(b.setCustomValidity(Br(N)?"":N||""),b.reportValidity())},C={},j=Xv(o),T=Jc(o),P=j||T,A=(g||qv(o))&&$t(o.value)&&$t(p)||Jd(o)&&o.value===""||p===""||Array.isArray(p)&&!p.length,D=FE.bind(null,x,n,C),G=(N,F,S,U=cs.maxLength,J=cs.minLength)=>{const z=N?F:S;C[x]={type:N?U:J,message:z,ref:o,...D(N?U:J,z)}};if(s?!Array.isArray(p)||!p.length:a&&(!P&&(A||bn(p))||Br(p)&&!p||T&&!zE(i).isValid||j&&!$E(i).isValid)){const{value:N,message:F}=dd(a)?{value:!!a,message:a}:Di(a);if(N&&(C[x]={type:cs.required,message:F,ref:b,...D(cs.required,F)},!n))return _(F),C}if(!A&&(!bn(d)||!bn(f))){let N,F;const S=Di(f),U=Di(d);if(!bn(p)&&!isNaN(p)){const J=o.valueAsNumber||p&&+p;bn(S.value)||(N=J>S.value),bn(U.value)||(F=J<U.value)}else{const J=o.valueAsDate||new Date(p),z=X=>new Date(new Date().toDateString()+" "+X),W=o.type=="time",I=o.type=="week";Hr(S.value)&&p&&(N=W?z(p)>z(S.value):I?p>S.value:J>new Date(S.value)),Hr(U.value)&&p&&(F=W?z(p)<z(U.value):I?p<U.value:J<new Date(U.value))}if((N||F)&&(G(!!N,S.message,U.message,cs.max,cs.min),!n))return _(C[x].message),C}if((c||u)&&!A&&(Hr(p)||s&&Array.isArray(p))){const N=Di(c),F=Di(u),S=!bn(N.value)&&p.length>+N.value,U=!bn(F.value)&&p.length<+F.value;if((S||U)&&(G(S,N.message,F.message),!n))return _(C[x].message),C}if(h&&!A&&Hr(p)){const{value:N,message:F}=Di(h);if(ef(N)&&!p.match(N)&&(C[x]={type:cs.pattern,message:F,ref:o,...D(cs.pattern,F)},!n))return _(F),C}if(y){if(co(y)){const N=await y(p,t),F=r1(N,b);if(F&&(C[x]={...F,...D(cs.validate,F.message)},!n))return _(F.message),C}else if(Xt(y)){let N={};for(const F in y){if(!Fn(N)&&!n)break;const S=r1(await y[F](p,t),b,F);S&&(N={...S,...D(F,S.message)},_(S.message),n&&(C[x]=N))}if(!Fn(N)&&(C[x]={ref:b,...N},!n))return C}}return _(!0),C};function s8(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=$t(e)?r++:e[t[r++]];return e}function o8(e){for(const t in e)if(e.hasOwnProperty(t)&&!$t(e[t]))return!1;return!0}function Kt(e,t){const n=Array.isArray(t)?t:Gv(t)?[t]:AE(t),r=n.length===1?e:s8(e,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(Xt(r)&&Fn(r)||Array.isArray(r)&&o8(r))&&Kt(e,n.slice(0,-1)),e}var Ip=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},tf=e=>bn(e)||!TE(e);function qo(e,t){if(tf(e)||tf(t))return e===t;if(ta(e)&&ta(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(ta(o)&&ta(i)||Xt(o)&&Xt(i)||Array.isArray(o)&&Array.isArray(i)?!qo(o,i):o!==i)return!1}}return!0}var UE=e=>e.type==="select-multiple",i8=e=>Xv(e)||Jc(e),Mp=e=>Jd(e)&&e.isConnected,VE=e=>{for(const t in e)if(co(e[t]))return!0;return!1};function nf(e,t={}){const n=Array.isArray(e);if(Xt(e)||n)for(const r in e)Array.isArray(e[r])||Xt(e[r])&&!VE(e[r])?(t[r]=Array.isArray(e[r])?[]:{},nf(e[r],t[r])):bn(e[r])||(t[r]=!0);return t}function BE(e,t,n){const r=Array.isArray(e);if(Xt(e)||r)for(const s in e)Array.isArray(e[s])||Xt(e[s])&&!VE(e[s])?$t(t)||tf(n[s])?n[s]=Array.isArray(e[s])?nf(e[s],[]):{...nf(e[s])}:BE(e[s],bn(t)?{}:t[s],n[s]):n[s]=!qo(e[s],t[s]);return n}var $u=(e,t)=>BE(e,t,nf(t)),WE=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>$t(e)?e:t?e===""?NaN:e&&+e:n&&Hr(e)?new Date(e):r?r(e):e;function Lp(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return qv(t)?t.files:Xv(t)?$E(e.refs).value:UE(t)?[...t.selectedOptions].map(({value:n})=>n):Jc(t)?zE(e.refs).value:WE($t(t.value)?e.ref.value:t.value,e)}var a8=(e,t,n,r)=>{const s={};for(const o of e){const i=de(t,o);i&&pt(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},fl=e=>$t(e)?e:ef(e)?e.source:Xt(e)?ef(e.value)?e.value.source:e.value:e,l8=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function o1(e,t,n){const r=de(e,n);if(r||Gv(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=de(t,o),a=de(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var c8=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,u8=(e,t)=>!kh(de(e,t)).length&&Kt(e,t);const d8={mode:wr.onSubmit,reValidateMode:wr.onChange,shouldFocusError:!0};function f8(e={}){let t={...d8,...e},n={submitCount:0,isDirty:!1,isLoading:co(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Xt(t.defaultValues)||Xt(t.values)?Nn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Nn(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Ip(),array:Ip(),state:Ip()},h=Qw(t.mode),y=Qw(t.reValidateMode),x=t.criteriaMode===wr.all,g=k=>R=>{clearTimeout(u),u=setTimeout(k,R)},w=async k=>{if(d.isValid||k){const R=t.resolver?Fn((await P()).errors):await D(r,!0);R!==n.isValid&&f.state.next({isValid:R})}},m=(k,R)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(M=>{M&&(R?pt(n.validatingFields,M,R):Kt(n.validatingFields,M))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Fn(n.validatingFields)}))},p=(k,R=[],M,K,L=!0,Y=!0)=>{if(K&&M){if(i.action=!0,Y&&Array.isArray(de(r,k))){const Q=M(de(r,k),K.argA,K.argB);L&&pt(r,k,Q)}if(Y&&Array.isArray(de(n.errors,k))){const Q=M(de(n.errors,k),K.argA,K.argB);L&&pt(n.errors,k,Q),u8(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(de(n.touchedFields,k))){const Q=M(de(n.touchedFields,k),K.argA,K.argB);L&&pt(n.touchedFields,k,Q)}d.dirtyFields&&(n.dirtyFields=$u(s,o)),f.state.next({name:k,isDirty:N(k,R),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else pt(o,k,R)},b=(k,R)=>{pt(n.errors,k,R),f.state.next({errors:n.errors})},_=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,R,M,K)=>{const L=de(r,k);if(L){const Y=de(o,k,$t(M)?de(s,k):M);$t(Y)||K&&K.defaultChecked||R?pt(o,k,R?Y:Lp(L._f)):U(k,Y),i.mount&&w()}},j=(k,R,M,K,L)=>{let Y=!1,Q=!1;const te={name:k},me=!!(de(r,k)&&de(r,k)._f&&de(r,k)._f.disabled);if(!M||K){d.isDirty&&(Q=n.isDirty,n.isDirty=te.isDirty=N(),Y=Q!==te.isDirty);const Ye=me||qo(de(s,k),R);Q=!!(!me&&de(n.dirtyFields,k)),Ye||me?Kt(n.dirtyFields,k):pt(n.dirtyFields,k,!0),te.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&Q!==!Ye}if(M){const Ye=de(n.touchedFields,k);Ye||(pt(n.touchedFields,k,M),te.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&Ye!==M)}return Y&&L&&f.state.next(te),Y?te:{}},T=(k,R,M,K)=>{const L=de(n.errors,k),Y=d.isValid&&Br(R)&&n.isValid!==R;if(e.delayError&&M?(c=g(()=>b(k,M)),c(e.delayError)):(clearTimeout(u),c=null,M?pt(n.errors,k,M):Kt(n.errors,k)),(M?!qo(L,M):L)||!Fn(K)||Y){const Q={...K,...Y&&Br(R)?{isValid:R}:{},errors:n.errors,name:k};n={...n,...Q},f.state.next(Q)}},P=async k=>{m(k,!0);const R=await t.resolver(o,t.context,a8(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return m(k),R},A=async k=>{const{errors:R}=await P(k);if(k)for(const M of k){const K=de(R,M);K?pt(n.errors,M,K):Kt(n.errors,M)}else n.errors=R;return R},D=async(k,R,M={valid:!0})=>{for(const K in k){const L=k[K];if(L){const{_f:Y,...Q}=L;if(Y){const te=a.array.has(Y.name);m([K],!0);const me=await s1(L,o,x,t.shouldUseNativeValidation&&!R,te);if(m([K]),me[Y.name]&&(M.valid=!1,R))break;!R&&(de(me,Y.name)?te?r8(n.errors,me,Y.name):pt(n.errors,Y.name,me[Y.name]):Kt(n.errors,Y.name))}Q&&await D(Q,R,M)}}return M.valid},G=()=>{for(const k of a.unMount){const R=de(r,k);R&&(R._f.refs?R._f.refs.every(M=>!Mp(M)):!Mp(R._f.ref))&&De(k)}a.unMount=new Set},N=(k,R)=>(k&&R&&pt(o,k,R),!qo($(),s)),F=(k,R,M)=>LE(k,a,{...i.mount?o:$t(R)?s:Hr(k)?{[k]:R}:R},M,R),S=k=>kh(de(i.mount?o:s,k,e.shouldUnregister?de(s,k,[]):[])),U=(k,R,M={})=>{const K=de(r,k);let L=R;if(K){const Y=K._f;Y&&(!Y.disabled&&pt(o,k,WE(R,Y)),L=Jd(Y.ref)&&bn(R)?"":R,UE(Y.ref)?[...Y.ref.options].forEach(Q=>Q.selected=L.includes(Q.value)):Y.refs?Jc(Y.ref)?Y.refs.length>1?Y.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(L)?!!L.find(te=>te===Q.value):L===Q.value)):Y.refs[0]&&(Y.refs[0].checked=!!L):Y.refs.forEach(Q=>Q.checked=Q.value===L):qv(Y.ref)?Y.ref.value="":(Y.ref.value=L,Y.ref.type||f.values.next({name:k,values:{...o}})))}(M.shouldDirty||M.shouldTouch)&&j(k,L,M.shouldTouch,M.shouldDirty,!0),M.shouldValidate&&X(k)},J=(k,R,M)=>{for(const K in R){const L=R[K],Y=`${k}.${K}`,Q=de(r,Y);(a.array.has(k)||!tf(L)||Q&&!Q._f)&&!ta(L)?J(Y,L,M):U(Y,L,M)}},z=(k,R,M={})=>{const K=de(r,k),L=a.array.has(k),Y=Nn(R);pt(o,k,Y),L?(f.array.next({name:k,values:{...o}}),(d.isDirty||d.dirtyFields)&&M.shouldDirty&&f.state.next({name:k,dirtyFields:$u(s,o),isDirty:N(k,Y)})):K&&!K._f&&!bn(Y)?J(k,Y,M):U(k,Y,M),Jw(k,a)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},W=async k=>{i.mount=!0;const R=k.target;let M=R.name,K=!0;const L=de(r,M),Y=()=>R.type?Lp(L._f):RE(k),Q=te=>{K=Number.isNaN(te)||te===de(o,M,te)};if(L){let te,me;const Ye=Y(),$e=k.type===Qd.BLUR||k.type===Qd.FOCUS_OUT,Et=!l8(L._f)&&!t.resolver&&!de(n.errors,M)&&!L._f.deps||c8($e,de(n.touchedFields,M),n.isSubmitted,y,h),Jn=Jw(M,a,$e);pt(o,M,Ye),$e?(L._f.onBlur&&L._f.onBlur(k),c&&c(0)):L._f.onChange&&L._f.onChange(k);const Yt=j(M,Ye,$e,!1),rs=!Fn(Yt)||Jn;if(!$e&&f.values.next({name:M,type:k.type,values:{...o}}),Et)return d.isValid&&w(),rs&&f.state.next({name:M,...Jn?{}:Yt});if(!$e&&Jn&&f.state.next({...n}),t.resolver){const{errors:at}=await P([M]);if(Q(Ye),K){const ss=o1(n.errors,r,M),os=o1(at,r,ss.name||M);te=os.error,M=os.name,me=Fn(at)}}else m([M],!0),te=(await s1(L,o,x,t.shouldUseNativeValidation))[M],m([M]),Q(Ye),K&&(te?me=!1:d.isValid&&(me=await D(r,!0)));K&&(L._f.deps&&X(L._f.deps),T(M,me,te,Yt))}},I=(k,R)=>{if(de(n.errors,R)&&k.focus)return k.focus(),1},X=async(k,R={})=>{let M,K;const L=$l(k);if(t.resolver){const Y=await A($t(k)?k:L);M=Fn(Y),K=k?!L.some(Q=>de(Y,Q)):M}else k?(K=(await Promise.all(L.map(async Y=>{const Q=de(r,Y);return await D(Q&&Q._f?{[Y]:Q}:Q)}))).every(Boolean),!(!K&&!n.isValid)&&w()):K=M=await D(r);return f.state.next({...!Hr(k)||d.isValid&&M!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:M}:{},errors:n.errors}),R.shouldFocus&&!K&&Ul(r,I,k?L:a.mount),K},$=k=>{const R={...i.mount?o:s};return $t(k)?R:Hr(k)?de(R,k):k.map(M=>de(R,M))},B=(k,R)=>({invalid:!!de((R||n).errors,k),isDirty:!!de((R||n).dirtyFields,k),error:de((R||n).errors,k),isValidating:!!de(n.validatingFields,k),isTouched:!!de((R||n).touchedFields,k)}),he=k=>{k&&$l(k).forEach(R=>Kt(n.errors,R)),f.state.next({errors:k?n.errors:{}})},re=(k,R,M)=>{const K=(de(r,k,{_f:{}})._f||{}).ref,L=de(n.errors,k)||{},{ref:Y,message:Q,type:te,...me}=L;pt(n.errors,k,{...me,...R,ref:K}),f.state.next({name:k,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&K&&K.focus&&K.focus()},se=(k,R)=>co(k)?f.values.subscribe({next:M=>k(F(void 0,R),M)}):F(k,R,!0),De=(k,R={})=>{for(const M of k?$l(k):a.mount)a.mount.delete(M),a.array.delete(M),R.keepValue||(Kt(r,M),Kt(o,M)),!R.keepError&&Kt(n.errors,M),!R.keepDirty&&Kt(n.dirtyFields,M),!R.keepTouched&&Kt(n.touchedFields,M),!R.keepIsValidating&&Kt(n.validatingFields,M),!t.shouldUnregister&&!R.keepDefaultValue&&Kt(s,M);f.values.next({values:{...o}}),f.state.next({...n,...R.keepDirty?{isDirty:N()}:{}}),!R.keepIsValid&&w()},pe=({disabled:k,name:R,field:M,fields:K,value:L})=>{if(Br(k)&&i.mount||k){const Y=k?void 0:$t(L)?Lp(M?M._f:de(K,R)._f):L;pt(o,R,Y),j(R,Y,!1,!1,!0)}},_e=(k,R={})=>{let M=de(r,k);const K=Br(R.disabled);return pt(r,k,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:k}},name:k,mount:!0,...R}}),a.mount.add(k),M?pe({field:M,disabled:R.disabled,name:k,value:R.value}):C(k,!0,R.value),{...K?{disabled:R.disabled}:{},...t.progressive?{required:!!R.required,min:fl(R.min),max:fl(R.max),minLength:fl(R.minLength),maxLength:fl(R.maxLength),pattern:fl(R.pattern)}:{},name:k,onChange:W,onBlur:W,ref:L=>{if(L){_e(k,R),M=de(r,k);const Y=$t(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Q=i8(Y),te=M._f.refs||[];if(Q?te.find(me=>me===Y):Y===M._f.ref)return;pt(r,k,{_f:{...M._f,...Q?{refs:[...te.filter(Mp),Y,...Array.isArray(de(s,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else M=de(r,k,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||R.shouldUnregister)&&!(PE(a.array,k)&&i.action)&&a.unMount.add(k)}}},Te=()=>t.shouldFocusError&&Ul(r,I,a.mount),Fe=k=>{Br(k)&&(f.state.next({disabled:k}),Ul(r,(R,M)=>{const K=de(r,M);K&&(R.disabled=K._f.disabled||k,Array.isArray(K._f.refs)&&K._f.refs.forEach(L=>{L.disabled=K._f.disabled||k}))},0,!1))},Ie=(k,R)=>async M=>{let K;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let L=Nn(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:Q}=await P();n.errors=Y,L=Q}else await D(r);if(Kt(n.errors,"root"),Fn(n.errors)){f.state.next({errors:{}});try{await k(L,M)}catch(Y){K=Y}}else R&&await R({...n.errors},M),Te(),setTimeout(Te);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Fn(n.errors)&&!K,submitCount:n.submitCount+1,errors:n.errors}),K)throw K},Pe=(k,R={})=>{de(r,k)&&($t(R.defaultValue)?z(k,Nn(de(s,k))):(z(k,R.defaultValue),pt(s,k,Nn(R.defaultValue))),R.keepTouched||Kt(n.touchedFields,k),R.keepDirty||(Kt(n.dirtyFields,k),n.isDirty=R.defaultValue?N(k,Nn(de(s,k))):N()),R.keepError||(Kt(n.errors,k),d.isValid&&w()),f.state.next({...n}))},rt=(k,R={})=>{const M=k?Nn(k):s,K=Nn(M),L=Fn(k),Y=L?s:K;if(R.keepDefaultValues||(s=M),!R.keepValues){if(R.keepDirtyValues)for(const Q of a.mount)de(n.dirtyFields,Q)?pt(Y,Q,de(o,Q)):z(Q,de(Y,Q));else{if(Kv&&$t(k))for(const Q of a.mount){const te=de(r,Q);if(te&&te._f){const me=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(Jd(me)){const Ye=me.closest("form");if(Ye){Ye.reset();break}}}}r={}}o=e.shouldUnregister?R.keepDefaultValues?Nn(s):{}:Nn(Y),f.array.next({values:{...Y}}),f.values.next({values:{...Y}})}a={mount:R.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!R.keepIsValid||!!R.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:R.keepSubmitCount?n.submitCount:0,isDirty:L?!1:R.keepDirty?n.isDirty:!!(R.keepDefaultValues&&!qo(k,s)),isSubmitted:R.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:L?{}:R.keepDirtyValues?R.keepDefaultValues&&o?$u(s,o):n.dirtyFields:R.keepDefaultValues&&k?$u(s,k):R.keepDirty?n.dirtyFields:{},touchedFields:R.keepTouched?n.touchedFields:{},errors:R.keepErrors?n.errors:{},isSubmitSuccessful:R.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},E=(k,R)=>rt(co(k)?k(o):k,R);return{control:{register:_e,unregister:De,getFieldState:B,handleSubmit:Ie,setError:re,_executeSchema:P,_getWatch:F,_getDirty:N,_updateValid:w,_removeUnmounted:G,_updateFieldArray:p,_updateDisabledField:pe,_getFieldArray:S,_reset:rt,_resetDefaultValues:()=>co(t.defaultValues)&&t.defaultValues().then(k=>{E(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:Fe,_subjects:f,_proxyFormState:d,_setErrors:_,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(k){i=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:X,register:_e,handleSubmit:Ie,watch:se,setValue:z,getValues:$,reset:E,resetField:Pe,clearErrors:he,unregister:De,setError:re,setFocus:(k,R={})=>{const M=de(r,k),K=M&&M._f;if(K){const L=K.refs?K.refs[0]:K.ref;L.focus&&(L.focus(),R.shouldSelect&&L.select())}},getFieldState:B}}function pn(e={}){const t=We.useRef(),n=We.useRef(),[r,s]=We.useState({isDirty:!1,isValidating:!1,isLoading:co(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:co(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...f8(e),formState:r});const o=t.current.control;return o._options=e,Zv({subject:o._subjects.state,next:i=>{IE(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),We.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),We.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),We.useEffect(()=>{e.values&&!qo(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),We.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),We.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),We.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=DE(r,o),t.current}const i1=(e,t,n)=>{if(e&&"reportValidity"in e){const r=de(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},HE=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?i1(r.ref,n,e):r.refs&&r.refs.forEach(s=>i1(s,n,e))}},h8=(e,t)=>{t.shouldUseNativeValidation&&HE(e,t);const n={};for(const r in e){const s=de(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(p8(t.names||Object.keys(e),r)){const i=Object.assign({},de(n,r));pt(i,"root",o),pt(n,r,i)}else pt(n,r,o)}return n},p8=(e,t)=>e.some(n=>n.startsWith(t+"."));var m8=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=n[i].types,u=c&&c[r.code];n[i]=FE(i,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},mn=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,a){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return o.shouldUseNativeValidation&&HE({},o),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:h8(m8(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},ot;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(ot||(ot={}));var ag;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ag||(ag={}));const Ce=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),no=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ae=ot.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"]),g8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Kn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),r}static assert(t){if(!(t instanceof Kn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ot.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Kn.create=e=>new Kn(e);const Ra=(e,t)=>{let n;switch(e.code){case ae.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ae.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case ae.unrecognized_keys:n=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case ae.invalid_union:n="Invalid input";break;case ae.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case ae.invalid_enum_value:n=`Invalid enum value. Expected ${ot.joinValues(e.options)}, received '${e.received}'`;break;case ae.invalid_arguments:n="Invalid function arguments";break;case ae.invalid_return_type:n="Invalid function return type";break;case ae.invalid_date:n="Invalid date";break;case ae.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ot.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ae.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ae.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ae.custom:n="Invalid input";break;case ae.invalid_intersection_types:n="Intersection results could not be merged";break;case ae.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ae.not_finite:n="Number must be finite";break;default:n=t.defaultError,ot.assertNever(e)}return{message:n}};let YE=Ra;function y8(e){YE=e}function rf(){return YE}const sf=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},v8=[];function ye(e,t){const n=rf(),r=sf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ra?void 0:Ra].filter(s=>!!s)});e.common.issues.push(r)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return He;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return hn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return He;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:t.value,value:r}}}const He=Object.freeze({status:"aborted"}),na=e=>({status:"dirty",value:e}),Sn=e=>({status:"valid",value:e}),lg=e=>e.status==="aborted",cg=e=>e.status==="dirty",yc=e=>e.status==="valid",vc=e=>typeof Promise<"u"&&e instanceof Promise;function of(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function KE(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));var _l,Sl;class Qr{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const a1=(e,t)=>{if(yc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Kn(e.common.issues);return this._error=n,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var c,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class Je{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 no(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:no(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hn,ctx:{common:t.parent.common,data:t.data,parsedType:no(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(vc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:no(t)},o=this._parseSync({data:t,path:s.path,parent:s});return a1(s,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:no(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(vc(s)?s:Promise.resolve(s));return a1(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:ae.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Pr({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Zr.create(this,this._def)}nullable(){return To.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this,this._def)}promise(){return Aa.create(this,this._def)}or(t){return _c.create([this,t],this._def)}and(t){return Sc.create(this,t,this._def)}transform(t){return new Pr({...Ge(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Nc({...Ge(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new Qv({typeName:Ve.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Tc({...Ge(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return eu.create(this,t)}readonly(){return Rc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const x8=/^c[^\s-]{8,}$/i,w8=/^[0-9a-z]+$/,b8=/^[0-9A-HJKMNP-TV-Z]{26}$/,_8=/^[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,S8=/^[a-z0-9_-]{21}$/i,k8=/^[-+]?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)?)??$/,C8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,j8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fp;const E8=/^(?:(?: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])$/,N8=/^(([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})))$/,T8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,GE="((\\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])))",R8=new RegExp(`^${GE}$`);function ZE(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 P8(e){return new RegExp(`^${ZE(e)}$`)}function qE(e){let t=`${GE}T${ZE(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function A8(e,t){return!!((t==="v4"||!t)&&E8.test(e)||(t==="v6"||!t)&&N8.test(e))}class _r extends Je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const o=this._getOrReturnCtx(t);return ye(o,{code:ae.invalid_type,expected:Ce.string,received:o.parsedType}),He}const r=new hn;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?ye(s,{code:ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&ye(s,{code:ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")C8.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"email",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Fp||(Fp=new RegExp(j8,"u")),Fp.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"emoji",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")_8.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"uuid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")S8.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"nanoid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")x8.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"cuid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")w8.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"cuid2",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")b8.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"ulid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ye(s,{validation:"url",code:ae.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"regex",code:ae.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?qE(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?R8.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?P8(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?k8.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"duration",code:ae.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?A8(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"ip",code:ae.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?T8.test(t.data)||(s=this._getOrReturnCtx(t,s),ye(s,{validation:"base64",code:ae.invalid_string,message:o.message}),r.dirty()):ot.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:ae.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new _r({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Oe.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,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new _r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_r.create=e=>{var t;return new _r({checks:[],typeName:Ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};function O8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class jo extends Je{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)!==Ce.number){const o=this._getOrReturnCtx(t);return ye(o,{code:ae.invalid_type,expected:Ce.number,received:o.parsedType}),He}let r;const s=new hn;for(const o of this._def.checks)o.kind==="int"?ot.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?O8(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.not_finite,message:o.message}),s.dirty()):ot.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new jo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ot.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}jo.create=e=>new jo({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class Eo extends Je{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)!==Ce.bigint){const o=this._getOrReturnCtx(t);return ye(o,{code:ae.invalid_type,expected:Ce.bigint,received:o.parsedType}),He}let r;const s=new hn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):ot.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new Eo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new Eo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Eo.create=e=>{var t;return new Eo({checks:[],typeName:Ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};class xc extends Je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.boolean,received:r.parsedType}),He}return Sn(t.data)}}xc.create=e=>new xc({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class fi extends Je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const o=this._getOrReturnCtx(t);return ye(o,{code:ae.invalid_type,expected:Ce.date,received:o.parsedType}),He}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ye(o,{code:ae.invalid_date}),He}const r=new hn;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):ot.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new fi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}fi.create=e=>new fi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...Ge(e)});class af extends Je{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.symbol,received:r.parsedType}),He}return Sn(t.data)}}af.create=e=>new af({typeName:Ve.ZodSymbol,...Ge(e)});class wc extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.undefined,received:r.parsedType}),He}return Sn(t.data)}}wc.create=e=>new wc({typeName:Ve.ZodUndefined,...Ge(e)});class bc extends Je{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.null,received:r.parsedType}),He}return Sn(t.data)}}bc.create=e=>new bc({typeName:Ve.ZodNull,...Ge(e)});class Pa extends Je{constructor(){super(...arguments),this._any=!0}_parse(t){return Sn(t.data)}}Pa.create=e=>new Pa({typeName:Ve.ZodAny,...Ge(e)});class ni extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Sn(t.data)}}ni.create=e=>new ni({typeName:Ve.ZodUnknown,...Ge(e)});class Ps extends Je{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ae.invalid_type,expected:Ce.never,received:n.parsedType}),He}}Ps.create=e=>new Ps({typeName:Ve.ZodNever,...Ge(e)});class lf extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.void,received:r.parsedType}),He}return Sn(t.data)}}lf.create=e=>new lf({typeName:Ve.ZodVoid,...Ge(e)});class Cr extends Je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==Ce.array)return ye(n,{code:ae.invalid_type,expected:Ce.array,received:n.parsedType}),He;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(i||a)&&(ye(n,{code:i?ae.too_big:ae.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ye(n,{code:ae.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ye(n,{code:ae.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new Qr(n,i,n.path,a)))).then(i=>hn.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new Qr(n,i,n.path,a)));return hn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Cr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new Cr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new Cr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}Cr.create=(e,t)=>new Cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ge(t)});function Fi(e){if(e instanceof At){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Zr.create(Fi(r))}return new At({...e._def,shape:()=>t})}else return e instanceof Cr?new Cr({...e._def,type:Fi(e.element)}):e instanceof Zr?Zr.create(Fi(e.unwrap())):e instanceof To?To.create(Fi(e.unwrap())):e instanceof Jr?Jr.create(e.items.map(t=>Fi(t))):e}class At extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ot.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ce.object){const u=this._getOrReturnCtx(t);return ye(u,{code:ae.invalid_type,expected:Ce.object,received:u.parsedType}),He}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ps&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||a.push(u);const c=[];for(const u of i){const d=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Qr(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Ps){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ye(s,{code:ae.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Qr(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>hn.mergeObjectSync(r,u)):hn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new At({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const c=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Oe.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new At({...this._def,unknownKeys:"strip"})}passthrough(){return new At({...this._def,unknownKeys:"passthrough"})}extend(t){return new At({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new At({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new At({...this._def,catchall:t})}pick(t){const n={};return ot.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}omit(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}deepPartial(){return Fi(this)}partial(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new At({...this._def,shape:()=>n})}required(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Zr;)o=o._def.innerType;n[r]=o}}),new At({...this._def,shape:()=>n})}keyof(){return XE(ot.objectKeys(this.shape))}}At.create=(e,t)=>new At({shape:()=>e,unknownKeys:"strip",catchall:Ps.create(),typeName:Ve.ZodObject,...Ge(t)});At.strictCreate=(e,t)=>new At({shape:()=>e,unknownKeys:"strict",catchall:Ps.create(),typeName:Ve.ZodObject,...Ge(t)});At.lazycreate=(e,t)=>new At({shape:e,unknownKeys:"strip",catchall:Ps.create(),typeName:Ve.ZodObject,...Ge(t)});class _c extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Kn(a.ctx.common.issues));return ye(n,{code:ae.invalid_union,unionErrors:i}),He}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(c=>new Kn(c));return ye(n,{code:ae.invalid_union,unionErrors:a}),He}}get options(){return this._def.options}}_c.create=(e,t)=>new _c({options:e,typeName:Ve.ZodUnion,...Ge(t)});const us=e=>e instanceof Cc?us(e.schema):e instanceof Pr?us(e.innerType()):e instanceof jc?[e.value]:e instanceof No?e.options:e instanceof Ec?ot.objectValues(e.enum):e instanceof Nc?us(e._def.innerType):e instanceof wc?[void 0]:e instanceof bc?[null]:e instanceof Zr?[void 0,...us(e.unwrap())]:e instanceof To?[null,...us(e.unwrap())]:e instanceof Qv||e instanceof Rc?us(e.unwrap()):e instanceof Tc?us(e._def.innerType):[];class jh extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return ye(n,{code:ae.invalid_type,expected:Ce.object,received:n.parsedType}),He;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:ae.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),He)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const i=us(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new jh({typeName:Ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ge(r)})}}function ug(e,t){const n=no(e),r=no(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const s=ot.objectKeys(t),o=ot.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const c=ug(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const i=e[o],a=t[o],c=ug(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===Ce.date&&r===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Sc extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,i)=>{if(lg(o)||lg(i))return He;const a=ug(o.value,i.value);return a.valid?((cg(o)||cg(i))&&n.dirty(),{status:n.value,value:a.data}):(ye(r,{code:ae.invalid_intersection_types}),He)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Sc.create=(e,t,n)=>new Sc({left:e,right:t,typeName:Ve.ZodIntersection,...Ge(n)});class Jr extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return ye(r,{code:ae.invalid_type,expected:Ce.array,received:r.parsedType}),He;if(r.data.length<this._def.items.length)return ye(r,{code:ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),He;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new Qr(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>hn.mergeArray(n,i)):hn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Jr({...this._def,rest:t})}}Jr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jr({items:e,typeName:Ve.ZodTuple,rest:null,...Ge(t)})};class kc extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.object)return ye(r,{code:ae.invalid_type,expected:Ce.object,received:r.parsedType}),He;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new Qr(r,a,r.path,a)),value:i._parse(new Qr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?hn.mergeObjectAsync(n,s):hn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Je?new kc({keyType:t,valueType:n,typeName:Ve.ZodRecord,...Ge(r)}):new kc({keyType:_r.create(),valueType:t,typeName:Ve.ZodRecord,...Ge(n)})}}class cf extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return ye(r,{code:ae.invalid_type,expected:Ce.map,received:r.parsedType}),He;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,c],u)=>({key:s._parse(new Qr(r,a,r.path,[u,"key"])),value:o._parse(new Qr(r,c,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of i){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of i){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}cf.create=(e,t,n)=>new cf({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ge(n)});class hi extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return ye(r,{code:ae.invalid_type,expected:Ce.set,received:r.parsedType}),He;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ye(r,{code:ae.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ye(r,{code:ae.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(c){const u=new Set;for(const d of c){if(d.status==="aborted")return He;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((c,u)=>o._parse(new Qr(r,c,r.path,u)));return r.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,n){return new hi({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new hi({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}hi.create=(e,t)=>new hi({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ge(t)});class xa extends Je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.function)return ye(n,{code:ae.invalid_type,expected:Ce.function,received:n.parsedType}),He;function r(a,c){return sf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rf(),Ra].filter(u=>!!u),issueData:{code:ae.invalid_arguments,argumentsError:c}})}function s(a,c){return sf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rf(),Ra].filter(u=>!!u),issueData:{code:ae.invalid_return_type,returnTypeError:c}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Aa){const a=this;return Sn(async function(...c){const u=new Kn([]),d=await a._def.args.parseAsync(c,o).catch(y=>{throw u.addIssue(r(c,y)),u}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(y=>{throw u.addIssue(s(f,y)),u})})}else{const a=this;return Sn(function(...c){const u=a._def.args.safeParse(c,o);if(!u.success)throw new Kn([r(c,u.error)]);const d=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new Kn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new xa({...this._def,args:Jr.create(t).rest(ni.create())})}returns(t){return new xa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new xa({args:t||Jr.create([]).rest(ni.create()),returns:n||ni.create(),typeName:Ve.ZodFunction,...Ge(r)})}}class Cc extends Je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Cc.create=(e,t)=>new Cc({getter:e,typeName:Ve.ZodLazy,...Ge(t)});class jc extends Je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ae.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:t.data}}get value(){return this._def.value}}jc.create=(e,t)=>new jc({value:e,typeName:Ve.ZodLiteral,...Ge(t)});function XE(e,t){return new No({values:e,typeName:Ve.ZodEnum,...Ge(t)})}class No extends Je{constructor(){super(...arguments),_l.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:ot.joinValues(r),received:n.parsedType,code:ae.invalid_type}),He}if(of(this,_l)||KE(this,_l,new Set(this._def.values)),!of(this,_l).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ae.invalid_enum_value,options:r}),He}return Sn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return No.create(t,{...this._def,...n})}exclude(t,n=this._def){return No.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}_l=new WeakMap;No.create=XE;class Ec extends Je{constructor(){super(...arguments),Sl.set(this,void 0)}_parse(t){const n=ot.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const s=ot.objectValues(n);return ye(r,{expected:ot.joinValues(s),received:r.parsedType,code:ae.invalid_type}),He}if(of(this,Sl)||KE(this,Sl,new Set(ot.getValidEnumValues(this._def.values))),!of(this,Sl).has(t.data)){const s=ot.objectValues(n);return ye(r,{received:r.data,code:ae.invalid_enum_value,options:s}),He}return Sn(t.data)}get enum(){return this._def.values}}Sl=new WeakMap;Ec.create=(e,t)=>new Ec({values:e,typeName:Ve.ZodNativeEnum,...Ge(t)});class Aa extends Je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return ye(n,{code:ae.invalid_type,expected:Ce.promise,received:n.parsedType}),He;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Sn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Ve.ZodPromise,...Ge(t)});class Pr extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{ye(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return He;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?He:c.status==="dirty"||n.value==="dirty"?na(c.value):c});{if(n.value==="aborted")return He;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?He:a.status==="dirty"||n.value==="dirty"?na(a.value):a}}if(s.type==="refinement"){const i=a=>{const c=s.refinement(a,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!yc(i))return i;const a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>yc(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);ot.assertNever(s)}}Pr.create=(e,t,n)=>new Pr({schema:e,typeName:Ve.ZodEffects,effect:t,...Ge(n)});Pr.createWithPreprocess=(e,t,n)=>new Pr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ge(n)});class Zr extends Je{_parse(t){return this._getType(t)===Ce.undefined?Sn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Zr.create=(e,t)=>new Zr({innerType:e,typeName:Ve.ZodOptional,...Ge(t)});class To extends Je{_parse(t){return this._getType(t)===Ce.null?Sn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}To.create=(e,t)=>new To({innerType:e,typeName:Ve.ZodNullable,...Ge(t)});class Nc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}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,...Ge(t)});class Tc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return vc(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Tc.create=(e,t)=>new Tc({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class uf extends Je{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.nan,received:r.parsedType}),He}return{status:"valid",value:t.data}}}uf.create=e=>new uf({typeName:Ve.ZodNaN,...Ge(e)});const D8=Symbol("zod_brand");class Qv extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class eu extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?He:o.status==="dirty"?(n.dirty(),na(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?He:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new eu({in:t,out:n,typeName:Ve.ZodPipeline})}}class Rc extends Je{_parse(t){const n=this._def.innerType._parse(t),r=s=>(yc(s)&&(s.value=Object.freeze(s.value)),s);return vc(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Rc.create=(e,t)=>new Rc({innerType:e,typeName:Ve.ZodReadonly,...Ge(t)});function QE(e,t={},n){return e?Pa.create().superRefine((r,s)=>{var o,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(i=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:c})}}):Pa.create()}const I8={object:At.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 M8=(e,t={message:`Input not instance of ${e.name}`})=>QE(n=>n instanceof e,t),JE=_r.create,eN=jo.create,L8=uf.create,F8=Eo.create,tN=xc.create,z8=fi.create,$8=af.create,U8=wc.create,V8=bc.create,B8=Pa.create,W8=ni.create,H8=Ps.create,Y8=lf.create,K8=Cr.create,G8=At.create,Z8=At.strictCreate,q8=_c.create,X8=jh.create,Q8=Sc.create,J8=Jr.create,eU=kc.create,tU=cf.create,nU=hi.create,rU=xa.create,sU=Cc.create,oU=jc.create,iU=No.create,aU=Ec.create,lU=Aa.create,l1=Pr.create,cU=Zr.create,uU=To.create,dU=Pr.createWithPreprocess,fU=eu.create,hU=()=>JE().optional(),pU=()=>eN().optional(),mU=()=>tN().optional(),gU={string:e=>_r.create({...e,coerce:!0}),number:e=>jo.create({...e,coerce:!0}),boolean:e=>xc.create({...e,coerce:!0}),bigint:e=>Eo.create({...e,coerce:!0}),date:e=>fi.create({...e,coerce:!0})},yU=He;var ce=Object.freeze({__proto__:null,defaultErrorMap:Ra,setErrorMap:y8,getErrorMap:rf,makeIssue:sf,EMPTY_PATH:v8,addIssueToContext:ye,ParseStatus:hn,INVALID:He,DIRTY:na,OK:Sn,isAborted:lg,isDirty:cg,isValid:yc,isAsync:vc,get util(){return ot},get objectUtil(){return ag},ZodParsedType:Ce,getParsedType:no,ZodType:Je,datetimeRegex:qE,ZodString:_r,ZodNumber:jo,ZodBigInt:Eo,ZodBoolean:xc,ZodDate:fi,ZodSymbol:af,ZodUndefined:wc,ZodNull:bc,ZodAny:Pa,ZodUnknown:ni,ZodNever:Ps,ZodVoid:lf,ZodArray:Cr,ZodObject:At,ZodUnion:_c,ZodDiscriminatedUnion:jh,ZodIntersection:Sc,ZodTuple:Jr,ZodRecord:kc,ZodMap:cf,ZodSet:hi,ZodFunction:xa,ZodLazy:Cc,ZodLiteral:jc,ZodEnum:No,ZodNativeEnum:Ec,ZodPromise:Aa,ZodEffects:Pr,ZodTransformer:Pr,ZodOptional:Zr,ZodNullable:To,ZodDefault:Nc,ZodCatch:Tc,ZodNaN:uf,BRAND:D8,ZodBranded:Qv,ZodPipeline:eu,ZodReadonly:Rc,custom:QE,Schema:Je,ZodSchema:Je,late:I8,get ZodFirstPartyTypeKind(){return Ve},coerce:gU,any:B8,array:K8,bigint:F8,boolean:tN,date:z8,discriminatedUnion:X8,effect:l1,enum:iU,function:rU,instanceof:M8,intersection:Q8,lazy:sU,literal:oU,map:tU,nan:L8,nativeEnum:aU,never:H8,null:V8,nullable:uU,number:eN,object:G8,oboolean:mU,onumber:pU,optional:cU,ostring:hU,pipeline:fU,preprocess:dU,promise:lU,record:eU,set:nU,strictObject:Z8,string:JE,symbol:$8,transformer:l1,tuple:J8,undefined:U8,union:q8,unknown:W8,void:Y8,NEVER:yU,ZodIssueCode:ae,quotelessJson:g8,ZodError:Kn}),vU="Label",nN=v.forwardRef((e,t)=>l.jsx(Re.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));nN.displayName=vU;var rN=nN;const xU=Lc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ro=v.forwardRef(({className:e,...t},n)=>l.jsx(rN,{ref:n,className:oe(xU(),e),...t}));Ro.displayName=rN.displayName;const gn=Q$,sN=v.createContext({}),Se=({...e})=>l.jsx(sN.Provider,{value:{name:e.name},children:l.jsx(n8,{...e})}),Eh=()=>{const e=v.useContext(sN),t=v.useContext(oN),{getFieldState:n,formState:r}=Ch(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},oN=v.createContext({}),ve=v.forwardRef(({className:e,...t},n)=>{const r=v.useId();return l.jsx(oN.Provider,{value:{id:r},children:l.jsx("div",{ref:n,className:oe("space-y-2",e),...t})})});ve.displayName="FormItem";const xe=v.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Eh();return l.jsx(Ro,{ref:n,className:oe(r&&"text-destructive",e),htmlFor:s,...t})});xe.displayName="FormLabel";const we=v.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=Eh();return l.jsx(Es,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});we.displayName="FormControl";const wU=v.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Eh();return l.jsx("p",{ref:n,id:r,className:oe("text-sm text-muted-foreground",e),...t})});wU.displayName="FormDescription";const ge=v.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=Eh(),{t:i}=ct(),a=s?i(String(s==null?void 0:s.message)):t;return a?l.jsx("p",{ref:r,id:o,className:oe("text-sm font-medium text-destructive",e),...n,children:a}):null});ge.displayName="FormMessage";function dg(e,[t,n]){return Math.min(n,Math.max(t,e))}var bU=[" ","Enter","ArrowUp","ArrowDown"],_U=[" ","Enter"],tu="Select",[Nh,Th,SU]=Fc(tu),[Za,AH]=on(tu,[SU,Ba]),Rh=Ba(),[kU,Io]=Za(tu),[CU,jU]=Za(tu),iN=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:y}=e,x=Rh(t),[g,w]=v.useState(null),[m,p]=v.useState(null),[b,_]=v.useState(!1),C=vi(u),[j=!1,T]=Zn({prop:r,defaultProp:s,onChange:o}),[P,A]=Zn({prop:i,defaultProp:a,onChange:c}),D=v.useRef(null),G=g?!!g.closest("form"):!0,[N,F]=v.useState(new Set),S=Array.from(N).map(U=>U.props.value).join(";");return l.jsx(My,{...x,children:l.jsxs(kU,{required:y,scope:t,trigger:g,onTriggerChange:w,valueNode:m,onValueNodeChange:p,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:Wn(),value:P,onValueChange:A,open:j,onOpenChange:T,dir:C,triggerPointerDownPosRef:D,disabled:h,children:[l.jsx(Nh.Provider,{scope:t,children:l.jsx(CU,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(U=>{F(J=>new Set(J).add(U))},[]),onNativeOptionRemove:v.useCallback(U=>{F(J=>{const z=new Set(J);return z.delete(U),z})},[]),children:n})}),G?l.jsxs(AN,{"aria-hidden":!0,required:y,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:U=>A(U.target.value),disabled:h,children:[P===void 0?l.jsx("option",{value:""}):null,Array.from(N)]},S):null]})})};iN.displayName=tu;var aN="SelectTrigger",lN=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=Rh(n),i=Io(aN,n),a=i.disabled||r,c=Ke(t,i.onTriggerChange),u=Th(n),[d,f,h]=ON(x=>{const g=u().filter(p=>!p.disabled),w=g.find(p=>p.value===i.value),m=DN(g,x,w);m!==void 0&&i.onValueChange(m.value)}),y=()=>{a||(i.onOpenChange(!0),h())};return l.jsx(Ly,{asChild:!0,...o,children:l.jsx(Re.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":PN(i.value)?"":void 0,...s,ref:c,onClick:ue(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ue(s.onPointerDown,x=>{const g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(y(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ue(s.onKeyDown,x=>{const g=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(g&&x.key===" ")&&bU.includes(x.key)&&(y(),x.preventDefault())})})})});lN.displayName=aN;var cN="SelectValue",uN=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,c=Io(cN,n),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=Ke(t,c.onValueNodeChange);return en(()=>{u(d)},[u,d]),l.jsx(Re.span,{...a,ref:f,style:{pointerEvents:"none"},children:PN(c.value)?l.jsx(l.Fragment,{children:i}):o})});uN.displayName=cN;var EU="SelectIcon",dN=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return l.jsx(Re.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});dN.displayName=EU;var NU="SelectPortal",fN=e=>l.jsx($c,{asChild:!0,...e});fN.displayName=NU;var pi="SelectContent",hN=v.forwardRef((e,t)=>{const n=Io(pi,e.__scopeSelect),[r,s]=v.useState();if(en(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Ds.createPortal(l.jsx(pN,{scope:e.__scopeSelect,children:l.jsx(Nh.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),o):null}return l.jsx(mN,{...e,ref:t})});hN.displayName=pi;var hs=10,[pN,Mo]=Za(pi),TU="SelectContentImpl",mN=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:y,sticky:x,hideWhenDetached:g,avoidCollisions:w,...m}=e,p=Io(pi,n),[b,_]=v.useState(null),[C,j]=v.useState(null),T=Ke(t,pe=>_(pe)),[P,A]=v.useState(null),[D,G]=v.useState(null),N=Th(n),[F,S]=v.useState(!1),U=v.useRef(!1);v.useEffect(()=>{if(b)return Vy(b)},[b]),jy();const J=v.useCallback(pe=>{const[_e,...Te]=N().map(Pe=>Pe.ref.current),[Fe]=Te.slice(-1),Ie=document.activeElement;for(const Pe of pe)if(Pe===Ie||(Pe==null||Pe.scrollIntoView({block:"nearest"}),Pe===_e&&C&&(C.scrollTop=0),Pe===Fe&&C&&(C.scrollTop=C.scrollHeight),Pe==null||Pe.focus(),document.activeElement!==Ie))return},[N,C]),z=v.useCallback(()=>J([P,b]),[J,P,b]);v.useEffect(()=>{F&&z()},[F,z]);const{onOpenChange:W,triggerPointerDownPosRef:I}=p;v.useEffect(()=>{if(b){let pe={x:0,y:0};const _e=Fe=>{var Ie,Pe;pe={x:Math.abs(Math.round(Fe.pageX)-(((Ie=I.current)==null?void 0:Ie.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Pe=I.current)==null?void 0:Pe.y)??0))}},Te=Fe=>{pe.x<=10&&pe.y<=10?Fe.preventDefault():b.contains(Fe.target)||W(!1),document.removeEventListener("pointermove",_e),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",_e),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",_e),document.removeEventListener("pointerup",Te,{capture:!0})}}},[b,W,I]),v.useEffect(()=>{const pe=()=>W(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[W]);const[X,$]=ON(pe=>{const _e=N().filter(Ie=>!Ie.disabled),Te=_e.find(Ie=>Ie.ref.current===document.activeElement),Fe=DN(_e,pe,Te);Fe&&setTimeout(()=>Fe.ref.current.focus())}),B=v.useCallback((pe,_e,Te)=>{const Fe=!U.current&&!Te;(p.value!==void 0&&p.value===_e||Fe)&&(A(pe),Fe&&(U.current=!0))},[p.value]),he=v.useCallback(()=>b==null?void 0:b.focus(),[b]),re=v.useCallback((pe,_e,Te)=>{const Fe=!U.current&&!Te;(p.value!==void 0&&p.value===_e||Fe)&&G(pe)},[p.value]),se=r==="popper"?fg:gN,De=se===fg?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:y,sticky:x,hideWhenDetached:g,avoidCollisions:w}:{};return l.jsx(pN,{scope:n,content:b,viewport:C,onViewportChange:j,itemRefCallback:B,selectedItem:P,onItemLeave:he,itemTextRefCallback:re,focusSelectedItem:z,selectedItemText:D,position:r,isPositioned:F,searchRef:X,children:l.jsx(Gf,{as:Es,allowPinchZoom:!0,children:l.jsx(Bf,{asChild:!0,trapped:p.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:ue(s,pe=>{var _e;(_e=p.trigger)==null||_e.focus({preventScroll:!0}),pe.preventDefault()}),children:l.jsx($a,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:l.jsx(se,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:pe=>pe.preventDefault(),...m,...De,onPlaced:()=>S(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:ue(m.onKeyDown,pe=>{const _e=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!_e&&pe.key.length===1&&$(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Fe=N().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Ie=pe.target,Pe=Fe.indexOf(Ie);Fe=Fe.slice(Pe+1)}setTimeout(()=>J(Fe)),pe.preventDefault()}})})})})})})});mN.displayName=TU;var RU="SelectItemAlignedPosition",gN=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Io(pi,n),i=Mo(pi,n),[a,c]=v.useState(null),[u,d]=v.useState(null),f=Ke(t,T=>d(T)),h=Th(n),y=v.useRef(!1),x=v.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:m,focusSelectedItem:p}=i,b=v.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&g&&w&&m){const T=o.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),A=o.valueNode.getBoundingClientRect(),D=m.getBoundingClientRect();if(o.dir!=="rtl"){const Ie=D.left-P.left,Pe=A.left-Ie,rt=T.left-Pe,E=T.width+rt,ee=Math.max(E,P.width),Z=window.innerWidth-hs,O=dg(Pe,[hs,Z-ee]);a.style.minWidth=E+"px",a.style.left=O+"px"}else{const Ie=P.right-D.right,Pe=window.innerWidth-A.right-Ie,rt=window.innerWidth-T.right-Pe,E=T.width+rt,ee=Math.max(E,P.width),Z=window.innerWidth-hs,O=dg(Pe,[hs,Z-ee]);a.style.minWidth=E+"px",a.style.right=O+"px"}const G=h(),N=window.innerHeight-hs*2,F=g.scrollHeight,S=window.getComputedStyle(u),U=parseInt(S.borderTopWidth,10),J=parseInt(S.paddingTop,10),z=parseInt(S.borderBottomWidth,10),W=parseInt(S.paddingBottom,10),I=U+J+F+W+z,X=Math.min(w.offsetHeight*5,I),$=window.getComputedStyle(g),B=parseInt($.paddingTop,10),he=parseInt($.paddingBottom,10),re=T.top+T.height/2-hs,se=N-re,De=w.offsetHeight/2,pe=w.offsetTop+De,_e=U+J+pe,Te=I-_e;if(_e<=re){const Ie=w===G[G.length-1].ref.current;a.style.bottom="0px";const Pe=u.clientHeight-g.offsetTop-g.offsetHeight,rt=Math.max(se,De+(Ie?he:0)+Pe+z),E=_e+rt;a.style.height=E+"px"}else{const Ie=w===G[0].ref.current;a.style.top="0px";const rt=Math.max(re,U+g.offsetTop+(Ie?B:0)+De)+Te;a.style.height=rt+"px",g.scrollTop=_e-re+g.offsetTop}a.style.margin=`${hs}px 0`,a.style.minHeight=X+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[h,o.trigger,o.valueNode,a,u,g,w,m,o.dir,r]);en(()=>b(),[b]);const[_,C]=v.useState();en(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const j=v.useCallback(T=>{T&&x.current===!0&&(b(),p==null||p(),x.current=!1)},[b,p]);return l.jsx(AU,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:j,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:l.jsx(Re.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});gN.displayName=RU;var PU="SelectPopperPosition",fg=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=hs,...o}=e,i=Rh(n);return l.jsx(Fy,{...i,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});fg.displayName=PU;var[AU,Jv]=Za(pi,{}),hg="SelectViewport",yN=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Mo(hg,n),i=Jv(hg,n),a=Ke(t,o.onViewportChange),c=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Nh.Slot,{scope:n,children:l.jsx(Re.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ue(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&f){const y=Math.abs(c.current-d.scrollTop);if(y>0){const x=window.innerHeight-hs*2,g=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),m=Math.max(g,w);if(m<x){const p=m+y,b=Math.min(x,p),_=p-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});yN.displayName=hg;var vN="SelectGroup",[OU,DU]=Za(vN),xN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Wn();return l.jsx(OU,{scope:n,id:s,children:l.jsx(Re.div,{role:"group","aria-labelledby":s,...r,ref:t})})});xN.displayName=vN;var wN="SelectLabel",bN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=DU(wN,n);return l.jsx(Re.div,{id:s.id,...r,ref:t})});bN.displayName=wN;var df="SelectItem",[IU,_N]=Za(df),SN=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=Io(df,n),c=Mo(df,n),u=a.value===r,[d,f]=v.useState(o??""),[h,y]=v.useState(!1),x=Ke(t,m=>{var p;return(p=c.itemRefCallback)==null?void 0:p.call(c,m,r,s)}),g=Wn(),w=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(IU,{scope:n,value:r,disabled:s,textId:g,isSelected:u,onItemTextChange:v.useCallback(m=>{f(p=>p||((m==null?void 0:m.textContent)??"").trim())},[]),children:l.jsx(Nh.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:l.jsx(Re.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:x,onFocus:ue(i.onFocus,()=>y(!0)),onBlur:ue(i.onBlur,()=>y(!1)),onPointerUp:ue(i.onPointerUp,w),onPointerMove:ue(i.onPointerMove,m=>{var p;s?(p=c.onItemLeave)==null||p.call(c):m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,m=>{var p;m.currentTarget===document.activeElement&&((p=c.onItemLeave)==null||p.call(c))}),onKeyDown:ue(i.onKeyDown,m=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&m.key===" "||(_U.includes(m.key)&&w(),m.key===" "&&m.preventDefault())})})})})});SN.displayName=df;var kl="SelectItemText",kN=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=Io(kl,n),a=Mo(kl,n),c=_N(kl,n),u=jU(kl,n),[d,f]=v.useState(null),h=Ke(t,m=>f(m),c.onItemTextChange,m=>{var p;return(p=a.itemTextRefCallback)==null?void 0:p.call(a,m,c.value,c.disabled)}),y=d==null?void 0:d.textContent,x=v.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=u;return en(()=>(g(x),()=>w(x)),[g,w,x]),l.jsxs(l.Fragment,{children:[l.jsx(Re.span,{id:c.textId,...o,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ds.createPortal(o.children,i.valueNode):null]})});kN.displayName=kl;var CN="SelectItemIndicator",jN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _N(CN,n).isSelected?l.jsx(Re.span,{"aria-hidden":!0,...r,ref:t}):null});jN.displayName=CN;var pg="SelectScrollUpButton",EN=v.forwardRef((e,t)=>{const n=Mo(pg,e.__scopeSelect),r=Jv(pg,e.__scopeSelect),[s,o]=v.useState(!1),i=Ke(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(TN,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});EN.displayName=pg;var mg="SelectScrollDownButton",NN=v.forwardRef((e,t)=>{const n=Mo(mg,e.__scopeSelect),r=Jv(mg,e.__scopeSelect),[s,o]=v.useState(!1),i=Ke(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(TN,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});NN.displayName=mg;var TN=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Mo("SelectScrollButton",n),i=v.useRef(null),a=Th(n),c=v.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),en(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),l.jsx(Re.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ue(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{c()})})}),MU="SelectSeparator",RN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(Re.div,{"aria-hidden":!0,...r,ref:t})});RN.displayName=MU;var gg="SelectArrow",LU=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Rh(n),o=Io(gg,n),i=Mo(gg,n);return o.open&&i.position==="popper"?l.jsx(zy,{...s,...r,ref:t}):null});LU.displayName=gg;function PN(e){return e===""||e===void 0}var AN=v.forwardRef((e,t)=>{const{value:n,...r}=e,s=v.useRef(null),o=Ke(t,s),i=Uv(n);return v.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[i,n]),l.jsx(Xc,{asChild:!0,children:l.jsx("select",{...r,ref:o,defaultValue:n})})});AN.displayName="BubbleSelect";function ON(e){const t=It(e),n=v.useRef(""),r=v.useRef(0),s=v.useCallback(i=>{const a=n.current+i;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function DN(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=FU(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function FU(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zU=iN,IN=lN,$U=uN,UU=dN,VU=fN,MN=hN,BU=yN,WU=xN,LN=bN,FN=SN,HU=kN,YU=jN,zN=EN,$N=NN,UN=RN;const Uo=zU,Cl=WU,Vo=$U,ro=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(IN,{ref:r,className:oe("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(UU,{asChild:!0,children:l.jsx(wy,{className:"h-4 w-4 opacity-50"})})]}));ro.displayName=IN.displayName;const VN=v.forwardRef(({className:e,...t},n)=>l.jsx(zN,{ref:n,className:oe("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(TO,{className:"h-4 w-4"})}));VN.displayName=zN.displayName;const BN=v.forwardRef(({className:e,...t},n)=>l.jsx($N,{ref:n,className:oe("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(wy,{className:"h-4 w-4"})}));BN.displayName=$N.displayName;const so=v.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>l.jsx(VU,{children:l.jsxs(MN,{ref:s,className:oe("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(VN,{}),l.jsx(BU,{className:oe("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(BN,{})]})}));so.displayName=MN.displayName;const ra=v.forwardRef(({className:e,...t},n)=>l.jsx(LN,{ref:n,className:oe("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));ra.displayName=LN.displayName;const yr=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(FN,{ref:r,className:oe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(YU,{children:l.jsx(iS,{className:"h-4 w-4"})})}),l.jsx(HU,{children:t})]}));yr.displayName=FN.displayName;const KU=v.forwardRef(({className:e,...t},n)=>l.jsx(UN,{ref:n,className:oe("-mx-1 my-1 h-px bg-muted",e),...t}));KU.displayName=UN.displayName;const yg=new Map([["aliyun-cdn",["aliyun.cdn","/imgs/providers/aliyun.svg"]],["aliyun-oss",["aliyun.oss","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["aliyun.dcdn","/imgs/providers/aliyun.svg"]],["tencent-cdn",["tencent.cdn","/imgs/providers/tencent.svg"]],["ssh",["ssh","/imgs/providers/ssh.svg"]],["qiniu-cdn",["qiniu.cdn","/imgs/providers/qiniu.svg"]],["webhook",["webhook","/imgs/providers/webhook.svg"]],["local",["local.deployment","/imgs/providers/local.svg"]]]),GU=Array.from(yg.keys()),ex=rv,tx=sv,ZU=ov,WN=v.forwardRef(({className:e,...t},n)=>l.jsx(Bc,{ref:n,className:oe("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}));WN.displayName=Bc.displayName;const Ph=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(ZU,{children:[l.jsx(WN,{}),l.jsxs(Wc,{ref:r,className:oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(Qf,{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:[l.jsx(by,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ph.displayName=Wc.displayName;const Ah=({className:e,...t})=>l.jsx("div",{className:oe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ah.displayName="DialogHeader";const Oh=v.forwardRef(({className:e,...t},n)=>l.jsx(Hc,{ref:n,className:oe("text-lg font-semibold leading-none tracking-tight",e),...t}));Oh.displayName=Hc.displayName;const qU=v.forwardRef(({className:e,...t},n)=>l.jsx(Yc,{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));qU.displayName=Yc.displayName;function XU(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var nx="ScrollArea",[HN,OH]=on(nx),[QU,fr]=HN(nx),YN=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,c]=v.useState(null),[u,d]=v.useState(null),[f,h]=v.useState(null),[y,x]=v.useState(null),[g,w]=v.useState(null),[m,p]=v.useState(0),[b,_]=v.useState(0),[C,j]=v.useState(!1),[T,P]=v.useState(!1),A=Ke(t,G=>c(G)),D=vi(s);return l.jsx(QU,{scope:n,type:r,dir:D,scrollHideDelay:o,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:y,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:j,scrollbarY:g,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:P,onCornerWidthChange:p,onCornerHeightChange:_,children:l.jsx(Re.div,{dir:D,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":m+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});YN.displayName=nx;var KN="ScrollAreaViewport",GN=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...o}=e,i=fr(KN,n),a=v.useRef(null),c=Ke(t,a,i.onViewportChange);return l.jsxs(l.Fragment,{children:[l.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}),l.jsx(Re.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});GN.displayName=KN;var ns="ScrollAreaScrollbar",rx=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fr(ns,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return v.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?l.jsx(JU,{...r,ref:t,forceMount:n}):s.type==="scroll"?l.jsx(eV,{...r,ref:t,forceMount:n}):s.type==="auto"?l.jsx(ZN,{...r,ref:t,forceMount:n}):s.type==="always"?l.jsx(sx,{...r,ref:t}):null});rx.displayName=ns;var JU=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fr(ns,e.__scopeScrollArea),[o,i]=v.useState(!1);return v.useEffect(()=>{const a=s.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),l.jsx(an,{present:n||o,children:l.jsx(ZN,{"data-state":o?"visible":"hidden",...r,ref:t})})}),eV=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fr(ns,e.__scopeScrollArea),o=e.orientation==="horizontal",i=Ih(()=>c("SCROLL_END"),100),[a,c]=XU("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 v.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,c]),v.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const y=u[d];f!==y&&(c("SCROLL"),i()),f=y};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,o,c,i]),l.jsx(an,{present:n||a!=="hidden",children:l.jsx(sx,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),ZN=v.forwardRef((e,t)=>{const n=fr(ns,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,i]=v.useState(!1),a=e.orientation==="horizontal",c=Ih(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?u:d)}},10);return Oa(n.viewport,c),Oa(n.content,c),l.jsx(an,{present:r||o,children:l.jsx(sx,{"data-state":o?"visible":"hidden",...s,ref:t})})}),sx=v.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=fr(ns,e.__scopeScrollArea),o=v.useRef(null),i=v.useRef(0),[a,c]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=eT(a.viewport,a.content),d={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,y){return iV(h,i.current,a,y)}return n==="horizontal"?l.jsx(tV,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,y=c1(h,a,s.dir);o.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):n==="vertical"?l.jsx(nV,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,y=c1(h,a);o.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),tV=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=fr(ns,e.__scopeScrollArea),[i,a]=v.useState(),c=v.useRef(null),u=Ke(t,c,o.onScrollbarXChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(XN,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Dh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),nT(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:hf(i.paddingLeft),paddingEnd:hf(i.paddingRight)}})}})}),nV=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=fr(ns,e.__scopeScrollArea),[i,a]=v.useState(),c=v.useRef(null),u=Ke(t,c,o.onScrollbarYChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(XN,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Dh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),nT(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:hf(i.paddingTop),paddingEnd:hf(i.paddingBottom)}})}})}),[rV,qN]=HN(ns),XN=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,y=fr(ns,n),[x,g]=v.useState(null),w=Ke(t,A=>g(A)),m=v.useRef(null),p=v.useRef(""),b=y.viewport,_=r.content-r.viewport,C=It(d),j=It(c),T=Ih(f,10);function P(A){if(m.current){const D=A.clientX-m.current.left,G=A.clientY-m.current.top;u({x:D,y:G})}}return v.useEffect(()=>{const A=D=>{const G=D.target;(x==null?void 0:x.contains(G))&&C(D,_)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[b,x,_,C]),v.useEffect(j,[r,j]),Oa(x,T),Oa(y.content,T),l.jsx(rV,{scope:n,scrollbar:x,hasThumb:s,onThumbChange:It(o),onThumbPointerUp:It(i),onThumbPositionChange:j,onThumbPointerDown:It(a),children:l.jsx(Re.div,{...h,ref:w,style:{position:"absolute",...h.style},onPointerDown:ue(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),m.current=x.getBoundingClientRect(),p.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),P(A))}),onPointerMove:ue(e.onPointerMove,P),onPointerUp:ue(e.onPointerUp,A=>{const D=A.target;D.hasPointerCapture(A.pointerId)&&D.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=p.current,y.viewport&&(y.viewport.style.scrollBehavior=""),m.current=null})})})}),ff="ScrollAreaThumb",QN=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=qN(ff,e.__scopeScrollArea);return l.jsx(an,{present:n||s.hasThumb,children:l.jsx(sV,{ref:t,...r})})}),sV=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=fr(ff,n),i=qN(ff,n),{onThumbPositionChange:a}=i,c=Ke(t,f=>i.onThumbChange(f)),u=v.useRef(),d=Ih(()=>{u.current&&(u.current(),u.current=void 0)},100);return v.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(d(),!u.current){const y=aV(f,a);u.current=y,a()}};return a(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,d,a]),l.jsx(Re.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ue(e.onPointerDownCapture,f=>{const y=f.target.getBoundingClientRect(),x=f.clientX-y.left,g=f.clientY-y.top;i.onThumbPointerDown({x,y:g})}),onPointerUp:ue(e.onPointerUp,i.onThumbPointerUp)})});QN.displayName=ff;var ox="ScrollAreaCorner",JN=v.forwardRef((e,t)=>{const n=fr(ox,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(oV,{...e,ref:t}):null});JN.displayName=ox;var oV=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=fr(ox,n),[o,i]=v.useState(0),[a,c]=v.useState(0),u=!!(o&&a);return Oa(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Oa(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),i(d)}),u?l.jsx(Re.div,{...r,ref:t,style:{width:o,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function hf(e){return e?parseInt(e,10):0}function eT(e,t){const n=e/t;return isNaN(n)?0:n}function Dh(e){const t=eT(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function iV(e,t,n,r="ltr"){const s=Dh(n),o=s/2,i=t||o,a=s-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return tT([c,u],f)(e)}function c1(e,t,n="ltr"){const r=Dh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-r,c=n==="ltr"?[0,i]:[i*-1,0],u=dg(e,c);return tT([0,i],[0,a])(u)}function tT(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function nT(e,t){return e>0&&e<t}var aV=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,a=n.top!==o.top;(i||a)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function Ih(e,t){const n=It(e),r=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),v.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Oa(e,t){const n=It(t);en(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var rT=YN,lV=GN,cV=JN;const Mh=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(rT,{ref:r,className:oe("relative overflow-hidden",e),...n,children:[l.jsx(lV,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(sT,{}),l.jsx(cV,{})]}));Mh.displayName=rT.displayName;const sT=v.forwardRef(({className:e,orientation:t="vertical",...n},r)=>l.jsx(rx,{ref:r,orientation:t,className:oe("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:l.jsx(QN,{className:"relative flex-1 rounded-full bg-border"})}));sT.displayName=rx.displayName;const wo=new Map([["tencent",["tencent","/imgs/providers/tencent.svg"]],["aliyun",["aliyun","/imgs/providers/aliyun.svg"]],["cloudflare",["cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["go.daddy","/imgs/providers/godaddy.svg"]],["qiniu",["qiniu","/imgs/providers/qiniu.svg"]],["ssh",["ssh","/imgs/providers/ssh.svg"]],["webhook",["webhook","/imgs/providers/webhook.svg"]],["local",["local.deployment","/imgs/providers/local.svg"]]]),u1=e=>wo.get(e),Vs=ce.union([ce.literal("aliyun"),ce.literal("tencent"),ce.literal("ssh"),ce.literal("webhook"),ce.literal("cloudflare"),ce.literal("qiniu"),ce.literal("namesilo"),ce.literal("godaddy"),ce.literal("local")],{message:"access.not.empty"}),Bs=e=>{switch(e){case"aliyun":case"tencent":return"all";case"ssh":case"webhook":case"qiniu":case"local":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},uV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:o}=ct(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,o("zod.rule.string.max",{max:64})),configType:Vs,secretId:ce.string().min(1,"access.form.secret.id.not.empty").max(64,o("zod.rule.string.max",{max:64})),secretKey:ce.string().min(1,"access.form.secret.key.not.empty").max(64,o("zod.rule.string.max",{max:64}))});let a={secretId:"",secretKey:""};e&&(a=e.config);const c=pn({resolver:mn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"tencent",secretId:a.secretId,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Bs(d.configType),config:{secretId:d.secretId,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await $s(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"secretId",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.secret.id")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.secret.id.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.secret.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.secret.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})})},dV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:o}=ct(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,o("zod.rule.string.max",{max:64})),configType:Vs,accessKeyId:ce.string().min(1,"access.form.access.key.id.not.empty").max(64,o("zod.rule.string.max",{max:64})),accessSecretId:ce.string().min(1,"access.form.access.key.secret.not.empty").max(64,o("zod.rule.string.max",{max:64}))});let a={accessKeyId:"",accessKeySecret:""};e&&(a=e.config);const c=pn({resolver:mn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aliyun",accessKeyId:a.accessKeyId,accessSecretId:a.accessKeySecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Bs(d.configType),config:{accessKeyId:d.accessKeyId,accessKeySecret:d.accessSecretId}};try{f.id=t=="copy"?"":f.id;const h=await $s(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}console.log(f),r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.access.key.id")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.access.key.id.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"accessSecretId",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.access.key.secret")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.access.key.secret.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})})},mi=v.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:oe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));mi.displayName="Textarea";const ix=({className:e,trigger:t})=>{const{reloadAccessGroups:n}=In(),[r,s]=v.useState(!1),{t:o}=ct(),i=ce.object({name:ce.string().min(1,"access.group.name.not.empty").max(64,o("zod.rule.string.max",{max:64}))}),a=pn({resolver:mn(i),defaultValues:{name:""}}),c=async u=>{try{await p6({name:u.name}),n(),s(!1)}catch(d){Object.entries(d.response.data).forEach(([h,y])=>{a.setError(h,{type:"manual",message:y.message})})}};return l.jsxs(ex,{onOpenChange:s,open:r,children:[l.jsx(tx,{asChild:!0,className:oe(e),children:t}),l.jsxs(Ph,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ah,{children:l.jsx(Oh,{children:o("access.group.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(gn,{...a,children:l.jsxs("form",{onSubmit:u=>{u.stopPropagation(),a.handleSubmit(c)(u)},className:"space-y-8",children:[l.jsx(Se,{control:a.control,name:"name",render:({field:u})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.group.name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.group.name.not.empty"),...u,type:"text"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})]})]})},fV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o,config:{accessGroups:i}}=In(),a=v.useRef(null),[c,u]=v.useState(""),{t:d}=ct(),f=e&&e.group?e.group:"",h=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,y=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,x=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,d("zod.rule.string.max",{max:64})),configType:Vs,host:ce.string().refine(_=>y.test(_)||h.test(_),{message:"zod.rule.ssh.host"}),group:ce.string().optional(),port:ce.string().min(1,"access.form.ssh.port.not.empty").max(5,d("zod.rule.string.max",{max:5})),username:ce.string().min(1,"username.not.empty").max(64,d("zod.rule.string.max",{max:64})),password:ce.string().min(0,"password.not.empty").max(64,d("zod.rule.string.max",{max:64})),key:ce.string().min(0,"access.form.ssh.key.not.empty").max(20480,d("zod.rule.string.max",{max:20480})),keyFile:ce.any().optional(),preCommand:ce.string().min(0).max(2048,d("zod.rule.string.max",{max:2048})).optional(),command:ce.string().min(1,"access.form.ssh.command.not.empty").max(2048,d("zod.rule.string.max",{max:2048})),certPath:ce.string().min(0,"access.form.ssh.cert.path.not.empty").max(2048,d("zod.rule.string.max",{max:2048})),keyPath:ce.string().min(0,"access.form.ssh.key.path.not.empty").max(2048,d("zod.rule.string.max",{max:2048}))});let g={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",preCommand:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(g=e.config);const w=pn({resolver:mn(x),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:g.host,port:g.port,username:g.username,password:g.password,key:g.key,keyFile:g.keyFile,certPath:g.certPath,keyPath:g.keyPath,command:g.command,preCommand:g.preCommand}}),m=async _=>{let C=_.group;C=="emptyId"&&(C="");const j={id:_.id,name:_.name,configType:_.configType,usage:Bs(_.configType),group:C,config:{host:_.host,port:_.port,username:_.username,password:_.password,key:_.key,command:_.command,preCommand:_.preCommand,certPath:_.certPath,keyPath:_.keyPath}};try{j.id=t=="copy"?"":j.id;const T=await $s(j);n(),j.id=T.id,j.created=T.created,j.updated=T.updated,_.id&&t=="edit"?s(j):r(j),C!=f&&(f&&await Gw({id:f,"access-":j.id}),C&&await Gw({id:C,"access+":j.id})),o()}catch(T){Object.entries(T.response.data).forEach(([A,D])=>{w.setError(A,{type:"manual",message:D.message})});return}},p=async _=>{var P;const C=(P=_.target.files)==null?void 0:P[0];if(!C)return;const j=C;u(j.name);const T=await $$(j);w.setValue("key",T)},b=()=>{var _;console.log(a.current),(_=a.current)==null||_.click()};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...w,children:l.jsxs("form",{onSubmit:_=>{_.stopPropagation(),w.handleSubmit(m)(_)},className:"space-y-3",children:[l.jsx(Se,{control:w.control,name:"name",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.name.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"group",render:({field:_})=>l.jsxs(ve,{children:[l.jsxs(xe,{className:"w-full flex justify-between",children:[l.jsx("div",{children:d("access.form.ssh.group.label")}),l.jsx(ix,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(td,{size:14}),d("add")]})})]}),l.jsx(we,{children:l.jsxs(Uo,{..._,value:_.value,defaultValue:"emptyId",onValueChange:C=>{w.setValue("group",C)},children:[l.jsx(ro,{children:l.jsx(Vo,{placeholder:d("access.group.not.empty")})}),l.jsxs(so,{children:[l.jsx(yr,{value:"emptyId",children:l.jsx("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(C=>l.jsx(yr,{value:C.id?C.id:"",children:l.jsx("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer"),children:C.name})},C.id))]})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"id",render:({field:_})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:d("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"configType",render:({field:_})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:d("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{..._})}),l.jsx(ge,{})]})}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(Se,{control:w.control,name:"host",render:({field:_})=>l.jsxs(ve,{className:"grow",children:[l.jsx(xe,{children:d("access.form.ssh.host")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.host.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"port",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.port")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.port.not.empty"),..._,type:"number"})}),l.jsx(ge,{})]})})]}),l.jsx(Se,{control:w.control,name:"username",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("username")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("username.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"password",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("password.not.empty"),..._,type:"password"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"key",render:({field:_})=>l.jsxs(ve,{hidden:!0,children:[l.jsx(xe,{children:d("access.form.ssh.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.key.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"keyFile",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.key")}),l.jsx(we,{children:l.jsxs("div",{children:[l.jsx(Ue,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:b,children:c||d("access.form.ssh.key.file.not.empty")}),l.jsx(Ne,{placeholder:d("access.form.ssh.key.not.empty"),..._,ref:a,className:"hidden",hidden:!0,type:"file",onChange:p})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"certPath",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.cert.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.cert.path.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"keyPath",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.key.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.key.path.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"preCommand",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.pre.command")}),l.jsx(we,{children:l.jsx(mi,{placeholder:d("access.form.ssh.pre.command.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"command",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.command")}),l.jsx(we,{children:l.jsx(mi,{placeholder:d("access.form.ssh.command.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:d("save")})})]})})})})},hV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:o}=ct(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,o("zod.rule.string.max",{max:64})),configType:Vs,url:ce.string().url("zod.rule.url")});let a={url:""};e&&(a=e.config);const c=pn({resolver:mn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"webhook",url:a.url}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Bs(d.configType),config:{url:d.url}};try{f.id=t=="copy"?"":f.id;const h=await $s(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"url",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.webhook.url")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.webhook.url.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})})},pV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:o}=ct(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,o("zod.rule.string.max",{max:64})),configType:Vs,dnsApiToken:ce.string().min(1,"access.form.cloud.dns.api.token.not.empty").max(64,o("zod.rule.string.max",{max:64}))});let a={dnsApiToken:""};e&&(a=e.config);const c=pn({resolver:mn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"cloudflare",dnsApiToken:a.dnsApiToken}}),u=async d=>{console.log(d);const f={id:d.id,name:d.name,configType:d.configType,usage:Bs(d.configType),config:{dnsApiToken:d.dnsApiToken}};try{f.id=t=="copy"?"":f.id;const h=await $s(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"dnsApiToken",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.cloud.dns.api.token")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.cloud.dns.api.token.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})})},mV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:o}=ct(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,o("zod.rule.string.max",{max:64})),configType:Vs,accessKey:ce.string().min(1,"access.form.access.key.not.empty").max(64),secretKey:ce.string().min(1,"access.form.secret.key.not.empty").max(64)});let a={accessKey:"",secretKey:""};e&&(a=e.config);const c=pn({resolver:mn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"qiniu",accessKey:a.accessKey,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Bs(d.configType),config:{accessKey:d.accessKey,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await $s(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"accessKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.access.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.access.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.secret.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.secret.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})})},gV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:o}=ct(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,o("zod.rule.string.max",{max:64})),configType:Vs,apiKey:ce.string().min(1,"access.form.namesilo.api.key.not.empty").max(64,o("zod.rule.string.max",{max:64}))});let a={apiKey:""};e&&(a=e.config);const c=pn({resolver:mn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"namesilo",apiKey:a.apiKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Bs(d.configType),config:{apiKey:d.apiKey}};try{f.id=t=="copy"?"":f.id;const h=await $s(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.namesilo.api.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.namesilo.api.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})})},yV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:o}=ct(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,o("zod.rule.string.max",{max:64})),configType:Vs,apiKey:ce.string().min(1,"access.form.go.daddy.api.key.not.empty").max(64,o("zod.rule.string.max",{max:64})),apiSecret:ce.string().min(1,"access.form.go.daddy.api.secret.not.empty").max(64,o("zod.rule.string.max",{max:64}))});let a={apiKey:"",apiSecret:""};e&&(a=e.config);const c=pn({resolver:mn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"godaddy",apiKey:a.apiKey,apiSecret:a.apiSecret}}),u=async d=>{console.log(d);const f={id:d.id,name:d.name,configType:d.configType,usage:Bs(d.configType),config:{apiKey:d.apiKey,apiSecret:d.apiSecret}};try{f.id=t=="copy"?"":f.id;const h=await $s(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.go.daddy.api.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.go.daddy.api.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"apiSecret",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.go.daddy.api.secret")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.go.daddy.api.secret.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})})},vV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o}=In(),{t:i}=ct(),a=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Vs,command:ce.string().min(1,"access.form.ssh.command.not.empty").max(2048,i("zod.rule.string.max",{max:2048})),certPath:ce.string().min(0,"access.form.ssh.cert.path.not.empty").max(2048,i("zod.rule.string.max",{max:2048})),keyPath:ce.string().min(0,"access.form.ssh.key.path.not.empty").max(2048,i("zod.rule.string.max",{max:2048}))});let c={command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(c=e.config);const u=pn({resolver:mn(a),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"local",certPath:c.certPath,keyPath:c.keyPath,command:c.command}}),d=async f=>{const h={id:f.id,name:f.name,configType:f.configType,usage:Bs(f.configType),config:{command:f.command,certPath:f.certPath,keyPath:f.keyPath}};try{h.id=t=="copy"?"":h.id;const y=await $s(h);n(),h.id=y.id,h.created=y.created,h.updated=y.updated,f.id&&t=="edit"?s(h):r(h),o()}catch(y){Object.entries(y.response.data).forEach(([g,w])=>{u.setError(g,{type:"manual",message:w.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...u,children:l.jsxs("form",{onSubmit:f=>{f.stopPropagation(),u.handleSubmit(d)(f)},className:"space-y-3",children:[l.jsx(Se,{control:u.control,name:"name",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"id",render:({field:f})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"configType",render:({field:f})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"certPath",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.ssh.cert.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.ssh.cert.path.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"keyPath",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.ssh.key.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.ssh.key.path.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"command",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.ssh.command")}),l.jsx(we,{children:l.jsx(mi,{placeholder:i("access.form.ssh.command.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})};function sa({trigger:e,op:t,data:n,className:r}){const[s,o]=v.useState(!1),{t:i}=ct(),a=Array.from(wo.keys()),[c,u]=v.useState((n==null?void 0:n.configType)||"");let d=l.jsx(l.Fragment,{children:" "});switch(c){case"tencent":d=l.jsx(uV,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"aliyun":d=l.jsx(dV,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"ssh":d=l.jsx(fV,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"webhook":d=l.jsx(hV,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"cloudflare":d=l.jsx(pV,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"qiniu":d=l.jsx(mV,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"namesilo":d=l.jsx(gV,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"godaddy":d=l.jsx(yV,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"local":d=l.jsx(vV,{data:n,op:t,onAfterReq:()=>{o(!1)}});break}const f=h=>h==c?"border-primary":"";return l.jsxs(ex,{onOpenChange:o,open:s,children:[l.jsx(tx,{asChild:!0,className:oe(r),children:e}),l.jsxs(Ph,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ah,{children:l.jsx(Oh,{children:t=="add"?i("access.add"):t=="edit"?i("access.edit"):i("access.copy")})}),l.jsx(Mh,{className:"max-h-[80vh]",children:l.jsxs("div",{className:"container py-3",children:[l.jsx(Ro,{children:i("access.type")}),l.jsxs(Uo,{onValueChange:h=>{u(h)},defaultValue:c,children:[l.jsx(ro,{className:"mt-3",children:l.jsx(Vo,{placeholder:i("access.type.not.empty")})}),l.jsx(so,{children:l.jsxs(Cl,{children:[l.jsx(ra,{children:i("access.type")}),a.map(h=>{var y,x;return l.jsx(yr,{value:h,children:l.jsxs("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer",f(h)),children:[l.jsx("img",{src:(y=wo.get(h))==null?void 0:y[1],className:"h-6 w-6"}),l.jsx("div",{children:i(((x=wo.get(h))==null?void 0:x[0])||"")})]})},h)})]})})]}),d]})})]})]})}const xV=({className:e,trigger:t})=>{const{config:{emails:n},setEmails:r}=In(),[s,o]=v.useState(!1),{t:i}=ct(),a=ce.object({email:ce.string().email("email.valid.message")}),c=pn({resolver:mn(a),defaultValues:{email:""}}),u=async d=>{if(n.content.emails.includes(d.email)){c.setError("email",{message:"email.already.exist"});return}const f=[...n.content.emails,d.email];try{const h=await Ga({...n,name:"emails",content:{emails:f}});r(h),c.reset(),c.clearErrors(),o(!1)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsxs(ex,{onOpenChange:o,open:s,children:[l.jsx(tx,{asChild:!0,className:oe(e),children:t}),l.jsxs(Ph,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ah,{children:l.jsx(Oh,{children:i("email.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"email",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("email")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("email.not.empty.message"),...d,type:"email"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})]})]})},wV=()=>{const{config:{accesses:e,emails:t,accessGroups:n}}=In(),[r,s]=v.useState(),o=Ar(),{t:i}=ct(),[a,c]=v.useState("base"),[u,d]=v.useState(r?r.targetType:"");v.useEffect(()=>{const p=new URLSearchParams(o.search).get("id");p&&(async()=>{const _=await H$(p);s(_),d(_.targetType)})()},[o.search]);const f=ce.object({id:ce.string().optional(),domain:ce.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"domain.not.empty.verify.message"}),email:ce.string().email("email.valid.message").optional(),access:ce.string().regex(/^[a-zA-Z0-9]+$/,{message:"domain.management.edit.dns.access.not.empty.message"}),targetAccess:ce.string().optional(),targetType:ce.string().regex(/^[a-zA-Z0-9-]+$/,{message:"domain.management.edit.target.type.not.empty.message"}),variables:ce.string().optional(),group:ce.string().optional(),nameservers:ce.string().optional()}),h=pn({resolver:mn(f),defaultValues:{id:"",domain:"",email:"",access:"",targetAccess:"",targetType:"",variables:"",group:"",nameservers:""}});v.useEffect(()=>{r&&h.reset({id:r.id,domain:r.domain,email:r.email,access:r.access,targetAccess:r.targetAccess,targetType:r.targetType,variables:r.variables,group:r.group,nameservers:r.nameservers})},[r,h]);const y=e.filter(m=>{if(m.usage=="apply")return!1;if(u=="")return!0;const p=u.split("-");return m.configType===p[0]}),{toast:x}=Ir(),g=Dn(),w=async m=>{const p=m.group=="emptyId"?"":m.group,b=m.targetAccess==="emptyId"?"":m.targetAccess;if(p==""&&b==""){h.setError("group",{type:"manual",message:"domain.management.edit.target.access.verify.msg"}),h.setError("targetAccess",{type:"manual",message:"domain.management.edit.target.access.verify.msg"});return}const _={id:m.id,crontab:"0 0 * * *",domain:m.domain,email:m.email,access:m.access,group:p,targetAccess:b,targetType:m.targetType,variables:m.variables,nameservers:m.nameservers};try{await ig(_);let C=i("domain.management.edit.succeed.tips");_.id==""&&(C=i("domain.management.add.succeed.tips")),x({title:i("succeed"),description:C}),g("/domains")}catch(C){Object.entries(C.response.data).forEach(([T,P])=>{h.setError(T,{type:"manual",message:P.message})});return}};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Yv,{}),l.jsx("div",{className:" h-5 text-muted-foreground",children:r!=null&&r.id?i("domain.edit"):i("domain.add")}),l.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[l.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:[l.jsx("div",{className:oe("cursor-pointer text-right",a==="base"?"text-primary":""),onClick:()=>{c("base")},children:i("basic.setting")}),l.jsx("div",{className:oe("cursor-pointer text-right",a==="advance"?"text-primary":""),onClick:()=>{c("advance")},children:i("advanced.setting")})]}),l.jsx("div",{className:"w-full md:w-[35em] bg-gray-100 dark:bg-gray-900 p-5 rounded mt-3 md:mt-0",children:l.jsx(gn,{...h,children:l.jsxs("form",{onSubmit:h.handleSubmit(w),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:h.control,name:"domain",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsx(xe,{children:i("domain")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("domain.not.empty.verify.message"),...m})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"email",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsxs(xe,{className:"flex w-full justify-between",children:[l.jsx("div",{children:i("email")+i("domain.management.edit.email.description")}),l.jsx(xV,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(td,{size:14}),i("add")]})})]}),l.jsx(we,{children:l.jsxs(Uo,{...m,value:m.value,onValueChange:p=>{h.setValue("email",p)},children:[l.jsx(ro,{children:l.jsx(Vo,{placeholder:i("domain.management.edit.email.not.empty.message")})}),l.jsx(so,{children:l.jsxs(Cl,{children:[l.jsx(ra,{children:i("email.list")}),t.content.emails.map(p=>l.jsx(yr,{value:p,children:l.jsx("div",{children:p})},p))]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"access",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsxs(xe,{className:"flex w-full justify-between",children:[l.jsx("div",{children:i("domain.management.edit.dns.access.label")}),l.jsx(sa,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(td,{size:14}),i("add")]}),op:"add"})]}),l.jsx(we,{children:l.jsxs(Uo,{...m,value:m.value,onValueChange:p=>{h.setValue("access",p)},children:[l.jsx(ro,{children:l.jsx(Vo,{placeholder:i("domain.management.edit.access.not.empty.message")})}),l.jsx(so,{children:l.jsxs(Cl,{children:[l.jsx(ra,{children:i("domain.management.edit.access.label")}),e.filter(p=>p.usage!="deploy").map(p=>{var b;return l.jsx(yr,{value:p.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(b=wo.get(p.configType))==null?void 0:b[1]}),l.jsx("div",{children:p.name})]})},p.id)})]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"targetType",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsx(xe,{children:i("domain.management.edit.target.type")}),l.jsx(we,{children:l.jsxs(Uo,{...m,onValueChange:p=>{d(p),h.setValue("targetType",p)},children:[l.jsx(ro,{children:l.jsx(Vo,{placeholder:i("domain.management.edit.target.type.not.empty.message")})}),l.jsx(so,{children:l.jsxs(Cl,{children:[l.jsx(ra,{children:i("domain.management.edit.target.type")}),GU.map(p=>{var b,_;return l.jsx(yr,{value:p,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(b=yg.get(p))==null?void 0:b[1]}),l.jsx("div",{children:i(((_=yg.get(p))==null?void 0:_[0])||"")})]})},p)})]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"targetAccess",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsxs(xe,{className:"w-full flex justify-between",children:[l.jsx("div",{children:i("domain.management.edit.target.access")}),l.jsx(sa,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(td,{size:14}),i("add")]}),op:"add"})]}),l.jsx(we,{children:l.jsxs(Uo,{...m,onValueChange:p=>{h.setValue("targetAccess",p)},children:[l.jsx(ro,{children:l.jsx(Vo,{placeholder:i("domain.management.edit.target.access.not.empty.message")})}),l.jsx(so,{children:l.jsxs(Cl,{children:[l.jsxs(ra,{children:[i("domain.management.edit.target.access.content.label")," ",h.getValues().targetAccess]}),l.jsx(yr,{value:"emptyId",children:l.jsx("div",{className:"flex items-center space-x-2",children:"--"})}),y.map(p=>{var b;return l.jsx(yr,{value:p.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(b=wo.get(p.configType))==null?void 0:b[1]}),l.jsx("div",{children:p.name})]})},p.id)})]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"group",render:({field:m})=>l.jsxs(ve,{hidden:a!="advance"||u!="ssh",children:[l.jsx(xe,{className:"w-full flex justify-between",children:l.jsx("div",{children:i("domain.management.edit.group.label")})}),l.jsx(we,{children:l.jsxs(Uo,{...m,value:m.value,defaultValue:"emptyId",onValueChange:p=>{h.setValue("group",p)},children:[l.jsx(ro,{children:l.jsx(Vo,{placeholder:i("domain.management.edit.group.not.empty.message")})}),l.jsxs(so,{children:[l.jsx(yr,{value:"emptyId",children:l.jsx("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),n.filter(p=>{var b;return p.expand&&((b=p.expand)==null?void 0:b.access.length)>0}).map(p=>l.jsx(yr,{value:p.id?p.id:"",children:l.jsx("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"variables",render:({field:m})=>l.jsxs(ve,{hidden:a!="advance",children:[l.jsx(xe,{children:i("variables")}),l.jsx(we,{children:l.jsx(mi,{placeholder:i("domain.management.edit.variables.placeholder"),...m,className:"placeholder:whitespace-pre-wrap"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"nameservers",render:({field:m})=>l.jsxs(ve,{hidden:a!="advance",children:[l.jsx(xe,{children:i("dns")}),l.jsx(we,{children:l.jsx(mi,{placeholder:i("domain.management.edit.dns.placeholder"),...m,className:"placeholder:whitespace-pre-wrap"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})]})]})})},oT=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));oT.displayName="Card";const iT=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:oe("flex flex-col space-y-1.5 p-6",e),...t}));iT.displayName="CardHeader";const aT=v.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:oe("text-2xl font-semibold leading-none tracking-tight",e),...t}));aT.displayName="CardTitle";const lT=v.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));lT.displayName="CardDescription";const cT=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:oe("p-6 pt-0",e),...t}));cT.displayName="CardContent";const uT=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:oe("flex items-center p-6 pt-0",e),...t}));uT.displayName="CardFooter";const As=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",bV=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=In(),{toast:n}=Ir(),r=Dn(),{t:s}=ct(),o=async a=>{try{await h6(a),t()}catch(c){n({title:s("delete.failed"),description:As(c),variant:"destructive"});return}},i=()=>{r("/access")};return l.jsxs("div",{className:"mt-10",children:[l.jsx(ya,{when:e.length==0,children:l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(sw,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:s("access.group.domain.empty")}),l.jsx(ix,{trigger:l.jsx(Ue,{children:s("access.group.add")}),className:"mt-3"})]})})}),l.jsx(Mh,{className:"h-[75vh] overflow-hidden",children:l.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(a=>l.jsxs(oT,{className:"w-full md:w-[350px]",children:[l.jsxs(iT,{children:[l.jsx(aT,{children:a.name}),l.jsx(lT,{children:s("access.group.total",{total:a.expand?a.expand.access.length:0})})]}),l.jsx(cT,{className:"min-h-[180px]",children:a.expand?l.jsx(l.Fragment,{children:a.expand.access.slice(0,3).map(c=>l.jsx("div",{className:"flex flex-col mb-3",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"",children:l.jsx("img",{src:u1(c.configType)[1],alt:"provider",className:"w-8 h-8"})}),l.jsxs("div",{className:"ml-3",children:[l.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:c.name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:u1(c.configType)[0]})]})]})},c.id))}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[l.jsx("div",{children:l.jsx(sw,{size:40})}),l.jsx("div",{className:"ml-2",children:s("access.group.empty")})]})})}),l.jsx(uT,{children:l.jsxs("div",{className:"flex justify-end w-full",children:[l.jsx(ya,{when:!!(a.expand&&a.expand.access.length>0),children:l.jsx("div",{children:l.jsx(Ue,{size:"sm",variant:"link",onClick:()=>{r(`/access?accessGroupId=${a.id}&tab=access`,{replace:!0})},children:s("access.all")})})}),l.jsx(ya,{when:!a.expand||a.expand.access.length==0,children:l.jsx("div",{children:l.jsx(Ue,{size:"sm",onClick:i,children:s("access.add")})})}),l.jsx("div",{className:"ml-3",children:l.jsxs(zv,{children:[l.jsx($v,{asChild:!0,children:l.jsx(Ue,{variant:"destructive",size:"sm",children:s("delete")})}),l.jsxs(mh,{children:[l.jsxs(gh,{children:[l.jsx(vh,{className:"dark:text-gray-200",children:s("access.group.delete")}),l.jsx(xh,{children:s("access.group.delete.confirm")})]}),l.jsxs(yh,{children:[l.jsx(bh,{className:"dark:text-gray-200",children:s("cancel")}),l.jsx(wh,{onClick:()=>{o(a.id?a.id:"")},children:s("confirm")})]})]})]})})]})})]}))})})]})};var ax="Tabs",[_V,DH]=on(ax,[Wa]),dT=Wa(),[SV,lx]=_V(ax),fT=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:a,activationMode:c="automatic",...u}=e,d=vi(a),[f,h]=Zn({prop:r,onChange:s,defaultProp:o});return l.jsx(SV,{scope:n,baseId:Wn(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:c,children:l.jsx(Re.div,{dir:d,"data-orientation":i,...u,ref:t})})});fT.displayName=ax;var hT="TabsList",pT=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=lx(hT,n),i=dT(n);return l.jsx($y,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:l.jsx(Re.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});pT.displayName=hT;var mT="TabsTrigger",gT=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,i=lx(mT,n),a=dT(n),c=xT(i.baseId,r),u=wT(i.baseId,r),d=r===i.value;return l.jsx(Uy,{asChild:!0,...a,focusable:!s,active:d,children:l.jsx(Re.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ue(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(r)})})})});gT.displayName=mT;var yT="TabsContent",vT=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...i}=e,a=lx(yT,n),c=xT(a.baseId,r),u=wT(a.baseId,r),d=r===a.value,f=v.useRef(d);return v.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(an,{present:s||d,children:({present:h})=>l.jsx(Re.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});vT.displayName=yT;function xT(e,t){return`${e}-trigger-${t}`}function wT(e,t){return`${e}-content-${t}`}var kV=fT,bT=pT,_T=gT,ST=vT;const kT=kV,cx=v.forwardRef(({className:e,...t},n)=>l.jsx(bT,{ref:n,className:oe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));cx.displayName=bT.displayName;const Xo=v.forwardRef(({className:e,...t},n)=>l.jsx(_T,{ref:n,className:oe("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}));Xo.displayName=_T.displayName;const pf=v.forwardRef(({className:e,...t},n)=>l.jsx(ST,{ref:n,className:oe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));pf.displayName=ST.displayName;const CV={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class mf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||CV,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new mf(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new mf(this.logger,t)}}var Yr=new mf;class Lh{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[a,c]=i;for(let u=0;u<c;u++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[a,c]=i;for(let u=0;u<c;u++)a.apply(a,[t,...r])})}}const hl=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},d1=e=>e==null?"":""+e,jV=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},EV=/###/g,f1=e=>e&&e.indexOf("###")>-1?e.replace(EV,"."):e,h1=e=>!e||typeof e=="string",Vl=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let s=0;for(;s<r.length-1;){if(h1(e))return{};const o=f1(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return h1(e)?{}:{obj:e,k:f1(r[s])}},p1=(e,t,n)=>{const{obj:r,k:s}=Vl(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),a=Vl(e,i,Object);for(;a.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),a=Vl(e,i,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},NV=(e,t,n,r)=>{const{obj:s,k:o}=Vl(e,t,Object);s[o]=s[o]||[],s[o].push(n)},gf=(e,t)=>{const{obj:n,k:r}=Vl(e,t);if(n)return n[r]},TV=(e,t,n)=>{const r=gf(e,n);return r!==void 0?r:gf(t,n)},CT=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):CT(e[r],t[r],n):e[r]=t[r]);return e},Ii=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var RV={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const PV=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>RV[t]):e;class AV{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const OV=[" ",",","?","!",";"],DV=new AV(20),IV=(e,t,n)=>{t=t||"",n=n||"";const r=OV.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=DV.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},vg=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,a="";for(let c=o;c<r.length;++c)if(c!==o&&(a+=n),a+=r[c],i=s[a],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&c<r.length-1)continue;o+=c-o+1;break}s=i}return s},yf=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class m1 extends Lh{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&o?a.push(...r.split(o)):a.push(r)));const c=gf(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!i||typeof r!="string"?c:vg(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),p1(this.data,a,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=gf(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?CT(c,r,o):c={...c,...r},p1(this.data,a,c),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var jT={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const g1={};class vf extends Lh{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),jV(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Yr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!IV(t,r,s);if(i&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(s)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const _=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${_}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${_}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let h=f&&f.res;const y=f&&f.usedKey||i,x=f&&f.exactUsedKey||i,g=Object.prototype.toString.apply(h),w=["[object Number]","[object Function]","[object RegExp]"],m=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,p=!this.i18nFormat||this.i18nFormat.handleAsObject;if(p&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&w.indexOf(g)<0&&!(typeof m=="string"&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,h,{...n,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(f.res=_,f.usedParams=this.getUsedParamsDetails(n),f):_}if(o){const _=Array.isArray(h),C=_?[]:{},j=_?x:y;for(const T in h)if(Object.prototype.hasOwnProperty.call(h,T)){const P=`${j}${o}${T}`;C[T]=this.translate(P,{...n,joinArrays:!1,ns:a}),C[T]===P&&(C[T]=h[T])}h=C}}else if(p&&typeof m=="string"&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,t,n,r));else{let _=!1,C=!1;const j=n.count!==void 0&&typeof n.count!="string",T=vf.hasDefaultValue(n),P=j?this.pluralResolver.getSuffix(u,n.count,n):"",A=n.ordinal&&j?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",D=j&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),G=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(h)&&T&&(_=!0,h=G),this.isValidLookup(h)||(C=!0,h=i);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,S=T&&G!==h&&this.options.updateMissing;if(C||_||S){if(this.logger.log(S?"updateKey":"missingKey",u,c,i,S?G:h),o){const W=this.resolve(i,{...n,keySeparator:!1});W&&W.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let W=0;W<J.length;W++)U.push(J[W]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(n.lng||this.language):U.push(n.lng||this.language);const z=(W,I,X)=>{const $=T&&X!==h?X:F;this.options.missingKeyHandler?this.options.missingKeyHandler(W,c,I,$,S,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(W,c,I,$,S,n),this.emit("missingKey",W,c,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?U.forEach(W=>{const I=this.pluralResolver.getSuffixes(W,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(X=>{z([W],i+X,n[`defaultValue${X}`]||G)})}):z(U,i,G))}h=this.extendTranslation(h,t,n,f,r),C&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${i}`),(C||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${i}`:i,_?h:void 0):h=this.options.parseMissingKeyHandler(h))}return s?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||s.usedLng,r),u){const h=t.match(this.interpolator.nestingRegexp),y=h&&h.length;d<y&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var h=arguments.length,y=new Array(h),x=0;x<h;x++)y[x]=arguments[x];return o&&o[0]===y[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):i.translate(...y,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,c=typeof a=="string"?[a]:a;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=jT.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,a;return typeof t=="string"&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;s=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&typeof n.count!="string",y=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),x=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{this.isValidLookup(r)||(a=w,!g1[`${g[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(g1[`${g[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(m=>{if(this.isValidLookup(r))return;i=m;const p=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(p,d,m,w,n);else{let _;h&&(_=this.pluralResolver.getSuffix(m,n.count,n));const C=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(p.push(d+_),n.ordinal&&_.indexOf(j)===0&&p.push(d+_.replace(j,this.options.pluralSeparator)),y&&p.push(d+C)),x){const T=`${d}${this.options.contextSeparator}${n.context}`;p.push(T),h&&(p.push(T+_),n.ordinal&&_.indexOf(j)===0&&p.push(T+_.replace(j,this.options.pluralSeparator)),y&&p.push(T+C))}}let b;for(;b=p.pop();)this.isValidLookup(r)||(o=b,r=this.getResource(m,w,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const zp=e=>e.charAt(0).toUpperCase()+e.slice(1);class y1{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yr.create("languageUtils")}getScriptPartFromCode(t){if(t=yf(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=yf(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=zp(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=zp(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=zp(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let MV=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],LV={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const FV=["v1","v2","v3"],zV=["v4"],v1={zero:0,one:1,two:2,few:3,many:4,other:5},$V=()=>{const e={};return MV.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:LV[t.fc]}})}),e};class UV{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Yr.create("pluralResolver"),(!this.options.compatibilityJSON||zV.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=$V(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=yf(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(r,{type:s});return this.pluralRulesCache[o]=i,i}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>v1[s]-v1[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!FV.includes(this.options.compatibilityJSON)}}const x1=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=TV(e,t,n);return!o&&s&&typeof n=="string"&&(o=vg(e,n,r),o===void 0&&(o=vg(t,n,r))),o},$p=e=>e.replace(/\$/g,"$$$$");class VV{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:y,nestingSuffix:x,nestingSuffixEscaped:g,nestingOptionsSeparator:w,maxReplaces:m,alwaysFormat:p}=t.interpolation;this.escape=n!==void 0?n:PV,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Ii(o):i||"{{",this.suffix=a?Ii(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=h?Ii(h):y||Ii("$t("),this.nestingSuffix=x?Ii(x):g||Ii(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=m||1e3,this.alwaysFormat=p!==void 0?p:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=y=>{if(y.indexOf(this.formatSeparator)<0){const m=x1(n,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...s,...n,interpolationkey:y}):m}const x=y.split(this.formatSeparator),g=x.shift().trim(),w=x.join(this.formatSeparator).trim();return this.format(x1(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...n,interpolationkey:g})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>$p(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?$p(this.escape(y)):$p(y)}].forEach(y=>{for(a=0;o=y.regex.exec(t);){const x=o[1].trim();if(i=u(x),i===void 0)if(typeof d=="function"){const w=d(t,o,s);i=typeof w=="string"?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))i="";else if(f){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${t}`),i="";else typeof i!="string"&&!this.useRawValueToEscape&&(i=d1(i));const g=y.safeValue(i);if(t=t.replace(o[0],g),f?(y.regex.lastIndex+=i.length,y.regex.lastIndex-=o[0].length):y.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const a=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const f=c.split(new RegExp(`${d}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,i);const y=h.match(/'/g),x=h.match(/"/g);(y&&y.length%2===0&&!x||x.length%2!==0)&&(h=h.replace(/'/g,'"'));try{i=JSON.parse(h),u&&(i={...u,...i})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${d}${h}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];i={...r},i=i.replace&&typeof i.replace!="string"?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=d.shift(),c=d,u=!0}if(o=n(a.call(this,s[1].trim(),i),i),o&&s[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=d1(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),u&&(o=c.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const BV=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[a,...c]=i.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Mi=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(yf(r),s),t[i]=a),a(n)}};class WV{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yr.create("formatter"),this.options=t,this.formats={number:Mi((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Mi((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Mi((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Mi((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Mi((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Mi(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,c)=>{const{formatName:u,formatOptions:d}=BV(c);if(this.formats[u]){let f=a;try{const h=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},y=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](a,y,{...d,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const HV=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class YV extends Lh{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Yr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},a={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?i[h]===void 0&&(i[h]=!0):(this.state[h]=1,d=!1,i[h]===void 0&&(i[h]=!0),o[h]===void 0&&(o[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(a[u]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{NV(c.loaded,[o],i),HV(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,a)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,a),this.loaded(t,i,a)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,s,c):d=u(t,n,r,s),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else u(t,n,r,s,a,c)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const w1=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),b1=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Uu=()=>{},KV=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Pc extends Lh{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=b1(t),this.services={},this.logger=Yr,this.modules={external:[]},KV(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=w1();this.options={...s,...this.options,...b1(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Yr.init(o(this.modules.logger),this.options):Yr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=WV);const f=new y1(this.options);this.store=new m1(this.options.resources,this.options);const h=this.services;h.logger=Yr,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new UV(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=o(d),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new VV(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new YV(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(y){for(var x=arguments.length,g=new Array(x>1?x-1:0),w=1;w<x;w++)g[w-1]=arguments[w];t.emit(y,...g)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new vf(this.services,this.options),this.translator.on("*",function(y){for(var x=arguments.length,g=new Array(x>1?x-1:0),w=1;w<x;w++)g[w-1]=arguments[w];t.emit(y,...g)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Uu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const c=hl(),u=()=>{const d=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),r(f,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Uu;const s=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>i(c)),this.options.preload&&this.options.preload.forEach(a=>i(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const s=hl();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Uu),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&jT.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=hl();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},i=(c,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),s}getFixedT(t,n,r){var s=this;const o=function(i,a){let c;if(typeof a!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];c=s.options.overloadTranslationOptionHandler([i,a].concat(d))}else c={...a};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const h=s.options.keySeparator||".";let y;return c.keyPrefix&&Array.isArray(i)?y=i.map(x=>`${c.keyPrefix}${h}${x}`):y=c.keyPrefix?`${c.keyPrefix}${h}${i}`:i,s.t(y,c)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,i);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=hl();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=hl();typeof t=="string"&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new y1(w1());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Pc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Uu;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Pc(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new m1(this.store.data,s),o.services.resourceStore=o.store),o.translator=new vf(o.services,s),o.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];o.emit(a,...u)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const yn=Pc.createInstance();yn.createInstance=Pc.createInstance;yn.createInstance;yn.dir;yn.init;yn.loadResources;yn.reloadResources;yn.use;yn.changeLanguage;yn.getFixedT;const Pt=yn.t;yn.exists;yn.setDefaultNamespace;yn.hasLoadedNamespace;yn.loadNamespaces;yn.loadLanguages;const GV=()=>{const{config:e,deleteAccess:t}=In(),{accesses:n}=e,r=10,s=Math.ceil(n.length/r),o=Dn(),i=Ar(),a=new URLSearchParams(i.search),c=a.get("page"),u=c?Number(c):1,d=a.get("tab"),f=a.get("accessGroupId"),h=(u-1)*r,y=h+r,x=async w=>{const m=await f6(w);t(m.id)},g=w=>{a.set("tab",w),o({search:a.toString()})};return l.jsxs("div",{className:"",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:Pt("access.management")}),d!="access_group"?l.jsx(sa,{trigger:l.jsx(Ue,{children:Pt("access.add")}),op:"add"}):l.jsx(ix,{trigger:l.jsx(Ue,{children:Pt("access.group.add")})})]}),l.jsxs(kT,{defaultValue:d||"access",value:d||"access",className:"w-full mt-5",children:[l.jsxs(cx,{className:"space-x-5 px-3",children:[l.jsx(Xo,{value:"access",onClick:()=>{g("access")},children:Pt("access.management")}),l.jsx(Xo,{value:"access_group",onClick:()=>{g("access_group")},children:Pt("access.group.management")})]}),l.jsx(pf,{value:"access",children:n.length===0?l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(DO,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:Pt("access.empty")}),l.jsx(sa,{trigger:l.jsx(Ue,{children:Pt("access.add")}),op:"add",className:"mt-3"})]}):l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-48",children:Pt("name")}),l.jsx("div",{className:"w-48",children:Pt("access.type")}),l.jsx("div",{className:"w-60",children:Pt("create.time")}),l.jsx("div",{className:"w-60",children:Pt("update.time")}),l.jsx("div",{className:"grow",children:Pt("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:Pt("access.list")}),n.filter(w=>f?w.group==f:!0).slice(h,y).map(w=>{var m,p;return l.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:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:w.name}),l.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[l.jsx("img",{src:(m=wo.get(w.configType))==null?void 0:m[1],className:"w-6"}),l.jsx("div",{children:Pt(((p=wo.get(w.configType))==null?void 0:p[0])||"")})]}),l.jsxs("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:[Pt("created.in")," ",w.created&&Ta(w.created)]}),l.jsxs("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:[Pt("updated.in")," ",w.updated&&Ta(w.updated)]}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(sa,{trigger:l.jsx(Ue,{variant:"link",className:"p-0",children:Pt("edit")}),op:"edit",data:w}),l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(sa,{trigger:l.jsx(Ue,{variant:"link",className:"p-0",children:Pt("copy")}),op:"copy",data:w}),l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(zv,{children:[l.jsx($v,{asChild:!0,children:l.jsx(Ue,{variant:"link",size:"sm",children:Pt("delete")})}),l.jsxs(mh,{children:[l.jsxs(gh,{children:[l.jsx(vh,{className:"dark:text-gray-200",children:Pt("access.group.delete")}),l.jsx(xh,{children:Pt("access.delete.confirm")})]}),l.jsxs(yh,{children:[l.jsx(bh,{className:"dark:text-gray-200",children:Pt("cancel")}),l.jsx(wh,{onClick:()=>{x(w)},children:Pt("confirm")})]})]})]})]})]},w.id)}),l.jsx(Pj,{totalPages:s,currentPage:u,onPageChange:w=>{a.set("page",w.toString()),o({search:a.toString()})}})]})}),l.jsx(pf,{value:"access_group",children:l.jsx(bV,{})})]})]})},ZV=Lc("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"}}),ux=v.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("div",{ref:r,role:"alert",className:oe(ZV({variant:t}),e),...n}));ux.displayName="Alert";const dx=v.forwardRef(({className:e,...t},n)=>l.jsx("h5",{ref:n,className:oe("mb-1 font-medium leading-none tracking-tight",e),...t}));dx.displayName="AlertTitle";const fx=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:oe("text-sm [&_p]:leading-relaxed",e),...t}));fx.displayName="AlertDescription";const ET=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await st().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},qV=()=>{const e=Dn(),[t,n]=v.useState(),[r]=bO(),{t:s}=ct(),o=r.get("domain");return v.useEffect(()=>{(async()=>{const a={};o&&(a.domain=o);const c=await ET(a);n(c.items)})()},[o]),l.jsxs(Mh,{className:"h-[80vh] overflow-hidden",children:[l.jsx("div",{className:"text-muted-foreground",children:s("deployment.log.name")}),t!=null&&t.length?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-48",children:s("domain")}),l.jsx("div",{className:"w-24",children:s("deployment.log.status")}),l.jsx("div",{className:"w-56",children:s("deployment.log.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:s("deployment.log.last.execution.time")}),l.jsx("div",{className:"grow",children:s("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:s("deployment.log.name")}),t==null?void 0:t.map(i=>{var a,c;return l.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:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=i.expand.domain)==null?void 0:a.domain}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Fv,{deployment:i})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Dv,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ta(i.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(iv,{children:[l.jsx(av,{asChild:!0,children:l.jsx(Ue,{variant:"link",className:"p-0",children:s("deployment.log.detail.button.text")})}),l.jsxs(Jf,{className:"sm:max-w-5xl",children:[l.jsx(lv,{children:l.jsxs(cv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,s("deployment.log.detail")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&l.jsx(l.Fragment,{children:i.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&l.jsx(l.Fragment,{children:i.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&l.jsx(l.Fragment,{children:i.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]}):l.jsx(l.Fragment,{children:l.jsxs(ux,{className:"max-w-[40em] mx-auto mt-20",children:[l.jsx(dx,{children:s("no.data")}),l.jsxs(fx,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(lS,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",s("deployment.log.empty")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Ue,{onClick:()=>{e("/")},children:s("domain.add")})})]})]})})]})},XV=ce.object({username:ce.string().email({message:"login.username.no.empty.message"}),password:ce.string().min(10,{message:"login.password.length.message"})}),QV=()=>{const{t:e}=ct(),t=pn({resolver:mn(XV),defaultValues:{username:"",password:""}}),n=async s=>{try{await st().admins.authWithPassword(s.username,s.password),r("/")}catch(o){const i=As(o);t.setError("username",{message:i}),t.setError("password",{message:i})}},r=Dn();return l.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[l.jsx("div",{className:"flex justify-center mb-10",children:l.jsx("img",{src:"/vite.svg",className:"w-16"})}),l.jsx(gn,{...t,children:l.jsxs("form",{onSubmit:t.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:t.control,name:"username",render:({field:s})=>l.jsxs(ve,{children:[l.jsx(xe,{children:e("username")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"email",...s})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:t.control,name:"password",render:({field:s})=>l.jsxs(ve,{children:[l.jsx(xe,{children:e("password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"password",...s,type:"password"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:e("login.submit")})})]})})]})},JV=()=>st().authStore.isValid&&st().authStore.isAdmin?l.jsx(sS,{to:"/"}):l.jsxs("div",{className:"container",children:[l.jsx(xy,{}),l.jsx(yj,{})]}),eB=ce.object({oldPassword:ce.string().min(10,{message:"setting.password.length.message"}),newPassword:ce.string().min(10,{message:"setting.password.length.message"}),confirmPassword:ce.string().min(10,{message:"setting.password.length.message"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"setting.password.not.match",path:["confirmPassword"]}),tB=()=>{const{toast:e}=Ir(),t=Dn(),{t:n}=ct(),r=pn({resolver:mn(eB),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),s=async o=>{var i,a;try{await st().admins.authWithPassword((i=st().authStore.model)==null?void 0:i.email,o.oldPassword)}catch(c){const u=As(c);r.setError("oldPassword",{message:u})}try{await st().admins.update((a=st().authStore.model)==null?void 0:a.id,{password:o.newPassword,passwordConfirm:o.confirmPassword}),st().authStore.clear(),e({title:n("setting.password.change.succeed"),description:n("setting.account.log.back.in")}),setTimeout(()=>{t("/login")},500)}catch(c){const u=As(c);e({title:n("setting.password.change.failed"),description:u,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(gn,{...r,children:l.jsxs("form",{onSubmit:r.handleSubmit(s),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:r.control,name:"oldPassword",render:({field:o})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("setting.password.current.password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:n("setting.password.current.password"),...o,type:"password"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:r.control,name:"newPassword",render:({field:o})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("setting.password.new.password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"newPassword",...o,type:"password"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:r.control,name:"confirmPassword",render:({field:o})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("setting.password.confirm.password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"confirmPassword",...o,type:"password"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:n("setting.submit")})})]})})})})},nB=()=>{const e=Ar(),[t,n]=v.useState("account"),r=Dn(),{t:s}=ct();return v.useEffect(()=>{const i=e.pathname.split("/")[2];n(i)},[e]),l.jsxs("div",{children:[l.jsx(Yv,{}),l.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:s("setting")}),l.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:l.jsxs(kT,{defaultValue:"account",className:"w-full",value:t,children:[l.jsxs(cx,{className:"mx-auto",children:[l.jsxs(Xo,{value:"account",onClick:()=>{r("/setting/account")},className:"px-5",children:[l.jsx(BO,{size:14}),l.jsx("div",{className:"ml-1",children:s("account")})]}),l.jsxs(Xo,{value:"password",onClick:()=>{r("/setting/password")},className:"px-5",children:[l.jsx(OO,{size:14}),l.jsx("div",{className:"ml-1",children:s("password")})]}),l.jsxs(Xo,{value:"notify",onClick:()=>{r("/setting/notify")},className:"px-5",children:[l.jsx(LO,{size:14}),l.jsx("div",{className:"ml-1",children:s("setting.notify.menu")})]}),l.jsxs(Xo,{value:"ssl-provider",onClick:()=>{r("/setting/ssl-provider")},className:"px-5",children:[l.jsx($O,{size:14}),l.jsx("div",{className:"ml-1",children:s("ca")})]})]}),l.jsx(pf,{value:t,children:l.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:l.jsx(xy,{})})})]})})]})},rB=()=>{const[e,t]=v.useState(),[n,r]=v.useState(),s=Dn(),{t:o}=ct();return v.useEffect(()=>{(async()=>{const a=await W$();t(a)})()},[]),v.useEffect(()=>{(async()=>{const c=await ET({perPage:8});r(c.items)})()},[]),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:"flex justify-between items-center",children:l.jsx("div",{className:"text-muted-foreground",children:o("dashboard")})}),l.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(UO,{size:48,strokeWidth:1,className:"text-blue-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.all")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?l.jsx(xn,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.unit")})]})]})]}),l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(EO,{size:48,strokeWidth:1,className:"text-red-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.near.expired")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?l.jsx(xn,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(MO,{size:48,strokeWidth:1,className:"text-green-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.enabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?l.jsx(xn,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(CO,{size:48,strokeWidth:1,className:"text-gray-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.not.enabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?l.jsx(xn,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.unit")})]})]})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:o("deployment.log.name")}),(n==null?void 0:n.length)==0?l.jsx(l.Fragment,{children:l.jsxs(ux,{className:"max-w-[40em] mt-10",children:[l.jsx(dx,{children:o("no.data")}),l.jsxs(fx,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(lS,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",o("deployment.log.empty")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Ue,{onClick:()=>{s("/edit")},children:o("domain.add")})})]})]})}):l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-48",children:o("domain")}),l.jsx("div",{className:"w-24",children:o("deployment.log.status")}),l.jsx("div",{className:"w-56",children:o("deployment.log.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:o("deployment.log.last.execution.time")}),l.jsx("div",{className:"grow",children:o("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:o("deployment.log.name")}),n==null?void 0:n.map(i=>{var a,c;return l.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:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=i.expand.domain)==null?void 0:a.domain}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Fv,{deployment:i})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Dv,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ta(i.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(iv,{children:[l.jsx(av,{asChild:!0,children:l.jsx(Ue,{variant:"link",className:"p-0",children:o("deployment.log.detail.button.text")})}),l.jsxs(Jf,{className:"sm:max-w-5xl",children:[l.jsx(lv,{children:l.jsxs(cv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,o("deployment.log.detail")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&l.jsx(l.Fragment,{children:i.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&l.jsx(l.Fragment,{children:i.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&l.jsx(l.Fragment,{children:i.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]})]})]})},sB=ce.object({email:ce.string().email("setting.account.email.valid.message")}),oB=()=>{var a;const{toast:e}=Ir(),t=Dn(),{t:n}=ct(),[r,s]=v.useState(!1),o=pn({resolver:mn(sB),defaultValues:{email:(a=st().authStore.model)==null?void 0:a.email}}),i=async c=>{var u;try{await st().admins.update((u=st().authStore.model)==null?void 0:u.id,{email:c.email}),st().authStore.clear(),e({title:n("setting.account.email.change.succeed"),description:n("setting.account.log.back.in")}),setTimeout(()=>{t("/login")},500)}catch(d){const f=As(d);e({title:n("setting.account.email.change.failed"),description:f,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(gn,{...o,children:l.jsxs("form",{onSubmit:o.handleSubmit(i),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:o.control,name:"email",render:({field:c})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("email")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:n("setting.email.placeholder"),...c,type:"email",onChange:u=>{s(!0),o.setValue("email",u.target.value)}})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:r?l.jsx(Ue,{type:"submit",children:n("setting.submit")}):l.jsx(Ue,{type:"submit",disabled:!0,variant:"secondary",children:n("setting.submit")})})]})})})})},iB=(e,t)=>{switch(t.type){case"SET_CHANNEL":{const n=t.payload.channel;return{...e,content:{...e.content,[n]:t.payload.data}}}case"SET_CHANNELS":return{...t.payload};default:return e}},NT=v.createContext({}),hx=()=>v.useContext(NT),aB=({children:e})=>{const[t,n]=v.useReducer(iB,{});v.useEffect(()=>{(async()=>{const i=await Ov("notifyChannels");n({type:"SET_CHANNELS",payload:i})})()},[]);const r=v.useCallback(o=>{n({type:"SET_CHANNEL",payload:o})},[]),s=v.useCallback(o=>{n({type:"SET_CHANNELS",payload:o})},[]);return l.jsx(NT.Provider,{value:{config:t,setChannel:r,setChannels:s},children:e})},lB=()=>{const{config:e,setChannels:t}=hx(),{t:n}=ct(),[r,s]=v.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});v.useEffect(()=>{const c=(()=>{const u={accessToken:"",secret:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.dingtalk?d.dingtalk:u})();s({id:e.id??"",name:"dingtalk",data:c})},[e]);const{toast:o}=Ir(),i=async()=>{try{const a=await Ga({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...r.data}}});t(a),o({title:n("save.succeed"),description:n("setting.notify.config.save.succeed")})}catch(a){const c=As(a);o({title:n("save.failed"),description:`${n("setting.notify.config.save.failed")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Ne,{placeholder:"AccessToken",value:r.data.accessToken,onChange:a=>{s({...r,data:{...r.data,accessToken:a.target.value}})}}),l.jsx(Ne,{placeholder:n("access.form.ding.access.token.placeholder"),className:"mt-2",value:r.data.secret,onChange:a=>{s({...r,data:{...r.data,secret:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Qc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ro,{htmlFor:"airplane-mode",children:n("setting.notify.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:()=>{i()},children:n("save")})})]})},cB={title:"您有{COUNT}张证书即将过期",content:"有{COUNT}张证书即将过期,域名分别为{DOMAINS},请保持关注!"},uB=()=>{const[e,t]=v.useState(""),[n,r]=v.useState([cB]),{toast:s}=Ir(),{t:o}=ct();v.useEffect(()=>{(async()=>{const d=await Ov("templates");d.content&&(r(d.content.notifyTemplates),t(d.id?d.id:""))})()},[]);const i=u=>{const d=n[0];r([{...d,title:u}])},a=u=>{const d=n[0];r([{...d,content:u}])},c=async()=>{const u=await Ga({id:e,content:{notifyTemplates:n},name:"templates"});u.id&&t(u.id),s({title:o("save.succeed"),description:o("setting.notify.template.save.succeed")})};return l.jsxs("div",{children:[l.jsx(Ne,{value:n[0].title,onChange:u=>{i(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("setting.notify.template.variables.tips.title")}),l.jsx(mi,{className:"mt-2",value:n[0].content,onChange:u=>{a(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("setting.notify.template.variables.tips.content")}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:c,children:o("save")})})]})},dB=()=>{const{config:e,setChannels:t}=hx(),{t:n}=ct(),[r,s]=v.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});v.useEffect(()=>{const c=(()=>{const u={apiToken:"",chatId:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.telegram?d.telegram:u})();s({id:e.id??"",name:"telegram",data:c})},[e]);const{toast:o}=Ir(),i=async()=>{try{const a=await Ga({...e,name:"notifyChannels",content:{...e.content,telegram:{...r.data}}});t(a),o({title:n("save.succeed"),description:n("setting.notify.config.save.succeed")})}catch(a){const c=As(a);o({title:n("save.failed"),description:`${n("setting.notify.config.save.failed")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Ne,{placeholder:"ApiToken",value:r.data.apiToken,onChange:a=>{s({...r,data:{...r.data,apiToken:a.target.value}})}}),l.jsx(Ne,{placeholder:"ChatId",value:r.data.chatId,onChange:a=>{s({...r,data:{...r.data,chatId:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Qc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ro,{htmlFor:"airplane-mode",children:n("setting.notify.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:()=>{i()},children:n("save")})})]})};function fB(e){try{return new URL(e),!0}catch{return!1}}const hB=()=>{const{config:e,setChannels:t}=hx(),{t:n}=ct(),[r,s]=v.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});v.useEffect(()=>{const c=(()=>{const u={url:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.webhook?d.webhook:u})();s({id:e.id??"",name:"webhook",data:c})},[e]);const{toast:o}=Ir(),i=async()=>{try{if(r.data.url=r.data.url.trim(),!fB(r.data.url)){o({title:n("save.failed"),description:n("setting.notify.config.save.failed.url.not.valid"),variant:"destructive"});return}const a=await Ga({...e,name:"notifyChannels",content:{...e.content,webhook:{...r.data}}});t(a),o({title:n("save.succeed"),description:n("setting.notify.config.save.succeed")})}catch(a){const c=As(a);o({title:n("save.failed"),description:`${n("setting.notify.config.save.failed")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Ne,{placeholder:"Url",value:r.data.url,onChange:a=>{s({...r,data:{...r.data,url:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Qc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ro,{htmlFor:"airplane-mode",children:n("setting.notify.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:()=>{i()},children:n("save")})})]})};var px="Collapsible",[pB,TT]=on(px),[mB,mx]=pB(px),RT=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...a}=e,[c=!1,u]=Zn({prop:r,defaultProp:s,onChange:i});return l.jsx(mB,{scope:n,disabled:o,contentId:Wn(),open:c,onOpenToggle:v.useCallback(()=>u(d=>!d),[u]),children:l.jsx(Re.div,{"data-state":yx(c),"data-disabled":o?"":void 0,...a,ref:t})})});RT.displayName=px;var PT="CollapsibleTrigger",AT=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=mx(PT,n);return l.jsx(Re.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":yx(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ue(e.onClick,s.onOpenToggle)})});AT.displayName=PT;var gx="CollapsibleContent",OT=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=mx(gx,e.__scopeCollapsible);return l.jsx(an,{present:n||s.open,children:({present:o})=>l.jsx(gB,{...r,ref:t,present:o})})});OT.displayName=gx;var gB=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,i=mx(gx,n),[a,c]=v.useState(r),u=v.useRef(null),d=Ke(t,u),f=v.useRef(0),h=f.current,y=v.useRef(0),x=y.current,g=i.open||a,w=v.useRef(g),m=v.useRef();return v.useEffect(()=>{const p=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(p)},[]),en(()=>{const p=u.current;if(p){m.current=m.current||{transitionDuration:p.style.transitionDuration,animationName:p.style.animationName},p.style.transitionDuration="0s",p.style.animationName="none";const b=p.getBoundingClientRect();f.current=b.height,y.current=b.width,w.current||(p.style.transitionDuration=m.current.transitionDuration,p.style.animationName=m.current.animationName),c(r)}},[i.open,r]),l.jsx(Re.div,{"data-state":yx(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...o,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:g&&s})});function yx(e){return e?"open":"closed"}var yB=RT,vB=AT,xB=OT,Ws="Accordion",wB=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vx,bB,_B]=Fc(Ws),[Fh,IH]=on(Ws,[_B,TT]),xx=TT(),DT=We.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,o=r;return l.jsx(vx.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(jB,{...o,ref:t}):l.jsx(CB,{...s,ref:t})})});DT.displayName=Ws;var[IT,SB]=Fh(Ws),[MT,kB]=Fh(Ws,{collapsible:!1}),CB=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[a,c]=Zn({prop:n,defaultProp:r,onChange:s});return l.jsx(IT,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:We.useCallback(()=>o&&c(""),[o,c]),children:l.jsx(MT,{scope:e.__scopeAccordion,collapsible:o,children:l.jsx(LT,{...i,ref:t})})})}),jB=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...o}=e,[i=[],a]=Zn({prop:n,defaultProp:r,onChange:s}),c=We.useCallback(d=>a((f=[])=>[...f,d]),[a]),u=We.useCallback(d=>a((f=[])=>f.filter(h=>h!==d)),[a]);return l.jsx(IT,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:l.jsx(MT,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(LT,{...o,ref:t})})})}),[EB,zh]=Fh(Ws),LT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:o="vertical",...i}=e,a=We.useRef(null),c=Ke(a,t),u=bB(n),f=vi(s)==="ltr",h=ue(e.onKeyDown,y=>{var P;if(!wB.includes(y.key))return;const x=y.target,g=u().filter(A=>{var D;return!((D=A.ref.current)!=null&&D.disabled)}),w=g.findIndex(A=>A.ref.current===x),m=g.length;if(w===-1)return;y.preventDefault();let p=w;const b=0,_=m-1,C=()=>{p=w+1,p>_&&(p=b)},j=()=>{p=w-1,p<b&&(p=_)};switch(y.key){case"Home":p=b;break;case"End":p=_;break;case"ArrowRight":o==="horizontal"&&(f?C():j());break;case"ArrowDown":o==="vertical"&&C();break;case"ArrowLeft":o==="horizontal"&&(f?j():C());break;case"ArrowUp":o==="vertical"&&j();break}const T=p%m;(P=g[T].ref.current)==null||P.focus()});return l.jsx(EB,{scope:n,disabled:r,direction:s,orientation:o,children:l.jsx(vx.Slot,{scope:n,children:l.jsx(Re.div,{...i,"data-orientation":o,ref:c,onKeyDown:r?void 0:h})})})}),xf="AccordionItem",[NB,wx]=Fh(xf),FT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...s}=e,o=zh(xf,n),i=SB(xf,n),a=xx(n),c=Wn(),u=r&&i.value.includes(r)||!1,d=o.disabled||e.disabled;return l.jsx(NB,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx(yB,{"data-orientation":o.orientation,"data-state":WT(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?i.onItemOpen(r):i.onItemClose(r)}})})});FT.displayName=xf;var zT="AccordionHeader",$T=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=zh(Ws,n),o=wx(zT,n);return l.jsx(Re.h3,{"data-orientation":s.orientation,"data-state":WT(o.open),"data-disabled":o.disabled?"":void 0,...r,ref:t})});$T.displayName=zT;var xg="AccordionTrigger",UT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=zh(Ws,n),o=wx(xg,n),i=kB(xg,n),a=xx(n);return l.jsx(vx.ItemSlot,{scope:n,children:l.jsx(vB,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...a,...r,ref:t})})});UT.displayName=xg;var VT="AccordionContent",BT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=zh(Ws,n),o=wx(VT,n),i=xx(n);return l.jsx(xB,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});BT.displayName=VT;function WT(e){return e?"open":"closed"}var TB=DT,RB=FT,PB=$T,HT=UT,YT=BT;const _1=TB,jl=v.forwardRef(({className:e,...t},n)=>l.jsx(RB,{ref:n,className:oe("border-b",e),...t}));jl.displayName="AccordionItem";const El=v.forwardRef(({className:e,children:t,...n},r)=>l.jsx(PB,{className:"flex",children:l.jsxs(HT,{ref:r,className:oe("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(wy,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));El.displayName=HT.displayName;const Nl=v.forwardRef(({className:e,children:t,...n},r)=>l.jsx(YT,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:oe("pb-4 pt-0",e),children:t})}));Nl.displayName=YT.displayName;const AB=()=>{const{t:e}=ct();return l.jsx(l.Fragment,{children:l.jsxs(aB,{children:[l.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:l.jsx(_1,{type:"multiple",className:"dark:text-stone-200",children:l.jsxs(jl,{value:"item-1",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("template")}),l.jsx(Nl,{children:l.jsx(uB,{})})]})})}),l.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:l.jsxs(_1,{type:"single",className:"dark:text-stone-200",children:[l.jsxs(jl,{value:"item-2",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("ding.talk")}),l.jsx(Nl,{children:l.jsx(lB,{})})]}),l.jsxs(jl,{value:"item-4",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("telegram")}),l.jsx(Nl,{children:l.jsx(dB,{})})]}),l.jsxs(jl,{value:"item-5",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("webhook")}),l.jsx(Nl,{children:l.jsx(hB,{})})]})]})})]})})};var bx="Radio",[OB,KT]=on(bx),[DB,IB]=OB(bx),GT=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:c,...u}=e,[d,f]=v.useState(null),h=Ke(t,g=>f(g)),y=v.useRef(!1),x=d?!!d.closest("form"):!0;return l.jsxs(DB,{scope:n,checked:s,disabled:i,children:[l.jsx(Re.button,{type:"button",role:"radio","aria-checked":s,"data-state":XT(s),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:h,onClick:ue(e.onClick,g=>{s||c==null||c(),x&&(y.current=g.isPropagationStopped(),y.current||g.stopPropagation())})}),x&&l.jsx(MB,{control:d,bubbles:!y.current,name:r,value:a,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});GT.displayName=bx;var ZT="RadioIndicator",qT=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=IB(ZT,n);return l.jsx(an,{present:r||o.checked,children:l.jsx(Re.span,{"data-state":XT(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});qT.displayName=ZT;var MB=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=v.useRef(null),i=Uv(n),a=Oy(t);return v.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function XT(e){return e?"checked":"unchecked"}var LB=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_x="RadioGroup",[FB,MH]=on(_x,[Wa,KT]),QT=Wa(),JT=KT(),[zB,$B]=FB(_x),e2=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,y=QT(n),x=vi(u),[g,w]=Zn({prop:o,defaultProp:s,onChange:f});return l.jsx(zB,{scope:n,name:r,required:i,disabled:a,value:g,onValueChange:w,children:l.jsx($y,{asChild:!0,...y,orientation:c,dir:x,loop:d,children:l.jsx(Re.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x,...h,ref:t})})})});e2.displayName=_x;var t2="RadioGroupItem",n2=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=$B(t2,n),i=o.disabled||r,a=QT(n),c=JT(n),u=v.useRef(null),d=Ke(t,u),f=o.value===s.value,h=v.useRef(!1);return v.useEffect(()=>{const y=g=>{LB.includes(g.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",x)}},[]),l.jsx(Uy,{asChild:!0,...a,focusable:!i,active:f,children:l.jsx(GT,{disabled:i,required:o.required,checked:f,...c,...s,name:o.name,ref:d,onCheck:()=>o.onValueChange(s.value),onKeyDown:ue(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:ue(s.onFocus,()=>{var y;h.current&&((y=u.current)==null||y.click())})})})});n2.displayName=t2;var UB="RadioGroupIndicator",r2=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=JT(n);return l.jsx(qT,{...s,...r,ref:t})});r2.displayName=UB;var s2=e2,o2=n2,VB=r2;const i2=v.forwardRef(({className:e,...t},n)=>l.jsx(s2,{className:oe("grid gap-2",e),...t,ref:n}));i2.displayName=s2.displayName;const wg=v.forwardRef(({className:e,...t},n)=>l.jsx(o2,{ref:n,className:oe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(VB,{className:"flex items-center justify-center",children:l.jsx(aS,{className:"h-2.5 w-2.5 fill-current text-current"})})}));wg.displayName=o2.displayName;const BB=()=>{const{t:e}=ct(),t=ce.object({provider:ce.enum(["letsencrypt","zerossl"],{message:e("setting.ca.not.empty")}),eabKid:ce.string().optional(),eabHmacKey:ce.string().optional()}),n=pn({resolver:mn(t),defaultValues:{provider:"letsencrypt"}}),[r,s]=v.useState("letsencrypt"),[o,i]=v.useState(),{toast:a}=Ir();v.useEffect(()=>{(async()=>{const f=await Ov("ssl-provider");if(f){i(f);const h=f.content;n.setValue("provider",h.provider),n.setValue("eabKid",h.config[h.provider].eabKid),n.setValue("eabHmacKey",h.config[h.provider].eabHmacKey),s(h.provider)}else n.setValue("provider","letsencrypt"),s("letsencrypt")})()},[]);const c=d=>r===d?"border-primary":"",u=async d=>{if(d.provider==="zerossl"&&(d.eabKid||n.setError("eabKid",{message:e("setting.ca.eab_kid_hmac_key.not.empty")}),d.eabHmacKey||n.setError("eabHmacKey",{message:e("setting.ca.eab_kid_hmac_key.not.empty")}),!d.eabKid||!d.eabHmacKey))return;const f={id:o==null?void 0:o.id,name:"ssl-provider",content:{provider:d.provider,config:{letsencrypt:{},zerossl:{eabKid:d.eabKid??"",eabHmacKey:d.eabHmacKey??""}}}};try{await Ga(f),a({title:e("update.succeed"),description:e("update.succeed")})}catch(h){const y=As(h);a({title:e("update.failed"),description:y,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(gn,{...n,children:l.jsxs("form",{onSubmit:n.handleSubmit(u),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:n.control,name:"provider",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:e("ca")}),l.jsx(we,{children:l.jsxs(i2,{...d,className:"flex",onValueChange:f=>{s(f),n.setValue("provider",f)},value:r,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(wg,{value:"letsencrypt",id:"letsencrypt"}),l.jsx(Ro,{htmlFor:"letsencrypt",children:l.jsxs("div",{className:oe("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("letsencrypt")),children:[l.jsx("img",{src:"/imgs/providers/letsencrypt.svg",className:"h-6"}),l.jsx("div",{children:"Let's Encrypt"})]})})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(wg,{value:"zerossl",id:"zerossl"}),l.jsx(Ro,{htmlFor:"zerossl",children:l.jsxs("div",{className:oe("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("zerossl")),children:[l.jsx("img",{src:"/imgs/providers/zerossl.svg",className:"h-6"}),l.jsx("div",{children:"ZeroSSL"})]})})]})]})}),l.jsx(Se,{control:n.control,name:"eabKid",render:({field:f})=>l.jsxs(ve,{hidden:r!=="zerossl",children:[l.jsx(xe,{children:"EAB_KID"}),l.jsx(we,{children:l.jsx(Ne,{placeholder:e("setting.ca.eab_kid.not.empty"),...f,type:"text"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:n.control,name:"eabHmacKey",render:({field:f})=>l.jsxs(ve,{hidden:r!=="zerossl",children:[l.jsx(xe,{children:"EAB_HMAC_KEY"}),l.jsx(we,{children:l.jsx(Ne,{placeholder:e("setting.ca.eab_hmac_key.not.empty"),...f,type:"text"})}),l.jsx(ge,{})]})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:e("setting.submit")})})]})})})})},WB=iO([{path:"/",element:l.jsx(E6,{}),children:[{path:"/",element:l.jsx(rB,{})},{path:"/domains",element:l.jsx(Z$,{})},{path:"/edit",element:l.jsx(wV,{})},{path:"/access",element:l.jsx(GV,{})},{path:"/history",element:l.jsx(qV,{})},{path:"/setting",element:l.jsx(nB,{}),children:[{path:"/setting/password",element:l.jsx(tB,{})},{path:"/setting/account",element:l.jsx(oB,{})},{path:"/setting/notify",element:l.jsx(AB,{})},{path:"/setting/ssl-provider",element:l.jsx(BB,{})}]}]},{path:"/login",element:l.jsx(JV,{}),children:[{path:"/login",element:l.jsx(QV,{})}]},{path:"/about",element:l.jsx("div",{children:"About"})}]),{slice:HB,forEach:YB}=[];function KB(e){return YB.call(HB.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const S1=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,GB=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const s=encodeURIComponent(t);let o=`${e}=${s}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!S1.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!S1.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},k1={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=GB(e,encodeURIComponent(t),s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e){this.create(e,"",-1)}};var ZB={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return k1.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&k1.create(n,e,r,s,o)}},qB={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const i=s.substring(1).split("&");for(let a=0;a<i.length;a++){const c=i[a].indexOf("=");c>0&&i[a].substring(0,c)===t&&(n=i[a].substring(c+1))}}return n}};let pl=null;const C1=()=>{if(pl!==null)return pl;try{pl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{pl=!1}return pl};var XB={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&C1())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&C1()&&window.localStorage.setItem(n,e)}};let ml=null;const j1=()=>{if(ml!==null)return ml;try{ml=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ml=!1}return ml};var QB={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&j1())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&j1()&&window.sessionStorage.setItem(n,e)}},JB={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},eW={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},tW={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},nW={name:"subdomain",lookup(e){var s,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(s=window.location)==null?void 0:s.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function rW(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class a2{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=KB(n,this.options||{},rW()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(ZB),this.addDetector(qB),this.addDetector(XB),this.addDetector(QB),this.addDetector(JB),this.addDetector(eW),this.addDetector(tW),this.addDetector(nW)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}a2.type="languageDetector";const sW="证书颁发机构",oW="用户名",iW="密码",aW="邮箱",lW="退出登录",cW="设置",uW="账户",dW="模版",fW="保存",hW="状态",pW="操作",mW="启用",gW="禁用",yW="部署",vW="下载",xW="取消",wW="确认",bW="编辑",_W="复制",SW="成功",kW="新增",CW="文档",jW="变量",EW="域名服务器",NW="名称",TW="Telegram",RW="Webhook",PW="腾讯云",AW="阿里云",OW="七牛云",DW="Cloudflare",IW="Namesilo",MW="SSH 部署",LW="控制面板",FW="域名",zW={ca:sW,username:oW,"username.not.empty":"请输入用户名",password:iW,"password.not.empty":"请输入密码",email:aW,logout:lW,setting:cW,account:uW,template:dW,save:fW,"no.data":"暂无数据",status:hW,operation:pW,enable:mW,disable:gW,deploy:yW,download:vW,delete:"删除",cancel:xW,confirm:wW,edit:bW,copy:_W,succeed:SW,add:kW,document:CW,variables:jW,dns:EW,name:NW,"create.time":"创建时间","update.time":"更新时间","created.in":"创建于","updated.in":"更新于","basic.setting":"基础设置","advanced.setting":"高级设置","operation.succeed":"操作成功","save.succeed":"保存成功","save.failed":"保存失败","update.succeed":"修改成功","update.failed":"修改失败","delete.failed":"删除失败","ding.talk":"钉钉",telegram:TW,webhook:RW,"local.deployment":"本地部署",tencent:PW,"tencent.cdn":"腾讯云-CDN",aliyun:AW,"aliyun.cdn":"阿里云-CDN","aliyun.oss":"阿里云-OSS","aliyun.dcdn":"阿里云-DCDN",qiniu:OW,"qiniu.cdn":"七牛云-CDN",cloudflare:DW,namesilo:IW,"go.daddy":"GoDaddy",ssh:MW,"zod.rule.string.max":"请输入不超过 {{max}} 个字符","zod.rule.url":"请输入有效的 url 地址","zod.rule.ssh.host":"请输入正确的域名或IP","login.submit":"登录","login.username.no.empty.message":"请输入正确的邮箱地址","login.password.length.message":"密码至少10个字符","menu.auth.management":"授权管理","theme.light":"浅色","theme.dark":"暗黑","theme.system":"系统",dashboard:LW,"dashboard.all":"所有","dashboard.near.expired":"即将过期","dashboard.enabled":"启用中","dashboard.not.enabled":"未启用","dashboard.unit":"个","deployment.log.name":"部署历史","deployment.log.empty":"你暂未创建任何部署,请先添加域名进行部署吧!","deployment.log.status":"状态","deployment.log.stage":"阶段","deployment.log.last.execution.time":"最近执行时间","deployment.log.detail.button.text":"日志","deployment.log.detail":"部署详情","pagination.next":"下一页","pagination.prev":"上一页",domain:FW,"domain.add":"新增域名","domain.delete":"删除域名","domain.not.empty.verify.message":"请输入域名","domain.management.name":"域名列表","domain.management.start.deploy.succeed.tips":"已发起部署,请稍后查看部署日志。","domain.management.execution.failed":"执行失败","domain.management.execution.failed.tips":"执行失败,请在 <1>部署历史</1> 查看详情。","domain.management.empty":"请添加域名开始部署证书吧。","domain.management.expiry.date":"有效期限","domain.management.expiry.date1":"有效期 {{date}} 天","domain.management.expiry.date2":"{{date}} 到期","domain.management.last.execution.time":"最近执行时间","domain.management.last.execution.status":"最近执行状态","domain.management.last.execution.stage":"最近执行阶段","domain.management.enable":"是否启用","domain.management.start.deploying":"立即部署","domain.management.forced.deployment":"强行部署","domain.management.delete.confirm":"确定要删除域名吗?","domain.management.edit.title":"编辑域名","domain.management.edit.dns.access.label":"DNS 服务商授权配置","domain.management.edit.dns.access.not.empty.message":"请选择DNS服务商授权配置","domain.management.edit.access.label":"服务商授权配置","domain.management.edit.access.not.empty.message":"请选择授权配置","domain.management.edit.target.type":"部署服务类型","domain.management.edit.target.type.not.empty.message":"请选择部署服务类型","domain.management.edit.succeed.tips":"域名编辑成功","domain.management.edit.target.access":"部署服务商授权配置","domain.management.edit.target.access.content.label":"服务商授权配置","domain.management.edit.target.access.not.empty.message":"请选择授权配置","domain.management.edit.target.access.verify.msg":"部署授权和部署授权组至少选一个","domain.management.edit.group.label":"部署配置组(用于将一个域名证书部署到多个 ssh 主机)","domain.management.edit.group.not.empty.message":"请选择分组","domain.management.edit.email.not.empty.message":"请选择邮箱","domain.management.edit.email.description":"(申请证书需要提供邮箱)","domain.management.edit.variables.placeholder":`可在SSH部署中使用,形如:
key=val;
key2=val2;`,"domain.management.edit.dns.placeholder":`自定义域名服务器,多个用分号隔开,如:
8.8.8.8;
8.8.4.4;`,"domain.management.add.succeed.tips":"域名添加成功","email.add":"添加邮箱","email.list":"邮箱列表","email.valid.message":"请输入正确的邮箱地址","email.already.exist":"邮箱已存在","email.not.empty.message":"请输入邮箱","setting.notify.menu":"消息推送","setting.submit":"确认修改","setting.account.email.valid.message":"请输入正确的邮箱地址","setting.account.email.placeholder":"请输入邮箱","setting.account.email.change.succeed":"修改账户邮箱成功","setting.account.email.change.failed":"修改账户邮箱失败","setting.account.log.back.in":"请重新登录","setting.password.length.message":"密码至少10个字符","setting.password.not.match":"两次密码不一致","setting.password.change.succeed":"修改密码成功","setting.password.change.failed":"修改密码失败","setting.password.current.password":"当前密码","setting.password.new.password":"新密码","setting.password.confirm.password":"确认密码","setting.notify.template.save.succeed":"通知模板保存成功","setting.notify.template.variables.tips.title":"可选的变量, COUNT:即将过期张数","setting.notify.template.variables.tips.content":"可选的变量, COUNT:即将过期张数DOMAINS:域名列表","setting.notify.config.enable":"是否启用","setting.notify.config.save.succeed":"配置保存成功","setting.notify.config.save.failed":"配置保存失败","setting.notify.config.save.failed.url.not.valid":"Url格式不正确","setting.ca.not.empty":"请选择证书分发机构","setting.ca.eab_kid.not.empty":"请输入EAB_KID","setting.ca.eab_hmac_key.not.empty":"请输入EAB_HMAC_KEY","setting.ca.eab_kid_hmac_key.not.empty":"请输入EAB_KID和EAB_HMAC_KEY","deploy.progress.check":"检查","deploy.progress.apply":"获取","deploy.progress.deploy":"部署","access.management":"授权管理","access.add":"添加授权","access.edit":"编辑授权","access.copy":"复制授权","access.delete.confirm":"确定要删除授权吗?","access.all":"所有授权","access.list":"授权列表","access.type":"服务商","access.type.not.empty":"请选择服务商","access.not.empty":"请选择云服务商","access.empty":"请添加授权开始部署证书吧。","access.group.management":"授权组管理","access.group.add":"添加授权组","access.group.not.empty":"请选择分组","access.group.name":"组名","access.group.name.not.empty":"请输入组名","access.group.delete":"删除组","access.group.delete.confirm":"确定要删除部署授权组吗?","access.group.domain.empty":"请添加域名开始部署证书吧。","access.group.empty":"暂无部署授权配置,请添加后开始使用吧","access.group.total":"共有 {{total}} 个部署授权配置","access.form.name.not.empty":"请输入授权名称","access.form.config.field":"配置类型","access.form.access.key.id":"AccessKeyId","access.form.access.key.id.not.empty":"请输入 AccessKeyId","access.form.access.key.secret":"AccessKeySecret","access.form.access.key.secret.not.empty":"请输入 AccessKeySecret","access.form.cloud.dns.api.token":"CLOUD_DNS_API_TOKEN","access.form.cloud.dns.api.token.not.empty":"请输入 CLOUD_DNS_API_TOKEN","access.form.go.daddy.api.key":"GO_DADDY_API_KEY","access.form.go.daddy.api.key.not.empty":"请输入 GO_DADDY_API_KEY","access.form.go.daddy.api.secret":"GO_DADDY_API_SECRET","access.form.go.daddy.api.secret.not.empty":"请输入 GO_DADDY_API_SECRET","access.form.namesilo.api.key":"NAMESILO_API_KEY","access.form.namesilo.api.key.not.empty":"请输入 NAMESILO_API_KEY","access.form.secret.id":"SecretId","access.form.secret.id.not.empty":"请输入 SecretId","access.form.secret.key":"SecretKey","access.form.secret.key.not.empty":"请输入 SecretKey","access.form.access.key":"AccessKey","access.form.access.key.not.empty":"请输入 AccessKey","access.form.webhook.url":"Webhook URL","access.form.webhook.url.not.empty":"请输入 Webhook URL","access.form.ssh.group.label":"授权配置组(用于将一个域名证书部署到多个 ssh 主机)","access.form.ssh.host":"服务器 Host","access.form.ssh.host.not.empty":"请输入 Host","access.form.ssh.port":"SSH 端口","access.form.ssh.port.not.empty":"请输入 Port","access.form.ssh.key":"Key使用证书登录","access.form.ssh.key.not.empty":"请输入 Key","access.form.ssh.key.file.not.empty":"请选择文件","access.form.ssh.cert.path":"证书保存路径","access.form.ssh.cert.path.not.empty":"请输入证书保存路径","access.form.ssh.key.path":"私钥保存路径","access.form.ssh.key.path.not.empty":"请输入私钥保存路径","access.form.ssh.pre.command":"前置 Command","access.form.ssh.pre.command.not.empty":"在部署证书前执行的前置命令","access.form.ssh.command":"Command","access.form.ssh.command.not.empty":"请输入要执行的命令","access.form.ding.access.token.placeholder":"加签的签名"},$W="Certificate Authority",UW="Username",VW="Password",BW="Email",WW="Logout",HW="Settings",YW="Account",KW="Template",GW="Save",ZW="Status",qW="Operation",XW="Enable",QW="Disable",JW="Deploy",eH="Download",tH="Cancel",nH="Confirm",rH="Edit",sH="Copy",oH="Successful",iH="Add",aH="Document",lH="Variables",cH="Domain Name Server",uH="Name",dH="Telegram",fH="Webhook",hH="Tencent",pH="Alibaba Cloud",mH="Qiniu",gH="Cloudflare",yH="Namesilo",vH="SSH Deployment",xH="Dashboard",wH="Domain",bH={ca:$W,username:UW,"username.not.empty":"Please enter username",password:VW,"password.not.empty":"Please enter password",email:BW,logout:WW,setting:HW,account:YW,template:KW,save:GW,"no.data":"No data available",status:ZW,operation:qW,enable:XW,disable:QW,deploy:JW,download:eH,delete:"Delete",cancel:tH,confirm:nH,edit:rH,copy:sH,succeed:oH,add:iH,document:aH,variables:lH,dns:cH,name:uH,"create.time":"CreateTime","update.time":"UpdateTime","created.in":"Created in","updated.in":"Updated in","basic.setting":"Basic Settings","advanced.setting":"Advanced Settings","operation.succeed":"Operation Successful","save.succeed":"Save Successful","save.failed":"Save Failed","update.succeed":"Update Successful","update.failed":"Update Failed","delete.failed":"Delete Failed","ding.talk":"Ding Talk",telegram:dH,webhook:fH,"local.deployment":"Local Deployment",tencent:hH,"tencent.cdn":"Tencent-CDN",aliyun:pH,"aliyun.cdn":"Alibaba Cloud-CDN","aliyun.oss":"Alibaba Cloud-OSS","aliyun.dcdn":"Alibaba Cloud-DCDN",qiniu:mH,"qiniu.cdn":"Qiniu-CDN",cloudflare:gH,namesilo:yH,"go.daddy":"GoDaddy",ssh:vH,"zod.rule.string.max":"Please enter no more than {{max}} characters","zod.rule.url":"Please enter a valid URL","zod.rule.ssh.host":"Please enter the correct domain name or IP","login.submit":"Log In","login.username.no.empty.message":"Please enter a valid email address","login.password.length.message":"Password should be at least 10 characters","menu.auth.management":"Authorization Management","theme.light":"Light","theme.dark":"Dark","theme.system":"System",dashboard:xH,"dashboard.all":"All","dashboard.near.expired":"About to Expire","dashboard.enabled":"Enabled","dashboard.not.enabled":"Not Enabled","dashboard.unit":"Unit","deployment.log.name":"Deployment History","deployment.log.empty":"You have not created any deployments yet, please add a domain to start deployment!","deployment.log.status":"Status","deployment.log.stage":"Stage","deployment.log.last.execution.time":"Last Execution Time","deployment.log.detail.button.text":"Log","deployment.log.detail":"Deployment Details","pagination.next":"Next","pagination.prev":"Previous",domain:wH,"domain.add":"Add Domain","domain.delete":"Delete Domain","domain.not.empty.verify.message":"Please enter domain","domain.management.name":"Domain List","domain.management.start.deploy.succeed.tips":"Deployment initiated, please check the deployment log later.","domain.management.execution.failed":"Execution Failed","domain.management.execution.failed.tips":"Execution failed, please check the details in <1>Deployment History</1>.","domain.management.empty":"Please add a domain to start deploying the certificate.","domain.management.expiry.date":"Validity Period","domain.management.expiry.date1":"Valid for {{date}} days","domain.management.expiry.date2":"Expiry on {{date}}","domain.management.last.execution.time":"Last Execution Time","domain.management.last.execution.status":"Last Execution Status","domain.management.last.execution.stage":"Last Execution Stage","domain.management.enable":"Enable","domain.management.start.deploying":"Deploy Now","domain.management.forced.deployment":"Force Deployment","domain.management.delete.confirm":"Are you sure you want to delete this domain?","domain.management.edit.title":"Edit Domain","domain.management.edit.dns.access.label":"DNS Provider Authorization Configuration","domain.management.edit.dns.access.not.empty.message":"Please select DNS provider authorization configuration","domain.management.edit.access.label":"Provider Authorization Configuration","domain.management.edit.access.not.empty.message":"Please select authorization configuration","domain.management.edit.target.type":"Deployment Service Type","domain.management.edit.target.type.not.empty.message":"Please select deployment service type","domain.management.edit.succeed.tips":"Successful domain editing","domain.management.edit.target.access":"Deployment Service Provider Authorization Configuration","domain.management.edit.target.access.content.label":"Provider Authorization Configuration","domain.management.edit.target.access.not.empty.message":"Please select authorization configuration","domain.management.edit.target.access.verify.msg":"At least one of the deployment authorization and deployment authorization group must be selected","domain.management.edit.group.label":"Deployment Configuration Group (used to deploy a domain certificate to multiple ssh hosts)","domain.management.edit.group.not.empty.message":"Please select group","domain.management.edit.email.not.empty.message":"Please select email","domain.management.edit.email.description":"(A email is required to apply for a certificate)","domain.management.edit.variables.placeholder":`It can be used in SSH deployment, like:
key=val;
key2=val2;`,"domain.management.edit.dns.placeholder":`Custom domain name server, separates multiple entries with semicolon, like:
8.8.8.8;
8.8.4.4;`,"domain.management.add.succeed.tips":"Domain added successfully","email.add":"Add Email","email.list":"Email List","email.valid.message":"Please enter a valid email address","email.already.exist":"Email already exists","email.not.empty.message":"Please enter email","setting.notify.menu":"Notification Push","setting.submit":"Confirm Changes","setting.account.email.valid.message":"Please enter a valid email address","setting.account.email.placeholder":"Please enter email","setting.account.email.change.succeed":"Account email altered successfully","setting.account.email.change.failed":"Account email alteration failed","setting.account.log.back.in":"Please login again","setting.password.length.message":"Password should be at least 10 characters","setting.password.not.match":"Passwords do not match","setting.password.change.succeed":"Password changed successfully","setting.password.change.failed":"Password change failed","setting.password.current.password":"Current Password","setting.password.new.password":"New Password","setting.password.confirm.password":"Confirm Password","setting.notify.template.save.succeed":"Notification template saved successfully","setting.notify.template.variables.tips.title":"Optional variables, COUNT: number of expiring soon","setting.notify.template.variables.tips.content":"Optional variables, COUNT: number of expiring soon, DOMAINS: Domain list","setting.notify.config.enable":"Enable","setting.notify.config.save.succeed":"Configuration saved successfully","setting.notify.config.save.failed":"Configuration save failed","setting.notify.config.save.failed.url.not.valid":"Invalid Url format","setting.ca.not.empty":"Please select a Certificate Authority","setting.ca.eab_kid.not.empty":"Please enter EAB_KID","setting.ca.eab_hmac_key.not.empty":"Please enter EAB_HMAC_KEY.","setting.ca.eab_kid_hmac_key.not.empty":"Please enter EAB_KID and EAB_HMAC_KEY","deploy.progress.check":"Check","deploy.progress.apply":"Apply","deploy.progress.deploy":"Deploy","access.management":"Authorization Management","access.add":"Add Authorization","access.edit":"Edit Authorization","access.copy":"Copy Authorization","access.delete.confirm":"Are you sure you want to delete the deployment authorization?","access.all":"All Authorizations","access.list":"Authorization List","access.type":"Provider","access.type.not.empty":"Please select a provider","access.not.empty":"Please select a cloud provider","access.empty":"Please add authorization to start deploying certificate.","access.group.management":"Authorization Group Management","access.group.add":"Add Authorization Group","access.group.not.empty":"Please select a group","access.group.name":"Group Name","access.group.name.not.empty":"Please enter group name","access.group.delete":"Delete Group","access.group.delete.confirm":"Are you sure you want to delete the deployment authorization group?","access.group.domain.empty":"Please add a domain to start deploying the certificate.","access.group.empty":"No deployment authorization configuration yet, please add after starting use.","access.group.total":"Totally {{total}} deployment authorization configuration","access.form.name.not.empty":"Please enter authorization name","access.form.config.field":"Configuration Type","access.form.access.key.id":"AccessKeyId","access.form.access.key.id.not.empty":"Please enter AccessKeyId","access.form.access.key.secret":"AccessKeySecret","access.form.access.key.secret.not.empty":"Please enter AccessKeySecret","access.form.cloud.dns.api.token":"CLOUD_DNS_API_TOKEN","access.form.cloud.dns.api.token.not.empty":"Please enter CLOUD_DNS_API_TOKEN","access.form.go.daddy.api.key":"GO_DADDY_API_KEY","access.form.go.daddy.api.key.not.empty":"Please enter GO_DADDY_API_KEY","access.form.go.daddy.api.secret":"GO_DADDY_API_SECRET","access.form.go.daddy.api.secret.not.empty":"Please enter GO_DADDY_API_SECRET","access.form.namesilo.api.key":"NAMESILO_API_KEY","access.form.namesilo.api.key.not.empty":"Please enter NAMESILO_API_KEY","access.form.secret.id":"SecretId","access.form.secret.id.not.empty":"Please enter SecretId","access.form.secret.key":"SecretKey","access.form.secret.key.not.empty":"Please enter SecretKey","access.form.access.key":"AccessKey","access.form.access.key.not.empty":"Please enter AccessKey","access.form.webhook.url":"Webhook URL","access.form.webhook.url.not.empty":"Please enter Webhook URL","access.form.ssh.group.label":"Authorization Configuration Group (used to deploy a single domain certificate to multiple SSH hosts)","access.form.ssh.host":"Server Host","access.form.ssh.host.not.empty":"Please enter Host","access.form.ssh.port":"SSH Port","access.form.ssh.port.not.empty":"Please enter Port","access.form.ssh.key":"Key (Log in using certificate)","access.form.ssh.key.not.empty":"Please enter Key","access.form.ssh.key.file.not.empty":"Please select file","access.form.ssh.cert.path":"Certificate Save Path","access.form.ssh.cert.path.not.empty":"Please enter certificate save path","access.form.ssh.key.path":"Private Key Save Path","access.form.ssh.key.path.not.empty":"Please enter private key save path","access.form.ssh.pre.command":"Pre-deployment Command","access.form.ssh.pre.command.not.empty":"Command to be executed before deploying the certificate","access.form.ssh.command":"Command","access.form.ssh.command.not.empty":"Please enter command","access.form.ding.access.token.placeholder":"Signature for signed addition"},_H={zh:{name:"简体中文",translation:zW},en:{name:"English",translation:bH}};yn.use(a2).use(lD).init({resources:_H,fallbackLng:"zh",debug:!0,interpolation:{escapeValue:!1},backend:{loadPath:"/locales/{{lng}}.json"}});Up.createRoot(document.getElementById("root")).render(l.jsx(We.StrictMode,{children:l.jsx(x6,{defaultTheme:"system",storageKey:"vite-ui-theme",children:l.jsx(mO,{router:WB})})}))});export default SH();