certimate/ui/dist/assets/index-CHc3Jfu7.js
2024-10-19 22:46:37 +08:00

330 lines
912 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 EP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var y9=EP((A9,Nd)=>{function __(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 ju=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S_={exports:{}},Bf={},k_={exports:{}},nt={};/**
* @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 Zc=Symbol.for("react.element"),NP=Symbol.for("react.portal"),TP=Symbol.for("react.fragment"),PP=Symbol.for("react.strict_mode"),RP=Symbol.for("react.profiler"),AP=Symbol.for("react.provider"),DP=Symbol.for("react.context"),OP=Symbol.for("react.forward_ref"),IP=Symbol.for("react.suspense"),MP=Symbol.for("react.memo"),LP=Symbol.for("react.lazy"),m0=Symbol.iterator;function zP(e){return e===null||typeof e!="object"?null:(e=m0&&e[m0]||e["@@iterator"],typeof e=="function"?e:null)}var j_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C_=Object.assign,E_={};function Xa(e,t,n){this.props=e,this.context=t,this.refs=E_,this.updater=n||j_}Xa.prototype.isReactComponent={};Xa.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")};Xa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function N_(){}N_.prototype=Xa.prototype;function oy(e,t,n){this.props=e,this.context=t,this.refs=E_,this.updater=n||j_}var iy=oy.prototype=new N_;iy.constructor=oy;C_(iy,Xa.prototype);iy.isPureReactComponent=!0;var p0=Array.isArray,T_=Object.prototype.hasOwnProperty,ay={current:null},P_={key:!0,ref:!0,__self:!0,__source:!0};function R_(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)T_.call(t,r)&&!P_.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Zc,type:e,key:o,ref:i,props:s,_owner:ay.current}}function FP(e,t){return{$$typeof:Zc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ly(e){return typeof e=="object"&&e!==null&&e.$$typeof===Zc}function $P(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var g0=/\/+/g;function mm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?$P(""+e.key):t.toString(36)}function od(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 Zc:case NP:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+mm(i,0):r,p0(s)?(n="",e!=null&&(n=e.replace(g0,"$&/")+"/"),od(s,t,n,"",function(u){return u})):s!=null&&(ly(s)&&(s=FP(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(g0,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",p0(e))for(var l=0;l<e.length;l++){o=e[l];var c=r+mm(o,l);i+=od(o,t,n,c,s)}else if(c=zP(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=r+mm(o,l++),i+=od(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 Cu(e,t,n){if(e==null)return e;var r=[],s=0;return od(e,r,"","",function(o){return t.call(n,o,s++)}),r}function UP(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 jn={current:null},id={transition:null},VP={ReactCurrentDispatcher:jn,ReactCurrentBatchConfig:id,ReactCurrentOwner:ay};function A_(){throw Error("act(...) is not supported in production builds of React.")}nt.Children={map:Cu,forEach:function(e,t,n){Cu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Cu(e,function(){t++}),t},toArray:function(e){return Cu(e,function(t){return t})||[]},only:function(e){if(!ly(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};nt.Component=Xa;nt.Fragment=TP;nt.Profiler=RP;nt.PureComponent=oy;nt.StrictMode=PP;nt.Suspense=IP;nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VP;nt.act=A_;nt.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=C_({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=ay.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)T_.call(t,c)&&!P_.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Zc,type:e.type,key:s,ref:o,props:r,_owner:i}};nt.createContext=function(e){return e={$$typeof:DP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:AP,_context:e},e.Consumer=e};nt.createElement=R_;nt.createFactory=function(e){var t=R_.bind(null,e);return t.type=e,t};nt.createRef=function(){return{current:null}};nt.forwardRef=function(e){return{$$typeof:OP,render:e}};nt.isValidElement=ly;nt.lazy=function(e){return{$$typeof:LP,_payload:{_status:-1,_result:e},_init:UP}};nt.memo=function(e,t){return{$$typeof:MP,type:e,compare:t===void 0?null:t}};nt.startTransition=function(e){var t=id.transition;id.transition={};try{e()}finally{id.transition=t}};nt.unstable_act=A_;nt.useCallback=function(e,t){return jn.current.useCallback(e,t)};nt.useContext=function(e){return jn.current.useContext(e)};nt.useDebugValue=function(){};nt.useDeferredValue=function(e){return jn.current.useDeferredValue(e)};nt.useEffect=function(e,t){return jn.current.useEffect(e,t)};nt.useId=function(){return jn.current.useId()};nt.useImperativeHandle=function(e,t,n){return jn.current.useImperativeHandle(e,t,n)};nt.useInsertionEffect=function(e,t){return jn.current.useInsertionEffect(e,t)};nt.useLayoutEffect=function(e,t){return jn.current.useLayoutEffect(e,t)};nt.useMemo=function(e,t){return jn.current.useMemo(e,t)};nt.useReducer=function(e,t,n){return jn.current.useReducer(e,t,n)};nt.useRef=function(e){return jn.current.useRef(e)};nt.useState=function(e){return jn.current.useState(e)};nt.useSyncExternalStore=function(e,t,n){return jn.current.useSyncExternalStore(e,t,n)};nt.useTransition=function(){return jn.current.useTransition()};nt.version="18.3.1";k_.exports=nt;var g=k_.exports;const He=Vf(g),D_=__({__proto__:null,default:He},[g]);/**
* @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 BP=g,WP=Symbol.for("react.element"),HP=Symbol.for("react.fragment"),KP=Object.prototype.hasOwnProperty,YP=BP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,GP={key:!0,ref:!0,__self:!0,__source:!0};function O_(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)KP.call(t,r)&&!GP.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:WP,type:e,key:o,ref:i,props:s,_owner:YP.current}}Bf.Fragment=HP;Bf.jsx=O_;Bf.jsxs=O_;S_.exports=Bf;var a=S_.exports,xp={},I_={exports:{}},nr={},M_={exports:{}},L_={};/**
* @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,xe=B>>>1;$<xe;){var ie=2*($+1)-1,ae=W[ie],Ie=ie+1,we=W[Ie];if(0>s(ae,X))Ie<B&&0>s(we,ae)?(W[$]=we,W[Ie]=X,$=Ie):(W[$]=ae,W[ie]=X,$=ie);else if(Ie<B&&0>s(we,X))W[$]=we,W[Ie]=X,$=Ie;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,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,f=null,h=3,m=!1,x=!1,p=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=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(p=!1,b(W),!x)if(n(c)!==null)x=!0,J(j);else{var I=n(u);I!==null&&F(_,I.startTime-W)}}function j(W,I){x=!1,p&&(p=!1,y(R),R=-1),m=!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 xe=!0;else{var ie=n(u);ie!==null&&F(_,ie.startTime-I),xe=!1}return xe}finally{f=null,h=X,m=!1}}var C=!1,T=null,R=-1,A=5,O=-1;function G(){return!(e.unstable_now()-O<A)}function N(){if(T!==null){var W=e.unstable_now();O=W;var I=!0;try{I=T(!0,W)}finally{I?z():(C=!1,T=null)}}else C=!1}var z;if(typeof v=="function")z=function(){v(N)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,U=S.port2;S.port1.onmessage=N,z=function(){U.postMessage(null)}}else z=function(){w(N,0)};function J(W){T=W,C||(C=!0,z())}function F(W,I){R=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||m||(x=!0,J(j))},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)&&(p?(y(R),R=-1):p=!0,F(_,X-$))):(W.sortIndex=B,t(c,W),x||m||(x=!0,J(j))),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}}}})(L_);M_.exports=L_;var ZP=M_.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 qP=g,Jn=ZP;function ce(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 z_=new Set,sc={};function ki(e,t){Oa(e,t),Oa(e+"Capture",t)}function Oa(e,t){for(sc[e]=t,e=0;e<t.length;e++)z_.add(t[e])}var Os=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wp=Object.prototype.hasOwnProperty,XP=/^[: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]*$/,y0={},v0={};function QP(e){return wp.call(v0,e)?!0:wp.call(y0,e)?!1:XP.test(e)?v0[e]=!0:(y0[e]=!0,!1)}function JP(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 eR(e,t,n,r){if(t===null||typeof t>"u"||JP(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 cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[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];cn[t]=new Cn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new Cn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[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){cn[e]=new Cn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new Cn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new Cn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new Cn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new Cn(e,5,!1,e.toLowerCase(),null,!1,!1)});var cy=/[\-:]([a-z])/g;function uy(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(cy,uy);cn[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(cy,uy);cn[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(cy,uy);cn[t]=new Cn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new Cn(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new Cn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new Cn(e,1,!1,e.toLowerCase(),null,!0,!0)});function dy(e,t,n,r){var s=cn.hasOwnProperty(t)?cn[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(eR(t,n,s,r)&&(n=null),r||s===null?QP(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 Vs=qP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Eu=Symbol.for("react.element"),ea=Symbol.for("react.portal"),ta=Symbol.for("react.fragment"),fy=Symbol.for("react.strict_mode"),bp=Symbol.for("react.profiler"),F_=Symbol.for("react.provider"),$_=Symbol.for("react.context"),hy=Symbol.for("react.forward_ref"),_p=Symbol.for("react.suspense"),Sp=Symbol.for("react.suspense_list"),my=Symbol.for("react.memo"),so=Symbol.for("react.lazy"),U_=Symbol.for("react.offscreen"),x0=Symbol.iterator;function gl(e){return e===null||typeof e!="object"?null:(e=x0&&e[x0]||e["@@iterator"],typeof e=="function"?e:null)}var Lt=Object.assign,pm;function Il(e){if(pm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);pm=t&&t[1]||""}return`
`+pm+e}var gm=!1;function ym(e,t){if(!e||gm)return"";gm=!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,l=o.length-1;1<=i&&0<=l&&s[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(s[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||s[i]!==o[l]){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<=l);break}}}finally{gm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Il(e):""}function tR(e){switch(e.tag){case 5:return Il(e.type);case 16:return Il("Lazy");case 13:return Il("Suspense");case 19:return Il("SuspenseList");case 0:case 2:case 15:return e=ym(e.type,!1),e;case 11:return e=ym(e.type.render,!1),e;case 1:return e=ym(e.type,!0),e;default:return""}}function kp(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 ta:return"Fragment";case ea:return"Portal";case bp:return"Profiler";case fy:return"StrictMode";case _p:return"Suspense";case Sp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $_:return(e.displayName||"Context")+".Consumer";case F_:return(e._context.displayName||"Context")+".Provider";case hy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case my:return t=e.displayName||null,t!==null?t:kp(e.type)||"Memo";case so:t=e._payload,e=e._init;try{return kp(e(t))}catch{}}return null}function nR(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 kp(t);case 8:return t===fy?"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 Co(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function V_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rR(e){var t=V_(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 Nu(e){e._valueTracker||(e._valueTracker=rR(e))}function B_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Td(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 jp(e,t){var n=t.checked;return Lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function w0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Co(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 W_(e,t){t=t.checked,t!=null&&dy(e,"checked",t,!1)}function Cp(e,t){W_(e,t);var n=Co(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")?Ep(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ep(e,t.type,Co(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function b0(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 Ep(e,t,n){(t!=="number"||Td(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ml=Array.isArray;function xa(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=""+Co(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 Np(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ce(91));return Lt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ce(92));if(Ml(n)){if(1<n.length)throw Error(ce(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Co(n)}}function H_(e,t){var n=Co(t.value),r=Co(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 S0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function K_(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 Tp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?K_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tu,Y_=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(Tu=Tu||document.createElement("div"),Tu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function oc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wl={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},sR=["Webkit","ms","Moz","O"];Object.keys(Wl).forEach(function(e){sR.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wl[t]=Wl[e]})});function G_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wl.hasOwnProperty(e)&&Wl[e]?(""+t).trim():t+"px"}function Z_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=G_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var oR=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 Pp(e,t){if(t){if(oR[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function Rp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ap=null;function py(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dp=null,wa=null,ba=null;function k0(e){if(e=Qc(e)){if(typeof Dp!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=Gf(t),Dp(e.stateNode,e.type,t))}}function q_(e){wa?ba?ba.push(e):ba=[e]:wa=e}function X_(){if(wa){var e=wa,t=ba;if(ba=wa=null,k0(e),t)for(e=0;e<t.length;e++)k0(t[e])}}function Q_(e,t){return e(t)}function J_(){}var vm=!1;function e1(e,t,n){if(vm)return e(t,n);vm=!0;try{return Q_(e,t,n)}finally{vm=!1,(wa!==null||ba!==null)&&(J_(),X_())}}function ic(e,t){var n=e.stateNode;if(n===null)return null;var r=Gf(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(ce(231,t,typeof n));return n}var Op=!1;if(Os)try{var yl={};Object.defineProperty(yl,"passive",{get:function(){Op=!0}}),window.addEventListener("test",yl,yl),window.removeEventListener("test",yl,yl)}catch{Op=!1}function iR(e,t,n,r,s,o,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Hl=!1,Pd=null,Rd=!1,Ip=null,aR={onError:function(e){Hl=!0,Pd=e}};function lR(e,t,n,r,s,o,i,l,c){Hl=!1,Pd=null,iR.apply(aR,arguments)}function cR(e,t,n,r,s,o,i,l,c){if(lR.apply(this,arguments),Hl){if(Hl){var u=Pd;Hl=!1,Pd=null}else throw Error(ce(198));Rd||(Rd=!0,Ip=u)}}function ji(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 t1(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 j0(e){if(ji(e)!==e)throw Error(ce(188))}function uR(e){var t=e.alternate;if(!t){if(t=ji(e),t===null)throw Error(ce(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 j0(s),e;if(o===r)return j0(s),t;o=o.sibling}throw Error(ce(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i){for(l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i)throw Error(ce(189))}}if(n.alternate!==r)throw Error(ce(190))}if(n.tag!==3)throw Error(ce(188));return n.stateNode.current===n?e:t}function n1(e){return e=uR(e),e!==null?r1(e):null}function r1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=r1(e);if(t!==null)return t;e=e.sibling}return null}var s1=Jn.unstable_scheduleCallback,C0=Jn.unstable_cancelCallback,dR=Jn.unstable_shouldYield,fR=Jn.unstable_requestPaint,Vt=Jn.unstable_now,hR=Jn.unstable_getCurrentPriorityLevel,gy=Jn.unstable_ImmediatePriority,o1=Jn.unstable_UserBlockingPriority,Ad=Jn.unstable_NormalPriority,mR=Jn.unstable_LowPriority,i1=Jn.unstable_IdlePriority,Wf=null,ts=null;function pR(e){if(ts&&typeof ts.onCommitFiberRoot=="function")try{ts.onCommitFiberRoot(Wf,e,void 0,(e.current.flags&128)===128)}catch{}}var Ar=Math.clz32?Math.clz32:vR,gR=Math.log,yR=Math.LN2;function vR(e){return e>>>=0,e===0?32:31-(gR(e)/yR|0)|0}var Pu=64,Ru=4194304;function Ll(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 Dd(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 l=i&~s;l!==0?r=Ll(l):(o&=i,o!==0&&(r=Ll(o)))}else i=n&~s,i!==0?r=Ll(i):o!==0&&(r=Ll(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-Ar(t),s=1<<n,r|=e[n],t&=~s;return r}function xR(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 wR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Ar(o),l=1<<i,c=s[i];c===-1?(!(l&n)||l&r)&&(s[i]=xR(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Mp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function a1(){var e=Pu;return Pu<<=1,!(Pu&4194240)&&(Pu=64),e}function xm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ar(t),e[t]=n}function bR(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-Ar(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function yy(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ar(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var gt=0;function l1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var c1,vy,u1,d1,f1,Lp=!1,Au=[],po=null,go=null,yo=null,ac=new Map,lc=new Map,io=[],_R="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 E0(e,t){switch(e){case"focusin":case"focusout":po=null;break;case"dragenter":case"dragleave":go=null;break;case"mouseover":case"mouseout":yo=null;break;case"pointerover":case"pointerout":ac.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":lc.delete(t.pointerId)}}function vl(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=Qc(t),t!==null&&vy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function SR(e,t,n,r,s){switch(t){case"focusin":return po=vl(po,e,t,n,r,s),!0;case"dragenter":return go=vl(go,e,t,n,r,s),!0;case"mouseover":return yo=vl(yo,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return ac.set(o,vl(ac.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,lc.set(o,vl(lc.get(o)||null,e,t,n,r,s)),!0}return!1}function h1(e){var t=Yo(e.target);if(t!==null){var n=ji(t);if(n!==null){if(t=n.tag,t===13){if(t=t1(n),t!==null){e.blockedOn=t,f1(e.priority,function(){u1(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 ad(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=zp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ap=r,n.target.dispatchEvent(r),Ap=null}else return t=Qc(n),t!==null&&vy(t),e.blockedOn=n,!1;t.shift()}return!0}function N0(e,t,n){ad(e)&&n.delete(t)}function kR(){Lp=!1,po!==null&&ad(po)&&(po=null),go!==null&&ad(go)&&(go=null),yo!==null&&ad(yo)&&(yo=null),ac.forEach(N0),lc.forEach(N0)}function xl(e,t){e.blockedOn===t&&(e.blockedOn=null,Lp||(Lp=!0,Jn.unstable_scheduleCallback(Jn.unstable_NormalPriority,kR)))}function cc(e){function t(s){return xl(s,e)}if(0<Au.length){xl(Au[0],e);for(var n=1;n<Au.length;n++){var r=Au[n];r.blockedOn===e&&(r.blockedOn=null)}}for(po!==null&&xl(po,e),go!==null&&xl(go,e),yo!==null&&xl(yo,e),ac.forEach(t),lc.forEach(t),n=0;n<io.length;n++)r=io[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<io.length&&(n=io[0],n.blockedOn===null);)h1(n),n.blockedOn===null&&io.shift()}var _a=Vs.ReactCurrentBatchConfig,Od=!0;function jR(e,t,n,r){var s=gt,o=_a.transition;_a.transition=null;try{gt=1,xy(e,t,n,r)}finally{gt=s,_a.transition=o}}function CR(e,t,n,r){var s=gt,o=_a.transition;_a.transition=null;try{gt=4,xy(e,t,n,r)}finally{gt=s,_a.transition=o}}function xy(e,t,n,r){if(Od){var s=zp(e,t,n,r);if(s===null)Tm(e,t,r,Id,n),E0(e,r);else if(SR(s,e,t,n,r))r.stopPropagation();else if(E0(e,r),t&4&&-1<_R.indexOf(e)){for(;s!==null;){var o=Qc(s);if(o!==null&&c1(o),o=zp(e,t,n,r),o===null&&Tm(e,t,r,Id,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Tm(e,t,r,null,n)}}var Id=null;function zp(e,t,n,r){if(Id=null,e=py(r),e=Yo(e),e!==null)if(t=ji(e),t===null)e=null;else if(n=t.tag,n===13){if(e=t1(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 Id=e,null}function m1(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(hR()){case gy:return 1;case o1:return 4;case Ad:case mR:return 16;case i1:return 536870912;default:return 16}default:return 16}}var co=null,wy=null,ld=null;function p1(){if(ld)return ld;var e,t=wy,n=t.length,r,s="value"in co?co.value:co.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 ld=s.slice(e,1<r?1-r:void 0)}function cd(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 Du(){return!0}function T0(){return!1}function rr(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 l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Du:T0,this.isPropagationStopped=T0,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=Du)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Du)},persist:function(){},isPersistent:Du}),t}var Qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},by=rr(Qa),Xc=Lt({},Qa,{view:0,detail:0}),ER=rr(Xc),wm,bm,wl,Hf=Lt({},Xc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_y,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!==wl&&(wl&&e.type==="mousemove"?(wm=e.screenX-wl.screenX,bm=e.screenY-wl.screenY):bm=wm=0,wl=e),wm)},movementY:function(e){return"movementY"in e?e.movementY:bm}}),P0=rr(Hf),NR=Lt({},Hf,{dataTransfer:0}),TR=rr(NR),PR=Lt({},Xc,{relatedTarget:0}),_m=rr(PR),RR=Lt({},Qa,{animationName:0,elapsedTime:0,pseudoElement:0}),AR=rr(RR),DR=Lt({},Qa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),OR=rr(DR),IR=Lt({},Qa,{data:0}),R0=rr(IR),MR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},LR={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"},zR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function FR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zR[e])?!!t[e]:!1}function _y(){return FR}var $R=Lt({},Xc,{key:function(e){if(e.key){var t=MR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?LR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_y,charCode:function(e){return e.type==="keypress"?cd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),UR=rr($R),VR=Lt({},Hf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),A0=rr(VR),BR=Lt({},Xc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_y}),WR=rr(BR),HR=Lt({},Qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),KR=rr(HR),YR=Lt({},Hf,{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}),GR=rr(YR),ZR=[9,13,27,32],Sy=Os&&"CompositionEvent"in window,Kl=null;Os&&"documentMode"in document&&(Kl=document.documentMode);var qR=Os&&"TextEvent"in window&&!Kl,g1=Os&&(!Sy||Kl&&8<Kl&&11>=Kl),D0=" ",O0=!1;function y1(e,t){switch(e){case"keyup":return ZR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var na=!1;function XR(e,t){switch(e){case"compositionend":return v1(t);case"keypress":return t.which!==32?null:(O0=!0,D0);case"textInput":return e=t.data,e===D0&&O0?null:e;default:return null}}function QR(e,t){if(na)return e==="compositionend"||!Sy&&y1(e,t)?(e=p1(),ld=wy=co=null,na=!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 g1&&t.locale!=="ko"?null:t.data;default:return null}}var JR={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 I0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!JR[e.type]:t==="textarea"}function x1(e,t,n,r){q_(r),t=Md(t,"onChange"),0<t.length&&(n=new by("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yl=null,uc=null;function eA(e){P1(e,0)}function Kf(e){var t=oa(e);if(B_(t))return e}function tA(e,t){if(e==="change")return t}var w1=!1;if(Os){var Sm;if(Os){var km="oninput"in document;if(!km){var M0=document.createElement("div");M0.setAttribute("oninput","return;"),km=typeof M0.oninput=="function"}Sm=km}else Sm=!1;w1=Sm&&(!document.documentMode||9<document.documentMode)}function L0(){Yl&&(Yl.detachEvent("onpropertychange",b1),uc=Yl=null)}function b1(e){if(e.propertyName==="value"&&Kf(uc)){var t=[];x1(t,uc,e,py(e)),e1(eA,t)}}function nA(e,t,n){e==="focusin"?(L0(),Yl=t,uc=n,Yl.attachEvent("onpropertychange",b1)):e==="focusout"&&L0()}function rA(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kf(uc)}function sA(e,t){if(e==="click")return Kf(t)}function oA(e,t){if(e==="input"||e==="change")return Kf(t)}function iA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ir=typeof Object.is=="function"?Object.is:iA;function dc(e,t){if(Ir(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(!wp.call(t,s)||!Ir(e[s],t[s]))return!1}return!0}function z0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function F0(e,t){var n=z0(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=z0(n)}}function _1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S1(){for(var e=window,t=Td();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Td(e.document)}return t}function ky(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 aA(e){var t=S1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_1(n.ownerDocument.documentElement,n)){if(r!==null&&ky(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=F0(n,o);var i=F0(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 lA=Os&&"documentMode"in document&&11>=document.documentMode,ra=null,Fp=null,Gl=null,$p=!1;function $0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$p||ra==null||ra!==Td(r)||(r=ra,"selectionStart"in r&&ky(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}),Gl&&dc(Gl,r)||(Gl=r,r=Md(Fp,"onSelect"),0<r.length&&(t=new by("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ra)))}function Ou(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sa={animationend:Ou("Animation","AnimationEnd"),animationiteration:Ou("Animation","AnimationIteration"),animationstart:Ou("Animation","AnimationStart"),transitionend:Ou("Transition","TransitionEnd")},jm={},k1={};Os&&(k1=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function Yf(e){if(jm[e])return jm[e];if(!sa[e])return e;var t=sa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in k1)return jm[e]=t[n];return e}var j1=Yf("animationend"),C1=Yf("animationiteration"),E1=Yf("animationstart"),N1=Yf("transitionend"),T1=new Map,U0="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 Mo(e,t){T1.set(e,t),ki(t,[e])}for(var Cm=0;Cm<U0.length;Cm++){var Em=U0[Cm],cA=Em.toLowerCase(),uA=Em[0].toUpperCase()+Em.slice(1);Mo(cA,"on"+uA)}Mo(j1,"onAnimationEnd");Mo(C1,"onAnimationIteration");Mo(E1,"onAnimationStart");Mo("dblclick","onDoubleClick");Mo("focusin","onFocus");Mo("focusout","onBlur");Mo(N1,"onTransitionEnd");Oa("onMouseEnter",["mouseout","mouseover"]);Oa("onMouseLeave",["mouseout","mouseover"]);Oa("onPointerEnter",["pointerout","pointerover"]);Oa("onPointerLeave",["pointerout","pointerover"]);ki("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ki("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ki("onBeforeInput",["compositionend","keypress","textInput","paste"]);ki("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ki("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ki("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zl="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(" "),dA=new Set("cancel close invalid load scroll toggle".split(" ").concat(zl));function V0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,cR(r,t,void 0,e),e.currentTarget=null}function P1(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 l=r[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;V0(s,l,u),o=c}else for(i=0;i<r.length;i++){if(l=r[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;V0(s,l,u),o=c}}}if(Rd)throw e=Ip,Rd=!1,Ip=null,e}function kt(e,t){var n=t[Hp];n===void 0&&(n=t[Hp]=new Set);var r=e+"__bubble";n.has(r)||(R1(t,e,2,!1),n.add(r))}function Nm(e,t,n){var r=0;t&&(r|=4),R1(n,e,r,t)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function fc(e){if(!e[Iu]){e[Iu]=!0,z_.forEach(function(n){n!=="selectionchange"&&(dA.has(n)||Nm(n,!1,e),Nm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Iu]||(t[Iu]=!0,Nm("selectionchange",!1,t))}}function R1(e,t,n,r){switch(m1(t)){case 1:var s=jR;break;case 4:s=CR;break;default:s=xy}n=s.bind(null,t,n,e),s=void 0,!Op||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 Tm(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 l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.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(;l!==null;){if(i=Yo(l),i===null)return;if(c=i.tag,c===5||c===6){r=o=i;continue e}l=l.parentNode}}r=r.return}e1(function(){var u=o,d=py(n),f=[];e:{var h=T1.get(e);if(h!==void 0){var m=by,x=e;switch(e){case"keypress":if(cd(n)===0)break e;case"keydown":case"keyup":m=UR;break;case"focusin":x="focus",m=_m;break;case"focusout":x="blur",m=_m;break;case"beforeblur":case"afterblur":m=_m;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":m=P0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=TR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=WR;break;case j1:case C1:case E1:m=AR;break;case N1:m=KR;break;case"scroll":m=ER;break;case"wheel":m=GR;break;case"copy":case"cut":case"paste":m=OR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=A0}var p=(t&4)!==0,w=!p&&e==="scroll",y=p?h!==null?h+"Capture":null:h;p=[];for(var v=u,b;v!==null;){b=v;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,y!==null&&(_=ic(v,y),_!=null&&p.push(hc(v,_,b)))),w)break;v=v.return}0<p.length&&(h=new m(h,x,null,n,d),f.push({event:h,listeners:p}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==Ap&&(x=n.relatedTarget||n.fromElement)&&(Yo(x)||x[Is]))break e;if((m||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,m?(x=n.relatedTarget||n.toElement,m=u,x=x?Yo(x):null,x!==null&&(w=ji(x),x!==w||x.tag!==5&&x.tag!==6)&&(x=null)):(m=null,x=u),m!==x)){if(p=P0,_="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(p=A0,_="onPointerLeave",y="onPointerEnter",v="pointer"),w=m==null?h:oa(m),b=x==null?h:oa(x),h=new p(_,v+"leave",m,n,d),h.target=w,h.relatedTarget=b,_=null,Yo(d)===u&&(p=new p(y,v+"enter",x,n,d),p.target=b,p.relatedTarget=w,_=p),w=_,m&&x)t:{for(p=m,y=x,v=0,b=p;b;b=$i(b))v++;for(b=0,_=y;_;_=$i(_))b++;for(;0<v-b;)p=$i(p),v--;for(;0<b-v;)y=$i(y),b--;for(;v--;){if(p===y||y!==null&&p===y.alternate)break t;p=$i(p),y=$i(y)}p=null}else p=null;m!==null&&B0(f,h,m,p,!1),x!==null&&w!==null&&B0(f,w,x,p,!0)}}e:{if(h=u?oa(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var j=tA;else if(I0(h))if(w1)j=oA;else{j=rA;var C=nA}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(j=sA);if(j&&(j=j(e,u))){x1(f,j,n,d);break e}C&&C(e,h,u),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&Ep(h,"number",h.value)}switch(C=u?oa(u):window,e){case"focusin":(I0(C)||C.contentEditable==="true")&&(ra=C,Fp=u,Gl=null);break;case"focusout":Gl=Fp=ra=null;break;case"mousedown":$p=!0;break;case"contextmenu":case"mouseup":case"dragend":$p=!1,$0(f,n,d);break;case"selectionchange":if(lA)break;case"keydown":case"keyup":$0(f,n,d)}var T;if(Sy)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else na?y1(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(g1&&n.locale!=="ko"&&(na||R!=="onCompositionStart"?R==="onCompositionEnd"&&na&&(T=p1()):(co=d,wy="value"in co?co.value:co.textContent,na=!0)),C=Md(u,R),0<C.length&&(R=new R0(R,e,null,n,d),f.push({event:R,listeners:C}),T?R.data=T:(T=v1(n),T!==null&&(R.data=T)))),(T=qR?XR(e,n):QR(e,n))&&(u=Md(u,"onBeforeInput"),0<u.length&&(d=new R0("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=T))}P1(f,t)})}function hc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Md(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=ic(e,n),o!=null&&r.unshift(hc(e,o,s)),o=ic(e,t),o!=null&&r.push(hc(e,o,s))),e=e.return}return r}function $i(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function B0(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=ic(n,o),c!=null&&i.unshift(hc(n,c,l))):s||(c=ic(n,o),c!=null&&i.push(hc(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var fA=/\r\n?/g,hA=/\u0000|\uFFFD/g;function W0(e){return(typeof e=="string"?e:""+e).replace(fA,`
`).replace(hA,"")}function Mu(e,t,n){if(t=W0(t),W0(e)!==t&&n)throw Error(ce(425))}function Ld(){}var Up=null,Vp=null;function Bp(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 Wp=typeof setTimeout=="function"?setTimeout:void 0,mA=typeof clearTimeout=="function"?clearTimeout:void 0,H0=typeof Promise=="function"?Promise:void 0,pA=typeof queueMicrotask=="function"?queueMicrotask:typeof H0<"u"?function(e){return H0.resolve(null).then(e).catch(gA)}:Wp;function gA(e){setTimeout(function(){throw e})}function Pm(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),cc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);cc(t)}function vo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function K0(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 Ja=Math.random().toString(36).slice(2),Gr="__reactFiber$"+Ja,mc="__reactProps$"+Ja,Is="__reactContainer$"+Ja,Hp="__reactEvents$"+Ja,yA="__reactListeners$"+Ja,vA="__reactHandles$"+Ja;function Yo(e){var t=e[Gr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Is]||n[Gr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=K0(e);e!==null;){if(n=e[Gr])return n;e=K0(e)}return t}e=n,n=e.parentNode}return null}function Qc(e){return e=e[Gr]||e[Is],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function oa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ce(33))}function Gf(e){return e[mc]||null}var Kp=[],ia=-1;function Lo(e){return{current:e}}function jt(e){0>ia||(e.current=Kp[ia],Kp[ia]=null,ia--)}function bt(e,t){ia++,Kp[ia]=e.current,e.current=t}var Eo={},gn=Lo(Eo),On=Lo(!1),ci=Eo;function Ia(e,t){var n=e.type.contextTypes;if(!n)return Eo;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 In(e){return e=e.childContextTypes,e!=null}function zd(){jt(On),jt(gn)}function Y0(e,t,n){if(gn.current!==Eo)throw Error(ce(168));bt(gn,t),bt(On,n)}function A1(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(ce(108,nR(e)||"Unknown",s));return Lt({},n,r)}function Fd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,ci=gn.current,bt(gn,e),bt(On,On.current),!0}function G0(e,t,n){var r=e.stateNode;if(!r)throw Error(ce(169));n?(e=A1(e,t,ci),r.__reactInternalMemoizedMergedChildContext=e,jt(On),jt(gn),bt(gn,e)):jt(On),bt(On,n)}var ks=null,Zf=!1,Rm=!1;function D1(e){ks===null?ks=[e]:ks.push(e)}function xA(e){Zf=!0,D1(e)}function zo(){if(!Rm&&ks!==null){Rm=!0;var e=0,t=gt;try{var n=ks;for(gt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ks=null,Zf=!1}catch(s){throw ks!==null&&(ks=ks.slice(e+1)),s1(gy,zo),s}finally{gt=t,Rm=!1}}return null}var aa=[],la=0,$d=null,Ud=0,lr=[],cr=0,ui=null,js=1,Cs="";function Bo(e,t){aa[la++]=Ud,aa[la++]=$d,$d=e,Ud=t}function O1(e,t,n){lr[cr++]=js,lr[cr++]=Cs,lr[cr++]=ui,ui=e;var r=js;e=Cs;var s=32-Ar(r)-1;r&=~(1<<s),n+=1;var o=32-Ar(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,js=1<<32-Ar(t)+s|n<<s|r,Cs=o+e}else js=1<<o|n<<s|r,Cs=e}function jy(e){e.return!==null&&(Bo(e,1),O1(e,1,0))}function Cy(e){for(;e===$d;)$d=aa[--la],aa[la]=null,Ud=aa[--la],aa[la]=null;for(;e===ui;)ui=lr[--cr],lr[cr]=null,Cs=lr[--cr],lr[cr]=null,js=lr[--cr],lr[cr]=null}var Zn=null,Gn=null,Rt=!1,Cr=null;function I1(e,t){var n=dr(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 Z0(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,Zn=e,Gn=vo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Zn=e,Gn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ui!==null?{id:js,overflow:Cs}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=dr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Zn=e,Gn=null,!0):!1;default:return!1}}function Yp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gp(e){if(Rt){var t=Gn;if(t){var n=t;if(!Z0(e,t)){if(Yp(e))throw Error(ce(418));t=vo(n.nextSibling);var r=Zn;t&&Z0(e,t)?I1(r,n):(e.flags=e.flags&-4097|2,Rt=!1,Zn=e)}}else{if(Yp(e))throw Error(ce(418));e.flags=e.flags&-4097|2,Rt=!1,Zn=e}}}function q0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Zn=e}function Lu(e){if(e!==Zn)return!1;if(!Rt)return q0(e),Rt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Bp(e.type,e.memoizedProps)),t&&(t=Gn)){if(Yp(e))throw M1(),Error(ce(418));for(;t;)I1(e,t),t=vo(t.nextSibling)}if(q0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ce(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Gn=vo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Gn=null}}else Gn=Zn?vo(e.stateNode.nextSibling):null;return!0}function M1(){for(var e=Gn;e;)e=vo(e.nextSibling)}function Ma(){Gn=Zn=null,Rt=!1}function Ey(e){Cr===null?Cr=[e]:Cr.push(e)}var wA=Vs.ReactCurrentBatchConfig;function bl(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(ce(309));var r=n.stateNode}if(!r)throw Error(ce(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 l=s.refs;i===null?delete l[o]:l[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(ce(284));if(!n._owner)throw Error(ce(290,e))}return e}function zu(e,t){throw e=Object.prototype.toString.call(t),Error(ce(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function X0(e){var t=e._init;return t(e._payload)}function L1(e){function t(y,v){if(e){var b=y.deletions;b===null?(y.deletions=[v],y.flags|=16):b.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function s(y,v){return y=_o(y,v),y.index=0,y.sibling=null,y}function o(y,v,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<v?(y.flags|=2,v):b):(y.flags|=2,v)):(y.flags|=1048576,v)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,v,b,_){return v===null||v.tag!==6?(v=zm(b,y.mode,_),v.return=y,v):(v=s(v,b),v.return=y,v)}function c(y,v,b,_){var j=b.type;return j===ta?d(y,v,b.props.children,_,b.key):v!==null&&(v.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===so&&X0(j)===v.type)?(_=s(v,b.props),_.ref=bl(y,v,b),_.return=y,_):(_=gd(b.type,b.key,b.props,null,y.mode,_),_.ref=bl(y,v,b),_.return=y,_)}function u(y,v,b,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=Fm(b,y.mode,_),v.return=y,v):(v=s(v,b.children||[]),v.return=y,v)}function d(y,v,b,_,j){return v===null||v.tag!==7?(v=ri(b,y.mode,_,j),v.return=y,v):(v=s(v,b),v.return=y,v)}function f(y,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=zm(""+v,y.mode,b),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Eu:return b=gd(v.type,v.key,v.props,null,y.mode,b),b.ref=bl(y,null,v),b.return=y,b;case ea:return v=Fm(v,y.mode,b),v.return=y,v;case so:var _=v._init;return f(y,_(v._payload),b)}if(Ml(v)||gl(v))return v=ri(v,y.mode,b,null),v.return=y,v;zu(y,v)}return null}function h(y,v,b,_){var j=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return j!==null?null:l(y,v,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:return b.key===j?c(y,v,b,_):null;case ea:return b.key===j?u(y,v,b,_):null;case so:return j=b._init,h(y,v,j(b._payload),_)}if(Ml(b)||gl(b))return j!==null?null:d(y,v,b,_,null);zu(y,b)}return null}function m(y,v,b,_,j){if(typeof _=="string"&&_!==""||typeof _=="number")return y=y.get(b)||null,l(v,y,""+_,j);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Eu:return y=y.get(_.key===null?b:_.key)||null,c(v,y,_,j);case ea:return y=y.get(_.key===null?b:_.key)||null,u(v,y,_,j);case so:var C=_._init;return m(y,v,b,C(_._payload),j)}if(Ml(_)||gl(_))return y=y.get(b)||null,d(v,y,_,j,null);zu(v,_)}return null}function x(y,v,b,_){for(var j=null,C=null,T=v,R=v=0,A=null;T!==null&&R<b.length;R++){T.index>R?(A=T,T=null):A=T.sibling;var O=h(y,T,b[R],_);if(O===null){T===null&&(T=A);break}e&&T&&O.alternate===null&&t(y,T),v=o(O,v,R),C===null?j=O:C.sibling=O,C=O,T=A}if(R===b.length)return n(y,T),Rt&&Bo(y,R),j;if(T===null){for(;R<b.length;R++)T=f(y,b[R],_),T!==null&&(v=o(T,v,R),C===null?j=T:C.sibling=T,C=T);return Rt&&Bo(y,R),j}for(T=r(y,T);R<b.length;R++)A=m(T,y,R,b[R],_),A!==null&&(e&&A.alternate!==null&&T.delete(A.key===null?R:A.key),v=o(A,v,R),C===null?j=A:C.sibling=A,C=A);return e&&T.forEach(function(G){return t(y,G)}),Rt&&Bo(y,R),j}function p(y,v,b,_){var j=gl(b);if(typeof j!="function")throw Error(ce(150));if(b=j.call(b),b==null)throw Error(ce(151));for(var C=j=null,T=v,R=v=0,A=null,O=b.next();T!==null&&!O.done;R++,O=b.next()){T.index>R?(A=T,T=null):A=T.sibling;var G=h(y,T,O.value,_);if(G===null){T===null&&(T=A);break}e&&T&&G.alternate===null&&t(y,T),v=o(G,v,R),C===null?j=G:C.sibling=G,C=G,T=A}if(O.done)return n(y,T),Rt&&Bo(y,R),j;if(T===null){for(;!O.done;R++,O=b.next())O=f(y,O.value,_),O!==null&&(v=o(O,v,R),C===null?j=O:C.sibling=O,C=O);return Rt&&Bo(y,R),j}for(T=r(y,T);!O.done;R++,O=b.next())O=m(T,y,R,O.value,_),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?R:O.key),v=o(O,v,R),C===null?j=O:C.sibling=O,C=O);return e&&T.forEach(function(N){return t(y,N)}),Rt&&Bo(y,R),j}function w(y,v,b,_){if(typeof b=="object"&&b!==null&&b.type===ta&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:e:{for(var j=b.key,C=v;C!==null;){if(C.key===j){if(j=b.type,j===ta){if(C.tag===7){n(y,C.sibling),v=s(C,b.props.children),v.return=y,y=v;break e}}else if(C.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===so&&X0(j)===C.type){n(y,C.sibling),v=s(C,b.props),v.ref=bl(y,C,b),v.return=y,y=v;break e}n(y,C);break}else t(y,C);C=C.sibling}b.type===ta?(v=ri(b.props.children,y.mode,_,b.key),v.return=y,y=v):(_=gd(b.type,b.key,b.props,null,y.mode,_),_.ref=bl(y,v,b),_.return=y,y=_)}return i(y);case ea:e:{for(C=b.key;v!==null;){if(v.key===C)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(y,v.sibling),v=s(v,b.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=Fm(b,y.mode,_),v.return=y,y=v}return i(y);case so:return C=b._init,w(y,v,C(b._payload),_)}if(Ml(b))return x(y,v,b,_);if(gl(b))return p(y,v,b,_);zu(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(y,v.sibling),v=s(v,b),v.return=y,y=v):(n(y,v),v=zm(b,y.mode,_),v.return=y,y=v),i(y)):n(y,v)}return w}var La=L1(!0),z1=L1(!1),Vd=Lo(null),Bd=null,ca=null,Ny=null;function Ty(){Ny=ca=Bd=null}function Py(e){var t=Vd.current;jt(Vd),e._currentValue=t}function Zp(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 Sa(e,t){Bd=e,Ny=ca=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(An=!0),e.firstContext=null)}function gr(e){var t=e._currentValue;if(Ny!==e)if(e={context:e,memoizedValue:t,next:null},ca===null){if(Bd===null)throw Error(ce(308));ca=e,Bd.dependencies={lanes:0,firstContext:e}}else ca=ca.next=e;return t}var Go=null;function Ry(e){Go===null?Go=[e]:Go.push(e)}function F1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ry(t)):(n.next=s.next,s.next=n),t.interleaved=n,Ms(e,r)}function Ms(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 oo=!1;function Ay(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $1(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 Ts(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ut&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Ms(e,n)}return s=r.interleaved,s===null?(t.next=t,Ry(r)):(t.next=s.next,s.next=t),r.interleaved=t,Ms(e,n)}function ud(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,yy(e,n)}}function Q0(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 Wd(e,t,n,r){var s=e.updateQueue;oo=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,l=o;do{var h=l.lane,m=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,p=l;switch(h=t,m=n,p.tag){case 1:if(x=p.payload,typeof x=="function"){f=x.call(m,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=p.payload,h=typeof x=="function"?x.call(m,f,h):x,h==null)break e;f=Lt({},f,h);break e;case 2:oo=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[l]:h.push(l))}else m={eventTime:m,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,i|=h;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;h=l,l=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);fi|=i,e.lanes=i,e.memoizedState=f}}function J0(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(ce(191,s));s.call(r)}}}var Jc={},ns=Lo(Jc),pc=Lo(Jc),gc=Lo(Jc);function Zo(e){if(e===Jc)throw Error(ce(174));return e}function Dy(e,t){switch(bt(gc,t),bt(pc,e),bt(ns,Jc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Tp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Tp(t,e)}jt(ns),bt(ns,t)}function za(){jt(ns),jt(pc),jt(gc)}function U1(e){Zo(gc.current);var t=Zo(ns.current),n=Tp(t,e.type);t!==n&&(bt(pc,e),bt(ns,n))}function Oy(e){pc.current===e&&(jt(ns),jt(pc))}var Ot=Lo(0);function Hd(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 Am=[];function Iy(){for(var e=0;e<Am.length;e++)Am[e]._workInProgressVersionPrimary=null;Am.length=0}var dd=Vs.ReactCurrentDispatcher,Dm=Vs.ReactCurrentBatchConfig,di=0,Mt=null,Jt=null,rn=null,Kd=!1,Zl=!1,yc=0,bA=0;function fn(){throw Error(ce(321))}function My(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ir(e[n],t[n]))return!1;return!0}function Ly(e,t,n,r,s,o){if(di=o,Mt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dd.current=e===null||e.memoizedState===null?jA:CA,e=n(r,s),Zl){o=0;do{if(Zl=!1,yc=0,25<=o)throw Error(ce(301));o+=1,rn=Jt=null,t.updateQueue=null,dd.current=EA,e=n(r,s)}while(Zl)}if(dd.current=Yd,t=Jt!==null&&Jt.next!==null,di=0,rn=Jt=Mt=null,Kd=!1,t)throw Error(ce(300));return e}function zy(){var e=yc!==0;return yc=0,e}function Yr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rn===null?Mt.memoizedState=rn=e:rn=rn.next=e,rn}function yr(){if(Jt===null){var e=Mt.alternate;e=e!==null?e.memoizedState:null}else e=Jt.next;var t=rn===null?Mt.memoizedState:rn.next;if(t!==null)rn=t,Jt=e;else{if(e===null)throw Error(ce(310));Jt=e,e={memoizedState:Jt.memoizedState,baseState:Jt.baseState,baseQueue:Jt.baseQueue,queue:Jt.queue,next:null},rn===null?Mt.memoizedState=rn=e:rn=rn.next=e}return rn}function vc(e,t){return typeof t=="function"?t(e):t}function Om(e){var t=yr(),n=t.queue;if(n===null)throw Error(ce(311));n.lastRenderedReducer=e;var r=Jt,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 l=i=null,c=null,u=o;do{var d=u.lane;if((di&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?(l=c=f,i=r):c=c.next=f,Mt.lanes|=d,fi|=d}u=u.next}while(u!==null&&u!==o);c===null?i=r:c.next=l,Ir(r,t.memoizedState)||(An=!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,fi|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Im(e){var t=yr(),n=t.queue;if(n===null)throw Error(ce(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);Ir(o,t.memoizedState)||(An=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function V1(){}function B1(e,t){var n=Mt,r=yr(),s=t(),o=!Ir(r.memoizedState,s);if(o&&(r.memoizedState=s,An=!0),r=r.queue,Fy(K1.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||rn!==null&&rn.memoizedState.tag&1){if(n.flags|=2048,xc(9,H1.bind(null,n,r,s,t),void 0,null),sn===null)throw Error(ce(349));di&30||W1(n,t,s)}return s}function W1(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 H1(e,t,n,r){t.value=n,t.getSnapshot=r,Y1(t)&&G1(e)}function K1(e,t,n){return n(function(){Y1(t)&&G1(e)})}function Y1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ir(e,n)}catch{return!0}}function G1(e){var t=Ms(e,1);t!==null&&Dr(t,e,1,-1)}function ew(e){var t=Yr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vc,lastRenderedState:e},t.queue=e,e=e.dispatch=kA.bind(null,Mt,e),[t.memoizedState,e]}function xc(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 Z1(){return yr().memoizedState}function fd(e,t,n,r){var s=Yr();Mt.flags|=e,s.memoizedState=xc(1|t,n,void 0,r===void 0?null:r)}function qf(e,t,n,r){var s=yr();r=r===void 0?null:r;var o=void 0;if(Jt!==null){var i=Jt.memoizedState;if(o=i.destroy,r!==null&&My(r,i.deps)){s.memoizedState=xc(t,n,o,r);return}}Mt.flags|=e,s.memoizedState=xc(1|t,n,o,r)}function tw(e,t){return fd(8390656,8,e,t)}function Fy(e,t){return qf(2048,8,e,t)}function q1(e,t){return qf(4,2,e,t)}function X1(e,t){return qf(4,4,e,t)}function Q1(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 J1(e,t,n){return n=n!=null?n.concat([e]):null,qf(4,4,Q1.bind(null,t,e),n)}function $y(){}function eS(e,t){var n=yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&My(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function tS(e,t){var n=yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&My(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function nS(e,t,n){return di&21?(Ir(n,t)||(n=a1(),Mt.lanes|=n,fi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,An=!0),e.memoizedState=n)}function _A(e,t){var n=gt;gt=n!==0&&4>n?n:4,e(!0);var r=Dm.transition;Dm.transition={};try{e(!1),t()}finally{gt=n,Dm.transition=r}}function rS(){return yr().memoizedState}function SA(e,t,n){var r=bo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sS(e))oS(t,n);else if(n=F1(e,t,n,r),n!==null){var s=Sn();Dr(n,e,r,s),iS(n,t,r)}}function kA(e,t,n){var r=bo(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sS(e))oS(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,l=o(i,n);if(s.hasEagerState=!0,s.eagerState=l,Ir(l,i)){var c=t.interleaved;c===null?(s.next=s,Ry(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=F1(e,t,s,r),n!==null&&(s=Sn(),Dr(n,e,r,s),iS(n,t,r))}}function sS(e){var t=e.alternate;return e===Mt||t!==null&&t===Mt}function oS(e,t){Zl=Kd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function iS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yy(e,n)}}var Yd={readContext:gr,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},jA={readContext:gr,useCallback:function(e,t){return Yr().memoizedState=[e,t===void 0?null:t],e},useContext:gr,useEffect:tw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fd(4194308,4,Q1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fd(4194308,4,e,t)},useInsertionEffect:function(e,t){return fd(4,2,e,t)},useMemo:function(e,t){var n=Yr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=SA.bind(null,Mt,e),[r.memoizedState,e]},useRef:function(e){var t=Yr();return e={current:e},t.memoizedState=e},useState:ew,useDebugValue:$y,useDeferredValue:function(e){return Yr().memoizedState=e},useTransition:function(){var e=ew(!1),t=e[0];return e=_A.bind(null,e[1]),Yr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mt,s=Yr();if(Rt){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),sn===null)throw Error(ce(349));di&30||W1(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,tw(K1.bind(null,r,o,e),[e]),r.flags|=2048,xc(9,H1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Yr(),t=sn.identifierPrefix;if(Rt){var n=Cs,r=js;n=(r&~(1<<32-Ar(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=bA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},CA={readContext:gr,useCallback:eS,useContext:gr,useEffect:Fy,useImperativeHandle:J1,useInsertionEffect:q1,useLayoutEffect:X1,useMemo:tS,useReducer:Om,useRef:Z1,useState:function(){return Om(vc)},useDebugValue:$y,useDeferredValue:function(e){var t=yr();return nS(t,Jt.memoizedState,e)},useTransition:function(){var e=Om(vc)[0],t=yr().memoizedState;return[e,t]},useMutableSource:V1,useSyncExternalStore:B1,useId:rS,unstable_isNewReconciler:!1},EA={readContext:gr,useCallback:eS,useContext:gr,useEffect:Fy,useImperativeHandle:J1,useInsertionEffect:q1,useLayoutEffect:X1,useMemo:tS,useReducer:Im,useRef:Z1,useState:function(){return Im(vc)},useDebugValue:$y,useDeferredValue:function(e){var t=yr();return Jt===null?t.memoizedState=e:nS(t,Jt.memoizedState,e)},useTransition:function(){var e=Im(vc)[0],t=yr().memoizedState;return[e,t]},useMutableSource:V1,useSyncExternalStore:B1,useId:rS,unstable_isNewReconciler:!1};function Sr(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 qp(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 Xf={isMounted:function(e){return(e=e._reactInternals)?ji(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Sn(),s=bo(e),o=Ts(r,s);o.payload=t,n!=null&&(o.callback=n),t=xo(e,o,s),t!==null&&(Dr(t,e,s,r),ud(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Sn(),s=bo(e),o=Ts(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=xo(e,o,s),t!==null&&(Dr(t,e,s,r),ud(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),r=bo(e),s=Ts(n,r);s.tag=2,t!=null&&(s.callback=t),t=xo(e,s,r),t!==null&&(Dr(t,e,r,n),ud(t,e,r))}};function nw(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?!dc(n,r)||!dc(s,o):!0}function aS(e,t,n){var r=!1,s=Eo,o=t.contextType;return typeof o=="object"&&o!==null?o=gr(o):(s=In(t)?ci:gn.current,r=t.contextTypes,o=(r=r!=null)?Ia(e,s):Eo),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Xf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function rw(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&&Xf.enqueueReplaceState(t,t.state,null)}function Xp(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Ay(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=gr(o):(o=In(t)?ci:gn.current,s.context=Ia(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(qp(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&&Xf.enqueueReplaceState(s,s.state,null),Wd(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Fa(e,t){try{var n="",r=t;do n+=tR(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 Mm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Qp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var NA=typeof WeakMap=="function"?WeakMap:Map;function lS(e,t,n){n=Ts(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zd||(Zd=!0,lg=r),Qp(e,t)},n}function cS(e,t,n){n=Ts(-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(){Qp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Qp(e,t),typeof r!="function"&&(wo===null?wo=new Set([this]):wo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function sw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new NA;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=VA.bind(null,e,t,n),t.then(e,e))}function ow(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 iw(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=Ts(-1,1),t.tag=2,xo(n,t,1))),n.lanes|=1),e)}var TA=Vs.ReactCurrentOwner,An=!1;function bn(e,t,n,r){t.child=e===null?z1(t,null,n,r):La(t,e.child,n,r)}function aw(e,t,n,r,s){n=n.render;var o=t.ref;return Sa(t,s),r=Ly(e,t,n,r,o,s),n=zy(),e!==null&&!An?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ls(e,t,s)):(Rt&&n&&jy(t),t.flags|=1,bn(e,t,r,s),t.child)}function lw(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Gy(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,uS(e,t,o,r,s)):(e=gd(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:dc,n(i,r)&&e.ref===t.ref)return Ls(e,t,s)}return t.flags|=1,e=_o(o,r),e.ref=t.ref,e.return=t,t.child=e}function uS(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(dc(o,r)&&e.ref===t.ref)if(An=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(An=!0);else return t.lanes=e.lanes,Ls(e,t,s)}return Jp(e,t,n,r,s)}function dS(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(da,Hn),Hn|=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(da,Hn),Hn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,bt(da,Hn),Hn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,bt(da,Hn),Hn|=r;return bn(e,t,s,n),t.child}function fS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Jp(e,t,n,r,s){var o=In(n)?ci:gn.current;return o=Ia(t,o),Sa(t,s),n=Ly(e,t,n,r,o,s),r=zy(),e!==null&&!An?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ls(e,t,s)):(Rt&&r&&jy(t),t.flags|=1,bn(e,t,n,s),t.child)}function cw(e,t,n,r,s){if(In(n)){var o=!0;Fd(t)}else o=!1;if(Sa(t,s),t.stateNode===null)hd(e,t),aS(t,n,r),Xp(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=gr(u):(u=In(n)?ci:gn.current,u=Ia(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&rw(t,i,r,u),oo=!1;var h=t.memoizedState;i.state=h,Wd(t,r,i,s),c=t.memoizedState,l!==r||h!==c||On.current||oo?(typeof d=="function"&&(qp(t,n,d,r),c=t.memoizedState),(l=oo||nw(t,n,l,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=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,$1(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Sr(t.type,l),i.props=u,f=t.pendingProps,h=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=gr(c):(c=In(n)?ci:gn.current,c=Ia(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||h!==c)&&rw(t,i,r,c),oo=!1,h=t.memoizedState,i.state=h,Wd(t,r,i,s);var x=t.memoizedState;l!==f||h!==x||On.current||oo?(typeof m=="function"&&(qp(t,n,m,r),x=t.memoizedState),(u=oo||nw(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"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===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"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return eg(e,t,n,r,o,s)}function eg(e,t,n,r,s,o){fS(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&G0(t,n,!1),Ls(e,t,o);r=t.stateNode,TA.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=La(t,e.child,null,o),t.child=La(t,null,l,o)):bn(e,t,l,o),t.memoizedState=r.state,s&&G0(t,n,!0),t.child}function hS(e){var t=e.stateNode;t.pendingContext?Y0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Y0(e,t.context,!1),Dy(e,t.containerInfo)}function uw(e,t,n,r,s){return Ma(),Ey(s),t.flags|=256,bn(e,t,n,r),t.child}var tg={dehydrated:null,treeContext:null,retryLane:0};function ng(e){return{baseLanes:e,cachePool:null,transitions:null}}function mS(e,t,n){var r=t.pendingProps,s=Ot.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),bt(Ot,s&1),e===null)return Gp(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=eh(i,r,0,null),e=ri(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=ng(n),t.memoizedState=tg,e):Uy(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return PA(e,t,i,r,l,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,l=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=_o(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=_o(l,o):(o=ri(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?ng(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=tg,r}return o=e.child,e=o.sibling,r=_o(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 Uy(e,t){return t=eh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fu(e,t,n,r){return r!==null&&Ey(r),La(t,e.child,null,n),e=Uy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function PA(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Mm(Error(ce(422))),Fu(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=eh({mode:"visible",children:r.children},s,0,null),o=ri(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&La(t,e.child,null,i),t.child.memoizedState=ng(i),t.memoizedState=tg,o);if(!(t.mode&1))return Fu(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(ce(419)),r=Mm(o,r,void 0),Fu(e,t,i,r)}if(l=(i&e.childLanes)!==0,An||l){if(r=sn,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,Ms(e,s),Dr(r,e,s,-1))}return Yy(),r=Mm(Error(ce(421))),Fu(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=BA.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Gn=vo(s.nextSibling),Zn=t,Rt=!0,Cr=null,e!==null&&(lr[cr++]=js,lr[cr++]=Cs,lr[cr++]=ui,js=e.id,Cs=e.overflow,ui=t),t=Uy(t,r.children),t.flags|=4096,t)}function dw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zp(e.return,t,n)}function Lm(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 pS(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(bn(e,t,r.children,n),r=Ot.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&&dw(e,n,t);else if(e.tag===19)dw(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(Ot,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&&Hd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Lm(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&&Hd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Lm(t,!0,n,null,o);break;case"together":Lm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ls(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),fi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ce(153));if(t.child!==null){for(e=t.child,n=_o(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_o(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function RA(e,t,n){switch(t.tag){case 3:hS(t),Ma();break;case 5:U1(t);break;case 1:In(t.type)&&Fd(t);break;case 4:Dy(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;bt(Vd,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(bt(Ot,Ot.current&1),t.flags|=128,null):n&t.child.childLanes?mS(e,t,n):(bt(Ot,Ot.current&1),e=Ls(e,t,n),e!==null?e.sibling:null);bt(Ot,Ot.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return pS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(Ot,Ot.current),r)break;return null;case 22:case 23:return t.lanes=0,dS(e,t,n)}return Ls(e,t,n)}var gS,rg,yS,vS;gS=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}};rg=function(){};yS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Zo(ns.current);var o=null;switch(n){case"input":s=jp(e,s),r=jp(e,r),o=[];break;case"select":s=Lt({},s,{value:void 0}),r=Lt({},r,{value:void 0}),o=[];break;case"textarea":s=Np(e,s),r=Np(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ld)}Pp(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(sc.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[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,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(sc.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&kt("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};vS=function(e,t,n,r){n!==r&&(t.flags|=4)};function _l(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 hn(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 AA(e,t,n){var r=t.pendingProps;switch(Cy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(t),null;case 1:return In(t.type)&&zd(),hn(t),null;case 3:return r=t.stateNode,za(),jt(On),jt(gn),Iy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Lu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Cr!==null&&(dg(Cr),Cr=null))),rg(e,t),hn(t),null;case 5:Oy(t);var s=Zo(gc.current);if(n=t.type,e!==null&&t.stateNode!=null)yS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ce(166));return hn(t),null}if(e=Zo(ns.current),Lu(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Gr]=t,r[mc]=o,e=(t.mode&1)!==0,n){case"dialog":kt("cancel",r),kt("close",r);break;case"iframe":case"object":case"embed":kt("load",r);break;case"video":case"audio":for(s=0;s<zl.length;s++)kt(zl[s],r);break;case"source":kt("error",r);break;case"img":case"image":case"link":kt("error",r),kt("load",r);break;case"details":kt("toggle",r);break;case"input":w0(r,o),kt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},kt("invalid",r);break;case"textarea":_0(r,o),kt("invalid",r)}Pp(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,l,e),s=["children",""+l]):sc.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&kt("scroll",r)}switch(n){case"input":Nu(r),b0(r,o,!0);break;case"textarea":Nu(r),S0(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Ld)}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=K_(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Gr]=t,e[mc]=r,gS(e,t,!1,!1),t.stateNode=e;e:{switch(i=Rp(n,r),n){case"dialog":kt("cancel",e),kt("close",e),s=r;break;case"iframe":case"object":case"embed":kt("load",e),s=r;break;case"video":case"audio":for(s=0;s<zl.length;s++)kt(zl[s],e);s=r;break;case"source":kt("error",e),s=r;break;case"img":case"image":case"link":kt("error",e),kt("load",e),s=r;break;case"details":kt("toggle",e),s=r;break;case"input":w0(e,r),s=jp(e,r),kt("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Lt({},r,{value:void 0}),kt("invalid",e);break;case"textarea":_0(e,r),s=Np(e,r),kt("invalid",e);break;default:s=r}Pp(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?Z_(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Y_(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&oc(e,c):typeof c=="number"&&oc(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(sc.hasOwnProperty(o)?c!=null&&o==="onScroll"&&kt("scroll",e):c!=null&&dy(e,o,c,i))}switch(n){case"input":Nu(e),b0(e,r,!1);break;case"textarea":Nu(e),S0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Co(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?xa(e,!!r.multiple,o,!1):r.defaultValue!=null&&xa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Ld)}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 hn(t),null;case 6:if(e&&t.stateNode!=null)vS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ce(166));if(n=Zo(gc.current),Zo(ns.current),Lu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Gr]=t,(o=r.nodeValue!==n)&&(e=Zn,e!==null))switch(e.tag){case 3:Mu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mu(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Gr]=t,t.stateNode=r}return hn(t),null;case 13:if(jt(Ot),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Rt&&Gn!==null&&t.mode&1&&!(t.flags&128))M1(),Ma(),t.flags|=98560,o=!1;else if(o=Lu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ce(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ce(317));o[Gr]=t}else Ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hn(t),o=!1}else Cr!==null&&(dg(Cr),Cr=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||Ot.current&1?en===0&&(en=3):Yy())),t.updateQueue!==null&&(t.flags|=4),hn(t),null);case 4:return za(),rg(e,t),e===null&&fc(t.stateNode.containerInfo),hn(t),null;case 10:return Py(t.type._context),hn(t),null;case 17:return In(t.type)&&zd(),hn(t),null;case 19:if(jt(Ot),o=t.memoizedState,o===null)return hn(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)_l(o,!1);else{if(en!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Hd(e),i!==null){for(t.flags|=128,_l(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(Ot,Ot.current&1|2),t.child}e=e.sibling}o.tail!==null&&Vt()>$a&&(t.flags|=128,r=!0,_l(o,!1),t.lanes=4194304)}else{if(!r)if(e=Hd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),_l(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Rt)return hn(t),null}else 2*Vt()-o.renderingStartTime>$a&&n!==1073741824&&(t.flags|=128,r=!0,_l(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=Ot.current,bt(Ot,r?n&1|2:n&1),t):(hn(t),null);case 22:case 23:return Ky(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Hn&1073741824&&(hn(t),t.subtreeFlags&6&&(t.flags|=8192)):hn(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function DA(e,t){switch(Cy(t),t.tag){case 1:return In(t.type)&&zd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return za(),jt(On),jt(gn),Iy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oy(t),null;case 13:if(jt(Ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return jt(Ot),null;case 4:return za(),null;case 10:return Py(t.type._context),null;case 22:case 23:return Ky(),null;case 24:return null;default:return null}}var $u=!1,mn=!1,OA=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function ua(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ft(e,t,r)}else n.current=null}function sg(e,t,n){try{n()}catch(r){Ft(e,t,r)}}var fw=!1;function IA(e,t){if(Up=Od,e=S1(),ky(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,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var m;f!==n||s!==0&&f.nodeType!==3||(l=i+s),f!==o||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===n&&++u===s&&(l=i),h===o&&++d===r&&(c=i),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vp={focusedElem:e,selectionRange:n},Od=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;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 p=x.memoizedProps,w=x.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?p:Sr(t.type,p),w);y.__reactInternalSnapshotBeforeUpdate=v}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(ce(163))}}catch(_){Ft(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return x=fw,fw=!1,x}function ql(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&&sg(t,n,o)}s=s.next}while(s!==r)}}function Qf(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 og(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 xS(e){var t=e.alternate;t!==null&&(e.alternate=null,xS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gr],delete t[mc],delete t[Hp],delete t[yA],delete t[vA])),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 wS(e){return e.tag===5||e.tag===3||e.tag===4}function hw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wS(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 ig(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=Ld));else if(r!==4&&(e=e.child,e!==null))for(ig(e,t,n),e=e.sibling;e!==null;)ig(e,t,n),e=e.sibling}function ag(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(ag(e,t,n),e=e.sibling;e!==null;)ag(e,t,n),e=e.sibling}var an=null,kr=!1;function Js(e,t,n){for(n=n.child;n!==null;)bS(e,t,n),n=n.sibling}function bS(e,t,n){if(ts&&typeof ts.onCommitFiberUnmount=="function")try{ts.onCommitFiberUnmount(Wf,n)}catch{}switch(n.tag){case 5:mn||ua(n,t);case 6:var r=an,s=kr;an=null,Js(e,t,n),an=r,kr=s,an!==null&&(kr?(e=an,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):an.removeChild(n.stateNode));break;case 18:an!==null&&(kr?(e=an,n=n.stateNode,e.nodeType===8?Pm(e.parentNode,n):e.nodeType===1&&Pm(e,n),cc(e)):Pm(an,n.stateNode));break;case 4:r=an,s=kr,an=n.stateNode.containerInfo,kr=!0,Js(e,t,n),an=r,kr=s;break;case 0:case 11:case 14:case 15:if(!mn&&(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)&&sg(n,t,i),s=s.next}while(s!==r)}Js(e,t,n);break;case 1:if(!mn&&(ua(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ft(n,t,l)}Js(e,t,n);break;case 21:Js(e,t,n);break;case 22:n.mode&1?(mn=(r=mn)||n.memoizedState!==null,Js(e,t,n),mn=r):Js(e,t,n);break;default:Js(e,t,n)}}function mw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new OA),t.forEach(function(r){var s=WA.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function _r(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,l=i;e:for(;l!==null;){switch(l.tag){case 5:an=l.stateNode,kr=!1;break e;case 3:an=l.stateNode.containerInfo,kr=!0;break e;case 4:an=l.stateNode.containerInfo,kr=!0;break e}l=l.return}if(an===null)throw Error(ce(160));bS(o,i,s),an=null,kr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Ft(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_S(t,e),t=t.sibling}function _S(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_r(t,e),Kr(e),r&4){try{ql(3,e,e.return),Qf(3,e)}catch(p){Ft(e,e.return,p)}try{ql(5,e,e.return)}catch(p){Ft(e,e.return,p)}}break;case 1:_r(t,e),Kr(e),r&512&&n!==null&&ua(n,n.return);break;case 5:if(_r(t,e),Kr(e),r&512&&n!==null&&ua(n,n.return),e.flags&32){var s=e.stateNode;try{oc(s,"")}catch(p){Ft(e,e.return,p)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&W_(s,o),Rp(l,i);var u=Rp(l,o);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?Z_(s,f):d==="dangerouslySetInnerHTML"?Y_(s,f):d==="children"?oc(s,f):dy(s,d,f,u)}switch(l){case"input":Cp(s,o);break;case"textarea":H_(s,o);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?xa(s,!!o.multiple,m,!1):h!==!!o.multiple&&(o.defaultValue!=null?xa(s,!!o.multiple,o.defaultValue,!0):xa(s,!!o.multiple,o.multiple?[]:"",!1))}s[mc]=o}catch(p){Ft(e,e.return,p)}}break;case 6:if(_r(t,e),Kr(e),r&4){if(e.stateNode===null)throw Error(ce(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(p){Ft(e,e.return,p)}}break;case 3:if(_r(t,e),Kr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{cc(t.containerInfo)}catch(p){Ft(e,e.return,p)}break;case 4:_r(t,e),Kr(e);break;case 13:_r(t,e),Kr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Wy=Vt())),r&4&&mw(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(mn=(u=mn)||d,_r(t,e),mn=u):_r(t,e),Kr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ne=e,d=e.child;d!==null;){for(f=Ne=d;Ne!==null;){switch(h=Ne,m=h.child,h.tag){case 0:case 11:case 14:case 15:ql(4,h,h.return);break;case 1:ua(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(p){Ft(r,n,p)}}break;case 5:ua(h,h.return);break;case 22:if(h.memoizedState!==null){gw(f);continue}}m!==null?(m.return=h,Ne=m):gw(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"):(l=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=G_("display",i))}catch(p){Ft(e,e.return,p)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(p){Ft(e,e.return,p)}}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:_r(t,e),Kr(e),r&4&&mw(e);break;case 21:break;default:_r(t,e),Kr(e)}}function Kr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(wS(n)){var r=n;break e}n=n.return}throw Error(ce(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(oc(s,""),r.flags&=-33);var o=hw(e);ag(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,l=hw(e);ig(e,l,i);break;default:throw Error(ce(161))}}catch(c){Ft(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function MA(e,t,n){Ne=e,SS(e)}function SS(e,t,n){for(var r=(e.mode&1)!==0;Ne!==null;){var s=Ne,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||$u;if(!i){var l=s.alternate,c=l!==null&&l.memoizedState!==null||mn;l=$u;var u=mn;if($u=i,(mn=c)&&!u)for(Ne=s;Ne!==null;)i=Ne,c=i.child,i.tag===22&&i.memoizedState!==null?yw(s):c!==null?(c.return=i,Ne=c):yw(s);for(;o!==null;)Ne=o,SS(o),o=o.sibling;Ne=s,$u=l,mn=u}pw(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Ne=o):pw(e)}}function pw(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mn||Qf(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!mn)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Sr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&J0(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}J0(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;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&&cc(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ce(163))}mn||t.flags&512&&og(t)}catch(h){Ft(t,t.return,h)}}if(t===e){Ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function gw(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function yw(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qf(4,t)}catch(c){Ft(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Ft(t,s,c)}}var o=t.return;try{og(t)}catch(c){Ft(t,o,c)}break;case 5:var i=t.return;try{og(t)}catch(c){Ft(t,i,c)}}}catch(c){Ft(t,t.return,c)}if(t===e){Ne=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Ne=l;break}Ne=t.return}}var LA=Math.ceil,Gd=Vs.ReactCurrentDispatcher,Vy=Vs.ReactCurrentOwner,fr=Vs.ReactCurrentBatchConfig,ut=0,sn=null,qt=null,ln=0,Hn=0,da=Lo(0),en=0,wc=null,fi=0,Jf=0,By=0,Xl=null,Rn=null,Wy=0,$a=1/0,bs=null,Zd=!1,lg=null,wo=null,Uu=!1,uo=null,qd=0,Ql=0,cg=null,md=-1,pd=0;function Sn(){return ut&6?Vt():md!==-1?md:md=Vt()}function bo(e){return e.mode&1?ut&2&&ln!==0?ln&-ln:wA.transition!==null?(pd===0&&(pd=a1()),pd):(e=gt,e!==0||(e=window.event,e=e===void 0?16:m1(e.type)),e):1}function Dr(e,t,n,r){if(50<Ql)throw Ql=0,cg=null,Error(ce(185));qc(e,n,r),(!(ut&2)||e!==sn)&&(e===sn&&(!(ut&2)&&(Jf|=n),en===4&&ao(e,ln)),Mn(e,r),n===1&&ut===0&&!(t.mode&1)&&($a=Vt()+500,Zf&&zo()))}function Mn(e,t){var n=e.callbackNode;wR(e,t);var r=Dd(e,e===sn?ln:0);if(r===0)n!==null&&C0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&C0(n),t===1)e.tag===0?xA(vw.bind(null,e)):D1(vw.bind(null,e)),pA(function(){!(ut&6)&&zo()}),n=null;else{switch(l1(r)){case 1:n=gy;break;case 4:n=o1;break;case 16:n=Ad;break;case 536870912:n=i1;break;default:n=Ad}n=RS(n,kS.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function kS(e,t){if(md=-1,pd=0,ut&6)throw Error(ce(327));var n=e.callbackNode;if(ka()&&e.callbackNode!==n)return null;var r=Dd(e,e===sn?ln:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Xd(e,r);else{t=r;var s=ut;ut|=2;var o=CS();(sn!==e||ln!==t)&&(bs=null,$a=Vt()+500,ni(e,t));do try{$A();break}catch(l){jS(e,l)}while(!0);Ty(),Gd.current=o,ut=s,qt!==null?t=0:(sn=null,ln=0,t=en)}if(t!==0){if(t===2&&(s=Mp(e),s!==0&&(r=s,t=ug(e,s))),t===1)throw n=wc,ni(e,0),ao(e,r),Mn(e,Vt()),n;if(t===6)ao(e,r);else{if(s=e.current.alternate,!(r&30)&&!zA(s)&&(t=Xd(e,r),t===2&&(o=Mp(e),o!==0&&(r=o,t=ug(e,o))),t===1))throw n=wc,ni(e,0),ao(e,r),Mn(e,Vt()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(ce(345));case 2:Wo(e,Rn,bs);break;case 3:if(ao(e,r),(r&130023424)===r&&(t=Wy+500-Vt(),10<t)){if(Dd(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Sn(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Wp(Wo.bind(null,e,Rn,bs),t);break}Wo(e,Rn,bs);break;case 4:if(ao(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-Ar(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*LA(r/1960))-r,10<r){e.timeoutHandle=Wp(Wo.bind(null,e,Rn,bs),r);break}Wo(e,Rn,bs);break;case 5:Wo(e,Rn,bs);break;default:throw Error(ce(329))}}}return Mn(e,Vt()),e.callbackNode===n?kS.bind(null,e):null}function ug(e,t){var n=Xl;return e.current.memoizedState.isDehydrated&&(ni(e,t).flags|=256),e=Xd(e,t),e!==2&&(t=Rn,Rn=n,t!==null&&dg(t)),e}function dg(e){Rn===null?Rn=e:Rn.push.apply(Rn,e)}function zA(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(!Ir(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 ao(e,t){for(t&=~By,t&=~Jf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ar(t),r=1<<n;e[n]=-1,t&=~r}}function vw(e){if(ut&6)throw Error(ce(327));ka();var t=Dd(e,0);if(!(t&1))return Mn(e,Vt()),null;var n=Xd(e,t);if(e.tag!==0&&n===2){var r=Mp(e);r!==0&&(t=r,n=ug(e,r))}if(n===1)throw n=wc,ni(e,0),ao(e,t),Mn(e,Vt()),n;if(n===6)throw Error(ce(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Wo(e,Rn,bs),Mn(e,Vt()),null}function Hy(e,t){var n=ut;ut|=1;try{return e(t)}finally{ut=n,ut===0&&($a=Vt()+500,Zf&&zo())}}function hi(e){uo!==null&&uo.tag===0&&!(ut&6)&&ka();var t=ut;ut|=1;var n=fr.transition,r=gt;try{if(fr.transition=null,gt=1,e)return e()}finally{gt=r,fr.transition=n,ut=t,!(ut&6)&&zo()}}function Ky(){Hn=da.current,jt(da)}function ni(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,mA(n)),qt!==null)for(n=qt.return;n!==null;){var r=n;switch(Cy(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zd();break;case 3:za(),jt(On),jt(gn),Iy();break;case 5:Oy(r);break;case 4:za();break;case 13:jt(Ot);break;case 19:jt(Ot);break;case 10:Py(r.type._context);break;case 22:case 23:Ky()}n=n.return}if(sn=e,qt=e=_o(e.current,null),ln=Hn=t,en=0,wc=null,By=Jf=fi=0,Rn=Xl=null,Go!==null){for(t=0;t<Go.length;t++)if(n=Go[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}Go=null}return e}function jS(e,t){do{var n=qt;try{if(Ty(),dd.current=Yd,Kd){for(var r=Mt.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Kd=!1}if(di=0,rn=Jt=Mt=null,Zl=!1,yc=0,Vy.current=null,n===null||n.return===null){en=1,wc=t,qt=null;break}e:{var o=e,i=n.return,l=n,c=t;if(t=ln,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,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 m=ow(i);if(m!==null){m.flags&=-257,iw(m,i,l,o,t),m.mode&1&&sw(o,u,t),t=m,c=u;var x=t.updateQueue;if(x===null){var p=new Set;p.add(c),t.updateQueue=p}else x.add(c);break e}else{if(!(t&1)){sw(o,u,t),Yy();break e}c=Error(ce(426))}}else if(Rt&&l.mode&1){var w=ow(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),iw(w,i,l,o,t),Ey(Fa(c,l));break e}}o=c=Fa(c,l),en!==4&&(en=2),Xl===null?Xl=[o]:Xl.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=lS(o,c,t);Q0(o,y);break e;case 1:l=c;var v=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(wo===null||!wo.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=cS(o,l,t);Q0(o,_);break e}}o=o.return}while(o!==null)}NS(n)}catch(j){t=j,qt===n&&n!==null&&(qt=n=n.return);continue}break}while(!0)}function CS(){var e=Gd.current;return Gd.current=Yd,e===null?Yd:e}function Yy(){(en===0||en===3||en===2)&&(en=4),sn===null||!(fi&268435455)&&!(Jf&268435455)||ao(sn,ln)}function Xd(e,t){var n=ut;ut|=2;var r=CS();(sn!==e||ln!==t)&&(bs=null,ni(e,t));do try{FA();break}catch(s){jS(e,s)}while(!0);if(Ty(),ut=n,Gd.current=r,qt!==null)throw Error(ce(261));return sn=null,ln=0,en}function FA(){for(;qt!==null;)ES(qt)}function $A(){for(;qt!==null&&!dR();)ES(qt)}function ES(e){var t=PS(e.alternate,e,Hn);e.memoizedProps=e.pendingProps,t===null?NS(e):qt=t,Vy.current=null}function NS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=DA(n,t),n!==null){n.flags&=32767,qt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{en=6,qt=null;return}}else if(n=AA(n,t,Hn),n!==null){qt=n;return}if(t=t.sibling,t!==null){qt=t;return}qt=t=e}while(t!==null);en===0&&(en=5)}function Wo(e,t,n){var r=gt,s=fr.transition;try{fr.transition=null,gt=1,UA(e,t,n,r)}finally{fr.transition=s,gt=r}return null}function UA(e,t,n,r){do ka();while(uo!==null);if(ut&6)throw Error(ce(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(ce(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(bR(e,o),e===sn&&(qt=sn=null,ln=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Uu||(Uu=!0,RS(Ad,function(){return ka(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=fr.transition,fr.transition=null;var i=gt;gt=1;var l=ut;ut|=4,Vy.current=null,IA(e,n),_S(n,e),aA(Vp),Od=!!Up,Vp=Up=null,e.current=n,MA(n),fR(),ut=l,gt=i,fr.transition=o}else e.current=n;if(Uu&&(Uu=!1,uo=e,qd=s),o=e.pendingLanes,o===0&&(wo=null),pR(n.stateNode),Mn(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(Zd)throw Zd=!1,e=lg,lg=null,e;return qd&1&&e.tag!==0&&ka(),o=e.pendingLanes,o&1?e===cg?Ql++:(Ql=0,cg=e):Ql=0,zo(),null}function ka(){if(uo!==null){var e=l1(qd),t=fr.transition,n=gt;try{if(fr.transition=null,gt=16>e?16:e,uo===null)var r=!1;else{if(e=uo,uo=null,qd=0,ut&6)throw Error(ce(331));var s=ut;for(ut|=4,Ne=e.current;Ne!==null;){var o=Ne,i=o.child;if(Ne.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Ne=u;Ne!==null;){var d=Ne;switch(d.tag){case 0:case 11:case 15:ql(8,d,o)}var f=d.child;if(f!==null)f.return=d,Ne=f;else for(;Ne!==null;){d=Ne;var h=d.sibling,m=d.return;if(xS(d),d===u){Ne=null;break}if(h!==null){h.return=m,Ne=h;break}Ne=m}}}var x=o.alternate;if(x!==null){var p=x.child;if(p!==null){x.child=null;do{var w=p.sibling;p.sibling=null,p=w}while(p!==null)}}Ne=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,Ne=i;else e:for(;Ne!==null;){if(o=Ne,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ql(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,Ne=y;break e}Ne=o.return}}var v=e.current;for(Ne=v;Ne!==null;){i=Ne;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,Ne=b;else e:for(i=v;Ne!==null;){if(l=Ne,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Qf(9,l)}}catch(j){Ft(l,l.return,j)}if(l===i){Ne=null;break e}var _=l.sibling;if(_!==null){_.return=l.return,Ne=_;break e}Ne=l.return}}if(ut=s,zo(),ts&&typeof ts.onPostCommitFiberRoot=="function")try{ts.onPostCommitFiberRoot(Wf,e)}catch{}r=!0}return r}finally{gt=n,fr.transition=t}}return!1}function xw(e,t,n){t=Fa(n,t),t=lS(e,t,1),e=xo(e,t,1),t=Sn(),e!==null&&(qc(e,1,t),Mn(e,t))}function Ft(e,t,n){if(e.tag===3)xw(e,e,n);else for(;t!==null;){if(t.tag===3){xw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(wo===null||!wo.has(r))){e=Fa(n,e),e=cS(t,e,1),t=xo(t,e,1),e=Sn(),t!==null&&(qc(t,1,e),Mn(t,e));break}}t=t.return}}function VA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Sn(),e.pingedLanes|=e.suspendedLanes&n,sn===e&&(ln&n)===n&&(en===4||en===3&&(ln&130023424)===ln&&500>Vt()-Wy?ni(e,0):By|=n),Mn(e,t)}function TS(e,t){t===0&&(e.mode&1?(t=Ru,Ru<<=1,!(Ru&130023424)&&(Ru=4194304)):t=1);var n=Sn();e=Ms(e,t),e!==null&&(qc(e,t,n),Mn(e,n))}function BA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),TS(e,n)}function WA(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(ce(314))}r!==null&&r.delete(t),TS(e,n)}var PS;PS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||On.current)An=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return An=!1,RA(e,t,n);An=!!(e.flags&131072)}else An=!1,Rt&&t.flags&1048576&&O1(t,Ud,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hd(e,t),e=t.pendingProps;var s=Ia(t,gn.current);Sa(t,n),s=Ly(null,t,r,e,s,n);var o=zy();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,In(r)?(o=!0,Fd(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ay(t),s.updater=Xf,t.stateNode=s,s._reactInternals=t,Xp(t,r,e,n),t=eg(null,t,r,!0,o,n)):(t.tag=0,Rt&&o&&jy(t),bn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=KA(r),e=Sr(r,e),s){case 0:t=Jp(null,t,r,e,n);break e;case 1:t=cw(null,t,r,e,n);break e;case 11:t=aw(null,t,r,e,n);break e;case 14:t=lw(null,t,r,Sr(r.type,e),n);break e}throw Error(ce(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),Jp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),cw(e,t,r,s,n);case 3:e:{if(hS(t),e===null)throw Error(ce(387));r=t.pendingProps,o=t.memoizedState,s=o.element,$1(e,t),Wd(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=Fa(Error(ce(423)),t),t=uw(e,t,r,n,s);break e}else if(r!==s){s=Fa(Error(ce(424)),t),t=uw(e,t,r,n,s);break e}else for(Gn=vo(t.stateNode.containerInfo.firstChild),Zn=t,Rt=!0,Cr=null,n=z1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ma(),r===s){t=Ls(e,t,n);break e}bn(e,t,r,n)}t=t.child}return t;case 5:return U1(t),e===null&&Gp(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Bp(r,s)?i=null:o!==null&&Bp(r,o)&&(t.flags|=32),fS(e,t),bn(e,t,i,n),t.child;case 6:return e===null&&Gp(t),null;case 13:return mS(e,t,n);case 4:return Dy(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):bn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),aw(e,t,r,s,n);case 7:return bn(e,t,t.pendingProps,n),t.child;case 8:return bn(e,t,t.pendingProps.children,n),t.child;case 12:return bn(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(Vd,r._currentValue),r._currentValue=i,o!==null)if(Ir(o.value,i)){if(o.children===s.children&&!On.current){t=Ls(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Ts(-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),Zp(o.return,n,t),l.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(ce(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Zp(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}bn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Sa(t,n),s=gr(s),r=r(s),t.flags|=1,bn(e,t,r,n),t.child;case 14:return r=t.type,s=Sr(r,t.pendingProps),s=Sr(r.type,s),lw(e,t,r,s,n);case 15:return uS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sr(r,s),hd(e,t),t.tag=1,In(r)?(e=!0,Fd(t)):e=!1,Sa(t,n),aS(t,r,s),Xp(t,r,s,n),eg(null,t,r,!0,e,n);case 19:return pS(e,t,n);case 22:return dS(e,t,n)}throw Error(ce(156,t.tag))};function RS(e,t){return s1(e,t)}function HA(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 dr(e,t,n,r){return new HA(e,t,n,r)}function Gy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function KA(e){if(typeof e=="function")return Gy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hy)return 11;if(e===my)return 14}return 2}function _o(e,t){var n=e.alternate;return n===null?(n=dr(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 gd(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Gy(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ta:return ri(n.children,s,o,t);case fy:i=8,s|=8;break;case bp:return e=dr(12,n,t,s|2),e.elementType=bp,e.lanes=o,e;case _p:return e=dr(13,n,t,s),e.elementType=_p,e.lanes=o,e;case Sp:return e=dr(19,n,t,s),e.elementType=Sp,e.lanes=o,e;case U_:return eh(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case F_:i=10;break e;case $_:i=9;break e;case hy:i=11;break e;case my:i=14;break e;case so:i=16,r=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=dr(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function ri(e,t,n,r){return e=dr(7,e,r,t),e.lanes=n,e}function eh(e,t,n,r){return e=dr(22,e,r,t),e.elementType=U_,e.lanes=n,e.stateNode={isHidden:!1},e}function zm(e,t,n){return e=dr(6,e,null,t),e.lanes=n,e}function Fm(e,t,n){return t=dr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function YA(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=xm(0),this.expirationTimes=xm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xm(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Zy(e,t,n,r,s,o,i,l,c){return e=new YA(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=dr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ay(o),e}function GA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ea,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function AS(e){if(!e)return Eo;e=e._reactInternals;e:{if(ji(e)!==e||e.tag!==1)throw Error(ce(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(In(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ce(171))}if(e.tag===1){var n=e.type;if(In(n))return A1(e,n,t)}return t}function DS(e,t,n,r,s,o,i,l,c){return e=Zy(n,r,!0,e,s,o,i,l,c),e.context=AS(null),n=e.current,r=Sn(),s=bo(n),o=Ts(r,s),o.callback=t??null,xo(n,o,s),e.current.lanes=s,qc(e,s,r),Mn(e,r),e}function th(e,t,n,r){var s=t.current,o=Sn(),i=bo(s);return n=AS(n),t.context===null?t.context=n:t.pendingContext=n,t=Ts(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xo(s,t,i),e!==null&&(Dr(e,s,i,o),ud(e,s,i)),i}function Qd(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 ww(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function qy(e,t){ww(e,t),(e=e.alternate)&&ww(e,t)}function ZA(){return null}var OS=typeof reportError=="function"?reportError:function(e){console.error(e)};function Xy(e){this._internalRoot=e}nh.prototype.render=Xy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ce(409));th(e,t,null,null)};nh.prototype.unmount=Xy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hi(function(){th(null,e,null,null)}),t[Is]=null}};function nh(e){this._internalRoot=e}nh.prototype.unstable_scheduleHydration=function(e){if(e){var t=d1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<io.length&&t!==0&&t<io[n].priority;n++);io.splice(n,0,e),n===0&&h1(e)}};function Qy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function rh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function bw(){}function qA(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=Qd(i);o.call(u)}}var i=DS(t,r,e,0,null,!1,!1,"",bw);return e._reactRootContainer=i,e[Is]=i.current,fc(e.nodeType===8?e.parentNode:e),hi(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=Qd(c);l.call(u)}}var c=Zy(e,0,!1,null,null,!1,!1,"",bw);return e._reactRootContainer=c,e[Is]=c.current,fc(e.nodeType===8?e.parentNode:e),hi(function(){th(t,c,n,r)}),c}function sh(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var l=s;s=function(){var c=Qd(i);l.call(c)}}th(t,i,e,s)}else i=qA(n,t,e,s,r);return Qd(i)}c1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ll(t.pendingLanes);n!==0&&(yy(t,n|1),Mn(t,Vt()),!(ut&6)&&($a=Vt()+500,zo()))}break;case 13:hi(function(){var r=Ms(e,1);if(r!==null){var s=Sn();Dr(r,e,1,s)}}),qy(e,1)}};vy=function(e){if(e.tag===13){var t=Ms(e,134217728);if(t!==null){var n=Sn();Dr(t,e,134217728,n)}qy(e,134217728)}};u1=function(e){if(e.tag===13){var t=bo(e),n=Ms(e,t);if(n!==null){var r=Sn();Dr(n,e,t,r)}qy(e,t)}};d1=function(){return gt};f1=function(e,t){var n=gt;try{return gt=e,t()}finally{gt=n}};Dp=function(e,t,n){switch(t){case"input":if(Cp(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=Gf(r);if(!s)throw Error(ce(90));B_(r),Cp(r,s)}}}break;case"textarea":H_(e,n);break;case"select":t=n.value,t!=null&&xa(e,!!n.multiple,t,!1)}};Q_=Hy;J_=hi;var XA={usingClientEntryPoint:!1,Events:[Qc,oa,Gf,q_,X_,Hy]},Sl={findFiberByHostInstance:Yo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},QA={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:Vs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=n1(e),e===null?null:e.stateNode},findFiberByHostInstance:Sl.findFiberByHostInstance||ZA,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 Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Wf=Vu.inject(QA),ts=Vu}catch{}}nr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XA;nr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qy(t))throw Error(ce(200));return GA(e,t,null,n)};nr.createRoot=function(e,t){if(!Qy(e))throw Error(ce(299));var n=!1,r="",s=OS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Zy(e,1,!1,null,null,n,!1,r,s),e[Is]=t.current,fc(e.nodeType===8?e.parentNode:e),new Xy(t)};nr.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(ce(188)):(e=Object.keys(e).join(","),Error(ce(268,e)));return e=n1(t),e=e===null?null:e.stateNode,e};nr.flushSync=function(e){return hi(e)};nr.hydrate=function(e,t,n){if(!rh(t))throw Error(ce(200));return sh(null,e,t,!0,n)};nr.hydrateRoot=function(e,t,n){if(!Qy(e))throw Error(ce(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=OS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=DS(t,null,e,1,n??null,s,!1,o,i),e[Is]=t.current,fc(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 nh(t)};nr.render=function(e,t,n){if(!rh(t))throw Error(ce(200));return sh(null,e,t,!1,n)};nr.unmountComponentAtNode=function(e){if(!rh(e))throw Error(ce(40));return e._reactRootContainer?(hi(function(){sh(null,null,e,!1,function(){e._reactRootContainer=null,e[Is]=null})}),!0):!1};nr.unstable_batchedUpdates=Hy;nr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!rh(n))throw Error(ce(200));if(e==null||e._reactInternals===void 0)throw Error(ce(38));return sh(e,t,n,!1,r)};nr.version="18.3.1-next-f1338f8080-20240426";function IS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(IS)}catch(e){console.error(e)}}IS(),I_.exports=nr;var Bs=I_.exports;const MS=Vf(Bs),JA=__({__proto__:null,default:MS},[Bs]);var _w=Bs;xp.createRoot=_w.createRoot,xp.hydrateRoot=_w.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 Dt(){return Dt=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},Dt.apply(this,arguments)}var Zt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Zt||(Zt={}));const Sw="popstate";function eD(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:l="",hash:c=""}=Ws(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),bc("",{pathname:i,search:l,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(s,o){let i=s.document.querySelector("base"),l="";if(i&&i.getAttribute("href")){let c=s.location.href,u=c.indexOf("#");l=u===-1?c:c.slice(0,u)}return l+"#"+(typeof o=="string"?o:pi(o))}function r(s,o){mi(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return nD(t,n,r,e)}function tt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function mi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tD(){return Math.random().toString(36).substr(2,8)}function kw(e,t){return{usr:e.state,key:e.key,idx:t}}function bc(e,t,n,r){return n===void 0&&(n=null),Dt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ws(t):t,{state:n,key:t&&t.key||r||tD()})}function pi(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 Ws(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 nD(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,l=Zt.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(Dt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){l=Zt.Pop;let w=d(),y=w==null?null:w-u;u=w,c&&c({action:l,location:p.location,delta:y})}function h(w,y){l=Zt.Push;let v=bc(p.location,w,y);n&&n(v,w),u=d()+1;let b=kw(v,u),_=p.createHref(v);try{i.pushState(b,"",_)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(_)}o&&c&&c({action:l,location:p.location,delta:1})}function m(w,y){l=Zt.Replace;let v=bc(p.location,w,y);n&&n(v,w),u=d();let b=kw(v,u),_=p.createHref(v);i.replaceState(b,"",_),o&&c&&c({action:l,location:p.location,delta:0})}function x(w){let y=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof w=="string"?w:pi(w);return v=v.replace(/ $/,"%20"),tt(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let p={get action(){return l},get location(){return e(s,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Sw,f),c=w,()=>{s.removeEventListener(Sw,f),c=null}},createHref(w){return t(s,w)},createURL:x,encodeLocation(w){let y=x(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:m,go(w){return i.go(w)}};return p}var wt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wt||(wt={}));const rD=new Set(["lazy","caseSensitive","path","id","index","children"]);function sD(e){return e.index===!0}function _c(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],l=typeof s.id=="string"?s.id:i.join("-");if(tt(s.index!==!0||!s.children,"Cannot specify children on an index route"),tt(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),sD(s)){let c=Dt({},s,t(s),{id:l});return r[l]=c,c}else{let c=Dt({},s,t(s),{id:l,children:void 0});return r[l]=c,s.children&&(c.children=_c(s.children,t,i,r)),c}})}function Ko(e,t,n){return n===void 0&&(n="/"),yd(e,t,n,!1)}function yd(e,t,n,r){let s=typeof t=="string"?Ws(t):t,o=el(s.pathname||"/",n);if(o==null)return null;let i=LS(e);iD(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let u=yD(o);l=pD(i[c],u,r)}return l}function oD(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 LS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(tt(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=Ps([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(tt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),LS(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:hD(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,i);else for(let c of zS(o.path))s(o,i,c)}),t}function zS(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=zS(r.join("/")),l=[];return l.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function iD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const aD=/^:[\w-]+$/,lD=3,cD=2,uD=1,dD=10,fD=-2,jw=e=>e==="*";function hD(e,t){let n=e.split("/"),r=n.length;return n.some(jw)&&(r+=fD),t&&(r+=cD),n.filter(s=>!jw(s)).reduce((s,o)=>s+(aD.test(o)?lD:o===""?uD:dD),r)}function mD(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 pD(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=Cw({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=Cw({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:Ps([o,f.pathname]),pathnameBase:wD(Ps([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=Ps([o,f.pathnameBase]))}return i}function Cw(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=gD(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:h,isOptional:m}=d;if(h==="*"){let p=l[f]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const x=l[f];return m&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function gD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),mi(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,l,c)=>(r.push({paramName:l,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 yD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mi(!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 el(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 vD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ws(e):e;return{pathname:n?n.startsWith("/")?n:xD(n,t):t,search:bD(r),hash:_D(s)}}function xD(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 $m(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 FS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function oh(e,t){let n=FS(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ih(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ws(e):(s=Dt({},e),tt(!s.pathname||!s.pathname.includes("?"),$m("?","pathname","search",s)),tt(!s.pathname||!s.pathname.includes("#"),$m("#","pathname","hash",s)),tt(!s.search||!s.search.includes("#"),$m("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,l;if(i==null)l=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("/")}l=f>=0?t[f]:"/"}let c=vD(s,l),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Ps=e=>e.join("/").replace(/\/\/+/g,"/"),wD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_D=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Jy{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 ah(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $S=["post","put","patch","delete"],SD=new Set($S),kD=["get",...$S],jD=new Set(kD),CD=new Set([301,302,303,307,308]),ED=new Set([307,308]),Um={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ND={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},kl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,TD=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),US="remix-router-transitions";function PD(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;tt(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=TD;let o={},i=_c(e.routes,s,void 0,o),l,c=e.basename||"/",u=e.unstable_dataStrategy||ID,d=e.unstable_patchRoutesOnMiss,f=Dt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,m=new Set,x=null,p=null,w=null,y=e.hydrationData!=null,v=Ko(i,e.history.location,c),b=null;if(v==null&&!d){let V=xn(404,{pathname:e.history.location.pathname}),{matches:H,route:q}=Mw(i);v=H,b={[q.id]:V}}v&&d&&!e.hydrationData&&hm(v,i,e.history.location.pathname).active&&(v=null);let _;if(!v)_=!1,v=[];else if(v.some(V=>V.route.lazy))_=!1;else if(!v.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=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:V&&V[re.route.id]!==void 0||H&&H[re.route.id]!==void 0:!0;if(H){let re=v.findIndex(je=>H[je.route.id]!==void 0);_=v.slice(0,re+1).every(q)}else _=v.every(q)}else _=e.hydrationData!=null;let j,C={historyAction:e.history.action,location:e.history.location,matches:v,initialized:_,navigation:Um,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=Zt.Pop,R=!1,A,O=!1,G=new Map,N=null,z=!1,S=!1,U=[],J=[],F=new Map,W=0,I=-1,X=new Map,$=new Set,B=new Map,xe=new Map,ie=new Set,ae=new Map,Ie=new Map,we=new Map,ke=!1;function Pe(){if(h=e.history.listen(V=>{let{action:H,location:q,delta:re}=V;if(ke){ke=!1;return}mi(Ie.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let je=wu({currentLocation:C.location,nextLocation:q,historyAction:H});if(je&&re!=null){ke=!0,e.history.go(re*-1),Ii(je,{state:"blocked",location:q,proceed(){Ii(je,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),e.history.go(re)},reset(){let De=new Map(C.blockers);De.set(je,kl),Ae({blockers:De})}});return}return Z(H,q)}),n){GD(t,G);let V=()=>ZD(t,G);t.addEventListener("pagehide",V),N=()=>t.removeEventListener("pagehide",V)}return C.initialized||Z(Zt.Pop,C.location,{initialHydration:!0}),j}function Fe(){h&&h(),N&&N(),m.clear(),A&&A.abort(),C.fetchers.forEach((V,H)=>Xt(H)),C.blockers.forEach((V,H)=>xu(H))}function Me(V){return m.add(V),()=>m.delete(V)}function Ae(V,H){H===void 0&&(H={}),C=Dt({},C,V);let q=[],re=[];f.v7_fetcherPersist&&C.fetchers.forEach((je,De)=>{je.state==="idle"&&(ie.has(De)?re.push(De):q.push(De))}),[...m].forEach(je=>je(C,{deletedFetchers:re,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),f.v7_fetcherPersist&&(q.forEach(je=>C.fetchers.delete(je)),re.forEach(je=>Xt(je)))}function st(V,H,q){var re,je;let{flushSync:De}=q===void 0?{}:q,We=C.actionData!=null&&C.navigation.formMethod!=null&&jr(C.navigation.formMethod)&&C.navigation.state==="loading"&&((re=V.state)==null?void 0:re._isRedirect)!==!0,ve;H.actionData?Object.keys(H.actionData).length>0?ve=H.actionData:ve=null:We?ve=C.actionData:ve=null;let qe=H.loaderData?Ow(C.loaderData,H.loaderData,H.matches||[],H.errors):C.loaderData,ze=C.blockers;ze.size>0&&(ze=new Map(ze),ze.forEach((pt,xt)=>ze.set(xt,kl)));let $e=R===!0||C.navigation.formMethod!=null&&jr(C.navigation.formMethod)&&((je=V.state)==null?void 0:je._isRedirect)!==!0;l&&(i=l,l=void 0),z||T===Zt.Pop||(T===Zt.Push?e.history.push(V,V.state):T===Zt.Replace&&e.history.replace(V,V.state));let yt;if(T===Zt.Pop){let pt=G.get(C.location.pathname);pt&&pt.has(V.pathname)?yt={currentLocation:C.location,nextLocation:V}:G.has(V.pathname)&&(yt={currentLocation:V,nextLocation:C.location})}else if(O){let pt=G.get(C.location.pathname);pt?pt.add(V.pathname):(pt=new Set([V.pathname]),G.set(C.location.pathname,pt)),yt={currentLocation:C.location,nextLocation:V}}Ae(Dt({},H,{actionData:ve,loaderData:qe,historyAction:T,location:V,initialized:!0,navigation:Um,revalidation:"idle",restoreScrollPosition:f0(V,H.matches||C.matches),preventScrollReset:$e,blockers:ze}),{viewTransitionOpts:yt,flushSync:De===!0}),T=Zt.Pop,R=!1,O=!1,z=!1,S=!1,U=[],J=[]}async function E(V,H){if(typeof V=="number"){e.history.go(V);return}let q=fg(C.location,C.matches,c,f.v7_prependBasename,V,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:re,submission:je,error:De}=Ew(f.v7_normalizeFormMethod,!1,q,H),We=C.location,ve=bc(C.location,re,H&&H.state);ve=Dt({},ve,e.history.encodeLocation(ve));let qe=H&&H.replace!=null?H.replace:void 0,ze=Zt.Push;qe===!0?ze=Zt.Replace:qe===!1||je!=null&&jr(je.formMethod)&&je.formAction===C.location.pathname+C.location.search&&(ze=Zt.Replace);let $e=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,yt=(H&&H.unstable_flushSync)===!0,pt=wu({currentLocation:We,nextLocation:ve,historyAction:ze});if(pt){Ii(pt,{state:"blocked",location:ve,proceed(){Ii(pt,{state:"proceeding",proceed:void 0,reset:void 0,location:ve}),E(V,H)},reset(){let xt=new Map(C.blockers);xt.set(pt,kl),Ae({blockers:xt})}});return}return await Z(ze,ve,{submission:je,pendingError:De,preventScrollReset:$e,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:yt})}function ee(){if(Ge(),Ae({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Z(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Z(T||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation})}}async function Z(V,H,q){A&&A.abort(),A=null,T=V,z=(q&&q.startUninterruptedRevalidation)===!0,SP(C.location,C.matches),R=(q&&q.preventScrollReset)===!0,O=(q&&q.enableViewTransition)===!0;let re=l||i,je=q&&q.overrideNavigation,De=Ko(re,H,c),We=(q&&q.flushSync)===!0,ve=hm(De,re,H.pathname);if(ve.active&&ve.matches&&(De=ve.matches),!De){let{error:ht,notFoundMatches:on,route:Gt}=Mi(H.pathname);st(H,{matches:on,loaderData:{},errors:{[Gt.id]:ht}},{flushSync:We});return}if(C.initialized&&!S&&UD(C.location,H)&&!(q&&q.submission&&jr(q.submission.formMethod))){st(H,{matches:De},{flushSync:We});return}A=new AbortController;let qe=Ui(e.history,H,A.signal,q&&q.submission),ze;if(q&&q.pendingError)ze=[fa(De).route.id,{type:wt.error,error:q.pendingError}];else if(q&&q.submission&&jr(q.submission.formMethod)){let ht=await D(qe,H,q.submission,De,ve.active,{replace:q.replace,flushSync:We});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[on,Gt]=ht.pendingActionResult;if(Kn(Gt)&&ah(Gt.error)&&Gt.error.status===404){A=null,st(H,{matches:ht.matches,loaderData:{},errors:{[on]:Gt.error}});return}}De=ht.matches||De,ze=ht.pendingActionResult,je=Vm(H,q.submission),We=!1,ve.active=!1,qe=Ui(e.history,qe.url,qe.signal)}let{shortCircuited:$e,matches:yt,loaderData:pt,errors:xt}=await k(qe,H,De,ve.active,je,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,We,ze);$e||(A=null,st(H,Dt({matches:yt||De},Iw(ze),{loaderData:pt,errors:xt})))}async function D(V,H,q,re,je,De){De===void 0&&(De={}),Ge();let We=KD(H,q);if(Ae({navigation:We},{flushSync:De.flushSync===!0}),je){let ze=await bu(re,H.pathname,V.signal);if(ze.type==="aborted")return{shortCircuited:!0};if(ze.type==="error"){let{boundaryId:$e,error:yt}=Wr(H.pathname,ze);return{matches:ze.partialMatches,pendingActionResult:[$e,{type:wt.error,error:yt}]}}else if(ze.matches)re=ze.matches;else{let{notFoundMatches:$e,error:yt,route:pt}=Mi(H.pathname);return{matches:$e,pendingActionResult:[pt.id,{type:wt.error,error:yt}]}}}let ve,qe=Fl(re,H);if(!qe.route.action&&!qe.route.lazy)ve={type:wt.error,error:xn(405,{method:V.method,pathname:H.pathname,routeId:qe.route.id})};else if(ve=(await ne("action",V,[qe],re))[0],V.signal.aborted)return{shortCircuited:!0};if(Xo(ve)){let ze;return De&&De.replace!=null?ze=De.replace:ze=Rw(ve.response.headers.get("Location"),new URL(V.url),c)===C.location.pathname+C.location.search,await Q(V,ve,{submission:q,replace:ze}),{shortCircuited:!0}}if(qo(ve))throw xn(400,{type:"defer-action"});if(Kn(ve)){let ze=fa(re,qe.route.id);return(De&&De.replace)!==!0&&(T=Zt.Push),{matches:re,pendingActionResult:[ze.route.id,ve]}}return{matches:re,pendingActionResult:[qe.route.id,ve]}}async function k(V,H,q,re,je,De,We,ve,qe,ze,$e){let yt=je||Vm(H,De),pt=De||We||Fw(yt),xt=!z&&(!f.v7_partialHydration||!qe);if(re){if(xt){let zt=P($e);Ae(Dt({navigation:yt},zt!==void 0?{actionData:zt}:{}),{flushSync:ze})}let Je=await bu(q,H.pathname,V.signal);if(Je.type==="aborted")return{shortCircuited:!0};if(Je.type==="error"){let{boundaryId:zt,error:Vn}=Wr(H.pathname,Je);return{matches:Je.partialMatches,loaderData:{},errors:{[zt]:Vn}}}else if(Je.matches)q=Je.matches;else{let{error:zt,notFoundMatches:Vn,route:Tt}=Mi(H.pathname);return{matches:Vn,loaderData:{},errors:{[Tt.id]:zt}}}}let ht=l||i,[on,Gt]=Nw(e.history,C,q,pt,H,f.v7_partialHydration&&qe===!0,f.v7_skipActionErrorRevalidation,S,U,J,ie,B,$,ht,c,$e);if(Xs(Je=>!(q&&q.some(zt=>zt.route.id===Je))||on&&on.some(zt=>zt.route.id===Je)),I=++W,on.length===0&&Gt.length===0){let Je=ps();return st(H,Dt({matches:q,loaderData:{},errors:$e&&Kn($e[1])?{[$e[0]]:$e[1].error}:null},Iw($e),Je?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ze}),{shortCircuited:!0}}if(xt){let Je={};if(!re){Je.navigation=yt;let zt=P($e);zt!==void 0&&(Je.actionData=zt)}Gt.length>0&&(Je.fetchers=M(Gt)),Ae(Je,{flushSync:ze})}Gt.forEach(Je=>{F.has(Je.key)&&ct(Je.key),Je.controller&&F.set(Je.key,Je.controller)});let pl=()=>Gt.forEach(Je=>ct(Je.key));A&&A.signal.addEventListener("abort",pl);let{loaderResults:Qs,fetcherResults:Li}=await be(C.matches,q,on,Gt,V);if(V.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",pl),Gt.forEach(Je=>F.delete(Je.key));let zi=Lw([...Qs,...Li]);if(zi){if(zi.idx>=on.length){let Je=Gt[zi.idx-on.length].key;$.add(Je)}return await Q(V,zi.result,{replace:ve}),{shortCircuited:!0}}let{loaderData:Fi,errors:Hr}=Dw(C,q,on,Qs,$e,Gt,Li,ae);ae.forEach((Je,zt)=>{Je.subscribe(Vn=>{(Vn||Je.done)&&ae.delete(zt)})}),f.v7_partialHydration&&qe&&C.errors&&Object.entries(C.errors).filter(Je=>{let[zt]=Je;return!on.some(Vn=>Vn.route.id===zt)}).forEach(Je=>{let[zt,Vn]=Je;Hr=Object.assign(Hr||{},{[zt]:Vn})});let _u=ps(),Su=ar(I),ku=_u||Su||Gt.length>0;return Dt({matches:q,loaderData:Fi,errors:Hr},ku?{fetchers:new Map(C.fetchers)}:{})}function P(V){if(V&&!Kn(V[1]))return{[V[0]]:V[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function M(V){return V.forEach(H=>{let q=C.fetchers.get(H.key),re=jl(void 0,q?q.data:void 0);C.fetchers.set(H.key,re)}),new Map(C.fetchers)}function Y(V,H,q,re){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.");F.has(V)&&ct(V);let je=(re&&re.unstable_flushSync)===!0,De=l||i,We=fg(C.location,C.matches,c,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,re==null?void 0:re.relative),ve=Ko(De,We,c),qe=hm(ve,De,We);if(qe.active&&qe.matches&&(ve=qe.matches),!ve){Nt(V,H,xn(404,{pathname:We}),{flushSync:je});return}let{path:ze,submission:$e,error:yt}=Ew(f.v7_normalizeFormMethod,!0,We,re);if(yt){Nt(V,H,yt,{flushSync:je});return}let pt=Fl(ve,ze);if(R=(re&&re.preventScrollReset)===!0,$e&&jr($e.formMethod)){L(V,H,ze,pt,ve,qe.active,je,$e);return}B.set(V,{routeId:H,path:ze}),K(V,H,ze,pt,ve,qe.active,je,$e)}async function L(V,H,q,re,je,De,We,ve){Ge(),B.delete(V);function qe(Tt){if(!Tt.route.action&&!Tt.route.lazy){let gs=xn(405,{method:ve.formMethod,pathname:q,routeId:H});return Nt(V,H,gs,{flushSync:We}),!0}return!1}if(!De&&qe(re))return;let ze=C.fetchers.get(V);Ve(V,YD(ve,ze),{flushSync:We});let $e=new AbortController,yt=Ui(e.history,q,$e.signal,ve);if(De){let Tt=await bu(je,q,yt.signal);if(Tt.type==="aborted")return;if(Tt.type==="error"){let{error:gs}=Wr(q,Tt);Nt(V,H,gs,{flushSync:We});return}else if(Tt.matches){if(je=Tt.matches,re=Fl(je,q),qe(re))return}else{Nt(V,H,xn(404,{pathname:q}),{flushSync:We});return}}F.set(V,$e);let pt=W,ht=(await ne("action",yt,[re],je))[0];if(yt.signal.aborted){F.get(V)===$e&&F.delete(V);return}if(f.v7_fetcherPersist&&ie.has(V)){if(Xo(ht)||Kn(ht)){Ve(V,no(void 0));return}}else{if(Xo(ht))if(F.delete(V),I>pt){Ve(V,no(void 0));return}else return $.add(V),Ve(V,jl(ve)),Q(yt,ht,{fetcherSubmission:ve});if(Kn(ht)){Nt(V,H,ht.error);return}}if(qo(ht))throw xn(400,{type:"defer-action"});let on=C.navigation.location||C.location,Gt=Ui(e.history,on,$e.signal),pl=l||i,Qs=C.navigation.state!=="idle"?Ko(pl,C.navigation.location,c):C.matches;tt(Qs,"Didn't find any matches after fetcher action");let Li=++W;X.set(V,Li);let zi=jl(ve,ht.data);C.fetchers.set(V,zi);let[Fi,Hr]=Nw(e.history,C,Qs,ve,on,!1,f.v7_skipActionErrorRevalidation,S,U,J,ie,B,$,pl,c,[re.route.id,ht]);Hr.filter(Tt=>Tt.key!==V).forEach(Tt=>{let gs=Tt.key,h0=C.fetchers.get(gs),CP=jl(void 0,h0?h0.data:void 0);C.fetchers.set(gs,CP),F.has(gs)&&ct(gs),Tt.controller&&F.set(gs,Tt.controller)}),Ae({fetchers:new Map(C.fetchers)});let _u=()=>Hr.forEach(Tt=>ct(Tt.key));$e.signal.addEventListener("abort",_u);let{loaderResults:Su,fetcherResults:ku}=await be(C.matches,Qs,Fi,Hr,Gt);if($e.signal.aborted)return;$e.signal.removeEventListener("abort",_u),X.delete(V),F.delete(V),Hr.forEach(Tt=>F.delete(Tt.key));let Je=Lw([...Su,...ku]);if(Je){if(Je.idx>=Fi.length){let Tt=Hr[Je.idx-Fi.length].key;$.add(Tt)}return Q(Gt,Je.result)}let{loaderData:zt,errors:Vn}=Dw(C,C.matches,Fi,Su,void 0,Hr,ku,ae);if(C.fetchers.has(V)){let Tt=no(ht.data);C.fetchers.set(V,Tt)}ar(Li),C.navigation.state==="loading"&&Li>I?(tt(T,"Expected pending action"),A&&A.abort(),st(C.navigation.location,{matches:Qs,loaderData:zt,errors:Vn,fetchers:new Map(C.fetchers)})):(Ae({errors:Vn,loaderData:Ow(C.loaderData,zt,Qs,Vn),fetchers:new Map(C.fetchers)}),S=!1)}async function K(V,H,q,re,je,De,We,ve){let qe=C.fetchers.get(V);Ve(V,jl(ve,qe?qe.data:void 0),{flushSync:We});let ze=new AbortController,$e=Ui(e.history,q,ze.signal);if(De){let ht=await bu(je,q,$e.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:on}=Wr(q,ht);Nt(V,H,on,{flushSync:We});return}else if(ht.matches)je=ht.matches,re=Fl(je,q);else{Nt(V,H,xn(404,{pathname:q}),{flushSync:We});return}}F.set(V,ze);let yt=W,xt=(await ne("loader",$e,[re],je))[0];if(qo(xt)&&(xt=await KS(xt,$e.signal,!0)||xt),F.get(V)===ze&&F.delete(V),!$e.signal.aborted){if(ie.has(V)){Ve(V,no(void 0));return}if(Xo(xt))if(I>yt){Ve(V,no(void 0));return}else{$.add(V),await Q($e,xt);return}if(Kn(xt)){Nt(V,H,xt.error);return}tt(!qo(xt),"Unhandled fetcher deferred data"),Ve(V,no(xt.data))}}async function Q(V,H,q){let{submission:re,fetcherSubmission:je,replace:De}=q===void 0?{}:q;H.response.headers.has("X-Remix-Revalidate")&&(S=!0);let We=H.response.headers.get("Location");tt(We,"Expected a Location header on the redirect Response"),We=Rw(We,new URL(V.url),c);let ve=bc(C.location,We,{_isRedirect:!0});if(n){let xt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(ev.test(We)){const ht=e.history.createURL(We);xt=ht.origin!==t.location.origin||el(ht.pathname,c)==null}if(xt){De?t.location.replace(We):t.location.assign(We);return}}A=null;let qe=De===!0?Zt.Replace:Zt.Push,{formMethod:ze,formAction:$e,formEncType:yt}=C.navigation;!re&&!je&&ze&&$e&&yt&&(re=Fw(C.navigation));let pt=re||je;if(ED.has(H.response.status)&&pt&&jr(pt.formMethod))await Z(qe,ve,{submission:Dt({},pt,{formAction:We}),preventScrollReset:R});else{let xt=Vm(ve,re);await Z(qe,ve,{overrideNavigation:xt,fetcherSubmission:je,preventScrollReset:R})}}async function ne(V,H,q,re){try{let je=await MD(u,V,H,q,re,o,s);return await Promise.all(je.map((De,We)=>{if(BD(De)){let ve=De.result;return{type:wt.redirect,response:FD(ve,H,q[We].route.id,re,c,f.v7_relativeSplatPath)}}return zD(De)}))}catch(je){return q.map(()=>({type:wt.error,error:je}))}}async function be(V,H,q,re,je){let[De,...We]=await Promise.all([q.length?ne("loader",je,q,H):[],...re.map(ve=>{if(ve.matches&&ve.match&&ve.controller){let qe=Ui(e.history,ve.path,ve.controller.signal);return ne("loader",qe,[ve.match],ve.matches).then(ze=>ze[0])}else return Promise.resolve({type:wt.error,error:xn(404,{pathname:ve.path})})})]);return await Promise.all([zw(V,q,De,De.map(()=>je.signal),!1,C.loaderData),zw(V,re.map(ve=>ve.match),We,re.map(ve=>ve.controller?ve.controller.signal:null),!0)]),{loaderResults:De,fetcherResults:We}}function Ge(){S=!0,U.push(...Xs()),B.forEach((V,H)=>{F.has(H)&&(J.push(H),ct(H))})}function Ve(V,H,q){q===void 0&&(q={}),C.fetchers.set(V,H),Ae({fetchers:new Map(C.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Nt(V,H,q,re){re===void 0&&(re={});let je=fa(C.matches,H);Xt(V),Ae({errors:{[je.route.id]:q},fetchers:new Map(C.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function ir(V){return f.v7_fetcherPersist&&(xe.set(V,(xe.get(V)||0)+1),ie.has(V)&&ie.delete(V)),C.fetchers.get(V)||ND}function Xt(V){let H=C.fetchers.get(V);F.has(V)&&!(H&&H.state==="loading"&&X.has(V))&&ct(V),B.delete(V),X.delete(V),$.delete(V),ie.delete(V),C.fetchers.delete(V)}function hs(V){if(f.v7_fetcherPersist){let H=(xe.get(V)||0)-1;H<=0?(xe.delete(V),ie.add(V)):xe.set(V,H)}else Xt(V);Ae({fetchers:new Map(C.fetchers)})}function ct(V){let H=F.get(V);tt(H,"Expected fetch controller: "+V),H.abort(),F.delete(V)}function ms(V){for(let H of V){let q=ir(H),re=no(q.data);C.fetchers.set(H,re)}}function ps(){let V=[],H=!1;for(let q of $){let re=C.fetchers.get(q);tt(re,"Expected fetcher: "+q),re.state==="loading"&&($.delete(q),V.push(q),H=!0)}return ms(V),H}function ar(V){let H=[];for(let[q,re]of X)if(re<V){let je=C.fetchers.get(q);tt(je,"Expected fetcher: "+q),je.state==="loading"&&(ct(q),X.delete(q),H.push(q))}return ms(H),H.length>0}function vu(V,H){let q=C.blockers.get(V)||kl;return Ie.get(V)!==H&&Ie.set(V,H),q}function xu(V){C.blockers.delete(V),Ie.delete(V)}function Ii(V,H){let q=C.blockers.get(V)||kl;tt(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 re=new Map(C.blockers);re.set(V,H),Ae({blockers:re})}function wu(V){let{currentLocation:H,nextLocation:q,historyAction:re}=V;if(Ie.size===0)return;Ie.size>1&&mi(!1,"A router only supports one blocker at a time");let je=Array.from(Ie.entries()),[De,We]=je[je.length-1],ve=C.blockers.get(De);if(!(ve&&ve.state==="proceeding")&&We({currentLocation:H,nextLocation:q,historyAction:re}))return De}function Mi(V){let H=xn(404,{pathname:V}),q=l||i,{matches:re,route:je}=Mw(q);return Xs(),{notFoundMatches:re,route:je,error:H}}function Wr(V,H){return{boundaryId:fa(H.partialMatches).route.id,error:xn(400,{type:"route-discovery",pathname:V,message:H.error!=null&&"message"in H.error?H.error:String(H.error)})}}function Xs(V){let H=[];return ae.forEach((q,re)=>{(!V||V(re))&&(q.cancel(),H.push(re),ae.delete(re))}),H}function _P(V,H,q){if(x=V,w=H,p=q||null,!y&&C.navigation===Um){y=!0;let re=f0(C.location,C.matches);re!=null&&Ae({restoreScrollPosition:re})}return()=>{x=null,w=null,p=null}}function d0(V,H){return p&&p(V,H.map(re=>oD(re,C.loaderData)))||V.key}function SP(V,H){if(x&&w){let q=d0(V,H);x[q]=w()}}function f0(V,H){if(x){let q=d0(V,H),re=x[q];if(typeof re=="number")return re}return null}function hm(V,H,q){if(d)if(V){let re=V[V.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:yd(H,q,c,!0)}}else return{active:!0,matches:yd(H,q,c,!0)||[]};return{active:!1,matches:null}}async function bu(V,H,q){let re=V,je=re.length>0?re[re.length-1].route:null;for(;;){let De=l==null,We=l||i;try{await OD(d,H,re,We,o,s,we,q)}catch($e){return{type:"error",error:$e,partialMatches:re}}finally{De&&(i=[...i])}if(q.aborted)return{type:"aborted"};let ve=Ko(We,H,c),qe=!1;if(ve){let $e=ve[ve.length-1].route;if($e.index)return{type:"success",matches:ve};if($e.path&&$e.path.length>0)if($e.path==="*")qe=!0;else return{type:"success",matches:ve}}let ze=yd(We,H,c,!0);if(!ze||re.map($e=>$e.route.id).join("-")===ze.map($e=>$e.route.id).join("-"))return{type:"success",matches:qe?ve:null};if(re=ze,je=re[re.length-1].route,je.path==="*")return{type:"success",matches:re}}}function kP(V){o={},l=_c(V,s,void 0,o)}function jP(V,H){let q=l==null;BS(V,H,l||i,o,s),q&&(i=[...i],Ae({}))}return j={get basename(){return c},get future(){return f},get state(){return C},get routes(){return i},get window(){return t},initialize:Pe,subscribe:Me,enableScrollRestoration:_P,navigate:E,fetch:Y,revalidate:ee,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:ir,deleteFetcher:hs,dispose:Fe,getBlocker:vu,deleteBlocker:xu,patchRoutes:jP,_internalFetchControllers:F,_internalActiveDeferreds:ae,_internalSetRoutes:kP},j}function RD(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function fg(e,t,n,r,s,o,i,l){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=ih(s||".",oh(c,o),el(e.pathname,n)||e.pathname,l==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!tv(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Ps([n,d.pathname])),pi(d)}function Ew(e,t,n,r){if(!r||!RD(r))return{path:n};if(r.formMethod&&!HD(r.formMethod))return{path:n,error:xn(405,{method:r.formMethod})};let s=()=>({path:n,error:xn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),l=WS(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!jr(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((m,x)=>{let[p,w]=x;return""+m+p+"="+w+`
`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!jr(i))return s();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}tt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=hg(r.formData),u=r.formData;else if(r.body instanceof FormData)c=hg(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=Aw(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=Aw(c)}catch{return s()}let d={formMethod:i,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(jr(d.formMethod))return{path:n,submission:d};let f=Ws(n);return t&&f.search&&tv(f.search)&&c.append("index",""),f.search="?"+c,{path:pi(f),submission:d}}function AD(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 Nw(e,t,n,r,s,o,i,l,c,u,d,f,h,m,x,p){let w=p?Kn(p[1])?p[1].error:p[1].data:void 0,y=e.createURL(t.location),v=e.createURL(s),b=p&&Kn(p[1])?p[0]:void 0,_=b?AD(n,b):n,j=p?p[1].statusCode:void 0,C=i&&j&&j>=400,T=_.filter((A,O)=>{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(DD(t.loaderData,t.matches[O],A)||c.some(S=>S===A.route.id))return!0;let N=t.matches[O],z=A;return Tw(A,Dt({currentUrl:y,currentParams:N.params,nextUrl:v,nextParams:z.params},r,{actionResult:w,actionStatus:j,defaultShouldRevalidate:C?!1:l||y.pathname+y.search===v.pathname+v.search||y.search!==v.search||VS(N,z)}))}),R=[];return f.forEach((A,O)=>{if(o||!n.some(U=>U.route.id===A.routeId)||d.has(O))return;let G=Ko(m,A.path,x);if(!G){R.push({key:O,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(O),z=Fl(G,A.path),S=!1;h.has(O)?S=!1:u.includes(O)?S=!0:N&&N.state!=="idle"&&N.data===void 0?S=l:S=Tw(z,Dt({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:w,actionStatus:j,defaultShouldRevalidate:C?!1:l})),S&&R.push({key:O,routeId:A.routeId,path:A.path,matches:G,match:z,controller:new AbortController})}),[T,R]}function DD(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function VS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Tw(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function OD(e,t,n,r,s,o,i,l){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)=>{l.aborted||BS(d,f,r,s,o)}}),i.set(c,u)),u&&VD(u)&&await u}finally{i.delete(c)}}function BS(e,t,n,r,s){if(e){var o;let i=r[e];tt(i,"No route found to patch children into: routeId = "+e);let l=_c(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...l):i.children=l}else{let i=_c(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function Pw(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];tt(s,"No route found in manifest");let o={};for(let i in r){let c=s[i]!==void 0&&i!=="hasErrorBoundary";mi(!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&&!rD.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,Dt({},t(s),{lazy:void 0}))}function ID(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function MD(e,t,n,r,s,o,i,l){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 Dt({},f,{shouldLoad:h,resolve:x=>(u.add(f.route.id),h?LD(t,n,f,o,i,x,l):Promise.resolve({type:wt.data,result:void 0}))})}),request:n,params:s[0].params,context:l});return s.forEach(f=>tt(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 LD(e,t,n,r,s,o,i){let l,c,u=d=>{let f,h=new Promise((p,w)=>f=w);c=()=>f(),t.signal.addEventListener("abort",c);let m=p=>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},...p!==void 0?[p]:[]),x;return o?x=o(p=>m(p)):x=(async()=>{try{return{type:"data",result:await m()}}catch(p){return{type:"error",result:p}}})(),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(m=>{f=m}),Pw(n.route,s,r)]);if(f!==void 0)throw f;l=h}else if(await Pw(n.route,s,r),d=n.route[e],d)l=await u(d);else if(e==="action"){let f=new URL(t.url),h=f.pathname+f.search;throw xn(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:wt.data,result:void 0};else if(d)l=await u(d);else{let f=new URL(t.url),h=f.pathname+f.search;throw xn(404,{pathname:h})}tt(l.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 l}async function zD(e){let{result:t,type:n,status:r}=e;if(HS(t)){let i;try{let l=t.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(l){return{type:wt.error,error:l}}return n===wt.error?{type:wt.error,error:new Jy(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:ah(t)?t.status:r};if(WD(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 FD(e,t,n,r,s,o){let i=e.headers.get("Location");if(tt(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ev.test(i)){let l=r.slice(0,r.findIndex(c=>c.route.id===n)+1);i=fg(new URL(t.url),l,s,!0,i,o),e.headers.set("Location",i)}return e}function Rw(e,t,n){if(ev.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=el(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Ui(e,t,n,r){let s=e.createURL(WS(t)).toString(),o={signal:n};if(r&&jr(r.formMethod)){let{formMethod:i,formEncType:l}=r;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(r.json)):l==="text/plain"?o.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?o.body=hg(r.formData):o.body=r.formData}return new Request(s,o)}function hg(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Aw(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function $D(e,t,n,r,s,o){let i={},l=null,c,u=!1,d={},f=r&&Kn(r[1])?r[1].error:void 0;return n.forEach((h,m)=>{let x=t[m].route.id;if(tt(!Xo(h),"Cannot handle redirect results in processLoaderData"),Kn(h)){let p=h.error;f!==void 0&&(p=f,f=void 0),l=l||{};{let w=fa(e,x);l[w.route.id]==null&&(l[w.route.id]=p)}i[x]=void 0,u||(u=!0,c=ah(h.error)?h.error.status:500),h.headers&&(d[x]=h.headers)}else qo(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&&(l={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:l,statusCode:c||200,loaderHeaders:d}}function Dw(e,t,n,r,s,o,i,l){let{loaderData:c,errors:u}=$D(t,n,r,s,l);for(let d=0;d<o.length;d++){let{key:f,match:h,controller:m}=o[d];tt(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(m&&m.signal.aborted))if(Kn(x)){let p=fa(e.matches,h==null?void 0:h.route.id);u&&u[p.route.id]||(u=Dt({},u,{[p.route.id]:x.error})),e.fetchers.delete(f)}else if(Xo(x))tt(!1,"Unhandled fetcher revalidation redirect");else if(qo(x))tt(!1,"Unhandled fetcher deferred data");else{let p=no(x.data);e.fetchers.set(f,p)}}return{loaderData:c,errors:u}}function Ow(e,t,n,r){let s=Dt({},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 Iw(e){return e?Kn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function fa(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 Mw(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 xn(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,l="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(l="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?(l="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",c='No route matches URL "'+n+'"'):e===405&&(l="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 Jy(e||500,l,new Error(c),!0)}function Lw(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Xo(n))return{result:n,idx:t}}}function WS(e){let t=typeof e=="string"?Ws(e):e;return pi(Dt({},t,{hash:""}))}function UD(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function VD(e){return typeof e=="object"&&e!=null&&"then"in e}function BD(e){return HS(e.result)&&CD.has(e.result.status)}function qo(e){return e.type===wt.deferred}function Kn(e){return e.type===wt.error}function Xo(e){return(e&&e.type)===wt.redirect}function WD(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 HS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function HD(e){return jD.has(e.toLowerCase())}function jr(e){return SD.has(e.toLowerCase())}async function zw(e,t,n,r,s,o){for(let i=0;i<n.length;i++){let l=n[i],c=t[i];if(!c)continue;let u=e.find(f=>f.route.id===c.route.id),d=u!=null&&!VS(u,c)&&(o&&o[c.route.id])!==void 0;if(qo(l)&&(s||d)){let f=r[i];tt(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await KS(l,f,s).then(h=>{h&&(n[i]=h||n[i])})}}}async function KS(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 tv(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Fl(e,t){let n=typeof t=="string"?Ws(t).search:t.search;if(e[e.length-1].route.index&&tv(n||""))return e[e.length-1];let r=FS(e);return r[r.length-1]}function Fw(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 Vm(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 KD(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 jl(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 YD(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 no(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 GD(e,t){try{let n=e.sessionStorage.getItem(US);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 ZD(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(US,JSON.stringify(n))}catch(r){mi(!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 Jd(){return Jd=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},Jd.apply(this,arguments)}const lh=g.createContext(null),YS=g.createContext(null),Fo=g.createContext(null),nv=g.createContext(null),Hs=g.createContext({outlet:null,matches:[],isDataRoute:!1}),GS=g.createContext(null);function qD(e,t){let{relative:n}=t===void 0?{}:t;tl()||tt(!1);let{basename:r,navigator:s}=g.useContext(Fo),{hash:o,pathname:i,search:l}=qS(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:Ps([r,i])),s.createHref({pathname:c,search:l,hash:o})}function tl(){return g.useContext(nv)!=null}function Ur(){return tl()||tt(!1),g.useContext(nv).location}function ZS(e){g.useContext(Fo).static||g.useLayoutEffect(e)}function sr(){let{isDataRoute:e}=g.useContext(Hs);return e?uO():XD()}function XD(){tl()||tt(!1);let e=g.useContext(lh),{basename:t,future:n,navigator:r}=g.useContext(Fo),{matches:s}=g.useContext(Hs),{pathname:o}=Ur(),i=JSON.stringify(oh(s,n.v7_relativeSplatPath)),l=g.useRef(!1);return ZS(()=>{l.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=ih(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ps([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const QD=g.createContext(null);function JD(e){let t=g.useContext(Hs).outlet;return t&&g.createElement(QD.Provider,{value:e},t)}function qS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(Fo),{matches:s}=g.useContext(Hs),{pathname:o}=Ur(),i=JSON.stringify(oh(s,r.v7_relativeSplatPath));return g.useMemo(()=>ih(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function eO(e,t,n,r){tl()||tt(!1);let{navigator:s}=g.useContext(Fo),{matches:o}=g.useContext(Hs),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Ur(),d;d=u;let f=d.pathname||"/",h=f;if(c!=="/"){let p=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(p.length).join("/")}let m=Ko(e,{pathname:h});return oO(m&&m.map(p=>Object.assign({},p,{params:Object.assign({},l,p.params),pathname:Ps([c,s.encodeLocation?s.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?c:Ps([c,s.encodeLocation?s.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),o,n,r)}function tO(){let e=cO(),t=ah(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 g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:s},n):null,null)}const nO=g.createElement(tO,null);class rO extends g.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?g.createElement(Hs.Provider,{value:this.props.routeContext},g.createElement(GS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sO(e){let{routeContext:t,match:n,children:r}=e,s=g.useContext(lh);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Hs.Provider,{value:t},r)}function oO(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,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=i.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||tt(!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:m}=n,x=f.route.loader&&h[f.route.id]===void 0&&(!m||m[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 m,x=!1,p=null,w=null;n&&(m=l&&f.route.id?l[f.route.id]:void 0,p=f.route.errorElement||nO,c&&(u<0&&h===0?(dO("route-fallback"),x=!0,w=null):u===h&&(x=!0,w=f.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,h+1)),v=()=>{let b;return m?b=p:x?b=w:f.route.Component?b=g.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,g.createElement(sO,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?g.createElement(rO,{location:n.location,revalidation:n.revalidation,component:p,error:m,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var XS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(XS||{}),ef=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}(ef||{});function iO(e){let t=g.useContext(lh);return t||tt(!1),t}function aO(e){let t=g.useContext(YS);return t||tt(!1),t}function lO(e){let t=g.useContext(Hs);return t||tt(!1),t}function QS(e){let t=lO(),n=t.matches[t.matches.length-1];return n.route.id||tt(!1),n.route.id}function cO(){var e;let t=g.useContext(GS),n=aO(ef.UseRouteError),r=QS(ef.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function uO(){let{router:e}=iO(XS.UseNavigateStable),t=QS(ef.UseNavigateStable),n=g.useRef(!1);return ZS(()=>{n.current=!0}),g.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Jd({fromRouteId:t},o)))},[e,t])}const $w={};function dO(e,t,n){$w[e]||($w[e]=!0)}function JS(e){let{to:t,replace:n,state:r,relative:s}=e;tl()||tt(!1);let{future:o,static:i}=g.useContext(Fo),{matches:l}=g.useContext(Hs),{pathname:c}=Ur(),u=sr(),d=ih(t,oh(l,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return g.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function rv(e){return JD(e.context)}function fO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Zt.Pop,navigator:o,static:i=!1,future:l}=e;tl()&&tt(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:o,static:i,future:Jd({v7_relativeSplatPath:!1},l)}),[c,l,o,i]);typeof r=="string"&&(r=Ws(r));let{pathname:d="/",search:f="",hash:h="",state:m=null,key:x="default"}=r,p=g.useMemo(()=>{let w=el(d,c);return w==null?null:{location:{pathname:w,search:f,hash:h,state:m,key:x},navigationType:s}},[c,d,f,h,m,x,s]);return p==null?null:g.createElement(Fo.Provider,{value:u},g.createElement(nv.Provider,{children:n,value:p}))}new Promise(()=>{});function hO(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:g.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:g.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 Sc(){return Sc=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},Sc.apply(this,arguments)}function mO(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 pO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function gO(e,t){return e.button===0&&(!t||t==="_self")&&!pO(e)}function mg(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 yO(e,t){let n=mg(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const vO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],xO="6";try{window.__reactRouterVersion=xO}catch{}function wO(e,t){return PD({basename:void 0,future:Sc({},void 0,{v7_prependBasename:!0}),history:eD({window:void 0}),hydrationData:bO(),routes:e,mapRouteProperties:hO,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function bO(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Sc({},t,{errors:_O(t.errors)})),t}function _O(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 Jy(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 SO=g.createContext({isTransitioning:!1}),kO=g.createContext(new Map),jO="startTransition",Uw=D_[jO],CO="flushSync",Vw=JA[CO];function EO(e){Uw?Uw(e):e()}function Cl(e){Vw?Vw(e):e()}class NO{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 TO(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=g.useState(n.state),[i,l]=g.useState(),[c,u]=g.useState({isTransitioning:!1}),[d,f]=g.useState(),[h,m]=g.useState(),[x,p]=g.useState(),w=g.useRef(new Map),{v7_startTransition:y}=r||{},v=g.useCallback(R=>{y?EO(R):R()},[y]),b=g.useCallback((R,A)=>{let{deletedFetchers:O,unstable_flushSync:G,unstable_viewTransitionOpts:N}=A;O.forEach(S=>w.current.delete(S)),R.fetchers.forEach((S,U)=>{S.data!==void 0&&w.current.set(U,S.data)});let z=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||z){G?Cl(()=>o(R)):v(()=>o(R));return}if(G){Cl(()=>{h&&(d&&d.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let S=n.window.document.startViewTransition(()=>{Cl(()=>o(R))});S.finished.finally(()=>{Cl(()=>{f(void 0),m(void 0),l(void 0),u({isTransitioning:!1})})}),Cl(()=>m(S));return}h?(d&&d.resolve(),h.skipTransition(),p({state:R,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(l(R),u({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,h,d,w,v]);g.useLayoutEffect(()=>n.subscribe(b),[n,b]),g.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new NO)},[c]),g.useEffect(()=>{if(d&&i&&n.window){let R=i,A=d.promise,O=n.window.document.startViewTransition(async()=>{v(()=>o(R)),await A});O.finished.finally(()=>{f(void 0),m(void 0),l(void 0),u({isTransitioning:!1})}),m(O)}},[v,i,d,n.window]),g.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,h,s.location,i]),g.useEffect(()=>{!c.isTransitioning&&x&&(l(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),p(void 0))},[c.isTransitioning,x]),g.useEffect(()=>{},[]);let _=g.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,A,O)=>n.navigate(R,{state:A,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(R,A,O)=>n.navigate(R,{replace:!0,state:A,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),j=n.basename||"/",C=g.useMemo(()=>({router:n,navigator:_,static:!1,basename:j}),[n,_,j]),T=g.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return g.createElement(g.Fragment,null,g.createElement(lh.Provider,{value:C},g.createElement(YS.Provider,{value:s},g.createElement(kO.Provider,{value:w.current},g.createElement(SO.Provider,{value:c},g.createElement(fO,{basename:j,location:s.location,navigationType:s.historyAction,navigator:_,future:T},s.initialized||n.future.v7_partialHydration?g.createElement(PO,{routes:n.routes,future:n.future,state:s}):t))))),null)}const PO=g.memo(RO);function RO(e){let{routes:t,future:n,state:r}=e;return eO(t,void 0,r,n)}const AO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",DO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wn=g.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,h=mO(t,vO),{basename:m}=g.useContext(Fo),x,p=!1;if(typeof u=="string"&&DO.test(u)&&(x=u,AO))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),j=el(_.pathname,m);_.origin===b.origin&&j!=null?u=j+_.search+_.hash:p=!0}catch{}let w=qD(u,{relative:s}),y=OO(u,{replace:i,state:l,target:c,preventScrollReset:d,relative:s,unstable_viewTransition:f});function v(b){r&&r(b),b.defaultPrevented||y(b)}return g.createElement("a",Sc({},h,{href:x||w,onClick:p||o?r:v,ref:n,target:c}))});var Bw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Bw||(Bw={}));var Ww;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ww||(Ww={}));function OO(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:l}=t===void 0?{}:t,c=sr(),u=Ur(),d=qS(e,{relative:i});return g.useCallback(f=>{if(gO(f,n)){f.preventDefault();let h=r!==void 0?r:pi(u)===pi(d);c(e,{replace:h,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:l})}},[u,c,d,r,s,n,e,o,i,l])}function IO(e){let t=g.useRef(mg(e)),n=g.useRef(!1),r=Ur(),s=g.useMemo(()=>yO(r.search,n.current?null:t.current),[r.search]),o=sr(),i=g.useCallback((l,c)=>{const u=mg(typeof l=="function"?l(s):l);n.current=!0,o("?"+u,c)},[o,s]);return[s,i]}var MO={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 LO=Vf(MO);var zO=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Hw(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(LO[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(zO),o=null;(o=s.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),l=[i,""];i.indexOf("=")>-1&&(l=i.split("=")),t.attrs[l[0]]=l[1],s.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var FO=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,$O=/^\s*$/,UO=Object.create(null);function ek(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(ek,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var VO={parse:function(e,t){t||(t={}),t.components||(t.components=UO);var n,r=[],s=[],o=-1,i=!1;if(e.indexOf("<")!==0){var l=e.indexOf("<");r.push({type:"text",content:l===-1?e:e.substring(0,l)})}return e.replace(FO,function(c,u){if(i){if(c!=="</"+n.name+">")return;i=!1}var d,f=c.charAt(1)!=="/",h=c.startsWith("<!--"),m=u+c.length,x=e.charAt(m);if(h){var p=Hw(c);return o<0?(r.push(p),r):((d=s[o]).children.push(p),r)}if(f&&(o++,(n=Hw(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(m,e.indexOf("<",m))}),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("<",m),y=e.slice(m,w===-1?void 0:w);$O.test(y)&&(y=" "),(w>-1&&o+d.length>=0||y!==" ")&&d.push({type:"text",content:y})}}),r},stringify:function(e){return e.reduce(function(t,n){return t+ek("",n)},"")}};const vd=(...e)=>{console!=null&&console.warn&&(hr(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},Kw={},tf=(...e)=>{hr(e[0])&&Kw[e[0]]||(hr(e[0])&&(Kw[e[0]]=new Date),vd(...e))},tk=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Yw=(e,t,n)=>{e.loadNamespaces(t,tk(e,n))},Gw=(e,t,n,r)=>{hr(n)&&(n=[n]),n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,tk(e,r))},BO=(e,t,n={})=>!t.languages||!t.languages.length?(tf("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}}),hr=e=>typeof e=="string",ha=e=>typeof e=="object"&&e!==null,WO=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,HO={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},KO=e=>HO[e],YO=e=>e.replace(WO,KO);let pg={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:YO};const GO=(e={})=>{pg={...pg,...e}},nk=()=>pg;let rk;const ZO=e=>{rk=e},sv=()=>rk,Bm=(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},Wm=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?ma(t):t},qO=e=>Array.isArray(e)&&e.every(g.isValidElement),ma=e=>Array.isArray(e)?e:[e],XO=(e,t)=>{const n={...t};return n.props=Object.assign(e.props,t.props),n},sk=(e,t)=>{if(!e)return"";let n="";const r=ma(e),s=t!=null&&t.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((o,i)=>{if(hr(o))n+=`${o}`;else if(g.isValidElement(o)){const{props:l,type:c}=o,u=Object.keys(l).length,d=s.indexOf(c)>-1,f=l.children;if(!f&&d&&!u)n+=`<${c}/>`;else if(!f&&(!d||u)||l.i18nIsDynamicList)n+=`<${i}></${i}>`;else if(d&&u===1&&hr(f))n+=`<${c}>${f}</${c}>`;else{const h=sk(f,t);n+=`<${i}>${h}</${i}>`}}else if(o===null)vd("Trans: the passed in value is invalid - seems you passed in a null child.");else if(ha(o)){const{format:l,...c}=o,u=Object.keys(c);if(u.length===1){const d=l?`${u[0]}, ${l}`:u[0];n+=`{{${d}}}`}else vd("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else vd("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},QO=(e,t,n,r,s,o)=>{if(t==="")return[];const i=r.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(i.map(w=>`<${w}`).join("|")).test(t);if(!e&&!l&&!o)return[t];const c={},u=w=>{ma(w).forEach(v=>{hr(v)||(Bm(v)?u(Wm(v)):ha(v)&&!g.isValidElement(v)&&Object.assign(c,v))})};u(e);const d=VO.parse(`<0>${t}</0>`),f={...c,...s},h=(w,y,v)=>{var j;const b=Wm(w),_=x(b,y.children,v);return qO(b)&&_.length===0||(j=w.props)!=null&&j.i18nIsDynamicList?b:_},m=(w,y,v,b,_)=>{w.dummy?(w.children=y,v.push(g.cloneElement(w,{key:b},_?void 0:y))):v.push(...g.Children.map([w],j=>{const C={...j.props};return delete C.i18nIsDynamicList,g.createElement(j.type,{...C,key:b,ref:j.ref},_?null:y)}))},x=(w,y,v)=>{const b=ma(w);return ma(y).reduce((j,C,T)=>{var A,O;const R=((O=(A=C.children)==null?void 0:A[0])==null?void 0:O.content)&&n.services.interpolator.interpolate(C.children[0].content,f,n.language);if(C.type==="tag"){let G=b[parseInt(C.name,10)];v.length===1&&!G&&(G=v[0][C.name]),G||(G={});const N=Object.keys(C.attrs).length!==0?XO({props:C.attrs},G):G,z=g.isValidElement(N),S=z&&Bm(C,!0)&&!C.voidElement,U=l&&ha(N)&&N.dummy&&!z,J=ha(e)&&Object.hasOwnProperty.call(e,C.name);if(hr(N)){const F=n.services.interpolator.interpolate(N,f,n.language);j.push(F)}else if(Bm(N)||S){const F=h(N,C,v);m(N,F,j,T)}else if(U){const F=x(b,C.children,v);m(N,F,j,T)}else if(Number.isNaN(parseFloat(C.name)))if(J){const F=h(N,C,v);m(N,F,j,T,C.voidElement)}else if(r.transSupportBasicHtmlNodes&&i.indexOf(C.name)>-1)if(C.voidElement)j.push(g.createElement(C.name,{key:`${C.name}-${T}`}));else{const F=x(b,C.children,v);j.push(g.createElement(C.name,{key:`${C.name}-${T}`},F))}else if(C.voidElement)j.push(`<${C.name} />`);else{const F=x(b,C.children,v);j.push(`<${C.name}>${F}</${C.name}>`)}else if(ha(N)&&!z){const F=C.children[0]?R:null;F&&j.push(F)}else m(N,R,j,T,C.children.length!==1||!R)}else if(C.type==="text"){const G=r.transWrapTextNodes,N=o?r.unescape(n.services.interpolator.interpolate(C.content,f,n.language)):n.services.interpolator.interpolate(C.content,f,n.language);G?j.push(g.createElement(G,{key:`${C.name}-${T}`},N)):j.push(N)}return j},[])},p=x([{dummy:!0,children:e||[]}],d,ma(e||[]));return Wm(p[0])};function JO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:l,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...m}){var G,N,z,S,U,J;const x=d||sv();if(!x)return tf("You will need to pass in an i18next instance by using i18nextReactModule"),e;const p=f||x.t.bind(x)||(F=>F),w={...nk(),...(G=x.options)==null?void 0:G.react};let y=u||p.ns||((N=x.options)==null?void 0:N.defaultNS);y=hr(y)?[y]:y||["translation"];const v=sk(e,w),b=l||v||w.transEmptyNodeValue||r,{hashTransKey:_}=w,j=r||(_?_(v||b):v||b);(S=(z=x.options)==null?void 0:z.interpolation)!=null&&S.defaultVariables&&(i=i&&Object.keys(i).length>0?{...i,...x.options.interpolation.defaultVariables}:{...x.options.interpolation.defaultVariables});const C=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,...C,defaultValue:b,ns:y},R=j?p(j,T):b;c&&Object.keys(c).forEach(F=>{const W=c[F];if(typeof W.type=="function"||!W.props||!W.props.children||R.indexOf(`${F}/>`)<0&&R.indexOf(`${F} />`)<0)return;function I(){return g.createElement(g.Fragment,null,W)}c[F]=g.createElement(I)});const A=QO(c||e,R,x,w,T,h),O=n??w.defaultTransParent;return O?g.createElement(O,m,A):A}const eI={type:"3rdParty",init(e){GO(e.options.react),ZO(e)}},ok=g.createContext();class tI{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{var r;(r=this.usedNamespaces)[n]??(r[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function nI({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:l,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...m}){var v;const{i18n:x,defaultNS:p}=g.useContext(ok)||{},w=d||x||sv(),y=f||(w==null?void 0:w.t.bind(w));return JO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o,values:i,defaults:l,components:c,ns:u||(y==null?void 0:y.ns)||p||((v=w==null?void 0:w.options)==null?void 0:v.defaultNS),i18n:w,t:f,shouldUnescape:h,...m})}const rI=(e,t)=>{const n=g.useRef();return g.useEffect(()=>{n.current=e},[e,t]),n.current},ik=(e,t,n,r)=>e.getFixedT(t,n,r),sI=(e,t,n,r)=>g.useCallback(ik(e,t,n,r),[e,t,n,r]),Ue=(e,t={})=>{var _,j,C,T;const{i18n:n}=t,{i18n:r,defaultNS:s}=g.useContext(ok)||{},o=n||r||sv();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new tI),!o){tf("You will need to pass in an i18next instance by using initReactI18next");const R=(O,G)=>hr(G)?G:ha(G)&&hr(G.defaultValue)?G.defaultValue:Array.isArray(O)?O[O.length-1]:O,A=[R,{},!1];return A.t=R,A.i18n={},A.ready=!1,A}(_=o.options.react)!=null&&_.wait&&tf("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...nk(),...o.options.react,...t},{useSuspense:l,keyPrefix:c}=i;let u=s||((j=o.options)==null?void 0:j.defaultNS);u=hr(u)?[u]:u||["translation"],(T=(C=o.reportNamespaces).addUsedNamespaces)==null||T.call(C,u);const d=(o.isInitialized||o.initializedStoreOnce)&&u.every(R=>BO(R,o,i)),f=sI(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),h=()=>f,m=()=>ik(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),[x,p]=g.useState(h);let w=u.join();t.lng&&(w=`${t.lng}${w}`);const y=rI(w),v=g.useRef(!0);g.useEffect(()=>{const{bindI18n:R,bindI18nStore:A}=i;v.current=!0,!d&&!l&&(t.lng?Gw(o,t.lng,u,()=>{v.current&&p(m)}):Yw(o,u,()=>{v.current&&p(m)})),d&&y&&y!==w&&v.current&&p(m);const O=()=>{v.current&&p(m)};return R&&(o==null||o.on(R,O)),A&&(o==null||o.store.on(A,O)),()=>{v.current=!1,o&&(R==null||R.split(" ").forEach(G=>o.off(G,O))),A&&o&&A.split(" ").forEach(G=>o.store.off(G,O))}},[o,w]),g.useEffect(()=>{v.current&&d&&p(h)},[o,c,d]);const b=[x,o,d];if(b.t=x,b.i18n=o,b.ready=d,d||!d&&!l)return b;throw new Promise(R=>{t.lng?Gw(o,t.lng,u,()=>R()):Yw(o,u,()=>R())})};/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ak=(...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 iI={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 aI=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...l},c)=>g.createElement("svg",{ref:c,...iI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ak("lucide",s),...l},[...i.map(([u,d])=>g.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 at=(e,t)=>{const n=g.forwardRef(({className:r,...s},o)=>g.createElement(aI,{ref:o,iconNode:t,className:ak(`lucide-${oI(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 lI=at("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 cI=at("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 uI=at("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 lk=at("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 ov=at("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 ck=at("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 dI=at("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 fI=at("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
* @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 hI=at("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 mI=at("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 Zw=at("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 uk=at("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 gg=at("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 pI=at("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 qw=at("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 Xw=at("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 Qw=at("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 gI=at("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 yI=at("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 vI=at("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 xI=at("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 wI=at("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 bI=at("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 _I=at("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 gi=at("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 Jw=at("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 SI=at("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 dk=at("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 iv=at("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @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 kI=at("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 jI=at("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 av=at("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @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 CI=at("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 lv=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function EI(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ch(...e){return t=>e.forEach(n=>EI(n,t))}function Ye(...e){return g.useCallback(ch(...e),e)}var ss=g.forwardRef((e,t)=>{const{children:n,...r}=e,s=g.Children.toArray(n),o=s.find(NI);if(o){const i=o.props.children,l=s.map(c=>c===o?g.Children.count(i)>1?g.Children.only(null):g.isValidElement(i)?i.props.children:null:c);return a.jsx(yg,{...r,ref:t,children:g.isValidElement(i)?g.cloneElement(i,void 0,l):null})}return a.jsx(yg,{...r,ref:t,children:n})});ss.displayName="Slot";var yg=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const s=PI(n);return g.cloneElement(n,{...TI(r,n.props),ref:t?ch(t,s):s})}return g.Children.count(n)>1?g.Children.only(null):null});yg.displayName="SlotClone";var cv=({children:e})=>a.jsx(a.Fragment,{children:e});function NI(e){return g.isValidElement(e)&&e.type===cv}function TI(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]=(...l)=>{o(...l),s(...l)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function PI(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 fk(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=fk(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function RI(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=fk(e))&&(r&&(r+=" "),r+=t);return r}const eb=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,tb=RI,eu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return tb(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=eb(d)||eb(f);return s[u][h]}),l=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,...m}=d;return Object.entries(m).every(x=>{let[p,w]=x;return Array.isArray(w)?w.includes({...o,...l}[p]):{...o,...l}[p]===w})?[...u,f,h]:u},[]);return tb(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)};function hk(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=hk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function AI(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=hk(e))&&(r&&(r+=" "),r+=t);return r}const uv="-";function DI(e){const t=II(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(i){const l=i.split(uv);return l[0]===""&&l.length!==1&&l.shift(),mk(l,t)||OI(i)}function o(i,l){const c=n[i]||[];return l&&r[i]?[...c,...r[i]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function mk(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?mk(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(uv);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId}const nb=/^\[(.+)\]$/;function OI(e){if(nb.test(e)){const t=nb.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function II(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return LI(Object.entries(e.classGroups),n).forEach(([o,i])=>{vg(i,r,o,t)}),r}function vg(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:rb(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(MI(s)){vg(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{vg(i,rb(t,o),n,r)})})}function rb(e,t){let n=e;return t.split(uv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function MI(e){return e.isThemeGetter}function LI(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,l])=>[t+i,l])):o);return[n,s]}):e}function zI(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 pk="!";function FI(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length;function i(l){const c=[];let u=0,d=0,f;for(let w=0;w<l.length;w++){let y=l[w];if(u===0){if(y===s&&(r||l.slice(w,w+o)===t)){c.push(l.slice(d,w)),d=w+o;continue}if(y==="/"){f=w;continue}}y==="["?u++:y==="]"&&u--}const h=c.length===0?l:l.substring(d),m=h.startsWith(pk),x=m?h.substring(1):h,p=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:p}}return n?function(c){return n({className:c,parseClassName:i})}:i}function $I(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 UI(e){return{cache:zI(e.cacheSize),parseClassName:FI(e),...DI(e)}}const VI=/\s+/;function BI(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(VI).map(i=>{const{modifiers:l,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 m=$I(l).join(":");return{isTailwindClass:!0,modifierId:c?m+pk:m,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:l,classGroupId:c,hasPostfixModifier:u}=i,d=l+c;return o.has(d)?!1:(o.add(d),s(c,u).forEach(f=>o.add(l+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function WI(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gk(t))&&(r&&(r+=" "),r+=n);return r}function gk(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=gk(e[r]))&&(n&&(n+=" "),n+=t);return n}function HI(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((d,f)=>f(d),e());return n=UI(u),r=n.cache.get,s=n.cache.set,o=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=BI(c,n);return s(c,d),d}return function(){return o(WI.apply(null,arguments))}}function St(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const yk=/^\[(?:([a-z-]+):)?(.+)\]$/i,KI=/^\d+\/\d+$/,YI=new Set(["px","full","screen"]),GI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ZI=/\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$/,qI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,XI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function ys(e){return Qo(e)||YI.has(e)||KI.test(e)}function eo(e){return nl(e,"length",iM)}function Qo(e){return!!e&&!Number.isNaN(Number(e))}function Bu(e){return nl(e,"number",Qo)}function El(e){return!!e&&Number.isInteger(Number(e))}function JI(e){return e.endsWith("%")&&Qo(e.slice(0,-1))}function Xe(e){return yk.test(e)}function to(e){return GI.test(e)}const eM=new Set(["length","size","percentage"]);function tM(e){return nl(e,eM,vk)}function nM(e){return nl(e,"position",vk)}const rM=new Set(["image","url"]);function sM(e){return nl(e,rM,lM)}function oM(e){return nl(e,"",aM)}function Nl(){return!0}function nl(e,t,n){const r=yk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function iM(e){return ZI.test(e)&&!qI.test(e)}function vk(){return!1}function aM(e){return XI.test(e)}function lM(e){return QI.test(e)}function cM(){const e=St("colors"),t=St("spacing"),n=St("blur"),r=St("brightness"),s=St("borderColor"),o=St("borderRadius"),i=St("borderSpacing"),l=St("borderWidth"),c=St("contrast"),u=St("grayscale"),d=St("hueRotate"),f=St("invert"),h=St("gap"),m=St("gradientColorStops"),x=St("gradientColorStopPositions"),p=St("inset"),w=St("margin"),y=St("opacity"),v=St("padding"),b=St("saturate"),_=St("scale"),j=St("sepia"),C=St("skew"),T=St("space"),R=St("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",Xe,t],N=()=>[Xe,t],z=()=>["",ys,eo],S=()=>["auto",Qo,Xe],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],F=()=>["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",Xe],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Qo,Bu],B=()=>[Qo,Xe];return{cacheSize:500,separator:":",theme:{colors:[Nl],spacing:[ys,eo],blur:["none","",to,Xe],brightness:$(),borderColor:[e],borderRadius:["none","","full",to,Xe],borderSpacing:N(),borderWidth:z(),contrast:$(),grayscale:I(),hueRotate:B(),invert:I(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[JI,eo],inset:G(),margin:G(),opacity:$(),padding:N(),saturate:$(),scale:$(),sepia:I(),skew:B(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Xe]}],container:["container"],columns:[{columns:[to]}],"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(),Xe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",El,Xe]}],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",Xe]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",El,Xe]}],"grid-cols":[{"grid-cols":[Nl]}],"col-start-end":[{col:["auto",{span:["full",El,Xe]},Xe]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Nl]}],"row-start-end":[{row:["auto",{span:[El,Xe]},Xe]}],"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",Xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xe]}],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:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],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",Xe,t]}],"min-w":[{"min-w":[Xe,t,"min","max","fit"]}],"max-w":[{"max-w":[Xe,t,"none","full","min","max","fit","prose",{screen:[to]},to]}],h:[{h:[Xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",to,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bu]}],"font-family":[{font:[Nl]}],"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",Xe]}],"line-clamp":[{"line-clamp":["none",Qo,Bu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ys,Xe]}],"list-image":[{"list-image":["none",Xe]}],"list-style-type":[{list:["none","disc","decimal",Xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ys,eo]}],"underline-offset":[{"underline-offset":["auto",ys,Xe]}],"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",Xe]}],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",Xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),nM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"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":[ys,Xe]}],"outline-w":[{outline:[ys,eo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ys,eo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",to,oM]}],"shadow-color":[{shadow:[Nl]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",to,Xe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[j]}],"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":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"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",Xe]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Xe]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[El,Xe]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xe]}],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",Xe]}],"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",Xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ys,eo,Bu]}],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 uM=HI(cM);function se(...e){return uM(AI(e))}const uh=eu("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"}}),Re=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?ss:"button";return a.jsx(i,{className:se(uh({variant:t,size:n,className:e})),ref:o,...s})});Re.displayName="Button";function ge(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 dM(e,t){const n=g.createContext(t);function r(o){const{children:i,...l}=o,c=g.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:i})}function s(o){const i=g.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 un(e,t=[]){let n=[];function r(o,i){const l=g.createContext(i),c=n.length;n=[...n,i];function u(f){const{scope:h,children:m,...x}=f,p=(h==null?void 0:h[e][c])||l,w=g.useMemo(()=>x,Object.values(x));return a.jsx(p.Provider,{value:w,children:m})}function d(f,h){const m=(h==null?void 0:h[e][c])||l,x=g.useContext(m);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=>g.createContext(i));return function(l){const c=(l==null?void 0:l[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,fM(s,...t)]}function fM(...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((l,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...l,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function It(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.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]=hM({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,l=It(n),c=g.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&l(f)}else s(u)},[o,e,s,l]);return[i,c]}function hM({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,s=g.useRef(r),o=It(t);return g.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var mM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Te=mM.reduce((e,t)=>{const n=g.forwardRef((r,s)=>{const{asChild:o,...i}=r,l=o?ss:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(l,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function dv(e,t){e&&Bs.flushSync(()=>e.dispatchEvent(t))}function tu(e){const t=e+"CollectionProvider",[n,r]=un(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:x,children:p}=m,w=He.useRef(null),y=He.useRef(new Map).current;return a.jsx(s,{scope:x,itemMap:y,collectionRef:w,children:p})};i.displayName=t;const l=e+"CollectionSlot",c=He.forwardRef((m,x)=>{const{scope:p,children:w}=m,y=o(l,p),v=Ye(x,y.collectionRef);return a.jsx(ss,{ref:v,children:w})});c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=He.forwardRef((m,x)=>{const{scope:p,children:w,...y}=m,v=He.useRef(null),b=Ye(x,v),_=o(u,p);return He.useEffect(()=>(_.itemMap.set(v,{ref:v,...y}),()=>void _.itemMap.delete(v))),a.jsx(ss,{[d]:"",ref:b,children:w})});f.displayName=u;function h(m){const x=o(e+"CollectionConsumer",m);return He.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const y=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,j)=>y.indexOf(_.ref.current)-y.indexOf(j.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},h,r]}var pM=g.createContext(void 0);function Ci(e){const t=g.useContext(pM);return e||t||"ltr"}function gM(e,t=globalThis==null?void 0:globalThis.document){const n=It(e);g.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 yM="DismissableLayer",xg="dismissableLayer.update",vM="dismissableLayer.pointerDownOutside",xM="dismissableLayer.focusOutside",sb,xk=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rl=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:l,...c}=e,u=g.useContext(xk),[d,f]=g.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),x=Ye(t,T=>f(T)),p=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(w),v=d?p.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=v>=y,j=bM(T=>{const R=T.target,A=[...u.branches].some(O=>O.contains(R));!_||A||(s==null||s(T),i==null||i(T),T.defaultPrevented||l==null||l())},h),C=_M(T=>{const R=T.target;[...u.branches].some(O=>O.contains(R))||(o==null||o(T),i==null||i(T),T.defaultPrevented||l==null||l())},h);return gM(T=>{v===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sb=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ob(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=sb)}},[d,h,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ob())},[d,u]),g.useEffect(()=>{const T=()=>m({});return document.addEventListener(xg,T),()=>document.removeEventListener(xg,T)},[]),a.jsx(Te.div,{...c,ref:x,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:ge(e.onFocusCapture,C.onFocusCapture),onBlurCapture:ge(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ge(e.onPointerDownCapture,j.onPointerDownCapture)})});rl.displayName=yM;var wM="DismissableLayerBranch",wk=g.forwardRef((e,t)=>{const n=g.useContext(xk),r=g.useRef(null),s=Ye(t,r);return g.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),a.jsx(Te.div,{...e,ref:s})});wk.displayName=wM;function bM(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=g.useRef(!1),s=g.useRef(()=>{});return g.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let c=function(){bk(vM,n,u,{discrete:!0})};const u={originalEvent:l};l.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 _M(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=g.useRef(!1);return g.useEffect(()=>{const s=o=>{o.target&&!r.current&&bk(xM,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 ob(){const e=new CustomEvent(xg);document.dispatchEvent(e)}function bk(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?dv(s,o):s.dispatchEvent(o)}var SM=rl,kM=wk,Hm=0;function fv(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ib()),document.body.insertAdjacentElement("beforeend",e[1]??ib()),Hm++,()=>{Hm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hm--}},[])}function ib(){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 Km="focusScope.autoFocusOnMount",Ym="focusScope.autoFocusOnUnmount",ab={bubbles:!1,cancelable:!0},jM="FocusScope",dh=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[l,c]=g.useState(null),u=It(s),d=It(o),f=g.useRef(null),h=Ye(t,p=>c(p)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(b){if(m.paused||!l)return;const _=b.target;l.contains(_)?f.current=_:ro(f.current,{select:!0})},w=function(b){if(m.paused||!l)return;const _=b.relatedTarget;_!==null&&(l.contains(_)||ro(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const j of b)j.removedNodes.length>0&&ro(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",w);const v=new MutationObserver(y);return l&&v.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",w),v.disconnect()}}},[r,l,m.paused]),g.useEffect(()=>{if(l){cb.add(m);const p=document.activeElement;if(!l.contains(p)){const y=new CustomEvent(Km,ab);l.addEventListener(Km,u),l.dispatchEvent(y),y.defaultPrevented||(CM(RM(_k(l)),{select:!0}),document.activeElement===p&&ro(l))}return()=>{l.removeEventListener(Km,u),setTimeout(()=>{const y=new CustomEvent(Ym,ab);l.addEventListener(Ym,d),l.dispatchEvent(y),y.defaultPrevented||ro(p??document.body,{select:!0}),l.removeEventListener(Ym,d),cb.remove(m)},0)}}},[l,u,d,m]);const x=g.useCallback(p=>{if(!n&&!r||m.paused)return;const w=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(w&&y){const v=p.currentTarget,[b,_]=EM(v);b&&_?!p.shiftKey&&y===_?(p.preventDefault(),n&&ro(b,{select:!0})):p.shiftKey&&y===b&&(p.preventDefault(),n&&ro(_,{select:!0})):y===v&&p.preventDefault()}},[n,r,m.paused]);return a.jsx(Te.div,{tabIndex:-1,...i,ref:h,onKeyDown:x})});dh.displayName=jM;function CM(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ro(r,{select:t}),document.activeElement!==n)return}function EM(e){const t=_k(e),n=lb(t,e),r=lb(t.reverse(),e);return[n,r]}function _k(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 lb(e,t){for(const n of e)if(!NM(n,{upTo:t}))return n}function NM(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 TM(e){return e instanceof HTMLInputElement&&"select"in e}function ro(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&TM(e)&&t&&e.select()}}var cb=PM();function PM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ub(e,t),e.unshift(t)},remove(t){var n;e=ub(e,t),(n=e[0])==null||n.resume()}}}function ub(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function RM(e){return e.filter(t=>t.tagName!=="A")}var Bt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},AM=D_.useId||(()=>{}),DM=0;function Ln(e){const[t,n]=g.useState(AM());return Bt(()=>{e||n(r=>r??String(DM++))},[e]),e||(t?`radix-${t}`:"")}const OM=["top","right","bottom","left"],Qr=Math.min,Yn=Math.max,nf=Math.round,Wu=Math.floor,No=e=>({x:e,y:e}),IM={left:"right",right:"left",bottom:"top",top:"bottom"},MM={start:"end",end:"start"};function wg(e,t,n){return Yn(e,Qr(t,n))}function zs(e,t){return typeof e=="function"?e(t):e}function Fs(e){return e.split("-")[0]}function sl(e){return e.split("-")[1]}function hv(e){return e==="x"?"y":"x"}function mv(e){return e==="y"?"height":"width"}function To(e){return["top","bottom"].includes(Fs(e))?"y":"x"}function pv(e){return hv(To(e))}function LM(e,t,n){n===void 0&&(n=!1);const r=sl(e),s=pv(e),o=mv(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=rf(i)),[i,rf(i)]}function zM(e){const t=rf(e);return[bg(e),t,bg(t)]}function bg(e){return e.replace(/start|end/g,t=>MM[t])}function FM(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 $M(e,t,n,r){const s=sl(e);let o=FM(Fs(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(bg)))),o}function rf(e){return e.replace(/left|right|bottom|top/g,t=>IM[t])}function UM(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sk(e){return typeof e!="number"?UM(e):{top:e,right:e,bottom:e,left:e}}function sf(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 db(e,t,n){let{reference:r,floating:s}=e;const o=To(t),i=pv(t),l=mv(i),c=Fs(t),u=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,h=r[l]/2-s[l]/2;let m;switch(c){case"top":m={x:d,y:r.y-s.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-s.width,y:f};break;default:m={x:r.x,y:r.y}}switch(sl(t)){case"start":m[i]-=h*(n&&u?-1:1);break;case"end":m[i]+=h*(n&&u?-1:1);break}return m}const VM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,l=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}=db(u,r,c),h=r,m={},x=0;for(let p=0;p<l.length;p++){const{name:w,fn:y}=l[p],{x:v,y:b,data:_,reset:j}=await y({x:d,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});d=v??d,f=b??f,m={...m,[w]:{...m[w],..._}},j&&x<=50&&(x++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(u=j.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:d,y:f}=db(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:s,middlewareData:m}};async function kc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=zs(t,e),x=Sk(m),w=l[h?f==="floating"?"reference":"floating":f],y=sf(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(l.floating)),boundary:u,rootBoundary:d,strategy:c})),v=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(l.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},j=sf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:c}):v);return{top:(y.top-j.top+x.top)/_.y,bottom:(j.bottom-y.bottom+x.bottom)/_.y,left:(y.left-j.left+x.left)/_.x,right:(j.right-y.right+x.right)/_.x}}const BM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=zs(e,t)||{};if(u==null)return{};const f=Sk(d),h={x:n,y:r},m=pv(s),x=mv(m),p=await i.getDimensions(u),w=m==="y",y=w?"top":"left",v=w?"bottom":"right",b=w?"clientHeight":"clientWidth",_=o.reference[x]+o.reference[m]-h[m]-o.floating[x],j=h[m]-o.reference[m],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=C?C[b]:0;(!T||!await(i.isElement==null?void 0:i.isElement(C)))&&(T=l.floating[b]||o.floating[x]);const R=_/2-j/2,A=T/2-p[x]/2-1,O=Qr(f[y],A),G=Qr(f[v],A),N=O,z=T-p[x]-G,S=T/2-p[x]/2+R,U=wg(N,S,z),J=!c.arrow&&sl(s)!=null&&S!==U&&o.reference[x]/2-(S<N?O:G)-p[x]/2<0,F=J?S<N?S-N:S-z:0;return{[m]:h[m]+F,data:{[m]:U,centerOffset:S-U-F,...J&&{alignmentOffset:F}},reset:J}}}),WM=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:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:p=!0,...w}=zs(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Fs(s),v=To(l),b=Fs(l)===l,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=h||(b||!p?[rf(l)]:zM(l)),C=x!=="none";!h&&C&&j.push(...$M(l,p,x,_));const T=[l,...j],R=await kc(t,w),A=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&A.push(R[y]),f){const S=LM(s,i,_);A.push(R[S[0]],R[S[1]])}if(O=[...O,{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:O},reset:{placement:U}};let J=(N=O.filter(F=>F.overflows[0]<=0).sort((F,W)=>F.overflows[1]-W.overflows[1])[0])==null?void 0:N.placement;if(!J)switch(m){case"bestFit":{var z;const F=(z=O.filter(W=>{if(C){const I=To(W.placement);return I===v||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:z[0];F&&(J=F);break}case"initialPlacement":J=l;break}if(s!==J)return{reset:{placement:J}}}return{}}}};function fb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hb(e){return OM.some(t=>e[t]>=0)}const HM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=zs(e,t);switch(r){case"referenceHidden":{const o=await kc(t,{...s,elementContext:"reference"}),i=fb(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:hb(i)}}}case"escaped":{const o=await kc(t,{...s,altBoundary:!0}),i=fb(o,n.floating);return{data:{escapedOffsets:i,escaped:hb(i)}}}default:return{}}}}};async function KM(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Fs(n),l=sl(n),c=To(n)==="y",u=["left","top"].includes(i)?-1:1,d=o&&c?-1:1,f=zs(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof x=="number"&&(m=l==="end"?x*-1:x),c?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const YM=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:l}=t,c=await KM(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},GM=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:l={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...c}=zs(e,t),u={x:n,y:r},d=await kc(t,c),f=To(Fs(s)),h=hv(f);let m=u[h],x=u[f];if(o){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=m+d[w],b=m-d[y];m=wg(v,m,b)}if(i){const w=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=x+d[w],b=x-d[y];x=wg(v,x,b)}const p=l.fn({...t,[h]:m,[f]:x});return{...p,data:{x:p.x-n,y:p.y-r}}}}},ZM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=zs(e,t),d={x:n,y:r},f=To(s),h=hv(f);let m=d[h],x=d[f];const p=zs(l,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const b=h==="y"?"height":"width",_=o.reference[h]-o.floating[b]+w.mainAxis,j=o.reference[h]+o.reference[b]-w.mainAxis;m<_?m=_:m>j&&(m=j)}if(u){var y,v;const b=h==="y"?"width":"height",_=["top","left"].includes(Fs(s)),j=o.reference[f]-o.floating[b]+(_&&((y=i.offset)==null?void 0:y[f])||0)+(_?0:w.crossAxis),C=o.reference[f]+o.reference[b]+(_?0:((v=i.offset)==null?void 0:v[f])||0)-(_?w.crossAxis:0);x<j?x=j:x>C&&(x=C)}return{[h]:m,[f]:x}}}},qM=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=()=>{},...l}=zs(e,t),c=await kc(t,l),u=Fs(n),d=sl(n),f=To(n)==="y",{width:h,height:m}=r.floating;let x,p;u==="top"||u==="bottom"?(x=u,p=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(p=u,x=d==="end"?"top":"bottom");const w=m-c.top-c.bottom,y=h-c.left-c.right,v=Qr(m-c[x],w),b=Qr(h-c[p],y),_=!t.middlewareData.shift;let j=v,C=b;if(f?C=d||_?Qr(b,y):y:j=d||_?Qr(v,w):w,_&&!d){const R=Yn(c.left,0),A=Yn(c.right,0),O=Yn(c.top,0),G=Yn(c.bottom,0);f?C=h-2*(R!==0||A!==0?R+A:Yn(c.left,c.right)):j=m-2*(O!==0||G!==0?O+G:Yn(c.top,c.bottom))}await i({...t,availableWidth:C,availableHeight:j});const T=await s.getDimensions(o.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function ol(e){return kk(e)?(e.nodeName||"").toLowerCase():"#document"}function qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ks(e){var t;return(t=(kk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kk(e){return e instanceof Node||e instanceof qn(e).Node}function Mr(e){return e instanceof Element||e instanceof qn(e).Element}function os(e){return e instanceof HTMLElement||e instanceof qn(e).HTMLElement}function mb(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qn(e).ShadowRoot}function nu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function XM(e){return["table","td","th"].includes(ol(e))}function fh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gv(e){const t=yv(),n=Mr(e)?Lr(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 QM(e){let t=Po(e);for(;os(t)&&!Ua(t);){if(gv(t))return t;if(fh(t))return null;t=Po(t)}return null}function yv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ua(e){return["html","body","#document"].includes(ol(e))}function Lr(e){return qn(e).getComputedStyle(e)}function hh(e){return Mr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Po(e){if(ol(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mb(e)&&e.host||Ks(e);return mb(t)?t.host:t}function jk(e){const t=Po(e);return Ua(t)?e.ownerDocument?e.ownerDocument.body:e.body:os(t)&&nu(t)?t:jk(t)}function jc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=jk(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=qn(s);return o?t.concat(i,i.visualViewport||[],nu(s)?s:[],i.frameElement&&n?jc(i.frameElement):[]):t.concat(s,jc(s,[],n))}function Ck(e){const t=Lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=os(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,l=nf(n)!==o||nf(r)!==i;return l&&(n=o,r=i),{width:n,height:r,$:l}}function vv(e){return Mr(e)?e:e.contextElement}function ja(e){const t=vv(e);if(!os(t))return No(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=Ck(t);let i=(o?nf(n.width):n.width)/r,l=(o?nf(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const JM=No(0);function Ek(e){const t=qn(e);return!yv()||!t.visualViewport?JM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function eL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qn(e)?!1:t}function yi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=vv(e);let i=No(1);t&&(r?Mr(r)&&(i=ja(r)):i=ja(e));const l=eL(o,n,r)?Ek(o):No(0);let c=(s.left+l.x)/i.x,u=(s.top+l.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const h=qn(o),m=r&&Mr(r)?qn(r):r;let x=h,p=x.frameElement;for(;p&&r&&m!==x;){const w=ja(p),y=p.getBoundingClientRect(),v=Lr(p),b=y.left+(p.clientLeft+parseFloat(v.paddingLeft))*w.x,_=y.top+(p.clientTop+parseFloat(v.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,f*=w.y,c+=b,u+=_,x=qn(p),p=x.frameElement}}return sf({width:d,height:f,x:c,y:u})}function tL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=Ks(r),l=t?fh(t.floating):!1;if(r===i||l&&o)return n;let c={scrollLeft:0,scrollTop:0},u=No(1);const d=No(0),f=os(r);if((f||!f&&!o)&&((ol(r)!=="body"||nu(i))&&(c=hh(r)),os(r))){const h=yi(r);u=ja(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 nL(e){return Array.from(e.getClientRects())}function Nk(e){return yi(Ks(e)).left+hh(e).scrollLeft}function rL(e){const t=Ks(e),n=hh(e),r=e.ownerDocument.body,s=Yn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Yn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Nk(e);const l=-n.scrollTop;return Lr(r).direction==="rtl"&&(i+=Yn(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:l}}function sL(e,t){const n=qn(e),r=Ks(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,l=0,c=0;if(s){o=s.width,i=s.height;const u=yv();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:l,y:c}}function oL(e,t){const n=yi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=os(e)?ja(e):No(1),i=e.clientWidth*o.x,l=e.clientHeight*o.y,c=s*o.x,u=r*o.y;return{width:i,height:l,x:c,y:u}}function pb(e,t,n){let r;if(t==="viewport")r=sL(e,n);else if(t==="document")r=rL(Ks(e));else if(Mr(t))r=oL(t,n);else{const s=Ek(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return sf(r)}function Tk(e,t){const n=Po(e);return n===t||!Mr(n)||Ua(n)?!1:Lr(n).position==="fixed"||Tk(n,t)}function iL(e,t){const n=t.get(e);if(n)return n;let r=jc(e,[],!1).filter(l=>Mr(l)&&ol(l)!=="body"),s=null;const o=Lr(e).position==="fixed";let i=o?Po(e):e;for(;Mr(i)&&!Ua(i);){const l=Lr(i),c=gv(i);!c&&l.position==="fixed"&&(s=null),(o?!c&&!s:!c&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||nu(i)&&!c&&Tk(e,i))?r=r.filter(d=>d!==i):s=l,i=Po(i)}return t.set(e,r),r}function aL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?fh(t)?[]:iL(t,this._c):[].concat(n),r],l=i[0],c=i.reduce((u,d)=>{const f=pb(t,d,s);return u.top=Yn(f.top,u.top),u.right=Qr(f.right,u.right),u.bottom=Qr(f.bottom,u.bottom),u.left=Yn(f.left,u.left),u},pb(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function lL(e){const{width:t,height:n}=Ck(e);return{width:t,height:n}}function cL(e,t,n){const r=os(t),s=Ks(t),o=n==="fixed",i=yi(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=No(0);if(r||!r&&!o)if((ol(t)!=="body"||nu(s))&&(l=hh(t)),r){const f=yi(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=Nk(s));const u=i.left+l.scrollLeft-c.x,d=i.top+l.scrollTop-c.y;return{x:u,y:d,width:i.width,height:i.height}}function Gm(e){return Lr(e).position==="static"}function gb(e,t){return!os(e)||Lr(e).position==="fixed"?null:t?t(e):e.offsetParent}function Pk(e,t){const n=qn(e);if(fh(e))return n;if(!os(e)){let s=Po(e);for(;s&&!Ua(s);){if(Mr(s)&&!Gm(s))return s;s=Po(s)}return n}let r=gb(e,t);for(;r&&XM(r)&&Gm(r);)r=gb(r,t);return r&&Ua(r)&&Gm(r)&&!gv(r)?n:r||QM(e)||n}const uL=async function(e){const t=this.getOffsetParent||Pk,n=this.getDimensions,r=await n(e.floating);return{reference:cL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dL(e){return Lr(e).direction==="rtl"}const fL={convertOffsetParentRelativeRectToViewportRelativeRect:tL,getDocumentElement:Ks,getClippingRect:aL,getOffsetParent:Pk,getElementRects:uL,getClientRects:nL,getDimensions:lL,getScale:ja,isElement:Mr,isRTL:dL};function hL(e,t){let n=null,r;const s=Ks(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(l||t(),!f||!h)return;const m=Wu(d),x=Wu(s.clientWidth-(u+f)),p=Wu(s.clientHeight-(d+h)),w=Wu(u),v={rootMargin:-m+"px "+-x+"px "+-p+"px "+-w+"px",threshold:Yn(0,Qr(1,c))||1};let b=!0;function _(j){const C=j[0].intersectionRatio;if(C!==c){if(!b)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return i(!0),o}function mL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=vv(e),d=s||o?[...u?jc(u):[],...jc(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&l?hL(u,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let x,p=c?yi(e):null;c&&w();function w(){const y=yi(e);p&&(y.x!==p.x||y.y!==p.y||y.width!==p.width||y.height!==p.height)&&n(),p=y,x=requestAnimationFrame(w)}return n(),()=>{var y;d.forEach(v=>{s&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),f==null||f(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(x)}}const pL=YM,gL=GM,yL=WM,vL=qM,xL=HM,yb=BM,wL=ZM,bL=(e,t,n)=>{const r=new Map,s={platform:fL,...n},o={...s.platform,_c:r};return VM(e,t,{...s,platform:o})};var xd=typeof document<"u"?g.useLayoutEffect:g.useEffect;function of(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(!of(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)&&!of(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Rk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vb(e,t){const n=Rk(e);return Math.round(t*n)/n}function xb(e){const t=g.useRef(e);return xd(()=>{t.current=e}),t}function _L(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=g.useState(r);of(h,r)||m(r);const[x,p]=g.useState(null),[w,y]=g.useState(null),v=g.useCallback(F=>{F!==C.current&&(C.current=F,p(F))},[]),b=g.useCallback(F=>{F!==T.current&&(T.current=F,y(F))},[]),_=o||x,j=i||w,C=g.useRef(null),T=g.useRef(null),R=g.useRef(d),A=c!=null,O=xb(c),G=xb(s),N=g.useCallback(()=>{if(!C.current||!T.current)return;const F={placement:t,strategy:n,middleware:h};G.current&&(F.platform=G.current),bL(C.current,T.current,F).then(W=>{const I={...W,isPositioned:!0};z.current&&!of(R.current,I)&&(R.current=I,Bs.flushSync(()=>{f(I)}))})},[h,t,n,G]);xd(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[u]);const z=g.useRef(!1);xd(()=>(z.current=!0,()=>{z.current=!1}),[]),xd(()=>{if(_&&(C.current=_),j&&(T.current=j),_&&j){if(O.current)return O.current(_,j,N);N()}},[_,j,N,O,A]);const S=g.useMemo(()=>({reference:C,floating:T,setReference:v,setFloating:b}),[v,b]),U=g.useMemo(()=>({reference:_,floating:j}),[_,j]),J=g.useMemo(()=>{const F={position:n,left:0,top:0};if(!U.floating)return F;const W=vb(U.floating,d.x),I=vb(U.floating,d.y);return l?{...F,transform:"translate("+W+"px, "+I+"px)",...Rk(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,l,U.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:N,refs:S,elements:U,floatingStyles:J}),[d,N,S,U,J])}const SL=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?yb({element:r.current,padding:s}).fn(n):{}:r?yb({element:r,padding:s}).fn(n):{}}}},kL=(e,t)=>({...pL(e),options:[e,t]}),jL=(e,t)=>({...gL(e),options:[e,t]}),CL=(e,t)=>({...wL(e),options:[e,t]}),EL=(e,t)=>({...yL(e),options:[e,t]}),NL=(e,t)=>({...vL(e),options:[e,t]}),TL=(e,t)=>({...xL(e),options:[e,t]}),PL=(e,t)=>({...SL(e),options:[e,t]});var RL="Arrow",Ak=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return a.jsx(Te.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ak.displayName=RL;var AL=Ak;function xv(e){const[t,n]=g.useState(void 0);return Bt(()=>{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,l;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var wv="Popper",[Dk,il]=un(wv),[DL,Ok]=Dk(wv),Ik=e=>{const{__scopePopper:t,children:n}=e,[r,s]=g.useState(null);return a.jsx(DL,{scope:t,anchor:r,onAnchorChange:s,children:n})};Ik.displayName=wv;var Mk="PopperAnchor",Lk=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=Ok(Mk,n),i=g.useRef(null),l=Ye(t,i);return g.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:a.jsx(Te.div,{...s,ref:l})});Lk.displayName=Mk;var bv="PopperContent",[OL,IL]=Dk(bv),zk=g.forwardRef((e,t)=>{var we,ke,Pe,Fe,Me,Ae;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:x,...p}=e,w=Ok(bv,n),[y,v]=g.useState(null),b=Ye(t,st=>v(st)),[_,j]=g.useState(null),C=xv(_),T=(C==null?void 0:C.width)??0,R=(C==null?void 0:C.height)??0,A=r+(o!=="center"?"-"+o:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(u)?u:[u],N=G.length>0,z={padding:O,boundary:G.filter(LL),altBoundary:N},{refs:S,floatingStyles:U,placement:J,isPositioned:F,middlewareData:W}=_L({strategy:"fixed",placement:A,whileElementsMounted:(...st)=>mL(...st,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[kL({mainAxis:s+R,alignmentAxis:i}),c&&jL({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?CL():void 0,...z}),c&&EL({...z}),NL({...z,apply:({elements:st,rects:E,availableWidth:ee,availableHeight:Z})=>{const{width:D,height:k}=E.reference,P=st.floating.style;P.setProperty("--radix-popper-available-width",`${ee}px`),P.setProperty("--radix-popper-available-height",`${Z}px`),P.setProperty("--radix-popper-anchor-width",`${D}px`),P.setProperty("--radix-popper-anchor-height",`${k}px`)}}),_&&PL({element:_,padding:l}),zL({arrowWidth:T,arrowHeight:R}),h&&TL({strategy:"referenceHidden",...z})]}),[I,X]=Uk(J),$=It(x);Bt(()=>{F&&($==null||$())},[F,$]);const B=(we=W.arrow)==null?void 0:we.x,xe=(ke=W.arrow)==null?void 0:ke.y,ie=((Pe=W.arrow)==null?void 0:Pe.centerOffset)!==0,[ae,Ie]=g.useState();return Bt(()=>{y&&Ie(window.getComputedStyle(y).zIndex)},[y]),a.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:F?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Fe=W.transformOrigin)==null?void 0:Fe.x,(Me=W.transformOrigin)==null?void 0:Me.y].join(" "),...((Ae=W.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(OL,{scope:n,placedSide:I,onArrowChange:j,arrowX:B,arrowY:xe,shouldHideArrow:ie,children:a.jsx(Te.div,{"data-side":I,"data-align":X,...p,ref:b,style:{...p.style,animation:F?void 0:"none"}})})})});zk.displayName=bv;var Fk="PopperArrow",ML={top:"bottom",right:"left",bottom:"top",left:"right"},$k=g.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=IL(Fk,r),i=ML[o.placedSide];return a.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:a.jsx(AL,{...s,ref:n,style:{...s.style,display:"block"}})})});$k.displayName=Fk;function LL(e){return e!==null}var zL=e=>({name:"transformOrigin",options:e,fn(t){var w,y,v;const{placement:n,rects:r,middlewareData:s}=t,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Uk(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((y=s.arrow)==null?void 0:y.x)??0)+l/2,m=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let x="",p="";return u==="bottom"?(x=i?f:`${h}px`,p=`${-c}px`):u==="top"?(x=i?f:`${h}px`,p=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,p=i?f:`${m}px`):u==="left"&&(x=`${r.floating.width+c}px`,p=i?f:`${m}px`),{data:{x,y:p}}}});function Uk(e){const[t,n="center"]=e.split("-");return[t,n]}var _v=Ik,Sv=Lk,kv=zk,jv=$k,FL="Portal",ru=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,o]=g.useState(!1);Bt(()=>o(!0),[]);const i=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?MS.createPortal(a.jsx(Te.div,{...r,ref:t}),i):null});ru.displayName=FL;function $L(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var dn=e=>{const{present:t,children:n}=e,r=UL(t),s=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),o=Ye(r.ref,VL(s));return typeof n=="function"||r.isPresent?g.cloneElement(s,{ref:o}):null};dn.displayName="Presence";function UL(e){const[t,n]=g.useState(),r=g.useRef({}),s=g.useRef(e),o=g.useRef("none"),i=e?"mounted":"unmounted",[l,c]=$L(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=Hu(r.current);o.current=l==="mounted"?u:"none"},[l]),Bt(()=>{const u=r.current,d=s.current;if(d!==e){const h=o.current,m=Hu(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Bt(()=>{if(t){const u=f=>{const m=Hu(r.current).includes(f.animationName);f.target===t&&m&&Bs.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Hu(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(l),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Hu(e){return(e==null?void 0:e.animationName)||"none"}function VL(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 Zm="rovingFocusGroup.onEntryFocus",BL={bubbles:!1,cancelable:!0},mh="RovingFocusGroup",[_g,Vk,WL]=tu(mh),[HL,al]=un(mh,[WL]),[KL,YL]=HL(mh),Bk=g.forwardRef((e,t)=>a.jsx(_g.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(_g.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(GL,{...e,ref:t})})}));Bk.displayName=mh;var GL=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=g.useRef(null),m=Ye(t,h),x=Ci(o),[p=null,w]=zn({prop:i,defaultProp:l,onChange:c}),[y,v]=g.useState(!1),b=It(u),_=Vk(n),j=g.useRef(!1),[C,T]=g.useState(0);return g.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(Zm,b),()=>R.removeEventListener(Zm,b)},[b]),a.jsx(KL,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:p,onItemFocus:g.useCallback(R=>w(R),[w]),onItemShiftTab:g.useCallback(()=>v(!0),[]),onFocusableItemAdd:g.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:g.useCallback(()=>T(R=>R-1),[]),children:a.jsx(Te.div,{tabIndex:y||C===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:ge(e.onMouseDown,()=>{j.current=!0}),onFocus:ge(e.onFocus,R=>{const A=!j.current;if(R.target===R.currentTarget&&A&&!y){const O=new CustomEvent(Zm,BL);if(R.currentTarget.dispatchEvent(O),!O.defaultPrevented){const G=_().filter(J=>J.focusable),N=G.find(J=>J.active),z=G.find(J=>J.id===p),U=[N,z,...G].filter(Boolean).map(J=>J.ref.current);Kk(U,d)}}j.current=!1}),onBlur:ge(e.onBlur,()=>v(!1))})})}),Wk="RovingFocusGroupItem",Hk=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,l=Ln(),c=o||l,u=YL(Wk,n),d=u.currentTabStopId===c,f=Vk(n),{onFocusableItemAdd:h,onFocusableItemRemove:m}=u;return g.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),a.jsx(_g.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:a.jsx(Te.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ge(e.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:ge(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ge(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const p=XL(x,u.orientation,u.dir);if(p!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=f().filter(v=>v.focusable).map(v=>v.ref.current);if(p==="last")y.reverse();else if(p==="prev"||p==="next"){p==="prev"&&y.reverse();const v=y.indexOf(x.currentTarget);y=u.loop?QL(y,v+1):y.slice(v+1)}setTimeout(()=>Kk(y))}})})})});Hk.displayName=Wk;var ZL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qL(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function XL(e,t,n){const r=qL(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ZL[r]}function Kk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function QL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Cv=Bk,Ev=Hk,JL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vi=new WeakMap,Ku=new WeakMap,Yu={},qm=0,Yk=function(e){return e&&(e.host||Yk(e.parentNode))},ez=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Yk(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})},tz=function(e,t,n,r){var s=ez(t,Array.isArray(e)?e:[e]);Yu[n]||(Yu[n]=new WeakMap);var o=Yu[n],i=[],l=new Set,c=new Set(s),u=function(f){!f||l.has(f)||(l.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(l.has(h))d(h);else try{var m=h.getAttribute(r),x=m!==null&&m!=="false",p=(Vi.get(h)||0)+1,w=(o.get(h)||0)+1;Vi.set(h,p),o.set(h,w),i.push(h),p===1&&x&&Ku.set(h,!0),w===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),l.clear(),qm++,function(){i.forEach(function(f){var h=Vi.get(f)-1,m=o.get(f)-1;Vi.set(f,h),o.set(f,m),h||(Ku.has(f)||f.removeAttribute(r),Ku.delete(f)),m||f.removeAttribute(n)}),qm--,qm||(Vi=new WeakMap,Vi=new WeakMap,Ku=new WeakMap,Yu={})}},Nv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=JL(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),tz(r,s,n,"aria-hidden")):function(){return null}},Zr=function(){return Zr=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},Zr.apply(this,arguments)};function Gk(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 nz(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 wd="right-scroll-bar-position",bd="width-before-scroll-bar",rz="with-scroll-bars-hidden",sz="--removed-body-scroll-bar-size";function Xm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oz(e,t){var n=g.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 iz=typeof window<"u"?g.useLayoutEffect:g.useEffect,wb=new WeakMap;function az(e,t){var n=oz(null,function(r){return e.forEach(function(s){return Xm(s,r)})});return iz(function(){var r=wb.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(l){o.has(l)||Xm(l,null)}),o.forEach(function(l){s.has(l)||Xm(l,i)})}wb.set(n,e)},[e]),n}function lz(e){return e}function cz(e,t){t===void 0&&(t=lz);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(l){return l!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(l){return o(l)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var l=n;n=[],l.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 uz(e){e===void 0&&(e={});var t=cz(null);return t.options=Zr({async:!0,ssr:!1},e),t}var Zk=function(e){var t=e.sideCar,n=Gk(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 g.createElement(r,Zr({},n))};Zk.isSideCarExport=!0;function dz(e,t){return e.useMedium(t),Zk}var qk=uz(),Qm=function(){},ph=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:Qm,onWheelCapture:Qm,onTouchMoveCapture:Qm}),s=r[0],o=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noIsolation,x=e.inert,p=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,v=e.gapMode,b=Gk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,j=az([n,t]),C=Zr(Zr({},b),s);return g.createElement(g.Fragment,null,d&&g.createElement(_,{sideCar:qk,removeScrollBar:u,shards:f,noIsolation:m,inert:x,setCallbacks:o,allowPinchZoom:!!p,lockRef:n,gapMode:v}),i?g.cloneElement(g.Children.only(l),Zr(Zr({},C),{ref:j})):g.createElement(y,Zr({},C,{className:c,ref:j}),l))});ph.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ph.classNames={fullWidth:bd,zeroRight:wd};var fz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fz();return t&&e.setAttribute("nonce",t),e}function mz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function pz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hz())&&(mz(t,n),pz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yz=function(){var e=gz();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xk=function(){var e=yz(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},vz={left:0,top:0,right:0,gap:0},Jm=function(e){return parseInt(e||"",10)||0},xz=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[Jm(n),Jm(r),Jm(s)]},wz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vz;var t=xz(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])}},bz=Xk(),Ca="data-scroll-locked",_z=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
.`.concat(rz,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(l,"px ").concat(r,`;
}
body[`).concat(Ca,`] {
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(l,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(wd,` {
right: `).concat(l,"px ").concat(r,`;
}
.`).concat(bd,` {
margin-right: `).concat(l,"px ").concat(r,`;
}
.`).concat(wd," .").concat(wd,` {
right: 0 `).concat(r,`;
}
.`).concat(bd," .").concat(bd,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(Ca,`] {
`).concat(sz,": ").concat(l,`px;
}
`)},bb=function(){var e=parseInt(document.body.getAttribute(Ca)||"0",10);return isFinite(e)?e:0},Sz=function(){g.useEffect(function(){return document.body.setAttribute(Ca,(bb()+1).toString()),function(){var e=bb()-1;e<=0?document.body.removeAttribute(Ca):document.body.setAttribute(Ca,e.toString())}},[])},kz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;Sz();var o=g.useMemo(function(){return wz(s)},[s]);return g.createElement(bz,{styles:_z(o,!t,s,n?"":"!important")})},Sg=!1;if(typeof window<"u")try{var Gu=Object.defineProperty({},"passive",{get:function(){return Sg=!0,!0}});window.addEventListener("test",Gu,Gu),window.removeEventListener("test",Gu,Gu)}catch{Sg=!1}var Bi=Sg?{passive:!1}:!1,jz=function(e){return e.tagName==="TEXTAREA"},Qk=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jz(e)&&n[t]==="visible")},Cz=function(e){return Qk(e,"overflowY")},Ez=function(e){return Qk(e,"overflowX")},_b=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Jk(e,r);if(s){var o=ej(e,r),i=o[1],l=o[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Nz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Tz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Jk=function(e,t){return e==="v"?Cz(t):Ez(t)},ej=function(e,t){return e==="v"?Nz(t):Tz(t)},Pz=function(e,t){return e==="h"&&t==="rtl"?-1:1},Rz=function(e,t,n,r,s){var o=Pz(e,window.getComputedStyle(t).direction),i=o*r,l=n.target,c=t.contains(l),u=!1,d=i>0,f=0,h=0;do{var m=ej(e,l),x=m[0],p=m[1],w=m[2],y=p-w-o*x;(x||y)&&Jk(e,l)&&(f+=y,h+=x),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(h)<1||!s))&&(u=!0),u},Zu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Sb=function(e){return[e.deltaX,e.deltaY]},kb=function(e){return e&&"current"in e?e.current:e},Az=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Dz=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Oz=0,Wi=[];function Iz(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),s=g.useState(Oz++)[0],o=g.useState(Xk)[0],i=g.useRef(e);g.useEffect(function(){i.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=nz([e.lockRef.current],(e.shards||[]).map(kb),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(p,w){if("touches"in p&&p.touches.length===2)return!i.current.allowPinchZoom;var y=Zu(p),v=n.current,b="deltaX"in p?p.deltaX:v[0]-y[0],_="deltaY"in p?p.deltaY:v[1]-y[1],j,C=p.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in p&&T==="h"&&C.type==="range")return!1;var R=_b(T,C);if(!R)return!0;if(R?j=T:(j=T==="v"?"h":"v",R=_b(T,C)),!R)return!1;if(!r.current&&"changedTouches"in p&&(b||_)&&(r.current=j),!j)return!0;var A=r.current||j;return Rz(A,w,p,A==="h"?b:_,!0)},[]),c=g.useCallback(function(p){var w=p;if(!(!Wi.length||Wi[Wi.length-1]!==o)){var y="deltaY"in w?Sb(w):Zu(w),v=t.current.filter(function(j){return j.name===w.type&&(j.target===w.target||w.target===j.shadowParent)&&Az(j.delta,y)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var b=(i.current.shards||[]).map(kb).filter(Boolean).filter(function(j){return j.contains(w.target)}),_=b.length>0?l(w,b[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),u=g.useCallback(function(p,w,y,v){var b={name:p,delta:w,target:y,should:v,shadowParent:Mz(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),d=g.useCallback(function(p){n.current=Zu(p),r.current=void 0},[]),f=g.useCallback(function(p){u(p.type,Sb(p),p.target,l(p,e.lockRef.current))},[]),h=g.useCallback(function(p){u(p.type,Zu(p),p.target,l(p,e.lockRef.current))},[]);g.useEffect(function(){return Wi.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Bi),document.addEventListener("touchmove",c,Bi),document.addEventListener("touchstart",d,Bi),function(){Wi=Wi.filter(function(p){return p!==o}),document.removeEventListener("wheel",c,Bi),document.removeEventListener("touchmove",c,Bi),document.removeEventListener("touchstart",d,Bi)}},[]);var m=e.removeScrollBar,x=e.inert;return g.createElement(g.Fragment,null,x?g.createElement(o,{styles:Dz(s)}):null,m?g.createElement(kz,{gapMode:e.gapMode}):null)}function Mz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Lz=dz(qk,Iz);var gh=g.forwardRef(function(e,t){return g.createElement(ph,Zr({},e,{ref:t,sideCar:Lz}))});gh.classNames=ph.classNames;var kg=["Enter"," "],zz=["ArrowDown","PageUp","Home"],tj=["ArrowUp","PageDown","End"],Fz=[...zz,...tj],$z={ltr:[...kg,"ArrowRight"],rtl:[...kg,"ArrowLeft"]},Uz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},su="Menu",[Cc,Vz,Bz]=tu(su),[Ei,nj]=un(su,[Bz,il,al]),yh=il(),rj=al(),[Wz,Ni]=Ei(su),[Hz,ou]=Ei(su),sj=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,l=yh(t),[c,u]=g.useState(null),d=g.useRef(!1),f=It(o),h=Ci(s);return g.useEffect(()=>{const m=()=>{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",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),a.jsx(_v,{...l,children:a.jsx(Wz,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:a.jsx(Hz,{scope:t,onClose:g.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:i,children:r})})})};sj.displayName=su;var Kz="MenuAnchor",Tv=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=yh(n);return a.jsx(Sv,{...s,...r,ref:t})});Tv.displayName=Kz;var Pv="MenuPortal",[Yz,oj]=Ei(Pv,{forceMount:void 0}),ij=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Ni(Pv,t);return a.jsx(Yz,{scope:t,forceMount:n,children:a.jsx(dn,{present:n||o.open,children:a.jsx(ru,{asChild:!0,container:s,children:r})})})};ij.displayName=Pv;var mr="MenuContent",[Gz,Rv]=Ei(mr),aj=g.forwardRef((e,t)=>{const n=oj(mr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ni(mr,e.__scopeMenu),i=ou(mr,e.__scopeMenu);return a.jsx(Cc.Provider,{scope:e.__scopeMenu,children:a.jsx(dn,{present:r||o.open,children:a.jsx(Cc.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(Zz,{...s,ref:t}):a.jsx(qz,{...s,ref:t})})})})}),Zz=g.forwardRef((e,t)=>{const n=Ni(mr,e.__scopeMenu),r=g.useRef(null),s=Ye(t,r);return g.useEffect(()=>{const o=r.current;if(o)return Nv(o)},[]),a.jsx(Av,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ge(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),qz=g.forwardRef((e,t)=>{const n=Ni(mr,e.__scopeMenu);return a.jsx(Av,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Av=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:x,...p}=e,w=Ni(mr,n),y=ou(mr,n),v=yh(n),b=rj(n),_=Vz(n),[j,C]=g.useState(null),T=g.useRef(null),R=Ye(t,T,w.onContentChange),A=g.useRef(0),O=g.useRef(""),G=g.useRef(0),N=g.useRef(null),z=g.useRef("right"),S=g.useRef(0),U=x?gh:g.Fragment,J=x?{as:ss,allowPinchZoom:!0}:void 0,F=I=>{var we,ke;const X=O.current+I,$=_().filter(Pe=>!Pe.disabled),B=document.activeElement,xe=(we=$.find(Pe=>Pe.ref.current===B))==null?void 0:we.textValue,ie=$.map(Pe=>Pe.textValue),ae=lF(ie,X,xe),Ie=(ke=$.find(Pe=>Pe.textValue===ae))==null?void 0:ke.ref.current;(function Pe(Fe){O.current=Fe,window.clearTimeout(A.current),Fe!==""&&(A.current=window.setTimeout(()=>Pe(""),1e3))})(X),Ie&&setTimeout(()=>Ie.focus())};g.useEffect(()=>()=>window.clearTimeout(A.current),[]),fv();const W=g.useCallback(I=>{var $,B;return z.current===(($=N.current)==null?void 0:$.side)&&uF(I,(B=N.current)==null?void 0:B.area)},[]);return a.jsx(Gz,{scope:n,searchRef:O,onItemEnter:g.useCallback(I=>{W(I)&&I.preventDefault()},[W]),onItemLeave:g.useCallback(I=>{var X;W(I)||((X=T.current)==null||X.focus(),C(null))},[W]),onTriggerLeave:g.useCallback(I=>{W(I)&&I.preventDefault()},[W]),pointerGraceTimerRef:G,onPointerGraceIntentChange:g.useCallback(I=>{N.current=I},[]),children:a.jsx(U,{...J,children:a.jsx(dh,{asChild:!0,trapped:s,onMountAutoFocus:ge(o,I=>{var X;I.preventDefault(),(X=T.current)==null||X.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(rl,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:a.jsx(Cv,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:C,onEntryFocus:ge(c,I=>{y.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(kv,{role:"menu","aria-orientation":"vertical","data-state":Sj(w.open),"data-radix-menu-content":"",dir:y.dir,...v,...p,ref:R,style:{outline:"none",...p.style},onKeyDown:ge(p.onKeyDown,I=>{const $=I.target.closest("[data-radix-menu-content]")===I.currentTarget,B=I.ctrlKey||I.altKey||I.metaKey,xe=I.key.length===1;$&&(I.key==="Tab"&&I.preventDefault(),!B&&xe&&F(I.key));const ie=T.current;if(I.target!==ie||!Fz.includes(I.key))return;I.preventDefault();const Ie=_().filter(we=>!we.disabled).map(we=>we.ref.current);tj.includes(I.key)&&Ie.reverse(),iF(Ie)}),onBlur:ge(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:ge(e.onPointerMove,Ec(I=>{const X=I.target,$=S.current!==I.clientX;if(I.currentTarget.contains(X)&&$){const B=I.clientX>S.current?"right":"left";z.current=B,S.current=I.clientX}}))})})})})})})});aj.displayName=mr;var Xz="MenuGroup",Dv=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(Te.div,{role:"group",...r,ref:t})});Dv.displayName=Xz;var Qz="MenuLabel",lj=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(Te.div,{...r,ref:t})});lj.displayName=Qz;var af="MenuItem",jb="menu.itemSelect",vh=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=g.useRef(null),i=ou(af,e.__scopeMenu),l=Rv(af,e.__scopeMenu),c=Ye(t,o),u=g.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(jb,{bubbles:!0,cancelable:!0});f.addEventListener(jb,m=>r==null?void 0:r(m),{once:!0}),dv(f,h),h.defaultPrevented?u.current=!1:i.onClose()}};return a.jsx(cj,{...s,ref:c,disabled:n,onClick:ge(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:ge(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:ge(e.onKeyDown,f=>{const h=l.searchRef.current!=="";n||h&&f.key===" "||kg.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});vh.displayName=af;var cj=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=Rv(af,n),l=rj(n),c=g.useRef(null),u=Ye(t,c),[d,f]=g.useState(!1),[h,m]=g.useState("");return g.useEffect(()=>{const x=c.current;x&&m((x.textContent??"").trim())},[o.children]),a.jsx(Cc.ItemSlot,{scope:n,disabled:r,textValue:s??h,children:a.jsx(Ev,{asChild:!0,...l,focusable:!r,children:a.jsx(Te.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:ge(e.onPointerMove,Ec(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ge(e.onPointerLeave,Ec(x=>i.onItemLeave(x))),onFocus:ge(e.onFocus,()=>f(!0)),onBlur:ge(e.onBlur,()=>f(!1))})})})}),Jz="MenuCheckboxItem",uj=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return a.jsx(pj,{scope:e.__scopeMenu,checked:n,children:a.jsx(vh,{role:"menuitemcheckbox","aria-checked":lf(n)?"mixed":n,...s,ref:t,"data-state":Iv(n),onSelect:ge(s.onSelect,()=>r==null?void 0:r(lf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});uj.displayName=Jz;var dj="MenuRadioGroup",[eF,tF]=Ei(dj,{value:void 0,onValueChange:()=>{}}),fj=g.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=It(r);return a.jsx(eF,{scope:e.__scopeMenu,value:n,onValueChange:o,children:a.jsx(Dv,{...s,ref:t})})});fj.displayName=dj;var hj="MenuRadioItem",mj=g.forwardRef((e,t)=>{const{value:n,...r}=e,s=tF(hj,e.__scopeMenu),o=n===s.value;return a.jsx(pj,{scope:e.__scopeMenu,checked:o,children:a.jsx(vh,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Iv(o),onSelect:ge(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});mj.displayName=hj;var Ov="MenuItemIndicator",[pj,nF]=Ei(Ov,{checked:!1}),gj=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=nF(Ov,n);return a.jsx(dn,{present:r||lf(o.checked)||o.checked===!0,children:a.jsx(Te.span,{...s,ref:t,"data-state":Iv(o.checked)})})});gj.displayName=Ov;var rF="MenuSeparator",yj=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(Te.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});yj.displayName=rF;var sF="MenuArrow",vj=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=yh(n);return a.jsx(jv,{...s,...r,ref:t})});vj.displayName=sF;var oF="MenuSub",[x9,xj]=Ei(oF),$l="MenuSubTrigger",wj=g.forwardRef((e,t)=>{const n=Ni($l,e.__scopeMenu),r=ou($l,e.__scopeMenu),s=xj($l,e.__scopeMenu),o=Rv($l,e.__scopeMenu),i=g.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=g.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return g.useEffect(()=>d,[d]),g.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),a.jsx(Tv,{asChild:!0,...u,children:a.jsx(cj,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":Sj(n.open),...e,ref:ch(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:ge(e.onPointerMove,Ec(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:ge(e.onPointerLeave,Ec(f=>{var m,x;d();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const p=(x=n.content)==null?void 0:x.dataset.side,w=p==="right",y=w?-5:5,v=h[w?"left":"right"],b=h[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:v,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x:v,y:h.bottom}],side:p}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ge(e.onKeyDown,f=>{var m;const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||$z[r.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});wj.displayName=$l;var bj="MenuSubContent",_j=g.forwardRef((e,t)=>{const n=oj(mr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ni(mr,e.__scopeMenu),i=ou(mr,e.__scopeMenu),l=xj(bj,e.__scopeMenu),c=g.useRef(null),u=Ye(t,c);return a.jsx(Cc.Provider,{scope:e.__scopeMenu,children:a.jsx(dn,{present:r||o.open,children:a.jsx(Cc.Slot,{scope:e.__scopeMenu,children:a.jsx(Av,{id:l.contentId,"aria-labelledby":l.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:ge(e.onFocusOutside,d=>{d.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ge(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ge(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),h=Uz[i.dir].includes(d.key);f&&h&&(o.onOpenChange(!1),(m=l.trigger)==null||m.focus(),d.preventDefault())})})})})})});_j.displayName=bj;function Sj(e){return e?"open":"closed"}function lf(e){return e==="indeterminate"}function Iv(e){return lf(e)?"indeterminate":e?"checked":"unchecked"}function iF(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function aF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function lF(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=aF(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 cF(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 l=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(s=!s)}return s}function uF(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return cF(n,t)}function Ec(e){return t=>t.pointerType==="mouse"?e(t):void 0}var dF=sj,fF=Tv,hF=ij,mF=aj,pF=Dv,gF=lj,yF=vh,vF=uj,xF=fj,wF=mj,bF=gj,_F=yj,SF=vj,kF=wj,jF=_j,Mv="DropdownMenu",[CF,w9]=un(Mv,[nj]),En=nj(),[EF,kj]=CF(Mv),jj=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,c=En(t),u=g.useRef(null),[d=!1,f]=zn({prop:s,defaultProp:o,onChange:i});return a.jsx(EF,{scope:t,triggerId:Ln(),triggerRef:u,contentId:Ln(),open:d,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(h=>!h),[f]),modal:l,children:a.jsx(dF,{...c,open:d,onOpenChange:f,dir:r,modal:l,children:n})})};jj.displayName=Mv;var Cj="DropdownMenuTrigger",Ej=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=kj(Cj,n),i=En(n);return a.jsx(fF,{asChild:!0,...i,children:a.jsx(Te.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:ch(t,o.triggerRef),onPointerDown:ge(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:ge(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Ej.displayName=Cj;var NF="DropdownMenuPortal",Nj=e=>{const{__scopeDropdownMenu:t,...n}=e,r=En(t);return a.jsx(hF,{...r,...n})};Nj.displayName=NF;var Tj="DropdownMenuContent",Pj=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=kj(Tj,n),o=En(n),i=g.useRef(!1);return a.jsx(mF,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:ge(e.onCloseAutoFocus,l=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:ge(e.onInteractOutside,l=>{const c=l.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)"}})});Pj.displayName=Tj;var TF="DropdownMenuGroup",PF=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(pF,{...s,...r,ref:t})});PF.displayName=TF;var RF="DropdownMenuLabel",Rj=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(gF,{...s,...r,ref:t})});Rj.displayName=RF;var AF="DropdownMenuItem",Aj=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(yF,{...s,...r,ref:t})});Aj.displayName=AF;var DF="DropdownMenuCheckboxItem",Dj=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(vF,{...s,...r,ref:t})});Dj.displayName=DF;var OF="DropdownMenuRadioGroup",IF=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(xF,{...s,...r,ref:t})});IF.displayName=OF;var MF="DropdownMenuRadioItem",Oj=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(wF,{...s,...r,ref:t})});Oj.displayName=MF;var LF="DropdownMenuItemIndicator",Ij=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(bF,{...s,...r,ref:t})});Ij.displayName=LF;var zF="DropdownMenuSeparator",Mj=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(_F,{...s,...r,ref:t})});Mj.displayName=zF;var FF="DropdownMenuArrow",$F=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(SF,{...s,...r,ref:t})});$F.displayName=FF;var UF="DropdownMenuSubTrigger",Lj=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(kF,{...s,...r,ref:t})});Lj.displayName=UF;var VF="DropdownMenuSubContent",zj=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return a.jsx(jF,{...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)"}})});zj.displayName=VF;var BF=jj,WF=Ej,HF=Nj,Fj=Pj,$j=Rj,Uj=Aj,Vj=Dj,Bj=Oj,Wj=Ij,Hj=Mj,Kj=Lj,Yj=zj;const Lv=BF,zv=WF,KF=g.forwardRef(({className:e,inset:t,children:n,...r},s)=>a.jsxs(Kj,{ref:s,className:se("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,a.jsx(ck,{className:"ml-auto h-4 w-4"})]}));KF.displayName=Kj.displayName;const YF=g.forwardRef(({className:e,...t},n)=>a.jsx(Yj,{ref:n,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));YF.displayName=Yj.displayName;const xh=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(HF,{children:a.jsx(Fj,{ref:r,sideOffset:t,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));xh.displayName=Fj.displayName;const si=g.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(Uj,{ref:r,className:se("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));si.displayName=Uj.displayName;const GF=g.forwardRef(({className:e,children:t,checked:n,...r},s)=>a.jsxs(Vj,{ref:s,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Wj,{children:a.jsx(lk,{className:"h-4 w-4"})})}),t]}));GF.displayName=Vj.displayName;const ZF=g.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(Bj,{ref:r,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Wj,{children:a.jsx(uk,{className:"h-2 w-2 fill-current"})})}),t]}));ZF.displayName=Bj.displayName;const qF=g.forwardRef(({className:e,inset:t,...n},r)=>a.jsx($j,{ref:r,className:se("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));qF.displayName=$j.displayName;const XF=g.forwardRef(({className:e,...t},n)=>a.jsx(Hj,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));XF.displayName=Hj.displayName;function QF(){const{i18n:e}=Ue();return a.jsxs(Lv,{children:[a.jsx(zv,{asChild:!0,children:a.jsxs(Re,{variant:"outline",size:"icon",children:[a.jsx(vI,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsx(xh,{align:"end",children:Object.keys(e.store.data).map(t=>a.jsx(si,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}const JF={theme:"system",setTheme:()=>null},Gj=g.createContext(JF);function e4({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,o]=g.useState(()=>localStorage.getItem(n)||t);g.useEffect(()=>{const l=window.document.documentElement;if(l.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";l.classList.add(c);return}l.classList.add(s)},[s]);const i={theme:s,setTheme:l=>{localStorage.setItem(n,l),o(l)}};return a.jsx(Gj.Provider,{...r,value:i,children:e})}const t4=()=>{const e=g.useContext(Gj);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function n4(){const{setTheme:e}=t4(),{t}=Ue();return a.jsxs(Lv,{children:[a.jsx(zv,{asChild:!0,children:a.jsxs(Re,{variant:"outline",size:"icon",children:[a.jsx(jI,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),a.jsx(_I,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsxs(xh,{align:"end",children:[a.jsx(si,{onClick:()=>e("light"),children:t("common.theme.light")}),a.jsx(si,{onClick:()=>e("dark"),children:t("common.theme.dark")}),a.jsx(si,{onClick:()=>e("system"),children:t("common.theme.system")})]})]})}var Fv="Dialog",[Zj,qj]=un(Fv),[r4,Vr]=Zj(Fv),Xj=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,l=g.useRef(null),c=g.useRef(null),[u=!1,d]=zn({prop:r,defaultProp:s,onChange:o});return a.jsx(r4,{scope:t,triggerRef:l,contentRef:c,contentId:Ln(),titleId:Ln(),descriptionId:Ln(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};Xj.displayName=Fv;var Qj="DialogTrigger",Jj=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Vr(Qj,n),o=Ye(t,s.triggerRef);return a.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Vv(s.open),...r,ref:o,onClick:ge(e.onClick,s.onOpenToggle)})});Jj.displayName=Qj;var $v="DialogPortal",[s4,eC]=Zj($v,{forceMount:void 0}),tC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Vr($v,t);return a.jsx(s4,{scope:t,forceMount:n,children:g.Children.map(r,i=>a.jsx(dn,{present:n||o.open,children:a.jsx(ru,{asChild:!0,container:s,children:i})}))})};tC.displayName=$v;var cf="DialogOverlay",nC=g.forwardRef((e,t)=>{const n=eC(cf,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Vr(cf,e.__scopeDialog);return o.modal?a.jsx(dn,{present:r||o.open,children:a.jsx(o4,{...s,ref:t})}):null});nC.displayName=cf;var o4=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Vr(cf,n);return a.jsx(gh,{as:ss,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(Te.div,{"data-state":Vv(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),vi="DialogContent",rC=g.forwardRef((e,t)=>{const n=eC(vi,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Vr(vi,e.__scopeDialog);return a.jsx(dn,{present:r||o.open,children:o.modal?a.jsx(i4,{...s,ref:t}):a.jsx(a4,{...s,ref:t})})});rC.displayName=vi;var i4=g.forwardRef((e,t)=>{const n=Vr(vi,e.__scopeDialog),r=g.useRef(null),s=Ye(t,n.contentRef,r);return g.useEffect(()=>{const o=r.current;if(o)return Nv(o)},[]),a.jsx(sC,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ge(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&o.preventDefault()}),onFocusOutside:ge(e.onFocusOutside,o=>o.preventDefault())})}),a4=g.forwardRef((e,t)=>{const n=Vr(vi,e.__scopeDialog),r=g.useRef(!1),s=g.useRef(!1);return a.jsx(sC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.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()}})}),sC=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,l=Vr(vi,n),c=g.useRef(null),u=Ye(t,c);return fv(),a.jsxs(a.Fragment,{children:[a.jsx(dh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:a.jsx(rl,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Vv(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(c4,{titleId:l.titleId}),a.jsx(d4,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Uv="DialogTitle",oC=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Vr(Uv,n);return a.jsx(Te.h2,{id:s.titleId,...r,ref:t})});oC.displayName=Uv;var iC="DialogDescription",aC=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Vr(iC,n);return a.jsx(Te.p,{id:s.descriptionId,...r,ref:t})});aC.displayName=iC;var lC="DialogClose",cC=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Vr(lC,n);return a.jsx(Te.button,{type:"button",...r,ref:t,onClick:ge(e.onClick,()=>s.onOpenChange(!1))})});cC.displayName=lC;function Vv(e){return e?"open":"closed"}var uC="DialogTitleWarning",[l4,dC]=dM(uC,{contentName:vi,titleName:Uv,docsSlug:"dialog"}),c4=({titleId:e})=>{const t=dC(uC),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 g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},u4="DialogDescriptionWarning",d4=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dC(u4).contentName}}.`;return g.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},Bv=Xj,Wv=Jj,Hv=tC,iu=nC,au=rC,lu=oC,cu=aC,wh=cC;const Kv=Bv,Yv=Wv,f4=Hv,fC=g.forwardRef(({className:e,...t},n)=>a.jsx(iu,{className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));fC.displayName=iu.displayName;const h4=eu("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"}}),bh=g.forwardRef(({side:e="right",className:t,children:n,...r},s)=>a.jsxs(f4,{children:[a.jsx(fC,{}),a.jsxs(au,{ref:s,className:se(h4({side:e}),t),...r,children:[n,a.jsxs(wh,{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:[a.jsx(lv,{className:"h-4 w-4 dark:text-stone-200"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bh.displayName=au.displayName;const Gv=({className:e,...t})=>a.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});Gv.displayName="SheetHeader";const Zv=g.forwardRef(({className:e,...t},n)=>a.jsx(lu,{ref:n,className:se("text-lg font-semibold text-foreground",e),...t}));Zv.displayName=lu.displayName;const m4=g.forwardRef(({className:e,...t},n)=>a.jsx(cu,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));m4.displayName=cu.displayName;class Xn 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,Xn.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 Xn||(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 qu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function p4(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||g4;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 l=e.slice(s,o).trim();if(n[l]===void 0){let c=e.slice(o+1,i).trim();c.charCodeAt(0)===34&&(c=c.slice(1,-1));try{n[l]=r(c)}catch{n[l]=c}}s=i+1}return n}function Cb(e,t,n){const r=Object.assign({},n||{}),s=r.encode||y4;if(!qu.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!qu.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;if(r.maxAge!=null){const l=r.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(l)}if(r.domain){if(!qu.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!qu.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 g4(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function y4(e){return encodeURIComponent(e)}const v4=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let hC;function Ea(e){if(e)try{const t=decodeURIComponent(hC(e.split(".")[1]).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function mC(e,t=0){let n=Ea(e);return!(Object.keys(n).length>0&&(!n.exp||n.exp-t>Date.now()/1e3))}hC=typeof atob!="function"||v4?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 Eb="pb_auth";class x4{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!mC(this.token)}get isAdmin(){return Ea(this.token).type==="admin"}get isAuthRecord(){return Ea(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=Eb){const r=p4(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=Eb){var c,u;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=Ea(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=Cb(n,JSON.stringify(o),t);const l=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&l>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=Cb(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 w4 extends x4{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 Ti{constructor(t){this.client=t}}class b4 extends Ti{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 qv extends Ti{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 Xn({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 Xn({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 l=i.items;return r=r.concat(l),l.length==i.perPage?s(o+1):r});return s(1)}}function Bn(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 _4 extends qv{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=Bn("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 l=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return l=this.authResponse(l),i&&function(u,d,f,h){ep(u);const m=u.beforeSend,x=u.authStore.model,p=u.authStore.onChange((w,y)=>{(!w||(y==null?void 0:y.id)!=(x==null?void 0:x.id)||(y!=null&&y.collectionId||x!=null&&x.collectionId)&&(y==null?void 0:y.collectionId)!=(x==null?void 0:x.collectionId))&&ep(u)});u._resetAutoRefresh=function(){p(),u.beforeSend=m,delete u._resetAutoRefresh},u.beforeSend=async(w,y)=>{var j;const v=u.authStore.token;if((j=y.query)!=null&&j.autoRefresh)return m?m(w,y):{url:w,sendOptions:y};let b=u.authStore.isValid;if(b&&mC(u.authStore.token,d))try{await f()}catch{b=!1}b||await h();const _=y.headers||{};for(let C in _)if(C.toLowerCase()=="authorization"&&v==_[C]&&u.authStore.token){_[C]=u.authStore.token;break}return y.headers=_,m?m(w,y):{url:w,sendOptions:y}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},o))),l}async authRefresh(t,n){let r={method:"POST"};return r=Bn("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=Bn("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=Bn("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 S4=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function pC(e){if(e){e.query=e.query||{};for(let t in e)S4.includes(t)||(e.query[t]=e[t],delete e[t])}}class gC extends Ti{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){pC(r);const l="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.headers}));s+=(s.includes("?")?"&":"?")+l}const o=function(l){const c=l;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 l=!1;for(let c=this.subscriptions[i].length-1;c>=0;c--)this.subscriptions[i][c]===n&&(l=!0,delete this.subscriptions[i][c],this.subscriptions[i].splice(c,1),(o=this.eventSource)==null||o.removeEventListener(i,n));l&&(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 Xn(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 k4 extends qv{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,l;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&&((l=this.client.authStore.model)==null?void 0:l.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=Bn("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,l){let c={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:s,createData:o}};return c=Bn("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,l),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=Nb(void 0));const s=new gC(this.client);function o(){r==null||r.close(),s.unsubscribe()}const i={},l=n.requestKey;return l&&(i.requestKey=l),this.listAuthMethods(i).then(c=>{var h;const u=c.authProviders.find(m=>m.name===n.provider);if(!u)throw new Xn(new Error(`Missing or invalid provider "${n.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=l?(h=this.client.cancelControllers)==null?void 0:h[l]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(m,x)=>{var p;try{await s.subscribe("@oauth2",async b=>{var j;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 C=Object.assign({},n);delete C.provider,delete C.scopes,delete C.createData,delete C.urlCallback,(j=f==null?void 0:f.signal)!=null&&j.onabort&&(f.signal.onabort=null);const T=await this.authWithOAuth2Code(u.name,b.code,u.codeVerifier,d,n.createData,C);m(T)}catch(C){x(new Xn(C))}o()});const w={state:s.clientId};(p=n.scopes)!=null&&p.length&&(w.scope=n.scopes.join(" "));const y=this._replaceQueryParams(u.authUrl+d,w);await(n.urlCallback||function(b){r?r.location.href=b:r=Nb(b)})(y)}catch(w){o(),x(new Xn(w))}})}).catch(c=>{throw o(),c})}async authRefresh(t,n){let r={method:"POST"};return r=Bn("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=Bn("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=Bn("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=Bn("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=Bn("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=Ea(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=Bn("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=Bn("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=Ea(t),l=this.client.authStore.model;return l&&l.id===i.id&&l.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 l of i){if(l=="")continue;const c=l.split("=");o[decodeURIComponent(c[0].replace(/\+/g," "))]=decodeURIComponent((c[1]||"").replace(/\+/g," "))}for(let l in n)n.hasOwnProperty(l)&&(n[l]==null?delete o[l]:o[l]=n[l]);s="";for(let l in o)o.hasOwnProperty(l)&&(s!=""&&(s+="&"),s+=encodeURIComponent(l.replace(/%20/g,"+"))+"="+encodeURIComponent(o[l].replace(/%20/g,"+")));return s!=""?r+"?"+s:r}}function Nb(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Xn(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 j4 extends qv{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 C4 extends Ti{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 Xn({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 E4 extends Ti{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class N4 extends Ti{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 T4 extends Ti{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 P4{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new w4,this.admins=new _4(this),this.collections=new j4(this),this.files=new N4(this),this.logs=new C4(this),this.settings=new b4(this),this.realtime=new gC(this),this.health=new E4(this),this.backups=new T4(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new k4(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 Xn({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Xn(s)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),pC(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 R4=void 0;console.log(R4);let Xu;const ot=()=>Xu||(Xu=new P4("/"),Xu);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var yC;function Se(){return yC.apply(null,arguments)}function A4(e){yC=e}function zr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function oi(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function dt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Xv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(dt(e,t))return!1;return!0}function Nn(e){return e===void 0}function $s(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function uu(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function vC(e,t){var n=[],r,s=e.length;for(r=0;r<s;++r)n.push(t(e[r],r));return n}function fo(e,t){for(var n in t)dt(t,n)&&(e[n]=t[n]);return dt(t,"toString")&&(e.toString=t.toString),dt(t,"valueOf")&&(e.valueOf=t.valueOf),e}function us(e,t,n,r){return UC(e,t,n,r,!0).utc()}function D4(){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 Qe(e){return e._pf==null&&(e._pf=D4()),e._pf}var jg;Array.prototype.some?jg=Array.prototype.some:jg=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 Qv(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Qe(e),n=jg.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 _h(e){var t=us(NaN);return e!=null?fo(Qe(t),e):Qe(t).userInvalidated=!0,t}var Tb=Se.momentProperties=[],tp=!1;function Jv(e,t){var n,r,s,o=Tb.length;if(Nn(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Nn(t._i)||(e._i=t._i),Nn(t._f)||(e._f=t._f),Nn(t._l)||(e._l=t._l),Nn(t._strict)||(e._strict=t._strict),Nn(t._tzm)||(e._tzm=t._tzm),Nn(t._isUTC)||(e._isUTC=t._isUTC),Nn(t._offset)||(e._offset=t._offset),Nn(t._pf)||(e._pf=Qe(t)),Nn(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)r=Tb[n],s=t[r],Nn(s)||(e[r]=s);return e}function du(e){Jv(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),tp===!1&&(tp=!0,Se.updateOffset(this),tp=!1)}function Fr(e){return e instanceof du||e!=null&&e._isAMomentObject!=null}function xC(e){Se.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function vr(e,t){var n=!0;return fo(function(){if(Se.deprecationHandler!=null&&Se.deprecationHandler(null,e),n){var r=[],s,o,i,l=arguments.length;for(o=0;o<l;o++){if(s="",typeof arguments[o]=="object"){s+=`
[`+o+"] ";for(i in arguments[0])dt(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}xC(e+`
Arguments: `+Array.prototype.slice.call(r).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Pb={};function wC(e,t){Se.deprecationHandler!=null&&Se.deprecationHandler(e,t),Pb[e]||(xC(t),Pb[e]=!0)}Se.suppressDeprecationWarnings=!1;Se.deprecationHandler=null;function ds(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function O4(e){var t,n;for(n in e)dt(e,n)&&(t=e[n],ds(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 Cg(e,t){var n=fo({},e),r;for(r in t)dt(t,r)&&(oi(e[r])&&oi(t[r])?(n[r]={},fo(n[r],e[r]),fo(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)dt(e,r)&&!dt(t,r)&&oi(e[r])&&(n[r]=fo({},n[r]));return n}function ex(e){e!=null&&this.set(e)}var Eg;Object.keys?Eg=Object.keys:Eg=function(e){var t,n=[];for(t in e)dt(e,t)&&n.push(t);return n};var I4={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 ds(r)?r.call(t,n):r}function is(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 tx=/(\[[^\[]*\])|(\\)?([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,Qu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,np={},Na={};function Le(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(Na[e]=s),t&&(Na[t[0]]=function(){return is(s.apply(this,arguments),t[1],t[2])}),n&&(Na[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function L4(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function z4(e){var t=e.match(tx),n,r;for(n=0,r=t.length;n<r;n++)Na[t[n]]?t[n]=Na[t[n]]:t[n]=L4(t[n]);return function(s){var o="",i;for(i=0;i<r;i++)o+=ds(t[i])?t[i].call(s,e):t[i];return o}}function _d(e,t){return e.isValid()?(t=bC(t,e.localeData()),np[t]=np[t]||z4(t),np[t](e)):e.localeData().invalidDate()}function bC(e,t){var n=5;function r(s){return t.longDateFormat(s)||s}for(Qu.lastIndex=0;n>=0&&Qu.test(e);)e=e.replace(Qu,r),Qu.lastIndex=0,n-=1;return e}var F4={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 $4(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(tx).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var U4="Invalid date";function V4(){return this._invalidDate}var B4="%d",W4=/\d{1,2}/;function H4(e){return this._ordinal.replace("%d",e)}var K4={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 Y4(e,t,n,r){var s=this._relativeTime[n];return ds(s)?s(e,t,n,r):s.replace(/%d/i,e)}function G4(e,t){var n=this._relativeTime[e>0?"future":"past"];return ds(n)?n(t):n.replace(/%s/i,t)}var Rb={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 xr(e){return typeof e=="string"?Rb[e]||Rb[e.toLowerCase()]:void 0}function nx(e){var t={},n,r;for(r in e)dt(e,r)&&(n=xr(r),n&&(t[n]=e[r]));return t}var Z4={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 q4(e){var t=[],n;for(n in e)dt(e,n)&&t.push({unit:n,priority:Z4[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var _C=/\d/,or=/\d\d/,SC=/\d{3}/,rx=/\d{4}/,Sh=/[+-]?\d{6}/,Et=/\d\d?/,kC=/\d\d\d\d?/,jC=/\d\d\d\d\d\d?/,kh=/\d{1,3}/,sx=/\d{1,4}/,jh=/[+-]?\d{1,6}/,ll=/\d+/,Ch=/[+-]?\d+/,X4=/Z|[+-]\d\d:?\d\d/gi,Eh=/Z|[+-]\d\d(?::?\d\d)?/gi,Q4=/[+-]?\d+(\.\d{1,3})?/,fu=/[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,cl=/^[1-9]\d?/,ox=/^([1-9]\d|\d)/,uf;uf={};function Ee(e,t,n){uf[e]=ds(t)?t:function(r,s){return r&&n?n:t}}function J4(e,t){return dt(uf,e)?uf[e](t._strict,t._locale):new RegExp(e3(e))}function e3(e){return Rs(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function Rs(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ur(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=ur(t)),n}var Ng={};function vt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),$s(t)&&(r=function(o,i){i[t]=rt(o)}),s=e.length,n=0;n<s;n++)Ng[e[n]]=r}function hu(e,t){vt(e,function(n,r,s,o){s._w=s._w||{},t(n,s._w,s,o)})}function t3(e,t,n){t!=null&&dt(Ng,e)&&Ng[e](t,n._a,n,e)}function Nh(e){return e%4===0&&e%100!==0||e%400===0}var pn=0,Es=1,qr=2,tn=3,Pr=4,Ns=5,Jo=6,n3=7,r3=8;Le("Y",0,0,function(){var e=this.year();return e<=9999?is(e,4):"+"+e});Le(0,["YY",2],0,function(){return this.year()%100});Le(0,["YYYY",4],0,"year");Le(0,["YYYYY",5],0,"year");Le(0,["YYYYYY",6,!0],0,"year");Ee("Y",Ch);Ee("YY",Et,or);Ee("YYYY",sx,rx);Ee("YYYYY",jh,Sh);Ee("YYYYYY",jh,Sh);vt(["YYYYY","YYYYYY"],pn);vt("YYYY",function(e,t){t[pn]=e.length===2?Se.parseTwoDigitYear(e):rt(e)});vt("YY",function(e,t){t[pn]=Se.parseTwoDigitYear(e)});vt("Y",function(e,t){t[pn]=parseInt(e,10)});function Jl(e){return Nh(e)?366:365}Se.parseTwoDigitYear=function(e){return rt(e)+(rt(e)>68?1900:2e3)};var CC=ul("FullYear",!0);function s3(){return Nh(this.year())}function ul(e,t){return function(n){return n!=null?(EC(this,e,n),Se.updateOffset(this,t),this):Nc(this,e)}}function Nc(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 EC(e,t,n){var r,s,o,i,l;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(),l=e.date(),l=l===29&&i===1&&!Nh(o)?28:l,s?r.setUTCFullYear(o,i,l):r.setFullYear(o,i,l)}}function o3(e){return e=xr(e),ds(this[e])?this[e]():this}function i3(e,t){if(typeof e=="object"){e=nx(e);var n=q4(e),r,s=n.length;for(r=0;r<s;r++)this[n[r].unit](e[n[r].unit])}else if(e=xr(e),ds(this[e]))return this[e](t);return this}function a3(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 ix(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=a3(t,12);return e+=(t-n)/12,n===1?Nh(e)?29:28:31-n%7%2}Le("M",["MM",2],"Mo",function(){return this.month()+1});Le("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Le("MMMM",0,0,function(e){return this.localeData().months(this,e)});Ee("M",Et,cl);Ee("MM",Et,or);Ee("MMM",function(e,t){return t.monthsShortRegex(e)});Ee("MMMM",function(e,t){return t.monthsRegex(e)});vt(["M","MM"],function(e,t){t[Es]=rt(e)-1});vt(["MMM","MMMM"],function(e,t,n,r){var s=n._locale.monthsParse(e,r,n._strict);s!=null?t[Es]=s:Qe(n).invalidMonth=e});var l3="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),NC="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),TC=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,c3=fu,u3=fu;function d3(e,t){return e?zr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||TC).test(t)?"format":"standalone"][e.month()]:zr(this._months)?this._months:this._months.standalone}function f3(e,t){return e?zr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[TC.test(t)?"format":"standalone"][e.month()]:zr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function h3(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=us([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 m3(e,t,n){var r,s,o;if(this._monthsParseExact)return h3.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=us([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 PC(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=rt(t);else if(t=e.localeData().monthsParse(t),!$s(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,ix(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function RC(e){return e!=null?(PC(this,e),Se.updateOffset(this,!0),this):Nc(this,"Month")}function p3(){return ix(this.year(),this.month())}function g3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||AC.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(dt(this,"_monthsShortRegex")||(this._monthsShortRegex=c3),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function y3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||AC.call(this),e?this._monthsStrictRegex:this._monthsRegex):(dt(this,"_monthsRegex")||(this._monthsRegex=u3),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function AC(){function e(c,u){return u.length-c.length}var t=[],n=[],r=[],s,o,i,l;for(s=0;s<12;s++)o=us([2e3,s]),i=Rs(this.monthsShort(o,"")),l=Rs(this.months(o,"")),t.push(i),n.push(l),r.push(l),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 v3(e,t,n,r,s,o,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,s,o,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,s,o,i),l}function Tc(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 df(e,t,n){var r=7+t-n,s=(7+Tc(e,0,r).getUTCDay()-t)%7;return-s+r-1}function DC(e,t,n,r,s){var o=(7+n-r)%7,i=df(e,r,s),l=1+7*(t-1)+o+i,c,u;return l<=0?(c=e-1,u=Jl(c)+l):l>Jl(e)?(c=e+1,u=l-Jl(e)):(c=e,u=l),{year:c,dayOfYear:u}}function Pc(e,t,n){var r=df(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+As(i,t,n)):s>As(e.year(),t,n)?(o=s-As(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function As(e,t,n){var r=df(e,t,n),s=df(e+1,t,n);return(Jl(e)-r+s)/7}Le("w",["ww",2],"wo","week");Le("W",["WW",2],"Wo","isoWeek");Ee("w",Et,cl);Ee("ww",Et,or);Ee("W",Et,cl);Ee("WW",Et,or);hu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=rt(e)});function x3(e){return Pc(e,this._week.dow,this._week.doy).week}var w3={dow:0,doy:6};function b3(){return this._week.dow}function _3(){return this._week.doy}function S3(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function k3(e){var t=Pc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Le("d",0,"do","day");Le("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Le("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Le("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Le("e",0,0,"weekday");Le("E",0,0,"isoWeekday");Ee("d",Et);Ee("e",Et);Ee("E",Et);Ee("dd",function(e,t){return t.weekdaysMinRegex(e)});Ee("ddd",function(e,t){return t.weekdaysShortRegex(e)});Ee("dddd",function(e,t){return t.weekdaysRegex(e)});hu(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Qe(n).invalidWeekday=e});hu(["d","e","E"],function(e,t,n,r){t[r]=rt(e)});function j3(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function C3(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ax(e,t){return e.slice(t,7).concat(e.slice(0,t))}var E3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),OC="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),N3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),T3=fu,P3=fu,R3=fu;function A3(e,t){var n=zr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ax(n,this._week.dow):e?n[e.day()]:n}function D3(e){return e===!0?ax(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function O3(e){return e===!0?ax(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function I3(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=us([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 I3.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=us([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 L3(e){if(!this.isValid())return e!=null?this:NaN;var t=Nc(this,"Day");return e!=null?(e=j3(e,this.localeData()),this.add(e-t,"d")):t}function z3(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 F3(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=C3(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function $3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||lx.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(dt(this,"_weekdaysRegex")||(this._weekdaysRegex=T3),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function U3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||lx.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(dt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=P3),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function V3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||lx.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(dt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=R3),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function lx(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,l,c,u;for(o=0;o<7;o++)i=us([2e3,1]).day(o),l=Rs(this.weekdaysMin(i,"")),c=Rs(this.weekdaysShort(i,"")),u=Rs(this.weekdays(i,"")),t.push(l),n.push(c),r.push(u),s.push(l),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 cx(){return this.hours()%12||12}function B3(){return this.hours()||24}Le("H",["HH",2],0,"hour");Le("h",["hh",2],0,cx);Le("k",["kk",2],0,B3);Le("hmm",0,0,function(){return""+cx.apply(this)+is(this.minutes(),2)});Le("hmmss",0,0,function(){return""+cx.apply(this)+is(this.minutes(),2)+is(this.seconds(),2)});Le("Hmm",0,0,function(){return""+this.hours()+is(this.minutes(),2)});Le("Hmmss",0,0,function(){return""+this.hours()+is(this.minutes(),2)+is(this.seconds(),2)});function IC(e,t){Le(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}IC("a",!0);IC("A",!1);function MC(e,t){return t._meridiemParse}Ee("a",MC);Ee("A",MC);Ee("H",Et,ox);Ee("h",Et,cl);Ee("k",Et,cl);Ee("HH",Et,or);Ee("hh",Et,or);Ee("kk",Et,or);Ee("hmm",kC);Ee("hmmss",jC);Ee("Hmm",kC);Ee("Hmmss",jC);vt(["H","HH"],tn);vt(["k","kk"],function(e,t,n){var r=rt(e);t[tn]=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[tn]=rt(e),Qe(n).bigHour=!0});vt("hmm",function(e,t,n){var r=e.length-2;t[tn]=rt(e.substr(0,r)),t[Pr]=rt(e.substr(r)),Qe(n).bigHour=!0});vt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[tn]=rt(e.substr(0,r)),t[Pr]=rt(e.substr(r,2)),t[Ns]=rt(e.substr(s)),Qe(n).bigHour=!0});vt("Hmm",function(e,t,n){var r=e.length-2;t[tn]=rt(e.substr(0,r)),t[Pr]=rt(e.substr(r))});vt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[tn]=rt(e.substr(0,r)),t[Pr]=rt(e.substr(r,2)),t[Ns]=rt(e.substr(s))});function W3(e){return(e+"").toLowerCase().charAt(0)==="p"}var H3=/[ap]\.?m?\.?/i,K3=ul("Hours",!0);function Y3(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var LC={calendar:I4,longDateFormat:F4,invalidDate:U4,ordinal:B4,dayOfMonthOrdinalParse:W4,relativeTime:K4,months:l3,monthsShort:NC,week:w3,weekdays:E3,weekdaysMin:N3,weekdaysShort:OC,meridiemParse:H3},Pt={},Tl={},Rc;function G3(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 Ab(e){return e&&e.toLowerCase().replace("_","-")}function Z3(e){for(var t=0,n,r,s,o;t<e.length;){for(o=Ab(e[t]).split("-"),n=o.length,r=Ab(e[t+1]),r=r?r.split("-"):null;n>0;){if(s=Th(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&G3(o,r)>=n-1)break;n--}t++}return Rc}function q3(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Th(e){var t=null,n;if(Pt[e]===void 0&&typeof Nd<"u"&&Nd&&Nd.exports&&q3(e))try{t=Rc._abbr,n=require,n("./locale/"+e),So(t)}catch{Pt[e]=null}return Pt[e]}function So(e,t){var n;return e&&(Nn(t)?n=Ys(e):n=ux(e,t),n?Rc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Rc._abbr}function ux(e,t){if(t!==null){var n,r=LC;if(t.abbr=e,Pt[e]!=null)wC("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Pt[e]._config;else if(t.parentLocale!=null)if(Pt[t.parentLocale]!=null)r=Pt[t.parentLocale]._config;else if(n=Th(t.parentLocale),n!=null)r=n._config;else return Tl[t.parentLocale]||(Tl[t.parentLocale]=[]),Tl[t.parentLocale].push({name:e,config:t}),null;return Pt[e]=new ex(Cg(r,t)),Tl[e]&&Tl[e].forEach(function(s){ux(s.name,s.config)}),So(e),Pt[e]}else return delete Pt[e],null}function X3(e,t){if(t!=null){var n,r,s=LC;Pt[e]!=null&&Pt[e].parentLocale!=null?Pt[e].set(Cg(Pt[e]._config,t)):(r=Th(e),r!=null&&(s=r._config),t=Cg(s,t),r==null&&(t.abbr=e),n=new ex(t),n.parentLocale=Pt[e],Pt[e]=n),So(e)}else Pt[e]!=null&&(Pt[e].parentLocale!=null?(Pt[e]=Pt[e].parentLocale,e===So()&&So(e)):Pt[e]!=null&&delete Pt[e]);return Pt[e]}function Ys(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Rc;if(!zr(e)){if(t=Th(e),t)return t;e=[e]}return Z3(e)}function Q3(){return Eg(Pt)}function dx(e){var t,n=e._a;return n&&Qe(e).overflow===-2&&(t=n[Es]<0||n[Es]>11?Es:n[qr]<1||n[qr]>ix(n[pn],n[Es])?qr:n[tn]<0||n[tn]>24||n[tn]===24&&(n[Pr]!==0||n[Ns]!==0||n[Jo]!==0)?tn:n[Pr]<0||n[Pr]>59?Pr:n[Ns]<0||n[Ns]>59?Ns:n[Jo]<0||n[Jo]>999?Jo:-1,Qe(e)._overflowDayOfYear&&(t<pn||t>qr)&&(t=qr),Qe(e)._overflowWeeks&&t===-1&&(t=n3),Qe(e)._overflowWeekday&&t===-1&&(t=r3),Qe(e).overflow=t),e}var J3=/^\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)?)?$/,e5=/^\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)?)?$/,t5=/Z|[+-]\d\d(?::?\d\d)?/,Ju=[["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/]],n5=/^\/?Date\((-?\d+)/i,r5=/^(?:(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}))$/,s5={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 zC(e){var t,n,r=e._i,s=J3.exec(r)||e5.exec(r),o,i,l,c,u=Ju.length,d=rp.length;if(s){for(Qe(e).iso=!0,t=0,n=u;t<n;t++)if(Ju[t][1].exec(s[1])){i=Ju[t][0],o=Ju[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])){l=(s[2]||" ")+rp[t][0];break}if(l==null){e._isValid=!1;return}}if(!o&&l!=null){e._isValid=!1;return}if(s[4])if(t5.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(c||""),hx(e)}else e._isValid=!1}function o5(e,t,n,r,s,o){var i=[i5(e),NC.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function i5(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function a5(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function l5(e,t,n){if(e){var r=OC.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(r!==s)return Qe(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function c5(e,t,n){if(e)return s5[e];if(t)return 0;var r=parseInt(n,10),s=r%100,o=(r-s)/100;return o*60+s}function FC(e){var t=r5.exec(a5(e._i)),n;if(t){if(n=o5(t[4],t[3],t[2],t[5],t[6],t[7]),!l5(t[1],n,e))return;e._a=n,e._tzm=c5(t[8],t[9],t[10]),e._d=Tc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Qe(e).rfc2822=!0}else e._isValid=!1}function u5(e){var t=n5.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(zC(e),e._isValid===!1)delete e._isValid;else return;if(FC(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Se.createFromInputFallback(e)}Se.createFromInputFallback=vr("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 Zi(e,t,n){return e??t??n}function d5(e){var t=new Date(Se.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function fx(e){var t,n,r=[],s,o,i;if(!e._d){for(s=d5(e),e._w&&e._a[qr]==null&&e._a[Es]==null&&f5(e),e._dayOfYear!=null&&(i=Zi(e._a[pn],s[pn]),(e._dayOfYear>Jl(i)||e._dayOfYear===0)&&(Qe(e)._overflowDayOfYear=!0),n=Tc(i,0,e._dayOfYear),e._a[Es]=n.getUTCMonth(),e._a[qr]=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[tn]===24&&e._a[Pr]===0&&e._a[Ns]===0&&e._a[Jo]===0&&(e._nextDay=!0,e._a[tn]=0),e._d=(e._useUTC?Tc:v3).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[tn]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Qe(e).weekdayMismatch=!0)}}function f5(e){var t,n,r,s,o,i,l,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=Zi(t.GG,e._a[pn],Pc(Ct(),1,4).year),r=Zi(t.W,1),s=Zi(t.E,1),(s<1||s>7)&&(c=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=Pc(Ct(),o,i),n=Zi(t.gg,e._a[pn],u.year),r=Zi(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>As(n,o,i)?Qe(e)._overflowWeeks=!0:c!=null?Qe(e)._overflowWeekday=!0:(l=DC(n,r,s,o,i),e._a[pn]=l.year,e._dayOfYear=l.dayOfYear)}Se.ISO_8601=function(){};Se.RFC_2822=function(){};function hx(e){if(e._f===Se.ISO_8601){zC(e);return}if(e._f===Se.RFC_2822){FC(e);return}e._a=[],Qe(e).empty=!0;var t=""+e._i,n,r,s,o,i,l=t.length,c=0,u,d;for(s=bC(e._f,e._locale).match(tx)||[],d=s.length,n=0;n<d;n++)o=s[n],r=(t.match(J4(o,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&Qe(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),Na[o]?(r?Qe(e).empty=!1:Qe(e).unusedTokens.push(o),t3(o,r,e)):e._strict&&!r&&Qe(e).unusedTokens.push(o);Qe(e).charsLeftOver=l-c,t.length>0&&Qe(e).unusedInput.push(t),e._a[tn]<=12&&Qe(e).bigHour===!0&&e._a[tn]>0&&(Qe(e).bigHour=void 0),Qe(e).parsedDateParts=e._a.slice(0),Qe(e).meridiem=e._meridiem,e._a[tn]=h5(e._locale,e._a[tn],e._meridiem),u=Qe(e).era,u!==null&&(e._a[pn]=e._locale.erasConvertYear(u,e._a[pn])),fx(e),dx(e)}function h5(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 m5(e){var t,n,r,s,o,i,l=!1,c=e._f.length;if(c===0){Qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)o=0,i=!1,t=Jv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],hx(t),Qv(t)&&(i=!0),o+=Qe(t).charsLeftOver,o+=Qe(t).unusedTokens.length*10,Qe(t).score=o,l?o<r&&(r=o,n=t):(r==null||o<r||i)&&(r=o,n=t,i&&(l=!0));fo(e,n||t)}function p5(e){if(!e._d){var t=nx(e._i),n=t.day===void 0?t.date:t.day;e._a=vC([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),fx(e)}}function g5(e){var t=new du(dx($C(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function $C(e){var t=e._i,n=e._f;return e._locale=e._locale||Ys(e._l),t===null||n===void 0&&t===""?_h({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Fr(t)?new du(dx(t)):(uu(t)?e._d=t:zr(n)?m5(e):n?hx(e):y5(e),Qv(e)||(e._d=null),e))}function y5(e){var t=e._i;Nn(t)?e._d=new Date(Se.now()):uu(t)?e._d=new Date(t.valueOf()):typeof t=="string"?u5(e):zr(t)?(e._a=vC(t.slice(0),function(n){return parseInt(n,10)}),fx(e)):oi(t)?p5(e):$s(t)?e._d=new Date(t):Se.createFromInputFallback(e)}function UC(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),(oi(e)&&Xv(e)||zr(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,g5(o)}function Ct(e,t,n,r){return UC(e,t,n,r,!1)}var v5=vr("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:_h()}),x5=vr("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:_h()});function VC(e,t){var n,r;if(t.length===1&&zr(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 w5(){var e=[].slice.call(arguments,0);return VC("isBefore",e)}function b5(){var e=[].slice.call(arguments,0);return VC("isAfter",e)}var _5=function(){return Date.now?Date.now():+new Date},Pl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function S5(e){var t,n=!1,r,s=Pl.length;for(t in e)if(dt(e,t)&&!(Ut.call(Pl,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<s;++r)if(e[Pl[r]]){if(n)return!1;parseFloat(e[Pl[r]])!==rt(e[Pl[r]])&&(n=!0)}return!0}function k5(){return this._isValid}function j5(){return Br(NaN)}function Ph(e){var t=nx(e),n=t.year||0,r=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=S5(t),this._milliseconds=+d+u*1e3+c*6e4+l*1e3*60*60,this._days=+i+o*7,this._months=+s+r*3+n*12,this._data={},this._locale=Ys(),this._bubble()}function Sd(e){return e instanceof Ph}function Tg(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function C5(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++)rt(e[i])!==rt(t[i])&&o++;return o+s}function BC(e,t){Le(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+is(~~(n/60),2)+t+is(~~n%60,2)})}BC("Z",":");BC("ZZ","");Ee("Z",Eh);Ee("ZZ",Eh);vt(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=mx(Eh,e)});var E5=/([\+\-]|\d\d)/gi;function mx(e,t){var n=(t||"").match(e),r,s,o;return n===null?null:(r=n[n.length-1]||[],s=(r+"").match(E5)||["-",0,0],o=+(s[1]*60)+rt(s[2]),o===0?0:s[0]==="+"?o:-o)}function px(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Fr(e)||uu(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Se.updateOffset(n,!1),n):Ct(e).local()}function Pg(e){return-Math.round(e._d.getTimezoneOffset())}Se.updateOffset=function(){};function N5(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=mx(Eh,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(s=Pg(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),r!==e&&(!t||this._changeInProgress?KC(this,Br(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Se.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Pg(this)}function T5(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function P5(e){return this.utcOffset(0,e)}function R5(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Pg(this),"m")),this}function A5(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=mx(X4,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function D5(e){return this.isValid()?(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function O5(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function I5(){if(!Nn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Jv(e,this),e=$C(e),e._a?(t=e._isUTC?us(e._a):Ct(e._a),this._isDSTShifted=this.isValid()&&C5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function M5(){return this.isValid()?!this._isUTC:!1}function L5(){return this.isValid()?this._isUTC:!1}function WC(){return this.isValid()?this._isUTC&&this._offset===0:!1}var z5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,F5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Br(e,t){var n=e,r=null,s,o,i;return Sd(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:$s(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=z5.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:rt(r[qr])*s,h:rt(r[tn])*s,m:rt(r[Pr])*s,s:rt(r[Ns])*s,ms:rt(Tg(r[Jo]*1e3))*s}):(r=F5.exec(e))?(s=r[1]==="-"?-1:1,n={y:Vo(r[2],s),M:Vo(r[3],s),w:Vo(r[4],s),d:Vo(r[5],s),h:Vo(r[6],s),m:Vo(r[7],s),s:Vo(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=$5(Ct(n.from),Ct(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new Ph(n),Sd(e)&&dt(e,"_locale")&&(o._locale=e._locale),Sd(e)&&dt(e,"_isValid")&&(o._isValid=e._isValid),o}Br.fn=Ph.prototype;Br.invalid=j5;function Vo(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Db(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 $5(e,t){var n;return e.isValid()&&t.isValid()?(t=px(t,e),e.isBefore(t)?n=Db(e,t):(n=Db(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function HC(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(wC(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=Br(n,r),KC(this,s,e),this}}function KC(e,t,n,r){var s=t._milliseconds,o=Tg(t._days),i=Tg(t._months);e.isValid()&&(r=r??!0,i&&PC(e,Nc(e,"Month")+i*n),o&&EC(e,"Date",Nc(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&Se.updateOffset(e,o||i))}var U5=HC(1,"add"),V5=HC(-1,"subtract");function YC(e){return typeof e=="string"||e instanceof String}function B5(e){return Fr(e)||uu(e)||YC(e)||$s(e)||H5(e)||W5(e)||e===null||e===void 0}function W5(e){var t=oi(e)&&!Xv(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||dt(e,o);return t&&n}function H5(e){var t=zr(e),n=!1;return t&&(n=e.filter(function(r){return!$s(r)&&YC(e)}).length===0),t&&n}function K5(e){var t=oi(e)&&!Xv(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||dt(e,o);return t&&n}function Y5(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 G5(e,t){arguments.length===1&&(arguments[0]?B5(arguments[0])?(e=arguments[0],t=void 0):K5(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Ct(),r=px(n,this).startOf("day"),s=Se.calendarFormat(this,r)||"sameElse",o=t&&(ds(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,Ct(n)))}function Z5(){return new du(this)}function q5(e,t){var n=Fr(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=xr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function X5(e,t){var n=Fr(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=xr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Q5(e,t,n,r){var s=Fr(e)?e:Ct(e),o=Fr(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 J5(e,t){var n=Fr(e)?e:Ct(e),r;return this.isValid()&&n.isValid()?(t=xr(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 e6(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function t6(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function n6(e,t,n){var r,s,o;if(!this.isValid())return NaN;if(r=px(e,this),!r.isValid())return NaN;switch(s=(r.utcOffset()-this.utcOffset())*6e4,t=xr(t),t){case"year":o=kd(this,r)/12;break;case"month":o=kd(this,r);break;case"quarter":o=kd(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:ur(o)}function kd(e,t){if(e.date()<t.date())return-kd(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}Se.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Se.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function r6(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function s6(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?_d(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ds(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_d(n,"Z")):_d(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function o6(){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 i6(e){e||(e=this.isUtc()?Se.defaultFormatUtc:Se.defaultFormat);var t=_d(this,e);return this.localeData().postformat(t)}function a6(e,t){return this.isValid()&&(Fr(e)&&e.isValid()||Ct(e).isValid())?Br({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function l6(e){return this.from(Ct(),e)}function c6(e,t){return this.isValid()&&(Fr(e)&&e.isValid()||Ct(e).isValid())?Br({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function u6(e){return this.to(Ct(),e)}function GC(e){var t;return e===void 0?this._locale._abbr:(t=Ys(e),t!=null&&(this._locale=t),this)}var ZC=vr("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 qC(){return this._locale}var ff=1e3,Ta=60*ff,hf=60*Ta,XC=(365*400+97)*24*hf;function Pa(e,t){return(e%t+t)%t}function QC(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-XC:new Date(e,t,n).valueOf()}function JC(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-XC:Date.UTC(e,t,n)}function d6(e){var t,n;if(e=xr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?JC:QC,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-=Pa(t+(this._isUTC?0:this.utcOffset()*Ta),hf);break;case"minute":t=this._d.valueOf(),t-=Pa(t,Ta);break;case"second":t=this._d.valueOf(),t-=Pa(t,ff);break}return this._d.setTime(t),Se.updateOffset(this,!0),this}function f6(e){var t,n;if(e=xr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?JC:QC,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+=hf-Pa(t+(this._isUTC?0:this.utcOffset()*Ta),hf)-1;break;case"minute":t=this._d.valueOf(),t+=Ta-Pa(t,Ta)-1;break;case"second":t=this._d.valueOf(),t+=ff-Pa(t,ff)-1;break}return this._d.setTime(t),Se.updateOffset(this,!0),this}function h6(){return this._d.valueOf()-(this._offset||0)*6e4}function m6(){return Math.floor(this.valueOf()/1e3)}function p6(){return new Date(this.valueOf())}function g6(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function y6(){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 v6(){return this.isValid()?this.toISOString():null}function x6(){return Qv(this)}function w6(){return fo({},Qe(this))}function b6(){return Qe(this).overflow}function _6(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Le("N",0,0,"eraAbbr");Le("NN",0,0,"eraAbbr");Le("NNN",0,0,"eraAbbr");Le("NNNN",0,0,"eraName");Le("NNNNN",0,0,"eraNarrow");Le("y",["y",1],"yo","eraYear");Le("y",["yy",2],0,"eraYear");Le("y",["yyy",3],0,"eraYear");Le("y",["yyyy",4],0,"eraYear");Ee("N",gx);Ee("NN",gx);Ee("NNN",gx);Ee("NNNN",D6);Ee("NNNNN",O6);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Qe(n).era=s:Qe(n).invalidEra=e});Ee("y",ll);Ee("yy",ll);Ee("yyy",ll);Ee("yyyy",ll);Ee("yo",I6);vt(["y","yy","yyy","yyyy"],pn);vt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[pn]=n._locale.eraYearOrdinalParse(e,s):t[pn]=parseInt(e,10)});function S6(e,t){var n,r,s,o=this._eras||Ys("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":s=Se(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=Se(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf();break}}return o}function k6(e,t,n){var r,s,o=this.eras(),i,l,c;for(e=e.toUpperCase(),r=0,s=o.length;r<s;++r)if(i=o[r].name.toUpperCase(),l=o[r].abbr.toUpperCase(),c=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(l===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,l,c].indexOf(e)>=0)return o[r]}function j6(e,t){var n=e.since<=e.until?1:-1;return t===void 0?Se(e.since).year():Se(e.since).year()+(t-e.offset)*n}function C6(){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 E6(){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 N6(){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 T6(){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()-Se(s[e].since).year())*n+s[e].offset;return this.year()}function P6(e){return dt(this,"_erasNameRegex")||yx.call(this),e?this._erasNameRegex:this._erasRegex}function R6(e){return dt(this,"_erasAbbrRegex")||yx.call(this),e?this._erasAbbrRegex:this._erasRegex}function A6(e){return dt(this,"_erasNarrowRegex")||yx.call(this),e?this._erasNarrowRegex:this._erasRegex}function gx(e,t){return t.erasAbbrRegex(e)}function D6(e,t){return t.erasNameRegex(e)}function O6(e,t){return t.erasNarrowRegex(e)}function I6(e,t){return t._eraYearOrdinalRegex||ll}function yx(){var e=[],t=[],n=[],r=[],s,o,i,l,c,u=this.eras();for(s=0,o=u.length;s<o;++s)i=Rs(u[s].name),l=Rs(u[s].abbr),c=Rs(u[s].narrow),t.push(i),e.push(l),n.push(c),r.push(i),r.push(l),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")}Le(0,["gg",2],0,function(){return this.weekYear()%100});Le(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Rh(e,t){Le(0,[e,e.length],0,t)}Rh("gggg","weekYear");Rh("ggggg","weekYear");Rh("GGGG","isoWeekYear");Rh("GGGGG","isoWeekYear");Ee("G",Ch);Ee("g",Ch);Ee("GG",Et,or);Ee("gg",Et,or);Ee("GGGG",sx,rx);Ee("gggg",sx,rx);Ee("GGGGG",jh,Sh);Ee("ggggg",jh,Sh);hu(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=rt(e)});hu(["gg","GG"],function(e,t,n,r){t[r]=Se.parseTwoDigitYear(e)});function M6(e){return eE.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function L6(e){return eE.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function z6(){return As(this.year(),1,4)}function F6(){return As(this.isoWeekYear(),1,4)}function $6(){var e=this.localeData()._week;return As(this.year(),e.dow,e.doy)}function U6(){var e=this.localeData()._week;return As(this.weekYear(),e.dow,e.doy)}function eE(e,t,n,r,s){var o;return e==null?Pc(this,r,s).year:(o=As(e,r,s),t>o&&(t=o),V6.call(this,e,t,n,r,s))}function V6(e,t,n,r,s){var o=DC(e,t,n,r,s),i=Tc(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Le("Q",0,"Qo","quarter");Ee("Q",_C);vt("Q",function(e,t){t[Es]=(rt(e)-1)*3});function B6(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Le("D",["DD",2],"Do","date");Ee("D",Et,cl);Ee("DD",Et,or);Ee("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],qr);vt("Do",function(e,t){t[qr]=rt(e.match(Et)[0])});var tE=ul("Date",!0);Le("DDD",["DDDD",3],"DDDo","dayOfYear");Ee("DDD",kh);Ee("DDDD",SC);vt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=rt(e)});function W6(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Le("m",["mm",2],0,"minute");Ee("m",Et,ox);Ee("mm",Et,or);vt(["m","mm"],Pr);var H6=ul("Minutes",!1);Le("s",["ss",2],0,"second");Ee("s",Et,ox);Ee("ss",Et,or);vt(["s","ss"],Ns);var K6=ul("Seconds",!1);Le("S",0,0,function(){return~~(this.millisecond()/100)});Le(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Le(0,["SSS",3],0,"millisecond");Le(0,["SSSS",4],0,function(){return this.millisecond()*10});Le(0,["SSSSS",5],0,function(){return this.millisecond()*100});Le(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Le(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Le(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Le(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ee("S",kh,_C);Ee("SS",kh,or);Ee("SSS",kh,SC);var ho,nE;for(ho="SSSS";ho.length<=9;ho+="S")Ee(ho,ll);function Y6(e,t){t[Jo]=rt(("0."+e)*1e3)}for(ho="S";ho.length<=9;ho+="S")vt(ho,Y6);nE=ul("Milliseconds",!1);Le("z",0,0,"zoneAbbr");Le("zz",0,0,"zoneName");function G6(){return this._isUTC?"UTC":""}function Z6(){return this._isUTC?"Coordinated Universal Time":""}var fe=du.prototype;fe.add=U5;fe.calendar=G5;fe.clone=Z5;fe.diff=n6;fe.endOf=f6;fe.format=i6;fe.from=a6;fe.fromNow=l6;fe.to=c6;fe.toNow=u6;fe.get=o3;fe.invalidAt=b6;fe.isAfter=q5;fe.isBefore=X5;fe.isBetween=Q5;fe.isSame=J5;fe.isSameOrAfter=e6;fe.isSameOrBefore=t6;fe.isValid=x6;fe.lang=ZC;fe.locale=GC;fe.localeData=qC;fe.max=x5;fe.min=v5;fe.parsingFlags=w6;fe.set=i3;fe.startOf=d6;fe.subtract=V5;fe.toArray=g6;fe.toObject=y6;fe.toDate=p6;fe.toISOString=s6;fe.inspect=o6;typeof Symbol<"u"&&Symbol.for!=null&&(fe[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});fe.toJSON=v6;fe.toString=r6;fe.unix=m6;fe.valueOf=h6;fe.creationData=_6;fe.eraName=C6;fe.eraNarrow=E6;fe.eraAbbr=N6;fe.eraYear=T6;fe.year=CC;fe.isLeapYear=s3;fe.weekYear=M6;fe.isoWeekYear=L6;fe.quarter=fe.quarters=B6;fe.month=RC;fe.daysInMonth=p3;fe.week=fe.weeks=S3;fe.isoWeek=fe.isoWeeks=k3;fe.weeksInYear=$6;fe.weeksInWeekYear=U6;fe.isoWeeksInYear=z6;fe.isoWeeksInISOWeekYear=F6;fe.date=tE;fe.day=fe.days=L3;fe.weekday=z3;fe.isoWeekday=F3;fe.dayOfYear=W6;fe.hour=fe.hours=K3;fe.minute=fe.minutes=H6;fe.second=fe.seconds=K6;fe.millisecond=fe.milliseconds=nE;fe.utcOffset=N5;fe.utc=P5;fe.local=R5;fe.parseZone=A5;fe.hasAlignedHourOffset=D5;fe.isDST=O5;fe.isLocal=M5;fe.isUtcOffset=L5;fe.isUtc=WC;fe.isUTC=WC;fe.zoneAbbr=G6;fe.zoneName=Z6;fe.dates=vr("dates accessor is deprecated. Use date instead.",tE);fe.months=vr("months accessor is deprecated. Use month instead",RC);fe.years=vr("years accessor is deprecated. Use year instead",CC);fe.zone=vr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",T5);fe.isDSTShifted=vr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",I5);function q6(e){return Ct(e*1e3)}function X6(){return Ct.apply(null,arguments).parseZone()}function rE(e){return e}var ft=ex.prototype;ft.calendar=M4;ft.longDateFormat=$4;ft.invalidDate=V4;ft.ordinal=H4;ft.preparse=rE;ft.postformat=rE;ft.relativeTime=Y4;ft.pastFuture=G4;ft.set=O4;ft.eras=S6;ft.erasParse=k6;ft.erasConvertYear=j6;ft.erasAbbrRegex=R6;ft.erasNameRegex=P6;ft.erasNarrowRegex=A6;ft.months=d3;ft.monthsShort=f3;ft.monthsParse=m3;ft.monthsRegex=y3;ft.monthsShortRegex=g3;ft.week=x3;ft.firstDayOfYear=_3;ft.firstDayOfWeek=b3;ft.weekdays=A3;ft.weekdaysMin=O3;ft.weekdaysShort=D3;ft.weekdaysParse=M3;ft.weekdaysRegex=$3;ft.weekdaysShortRegex=U3;ft.weekdaysMinRegex=V3;ft.isPM=W3;ft.meridiem=Y3;function mf(e,t,n,r){var s=Ys(),o=us().set(r,t);return s[n](o,e)}function sE(e,t,n){if($s(e)&&(t=e,e=void 0),e=e||"",t!=null)return mf(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=mf(e,r,n,"month");return s}function vx(e,t,n,r){typeof e=="boolean"?($s(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,$s(t)&&(n=t,t=void 0),t=t||"");var s=Ys(),o=e?s._week.dow:0,i,l=[];if(n!=null)return mf(t,(n+o)%7,r,"day");for(i=0;i<7;i++)l[i]=mf(t,(i+o)%7,r,"day");return l}function Q6(e,t){return sE(e,t,"months")}function J6(e,t){return sE(e,t,"monthsShort")}function e8(e,t,n){return vx(e,t,n,"weekdays")}function t8(e,t,n){return vx(e,t,n,"weekdaysShort")}function n8(e,t,n){return vx(e,t,n,"weekdaysMin")}So("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=rt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});Se.lang=vr("moment.lang is deprecated. Use moment.locale instead.",So);Se.langData=vr("moment.langData is deprecated. Use moment.localeData instead.",Ys);var vs=Math.abs;function r8(){var e=this._data;return this._milliseconds=vs(this._milliseconds),this._days=vs(this._days),this._months=vs(this._months),e.milliseconds=vs(e.milliseconds),e.seconds=vs(e.seconds),e.minutes=vs(e.minutes),e.hours=vs(e.hours),e.months=vs(e.months),e.years=vs(e.years),this}function oE(e,t,n,r){var s=Br(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function s8(e,t){return oE(this,e,t,1)}function o8(e,t){return oE(this,e,t,-1)}function Ob(e){return e<0?Math.floor(e):Math.ceil(e)}function i8(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,l,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ob(Rg(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=ur(e/1e3),r.seconds=s%60,o=ur(s/60),r.minutes=o%60,i=ur(o/60),r.hours=i%24,t+=ur(i/24),c=ur(iE(t)),n+=c,t-=Ob(Rg(c)),l=ur(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function iE(e){return e*4800/146097}function Rg(e){return e*146097/4800}function a8(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=xr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+iE(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Rg(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 Gs(e){return function(){return this.as(e)}}var aE=Gs("ms"),l8=Gs("s"),c8=Gs("m"),u8=Gs("h"),d8=Gs("d"),f8=Gs("w"),h8=Gs("M"),m8=Gs("Q"),p8=Gs("y"),g8=aE;function y8(){return Br(this)}function v8(e){return e=xr(e),this.isValid()?this[e+"s"]():NaN}function Pi(e){return function(){return this.isValid()?this._data[e]:NaN}}var x8=Pi("milliseconds"),w8=Pi("seconds"),b8=Pi("minutes"),_8=Pi("hours"),S8=Pi("days"),k8=Pi("months"),j8=Pi("years");function C8(){return ur(this.days()/7)}var _s=Math.round,pa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function E8(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function N8(e,t,n,r){var s=Br(e).abs(),o=_s(s.as("s")),i=_s(s.as("m")),l=_s(s.as("h")),c=_s(s.as("d")),u=_s(s.as("M")),d=_s(s.as("w")),f=_s(s.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||i<=1&&["m"]||i<n.m&&["mm",i]||l<=1&&["h"]||l<n.h&&["hh",l]||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,E8.apply(null,h)}function T8(e){return e===void 0?_s:typeof e=="function"?(_s=e,!0):!1}function P8(e,t){return pa[e]===void 0?!1:t===void 0?pa[e]:(pa[e]=t,e==="s"&&(pa.ss=t-1),!0)}function R8(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=pa,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},pa,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=N8(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var sp=Math.abs;function Hi(e){return(e>0)-(e<0)||+e}function Ah(){if(!this.isValid())return this.localeData().invalidDate();var e=sp(this._milliseconds)/1e3,t=sp(this._days),n=sp(this._months),r,s,o,i,l=this.asSeconds(),c,u,d,f;return l?(r=ur(e/60),s=ur(r/60),e%=60,r%=60,o=ur(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",u=Hi(this._months)!==Hi(l)?"-":"",d=Hi(this._days)!==Hi(l)?"-":"",f=Hi(this._milliseconds)!==Hi(l)?"-":"",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 lt=Ph.prototype;lt.isValid=k5;lt.abs=r8;lt.add=s8;lt.subtract=o8;lt.as=a8;lt.asMilliseconds=aE;lt.asSeconds=l8;lt.asMinutes=c8;lt.asHours=u8;lt.asDays=d8;lt.asWeeks=f8;lt.asMonths=h8;lt.asQuarters=m8;lt.asYears=p8;lt.valueOf=g8;lt._bubble=i8;lt.clone=y8;lt.get=v8;lt.milliseconds=x8;lt.seconds=w8;lt.minutes=b8;lt.hours=_8;lt.days=S8;lt.weeks=C8;lt.months=k8;lt.years=j8;lt.humanize=R8;lt.toISOString=Ah;lt.toString=Ah;lt.toJSON=Ah;lt.locale=GC;lt.localeData=qC;lt.toIsoString=vr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ah);lt.lang=ZC;Le("X",0,0,"unix");Le("x",0,0,"valueOf");Ee("x",Ch);Ee("X",Q4);vt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,n){n._d=new Date(rt(e))});//! moment.js
Se.version="2.30.1";A4(Ct);Se.fn=fe;Se.min=w5;Se.max=b5;Se.now=_5;Se.utc=us;Se.unix=q6;Se.months=Q6;Se.isDate=uu;Se.locale=So;Se.invalid=_h;Se.duration=Br;Se.isMoment=Fr;Se.weekdays=e8;Se.parseZone=X6;Se.localeData=Ys;Se.isDuration=Sd;Se.monthsShort=J6;Se.weekdaysMin=n8;Se.defineLocale=ux;Se.updateLocale=X3;Se.locales=Q3;Se.weekdaysShort=t8;Se.normalizeUnits=xr;Se.relativeTimeRounding=T8;Se.relativeTimeThreshold=P8;Se.calendarFormat=Y5;Se.prototype=fe;Se.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 A8=async()=>await ot().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Fn=async e=>e.id?await ot().collection("access").update(e.id,e):await ot().collection("access").create(e),D8=async e=>(e.deleted=Se.utc().format("YYYY-MM-DD HH:mm:ss"),await ot().collection("access").update(e.id,e)),Ib=async()=>await ot().collection("access_groups").getFullList({sort:"-created",expand:"access"}),O8=async e=>{const t=ot();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)},I8=async e=>{const t=ot();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Mb=async e=>await ot().collection("access_groups").update(e.id,e),M8=async()=>{try{return await ot().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},xx=async e=>{try{return await ot().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},Ri=async e=>{const t=ot();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},L8=(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}},lE=g.createContext({}),Wt=()=>g.useContext(lE),z8=({children:e})=>{const[t,n]=g.useReducer(L8,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});g.useEffect(()=>{(async()=>{const d=await A8();n({type:"SET_ACCESSES",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await M8();n({type:"SET_EMAILS",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await Ib();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=g.useCallback(async()=>{const u=await Ib();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=g.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),o=g.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),i=g.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),l=g.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=g.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return a.jsx(lE.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:l,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})};var F8="Separator",Lb="horizontal",$8=["horizontal","vertical"],cE=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=Lb,...s}=e,o=U8(r)?r:Lb,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return a.jsx(Te.div,{"data-orientation":o,...l,...s,ref:t})});cE.displayName=F8;function U8(e){return $8.includes(e)}var uE=cE;const Er=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(uE,{ref:s,decorative:n,orientation:t,className:se("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Er.displayName=uE.displayName;const V8="Certimate v0.2.4",dE=()=>{const{t:e}=Ue();return a.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[a.jsx("div",{className:""}),a.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[a.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[a.jsx(cI,{size:16}),a.jsx("div",{className:"ml-1",children:e("common.menu.document")})]}),a.jsx(Er,{orientation:"vertical",className:"mx-2"}),a.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:V8})]})]})};function B8(){const e=sr(),t=Ur(),{t:n}=Ue();if(!ot().authStore.isValid||!ot().authStore.isAdmin)return a.jsx(JS,{to:"/login"});const r=t.pathname,s=l=>l==r?"bg-muted text-primary":"text-muted-foreground",o=()=>{ot().authStore.clear(),e("/login")},i=()=>{e("/setting/account")};return a.jsx(a.Fragment,{children:a.jsx(z8,{children:a.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:[a.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:a.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[a.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:a.jsxs(wn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[a.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),a.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),a.jsx("div",{className:"flex-1",children:a.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[a.jsxs(wn,{to:"/",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[a.jsx(Qw,{className:"h-4 w-4"}),n("dashboard.page.title")]}),a.jsxs(wn,{to:"/domains",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[a.jsx(gg,{className:"h-4 w-4"}),n("domain.page.title")]}),a.jsxs(wn,{to:"/access",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[a.jsx(Jw,{className:"h-4 w-4"}),n("access.page.title")]}),a.jsxs(wn,{to:"/history",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[a.jsx(Xw,{className:"h-4 w-4"}),n("history.page.title")]})]})})]})}),a.jsxs("div",{className:"flex flex-col",children:[a.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:[a.jsxs(Kv,{children:[a.jsx(Yv,{asChild:!0,children:a.jsxs(Re,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[a.jsx(bI,{className:"h-5 w-5 dark:text-white"}),a.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),a.jsx(bh,{side:"left",className:"flex flex-col",children:a.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[a.jsxs(wn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[a.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),a.jsx("span",{className:"dark:text-white",children:"Certimate"}),a.jsx("span",{className:"sr-only",children:"Certimate"})]}),a.jsxs(wn,{to:"/",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[a.jsx(Qw,{className:"h-5 w-5"}),n("dashboard.page.title")]}),a.jsxs(wn,{to:"/domains",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[a.jsx(gg,{className:"h-5 w-5"}),n("domain.page.title")]}),a.jsxs(wn,{to:"/access",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[a.jsx(Jw,{className:"h-5 w-5"}),n("access.page.title")]}),a.jsxs(wn,{to:"/history",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[a.jsx(Xw,{className:"h-5 w-5"}),n("history.page.title")]})]})})]}),a.jsx("div",{className:"w-full flex-1"}),a.jsx(n4,{}),a.jsx(QF,{}),a.jsxs(Lv,{children:[a.jsx(zv,{asChild:!0,children:a.jsxs(Re,{variant:"secondary",size:"icon",className:"rounded-full",children:[a.jsx(mI,{className:"h-5 w-5"}),a.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),a.jsxs(xh,{align:"end",children:[a.jsx(si,{onClick:i,children:n("common.menu.settings")}),a.jsx(si,{onClick:o,children:n("common.menu.logout")})]})]})]}),a.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[a.jsx(rv,{}),a.jsx(dE,{})]})]})]})})})}var W8="VisuallyHidden",mu=g.forwardRef((e,t)=>a.jsx(Te.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}}));mu.displayName=W8;var H8=mu,[Dh,b9]=un("Tooltip",[il]),Oh=il(),fE="TooltipProvider",K8=700,Ag="tooltip.open",[Y8,wx]=Dh(fE),bx=e=>{const{__scopeTooltip:t,delayDuration:n=K8,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,l]=g.useState(!0),c=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),a.jsx(Y8,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),l(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:g.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};bx.displayName=fE;var Ih="Tooltip",[G8,Mh]=Dh(Ih),hE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:l}=e,c=wx(Ih,e.__scopeTooltip),u=Oh(t),[d,f]=g.useState(null),h=Ln(),m=g.useRef(0),x=i??c.disableHoverableContent,p=l??c.delayDuration,w=g.useRef(!1),[y=!1,v]=zn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ag))):c.onClose(),o==null||o(T)}}),b=g.useMemo(()=>y?w.current?"delayed-open":"instant-open":"closed",[y]),_=g.useCallback(()=>{window.clearTimeout(m.current),w.current=!1,v(!0)},[v]),j=g.useCallback(()=>{window.clearTimeout(m.current),v(!1)},[v]),C=g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,v(!0)},p)},[p,v]);return g.useEffect(()=>()=>window.clearTimeout(m.current),[]),a.jsx(_v,{...u,children:a.jsx(G8,{scope:t,contentId:h,open:y,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayed?C():_()},[c.isOpenDelayed,C,_]),onTriggerLeave:g.useCallback(()=>{x?j():window.clearTimeout(m.current)},[j,x]),onOpen:_,onClose:j,disableHoverableContent:x,children:n})})};hE.displayName=Ih;var Dg="TooltipTrigger",mE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Mh(Dg,n),o=wx(Dg,n),i=Oh(n),l=g.useRef(null),c=Ye(t,l,s.onTriggerChange),u=g.useRef(!1),d=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),a.jsx(Sv,{asChild:!0,...i,children:a.jsx(Te.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ge(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ge(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ge(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ge(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ge(e.onBlur,s.onClose),onClick:ge(e.onClick,s.onClose)})})});mE.displayName=Dg;var Z8="TooltipPortal",[_9,q8]=Dh(Z8,{forceMount:void 0}),Va="TooltipContent",_x=g.forwardRef((e,t)=>{const n=q8(Va,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Mh(Va,e.__scopeTooltip);return a.jsx(dn,{present:r||i.open,children:i.disableHoverableContent?a.jsx(pE,{side:s,...o,ref:t}):a.jsx(X8,{side:s,...o,ref:t})})}),X8=g.forwardRef((e,t)=>{const n=Mh(Va,e.__scopeTooltip),r=wx(Va,e.__scopeTooltip),s=g.useRef(null),o=Ye(t,s),[i,l]=g.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=g.useCallback(()=>{l(null),f(!1)},[f]),m=g.useCallback((x,p)=>{const w=x.currentTarget,y={x:x.clientX,y:x.clientY},v=t$(y,w.getBoundingClientRect()),b=n$(y,v),_=r$(p.getBoundingClientRect()),j=o$([...b,..._]);l(j),f(!0)},[f]);return g.useEffect(()=>()=>h(),[h]),g.useEffect(()=>{if(c&&d){const x=w=>m(w,d),p=w=>m(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",p)}}},[c,d,m,h]),g.useEffect(()=>{if(i){const x=p=>{const w=p.target,y={x:p.clientX,y:p.clientY},v=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!s$(y,i);v?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,h]),a.jsx(pE,{...e,ref:o})}),[Q8,J8]=Dh(Ih,{isInside:!1}),pE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...l}=e,c=Mh(Va,n),u=Oh(n),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(Ag,d),()=>document.removeEventListener(Ag,d)),[d]),g.useEffect(()=>{if(c.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),a.jsx(rl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:a.jsxs(kv,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.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:[a.jsx(cv,{children:r}),a.jsx(Q8,{scope:n,isInside:!0,children:a.jsx(H8,{id:c.contentId,role:"tooltip",children:s||r})})]})})});_x.displayName=Va;var gE="TooltipArrow",e$=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Oh(n);return J8(gE,n).isInside?null:a.jsx(jv,{...s,...r,ref:t})});e$.displayName=gE;function t$(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 n$(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 r$(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 s$(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 l=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(s=!s)}return s}function o$(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),i$(t)}function i$(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 a$=bx,l$=hE,c$=mE,yE=_x;const pr=({when:e,children:t,fallback:n})=>e?t:n,Sx=({phase:e,phaseSuccess:t})=>{const{t:n}=Ue();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:se("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("history.props.stage.progress.check")}),a.jsx(Er,{className:se("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),a.jsx("div",{className:se("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("history.props.stage.progress.apply")}),a.jsx(Er,{className:se("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),a.jsx("div",{className:se("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("history.props.stage.progress.deploy")})]})},u$=a$,vE=l$,xE=c$,wE=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(yE,{ref:r,sideOffset:t,className:se("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));wE.displayName=yE.displayName;const kx=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return a.jsx(a.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?a.jsx(hI,{size:16,className:"text-green-700"}):a.jsx(a.Fragment,{children:t(e.phase).length?a.jsx(u$,{children:a.jsxs(vE,{children:[a.jsx(xE,{asChild:!0,className:"cursor-pointer",children:a.jsx(Zw,{size:16,className:"text-red-700"})}),a.jsx(wE,{className:"max-w-[35em]",children:t(e.phase)})]})}):a.jsx(Zw,{size:16,className:"text-red-700"})})})},bE=({className:e,...t})=>a.jsx("nav",{role:"navigation","aria-label":"pagination",className:se("mx-auto flex w-full justify-center",e),...t});bE.displayName="Pagination";const _E=g.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,className:se("flex flex-row items-center gap-1",e),...t}));_E.displayName="PaginationContent";const Og=g.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,className:se("",e),...t}));Og.displayName="PaginationItem";const SE=({className:e,isActive:t,size:n="icon",...r})=>a.jsx("a",{"aria-current":t?"page":void 0,className:se(uh({variant:t?"outline":"ghost",size:n}),e),...r});SE.displayName="PaginationLink";const kE=({className:e,...t})=>{const{t:n}=Ue();return a.jsxs("span",{"aria-hidden":!0,className:se("flex h-9 w-9 items-center justify-center",e),...t,children:[a.jsx(pI,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:n("common.pagination.more")})]})};kE.displayName="PaginationEllipsis";const jE=({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=(l,c,u=1)=>{let d=l;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return a.jsx(a.Fragment,{children:a.jsx(bE,{className:"dark:text-stone-200 justify-end mt-3",children:a.jsx(_E,{children:i.map((l,c)=>l==="..."?a.jsx(Og,{children:a.jsx(kE,{})},c):a.jsx(Og,{children:a.jsx(SE,{href:"#",isActive:t==l,onClick:u=>{u.preventDefault(),n(l)},children:l})},c))})})})};var CE="AlertDialog",[d$,S9]=un(CE,[qj]),Zs=qj(),EE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return a.jsx(Bv,{...r,...n,modal:!0})};EE.displayName=CE;var f$="AlertDialogTrigger",NE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return a.jsx(Wv,{...s,...r,ref:t})});NE.displayName=f$;var h$="AlertDialogPortal",TE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return a.jsx(Hv,{...r,...n})};TE.displayName=h$;var m$="AlertDialogOverlay",PE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return a.jsx(iu,{...s,...r,ref:t})});PE.displayName=m$;var Ra="AlertDialogContent",[p$,g$]=d$(Ra),RE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=Zs(n),i=g.useRef(null),l=Ye(t,i),c=g.useRef(null);return a.jsx(l4,{contentName:Ra,titleName:AE,docsSlug:"alert-dialog",children:a.jsx(p$,{scope:n,cancelRef:c,children:a.jsxs(au,{role:"alertdialog",...o,...s,ref:l,onOpenAutoFocus:ge(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[a.jsx(cv,{children:r}),a.jsx(v$,{contentRef:i})]})})})});RE.displayName=Ra;var AE="AlertDialogTitle",DE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return a.jsx(lu,{...s,...r,ref:t})});DE.displayName=AE;var OE="AlertDialogDescription",IE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return a.jsx(cu,{...s,...r,ref:t})});IE.displayName=OE;var y$="AlertDialogAction",ME=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return a.jsx(wh,{...s,...r,ref:t})});ME.displayName=y$;var LE="AlertDialogCancel",zE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=g$(LE,n),o=Zs(n),i=Ye(t,s);return a.jsx(wh,{...o,...r,ref:i})});zE.displayName=LE;var v$=({contentRef:e})=>{const t=`\`${Ra}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${Ra}\` by passing a \`${OE}\` 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 \`${Ra}\`. 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 g.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},x$=EE,w$=NE,b$=TE,FE=PE,$E=RE,UE=ME,VE=zE,BE=DE,WE=IE;const jx=x$,Cx=w$,_$=b$,HE=g.forwardRef(({className:e,...t},n)=>a.jsx(FE,{className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));HE.displayName=FE.displayName;const Lh=g.forwardRef(({className:e,...t},n)=>a.jsxs(_$,{children:[a.jsx(HE,{}),a.jsx($E,{ref:n,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Lh.displayName=$E.displayName;const zh=({className:e,...t})=>a.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});zh.displayName="AlertDialogHeader";const Fh=({className:e,...t})=>a.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Fh.displayName="AlertDialogFooter";const $h=g.forwardRef(({className:e,...t},n)=>a.jsx(BE,{ref:n,className:se("text-lg font-semibold",e),...t}));$h.displayName=BE.displayName;const Uh=g.forwardRef(({className:e,...t},n)=>a.jsx(WE,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));Uh.displayName=WE.displayName;const Vh=g.forwardRef(({className:e,...t},n)=>a.jsx(UE,{ref:n,className:se(uh(),e),...t}));Vh.displayName=UE.displayName;const Bh=g.forwardRef(({className:e,...t},n)=>a.jsx(VE,{ref:n,className:se(uh({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Bh.displayName=VE.displayName;function Ex(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Nx="Switch",[S$,k9]=un(Nx),[k$,j$]=S$(Nx),KE=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:i,disabled:l,value:c="on",onCheckedChange:u,...d}=e,[f,h]=g.useState(null),m=Ye(t,v=>h(v)),x=g.useRef(!1),p=f?!!f.closest("form"):!0,[w=!1,y]=zn({prop:s,defaultProp:o,onChange:u});return a.jsxs(k$,{scope:n,checked:w,disabled:l,children:[a.jsx(Te.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":ZE(w),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:m,onClick:ge(e.onClick,v=>{y(b=>!b),p&&(x.current=v.isPropagationStopped(),x.current||v.stopPropagation())})}),p&&a.jsx(C$,{control:f,bubbles:!x.current,name:r,value:c,checked:w,required:i,disabled:l,style:{transform:"translateX(-100%)"}})]})});KE.displayName=Nx;var YE="SwitchThumb",GE=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=j$(YE,n);return a.jsx(Te.span,{"data-state":ZE(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});GE.displayName=YE;var C$=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=g.useRef(null),i=Ex(n),l=xv(t);return g.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]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ZE(e){return e?"checked":"unchecked"}var qE=KE,E$=GE;const dl=g.forwardRef(({className:e,...t},n)=>a.jsx(qE,{className:se("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:a.jsx(E$,{className:se("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));dl.displayName=qE.displayName;var Tx="ToastProvider",[Px,N$,T$]=tu("Toast"),[XE,j9]=un("Toast",[T$]),[P$,Wh]=XE(Tx),QE=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[l,c]=g.useState(null),[u,d]=g.useState(0),f=g.useRef(!1),h=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tx}\`. Expected non-empty \`string\`.`),a.jsx(Px.Provider,{scope:t,children:a.jsx(P$,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:g.useCallback(()=>d(m=>m+1),[]),onToastRemove:g.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};QE.displayName=Tx;var JE="ToastViewport",R$=["F8"],Ig="toast.viewportPause",Mg="toast.viewportResume",eN=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=R$,label:s="Notifications ({hotkey})",...o}=e,i=Wh(JE,n),l=N$(n),c=g.useRef(null),u=g.useRef(null),d=g.useRef(null),f=g.useRef(null),h=Ye(t,f,i.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;g.useEffect(()=>{const w=y=>{var b;r.every(_=>y[_]||y.code===_)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),g.useEffect(()=>{const w=c.current,y=f.current;if(x&&w&&y){const v=()=>{if(!i.isClosePausedRef.current){const C=new CustomEvent(Ig);y.dispatchEvent(C),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const C=new CustomEvent(Mg);y.dispatchEvent(C),i.isClosePausedRef.current=!1}},_=C=>{!w.contains(C.relatedTarget)&&b()},j=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",v),w.addEventListener("focusout",_),w.addEventListener("pointermove",v),w.addEventListener("pointerleave",j),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",v),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",v),w.removeEventListener("pointerleave",j),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[x,i.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:w})=>{const v=l().map(b=>{const _=b.ref.current,j=[_,...W$(_)];return w==="forwards"?j:j.reverse()});return(w==="forwards"?v.reverse():v).flat()},[l]);return g.useEffect(()=>{const w=f.current;if(w){const y=v=>{var j,C,T;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const R=document.activeElement,A=v.shiftKey;if(v.target===w&&A){(j=u.current)==null||j.focus();return}const N=p({tabbingDirection:A?"backwards":"forwards"}),z=N.findIndex(S=>S===R);op(N.slice(z+1))?v.preventDefault():A?(C=u.current)==null||C.focus():(T=d.current)==null||T.focus()}};return w.addEventListener("keydown",y),()=>w.removeEventListener("keydown",y)}},[l,p]),a.jsxs(kM,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&a.jsx(Lg,{ref:u,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"forwards"});op(w)}}),a.jsx(Px.Slot,{scope:n,children:a.jsx(Te.ol,{tabIndex:-1,...o,ref:h})}),x&&a.jsx(Lg,{ref:d,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"backwards"});op(w)}})]})});eN.displayName=JE;var tN="ToastFocusProxy",Lg=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Wh(tN,n);return a.jsx(mu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const l=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(l))&&r()}})});Lg.displayName=tN;var Hh="Toast",A$="toast.swipeStart",D$="toast.swipeMove",O$="toast.swipeCancel",I$="toast.swipeEnd",nN=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[l=!0,c]=zn({prop:r,defaultProp:s,onChange:o});return a.jsx(dn,{present:n||l,children:a.jsx(z$,{open:l,...i,ref:t,onClose:()=>c(!1),onPause:It(e.onPause),onResume:It(e.onResume),onSwipeStart:ge(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ge(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:ge(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:ge(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)})})})});nN.displayName=Hh;var[M$,L$]=XE(Hh,{onClose(){}}),z$=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...x}=e,p=Wh(Hh,n),[w,y]=g.useState(null),v=Ye(t,S=>y(S)),b=g.useRef(null),_=g.useRef(null),j=s||p.duration,C=g.useRef(0),T=g.useRef(j),R=g.useRef(0),{onToastAdd:A,onToastRemove:O}=p,G=It(()=>{var U;(w==null?void 0:w.contains(document.activeElement))&&((U=p.viewport)==null||U.focus()),i()}),N=g.useCallback(S=>{!S||S===1/0||(window.clearTimeout(R.current),C.current=new Date().getTime(),R.current=window.setTimeout(G,S))},[G]);g.useEffect(()=>{const S=p.viewport;if(S){const U=()=>{N(T.current),u==null||u()},J=()=>{const F=new Date().getTime()-C.current;T.current=T.current-F,window.clearTimeout(R.current),c==null||c()};return S.addEventListener(Ig,J),S.addEventListener(Mg,U),()=>{S.removeEventListener(Ig,J),S.removeEventListener(Mg,U)}}},[p.viewport,j,c,u,N]),g.useEffect(()=>{o&&!p.isClosePausedRef.current&&N(j)},[o,j,p.isClosePausedRef,N]),g.useEffect(()=>(A(),()=>O()),[A,O]);const z=g.useMemo(()=>w?cN(w):null,[w]);return p.viewport?a.jsxs(a.Fragment,{children:[z&&a.jsx(F$,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),a.jsx(M$,{scope:n,onClose:G,children:Bs.createPortal(a.jsx(Px.ItemSlot,{scope:n,children:a.jsx(SM,{asChild:!0,onEscapeKeyDown:ge(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||G(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(Te.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":p.swipeDirection,...x,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ge(e.onKeyDown,S=>{S.key==="Escape"&&(l==null||l(S.nativeEvent),S.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:ge(e.onPointerDown,S=>{S.button===0&&(b.current={x:S.clientX,y:S.clientY})}),onPointerMove:ge(e.onPointerMove,S=>{if(!b.current)return;const U=S.clientX-b.current.x,J=S.clientY-b.current.y,F=!!_.current,W=["left","right"].includes(p.swipeDirection),I=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,X=W?I(0,U):0,$=W?0:I(0,J),B=S.pointerType==="touch"?10:2,xe={x:X,y:$},ie={originalEvent:S,delta:xe};F?(_.current=xe,ed(D$,f,ie,{discrete:!1})):zb(xe,p.swipeDirection,B)?(_.current=xe,ed(A$,d,ie,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs(U)>B||Math.abs(J)>B)&&(b.current=null)}),onPointerUp:ge(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 F=S.currentTarget,W={originalEvent:S,delta:U};zb(U,p.swipeDirection,p.swipeThreshold)?ed(I$,m,W,{discrete:!0}):ed(O$,h,W,{discrete:!0}),F.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),F$=e=>{const{__scopeToast:t,children:n,...r}=e,s=Wh(Hh,t),[o,i]=g.useState(!1),[l,c]=g.useState(!1);return V$(()=>i(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:a.jsx(ru,{asChild:!0,children:a.jsx(mu,{...r,children:o&&a.jsxs(a.Fragment,{children:[s.label," ",n]})})})},$$="ToastTitle",rN=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(Te.div,{...r,ref:t})});rN.displayName=$$;var U$="ToastDescription",sN=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(Te.div,{...r,ref:t})});sN.displayName=U$;var oN="ToastAction",iN=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?a.jsx(lN,{altText:n,asChild:!0,children:a.jsx(Rx,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${oN}\`. Expected non-empty \`string\`.`),null)});iN.displayName=oN;var aN="ToastClose",Rx=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=L$(aN,n);return a.jsx(lN,{asChild:!0,children:a.jsx(Te.button,{type:"button",...r,ref:t,onClick:ge(e.onClick,s.onClose)})})});Rx.displayName=aN;var lN=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return a.jsx(Te.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function cN(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),B$(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(...cN(r))}}),t}function ed(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?dv(s,o):s.dispatchEvent(o)}var zb=(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 V$(e=()=>{}){const t=It(e);Bt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function B$(e){return e.nodeType===e.ELEMENT_NODE}function W$(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 op(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var H$=QE,uN=eN,dN=nN,fN=rN,hN=sN,mN=iN,pN=Rx;const K$=H$,gN=g.forwardRef(({className:e,...t},n)=>a.jsx(uN,{ref:n,className:se("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));gN.displayName=uN.displayName;const Y$=eu("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"}}),yN=g.forwardRef(({className:e,variant:t,...n},r)=>a.jsx(dN,{ref:r,className:se(Y$({variant:t}),e),...n}));yN.displayName=dN.displayName;const G$=g.forwardRef(({className:e,...t},n)=>a.jsx(mN,{ref:n,className:se("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));G$.displayName=mN.displayName;const vN=g.forwardRef(({className:e,...t},n)=>a.jsx(pN,{ref:n,className:se("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(lv,{className:"h-4 w-4"})}));vN.displayName=pN.displayName;const xN=g.forwardRef(({className:e,...t},n)=>a.jsx(fN,{ref:n,className:se("text-sm font-semibold",e),...t}));xN.displayName=fN.displayName;const wN=g.forwardRef(({className:e,...t},n)=>a.jsx(hN,{ref:n,className:se("text-sm opacity-90",e),...t}));wN.displayName=hN.displayName;const Z$=1,q$=1e6;let ip=0;function X$(){return ip=(ip+1)%Number.MAX_SAFE_INTEGER,ip.toString()}const ap=new Map,Fb=e=>{if(ap.has(e))return;const t=setTimeout(()=>{ap.delete(e),ec({type:"REMOVE_TOAST",toastId:e})},q$);ap.set(e,t)},Q$=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Z$)};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?Fb(n):e.toasts.forEach(r=>{Fb(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)}}},jd=[];let Cd={toasts:[]};function ec(e){Cd=Q$(Cd,e),jd.forEach(t=>{t(Cd)})}function J$({...e}){const t=X$(),n=s=>ec({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>ec({type:"DISMISS_TOAST",toastId:t});return ec({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function wr(){const[e,t]=g.useState(Cd);return g.useEffect(()=>(jd.push(t),()=>{const n=jd.indexOf(t);n>-1&&jd.splice(n,1)}),[e]),{...e,toast:J$,dismiss:n=>ec({type:"DISMISS_TOAST",toastId:n})}}function Ax(){const{toasts:e}=wr();return a.jsxs(K$,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return a.jsxs(yN,{...o,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(xN,{children:n}),r&&a.jsx(wN,{children:r})]}),s,a.jsx(vN,{})]},t)}),a.jsx(gN,{})]})}function td(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 bN={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 td=="function"&&td;if(!d&&f)return f(u,!0);if(l)return l(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var m=s[u]={exports:{}};r[u][0].call(m.exports,function(x){var p=r[u][1][x];return i(p||x)},m,m.exports,n,r,s,o)}return s[u].exports}for(var l=typeof td=="function"&&td,c=0;c<o.length;c++)i(o[c]);return i}({1:[function(n,r,s){var o=n("./utils"),i=n("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(c){for(var u,d,f,h,m,x,p,w=[],y=0,v=c.length,b=v,_=o.getTypeOf(c)!=="string";y<c.length;)b=v-y,f=_?(u=c[y++],d=y<v?c[y++]:0,y<v?c[y++]:0):(u=c.charCodeAt(y++),d=y<v?c.charCodeAt(y++):0,y<v?c.charCodeAt(y++):0),h=u>>2,m=(3&u)<<4|d>>4,x=1<b?(15&d)<<2|f>>6:64,p=2<b?63&f:64,w.push(l.charAt(h)+l.charAt(m)+l.charAt(x)+l.charAt(p));return w.join("")},s.decode=function(c){var u,d,f,h,m,x,p=0,w=0,y="data:";if(c.substr(0,y.length)===y)throw new Error("Invalid base64 input, it looks like a data url.");var v,b=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===l.charAt(64)&&b--,c.charAt(c.length-2)===l.charAt(64)&&b--,b%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|b):new Array(0|b);p<c.length;)u=l.indexOf(c.charAt(p++))<<2|(h=l.indexOf(c.charAt(p++)))>>4,d=(15&h)<<4|(m=l.indexOf(c.charAt(p++)))>>2,f=(3&m)<<6|(x=l.indexOf(c.charAt(p++))),v[w++]=u,m!==64&&(v[w++]=d),x!==64&&(v[w++]=f);return v}},{"./support":30,"./utils":32}],2:[function(n,r,s){var o=n("./external"),i=n("./stream/DataWorker"),l=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,h,m,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=h,this.compression=m,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 l).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 l,c=[],u=0;u<256;u++){l=u;for(var d=0;d<8;d++)l=1&l?3988292384^l>>>1:l>>>1;c[u]=l}return c}();r.exports=function(l,c){return l!==void 0&&l.length?o.getTypeOf(l)!=="string"?function(u,d,f,h){var m=i,x=h+f;u^=-1;for(var p=h;p<x;p++)u=u>>>8^m[255&(u^d[p])];return-1^u}(0|c,l,l.length,0):function(u,d,f,h){var m=i,x=h+f;u^=-1;for(var p=h;p<x;p++)u=u>>>8^m[255&(u^d.charCodeAt(p))];return-1^u}(0|c,l,l.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"),l=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",l.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(l.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(m,x){var p,w="";for(p=0;p<x;p++)w+=String.fromCharCode(255&m),m>>>=8;return w}function i(m,x,p,w,y,v){var b,_,j=m.file,C=m.compression,T=v!==u.utf8encode,R=l.transformTo("string",v(j.name)),A=l.transformTo("string",u.utf8encode(j.name)),O=j.comment,G=l.transformTo("string",v(O)),N=l.transformTo("string",u.utf8encode(O)),z=A.length!==j.name.length,S=N.length!==O.length,U="",J="",F="",W=j.dir,I=j.date,X={crc32:0,compressedSize:0,uncompressedSize:0};x&&!p||(X.crc32=m.crc32,X.compressedSize=m.compressedSize,X.uncompressedSize=m.uncompressedSize);var $=0;x&&($|=8),T||!z&&!S||($|=2048);var B=0,xe=0;W&&(B|=16),y==="UNIX"?(xe=798,B|=function(ae,Ie){var we=ae;return ae||(we=Ie?16893:33204),(65535&we)<<16}(j.unixPermissions,W)):(xe=20,B|=function(ae){return 63&(ae||0)}(j.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(),z&&(J=o(1,1)+o(d(R),4)+A,U+="up"+o(J.length,2)+J),S&&(F=o(1,1)+o(d(G),4)+N,U+="uc"+o(F.length,2)+F);var ie="";return ie+=`
\0`,ie+=o($,2),ie+=C.magic,ie+=o(b,2),ie+=o(_,2),ie+=o(X.crc32,4),ie+=o(X.compressedSize,4),ie+=o(X.uncompressedSize,4),ie+=o(R.length,2),ie+=o(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+ie+R+U,dirRecord:f.CENTRAL_FILE_HEADER+o(xe,2)+ie+o(G.length,2)+"\0\0\0\0"+o(B,4)+o(w,4)+R+U+G}}var l=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(m,x,p,w){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=p,this.encodeFileName=w,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(h,c),h.prototype.push=function(m){var x=m.meta.percent||0,p=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,c.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:p?(x+100*(p-w-1))/p:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var x=this.streamFiles&&!m.file.dir;if(x){var p=i(m,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var x=this.streamFiles&&!m.file.dir,p=i(m,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),x)this.push({data:function(w){return f.DATA_DESCRIPTOR+o(w.crc32,4)+o(w.compressedSize,4)+o(w.uncompressedSize,4)}(m),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var p=this.bytesWritten-m,w=function(y,v,b,_,j){var C=l.transformTo("string",j(_));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(y,2)+o(y,2)+o(v,4)+o(b,4)+o(C.length,2)+C}(this.dirRecords.length,p,m,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(m){this._sources.push(m);var x=this;return m.on("data",function(p){x.processChunk(p)}),m.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),m.on("error",function(p){x.error(p)}),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(m){var x=this._sources;if(!c.prototype.error.call(this,m))return!1;for(var p=0;p<x.length;p++)try{x[p].error(m)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var m=this._sources,x=0;x<m.length;x++)m[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(l,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{l.forEach(function(h,m){f++;var x=function(v,b){var _=v||b,j=o[_];if(!j)throw new Error(_+" is not a valid compression method !");return j}(m.options.compression,c.compression),p=m.options.compressionOptions||c.compressionOptions||{},w=m.dir,y=m.date;m._compressWorker(x,p).withStreamInfo("file",{name:h,dir:w,date:y,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.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 l in this)typeof this[l]!="function"&&(i[l]=this[l]);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,l){return new o().loadAsync(i,l)},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"),l=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new i.Promise(function(m,x){var p=h.decompressed.getContentWorker().pipe(new u);p.on("error",function(w){x(w)}).on("end",function(){p.streamInfo.crc32!==h.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}r.exports=function(h,m){var x=this;return m=o.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.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,m.optimizedBinaryString,m.base64).then(function(p){var w=new c(m);return w.load(p),w}).then(function(p){var w=[i.Promise.resolve(p)],y=p.files;if(m.checkCRC32)for(var v=0;v<y.length;v++)w.push(f(y[v]));return i.Promise.all(w)}).then(function(p){for(var w=p.shift(),y=w.files,v=0;v<y.length;v++){var b=y[v],_=b.fileNameStr,j=o.resolve(b.fileNameStr);x.file(j,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:m.createFolders}),b.dir||(x.file(j).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 l(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}o.inherits(l,i),l.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()})},l.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,s){var o=n("readable-stream").Readable;function i(l,c,u){o.call(this,c),this._helper=l;var d=this;l.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(j,C,T){var R,A=l.getTypeOf(C),O=l.extend(T||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(j=y(j)),O.createFolders&&(R=w(j))&&v.call(this,R,!0);var G=A==="string"&&O.binary===!1&&O.base64===!1;T&&T.binary!==void 0||(O.binary=!G),(C instanceof f&&C.uncompressedSize===0||O.dir||!C||C.length===0)&&(O.base64=!1,O.binary=!0,C="",O.compression="STORE",A="string");var N=null;N=C instanceof f||C instanceof c?C:x.isNode&&x.isStream(C)?new p(j,C):l.prepareContent(j,C,O.binary,O.optimizedBinaryString,O.base64);var z=new h(j,N,O);this.files[j]=z}var i=n("./utf8"),l=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),m=n("./generate"),x=n("./nodejsUtils"),p=n("./nodejs/NodejsStreamInputAdapter"),w=function(j){j.slice(-1)==="/"&&(j=j.substring(0,j.length-1));var C=j.lastIndexOf("/");return 0<C?j.substring(0,C):""},y=function(j){return j.slice(-1)!=="/"&&(j+="/"),j},v=function(j,C){return C=C!==void 0?C:d.createFolders,j=y(j),this.files[j]||o.call(this,j,null,{dir:!0,createFolders:C}),this.files[j]};function b(j){return Object.prototype.toString.call(j)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(j){var C,T,R;for(C in this.files)R=this.files[C],(T=C.slice(this.root.length,C.length))&&C.slice(0,this.root.length)===this.root&&j(T,R)},filter:function(j){var C=[];return this.forEach(function(T,R){j(T,R)&&C.push(R)}),C},file:function(j,C,T){if(arguments.length!==1)return j=this.root+j,o.call(this,j,C,T),this;if(b(j)){var R=j;return this.filter(function(O,G){return!G.dir&&R.test(O)})}var A=this.files[this.root+j];return A&&!A.dir?A:null},folder:function(j){if(!j)return this;if(b(j))return this.filter(function(A,O){return O.dir&&j.test(A)});var C=this.root+j,T=v.call(this,C),R=this.clone();return R.root=T.name,R},remove:function(j){j=this.root+j;var C=this.files[j];if(C||(j.slice(-1)!=="/"&&(j+="/"),C=this.files[j]),C&&!C.dir)delete this.files[j];else for(var T=this.filter(function(A,O){return O.name.slice(0,j.length)===j}),R=0;R<T.length;R++)delete this.files[T[R].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(j){var C,T={};try{if((T=l.extend(j||{},{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.");l.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 R=T.comment||this.comment||"";C=m.generateWorker(this,T,R)}catch(A){(C=new c("error")).error(A)}return new u(C,T.type||"string",T.mimeType)},generateAsync:function(j,C){return this.generateInternalStream(j).accumulate(C)},generateNodeStream:function(j,C){return(j=j||{}).type||(j.type="nodebuffer"),this.generateInternalStream(j).toNodejsStream(C)}};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(l){o.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}n("../utils").inherits(i,o),i.prototype.byteAt=function(l){return this.data[this.zero+l]},i.prototype.lastIndexOfSignature=function(l){for(var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.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(l){var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.charCodeAt(3),h=this.readData(4);return c===h[0]&&u===h[1]&&d===h[2]&&f===h[3]},i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,s){var o=n("../utils");function i(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(l){this.checkIndex(this.index+l)},checkIndex:function(l){if(this.length<this.zero+l||l<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+l+"). Corrupted zip ?")},setIndex:function(l){this.checkIndex(l),this.index=l},skip:function(l){this.setIndex(this.index+l)},byteAt:function(){},readInt:function(l){var c,u=0;for(this.checkOffset(l),c=this.index+l-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=l,u},readString:function(l){return o.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},r.exports=i},{"../utils":32}],19:[function(n,r,s){var o=n("./Uint8ArrayReader");function i(l){o.call(this,l)}n("../utils").inherits(i,o),i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,s){var o=n("./DataReader");function i(l){o.call(this,l)}n("../utils").inherits(i,o),i.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},i.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},i.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,s){var o=n("./ArrayReader");function i(l){o.call(this,l)}n("../utils").inherits(i,o),i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,s){var o=n("../utils"),i=n("../support"),l=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 l(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 l(c){o.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(l,o),l.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,s){var o=n("./GenericWorker"),i=n("../crc32");function l(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(l,o),l.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function l(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(l,i),l.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=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function l(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(l,i),l.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.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=l},{"../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,l){return this._listeners[i].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,l){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,l)},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 l=this;return i.on("data",function(c){l.processChunk(c)}),i.on("end",function(){l.end()}),i.on("error",function(c){l.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,l){return this.extraStreamInfo[i]=l,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"),l=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,p){return new d.Promise(function(w,y){var v=[],b=x._internalType,_=x._outputType,j=x._mimeType;x.on("data",function(C,T){v.push(C),p&&p(T)}).on("error",function(C){v=[],y(C)}).on("end",function(){try{var C=function(T,R,A){switch(T){case"blob":return o.newBlob(o.transformTo("arraybuffer",R),A);case"base64":return c.encode(R);default:return o.transformTo(T,R)}}(_,function(T,R){var A,O=0,G=null,N=0;for(A=0;A<R.length;A++)N+=R[A].length;switch(T){case"string":return R.join("");case"array":return Array.prototype.concat.apply([],R);case"uint8array":for(G=new Uint8Array(N),A=0;A<R.length;A++)G.set(R[A],O),O+=R[A].length;return G;case"nodebuffer":return Buffer.concat(R);default:throw new Error("concat : unsupported type '"+T+"'")}}(b,v),j);w(C)}catch(T){y(T)}v=[]}).resume()})}function m(x,p,w){var y=p;switch(p){case"blob":case"arraybuffer":y="uint8array";break;case"base64":y="string"}try{this._internalType=y,this._outputType=p,this._mimeType=w,o.checkSupport(y),this._worker=x.pipe(new i(y)),x.lock()}catch(v){this._worker=new l("error"),this._worker.error(v)}}m.prototype={accumulate:function(x){return h(this,x)},on:function(x,p){var w=this;return x==="data"?this._worker.on(x,function(y){p.call(w,y.data,y.meta)}):this._worker.on(x,function(){o.delay(p,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=m},{"../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"),l=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(m){return i.nodebuffer?l.newBufferFrom(m,"utf-8"):function(x){var p,w,y,v,b,_=x.length,j=0;for(v=0;v<_;v++)(64512&(w=x.charCodeAt(v)))==55296&&v+1<_&&(64512&(y=x.charCodeAt(v+1)))==56320&&(w=65536+(w-55296<<10)+(y-56320),v++),j+=w<128?1:w<2048?2:w<65536?3:4;for(p=i.uint8array?new Uint8Array(j):new Array(j),v=b=0;b<j;v++)(64512&(w=x.charCodeAt(v)))==55296&&v+1<_&&(64512&(y=x.charCodeAt(v+1)))==56320&&(w=65536+(w-55296<<10)+(y-56320),v++),w<128?p[b++]=w:(w<2048?p[b++]=192|w>>>6:(w<65536?p[b++]=224|w>>>12:(p[b++]=240|w>>>18,p[b++]=128|w>>>12&63),p[b++]=128|w>>>6&63),p[b++]=128|63&w);return p}(m)},s.utf8decode=function(m){return i.nodebuffer?o.transformTo("nodebuffer",m).toString("utf-8"):function(x){var p,w,y,v,b=x.length,_=new Array(2*b);for(p=w=0;p<b;)if((y=x[p++])<128)_[w++]=y;else if(4<(v=u[y]))_[w++]=65533,p+=v-1;else{for(y&=v===2?31:v===3?15:7;1<v&&p<b;)y=y<<6|63&x[p++],v--;1<v?_[w++]=65533:y<65536?_[w++]=y:(y-=65536,_[w++]=55296|y>>10&1023,_[w++]=56320|1023&y)}return _.length!==w&&(_.subarray?_=_.subarray(0,w):_.length=w),o.applyFromCharCode(_)}(m=o.transformTo(i.uint8array?"uint8array":"array",m))},o.inherits(f,c),f.prototype.processChunk=function(m){var x=o.transformTo(i.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var p=x;(x=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),x.set(p,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var w=function(v,b){var _;for((b=b||v.length)>v.length&&(b=v.length),_=b-1;0<=_&&(192&v[_])==128;)_--;return _<0||_===0?b:_+u[v[_]]>b?_:b}(x),y=x;w!==x.length&&(i.uint8array?(y=x.subarray(0,w),this.leftOver=x.subarray(w,x.length)):(y=x.slice(0,w),this.leftOver=x.slice(w,x.length))),this.push({data:s.utf8decode(y),meta:m.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(m){this.push({data:s.utf8encode(m.data),meta:m.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"),l=n("./nodejsUtils"),c=n("./external");function u(p){return p}function d(p,w){for(var y=0;y<p.length;++y)w[y]=255&p.charCodeAt(y);return w}n("setimmediate"),s.newBlob=function(p,w){s.checkSupport("blob");try{return new Blob([p],{type:w})}catch{try{var y=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return y.append(p),y.getBlob(w)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(p,w,y){var v=[],b=0,_=p.length;if(_<=y)return String.fromCharCode.apply(null,p);for(;b<_;)w==="array"||w==="nodebuffer"?v.push(String.fromCharCode.apply(null,p.slice(b,Math.min(b+y,_)))):v.push(String.fromCharCode.apply(null,p.subarray(b,Math.min(b+y,_)))),b+=y;return v.join("")},stringifyByChar:function(p){for(var w="",y=0;y<p.length;y++)w+=String.fromCharCode(p[y]);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,l.allocBuffer(1)).length===1}catch{return!1}}()}};function h(p){var w=65536,y=s.getTypeOf(p),v=!0;if(y==="uint8array"?v=f.applyCanBeUsed.uint8array:y==="nodebuffer"&&(v=f.applyCanBeUsed.nodebuffer),v)for(;1<w;)try{return f.stringifyByChunk(p,y,w)}catch{w=Math.floor(w/2)}return f.stringifyByChar(p)}function m(p,w){for(var y=0;y<p.length;y++)w[y]=p[y];return w}s.applyFromCharCode=h;var x={};x.string={string:u,array:function(p){return d(p,new Array(p.length))},arraybuffer:function(p){return x.string.uint8array(p).buffer},uint8array:function(p){return d(p,new Uint8Array(p.length))},nodebuffer:function(p){return d(p,l.allocBuffer(p.length))}},x.array={string:h,array:u,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return l.newBufferFrom(p)}},x.arraybuffer={string:function(p){return h(new Uint8Array(p))},array:function(p){return m(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:u,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return l.newBufferFrom(new Uint8Array(p))}},x.uint8array={string:h,array:function(p){return m(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:u,nodebuffer:function(p){return l.newBufferFrom(p)}},x.nodebuffer={string:h,array:function(p){return m(p,new Array(p.length))},arraybuffer:function(p){return x.nodebuffer.uint8array(p).buffer},uint8array:function(p){return m(p,new Uint8Array(p.length))},nodebuffer:u},s.transformTo=function(p,w){if(w=w||"",!p)return w;s.checkSupport(p);var y=s.getTypeOf(w);return x[y][p](w)},s.resolve=function(p){for(var w=p.split("/"),y=[],v=0;v<w.length;v++){var b=w[v];b==="."||b===""&&v!==0&&v!==w.length-1||(b===".."?y.pop():y.push(b))}return y.join("/")},s.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":o.nodebuffer&&l.isBuffer(p)?"nodebuffer":o.uint8array&&p instanceof Uint8Array?"uint8array":o.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(p){if(!o[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(p){var w,y,v="";for(y=0;y<(p||"").length;y++)v+="\\x"+((w=p.charCodeAt(y))<16?"0":"")+w.toString(16).toUpperCase();return v},s.delay=function(p,w,y){setImmediate(function(){p.apply(y||null,w||[])})},s.inherits=function(p,w){function y(){}y.prototype=w.prototype,p.prototype=new y},s.extend=function(){var p,w,y={};for(p=0;p<arguments.length;p++)for(w in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],w)&&y[w]===void 0&&(y[w]=arguments[p][w]);return y},s.prepareContent=function(p,w,y,v,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(j,C){var T=new FileReader;T.onload=function(R){j(R.target.result)},T.onerror=function(R){C(R.target.error)},T.readAsArrayBuffer(_)}):_}).then(function(_){var j=s.getTypeOf(_);return j?(j==="arraybuffer"?_=s.transformTo("uint8array",_):j==="string"&&(b?_=i.decode(_):y&&v!==!0&&(_=function(C){return d(C,o.uint8array?new Uint8Array(C.length):new Array(C.length))}(_))),_):c.Promise.reject(new Error("Can't read the data of '"+p+"'. 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"),l=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 m=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===h;return this.reader.setIndex(m),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",m=i.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(m)},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,m,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),h=this.reader.readInt(4),m=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:m}},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(l.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(l.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(l.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,l.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(l.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(l.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(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.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(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var x=h-m;if(0<x)this.isSignature(h,l.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"),l=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(m,x){this.options=m,this.loadOptions=x}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var x,p;if(m.skip(22),this.fileNameLength=m.readInt(2),p=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(p),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 y in d)if(Object.prototype.hasOwnProperty.call(d,y)&&d[y].magic===w)return d[y];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 l(this.compressedSize,this.uncompressedSize,this.crc32,x,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var x=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(x),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var x,p,w,y=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<y;)x=m.readInt(2),p=m.readInt(2),w=m.readData(p),this.extraFields[x]={id:x,length:p,value:w};m.setIndex(y)},handleUTF8:function(){var m=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 p=i.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var w=this.findExtraFieldUnicodeComment();if(w!==null)this.fileCommentStr=w;else{var y=i.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(y)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var x=o(m.value);return x.readInt(1)!==1||c(this.fileName)!==x.readInt(4)?null:u.utf8decode(x.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var x=o(m.value);return x.readInt(1)!==1||c(this.fileComment)!==x.readInt(4)?null:u.utf8decode(x.readData(m.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,p,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=p,this._dataBinary=w.binary,this.options={compression:w.compression,compressionOptions:w.compressionOptions}}var i=n("./stream/StreamHelper"),l=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");o.prototype={internalStream:function(x){var p=null,w="string";try{if(!x)throw new Error("No output type specified.");var y=(w=x.toLowerCase())==="string"||w==="text";w!=="binarystring"&&w!=="text"||(w="string"),p=this._decompressWorker();var v=!this._dataBinary;v&&!y&&(p=p.pipe(new c.Utf8EncodeWorker)),!v&&y&&(p=p.pipe(new c.Utf8DecodeWorker))}catch(b){(p=new d("error")).error(b)}return new i(p,w,"")},async:function(x,p){return this.internalStream(x).accumulate(p)},nodeStream:function(x,p){return this.internalStream(x||"nodebuffer").toNodejsStream(p)},_compressWorker:function(x,p){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,p)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new l(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.")},m=0;m<f.length;m++)o.prototype[f[m]]=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,l,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 p=o.document.createElement("script");p.onreadystatechange=function(){x(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},o.document.documentElement.appendChild(p)}:function(){setTimeout(x,0)};else{var h=new o.MessageChannel;h.port1.onmessage=x,i=function(){h.port2.postMessage(0)}}var m=[];function x(){var p,w;l=!0;for(var y=m.length;y;){for(w=m,m=[],p=-1;++p<y;)w[p]();y=m.length}l=!1}r.exports=function(p){m.push(p)!==1||l||i()}}).call(this,typeof ju<"u"?ju:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,s){var o=n("immediate");function i(){}var l={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(y){if(typeof y!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,y!==i&&p(this,y)}function h(y,v,b){this.promise=y,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof b=="function"&&(this.onRejected=b,this.callRejected=this.otherCallRejected)}function m(y,v,b){o(function(){var _;try{_=v(b)}catch(j){return l.reject(y,j)}_===y?l.reject(y,new TypeError("Cannot resolve promise with itself")):l.resolve(y,_)})}function x(y){var v=y&&y.then;if(y&&(typeof y=="object"||typeof y=="function")&&typeof v=="function")return function(){v.apply(y,arguments)}}function p(y,v){var b=!1;function _(T){b||(b=!0,l.reject(y,T))}function j(T){b||(b=!0,l.resolve(y,T))}var C=w(function(){v(j,_)});C.status==="error"&&_(C.value)}function w(y,v){var b={};try{b.value=y(v),b.status="success"}catch(_){b.status="error",b.value=_}return b}(r.exports=f).prototype.finally=function(y){if(typeof y!="function")return this;var v=this.constructor;return this.then(function(b){return v.resolve(y()).then(function(){return b})},function(b){return v.resolve(y()).then(function(){throw b})})},f.prototype.catch=function(y){return this.then(null,y)},f.prototype.then=function(y,v){if(typeof y!="function"&&this.state===u||typeof v!="function"&&this.state===c)return this;var b=new this.constructor(i);return this.state!==d?m(b,this.state===u?y:v,this.outcome):this.queue.push(new h(b,y,v)),b},h.prototype.callFulfilled=function(y){l.resolve(this.promise,y)},h.prototype.otherCallFulfilled=function(y){m(this.promise,this.onFulfilled,y)},h.prototype.callRejected=function(y){l.reject(this.promise,y)},h.prototype.otherCallRejected=function(y){m(this.promise,this.onRejected,y)},l.resolve=function(y,v){var b=w(x,v);if(b.status==="error")return l.reject(y,b.value);var _=b.value;if(_)p(y,_);else{y.state=u,y.outcome=v;for(var j=-1,C=y.queue.length;++j<C;)y.queue[j].callFulfilled(v)}return y},l.reject=function(y,v){y.state=c,y.outcome=v;for(var b=-1,_=y.queue.length;++b<_;)y.queue[b].callRejected(v);return y},f.resolve=function(y){return y instanceof this?y:l.resolve(new this(i),y)},f.reject=function(y){var v=new this(i);return l.reject(v,y)},f.all=function(y){var v=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=y.length,_=!1;if(!b)return this.resolve([]);for(var j=new Array(b),C=0,T=-1,R=new this(i);++T<b;)A(y[T],T);return R;function A(O,G){v.resolve(O).then(function(N){j[G]=N,++C!==b||_||(_=!0,l.resolve(R,j))},function(N){_||(_=!0,l.reject(R,N))})}},f.race=function(y){var v=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=y.length,_=!1;if(!b)return this.resolve([]);for(var j=-1,C=new this(i);++j<b;)T=y[j],v.resolve(T).then(function(R){_||(_=!0,l.resolve(C,R))},function(R){_||(_=!0,l.reject(C,R))});var T;return C}},{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"),l=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,m=0,x=8;function p(y){if(!(this instanceof p))return new p(y);this.options=i.assign({level:h,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},y||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.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,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(b!==f)throw new Error(c[b]);if(v.header&&o.deflateSetHeader(this.strm,v.header),v.dictionary){var _;if(_=typeof v.dictionary=="string"?l.string2buf(v.dictionary):d.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(b=o.deflateSetDictionary(this.strm,_))!==f)throw new Error(c[b]);this._dict_set=!0}}function w(y,v){var b=new p(v);if(b.push(y,!0),b.err)throw b.msg||c[b.err];return b.result}p.prototype.push=function(y,v){var b,_,j=this.strm,C=this.options.chunkSize;if(this.ended)return!1;_=v===~~v?v:v===!0?4:0,typeof y=="string"?j.input=l.string2buf(y):d.call(y)==="[object ArrayBuffer]"?j.input=new Uint8Array(y):j.input=y,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new i.Buf8(C),j.next_out=0,j.avail_out=C),(b=o.deflate(j,_))!==1&&b!==f)return this.onEnd(b),!(this.ended=!0);j.avail_out!==0&&(j.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(i.shrinkBuf(j.output,j.next_out))):this.onData(i.shrinkBuf(j.output,j.next_out)))}while((0<j.avail_in||j.avail_out===0)&&b!==1);return _===4?(b=o.deflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===f):_!==2||(this.onEnd(f),!(j.avail_out=0))},p.prototype.onData=function(y){this.chunks.push(y)},p.prototype.onEnd=function(y){y===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},s.Deflate=p,s.deflate=w,s.deflateRaw=function(y,v){return(v=v||{}).raw=!0,w(y,v)},s.gzip=function(y,v){return(v=v||{}).gzip=!0,w(y,v)}},{"./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"),l=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),f=n("./zlib/gzheader"),h=Object.prototype.toString;function m(p){if(!(this instanceof m))return new m(p);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},p||{});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)||p&&p.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 y=o.inflateInit2(this.strm,w.windowBits);if(y!==c.Z_OK)throw new Error(u[y]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function x(p,w){var y=new m(w);if(y.push(p,!0),y.err)throw y.msg||u[y.err];return y.result}m.prototype.push=function(p,w){var y,v,b,_,j,C,T=this.strm,R=this.options.chunkSize,A=this.options.dictionary,O=!1;if(this.ended)return!1;v=w===~~w?w:w===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof p=="string"?T.input=l.binstring2buf(p):h.call(p)==="[object ArrayBuffer]"?T.input=new Uint8Array(p):T.input=p,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new i.Buf8(R),T.next_out=0,T.avail_out=R),(y=o.inflate(T,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(C=typeof A=="string"?l.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,y=o.inflateSetDictionary(this.strm,C)),y===c.Z_BUF_ERROR&&O===!0&&(y=c.Z_OK,O=!1),y!==c.Z_STREAM_END&&y!==c.Z_OK)return this.onEnd(y),!(this.ended=!0);T.next_out&&(T.avail_out!==0&&y!==c.Z_STREAM_END&&(T.avail_in!==0||v!==c.Z_FINISH&&v!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(b=l.utf8border(T.output,T.next_out),_=T.next_out-b,j=l.buf2string(T.output,b),T.next_out=_,T.avail_out=R-_,_&&i.arraySet(T.output,T.output,b,_,0),this.onData(j)):this.onData(i.shrinkBuf(T.output,T.next_out)))),T.avail_in===0&&T.avail_out===0&&(O=!0)}while((0<T.avail_in||T.avail_out===0)&&y!==c.Z_STREAM_END);return y===c.Z_STREAM_END&&(v=c.Z_FINISH),v===c.Z_FINISH?(y=o.inflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===c.Z_OK):v!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(T.avail_out=0))},m.prototype.onData=function(p){this.chunks.push(p)},m.prototype.onEnd=function(p){p===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},s.Inflate=m,s.inflate=x,s.inflateRaw=function(p,w){return(w=w||{}).raw=!0,x(p,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 m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){var u,d,f,h,m,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++)m=c[u],x.set(m,h),h+=m.length;return x}},l={arraySet:function(c,u,d,f,h){for(var m=0;m<f;m++)c[h+m]=u[d+m]},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,l))},s.setTyped(o)},{}],42:[function(n,r,s){var o=n("./common"),i=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!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&&l||!f.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(f,h));for(var m="",x=0;x<h;x++)m+=String.fromCharCode(f[x]);return m}c[254]=c[254]=1,s.string2buf=function(f){var h,m,x,p,w,y=f.length,v=0;for(p=0;p<y;p++)(64512&(m=f.charCodeAt(p)))==55296&&p+1<y&&(64512&(x=f.charCodeAt(p+1)))==56320&&(m=65536+(m-55296<<10)+(x-56320),p++),v+=m<128?1:m<2048?2:m<65536?3:4;for(h=new o.Buf8(v),p=w=0;w<v;p++)(64512&(m=f.charCodeAt(p)))==55296&&p+1<y&&(64512&(x=f.charCodeAt(p+1)))==56320&&(m=65536+(m-55296<<10)+(x-56320),p++),m<128?h[w++]=m:(m<2048?h[w++]=192|m>>>6:(m<65536?h[w++]=224|m>>>12:(h[w++]=240|m>>>18,h[w++]=128|m>>>12&63),h[w++]=128|m>>>6&63),h[w++]=128|63&m);return h},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var h=new o.Buf8(f.length),m=0,x=h.length;m<x;m++)h[m]=f.charCodeAt(m);return h},s.buf2string=function(f,h){var m,x,p,w,y=h||f.length,v=new Array(2*y);for(m=x=0;m<y;)if((p=f[m++])<128)v[x++]=p;else if(4<(w=c[p]))v[x++]=65533,m+=w-1;else{for(p&=w===2?31:w===3?15:7;1<w&&m<y;)p=p<<6|63&f[m++],w--;1<w?v[x++]=65533:p<65536?v[x++]=p:(p-=65536,v[x++]=55296|p>>10&1023,v[x++]=56320|1023&p)}return d(v,x)},s.utf8border=function(f,h){var m;for((h=h||f.length)>f.length&&(h=f.length),m=h-1;0<=m&&(192&f[m])==128;)m--;return m<0||m===0?h:m+c[f[m]]>h?m:h}},{"./common":41}],43:[function(n,r,s){r.exports=function(o,i,l,c){for(var u=65535&o|0,d=o>>>16&65535|0,f=0;l!==0;){for(l-=f=2e3<l?2e3:l;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,l=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;l[c]=i}return l}();r.exports=function(i,l,c,u){var d=o,f=u+c;i^=-1;for(var h=u;h<f;h++)i=i>>>8^d[255&(i^l[h])];return-1^i}},{}],46:[function(n,r,s){var o,i=n("../utils/common"),l=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,m=0,x=-2,p=-1,w=4,y=2,v=8,b=9,_=286,j=30,C=19,T=2*_+1,R=15,A=3,O=258,G=O+A+1,N=42,z=113,S=1,U=2,J=3,F=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){l._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 xe(E,ee){E.pending_buf[E.pending++]=ee}function ie(E,ee){E.pending_buf[E.pending++]=ee>>>8&255,E.pending_buf[E.pending++]=255&ee}function ae(E,ee){var Z,D,k=E.max_chain_length,P=E.strstart,M=E.prev_length,Y=E.nice_match,L=E.strstart>E.w_size-G?E.strstart-(E.w_size-G):0,K=E.window,Q=E.w_mask,ne=E.prev,be=E.strstart+O,Ge=K[P+M-1],Ve=K[P+M];E.prev_length>=E.good_match&&(k>>=2),Y>E.lookahead&&(Y=E.lookahead);do if(K[(Z=ee)+M]===Ve&&K[Z+M-1]===Ge&&K[Z]===K[P]&&K[++Z]===K[P+1]){P+=2,Z++;do;while(K[++P]===K[++Z]&&K[++P]===K[++Z]&&K[++P]===K[++Z]&&K[++P]===K[++Z]&&K[++P]===K[++Z]&&K[++P]===K[++Z]&&K[++P]===K[++Z]&&K[++P]===K[++Z]&&P<be);if(D=O-(be-P),P=be-O,M<D){if(E.match_start=ee,Y<=(M=D))break;Ge=K[P+M-1],Ve=K[P+M]}}while((ee=ne[ee&Q])>L&&--k!=0);return M<=E.lookahead?M:E.lookahead}function Ie(E){var ee,Z,D,k,P,M,Y,L,K,Q,ne=E.w_size;do{if(k=E.window_size-E.lookahead-E.strstart,E.strstart>=ne+(ne-G)){for(i.arraySet(E.window,E.window,ne,ne,0),E.match_start-=ne,E.strstart-=ne,E.block_start-=ne,ee=Z=E.hash_size;D=E.head[--ee],E.head[ee]=ne<=D?D-ne:0,--Z;);for(ee=Z=ne;D=E.prev[--ee],E.prev[ee]=ne<=D?D-ne:0,--Z;);k+=ne}if(E.strm.avail_in===0)break;if(M=E.strm,Y=E.window,L=E.strstart+E.lookahead,K=k,Q=void 0,Q=M.avail_in,K<Q&&(Q=K),Z=Q===0?0:(M.avail_in-=Q,i.arraySet(Y,M.input,M.next_in,Q,L),M.state.wrap===1?M.adler=c(M.adler,Y,Q,L):M.state.wrap===2&&(M.adler=u(M.adler,Y,Q,L)),M.next_in+=Q,M.total_in+=Q,Q),E.lookahead+=Z,E.lookahead+E.insert>=A)for(P=E.strstart-E.insert,E.ins_h=E.window[P],E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+A-1])&E.hash_mask,E.prev[P&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=P,P++,E.insert--,!(E.lookahead+E.insert<A)););}while(E.lookahead<G&&E.strm.avail_in!==0)}function we(E,ee){for(var Z,D;;){if(E.lookahead<G){if(Ie(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=ae(E,Z)),E.match_length>=A)if(D=l._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 D=l._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(D&&(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:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function ke(E,ee){for(var Z,D,k;;){if(E.lookahead<G){if(Ie(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=ae(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,D=l._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++,D&&(B(E,!1),E.strm.avail_out===0))return S}else if(E.match_available){if((D=l._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&&(D=l._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:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function Pe(E,ee,Z,D,k){this.good_length=E,this.max_lazy=ee,this.nice_length=Z,this.max_chain=D,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=v,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*j+1)),this.bl_tree=new i.Buf16(2*(2*C+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(R+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 Me(E){var ee;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=y,(ee=E.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?N:z,E.adler=ee.wrap===2?0:1,ee.last_flush=f,l._tr_init(ee),m):W(E,x)}function Ae(E){var ee=Me(E);return ee===m&&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 st(E,ee,Z,D,k,P){if(!E)return x;var M=1;if(ee===p&&(ee=6),D<0?(M=0,D=-D):15<D&&(M=2,D-=16),k<1||b<k||Z!==v||D<8||15<D||ee<0||9<ee||P<0||w<P)return W(E,x);D===8&&(D=9);var Y=new Fe;return(E.state=Y).strm=E,Y.wrap=M,Y.gzhead=null,Y.w_bits=D,Y.w_size=1<<Y.w_bits,Y.w_mask=Y.w_size-1,Y.hash_bits=k+7,Y.hash_size=1<<Y.hash_bits,Y.hash_mask=Y.hash_size-1,Y.hash_shift=~~((Y.hash_bits+A-1)/A),Y.window=new i.Buf8(2*Y.w_size),Y.head=new i.Buf16(Y.hash_size),Y.prev=new i.Buf16(Y.w_size),Y.lit_bufsize=1<<k+6,Y.pending_buf_size=4*Y.lit_bufsize,Y.pending_buf=new i.Buf8(Y.pending_buf_size),Y.d_buf=1*Y.lit_bufsize,Y.l_buf=3*Y.lit_bufsize,Y.level=ee,Y.strategy=P,Y.method=Z,Ae(E)}o=[new Pe(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(Ie(E),E.lookahead===0&&ee===f)return S;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var D=E.block_start+Z;if((E.strstart===0||E.strstart>=D)&&(E.lookahead=E.strstart-D,E.strstart=D,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:F):(E.strstart>E.block_start&&(B(E,!1),E.strm.avail_out),S)}),new Pe(4,4,8,4,we),new Pe(4,5,16,8,we),new Pe(4,6,32,32,we),new Pe(4,4,16,16,ke),new Pe(8,16,32,32,ke),new Pe(8,16,128,128,ke),new Pe(8,32,128,256,ke),new Pe(32,128,258,1024,ke),new Pe(32,258,258,4096,ke)],s.deflateInit=function(E,ee){return st(E,ee,v,15,8,0)},s.deflateInit2=st,s.deflateReset=Ae,s.deflateResetKeep=Me,s.deflateSetHeader=function(E,ee){return E&&E.state?E.state.wrap!==2?x:(E.state.gzhead=ee,m):x},s.deflate=function(E,ee){var Z,D,k,P;if(!E||!E.state||5<ee||ee<0)return E?W(E,x):x;if(D=E.state,!E.output||!E.input&&E.avail_in!==0||D.status===666&&ee!==h)return W(E,E.avail_out===0?-5:x);if(D.strm=E,Z=D.last_flush,D.last_flush=ee,D.status===N)if(D.wrap===2)E.adler=0,xe(D,31),xe(D,139),xe(D,8),D.gzhead?(xe(D,(D.gzhead.text?1:0)+(D.gzhead.hcrc?2:0)+(D.gzhead.extra?4:0)+(D.gzhead.name?8:0)+(D.gzhead.comment?16:0)),xe(D,255&D.gzhead.time),xe(D,D.gzhead.time>>8&255),xe(D,D.gzhead.time>>16&255),xe(D,D.gzhead.time>>24&255),xe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),xe(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(xe(D,255&D.gzhead.extra.length),xe(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(E.adler=u(E.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(xe(D,0),xe(D,0),xe(D,0),xe(D,0),xe(D,0),xe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),xe(D,3),D.status=z);else{var M=v+(D.w_bits-8<<4)<<8;M|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(M|=32),M+=31-M%31,D.status=z,ie(D,M),D.strstart!==0&&(ie(D,E.adler>>>16),ie(D,65535&E.adler)),E.adler=1}if(D.status===69)if(D.gzhead.extra){for(k=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending!==D.pending_buf_size));)xe(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){k=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending===D.pending_buf_size)){P=1;break}P=D.gzindex<D.gzhead.name.length?255&D.gzhead.name.charCodeAt(D.gzindex++):0,xe(D,P)}while(P!==0);D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),P===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){k=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending===D.pending_buf_size)){P=1;break}P=D.gzindex<D.gzhead.comment.length?255&D.gzhead.comment.charCodeAt(D.gzindex++):0,xe(D,P)}while(P!==0);D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),P===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&$(E),D.pending+2<=D.pending_buf_size&&(xe(D,255&E.adler),xe(D,E.adler>>8&255),E.adler=0,D.status=z)):D.status=z),D.pending!==0){if($(E),E.avail_out===0)return D.last_flush=-1,m}else if(E.avail_in===0&&I(ee)<=I(Z)&&ee!==h)return W(E,-5);if(D.status===666&&E.avail_in!==0)return W(E,-5);if(E.avail_in!==0||D.lookahead!==0||ee!==f&&D.status!==666){var Y=D.strategy===2?function(L,K){for(var Q;;){if(L.lookahead===0&&(Ie(L),L.lookahead===0)){if(K===f)return S;break}if(L.match_length=0,Q=l._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,K===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(D,ee):D.strategy===3?function(L,K){for(var Q,ne,be,Ge,Ve=L.window;;){if(L.lookahead<=O){if(Ie(L),L.lookahead<=O&&K===f)return S;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=A&&0<L.strstart&&(ne=Ve[be=L.strstart-1])===Ve[++be]&&ne===Ve[++be]&&ne===Ve[++be]){Ge=L.strstart+O;do;while(ne===Ve[++be]&&ne===Ve[++be]&&ne===Ve[++be]&&ne===Ve[++be]&&ne===Ve[++be]&&ne===Ve[++be]&&ne===Ve[++be]&&ne===Ve[++be]&&be<Ge);L.match_length=O-(Ge-be),L.match_length>L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=A?(Q=l._tr_tally(L,1,L.match_length-A),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(Q=l._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,K===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(D,ee):o[D.level].func(D,ee);if(Y!==J&&Y!==F||(D.status=666),Y===S||Y===J)return E.avail_out===0&&(D.last_flush=-1),m;if(Y===U&&(ee===1?l._tr_align(D):ee!==5&&(l._tr_stored_block(D,0,0,!1),ee===3&&(X(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),$(E),E.avail_out===0))return D.last_flush=-1,m}return ee!==h?m:D.wrap<=0?1:(D.wrap===2?(xe(D,255&E.adler),xe(D,E.adler>>8&255),xe(D,E.adler>>16&255),xe(D,E.adler>>24&255),xe(D,255&E.total_in),xe(D,E.total_in>>8&255),xe(D,E.total_in>>16&255),xe(D,E.total_in>>24&255)):(ie(D,E.adler>>>16),ie(D,65535&E.adler)),$(E),0<D.wrap&&(D.wrap=-D.wrap),D.pending!==0?m: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!==z&&ee!==666?W(E,x):(E.state=null,ee===z?W(E,-3):m):x},s.deflateSetDictionary=function(E,ee){var Z,D,k,P,M,Y,L,K,Q=ee.length;if(!E||!E.state||(P=(Z=E.state).wrap)===2||P===1&&Z.status!==N||Z.lookahead)return x;for(P===1&&(E.adler=c(E.adler,ee,Q,0)),Z.wrap=0,Q>=Z.w_size&&(P===0&&(X(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),K=new i.Buf8(Z.w_size),i.arraySet(K,ee,Q-Z.w_size,Z.w_size,0),ee=K,Q=Z.w_size),M=E.avail_in,Y=E.next_in,L=E.input,E.avail_in=Q,E.next_in=0,E.input=ee,Ie(Z);Z.lookahead>=A;){for(D=Z.strstart,k=Z.lookahead-(A-1);Z.ins_h=(Z.ins_h<<Z.hash_shift^Z.window[D+A-1])&Z.hash_mask,Z.prev[D&Z.w_mask]=Z.head[Z.ins_h],Z.head[Z.ins_h]=D,D++,--k;);Z.strstart=D,Z.lookahead=A-1,Ie(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=Y,E.input=L,E.avail_in=M,Z.wrap=P,m},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 l,c,u,d,f,h,m,x,p,w,y,v,b,_,j,C,T,R,A,O,G,N,z,S,U;l=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),m=l.dmax,x=l.wsize,p=l.whave,w=l.wnext,y=l.window,v=l.hold,b=l.bits,_=l.lencode,j=l.distcode,C=(1<<l.lenbits)-1,T=(1<<l.distbits)-1;e:do{b<15&&(v+=S[c++]<<b,b+=8,v+=S[c++]<<b,b+=8),R=_[v&C];t:for(;;){if(v>>>=A=R>>>24,b-=A,(A=R>>>16&255)===0)U[d++]=65535&R;else{if(!(16&A)){if(!(64&A)){R=_[(65535&R)+(v&(1<<A)-1)];continue t}if(32&A){l.mode=12;break e}o.msg="invalid literal/length code",l.mode=30;break e}O=65535&R,(A&=15)&&(b<A&&(v+=S[c++]<<b,b+=8),O+=v&(1<<A)-1,v>>>=A,b-=A),b<15&&(v+=S[c++]<<b,b+=8,v+=S[c++]<<b,b+=8),R=j[v&T];n:for(;;){if(v>>>=A=R>>>24,b-=A,!(16&(A=R>>>16&255))){if(!(64&A)){R=j[(65535&R)+(v&(1<<A)-1)];continue n}o.msg="invalid distance code",l.mode=30;break e}if(G=65535&R,b<(A&=15)&&(v+=S[c++]<<b,(b+=8)<A&&(v+=S[c++]<<b,b+=8)),m<(G+=v&(1<<A)-1)){o.msg="invalid distance too far back",l.mode=30;break e}if(v>>>=A,b-=A,(A=d-f)<G){if(p<(A=G-A)&&l.sane){o.msg="invalid distance too far back",l.mode=30;break e}if(z=y,(N=0)===w){if(N+=x-A,A<O){for(O-=A;U[d++]=y[N++],--A;);N=d-G,z=U}}else if(w<A){if(N+=x+w-A,(A-=w)<O){for(O-=A;U[d++]=y[N++],--A;);if(N=0,w<O){for(O-=A=w;U[d++]=y[N++],--A;);N=d-G,z=U}}}else if(N+=w-A,A<O){for(O-=A;U[d++]=y[N++],--A;);N=d-G,z=U}for(;2<O;)U[d++]=z[N++],U[d++]=z[N++],U[d++]=z[N++],O-=3;O&&(U[d++]=z[N++],1<O&&(U[d++]=z[N++]))}else{for(N=d-G;U[d++]=U[N++],U[d++]=U[N++],U[d++]=U[N++],2<(O-=3););O&&(U[d++]=U[N++],1<O&&(U[d++]=U[N++]))}break}}break}}while(c<u&&d<h);c-=O=b>>3,v&=(1<<(b-=O<<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),l.hold=v,l.bits=b}},{}],49:[function(n,r,s){var o=n("../utils/common"),i=n("./adler32"),l=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,m=-2,x=1,p=852,w=592;function y(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function v(){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 z;return N&&N.state?(z=N.state,N.total_in=N.total_out=z.total=0,N.msg="",z.wrap&&(N.adler=1&z.wrap),z.mode=x,z.last=0,z.havedict=0,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new o.Buf32(p),z.distcode=z.distdyn=new o.Buf32(w),z.sane=1,z.back=-1,h):m}function _(N){var z;return N&&N.state?((z=N.state).wsize=0,z.whave=0,z.wnext=0,b(N)):m}function j(N,z){var S,U;return N&&N.state?(U=N.state,z<0?(S=0,z=-z):(S=1+(z>>4),z<48&&(z&=15)),z&&(z<8||15<z)?m:(U.window!==null&&U.wbits!==z&&(U.window=null),U.wrap=S,U.wbits=z,_(N))):m}function C(N,z){var S,U;return N?(U=new v,(N.state=U).window=null,(S=j(N,z))!==h&&(N.state=null),S):m}var T,R,A=!0;function O(N){if(A){var z;for(T=new o.Buf32(512),R=new o.Buf32(32),z=0;z<144;)N.lens[z++]=8;for(;z<256;)N.lens[z++]=9;for(;z<280;)N.lens[z++]=7;for(;z<288;)N.lens[z++]=8;for(u(d,N.lens,0,288,T,0,N.work,{bits:9}),z=0;z<32;)N.lens[z++]=5;u(f,N.lens,0,32,R,0,N.work,{bits:5}),A=!1}N.lencode=T,N.lenbits=9,N.distcode=R,N.distbits=5}function G(N,z,S,U){var J,F=N.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new o.Buf8(F.wsize)),U>=F.wsize?(o.arraySet(F.window,z,S-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(U<(J=F.wsize-F.wnext)&&(J=U),o.arraySet(F.window,z,S-U,J,F.wnext),(U-=J)?(o.arraySet(F.window,z,S-U,U,0),F.wnext=U,F.whave=F.wsize):(F.wnext+=J,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=J))),0}s.inflateReset=_,s.inflateReset2=j,s.inflateResetKeep=b,s.inflateInit=function(N){return C(N,15)},s.inflateInit2=C,s.inflate=function(N,z){var S,U,J,F,W,I,X,$,B,xe,ie,ae,Ie,we,ke,Pe,Fe,Me,Ae,st,E,ee,Z,D,k=0,P=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 m;(S=N.state).mode===12&&(S.mode=13),W=N.next_out,J=N.output,X=N.avail_out,F=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,xe=I,ie=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[F++]<<B,B+=8}if(2&S.wrap&&$===35615){P[S.check=0]=255&$,P[1]=$>>>8&255,S.check=l(S.check,P,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[F++]<<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&&(P[0]=255&$,P[1]=$>>>8&255,S.check=l(S.check,P,2,0)),B=$=0,S.mode=3;case 3:for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.time=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,P[2]=$>>>16&255,P[3]=$>>>24&255,S.check=l(S.check,P,4,0)),B=$=0,S.mode=4;case 4:for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.xflags=255&$,S.head.os=$>>8),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=l(S.check,P,2,0)),B=$=0,S.mode=5;case 5:if(1024&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.length=$,S.head&&(S.head.extra_len=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=l(S.check,P,2,0)),B=$=0}else S.head&&(S.head.extra=null);S.mode=6;case 6:if(1024&S.flags&&(I<(ae=S.length)&&(ae=I),ae&&(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,F,ae,E)),512&S.flags&&(S.check=l(S.check,U,ae,F)),I-=ae,F+=ae,S.length-=ae),S.length))break e;S.length=0,S.mode=7;case 7:if(2048&S.flags){if(I===0)break e;for(ae=0;E=U[F+ae++],S.head&&E&&S.length<65536&&(S.head.name+=String.fromCharCode(E)),E&&ae<I;);if(512&S.flags&&(S.check=l(S.check,U,ae,F)),I-=ae,F+=ae,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(ae=0;E=U[F+ae++],S.head&&E&&S.length<65536&&(S.head.comment+=String.fromCharCode(E)),E&&ae<I;);if(512&S.flags&&(S.check=l(S.check,U,ae,F)),I-=ae,F+=ae,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[F++]<<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[F++]<<B,B+=8}N.adler=S.check=y($),B=$=0,S.mode=11;case 11:if(S.havedict===0)return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,2;N.adler=S.check=1,S.mode=12;case 12:if(z===5||z===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[F++]<<B,B+=8}switch(S.last=1&$,B-=1,3&($>>>=1)){case 0:S.mode=14;break;case 1:if(O(S),S.mode=20,z!==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[F++]<<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,z===6)break e;case 15:S.mode=16;case 16:if(ae=S.length){if(I<ae&&(ae=I),X<ae&&(ae=X),ae===0)break e;o.arraySet(J,U,F,ae,W),I-=ae,F+=ae,X-=ae,W+=ae,S.length-=ae;break}S.mode=12;break;case 17:for(;B<14;){if(I===0)break e;I--,$+=U[F++]<<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[F++]<<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(;Pe=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Fe<16)$>>>=ke,B-=ke,S.lens[S.have++]=Fe;else{if(Fe===16){for(D=ke+2;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($>>>=ke,B-=ke,S.have===0){N.msg="invalid bit length repeat",S.mode=30;break}E=S.lens[S.have-1],ae=3+(3&$),$>>>=2,B-=2}else if(Fe===17){for(D=ke+3;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=ke,E=0,ae=3+(7&($>>>=ke)),$>>>=3,B-=3}else{for(D=ke+7;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=ke,E=0,ae=11+(127&($>>>=ke)),$>>>=7,B-=7}if(S.have+ae>S.nlen+S.ndist){N.msg="invalid bit length repeat",S.mode=30;break}for(;ae--;)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,z===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=F,N.avail_in=I,S.hold=$,S.bits=B,c(N,ie),W=N.next_out,J=N.output,X=N.avail_out,F=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;Pe=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Pe&&!(240&Pe)){for(Me=ke,Ae=Pe,st=Fe;Pe=(k=S.lencode[st+(($&(1<<Me+Ae)-1)>>Me)])>>>16&255,Fe=65535&k,!(Me+(ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Me,B-=Me,S.back+=Me}if($>>>=ke,B-=ke,S.back+=ke,S.length=Fe,Pe===0){S.mode=26;break}if(32&Pe){S.back=-1,S.mode=12;break}if(64&Pe){N.msg="invalid literal/length code",S.mode=30;break}S.extra=15&Pe,S.mode=22;case 22:if(S.extra){for(D=S.extra;B<D;){if(I===0)break e;I--,$+=U[F++]<<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(;Pe=(k=S.distcode[$&(1<<S.distbits)-1])>>>16&255,Fe=65535&k,!((ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(!(240&Pe)){for(Me=ke,Ae=Pe,st=Fe;Pe=(k=S.distcode[st+(($&(1<<Me+Ae)-1)>>Me)])>>>16&255,Fe=65535&k,!(Me+(ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Me,B-=Me,S.back+=Me}if($>>>=ke,B-=ke,S.back+=ke,64&Pe){N.msg="invalid distance code",S.mode=30;break}S.offset=Fe,S.extra=15&Pe,S.mode=24;case 24:if(S.extra){for(D=S.extra;B<D;){if(I===0)break e;I--,$+=U[F++]<<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(ae=ie-X,S.offset>ae){if((ae=S.offset-ae)>S.whave&&S.sane){N.msg="invalid distance too far back",S.mode=30;break}Ie=ae>S.wnext?(ae-=S.wnext,S.wsize-ae):S.wnext-ae,ae>S.length&&(ae=S.length),we=S.window}else we=J,Ie=W-S.offset,ae=S.length;for(X<ae&&(ae=X),X-=ae,S.length-=ae;J[W++]=we[Ie++],--ae;);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[F++]<<B,B+=8}if(ie-=X,N.total_out+=ie,S.total+=ie,ie&&(N.adler=S.check=S.flags?l(S.check,J,ie,W-ie):i(S.check,J,ie,W-ie)),ie=X,(S.flags?$:y($))!==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[F++]<<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 m}return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,(S.wsize||ie!==N.avail_out&&S.mode<30&&(S.mode<27||z!==4))&&G(N,N.output,N.next_out,ie-N.avail_out)?(S.mode=31,-4):(xe-=N.avail_in,ie-=N.avail_out,N.total_in+=xe,N.total_out+=ie,S.total+=ie,S.wrap&&ie&&(N.adler=S.check=S.flags?l(S.check,J,ie,N.next_out-ie):i(S.check,J,ie,N.next_out-ie)),N.data_type=S.bits+(S.last?64:0)+(S.mode===12?128:0)+(S.mode===20||S.mode===15?256:0),(xe==0&&ie===0||z===4)&&ee===h&&(ee=-5),ee)},s.inflateEnd=function(N){if(!N||!N.state)return m;var z=N.state;return z.window&&(z.window=null),N.state=null,h},s.inflateGetHeader=function(N,z){var S;return N&&N.state&&2&(S=N.state).wrap?((S.head=z).done=!1,h):m},s.inflateSetDictionary=function(N,z){var S,U=z.length;return N&&N.state?(S=N.state).wrap!==0&&S.mode!==11?m:S.mode===11&&i(1,z,U,0)!==S.check?-3:G(N,z,U,U)?(S.mode=31,-4):(S.havedict=1,h):m},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],l=[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,m,x,p,w,y){var v,b,_,j,C,T,R,A,O,G=y.bits,N=0,z=0,S=0,U=0,J=0,F=0,W=0,I=0,X=0,$=0,B=null,xe=0,ie=new o.Buf16(16),ae=new o.Buf16(16),Ie=null,we=0;for(N=0;N<=15;N++)ie[N]=0;for(z=0;z<m;z++)ie[f[h+z]]++;for(J=G,U=15;1<=U&&ie[U]===0;U--);if(U<J&&(J=U),U===0)return x[p++]=20971520,x[p++]=20971520,y.bits=1,0;for(S=1;S<U&&ie[S]===0;S++);for(J<S&&(J=S),N=I=1;N<=15;N++)if(I<<=1,(I-=ie[N])<0)return-1;if(0<I&&(d===0||U!==1))return-1;for(ae[1]=0,N=1;N<15;N++)ae[N+1]=ae[N]+ie[N];for(z=0;z<m;z++)f[h+z]!==0&&(w[ae[f[h+z]]++]=z);if(T=d===0?(B=Ie=w,19):d===1?(B=i,xe-=257,Ie=l,we-=257,256):(B=c,Ie=u,-1),N=S,C=p,W=z=$=0,_=-1,j=(X=1<<(F=J))-1,d===1&&852<X||d===2&&592<X)return 1;for(;;){for(R=N-W,O=w[z]<T?(A=0,w[z]):w[z]>T?(A=Ie[we+w[z]],B[xe+w[z]]):(A=96,0),v=1<<N-W,S=b=1<<F;x[C+($>>W)+(b-=v)]=R<<24|A<<16|O|0,b!==0;);for(v=1<<N-1;$&v;)v>>=1;if(v!==0?($&=v-1,$+=v):$=0,z++,--ie[N]==0){if(N===U)break;N=f[h+w[z]]}if(J<N&&($&j)!==_){for(W===0&&(W=J),C+=S,I=1<<(F=N-W);F+W<U&&!((I-=ie[F+W])<=0);)F++,I<<=1;if(X+=1<<F,d===1&&852<X||d===2&&592<X)return 1;x[_=$&j]=J<<24|F<<16|C-p|0}}return $!==0&&(x[C+$]=N-W<<24|64<<16|0),y.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,l=1;function c(k){for(var P=k.length;0<=--P;)k[P]=0}var u=0,d=29,f=256,h=f+1+d,m=30,x=19,p=2*h+1,w=15,y=16,v=7,b=256,_=16,j=17,C=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],R=[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],O=[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*m);c(N);var z=new Array(512);c(z);var S=new Array(256);c(S);var U=new Array(d);c(U);var J,F,W,I=new Array(m);function X(k,P,M,Y,L){this.static_tree=k,this.extra_bits=P,this.extra_base=M,this.elems=Y,this.max_length=L,this.has_stree=k&&k.length}function $(k,P){this.dyn_tree=k,this.max_code=0,this.stat_desc=P}function B(k){return k<256?z[k]:z[256+(k>>>7)]}function xe(k,P){k.pending_buf[k.pending++]=255&P,k.pending_buf[k.pending++]=P>>>8&255}function ie(k,P,M){k.bi_valid>y-M?(k.bi_buf|=P<<k.bi_valid&65535,xe(k,k.bi_buf),k.bi_buf=P>>y-k.bi_valid,k.bi_valid+=M-y):(k.bi_buf|=P<<k.bi_valid&65535,k.bi_valid+=M)}function ae(k,P,M){ie(k,M[2*P],M[2*P+1])}function Ie(k,P){for(var M=0;M|=1&k,k>>>=1,M<<=1,0<--P;);return M>>>1}function we(k,P,M){var Y,L,K=new Array(w+1),Q=0;for(Y=1;Y<=w;Y++)K[Y]=Q=Q+M[Y-1]<<1;for(L=0;L<=P;L++){var ne=k[2*L+1];ne!==0&&(k[2*L]=Ie(K[ne]++,ne))}}function ke(k){var P;for(P=0;P<h;P++)k.dyn_ltree[2*P]=0;for(P=0;P<m;P++)k.dyn_dtree[2*P]=0;for(P=0;P<x;P++)k.bl_tree[2*P]=0;k.dyn_ltree[2*b]=1,k.opt_len=k.static_len=0,k.last_lit=k.matches=0}function Pe(k){8<k.bi_valid?xe(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,P,M,Y){var L=2*P,K=2*M;return k[L]<k[K]||k[L]===k[K]&&Y[P]<=Y[M]}function Me(k,P,M){for(var Y=k.heap[M],L=M<<1;L<=k.heap_len&&(L<k.heap_len&&Fe(P,k.heap[L+1],k.heap[L],k.depth)&&L++,!Fe(P,Y,k.heap[L],k.depth));)k.heap[M]=k.heap[L],M=L,L<<=1;k.heap[M]=Y}function Ae(k,P,M){var Y,L,K,Q,ne=0;if(k.last_lit!==0)for(;Y=k.pending_buf[k.d_buf+2*ne]<<8|k.pending_buf[k.d_buf+2*ne+1],L=k.pending_buf[k.l_buf+ne],ne++,Y===0?ae(k,L,P):(ae(k,(K=S[L])+f+1,P),(Q=T[K])!==0&&ie(k,L-=U[K],Q),ae(k,K=B(--Y),M),(Q=R[K])!==0&&ie(k,Y-=I[K],Q)),ne<k.last_lit;);ae(k,b,P)}function st(k,P){var M,Y,L,K=P.dyn_tree,Q=P.stat_desc.static_tree,ne=P.stat_desc.has_stree,be=P.stat_desc.elems,Ge=-1;for(k.heap_len=0,k.heap_max=p,M=0;M<be;M++)K[2*M]!==0?(k.heap[++k.heap_len]=Ge=M,k.depth[M]=0):K[2*M+1]=0;for(;k.heap_len<2;)K[2*(L=k.heap[++k.heap_len]=Ge<2?++Ge:0)]=1,k.depth[L]=0,k.opt_len--,ne&&(k.static_len-=Q[2*L+1]);for(P.max_code=Ge,M=k.heap_len>>1;1<=M;M--)Me(k,K,M);for(L=be;M=k.heap[1],k.heap[1]=k.heap[k.heap_len--],Me(k,K,1),Y=k.heap[1],k.heap[--k.heap_max]=M,k.heap[--k.heap_max]=Y,K[2*L]=K[2*M]+K[2*Y],k.depth[L]=(k.depth[M]>=k.depth[Y]?k.depth[M]:k.depth[Y])+1,K[2*M+1]=K[2*Y+1]=L,k.heap[1]=L++,Me(k,K,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],function(Ve,Nt){var ir,Xt,hs,ct,ms,ps,ar=Nt.dyn_tree,vu=Nt.max_code,xu=Nt.stat_desc.static_tree,Ii=Nt.stat_desc.has_stree,wu=Nt.stat_desc.extra_bits,Mi=Nt.stat_desc.extra_base,Wr=Nt.stat_desc.max_length,Xs=0;for(ct=0;ct<=w;ct++)Ve.bl_count[ct]=0;for(ar[2*Ve.heap[Ve.heap_max]+1]=0,ir=Ve.heap_max+1;ir<p;ir++)Wr<(ct=ar[2*ar[2*(Xt=Ve.heap[ir])+1]+1]+1)&&(ct=Wr,Xs++),ar[2*Xt+1]=ct,vu<Xt||(Ve.bl_count[ct]++,ms=0,Mi<=Xt&&(ms=wu[Xt-Mi]),ps=ar[2*Xt],Ve.opt_len+=ps*(ct+ms),Ii&&(Ve.static_len+=ps*(xu[2*Xt+1]+ms)));if(Xs!==0){do{for(ct=Wr-1;Ve.bl_count[ct]===0;)ct--;Ve.bl_count[ct]--,Ve.bl_count[ct+1]+=2,Ve.bl_count[Wr]--,Xs-=2}while(0<Xs);for(ct=Wr;ct!==0;ct--)for(Xt=Ve.bl_count[ct];Xt!==0;)vu<(hs=Ve.heap[--ir])||(ar[2*hs+1]!==ct&&(Ve.opt_len+=(ct-ar[2*hs+1])*ar[2*hs],ar[2*hs+1]=ct),Xt--)}}(k,P),we(K,Ge,k.bl_count)}function E(k,P,M){var Y,L,K=-1,Q=P[1],ne=0,be=7,Ge=4;for(Q===0&&(be=138,Ge=3),P[2*(M+1)+1]=65535,Y=0;Y<=M;Y++)L=Q,Q=P[2*(Y+1)+1],++ne<be&&L===Q||(ne<Ge?k.bl_tree[2*L]+=ne:L!==0?(L!==K&&k.bl_tree[2*L]++,k.bl_tree[2*_]++):ne<=10?k.bl_tree[2*j]++:k.bl_tree[2*C]++,K=L,Ge=(ne=0)===Q?(be=138,3):L===Q?(be=6,3):(be=7,4))}function ee(k,P,M){var Y,L,K=-1,Q=P[1],ne=0,be=7,Ge=4;for(Q===0&&(be=138,Ge=3),Y=0;Y<=M;Y++)if(L=Q,Q=P[2*(Y+1)+1],!(++ne<be&&L===Q)){if(ne<Ge)for(;ae(k,L,k.bl_tree),--ne!=0;);else L!==0?(L!==K&&(ae(k,L,k.bl_tree),ne--),ae(k,_,k.bl_tree),ie(k,ne-3,2)):ne<=10?(ae(k,j,k.bl_tree),ie(k,ne-3,3)):(ae(k,C,k.bl_tree),ie(k,ne-11,7));K=L,Ge=(ne=0)===Q?(be=138,3):L===Q?(be=6,3):(be=7,4)}}c(I);var Z=!1;function D(k,P,M,Y){ie(k,(u<<1)+(Y?1:0),3),function(L,K,Q,ne){Pe(L),xe(L,Q),xe(L,~Q),o.arraySet(L.pending_buf,L.window,K,Q,L.pending),L.pending+=Q}(k,P,M)}s._tr_init=function(k){Z||(function(){var P,M,Y,L,K,Q=new Array(w+1);for(L=Y=0;L<d-1;L++)for(U[L]=Y,P=0;P<1<<T[L];P++)S[Y++]=L;for(S[Y-1]=L,L=K=0;L<16;L++)for(I[L]=K,P=0;P<1<<R[L];P++)z[K++]=L;for(K>>=7;L<m;L++)for(I[L]=K<<7,P=0;P<1<<R[L]-7;P++)z[256+K++]=L;for(M=0;M<=w;M++)Q[M]=0;for(P=0;P<=143;)G[2*P+1]=8,P++,Q[8]++;for(;P<=255;)G[2*P+1]=9,P++,Q[9]++;for(;P<=279;)G[2*P+1]=7,P++,Q[7]++;for(;P<=287;)G[2*P+1]=8,P++,Q[8]++;for(we(G,h+1,Q),P=0;P<m;P++)N[2*P+1]=5,N[2*P]=Ie(P,5);J=new X(G,T,f+1,h,w),F=new X(N,R,0,m,w),W=new X(new Array(0),A,0,x,v)}(),Z=!0),k.l_desc=new $(k.dyn_ltree,J),k.d_desc=new $(k.dyn_dtree,F),k.bl_desc=new $(k.bl_tree,W),k.bi_buf=0,k.bi_valid=0,ke(k)},s._tr_stored_block=D,s._tr_flush_block=function(k,P,M,Y){var L,K,Q=0;0<k.level?(k.strm.data_type===2&&(k.strm.data_type=function(ne){var be,Ge=4093624447;for(be=0;be<=31;be++,Ge>>>=1)if(1&Ge&&ne.dyn_ltree[2*be]!==0)return i;if(ne.dyn_ltree[18]!==0||ne.dyn_ltree[20]!==0||ne.dyn_ltree[26]!==0)return l;for(be=32;be<f;be++)if(ne.dyn_ltree[2*be]!==0)return l;return i}(k)),st(k,k.l_desc),st(k,k.d_desc),Q=function(ne){var be;for(E(ne,ne.dyn_ltree,ne.l_desc.max_code),E(ne,ne.dyn_dtree,ne.d_desc.max_code),st(ne,ne.bl_desc),be=x-1;3<=be&&ne.bl_tree[2*O[be]+1]===0;be--);return ne.opt_len+=3*(be+1)+5+5+4,be}(k),L=k.opt_len+3+7>>>3,(K=k.static_len+3+7>>>3)<=L&&(L=K)):L=K=M+5,M+4<=L&&P!==-1?D(k,P,M,Y):k.strategy===4||K===L?(ie(k,2+(Y?1:0),3),Ae(k,G,N)):(ie(k,4+(Y?1:0),3),function(ne,be,Ge,Ve){var Nt;for(ie(ne,be-257,5),ie(ne,Ge-1,5),ie(ne,Ve-4,4),Nt=0;Nt<Ve;Nt++)ie(ne,ne.bl_tree[2*O[Nt]+1],3);ee(ne,ne.dyn_ltree,be-1),ee(ne,ne.dyn_dtree,Ge-1)}(k,k.l_desc.max_code+1,k.d_desc.max_code+1,Q+1),Ae(k,k.dyn_ltree,k.dyn_dtree)),ke(k),Y&&Pe(k)},s._tr_tally=function(k,P,M){return k.pending_buf[k.d_buf+2*k.last_lit]=P>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&P,k.pending_buf[k.l_buf+k.last_lit]=255&M,k.last_lit++,P===0?k.dyn_ltree[2*M]++:(k.matches++,P--,k.dyn_ltree[2*(S[M]+f+1)]++,k.dyn_dtree[2*B(P)]++),k.last_lit===k.lit_bufsize-1},s._tr_align=function(k){ie(k,2,3),ae(k,b,G),function(P){P.bi_valid===16?(xe(P,P.bi_buf),P.bi_buf=0,P.bi_valid=0):8<=P.bi_valid&&(P.pending_buf[P.pending++]=255&P.bi_buf,P.bi_buf>>=8,P.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,l){if(!i.setImmediate){var c,u,d,f,h=1,m={},x=!1,p=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(){v(_)})}:function(){if(i.postMessage&&!i.importScripts){var _=!0,j=i.onmessage;return i.onmessage=function(){_=!1},i.postMessage("","*"),i.onmessage=j,_}}()?(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(_){v(_.data)},function(_){d.port2.postMessage(_)}):p&&"onreadystatechange"in p.createElement("script")?(u=p.documentElement,function(_){var j=p.createElement("script");j.onreadystatechange=function(){v(_),j.onreadystatechange=null,u.removeChild(j),j=null},u.appendChild(j)}):function(_){setTimeout(v,0,_)},w.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var j=new Array(arguments.length-1),C=0;C<j.length;C++)j[C]=arguments[C+1];var T={callback:_,args:j};return m[h]=T,c(h),h++},w.clearImmediate=y}function y(_){delete m[_]}function v(_){if(x)setTimeout(v,0,_);else{var j=m[_];if(j){x=!0;try{(function(C){var T=C.callback,R=C.args;switch(R.length){case 0:T();break;case 1:T(R[0]);break;case 2:T(R[0],R[1]);break;case 3:T(R[0],R[1],R[2]);break;default:T.apply(l,R)}})(j)}finally{y(_),x=!1}}}}function b(_){_.source===i&&typeof _.data=="string"&&_.data.indexOf(f)===0&&v(+_.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof ju<"u"?ju:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(bN);var eU=bN.exports;const tU=Vf(eU);function _N(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 nU=async(e,t)=>{const n=new tU;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()},Ba=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)},rU=e=>Ba(e).split(" ")[0];function SN(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"),l=String(t.getUTCSeconds()).padStart(2,"0");return`${n}-${r}-${s} ${o}:${i}:${l}`}const sU=async e=>{const t=ot();let n=1;e.page&&(n=e.page);let r=2;e.perPage&&(r=e.perPage);let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=t.filter("expiredAt<{:expiredAt}",{expiredAt:SN(15)})),t.collection("domains").getList(n,r,{sort:"-created",expand:"lastDeployment",filter:s})},oU=async()=>{const e=ot(),t=await e.collection("domains").getList(1,1,{}),n=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:SN(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}},iU=async e=>await ot().collection("domains").getOne(e),pf=async e=>e.id?await ot().collection("domains").update(e.id,e):await ot().collection("domains").create(e),aU=async e=>await ot().collection("domains").delete(e),lU=(e,t)=>ot().collection("domains").subscribe(e,n=>{n.action==="update"&&t(n.record)},{expand:"lastDeployment"}),cU=e=>{ot().collection("domains").unsubscribe(e)},uU=()=>{const e=wr(),t=sr(),{t:n}=Ue(),r=Ur(),s=new URLSearchParams(r.search),o=s.get("page"),i=s.get("state"),[l,c]=g.useState(0),u=()=>{t("/edit")},d=_=>{s.set("page",_.toString()),t(`?${s.toString()}`)},f=_=>{t(`/edit?id=${_}`)},h=_=>{t(`/history?domain=${_}`)},m=async _=>{try{await aU(_),p(x.filter(j=>j.id!==_))}catch(j){console.error("Error deleting domain:",j)}},[x,p]=g.useState([]);g.useEffect(()=>{(async()=>{const j=await sU({page:o?Number(o):1,perPage:10,state:i||""});p(j.items),c(j.totalPages)})()},[o,i]);const w=async _=>{const j=x.filter(A=>A.id===_),C=j[0].enabled,T=j[0];T.enabled=!C,await pf(T);const R=x.map(A=>A.id===_?{...A,checked:!C}:A);p(R)},y=async _=>{try{cU(_.id??""),lU(_.id??"",j=>{const C=x.map(T=>T.id===j.id?{...j}:T);p(C)}),_.rightnow=!0,await pf(_),e.toast({title:n("domain.deploy.started.message"),description:n("domain.deploy.started.tips")})}catch{e.toast({title:n("domain.deploy.failed.message"),description:a.jsxs(nI,{i18nKey:"domain.deploy.failed.tips",children:["text1",a.jsx(wn,{to:`/history?domain=${_.id}`,className:"underline text-blue-500",children:"text2"}),"text3"]}),variant:"destructive"})}},v=async _=>{await y({..._,deployed:!1})},b=async _=>{const j=`${_.id}-${_.domain}.zip`,C=[{name:`${_.domain}.pem`,content:_.certificate?_.certificate:""},{name:`${_.domain}.key`,content:_.privateKey?_.privateKey:""}];await nU(j,C)};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"",children:[a.jsx(Ax,{}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:n("domain.page.title")}),a.jsx(Re,{onClick:u,children:n("domain.add")})]}),x.length?a.jsxs(a.Fragment,{children:[a.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:[a.jsx("div",{className:"w-36",children:n("common.text.domain")}),a.jsx("div",{className:"w-40",children:n("domain.props.expiry")}),a.jsx("div",{className:"w-32",children:n("domain.props.last_execution_status")}),a.jsx("div",{className:"w-64",children:n("domain.props.last_execution_stage")}),a.jsx("div",{className:"w-40 sm:ml-2",children:n("domain.props.last_execution_time")}),a.jsx("div",{className:"w-24",children:n("domain.props.enable")}),a.jsx("div",{className:"grow",children:n("common.text.operations")})]}),x.map(_=>{var j,C,T,R;return a.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:[a.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center truncate",children:_.domain.split(";").map(A=>a.jsxs(a.Fragment,{children:[A,a.jsx("br",{})]}))}),a.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx("div",{children:_.expiredAt?a.jsxs(a.Fragment,{children:[a.jsx("div",{children:n("domain.props.expiry.date1",{date:90})}),a.jsx("div",{children:n("domain.props.expiry.date2",{date:rU(_.expiredAt)})})]}):"---"})}),a.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((j=_.expand)!=null&&j.lastDeployment)?a.jsx(a.Fragment,{children:a.jsx(kx,{deployment:_.expand.lastDeployment})}):"---"}),a.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((C=_.expand)!=null&&C.lastDeployment)?a.jsx(Sx,{phase:(T=_.expand.lastDeployment)==null?void 0:T.phase,phaseSuccess:(R=_.expand.lastDeployment)==null?void 0:R.phaseSuccess}):"---"}),a.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:_.lastDeployedAt?Ba(_.lastDeployedAt):"---"}),a.jsx("div",{className:"sm:w-24 flex items-center",children:a.jsx(bx,{children:a.jsxs(vE,{children:[a.jsx(xE,{children:a.jsx(dl,{checked:_.enabled,onCheckedChange:()=>{w(_.id??"")}})}),a.jsx(_x,{children:a.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:_.enabled?n("domain.props.enable.disabled"):n("domain.props.enable.enabled")})})]})})}),a.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[a.jsx(Re,{variant:"link",className:"p-0",onClick:()=>h(_.id??""),children:n("domain.history")}),a.jsxs(pr,{when:!!_.enabled,children:[a.jsx(Er,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(Re,{variant:"link",className:"p-0",onClick:()=>y(_),children:n("domain.deploy")})]}),a.jsxs(pr,{when:!!(_.enabled&&_.deployed),children:[a.jsx(Er,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(Re,{variant:"link",className:"p-0",onClick:()=>v(_),children:n("domain.deploy_forced")})]}),a.jsxs(pr,{when:!!_.expiredAt,children:[a.jsx(Er,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(Re,{variant:"link",className:"p-0",onClick:()=>b(_),children:n("common.download")})]}),!_.enabled&&a.jsxs(a.Fragment,{children:[a.jsx(Er,{orientation:"vertical",className:"h-4 mx-2"}),a.jsxs(jx,{children:[a.jsx(Cx,{asChild:!0,children:a.jsx(Re,{variant:"link",className:"p-0",children:n("common.delete")})}),a.jsxs(Lh,{children:[a.jsxs(zh,{children:[a.jsx($h,{children:n("domain.delete")}),a.jsx(Uh,{children:n("domain.delete.confirm")})]}),a.jsxs(Fh,{children:[a.jsx(Bh,{children:n("common.cancel")}),a.jsx(Vh,{onClick:()=>{m(_.id??"")},children:n("common.confirm")})]})]})]}),a.jsx(Er,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(Re,{variant:"link",className:"p-0",onClick:()=>f(_.id??""),children:n("common.edit")})]})]})]},_.id)}),a.jsx(jE,{totalPages:l,currentPage:o?Number(o):1,onPageChange:_=>{d(_)}})]}):a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col items-center mt-10",children:[a.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:a.jsx(gg,{size:40,className:"text-primary"})}),a.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:n("domain.nodata")}),a.jsx(Re,{onClick:u,className:"mt-3",children:n("domain.add")})]})})]})})};var pu=e=>e.type==="checkbox",ga=e=>e instanceof Date,_n=e=>e==null;const kN=e=>typeof e=="object";var nn=e=>!_n(e)&&!Array.isArray(e)&&kN(e)&&!ga(e),jN=e=>nn(e)&&e.target?pu(e.target)?e.target.checked:e.target.value:e,dU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,CN=(e,t)=>e.has(dU(t)),fU=e=>{const t=e.constructor&&e.constructor.prototype;return nn(t)&&t.hasOwnProperty("isPrototypeOf")},Dx=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Tn(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(!(Dx&&(e instanceof Blob||e instanceof FileList))&&(n||nn(e)))if(t=n?[]:{},!n&&!fU(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Tn(e[r]));else return e;return t}var Kh=e=>Array.isArray(e)?e.filter(Boolean):[],$t=e=>e===void 0,ye=(e,t,n)=>{if(!t||!nn(e))return n;const r=Kh(t.split(/[,[\].]+?/)).reduce((s,o)=>_n(s)?s:s[o],e);return $t(r)||r===e?$t(e[t])?n:e[t]:r},Xr=e=>typeof e=="boolean",Ox=e=>/^\w*$/.test(e),EN=e=>Kh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),mt=(e,t,n)=>{let r=-1;const s=Ox(t)?[t]:EN(t),o=s.length,i=o-1;for(;++r<o;){const l=s[r];let c=n;if(r!==i){const u=e[l];c=nn(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(l==="__proto__")return;e[l]=c,e=e[l]}return e};const gf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Nr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xs={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},NN=He.createContext(null),Yh=()=>He.useContext(NN),hU=e=>{const{children:t,...n}=e;return He.createElement(NN.Provider,{value:n},t)};var TN=(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]!==Nr.all&&(t._proxyFormState[i]=!r||Nr.all),n&&(n[i]=!0),e[i]}});return s},Wn=e=>nn(e)&&!Object.keys(e).length,PN=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return Wn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||Nr.all))},tc=e=>Array.isArray(e)?e:[e],RN=(e,t,n)=>!e||!t||e===t||tc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Ix(e){const t=He.useRef(e);t.current=e,He.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function mU(e){const t=Yh(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,l]=He.useState(n._formState),c=He.useRef(!0),u=He.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=He.useRef(s);return d.current=s,Ix({disabled:r,next:f=>c.current&&RN(d.current,f.name,o)&&PN(f,u.current,n._updateFormState)&&l({...n._formState,...f}),subject:n._subjects.state}),He.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),TN(i,n,u.current,!1)}var Jr=e=>typeof e=="string",AN=(e,t,n,r,s)=>Jr(e)?(r&&t.watch.add(e),ye(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),ye(n,o))):(r&&(t.watchAll=!0),n);function pU(e){const t=Yh(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},l=He.useRef(r);l.current=r,Ix({disabled:o,subject:n._subjects.values,next:d=>{RN(l.current,d.name,i)&&u(Tn(AN(l.current,n._names,d.values||n._formValues,!1,s)))}});const[c,u]=He.useState(n._getWatch(r,s));return He.useEffect(()=>n._removeUnmounted()),c}function gU(e){const t=Yh(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=CN(s._names.array,n),l=pU({control:s,name:n,defaultValue:ye(s._formValues,n,ye(s._defaultValues,n,e.defaultValue)),exact:!0}),c=mU({control:s,name:n}),u=He.useRef(s.register(n,{...e.rules,value:l,...Xr(e.disabled)?{disabled:e.disabled}:{}}));return He.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(h,m)=>{const x=ye(s._fields,h);x&&x._f&&(x._f.mount=m)};if(f(n,!0),d){const h=Tn(ye(s._options.defaultValues,n));mt(s._defaultValues,n,h),$t(ye(s._formValues,n))&&mt(s._formValues,n,h)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),He.useEffect(()=>{ye(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:ye(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:l,...Xr(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:He.useCallback(d=>u.current.onChange({target:{value:jN(d),name:n},type:gf.CHANGE}),[n]),onBlur:He.useCallback(()=>u.current.onBlur({target:{value:ye(s._formValues,n),name:n},type:gf.BLUR}),[n,s]),ref:d=>{const f=ye(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:()=>!!ye(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!ye(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ye(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ye(c.validatingFields,n)},error:{enumerable:!0,get:()=>ye(c.errors,n)}})}}const yU=e=>e.render(gU(e));var DN=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},$b=e=>({isOnSubmit:!e||e===Nr.onSubmit,isOnBlur:e===Nr.onBlur,isOnChange:e===Nr.onChange,isOnAll:e===Nr.all,isOnTouch:e===Nr.onTouched}),Ub=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const nc=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=ye(e,s);if(o){const{_f:i,...l}=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;nc(l,t)}else nn(l)&&nc(l,t)}}};var vU=(e,t,n)=>{const r=tc(ye(e,n));return mt(r,"root",t[n]),mt(e,n,r),e},Mx=e=>e.type==="file",mo=e=>typeof e=="function",yf=e=>{if(!Dx)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ed=e=>Jr(e),Lx=e=>e.type==="radio",vf=e=>e instanceof RegExp;const Vb={value:!1,isValid:!1},Bb={value:!0,isValid:!0};var ON=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===""?Bb:{value:e[0].value,isValid:!0}:Bb:Vb}return Vb};const Wb={isValid:!1,value:null};var IN=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Wb):Wb;function Hb(e,t,n="validate"){if(Ed(e)||Array.isArray(e)&&e.every(Ed)||Xr(e)&&!e)return{type:n,message:Ed(e)?e:"",ref:t}}var Ki=e=>nn(e)&&!vf(e)?e:{value:e,message:""},Kb=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:h,validate:m,name:x,valueAsNumber:p,mount:w,disabled:y}=e._f,v=ye(t,x);if(!w||y)return{};const b=i?i[0]:o,_=N=>{r&&b.reportValidity&&(b.setCustomValidity(Xr(N)?"":N||""),b.reportValidity())},j={},C=Lx(o),T=pu(o),R=C||T,A=(p||Mx(o))&&$t(o.value)&&$t(v)||yf(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,O=DN.bind(null,x,n,j),G=(N,z,S,U=xs.maxLength,J=xs.minLength)=>{const F=N?z:S;j[x]={type:N?U:J,message:F,ref:o,...O(N?U:J,F)}};if(s?!Array.isArray(v)||!v.length:l&&(!R&&(A||_n(v))||Xr(v)&&!v||T&&!ON(i).isValid||C&&!IN(i).isValid)){const{value:N,message:z}=Ed(l)?{value:!!l,message:l}:Ki(l);if(N&&(j[x]={type:xs.required,message:z,ref:b,...O(xs.required,z)},!n))return _(z),j}if(!A&&(!_n(d)||!_n(f))){let N,z;const S=Ki(f),U=Ki(d);if(!_n(v)&&!isNaN(v)){const J=o.valueAsNumber||v&&+v;_n(S.value)||(N=J>S.value),_n(U.value)||(z=J<U.value)}else{const J=o.valueAsDate||new Date(v),F=X=>new Date(new Date().toDateString()+" "+X),W=o.type=="time",I=o.type=="week";Jr(S.value)&&v&&(N=W?F(v)>F(S.value):I?v>S.value:J>new Date(S.value)),Jr(U.value)&&v&&(z=W?F(v)<F(U.value):I?v<U.value:J<new Date(U.value))}if((N||z)&&(G(!!N,S.message,U.message,xs.max,xs.min),!n))return _(j[x].message),j}if((c||u)&&!A&&(Jr(v)||s&&Array.isArray(v))){const N=Ki(c),z=Ki(u),S=!_n(N.value)&&v.length>+N.value,U=!_n(z.value)&&v.length<+z.value;if((S||U)&&(G(S,N.message,z.message),!n))return _(j[x].message),j}if(h&&!A&&Jr(v)){const{value:N,message:z}=Ki(h);if(vf(N)&&!v.match(N)&&(j[x]={type:xs.pattern,message:z,ref:o,...O(xs.pattern,z)},!n))return _(z),j}if(m){if(mo(m)){const N=await m(v,t),z=Hb(N,b);if(z&&(j[x]={...z,...O(xs.validate,z.message)},!n))return _(z.message),j}else if(nn(m)){let N={};for(const z in m){if(!Wn(N)&&!n)break;const S=Hb(await m[z](v,t),b,z);S&&(N={...S,...O(z,S.message)},_(S.message),n&&(j[x]=N))}if(!Wn(N)&&(j[x]={ref:b,...N},!n))return j}}return _(!0),j};function xU(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 wU(e){for(const t in e)if(e.hasOwnProperty(t)&&!$t(e[t]))return!1;return!0}function Qt(e,t){const n=Array.isArray(t)?t:Ox(t)?[t]:EN(t),r=n.length===1?e:xU(e,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(nn(r)&&Wn(r)||Array.isArray(r)&&wU(r))&&Qt(e,n.slice(0,-1)),e}var lp=()=>{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=[]}}},xf=e=>_n(e)||!kN(e);function ei(e,t){if(xf(e)||xf(t))return e===t;if(ga(e)&&ga(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(ga(o)&&ga(i)||nn(o)&&nn(i)||Array.isArray(o)&&Array.isArray(i)?!ei(o,i):o!==i)return!1}}return!0}var MN=e=>e.type==="select-multiple",bU=e=>Lx(e)||pu(e),cp=e=>yf(e)&&e.isConnected,LN=e=>{for(const t in e)if(mo(e[t]))return!0;return!1};function wf(e,t={}){const n=Array.isArray(e);if(nn(e)||n)for(const r in e)Array.isArray(e[r])||nn(e[r])&&!LN(e[r])?(t[r]=Array.isArray(e[r])?[]:{},wf(e[r],t[r])):_n(e[r])||(t[r]=!0);return t}function zN(e,t,n){const r=Array.isArray(e);if(nn(e)||r)for(const s in e)Array.isArray(e[s])||nn(e[s])&&!LN(e[s])?$t(t)||xf(n[s])?n[s]=Array.isArray(e[s])?wf(e[s],[]):{...wf(e[s])}:zN(e[s],_n(t)?{}:t[s],n[s]):n[s]=!ei(e[s],t[s]);return n}var nd=(e,t)=>zN(e,t,wf(t)),FN=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>$t(e)?e:t?e===""?NaN:e&&+e:n&&Jr(e)?new Date(e):r?r(e):e;function up(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Mx(t)?t.files:Lx(t)?IN(e.refs).value:MN(t)?[...t.selectedOptions].map(({value:n})=>n):pu(t)?ON(e.refs).value:FN($t(t.value)?e.ref.value:t.value,e)}var _U=(e,t,n,r)=>{const s={};for(const o of e){const i=ye(t,o);i&&mt(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Rl=e=>$t(e)?e:vf(e)?e.source:nn(e)?vf(e.value)?e.value.source:e.value:e,SU=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Yb(e,t,n){const r=ye(e,n);if(r||Ox(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=ye(t,o),l=ye(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(l&&l.type)return{name:o,error:l};s.pop()}return{name:n}}var kU=(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,jU=(e,t)=>!Kh(ye(e,t)).length&&Qt(e,t);const CU={mode:Nr.onSubmit,reValidateMode:Nr.onChange,shouldFocusError:!0};function EU(e={}){let t={...CU,...e},n={submitCount:0,isDirty:!1,isLoading:mo(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=nn(t.defaultValues)||nn(t.values)?Tn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Tn(s),i={action:!1,mount:!1,watch:!1},l={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:lp(),array:lp(),state:lp()},h=$b(t.mode),m=$b(t.reValidateMode),x=t.criteriaMode===Nr.all,p=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},w=async k=>{if(d.isValid||k){const P=t.resolver?Wn((await R()).errors):await O(r,!0);P!==n.isValid&&f.state.next({isValid:P})}},y=(k,P)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(l.mount)).forEach(M=>{M&&(P?mt(n.validatingFields,M,P):Qt(n.validatingFields,M))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Wn(n.validatingFields)}))},v=(k,P=[],M,Y,L=!0,K=!0)=>{if(Y&&M){if(i.action=!0,K&&Array.isArray(ye(r,k))){const Q=M(ye(r,k),Y.argA,Y.argB);L&&mt(r,k,Q)}if(K&&Array.isArray(ye(n.errors,k))){const Q=M(ye(n.errors,k),Y.argA,Y.argB);L&&mt(n.errors,k,Q),jU(n.errors,k)}if(d.touchedFields&&K&&Array.isArray(ye(n.touchedFields,k))){const Q=M(ye(n.touchedFields,k),Y.argA,Y.argB);L&&mt(n.touchedFields,k,Q)}d.dirtyFields&&(n.dirtyFields=nd(s,o)),f.state.next({name:k,isDirty:N(k,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else mt(o,k,P)},b=(k,P)=>{mt(n.errors,k,P),f.state.next({errors:n.errors})},_=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},j=(k,P,M,Y)=>{const L=ye(r,k);if(L){const K=ye(o,k,$t(M)?ye(s,k):M);$t(K)||Y&&Y.defaultChecked||P?mt(o,k,P?K:up(L._f)):U(k,K),i.mount&&w()}},C=(k,P,M,Y,L)=>{let K=!1,Q=!1;const ne={name:k},be=!!(ye(r,k)&&ye(r,k)._f&&ye(r,k)._f.disabled);if(!M||Y){d.isDirty&&(Q=n.isDirty,n.isDirty=ne.isDirty=N(),K=Q!==ne.isDirty);const Ge=be||ei(ye(s,k),P);Q=!!(!be&&ye(n.dirtyFields,k)),Ge||be?Qt(n.dirtyFields,k):mt(n.dirtyFields,k,!0),ne.dirtyFields=n.dirtyFields,K=K||d.dirtyFields&&Q!==!Ge}if(M){const Ge=ye(n.touchedFields,k);Ge||(mt(n.touchedFields,k,M),ne.touchedFields=n.touchedFields,K=K||d.touchedFields&&Ge!==M)}return K&&L&&f.state.next(ne),K?ne:{}},T=(k,P,M,Y)=>{const L=ye(n.errors,k),K=d.isValid&&Xr(P)&&n.isValid!==P;if(e.delayError&&M?(c=p(()=>b(k,M)),c(e.delayError)):(clearTimeout(u),c=null,M?mt(n.errors,k,M):Qt(n.errors,k)),(M?!ei(L,M):L)||!Wn(Y)||K){const Q={...Y,...K&&Xr(P)?{isValid:P}:{},errors:n.errors,name:k};n={...n,...Q},f.state.next(Q)}},R=async k=>{y(k,!0);const P=await t.resolver(o,t.context,_U(k||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return y(k),P},A=async k=>{const{errors:P}=await R(k);if(k)for(const M of k){const Y=ye(P,M);Y?mt(n.errors,M,Y):Qt(n.errors,M)}else n.errors=P;return P},O=async(k,P,M={valid:!0})=>{for(const Y in k){const L=k[Y];if(L){const{_f:K,...Q}=L;if(K){const ne=l.array.has(K.name);y([Y],!0);const be=await Kb(L,o,x,t.shouldUseNativeValidation&&!P,ne);if(y([Y]),be[K.name]&&(M.valid=!1,P))break;!P&&(ye(be,K.name)?ne?vU(n.errors,be,K.name):mt(n.errors,K.name,be[K.name]):Qt(n.errors,K.name))}Q&&await O(Q,P,M)}}return M.valid},G=()=>{for(const k of l.unMount){const P=ye(r,k);P&&(P._f.refs?P._f.refs.every(M=>!cp(M)):!cp(P._f.ref))&&Ie(k)}l.unMount=new Set},N=(k,P)=>(k&&P&&mt(o,k,P),!ei($(),s)),z=(k,P,M)=>AN(k,l,{...i.mount?o:$t(P)?s:Jr(k)?{[k]:P}:P},M,P),S=k=>Kh(ye(i.mount?o:s,k,e.shouldUnregister?ye(s,k,[]):[])),U=(k,P,M={})=>{const Y=ye(r,k);let L=P;if(Y){const K=Y._f;K&&(!K.disabled&&mt(o,k,FN(P,K)),L=yf(K.ref)&&_n(P)?"":P,MN(K.ref)?[...K.ref.options].forEach(Q=>Q.selected=L.includes(Q.value)):K.refs?pu(K.ref)?K.refs.length>1?K.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(L)?!!L.find(ne=>ne===Q.value):L===Q.value)):K.refs[0]&&(K.refs[0].checked=!!L):K.refs.forEach(Q=>Q.checked=Q.value===L):Mx(K.ref)?K.ref.value="":(K.ref.value=L,K.ref.type||f.values.next({name:k,values:{...o}})))}(M.shouldDirty||M.shouldTouch)&&C(k,L,M.shouldTouch,M.shouldDirty,!0),M.shouldValidate&&X(k)},J=(k,P,M)=>{for(const Y in P){const L=P[Y],K=`${k}.${Y}`,Q=ye(r,K);(l.array.has(k)||!xf(L)||Q&&!Q._f)&&!ga(L)?J(K,L,M):U(K,L,M)}},F=(k,P,M={})=>{const Y=ye(r,k),L=l.array.has(k),K=Tn(P);mt(o,k,K),L?(f.array.next({name:k,values:{...o}}),(d.isDirty||d.dirtyFields)&&M.shouldDirty&&f.state.next({name:k,dirtyFields:nd(s,o),isDirty:N(k,K)})):Y&&!Y._f&&!_n(K)?J(k,K,M):U(k,K,M),Ub(k,l)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},W=async k=>{i.mount=!0;const P=k.target;let M=P.name,Y=!0;const L=ye(r,M),K=()=>P.type?up(L._f):jN(k),Q=ne=>{Y=Number.isNaN(ne)||ne===ye(o,M,ne)};if(L){let ne,be;const Ge=K(),Ve=k.type===gf.BLUR||k.type===gf.FOCUS_OUT,Nt=!SU(L._f)&&!t.resolver&&!ye(n.errors,M)&&!L._f.deps||kU(Ve,ye(n.touchedFields,M),n.isSubmitted,m,h),ir=Ub(M,l,Ve);mt(o,M,Ge),Ve?(L._f.onBlur&&L._f.onBlur(k),c&&c(0)):L._f.onChange&&L._f.onChange(k);const Xt=C(M,Ge,Ve,!1),hs=!Wn(Xt)||ir;if(!Ve&&f.values.next({name:M,type:k.type,values:{...o}}),Nt)return d.isValid&&w(),hs&&f.state.next({name:M,...ir?{}:Xt});if(!Ve&&ir&&f.state.next({...n}),t.resolver){const{errors:ct}=await R([M]);if(Q(Ge),Y){const ms=Yb(n.errors,r,M),ps=Yb(ct,r,ms.name||M);ne=ps.error,M=ps.name,be=Wn(ct)}}else y([M],!0),ne=(await Kb(L,o,x,t.shouldUseNativeValidation))[M],y([M]),Q(Ge),Y&&(ne?be=!1:d.isValid&&(be=await O(r,!0)));Y&&(L._f.deps&&X(L._f.deps),T(M,be,ne,Xt))}},I=(k,P)=>{if(ye(n.errors,P)&&k.focus)return k.focus(),1},X=async(k,P={})=>{let M,Y;const L=tc(k);if(t.resolver){const K=await A($t(k)?k:L);M=Wn(K),Y=k?!L.some(Q=>ye(K,Q)):M}else k?(Y=(await Promise.all(L.map(async K=>{const Q=ye(r,K);return await O(Q&&Q._f?{[K]:Q}:Q)}))).every(Boolean),!(!Y&&!n.isValid)&&w()):Y=M=await O(r);return f.state.next({...!Jr(k)||d.isValid&&M!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:M}:{},errors:n.errors}),P.shouldFocus&&!Y&&nc(r,I,k?L:l.mount),Y},$=k=>{const P={...i.mount?o:s};return $t(k)?P:Jr(k)?ye(P,k):k.map(M=>ye(P,M))},B=(k,P)=>({invalid:!!ye((P||n).errors,k),isDirty:!!ye((P||n).dirtyFields,k),error:ye((P||n).errors,k),isValidating:!!ye(n.validatingFields,k),isTouched:!!ye((P||n).touchedFields,k)}),xe=k=>{k&&tc(k).forEach(P=>Qt(n.errors,P)),f.state.next({errors:k?n.errors:{}})},ie=(k,P,M)=>{const Y=(ye(r,k,{_f:{}})._f||{}).ref,L=ye(n.errors,k)||{},{ref:K,message:Q,type:ne,...be}=L;mt(n.errors,k,{...be,...P,ref:Y}),f.state.next({name:k,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&Y&&Y.focus&&Y.focus()},ae=(k,P)=>mo(k)?f.values.subscribe({next:M=>k(z(void 0,P),M)}):z(k,P,!0),Ie=(k,P={})=>{for(const M of k?tc(k):l.mount)l.mount.delete(M),l.array.delete(M),P.keepValue||(Qt(r,M),Qt(o,M)),!P.keepError&&Qt(n.errors,M),!P.keepDirty&&Qt(n.dirtyFields,M),!P.keepTouched&&Qt(n.touchedFields,M),!P.keepIsValidating&&Qt(n.validatingFields,M),!t.shouldUnregister&&!P.keepDefaultValue&&Qt(s,M);f.values.next({values:{...o}}),f.state.next({...n,...P.keepDirty?{isDirty:N()}:{}}),!P.keepIsValid&&w()},we=({disabled:k,name:P,field:M,fields:Y,value:L})=>{if(Xr(k)&&i.mount||k){const K=k?void 0:$t(L)?up(M?M._f:ye(Y,P)._f):L;mt(o,P,K),C(P,K,!1,!1,!0)}},ke=(k,P={})=>{let M=ye(r,k);const Y=Xr(P.disabled);return mt(r,k,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:k}},name:k,mount:!0,...P}}),l.mount.add(k),M?we({field:M,disabled:P.disabled,name:k,value:P.value}):j(k,!0,P.value),{...Y?{disabled:P.disabled}:{},...t.progressive?{required:!!P.required,min:Rl(P.min),max:Rl(P.max),minLength:Rl(P.minLength),maxLength:Rl(P.maxLength),pattern:Rl(P.pattern)}:{},name:k,onChange:W,onBlur:W,ref:L=>{if(L){ke(k,P),M=ye(r,k);const K=$t(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Q=bU(K),ne=M._f.refs||[];if(Q?ne.find(be=>be===K):K===M._f.ref)return;mt(r,k,{_f:{...M._f,...Q?{refs:[...ne.filter(cp),K,...Array.isArray(ye(s,k))?[{}]:[]],ref:{type:K.type,name:k}}:{ref:K}}}),j(k,!1,void 0,K)}else M=ye(r,k,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(CN(l.array,k)&&i.action)&&l.unMount.add(k)}}},Pe=()=>t.shouldFocusError&&nc(r,I,l.mount),Fe=k=>{Xr(k)&&(f.state.next({disabled:k}),nc(r,(P,M)=>{const Y=ye(r,M);Y&&(P.disabled=Y._f.disabled||k,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(L=>{L.disabled=Y._f.disabled||k}))},0,!1))},Me=(k,P)=>async M=>{let Y;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let L=Tn(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:K,values:Q}=await R();n.errors=K,L=Q}else await O(r);if(Qt(n.errors,"root"),Wn(n.errors)){f.state.next({errors:{}});try{await k(L,M)}catch(K){Y=K}}else P&&await P({...n.errors},M),Pe(),setTimeout(Pe);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Wn(n.errors)&&!Y,submitCount:n.submitCount+1,errors:n.errors}),Y)throw Y},Ae=(k,P={})=>{ye(r,k)&&($t(P.defaultValue)?F(k,Tn(ye(s,k))):(F(k,P.defaultValue),mt(s,k,Tn(P.defaultValue))),P.keepTouched||Qt(n.touchedFields,k),P.keepDirty||(Qt(n.dirtyFields,k),n.isDirty=P.defaultValue?N(k,Tn(ye(s,k))):N()),P.keepError||(Qt(n.errors,k),d.isValid&&w()),f.state.next({...n}))},st=(k,P={})=>{const M=k?Tn(k):s,Y=Tn(M),L=Wn(k),K=L?s:Y;if(P.keepDefaultValues||(s=M),!P.keepValues){if(P.keepDirtyValues)for(const Q of l.mount)ye(n.dirtyFields,Q)?mt(K,Q,ye(o,Q)):F(Q,ye(K,Q));else{if(Dx&&$t(k))for(const Q of l.mount){const ne=ye(r,Q);if(ne&&ne._f){const be=Array.isArray(ne._f.refs)?ne._f.refs[0]:ne._f.ref;if(yf(be)){const Ge=be.closest("form");if(Ge){Ge.reset();break}}}}r={}}o=e.shouldUnregister?P.keepDefaultValues?Tn(s):{}:Tn(K),f.array.next({values:{...K}}),f.values.next({values:{...K}})}l={mount:P.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:L?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!ei(k,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:L?{}:P.keepDirtyValues?P.keepDefaultValues&&o?nd(s,o):n.dirtyFields:P.keepDefaultValues&&k?nd(s,k):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},E=(k,P)=>st(mo(k)?k(o):k,P);return{control:{register:ke,unregister:Ie,getFieldState:B,handleSubmit:Me,setError:ie,_executeSchema:R,_getWatch:z,_getDirty:N,_updateValid:w,_removeUnmounted:G,_updateFieldArray:v,_updateDisabledField:we,_getFieldArray:S,_reset:st,_resetDefaultValues:()=>mo(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 l},set _names(k){l=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:X,register:ke,handleSubmit:Me,watch:ae,setValue:F,getValues:$,reset:E,resetField:Ae,clearErrors:xe,unregister:Ie,setError:ie,setFocus:(k,P={})=>{const M=ye(r,k),Y=M&&M._f;if(Y){const L=Y.refs?Y.refs[0]:Y.ref;L.focus&&(L.focus(),P.shouldSelect&&L.select())}},getFieldState:B}}function Ht(e={}){const t=He.useRef(),n=He.useRef(),[r,s]=He.useState({isDirty:!1,isValidating:!1,isLoading:mo(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:mo(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...EU(e),formState:r});const o=t.current.control;return o._options=e,Ix({subject:o._subjects.state,next:i=>{PN(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),He.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),He.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),He.useEffect(()=>{e.values&&!ei(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),He.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),He.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()}),He.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=TN(r,o),t.current}var it;(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(l=>typeof s[s[l]]!="number"),i={};for(const l of o)i[l]=s[l];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})(it||(it={}));var zg;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(zg||(zg={}));const Ce=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lo=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}},ue=it.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"]),NU=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Qn 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 l=r,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(n(i))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return s(this),r}static assert(t){if(!(t instanceof Qn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.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()}}Qn.create=e=>new Qn(e);const Wa=(e,t)=>{let n;switch(e.code){case ue.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ue.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case ue.unrecognized_keys:n=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case ue.invalid_union:n="Invalid input";break;case ue.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case ue.invalid_enum_value:n=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case ue.invalid_arguments:n="Invalid function arguments";break;case ue.invalid_return_type:n="Invalid function return type";break;case ue.invalid_date:n="Invalid date";break;case ue.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}"`:it.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ue.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 ue.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 ue.custom:n="Invalid input";break;case ue.invalid_intersection_types:n="Intersection results could not be merged";break;case ue.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ue.not_finite:n="Number must be finite";break;default:n=t.defaultError,it.assertNever(e)}return{message:n}};let $N=Wa;function TU(e){$N=e}function bf(){return $N}const _f=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 l="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)l=u(i,{data:t,defaultError:l}).message;return{...s,path:o,message:l}},PU=[];function _e(e,t){const n=bf(),r=_f({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Wa?void 0:Wa].filter(s=>!!s)});e.common.issues.push(r)}class yn{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 Ke;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 yn.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 Ke;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 Ke=Object.freeze({status:"aborted"}),ya=e=>({status:"dirty",value:e}),kn=e=>({status:"valid",value:e}),Fg=e=>e.status==="aborted",$g=e=>e.status==="dirty",Ac=e=>e.status==="valid",Dc=e=>typeof Promise<"u"&&e instanceof Promise;function Sf(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 UN(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 Ul,Vl;class as{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 Gb=(e,t)=>{if(Ac(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 Qn(e.common.issues);return this._error=n,this._error}}};function Ze(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,l)=>{var c,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??l.defaultError}:typeof l.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:l.defaultError}:i.code!=="invalid_type"?{message:l.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:l.defaultError}},description:s}}class et{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 lo(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:lo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:lo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Dc(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:lo(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Gb(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:lo(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(Dc(s)?s:Promise.resolve(s));return Gb(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),l=()=>o.addIssue({code:ue.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(l(),!1)):i?!0:(l(),!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 $r({schema:this,typeName:Be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return rs.create(this,this._def)}nullable(){return Oo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Or.create(this,this._def)}promise(){return Ka.create(this,this._def)}or(t){return Lc.create([this,t],this._def)}and(t){return zc.create(this,t,this._def)}transform(t){return new $r({...Ze(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Bc({...Ze(this._def),innerType:this,defaultValue:n,typeName:Be.ZodDefault})}brand(){return new zx({typeName:Be.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Wc({...Ze(this._def),innerType:this,catchValue:n,typeName:Be.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return gu.create(this,t)}readonly(){return Hc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const RU=/^c[^\s-]{8,}$/i,AU=/^[0-9a-z]+$/,DU=/^[0-9A-HJKMNP-TV-Z]{26}$/,OU=/^[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,IU=/^[a-z0-9_-]{21}$/i,MU=/^[-+]?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)?)??$/,LU=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,zU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let dp;const FU=/^(?:(?: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])$/,$U=/^(([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})))$/,UU=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,VN="((\\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])))",VU=new RegExp(`^${VN}$`);function BN(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 BU(e){return new RegExp(`^${BN(e)}$`)}function WN(e){let t=`${VN}T${BN(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 WU(e,t){return!!((t==="v4"||!t)&&FU.test(e)||(t==="v6"||!t)&&$U.test(e))}class Rr extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const o=this._getOrReturnCtx(t);return _e(o,{code:ue.invalid_type,expected:Ce.string,received:o.parsedType}),Ke}const r=new yn;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:ue.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),_e(s,{code:ue.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,l=t.data.length<o.value;(i||l)&&(s=this._getOrReturnCtx(t,s),i?_e(s,{code:ue.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):l&&_e(s,{code:ue.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")LU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"email",code:ue.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")dp||(dp=new RegExp(zU,"u")),dp.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"emoji",code:ue.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")OU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"uuid",code:ue.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")IU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"nanoid",code:ue.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")RU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"cuid",code:ue.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")AU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"cuid2",code:ue.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")DU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"ulid",code:ue.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),_e(s,{validation:"url",code:ue.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),_e(s,{validation:"regex",code:ue.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),_e(s,{code:ue.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),_e(s,{code:ue.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ue.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?WN(o).test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ue.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?VU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ue.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?BU(o).test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ue.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?MU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"duration",code:ue.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?WU(t.data,o.version)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"ip",code:ue.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?UU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"base64",code:ue.invalid_string,message:o.message}),r.dirty()):it.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:ue.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new Rr({...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 Rr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Rr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Rr({...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}}Rr.create=e=>{var t;return new Rr({checks:[],typeName:Be.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};function HU(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 Ro extends et{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 _e(o,{code:ue.invalid_type,expected:Ce.number,received:o.parsedType}),Ke}let r;const s=new yn;for(const o of this._def.checks)o.kind==="int"?it.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:ue.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),_e(r,{code:ue.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),_e(r,{code:ue.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?HU(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:ue.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:ue.not_finite,message:o.message}),s.dirty()):it.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 Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new Ro({...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"&&it.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)}}Ro.create=e=>new Ro({checks:[],typeName:Be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Ao extends et{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 _e(o,{code:ue.invalid_type,expected:Ce.bigint,received:o.parsedType}),Ke}let r;const s=new yn;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),_e(r,{code:ue.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),_e(r,{code:ue.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),_e(r,{code:ue.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):it.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 Ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new Ao({...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}}Ao.create=e=>{var t;return new Ao({checks:[],typeName:Be.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};class Oc extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:ue.invalid_type,expected:Ce.boolean,received:r.parsedType}),Ke}return kn(t.data)}}Oc.create=e=>new Oc({typeName:Be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class xi extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const o=this._getOrReturnCtx(t);return _e(o,{code:ue.invalid_type,expected:Ce.date,received:o.parsedType}),Ke}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return _e(o,{code:ue.invalid_date}),Ke}const r=new yn;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:ue.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),_e(s,{code:ue.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):it.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new xi({...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}}xi.create=e=>new xi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Be.ZodDate,...Ze(e)});class kf extends et{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:ue.invalid_type,expected:Ce.symbol,received:r.parsedType}),Ke}return kn(t.data)}}kf.create=e=>new kf({typeName:Be.ZodSymbol,...Ze(e)});class Ic extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:ue.invalid_type,expected:Ce.undefined,received:r.parsedType}),Ke}return kn(t.data)}}Ic.create=e=>new Ic({typeName:Be.ZodUndefined,...Ze(e)});class Mc extends et{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return _e(r,{code:ue.invalid_type,expected:Ce.null,received:r.parsedType}),Ke}return kn(t.data)}}Mc.create=e=>new Mc({typeName:Be.ZodNull,...Ze(e)});class Ha extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return kn(t.data)}}Ha.create=e=>new Ha({typeName:Be.ZodAny,...Ze(e)});class ii extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return kn(t.data)}}ii.create=e=>new ii({typeName:Be.ZodUnknown,...Ze(e)});class Us extends et{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:ue.invalid_type,expected:Ce.never,received:n.parsedType}),Ke}}Us.create=e=>new Us({typeName:Be.ZodNever,...Ze(e)});class jf extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:ue.invalid_type,expected:Ce.void,received:r.parsedType}),Ke}return kn(t.data)}}jf.create=e=>new jf({typeName:Be.ZodVoid,...Ze(e)});class Or extends et{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==Ce.array)return _e(n,{code:ue.invalid_type,expected:Ce.array,received:n.parsedType}),Ke;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,l=n.data.length<s.exactLength.value;(i||l)&&(_e(n,{code:i?ue.too_big:ue.too_small,minimum:l?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&&(_e(n,{code:ue.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&&(_e(n,{code:ue.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,l)=>s.type._parseAsync(new as(n,i,n.path,l)))).then(i=>yn.mergeArray(r,i));const o=[...n.data].map((i,l)=>s.type._parseSync(new as(n,i,n.path,l)));return yn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Or({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new Or({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new Or({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}Or.create=(e,t)=>new Or({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...Ze(t)});function qi(e){if(e instanceof At){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=rs.create(qi(r))}return new At({...e._def,shape:()=>t})}else return e instanceof Or?new Or({...e._def,type:qi(e.element)}):e instanceof rs?rs.create(qi(e.unwrap())):e instanceof Oo?Oo.create(qi(e.unwrap())):e instanceof ls?ls.create(e.items.map(t=>qi(t))):e}class At extends et{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=it.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ce.object){const u=this._getOrReturnCtx(t);return _e(u,{code:ue.invalid_type,expected:Ce.object,received:u.parsedType}),Ke}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),l=[];if(!(this._def.catchall instanceof Us&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||l.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 as(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Us){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")l.length>0&&(_e(s,{code:ue.unrecognized_keys,keys:l}),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 l){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new as(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=>yn.mergeObjectSync(r,u)):yn.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,l;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:(l=Oe.errToObj(t).message)!==null&&l!==void 0?l: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:Be.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new At({...this._def,catchall:t})}pick(t){const n={};return it.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 it.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}deepPartial(){return qi(this)}partial(t){const n={};return it.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 it.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof rs;)o=o._def.innerType;n[r]=o}}),new At({...this._def,shape:()=>n})}keyof(){return HN(it.objectKeys(this.shape))}}At.create=(e,t)=>new At({shape:()=>e,unknownKeys:"strip",catchall:Us.create(),typeName:Be.ZodObject,...Ze(t)});At.strictCreate=(e,t)=>new At({shape:()=>e,unknownKeys:"strict",catchall:Us.create(),typeName:Be.ZodObject,...Ze(t)});At.lazycreate=(e,t)=>new At({shape:e,unknownKeys:"strip",catchall:Us.create(),typeName:Be.ZodObject,...Ze(t)});class Lc extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const l of o)if(l.result.status==="valid")return l.result;for(const l of o)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const i=o.map(l=>new Qn(l.ctx.common.issues));return _e(n,{code:ue.invalid_union,unionErrors:i}),Ke}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 l=i.map(c=>new Qn(c));return _e(n,{code:ue.invalid_union,unionErrors:l}),Ke}}get options(){return this._def.options}}Lc.create=(e,t)=>new Lc({options:e,typeName:Be.ZodUnion,...Ze(t)});const ws=e=>e instanceof $c?ws(e.schema):e instanceof $r?ws(e.innerType()):e instanceof Uc?[e.value]:e instanceof Do?e.options:e instanceof Vc?it.objectValues(e.enum):e instanceof Bc?ws(e._def.innerType):e instanceof Ic?[void 0]:e instanceof Mc?[null]:e instanceof rs?[void 0,...ws(e.unwrap())]:e instanceof Oo?[null,...ws(e.unwrap())]:e instanceof zx||e instanceof Hc?ws(e.unwrap()):e instanceof Wc?ws(e._def.innerType):[];class Gh extends et{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return _e(n,{code:ue.invalid_type,expected:Ce.object,received:n.parsedType}),Ke;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}):(_e(n,{code:ue.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ke)}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=ws(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 l of i){if(s.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);s.set(l,o)}}return new Gh({typeName:Be.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ze(r)})}}function Ug(e,t){const n=lo(e),r=lo(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const s=it.objectKeys(t),o=it.objectKeys(e).filter(l=>s.indexOf(l)!==-1),i={...e,...t};for(const l of o){const c=Ug(e[l],t[l]);if(!c.valid)return{valid:!1};i[l]=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],l=t[o],c=Ug(i,l);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 zc extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,i)=>{if(Fg(o)||Fg(i))return Ke;const l=Ug(o.value,i.value);return l.valid?(($g(o)||$g(i))&&n.dirty(),{status:n.value,value:l.data}):(_e(r,{code:ue.invalid_intersection_types}),Ke)};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}))}}zc.create=(e,t,n)=>new zc({left:e,right:t,typeName:Be.ZodIntersection,...Ze(n)});class ls extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return _e(r,{code:ue.invalid_type,expected:Ce.array,received:r.parsedType}),Ke;if(r.data.length<this._def.items.length)return _e(r,{code:ue.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ke;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:ue.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new as(r,i,r.path,l)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>yn.mergeArray(n,i)):yn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new ls({...this._def,rest:t})}}ls.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ls({items:e,typeName:Be.ZodTuple,rest:null,...Ze(t)})};class Fc extends et{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 _e(r,{code:ue.invalid_type,expected:Ce.object,received:r.parsedType}),Ke;const s=[],o=this._def.keyType,i=this._def.valueType;for(const l in r.data)s.push({key:o._parse(new as(r,l,r.path,l)),value:i._parse(new as(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?yn.mergeObjectAsync(n,s):yn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof et?new Fc({keyType:t,valueType:n,typeName:Be.ZodRecord,...Ze(r)}):new Fc({keyType:Rr.create(),valueType:t,typeName:Be.ZodRecord,...Ze(n)})}}class Cf extends et{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 _e(r,{code:ue.invalid_type,expected:Ce.map,received:r.parsedType}),Ke;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([l,c],u)=>({key:s._parse(new as(r,l,r.path,[u,"key"])),value:o._parse(new as(r,c,r.path,[u,"value"]))}));if(r.common.async){const l=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 Ke;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const c of i){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return Ke;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}}}}Cf.create=(e,t,n)=>new Cf({valueType:t,keyType:e,typeName:Be.ZodMap,...Ze(n)});class wi extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return _e(r,{code:ue.invalid_type,expected:Ce.set,received:r.parsedType}),Ke;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(_e(r,{code:ue.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&&(_e(r,{code:ue.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 Ke;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const l=[...r.data.values()].map((c,u)=>o._parse(new as(r,c,r.path,u)));return r.common.async?Promise.all(l).then(c=>i(c)):i(l)}min(t,n){return new wi({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new wi({...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)}}wi.create=(e,t)=>new wi({valueType:e,minSize:null,maxSize:null,typeName:Be.ZodSet,...Ze(t)});class Aa extends et{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.function)return _e(n,{code:ue.invalid_type,expected:Ce.function,received:n.parsedType}),Ke;function r(l,c){return _f({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,bf(),Wa].filter(u=>!!u),issueData:{code:ue.invalid_arguments,argumentsError:c}})}function s(l,c){return _f({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,bf(),Wa].filter(u=>!!u),issueData:{code:ue.invalid_return_type,returnTypeError:c}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ka){const l=this;return kn(async function(...c){const u=new Qn([]),d=await l._def.args.parseAsync(c,o).catch(m=>{throw u.addIssue(r(c,m)),u}),f=await Reflect.apply(i,this,d);return await l._def.returns._def.type.parseAsync(f,o).catch(m=>{throw u.addIssue(s(f,m)),u})})}else{const l=this;return kn(function(...c){const u=l._def.args.safeParse(c,o);if(!u.success)throw new Qn([r(c,u.error)]);const d=Reflect.apply(i,this,u.data),f=l._def.returns.safeParse(d,o);if(!f.success)throw new Qn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Aa({...this._def,args:ls.create(t).rest(ii.create())})}returns(t){return new Aa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Aa({args:t||ls.create([]).rest(ii.create()),returns:n||ii.create(),typeName:Be.ZodFunction,...Ze(r)})}}class $c extends et{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})}}$c.create=(e,t)=>new $c({getter:e,typeName:Be.ZodLazy,...Ze(t)});class Uc extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:ue.invalid_literal,expected:this._def.value}),Ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}Uc.create=(e,t)=>new Uc({value:e,typeName:Be.ZodLiteral,...Ze(t)});function HN(e,t){return new Do({values:e,typeName:Be.ZodEnum,...Ze(t)})}class Do extends et{constructor(){super(...arguments),Ul.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:it.joinValues(r),received:n.parsedType,code:ue.invalid_type}),Ke}if(Sf(this,Ul)||UN(this,Ul,new Set(this._def.values)),!Sf(this,Ul).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:ue.invalid_enum_value,options:r}),Ke}return kn(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 Do.create(t,{...this._def,...n})}exclude(t,n=this._def){return Do.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ul=new WeakMap;Do.create=HN;class Vc extends et{constructor(){super(...arguments),Vl.set(this,void 0)}_parse(t){const n=it.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const s=it.objectValues(n);return _e(r,{expected:it.joinValues(s),received:r.parsedType,code:ue.invalid_type}),Ke}if(Sf(this,Vl)||UN(this,Vl,new Set(it.getValidEnumValues(this._def.values))),!Sf(this,Vl).has(t.data)){const s=it.objectValues(n);return _e(r,{received:r.data,code:ue.invalid_enum_value,options:s}),Ke}return kn(t.data)}get enum(){return this._def.values}}Vl=new WeakMap;Vc.create=(e,t)=>new Vc({values:e,typeName:Be.ZodNativeEnum,...Ze(t)});class Ka extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return _e(n,{code:ue.invalid_type,expected:Ce.promise,received:n.parsedType}),Ke;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return kn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ka.create=(e,t)=>new Ka({type:e,typeName:Be.ZodPromise,...Ze(t)});class $r extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.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=>{_e(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 l=>{if(n.value==="aborted")return Ke;const c=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return c.status==="aborted"?Ke:c.status==="dirty"||n.value==="dirty"?ya(c.value):c});{if(n.value==="aborted")return Ke;const l=this._def.schema._parseSync({data:i,path:r.path,parent:r});return l.status==="aborted"?Ke:l.status==="dirty"||n.value==="dirty"?ya(l.value):l}}if(s.type==="refinement"){const i=l=>{const c=s.refinement(l,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 l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?Ke:(l.status==="dirty"&&n.dirty(),i(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?Ke:(l.status==="dirty"&&n.dirty(),i(l.value).then(()=>({status:n.value,value:l.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(!Ac(i))return i;const l=s.transform(i.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Ac(i)?Promise.resolve(s.transform(i.value,o)).then(l=>({status:n.value,value:l})):i);it.assertNever(s)}}$r.create=(e,t,n)=>new $r({schema:e,typeName:Be.ZodEffects,effect:t,...Ze(n)});$r.createWithPreprocess=(e,t,n)=>new $r({schema:t,effect:{type:"preprocess",transform:e},typeName:Be.ZodEffects,...Ze(n)});class rs extends et{_parse(t){return this._getType(t)===Ce.undefined?kn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}rs.create=(e,t)=>new rs({innerType:e,typeName:Be.ZodOptional,...Ze(t)});class Oo extends et{_parse(t){return this._getType(t)===Ce.null?kn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Oo.create=(e,t)=>new Oo({innerType:e,typeName:Be.ZodNullable,...Ze(t)});class Bc extends et{_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}}Bc.create=(e,t)=>new Bc({innerType:e,typeName:Be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class Wc extends et{_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 Dc(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Qn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Qn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Wc.create=(e,t)=>new Wc({innerType:e,typeName:Be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class Ef extends et{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:ue.invalid_type,expected:Ce.nan,received:r.parsedType}),Ke}return{status:"valid",value:t.data}}}Ef.create=e=>new Ef({typeName:Be.ZodNaN,...Ze(e)});const KU=Symbol("zod_brand");class zx extends et{_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 gu extends et{_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"?Ke:o.status==="dirty"?(n.dirty(),ya(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"?Ke: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 gu({in:t,out:n,typeName:Be.ZodPipeline})}}class Hc extends et{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Ac(s)&&(s.value=Object.freeze(s.value)),s);return Dc(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Hc.create=(e,t)=>new Hc({innerType:e,typeName:Be.ZodReadonly,...Ze(t)});function KN(e,t={},n){return e?Ha.create().superRefine((r,s)=>{var o,i;if(!e(r)){const l=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(i=(o=l.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,u=typeof l=="string"?{message:l}:l;s.addIssue({code:"custom",...u,fatal:c})}}):Ha.create()}const YU={object:At.lazycreate};var Be;(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"})(Be||(Be={}));const GU=(e,t={message:`Input not instance of ${e.name}`})=>KN(n=>n instanceof e,t),YN=Rr.create,GN=Ro.create,ZU=Ef.create,qU=Ao.create,ZN=Oc.create,XU=xi.create,QU=kf.create,JU=Ic.create,eV=Mc.create,tV=Ha.create,nV=ii.create,rV=Us.create,sV=jf.create,oV=Or.create,iV=At.create,aV=At.strictCreate,lV=Lc.create,cV=Gh.create,uV=zc.create,dV=ls.create,fV=Fc.create,hV=Cf.create,mV=wi.create,pV=Aa.create,gV=$c.create,yV=Uc.create,vV=Do.create,xV=Vc.create,wV=Ka.create,Zb=$r.create,bV=rs.create,_V=Oo.create,SV=$r.createWithPreprocess,kV=gu.create,jV=()=>YN().optional(),CV=()=>GN().optional(),EV=()=>ZN().optional(),NV={string:e=>Rr.create({...e,coerce:!0}),number:e=>Ro.create({...e,coerce:!0}),boolean:e=>Oc.create({...e,coerce:!0}),bigint:e=>Ao.create({...e,coerce:!0}),date:e=>xi.create({...e,coerce:!0})},TV=Ke;var te=Object.freeze({__proto__:null,defaultErrorMap:Wa,setErrorMap:TU,getErrorMap:bf,makeIssue:_f,EMPTY_PATH:PU,addIssueToContext:_e,ParseStatus:yn,INVALID:Ke,DIRTY:ya,OK:kn,isAborted:Fg,isDirty:$g,isValid:Ac,isAsync:Dc,get util(){return it},get objectUtil(){return zg},ZodParsedType:Ce,getParsedType:lo,ZodType:et,datetimeRegex:WN,ZodString:Rr,ZodNumber:Ro,ZodBigInt:Ao,ZodBoolean:Oc,ZodDate:xi,ZodSymbol:kf,ZodUndefined:Ic,ZodNull:Mc,ZodAny:Ha,ZodUnknown:ii,ZodNever:Us,ZodVoid:jf,ZodArray:Or,ZodObject:At,ZodUnion:Lc,ZodDiscriminatedUnion:Gh,ZodIntersection:zc,ZodTuple:ls,ZodRecord:Fc,ZodMap:Cf,ZodSet:wi,ZodFunction:Aa,ZodLazy:$c,ZodLiteral:Uc,ZodEnum:Do,ZodNativeEnum:Vc,ZodPromise:Ka,ZodEffects:$r,ZodTransformer:$r,ZodOptional:rs,ZodNullable:Oo,ZodDefault:Bc,ZodCatch:Wc,ZodNaN:Ef,BRAND:KU,ZodBranded:zx,ZodPipeline:gu,ZodReadonly:Hc,custom:KN,Schema:et,ZodSchema:et,late:YU,get ZodFirstPartyTypeKind(){return Be},coerce:NV,any:tV,array:oV,bigint:qU,boolean:ZN,date:XU,discriminatedUnion:cV,effect:Zb,enum:vV,function:pV,instanceof:GU,intersection:uV,lazy:gV,literal:yV,map:hV,nan:ZU,nativeEnum:xV,never:rV,null:eV,nullable:_V,number:GN,object:iV,oboolean:EV,onumber:CV,optional:bV,ostring:jV,pipeline:kV,preprocess:SV,promise:wV,record:fV,set:mV,strictObject:aV,string:YN,symbol:QU,transformer:Zb,tuple:dV,undefined:JU,union:lV,unknown:nV,void:sV,NEVER:TV,ZodIssueCode:ue,quotelessJson:NU,ZodError:Qn});const qb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=ye(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},qN=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?qb(r.ref,n,e):r.refs&&r.refs.forEach(s=>qb(s,n,e))}},PV=(e,t)=>{t.shouldUseNativeValidation&&qN(e,t);const n={};for(const r in e){const s=ye(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(RV(t.names||Object.keys(e),r)){const i=Object.assign({},ye(n,r));mt(i,"root",o),mt(n,r,i)}else mt(n,r,o)}return n},RV=(e,t)=>e.some(n=>n.startsWith(t+"."));var AV=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 l=r.unionErrors[0].errors[0];n[i]={message:l.message,type:l.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]=DN(i,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},Kt=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,l){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return o.shouldUseNativeValidation&&qN({},o),{errors:{},values:n.raw?r:u}})}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(i){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(i))return{values:{},errors:PV(AV(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}};const XN=g.forwardRef(({...e},t)=>a.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));XN.displayName="Breadcrumb";const QN=g.forwardRef(({className:e,...t},n)=>a.jsx("ol",{ref:n,className:se("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));QN.displayName="BreadcrumbList";const Vg=g.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,className:se("inline-flex items-center gap-1.5",e),...t}));Vg.displayName="BreadcrumbItem";const JN=g.forwardRef(({asChild:e,className:t,...n},r)=>{const s=e?ss:"a";return a.jsx(s,{ref:r,className:se("transition-colors hover:text-foreground",t),...n})});JN.displayName="BreadcrumbLink";const eT=g.forwardRef(({className:e,...t},n)=>a.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:se("font-normal text-foreground",e),...t}));eT.displayName="BreadcrumbPage";const tT=({children:e,className:t,...n})=>a.jsx("li",{role:"presentation","aria-hidden":"true",className:se("[&>svg]:size-3.5",t),...n,children:e??a.jsx(ck,{})});tT.displayName="BreadcrumbSeparator";function DV(e,t=[]){let n=[];function r(o,i){const l=g.createContext(i),c=n.length;n=[...n,i];const u=f=>{var y;const{scope:h,children:m,...x}=f,p=((y=h==null?void 0:h[e])==null?void 0:y[c])||l,w=g.useMemo(()=>x,Object.values(x));return a.jsx(p.Provider,{value:w,children:m})};u.displayName=o+"Provider";function d(f,h){var p;const m=((p=h==null?void 0:h[e])==null?void 0:p[c])||l,x=g.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,d]}const s=()=>{const o=n.map(i=>g.createContext(i));return function(l){const c=(l==null?void 0:l[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,OV(s,...t)]}function OV(...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((l,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...l,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function IV(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var nT=e=>{const{present:t,children:n}=e,r=MV(t),s=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),o=Ye(r.ref,LV(s));return typeof n=="function"||r.isPresent?g.cloneElement(s,{ref:o}):null};nT.displayName="Presence";function MV(e){const[t,n]=g.useState(),r=g.useRef({}),s=g.useRef(e),o=g.useRef("none"),i=e?"mounted":"unmounted",[l,c]=IV(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=rd(r.current);o.current=l==="mounted"?u:"none"},[l]),Bt(()=>{const u=r.current,d=s.current;if(d!==e){const h=o.current,m=rd(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Bt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const p=rd(r.current).includes(m.animationName);if(m.target===t&&p&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},h=m=>{m.target===t&&(o.current=rd(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function rd(e){return(e==null?void 0:e.animationName)||"none"}function LV(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 Fx="Collapsible",[zV,C9]=DV(Fx),[FV,$x]=zV(Fx),rT=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...l}=e,[c=!1,u]=zn({prop:r,defaultProp:s,onChange:i});return a.jsx(FV,{scope:n,disabled:o,contentId:Ln(),open:c,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),children:a.jsx(Te.div,{"data-state":Bx(c),"data-disabled":o?"":void 0,...l,ref:t})})});rT.displayName=Fx;var sT="CollapsibleTrigger",oT=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=$x(sT,n);return a.jsx(Te.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Bx(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ge(e.onClick,s.onOpenToggle)})});oT.displayName=sT;var Ux="CollapsibleContent",Vx=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=$x(Ux,e.__scopeCollapsible);return a.jsx(nT,{present:n||s.open,children:({present:o})=>a.jsx($V,{...r,ref:t,present:o})})});Vx.displayName=Ux;var $V=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,i=$x(Ux,n),[l,c]=g.useState(r),u=g.useRef(null),d=Ye(t,u),f=g.useRef(0),h=f.current,m=g.useRef(0),x=m.current,p=i.open||l,w=g.useRef(p),y=g.useRef();return g.useEffect(()=>{const v=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(v)},[]),Bt(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();f.current=b.height,m.current=b.width,w.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),c(r)}},[i.open,r]),a.jsx(Te.div,{"data-state":Bx(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!p,...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:p&&s})});function Bx(e){return e?"open":"closed"}var UV=rT;const VV=UV,BV=oT,iT=g.forwardRef(({className:e,...t},n)=>a.jsx(Vx,{ref:n,className:se("overflow-y-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",e),...t}));iT.displayName=Vx.displayName;var WV="Label",aT=g.forwardRef((e,t)=>a.jsx(Te.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())}}));aT.displayName=WV;var lT=aT;const HV=eu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_t=g.forwardRef(({className:e,...t},n)=>a.jsx(lT,{ref:n,className:se(HV(),e),...t}));_t.displayName=lT.displayName;const Yt=hU,cT=g.createContext({}),he=({...e})=>a.jsx(cT.Provider,{value:{name:e.name},children:a.jsx(yU,{...e})}),Zh=()=>{const e=g.useContext(cT),t=g.useContext(uT),{getFieldState:n,formState:r}=Yh(),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}},uT=g.createContext({}),de=g.forwardRef(({className:e,...t},n)=>{const r=g.useId();return a.jsx(uT.Provider,{value:{id:r},children:a.jsx("div",{ref:n,className:se("space-y-2",e),...t})})});de.displayName="FormItem";const me=g.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Zh();return a.jsx(_t,{ref:n,className:se(r&&"text-destructive",e),htmlFor:s,...t})});me.displayName="FormLabel";const pe=g.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=Zh();return a.jsx(ss,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});pe.displayName="FormControl";const KV=g.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Zh();return a.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})});KV.displayName="FormDescription";const le=g.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=Zh(),{t:i}=Ue(),l=s?i(String(s==null?void 0:s.message)):t;return l?a.jsx("p",{ref:r,id:o,className:se("text-sm font-medium text-destructive",e),...n,children:l}):null});le.displayName="FormMessage";const oe=g.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:se("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));oe.displayName="Input";function Bg(e,[t,n]){return Math.min(n,Math.max(t,e))}var YV=[" ","Enter","ArrowUp","ArrowDown"],GV=[" ","Enter"],yu="Select",[qh,Xh,ZV]=tu(yu),[fl,E9]=un(yu,[ZV,il]),Qh=il(),[qV,$o]=fl(yu),[XV,QV]=fl(yu),dT=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:m}=e,x=Qh(t),[p,w]=g.useState(null),[y,v]=g.useState(null),[b,_]=g.useState(!1),j=Ci(u),[C=!1,T]=zn({prop:r,defaultProp:s,onChange:o}),[R,A]=zn({prop:i,defaultProp:l,onChange:c}),O=g.useRef(null),G=p?!!p.closest("form"):!0,[N,z]=g.useState(new Set),S=Array.from(N).map(U=>U.props.value).join(";");return a.jsx(_v,{...x,children:a.jsxs(qV,{required:m,scope:t,trigger:p,onTriggerChange:w,valueNode:y,onValueNodeChange:v,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:Ln(),value:R,onValueChange:A,open:C,onOpenChange:T,dir:j,triggerPointerDownPosRef:O,disabled:h,children:[a.jsx(qh.Provider,{scope:t,children:a.jsx(XV,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(U=>{z(J=>new Set(J).add(U))},[]),onNativeOptionRemove:g.useCallback(U=>{z(J=>{const F=new Set(J);return F.delete(U),F})},[]),children:n})}),G?a.jsxs(LT,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:U=>A(U.target.value),disabled:h,children:[R===void 0?a.jsx("option",{value:""}):null,Array.from(N)]},S):null]})})};dT.displayName=yu;var fT="SelectTrigger",hT=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=Qh(n),i=$o(fT,n),l=i.disabled||r,c=Ye(t,i.onTriggerChange),u=Xh(n),[d,f,h]=zT(x=>{const p=u().filter(v=>!v.disabled),w=p.find(v=>v.value===i.value),y=FT(p,x,w);y!==void 0&&i.onValueChange(y.value)}),m=()=>{l||(i.onOpenChange(!0),h())};return a.jsx(Sv,{asChild:!0,...o,children:a.jsx(Te.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:l,"data-disabled":l?"":void 0,"data-placeholder":MT(i.value)?"":void 0,...s,ref:c,onClick:ge(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ge(s.onPointerDown,x=>{const p=x.target;p.hasPointerCapture(x.pointerId)&&p.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(m(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ge(s.onKeyDown,x=>{const p=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(p&&x.key===" ")&&YV.includes(x.key)&&(m(),x.preventDefault())})})})});hT.displayName=fT;var mT="SelectValue",pT=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...l}=e,c=$o(mT,n),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=Ye(t,c.onValueNodeChange);return Bt(()=>{u(d)},[u,d]),a.jsx(Te.span,{...l,ref:f,style:{pointerEvents:"none"},children:MT(c.value)?a.jsx(a.Fragment,{children:i}):o})});pT.displayName=mT;var JV="SelectIcon",gT=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return a.jsx(Te.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});gT.displayName=JV;var eB="SelectPortal",yT=e=>a.jsx(ru,{asChild:!0,...e});yT.displayName=eB;var bi="SelectContent",vT=g.forwardRef((e,t)=>{const n=$o(bi,e.__scopeSelect),[r,s]=g.useState();if(Bt(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Bs.createPortal(a.jsx(xT,{scope:e.__scopeSelect,children:a.jsx(qh.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),o):null}return a.jsx(wT,{...e,ref:t})});vT.displayName=bi;var Ss=10,[xT,Uo]=fl(bi),tB="SelectContentImpl",wT=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:x,hideWhenDetached:p,avoidCollisions:w,...y}=e,v=$o(bi,n),[b,_]=g.useState(null),[j,C]=g.useState(null),T=Ye(t,we=>_(we)),[R,A]=g.useState(null),[O,G]=g.useState(null),N=Xh(n),[z,S]=g.useState(!1),U=g.useRef(!1);g.useEffect(()=>{if(b)return Nv(b)},[b]),fv();const J=g.useCallback(we=>{const[ke,...Pe]=N().map(Ae=>Ae.ref.current),[Fe]=Pe.slice(-1),Me=document.activeElement;for(const Ae of we)if(Ae===Me||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===ke&&j&&(j.scrollTop=0),Ae===Fe&&j&&(j.scrollTop=j.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==Me))return},[N,j]),F=g.useCallback(()=>J([R,b]),[J,R,b]);g.useEffect(()=>{z&&F()},[z,F]);const{onOpenChange:W,triggerPointerDownPosRef:I}=v;g.useEffect(()=>{if(b){let we={x:0,y:0};const ke=Fe=>{var Me,Ae;we={x:Math.abs(Math.round(Fe.pageX)-(((Me=I.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Ae=I.current)==null?void 0:Ae.y)??0))}},Pe=Fe=>{we.x<=10&&we.y<=10?Fe.preventDefault():b.contains(Fe.target)||W(!1),document.removeEventListener("pointermove",ke),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ke),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ke),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[b,W,I]),g.useEffect(()=>{const we=()=>W(!1);return window.addEventListener("blur",we),window.addEventListener("resize",we),()=>{window.removeEventListener("blur",we),window.removeEventListener("resize",we)}},[W]);const[X,$]=zT(we=>{const ke=N().filter(Me=>!Me.disabled),Pe=ke.find(Me=>Me.ref.current===document.activeElement),Fe=FT(ke,we,Pe);Fe&&setTimeout(()=>Fe.ref.current.focus())}),B=g.useCallback((we,ke,Pe)=>{const Fe=!U.current&&!Pe;(v.value!==void 0&&v.value===ke||Fe)&&(A(we),Fe&&(U.current=!0))},[v.value]),xe=g.useCallback(()=>b==null?void 0:b.focus(),[b]),ie=g.useCallback((we,ke,Pe)=>{const Fe=!U.current&&!Pe;(v.value!==void 0&&v.value===ke||Fe)&&G(we)},[v.value]),ae=r==="popper"?Wg:bT,Ie=ae===Wg?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:x,hideWhenDetached:p,avoidCollisions:w}:{};return a.jsx(xT,{scope:n,content:b,viewport:j,onViewportChange:C,itemRefCallback:B,selectedItem:R,onItemLeave:xe,itemTextRefCallback:ie,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:z,searchRef:X,children:a.jsx(gh,{as:ss,allowPinchZoom:!0,children:a.jsx(dh,{asChild:!0,trapped:v.open,onMountAutoFocus:we=>{we.preventDefault()},onUnmountAutoFocus:ge(s,we=>{var ke;(ke=v.trigger)==null||ke.focus({preventScroll:!0}),we.preventDefault()}),children:a.jsx(rl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:we=>we.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:a.jsx(ae,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:we=>we.preventDefault(),...y,...Ie,onPlaced:()=>S(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ge(y.onKeyDown,we=>{const ke=we.ctrlKey||we.altKey||we.metaKey;if(we.key==="Tab"&&we.preventDefault(),!ke&&we.key.length===1&&$(we.key),["ArrowUp","ArrowDown","Home","End"].includes(we.key)){let Fe=N().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(we.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(we.key)){const Me=we.target,Ae=Fe.indexOf(Me);Fe=Fe.slice(Ae+1)}setTimeout(()=>J(Fe)),we.preventDefault()}})})})})})})});wT.displayName=tB;var nB="SelectItemAlignedPosition",bT=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=$o(bi,n),i=Uo(bi,n),[l,c]=g.useState(null),[u,d]=g.useState(null),f=Ye(t,T=>d(T)),h=Xh(n),m=g.useRef(!1),x=g.useRef(!0),{viewport:p,selectedItem:w,selectedItemText:y,focusSelectedItem:v}=i,b=g.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&p&&w&&y){const T=o.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),A=o.valueNode.getBoundingClientRect(),O=y.getBoundingClientRect();if(o.dir!=="rtl"){const Me=O.left-R.left,Ae=A.left-Me,st=T.left-Ae,E=T.width+st,ee=Math.max(E,R.width),Z=window.innerWidth-Ss,D=Bg(Ae,[Ss,Z-ee]);l.style.minWidth=E+"px",l.style.left=D+"px"}else{const Me=R.right-O.right,Ae=window.innerWidth-A.right-Me,st=window.innerWidth-T.right-Ae,E=T.width+st,ee=Math.max(E,R.width),Z=window.innerWidth-Ss,D=Bg(Ae,[Ss,Z-ee]);l.style.minWidth=E+"px",l.style.right=D+"px"}const G=h(),N=window.innerHeight-Ss*2,z=p.scrollHeight,S=window.getComputedStyle(u),U=parseInt(S.borderTopWidth,10),J=parseInt(S.paddingTop,10),F=parseInt(S.borderBottomWidth,10),W=parseInt(S.paddingBottom,10),I=U+J+z+W+F,X=Math.min(w.offsetHeight*5,I),$=window.getComputedStyle(p),B=parseInt($.paddingTop,10),xe=parseInt($.paddingBottom,10),ie=T.top+T.height/2-Ss,ae=N-ie,Ie=w.offsetHeight/2,we=w.offsetTop+Ie,ke=U+J+we,Pe=I-ke;if(ke<=ie){const Me=w===G[G.length-1].ref.current;l.style.bottom="0px";const Ae=u.clientHeight-p.offsetTop-p.offsetHeight,st=Math.max(ae,Ie+(Me?xe:0)+Ae+F),E=ke+st;l.style.height=E+"px"}else{const Me=w===G[0].ref.current;l.style.top="0px";const st=Math.max(ie,U+p.offsetTop+(Me?B:0)+Ie)+Pe;l.style.height=st+"px",p.scrollTop=ke-ie+p.offsetTop}l.style.margin=`${Ss}px 0`,l.style.minHeight=X+"px",l.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,o.trigger,o.valueNode,l,u,p,w,y,o.dir,r]);Bt(()=>b(),[b]);const[_,j]=g.useState();Bt(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const C=g.useCallback(T=>{T&&x.current===!0&&(b(),v==null||v(),x.current=!1)},[b,v]);return a.jsx(sB,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:a.jsx(Te.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});bT.displayName=nB;var rB="SelectPopperPosition",Wg=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Ss,...o}=e,i=Qh(n);return a.jsx(kv,{...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)"}})});Wg.displayName=rB;var[sB,Wx]=fl(bi,{}),Hg="SelectViewport",_T=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Uo(Hg,n),i=Wx(Hg,n),l=Ye(t,o.onViewportChange),c=g.useRef(0);return a.jsxs(a.Fragment,{children:[a.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}),a.jsx(qh.Slot,{scope:n,children:a.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ge(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&f){const m=Math.abs(c.current-d.scrollTop);if(m>0){const x=window.innerHeight-Ss*2,p=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),y=Math.max(p,w);if(y<x){const v=y+m,b=Math.min(x,v),_=v-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});_T.displayName=Hg;var ST="SelectGroup",[oB,iB]=fl(ST),kT=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Ln();return a.jsx(oB,{scope:n,id:s,children:a.jsx(Te.div,{role:"group","aria-labelledby":s,...r,ref:t})})});kT.displayName=ST;var jT="SelectLabel",CT=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=iB(jT,n);return a.jsx(Te.div,{id:s.id,...r,ref:t})});CT.displayName=jT;var Nf="SelectItem",[aB,ET]=fl(Nf),NT=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,l=$o(Nf,n),c=Uo(Nf,n),u=l.value===r,[d,f]=g.useState(o??""),[h,m]=g.useState(!1),x=Ye(t,y=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,y,r,s)}),p=Ln(),w=()=>{s||(l.onValueChange(r),l.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 a.jsx(aB,{scope:n,value:r,disabled:s,textId:p,isSelected:u,onItemTextChange:g.useCallback(y=>{f(v=>v||((y==null?void 0:y.textContent)??"").trim())},[]),children:a.jsx(qh.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:a.jsx(Te.div,{role:"option","aria-labelledby":p,"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:ge(i.onFocus,()=>m(!0)),onBlur:ge(i.onBlur,()=>m(!1)),onPointerUp:ge(i.onPointerUp,w),onPointerMove:ge(i.onPointerMove,y=>{var v;s?(v=c.onItemLeave)==null||v.call(c):y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ge(i.onPointerLeave,y=>{var v;y.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:ge(i.onKeyDown,y=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&y.key===" "||(GV.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});NT.displayName=Nf;var Bl="SelectItemText",TT=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=$o(Bl,n),l=Uo(Bl,n),c=ET(Bl,n),u=QV(Bl,n),[d,f]=g.useState(null),h=Ye(t,y=>f(y),c.onItemTextChange,y=>{var v;return(v=l.itemTextRefCallback)==null?void 0:v.call(l,y,c.value,c.disabled)}),m=d==null?void 0:d.textContent,x=g.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:w}=u;return Bt(()=>(p(x),()=>w(x)),[p,w,x]),a.jsxs(a.Fragment,{children:[a.jsx(Te.span,{id:c.textId,...o,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Bs.createPortal(o.children,i.valueNode):null]})});TT.displayName=Bl;var PT="SelectItemIndicator",RT=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ET(PT,n).isSelected?a.jsx(Te.span,{"aria-hidden":!0,...r,ref:t}):null});RT.displayName=PT;var Kg="SelectScrollUpButton",AT=g.forwardRef((e,t)=>{const n=Uo(Kg,e.__scopeSelect),r=Wx(Kg,e.__scopeSelect),[s,o]=g.useState(!1),i=Ye(t,r.onScrollButtonChange);return Bt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(OT,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});AT.displayName=Kg;var Yg="SelectScrollDownButton",DT=g.forwardRef((e,t)=>{const n=Uo(Yg,e.__scopeSelect),r=Wx(Yg,e.__scopeSelect),[s,o]=g.useState(!1),i=Ye(t,r.onScrollButtonChange);return Bt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(OT,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});DT.displayName=Yg;var OT=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Uo("SelectScrollButton",n),i=g.useRef(null),l=Xh(n),c=g.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),Bt(()=>{var d;const u=l().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),a.jsx(Te.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ge(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ge(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ge(s.onPointerLeave,()=>{c()})})}),lB="SelectSeparator",IT=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(Te.div,{"aria-hidden":!0,...r,ref:t})});IT.displayName=lB;var Gg="SelectArrow",cB=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Qh(n),o=$o(Gg,n),i=Uo(Gg,n);return o.open&&i.position==="popper"?a.jsx(jv,{...s,...r,ref:t}):null});cB.displayName=Gg;function MT(e){return e===""||e===void 0}var LT=g.forwardRef((e,t)=>{const{value:n,...r}=e,s=g.useRef(null),o=Ye(t,s),i=Ex(n);return g.useEffect(()=>{const l=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(l,n),l.dispatchEvent(f)}},[i,n]),a.jsx(mu,{asChild:!0,children:a.jsx("select",{...r,ref:o,defaultValue:n})})});LT.displayName="BubbleSelect";function zT(e){const t=It(e),n=g.useRef(""),r=g.useRef(0),s=g.useCallback(i=>{const l=n.current+i;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),o=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function FT(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=uB(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 uB(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dB=dT,$T=hT,fB=pT,hB=gT,mB=yT,UT=vT,pB=_T,gB=kT,VT=CT,BT=NT,yB=TT,vB=RT,WT=AT,HT=DT,KT=IT;const ai=dB,Da=gB,li=fB,ko=g.forwardRef(({className:e,children:t,...n},r)=>a.jsxs($T,{ref:r,className:se("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(hB,{asChild:!0,children:a.jsx(ov,{className:"h-4 w-4 opacity-50"})})]}));ko.displayName=$T.displayName;const YT=g.forwardRef(({className:e,...t},n)=>a.jsx(WT,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(dI,{className:"h-4 w-4"})}));YT.displayName=WT.displayName;const GT=g.forwardRef(({className:e,...t},n)=>a.jsx(HT,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(ov,{className:"h-4 w-4"})}));GT.displayName=HT.displayName;const jo=g.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>a.jsx(mB,{children:a.jsxs(UT,{ref:s,className:se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[a.jsx(YT,{}),a.jsx(pB,{className:se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(GT,{})]})}));jo.displayName=UT.displayName;const Ya=g.forwardRef(({className:e,...t},n)=>a.jsx(VT,{ref:n,className:se("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ya.displayName=VT.displayName;const Pn=g.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(BT,{ref:r,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(vB,{children:a.jsx(lk,{className:"h-4 w-4"})})}),a.jsx(yB,{children:t})]}));Pn.displayName=BT.displayName;const xB=g.forwardRef(({className:e,...t},n)=>a.jsx(KT,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));xB.displayName=KT.displayName;const hl=Bv,ml=Wv,wB=Hv,ZT=g.forwardRef(({className:e,...t},n)=>a.jsx(iu,{ref:n,className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ZT.displayName=iu.displayName;const Ai=g.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(wB,{children:[a.jsx(ZT,{}),a.jsxs(au,{ref:r,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,a.jsxs(wh,{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:[a.jsx(lv,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ai.displayName=au.displayName;const Di=({className:e,...t})=>a.jsx("div",{className:se("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Di.displayName="DialogHeader";const Jh=({className:e,...t})=>a.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Jh.displayName="DialogFooter";const Oi=g.forwardRef(({className:e,...t},n)=>a.jsx(lu,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t}));Oi.displayName=lu.displayName;const qT=g.forwardRef(({className:e,...t},n)=>a.jsx(cu,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));qT.displayName=cu.displayName;function bB(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Hx="ScrollArea",[XT,N9]=un(Hx),[_B,br]=XT(Hx),QT=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...i}=e,[l,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(null),[m,x]=g.useState(null),[p,w]=g.useState(null),[y,v]=g.useState(0),[b,_]=g.useState(0),[j,C]=g.useState(!1),[T,R]=g.useState(!1),A=Ye(t,G=>c(G)),O=Ci(s);return a.jsx(_B,{scope:n,type:r,dir:O,scrollHideDelay:o,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:x,scrollbarXEnabled:j,onScrollbarXEnabledChange:C,scrollbarY:p,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:v,onCornerHeightChange:_,children:a.jsx(Te.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});QT.displayName=Hx;var JT="ScrollAreaViewport",e2=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...o}=e,i=br(JT,n),l=g.useRef(null),c=Ye(t,l,i.onViewportChange);return a.jsxs(a.Fragment,{children:[a.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}),a.jsx(Te.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});e2.displayName=JT;var fs="ScrollAreaScrollbar",Kx=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=br(fs,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,l=e.orientation==="horizontal";return g.useEffect(()=>(l?o(!0):i(!0),()=>{l?o(!1):i(!1)}),[l,o,i]),s.type==="hover"?a.jsx(SB,{...r,ref:t,forceMount:n}):s.type==="scroll"?a.jsx(kB,{...r,ref:t,forceMount:n}):s.type==="auto"?a.jsx(t2,{...r,ref:t,forceMount:n}):s.type==="always"?a.jsx(Yx,{...r,ref:t}):null});Kx.displayName=fs;var SB=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=br(fs,e.__scopeScrollArea),[o,i]=g.useState(!1);return g.useEffect(()=>{const l=s.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),a.jsx(dn,{present:n||o,children:a.jsx(t2,{"data-state":o?"visible":"hidden",...r,ref:t})})}),kB=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=br(fs,e.__scopeScrollArea),o=e.orientation==="horizontal",i=tm(()=>c("SCROLL_END"),100),[l,c]=bB("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 g.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,s.scrollHideDelay,c]),g.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const m=u[d];f!==m&&(c("SCROLL"),i()),f=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,o,c,i]),a.jsx(dn,{present:n||l!=="hidden",children:a.jsx(Yx,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ge(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ge(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),t2=g.forwardRef((e,t)=>{const n=br(fs,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,i]=g.useState(!1),l=e.orientation==="horizontal",c=tm(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(l?u:d)}},10);return Ga(n.viewport,c),Ga(n.content,c),a.jsx(dn,{present:r||o,children:a.jsx(Yx,{"data-state":o?"visible":"hidden",...s,ref:t})})}),Yx=g.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=br(fs,e.__scopeScrollArea),o=g.useRef(null),i=g.useRef(0),[l,c]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=i2(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,m){return PB(h,i.current,l,m)}return n==="horizontal"?a.jsx(jB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,m=Xb(h,l,s.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):n==="vertical"?a.jsx(CB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,m=Xb(h,l);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),jB=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=br(fs,e.__scopeScrollArea),[i,l]=g.useState(),c=g.useRef(null),u=Ye(t,c,o.onScrollbarXChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(r2,{"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":em(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),l2(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:Pf(i.paddingLeft),paddingEnd:Pf(i.paddingRight)}})}})}),CB=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=br(fs,e.__scopeScrollArea),[i,l]=g.useState(),c=g.useRef(null),u=Ye(t,c,o.onScrollbarYChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(r2,{"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":em(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),l2(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:Pf(i.paddingTop),paddingEnd:Pf(i.paddingBottom)}})}})}),[EB,n2]=XT(fs),r2=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,m=br(fs,n),[x,p]=g.useState(null),w=Ye(t,A=>p(A)),y=g.useRef(null),v=g.useRef(""),b=m.viewport,_=r.content-r.viewport,j=It(d),C=It(c),T=tm(f,10);function R(A){if(y.current){const O=A.clientX-y.current.left,G=A.clientY-y.current.top;u({x:O,y:G})}}return g.useEffect(()=>{const A=O=>{const G=O.target;(x==null?void 0:x.contains(G))&&j(O,_)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[b,x,_,j]),g.useEffect(C,[r,C]),Ga(x,T),Ga(m.content,T),a.jsx(EB,{scope:n,scrollbar:x,hasThumb:s,onThumbChange:It(o),onThumbPointerUp:It(i),onThumbPositionChange:C,onThumbPointerDown:It(l),children:a.jsx(Te.div,{...h,ref:w,style:{position:"absolute",...h.style},onPointerDown:ge(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),y.current=x.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),R(A))}),onPointerMove:ge(e.onPointerMove,R),onPointerUp:ge(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=v.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),Tf="ScrollAreaThumb",s2=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=n2(Tf,e.__scopeScrollArea);return a.jsx(dn,{present:n||s.hasThumb,children:a.jsx(NB,{ref:t,...r})})}),NB=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=br(Tf,n),i=n2(Tf,n),{onThumbPositionChange:l}=i,c=Ye(t,f=>i.onThumbChange(f)),u=g.useRef(),d=tm(()=>{u.current&&(u.current(),u.current=void 0)},100);return g.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(d(),!u.current){const m=RB(f,l);u.current=m,l()}};return l(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,d,l]),a.jsx(Te.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:ge(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),x=f.clientX-m.left,p=f.clientY-m.top;i.onThumbPointerDown({x,y:p})}),onPointerUp:ge(e.onPointerUp,i.onThumbPointerUp)})});s2.displayName=Tf;var Gx="ScrollAreaCorner",o2=g.forwardRef((e,t)=>{const n=br(Gx,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(TB,{...e,ref:t}):null});o2.displayName=Gx;var TB=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=br(Gx,n),[o,i]=g.useState(0),[l,c]=g.useState(0),u=!!(o&&l);return Ga(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Ga(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),i(d)}),u?a.jsx(Te.div,{...r,ref:t,style:{width:o,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Pf(e){return e?parseInt(e,10):0}function i2(e,t){const n=e/t;return isNaN(n)?0:n}function em(e){const t=i2(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function PB(e,t,n,r="ltr"){const s=em(n),o=s/2,i=t||o,l=s-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return a2([c,u],f)(e)}function Xb(e,t,n="ltr"){const r=em(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,l=o-r,c=n==="ltr"?[0,i]:[i*-1,0],u=Bg(e,c);return a2([0,i],[0,l])(u)}function a2(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 l2(e,t){return e>0&&e<t}var RB=(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,l=n.top!==o.top;(i||l)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function tm(e,t){const n=It(e),r=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),g.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ga(e,t){const n=It(t);Bt(()=>{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 c2=QT,AB=e2,DB=o2;const nm=g.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(c2,{ref:r,className:se("relative overflow-hidden",e),...n,children:[a.jsx(AB,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(u2,{}),a.jsx(DB,{})]}));nm.displayName=c2.displayName;const u2=g.forwardRef(({className:e,orientation:t="vertical",...n},r)=>a.jsx(Kx,{ref:r,orientation:t,className:se("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:a.jsx(s2,{className:"relative flex-1 rounded-full bg-border"})}));u2.displayName=Kx.displayName;const Ds=new Map([["aliyun",["common.provider.aliyun","/imgs/providers/aliyun.svg"]],["tencent",["common.provider.tencent","/imgs/providers/tencent.svg"]],["huaweicloud",["common.provider.huaweicloud","/imgs/providers/huaweicloud.svg"]],["qiniu",["common.provider.qiniu","/imgs/providers/qiniu.svg"]],["aws",["common.provider.aws","/imgs/providers/aws.svg"]],["cloudflare",["common.provider.cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["common.provider.namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["common.provider.godaddy","/imgs/providers/godaddy.svg"]],["pdns",["common.provider.pdns","/imgs/providers/pdns.svg"]],["httpreq",["common.provider.httpreq","/imgs/providers/httpreq.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]],["k8s",["common.provider.kubernetes","/imgs/providers/k8s.svg"]]]),Qb=e=>Ds.get(e),$n=te.union([te.literal("aliyun"),te.literal("tencent"),te.literal("huaweicloud"),te.literal("qiniu"),te.literal("aws"),te.literal("cloudflare"),te.literal("namesilo"),te.literal("godaddy"),te.literal("pdns"),te.literal("httpreq"),te.literal("local"),te.literal("ssh"),te.literal("webhook"),te.literal("k8s")],{message:"access.authorization.form.type.placeholder"}),Un=e=>{switch(e){case"aliyun":case"tencent":case"huaweicloud":return"all";case"qiniu":case"local":case"ssh":case"webhook":case"k8s":return"deploy";case"aws":case"cloudflare":case"namesilo":case"godaddy":case"pdns":case"httpreq":return"apply";default:return"all"}},OB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,accessKeyId:te.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessSecretId:te.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={accessKeyId:"",accessKeySecret:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aliyun",accessKeyId:l.accessKeyId,accessSecretId:l.accessKeySecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{accessKeyId:d.accessKeyId,accessKeySecret:d.accessSecretId}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"accessKeyId",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.access_key_id.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"accessSecretId",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.access_key_secret.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.access_key_secret.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(le,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},IB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,secretId:te.string().min(1,"access.authorization.form.secret_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretKey:te.string().min(1,"access.authorization.form.secret_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={secretId:"",secretKey:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"tencent",secretId:l.secretId,secretKey:l.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{secretId:d.secretId,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"secretId",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.secret_id.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.secret_id.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"secretKey",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.secret_key.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},MB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,region:te.string().min(1,"access.authorization.form.region.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessKeyId:te.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretAccessKey:te.string().min(1,"access.authorization.form.secret_access_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={region:"cn-north-1",accessKeyId:"",secretAccessKey:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"huaweicloud",region:l.region,accessKeyId:l.accessKeyId,secretAccessKey:l.secretAccessKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{region:d.region,accessKeyId:d.accessKeyId,secretAccessKey:d.secretAccessKey}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"region",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.region.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.region.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"accessKeyId",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.access_key_id.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"secretAccessKey",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.secret_access_key.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.secret_access_key.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(le,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},LB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,accessKey:te.string().min(1,"access.authorization.form.access_key.placeholder").max(64),secretKey:te.string().min(1,"access.authorization.form.secret_key.placeholder").max(64)});let l={accessKey:"",secretKey:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"qiniu",accessKey:l.accessKey,secretKey:l.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{accessKey:d.accessKey,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"accessKey",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.access_key.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.access_key.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"secretKey",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.secret_key.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(le,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},zB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,region:te.string().min(1,"access.authorization.form.region.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessKeyId:te.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretAccessKey:te.string().min(1,"access.authorization.form.secret_access_key.placeholder").max(64,o("common.errmsg.string_max",{max:64})),hostedZoneId:te.string().min(0,"access.authorization.form.aws_hosted_zone_id.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={region:"cn-north-1",accessKeyId:"",secretAccessKey:"",hostedZoneId:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aws",region:l.region,accessKeyId:l.accessKeyId,secretAccessKey:l.secretAccessKey,hostedZoneId:l.hostedZoneId}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{region:d.region,accessKeyId:d.accessKeyId,secretAccessKey:d.secretAccessKey,hostedZoneId:d.hostedZoneId}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"region",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.region.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.region.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"accessKeyId",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.access_key_id.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"secretAccessKey",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.secret_access_key.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.secret_access_key.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"hostedZoneId",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.aws_hosted_zone_id.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.aws_hosted_zone_id.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(le,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},FB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,dnsApiToken:te.string().min(1,"access.authorization.form.cloud_dns_api_token.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={dnsApiToken:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"cloudflare",dnsApiToken:l.dnsApiToken}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{dnsApiToken:d.dnsApiToken}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"dnsApiToken",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.cloud_dns_api_token.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.cloud_dns_api_token.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},$B=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,apiKey:te.string().min(1,"access.authorization.form.namesilo_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={apiKey:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"namesilo",apiKey:l.apiKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{apiKey:d.apiKey}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"apiKey",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.namesilo_api_key.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.namesilo_api_key.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},UB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,apiKey:te.string().min(1,"access.authorization.form.godaddy_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64})),apiSecret:te.string().min(1,"access.authorization.form.godaddy_api_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={apiKey:"",apiSecret:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"godaddy",apiKey:l.apiKey,apiSecret:l.apiSecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{apiKey:d.apiKey,apiSecret:d.apiSecret}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"apiKey",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.godaddy_api_key.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.godaddy_api_key.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"apiSecret",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.godaddy_api_secret.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.godaddy_api_secret.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},VB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,apiUrl:te.string().url("common.errmsg.url_invalid"),apiKey:te.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={apiUrl:"",apiKey:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"pdns",apiUrl:l.apiUrl,apiKey:l.apiKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{apiUrl:d.apiUrl,apiKey:d.apiKey}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"apiUrl",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.pdns_api_url.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.pdns_api_url.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"apiKey",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.pdns_api_key.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.pdns_api_key.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(le,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},BB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,endpoint:te.string().url("common.errmsg.url_invalid"),mode:te.enum(["RAW",""]),username:te.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(128,o("common.errmsg.string_max",{max:128})),password:te.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(128,o("common.errmsg.string_max",{max:128}))});let l={endpoint:"",mode:"",username:"",password:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"httpreq",endpoint:l.endpoint,mode:l.mode==="RAW"?"RAW":"",username:l.username,password:l.password}}),u=async f=>{const h={id:f.id,name:f.name,configType:f.configType,usage:Un(f.configType),config:{endpoint:f.endpoint,mode:f.mode,username:f.username,password:f.password}};try{h.id=t=="copy"?"":h.id;const m=await Fn(h);if(n(),h.id=m.id,h.created=m.created,h.updated=m.updated,f.id&&t=="edit"){s(h);return}r(h)}catch(m){Object.entries(m.response.data).forEach(([p,w])=>{c.setError(p,{type:"manual",message:w.message})});return}},d="access.authorization.form.httpreq";return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:f=>{f.stopPropagation(),c.handleSubmit(u)(f)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:f})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...f})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:f})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...f})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:f})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...f})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"endpoint",render:({field:f})=>a.jsxs(de,{children:[a.jsx(me,{children:o(d+"_endpoint.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o(d+"_endpoint.placeholder"),...f})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"mode",render:({field:f})=>a.jsxs(de,{children:[a.jsx(me,{children:o(d+"_mode.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o(d+"_mode.placeholder"),...f})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"username",render:({field:f})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.username.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.username.placeholder"),...f})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"password",render:({field:f})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.password.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.password.placeholder"),...f})}),a.jsx(le,{})]})}),a.jsx(le,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},WB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o}=Wt(),{t:i}=Ue(),l=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,i("common.errmsg.string_max",{max:64})),configType:$n}),c=Ht({resolver:Kt(l),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"local"}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{}};try{f.id=t=="copy"?"":f.id;const h=await Fn(f);n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"?s(f):r(f),o()}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-3",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:i("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:i("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:i("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:i("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(le,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:i("common.save")})})]})})})})},Zx=({className:e,trigger:t})=>{const{reloadAccessGroups:n}=Wt(),[r,s]=g.useState(!1),{t:o}=Ue(),i=te.object({name:te.string().min(1,"access.group.form.name.errmsg.empty").max(64,o("common.errmsg.string_max",{max:64}))}),l=Ht({resolver:Kt(i),defaultValues:{name:""}}),c=async u=>{try{await I8({name:u.name}),n(),s(!1)}catch(d){Object.entries(d.response.data).forEach(([h,m])=>{l.setError(h,{type:"manual",message:m.message})})}};return a.jsxs(hl,{onOpenChange:s,open:r,children:[a.jsx(ml,{asChild:!0,className:se(e),children:t}),a.jsxs(Ai,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[a.jsx(Di,{children:a.jsx(Oi,{children:o("access.group.add")})}),a.jsx("div",{className:"container py-3",children:a.jsx(Yt,{...l,children:a.jsxs("form",{onSubmit:u=>{u.stopPropagation(),l.handleSubmit(c)(u)},className:"space-y-8",children:[a.jsx(he,{control:l.control,name:"name",render:({field:u})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.group.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.group.form.name.errmsg.empty"),...u,type:"text"})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})]})]})},HB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o,config:{accessGroups:i}}=Wt(),l=g.useRef(null),[c,u]=g.useState(""),{t:d}=Ue(),f=e&&e.group?e.group:"",h=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,m=/^(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=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,d("common.errmsg.string_max",{max:64})),configType:$n,host:te.string().refine(_=>m.test(_)||h.test(_),{message:"common.errmsg.host_invalid"}),group:te.string().optional(),port:te.string().min(1,"access.authorization.form.ssh_port.placeholder").max(5,d("common.errmsg.string_max",{max:5})),username:te.string().min(1,"access.authorization.form.ssh_username.placeholder").max(64,d("common.errmsg.string_max",{max:64})),password:te.string().min(0,"access.authorization.form.ssh_password.placeholder").max(64,d("common.errmsg.string_max",{max:64})),key:te.string().min(0,"access.authorization.form.ssh_key.placeholder").max(20480,d("common.errmsg.string_max",{max:20480})),keyFile:te.any().optional(),keyPassphrase:te.string().min(0,"access.authorization.form.ssh_key_passphrase.placeholder").max(2048,d("common.errmsg.string_max",{max:2048}))});let p={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",keyPassphrase:""};e&&(p=e.config);const w=Ht({resolver:Kt(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:p.host,port:p.port,username:p.username,password:p.password,key:p.key,keyFile:p.keyFile,keyPassphrase:p.keyPassphrase}}),y=async _=>{let j=_.group;j=="emptyId"&&(j="");const C={id:_.id,name:_.name,configType:_.configType,usage:Un(_.configType),group:j,config:{host:_.host,port:_.port,username:_.username,password:_.password,key:_.key,keyPassphrase:_.keyPassphrase}};try{C.id=t=="copy"?"":C.id;const T=await Fn(C);n(),C.id=T.id,C.created=T.created,C.updated=T.updated,_.id&&t=="edit"?s(C):r(C),j!=f&&(f&&await Mb({id:f,"access-":C.id}),j&&await Mb({id:j,"access+":C.id})),o()}catch(T){Object.entries(T.response.data).forEach(([A,O])=>{w.setError(A,{type:"manual",message:O.message})});return}},v=async _=>{var R;const j=(R=_.target.files)==null?void 0:R[0];if(!j)return;const C=j;u(C.name);const T=await _N(C);w.setValue("key",T)},b=()=>{var _;(_=l.current)==null||_.click()};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...w,children:a.jsxs("form",{onSubmit:_=>{_.stopPropagation(),w.handleSubmit(y)(_)},className:"space-y-3",children:[a.jsx(he,{control:w.control,name:"name",render:({field:_})=>a.jsxs(de,{children:[a.jsx(me,{children:d("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:d("access.authorization.form.name.placeholder"),..._})}),a.jsx(le,{})]})}),a.jsx(he,{control:w.control,name:"group",render:({field:_})=>a.jsxs(de,{children:[a.jsxs(me,{className:"w-full flex justify-between",children:[a.jsx("div",{children:d("access.authorization.form.ssh_group.label")}),a.jsx(Zx,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(gi,{size:14}),d("common.add")]})})]}),a.jsx(pe,{children:a.jsxs(ai,{..._,value:_.value,defaultValue:"emptyId",onValueChange:j=>{w.setValue("group",j)},children:[a.jsx(ko,{children:a.jsx(li,{placeholder:d("access.authorization.form.access_group.placeholder")})}),a.jsxs(jo,{children:[a.jsx(Pn,{value:"emptyId",children:a.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(j=>a.jsx(Pn,{value:j.id?j.id:"",children:a.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:j.name})},j.id))]})]})}),a.jsx(le,{})]})}),a.jsx(he,{control:w.control,name:"id",render:({field:_})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:d("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{..._})}),a.jsx(le,{})]})}),a.jsx(he,{control:w.control,name:"configType",render:({field:_})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:d("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{..._})}),a.jsx(le,{})]})}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(he,{control:w.control,name:"host",render:({field:_})=>a.jsxs(de,{className:"grow",children:[a.jsx(me,{children:d("access.authorization.form.ssh_host.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:d("access.authorization.form.ssh_host.placeholder"),..._})}),a.jsx(le,{})]})}),a.jsx(he,{control:w.control,name:"port",render:({field:_})=>a.jsxs(de,{children:[a.jsx(me,{children:d("access.authorization.form.ssh_port.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:d("access.authorization.form.ssh_port.placeholder"),..._,type:"number"})}),a.jsx(le,{})]})})]}),a.jsx(he,{control:w.control,name:"username",render:({field:_})=>a.jsxs(de,{children:[a.jsx(me,{children:d("access.authorization.form.ssh_username.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:d("access.authorization.form.ssh_username.placeholder"),..._})}),a.jsx(le,{})]})}),a.jsx(he,{control:w.control,name:"password",render:({field:_})=>a.jsxs(de,{children:[a.jsx(me,{children:d("access.authorization.form.ssh_password.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:d("access.authorization.form.ssh_password.placeholder"),..._,type:"password"})}),a.jsx(le,{})]})}),a.jsx(he,{control:w.control,name:"key",render:({field:_})=>a.jsxs(de,{hidden:!0,children:[a.jsx(me,{children:d("access.authorization.form.ssh_key.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._})}),a.jsx(le,{})]})}),a.jsx(he,{control:w.control,name:"keyFile",render:({field:_})=>a.jsxs(de,{children:[a.jsx(me,{children:d("access.authorization.form.ssh_key.label")}),a.jsx(pe,{children:a.jsxs("div",{children:[a.jsx(Re,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:b,children:c||d("access.authorization.form.ssh_key_file.placeholder")}),a.jsx(oe,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._,ref:l,className:"hidden",hidden:!0,type:"file",onChange:v})]})}),a.jsx(le,{})]})}),a.jsx(he,{control:w.control,name:"keyPassphrase",render:({field:_})=>a.jsxs(de,{children:[a.jsx(me,{children:d("access.authorization.form.ssh_key_passphrase.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:d("access.authorization.form.ssh_key_passphrase.placeholder"),..._,type:"password"})}),a.jsx(le,{})]})}),a.jsx(le,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:d("common.save")})})]})})})})},KB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),{t:o}=Ue(),i=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:$n,url:te.string().url("common.errmsg.url_invalid")});let l={url:""};e&&(l=e.config);const c=Ht({resolver:Kt(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"webhook",url:l.url}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Un(d.configType),config:{url:d.url}};try{f.id=t=="copy"?"":f.id;const h=await Fn(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,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"name",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"id",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(de,{className:"hidden",children:[a.jsx(me,{children:o("access.authorization.form.config.label")}),a.jsx(pe,{children:a.jsx(oe,{...d})}),a.jsx(le,{})]})}),a.jsx(he,{control:c.control,name:"url",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:o("access.authorization.form.webhook_url.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:o("access.authorization.form.webhook_url.placeholder"),...d})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:o("common.save")})})]})})})})},YB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Wt(),o=g.useRef(null),[i,l]=g.useState(""),{t:c}=Ue(),u=te.object({id:te.string().optional(),name:te.string().min(1,"access.authorization.form.name.placeholder").max(64,c("common.errmsg.string_max",{max:64})),configType:$n,kubeConfig:te.string().min(1,"access.authorization.form.k8s_kubeconfig.placeholder").max(20480,c("common.errmsg.string_max",{max:20480})),kubeConfigFile:te.any().optional()});let d={kubeConfig:"",kubeConfigFile:""};e&&(d=e.config);const f=Ht({resolver:Kt(u),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"k8s",kubeConfig:d.kubeConfig,kubeConfigFile:d.kubeConfigFile}}),h=async p=>{const w={id:p.id,name:p.name,configType:p.configType,usage:Un(p.configType),config:{kubeConfig:p.kubeConfig}};try{w.id=t=="copy"?"":w.id;const y=await Fn(w);n(),w.id=y.id,w.created=y.created,w.updated=y.updated,p.id&&t=="edit"?s(w):r(w)}catch(y){Object.entries(y.response.data).forEach(([b,_])=>{f.setError(b,{type:"manual",message:_.message})});return}},m=async p=>{var b;const w=(b=p.target.files)==null?void 0:b[0];if(!w)return;const y=w;l(y.name);const v=await _N(y);f.setValue("kubeConfig",v)},x=()=>{var p;(p=o.current)==null||p.click()};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(Yt,{...f,children:a.jsxs("form",{onSubmit:p=>{p.stopPropagation(),f.handleSubmit(h)(p)},className:"space-y-3",children:[a.jsx(he,{control:f.control,name:"name",render:({field:p})=>a.jsxs(de,{children:[a.jsx(me,{children:c("access.authorization.form.name.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:c("access.authorization.form.name.placeholder"),...p})}),a.jsx(le,{})]})}),a.jsx(he,{control:f.control,name:"kubeConfig",render:({field:p})=>a.jsxs(de,{hidden:!0,children:[a.jsx(me,{children:c("access.authorization.form.k8s_kubeconfig.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:c("access.authorization.form.k8s_kubeconfig.placeholder"),...p})}),a.jsx(le,{})]})}),a.jsx(he,{control:f.control,name:"kubeConfigFile",render:({field:p})=>a.jsxs(de,{children:[a.jsx(me,{children:c("access.authorization.form.k8s_kubeconfig.label")}),a.jsx(pe,{children:a.jsxs("div",{children:[a.jsx(Re,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:x,children:i||c("access.authorization.form.k8s_kubeconfig_file.placeholder")}),a.jsx(oe,{placeholder:c("access.authorization.form.k8s_kubeconfig.placeholder"),...p,ref:o,className:"hidden",hidden:!0,type:"file",onChange:m})]})}),a.jsx(le,{})]})}),a.jsx(le,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:c("common.save")})})]})})})})},va=({trigger:e,op:t,data:n,className:r})=>{const[s,o]=g.useState(!1),{t:i}=Ue(),l=Array.from(Ds.keys()),[c,u]=g.useState((n==null?void 0:n.configType)||"");let d=a.jsx(a.Fragment,{children:" "});switch(c){case"aliyun":d=a.jsx(OB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"tencent":d=a.jsx(IB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"huaweicloud":d=a.jsx(MB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"qiniu":d=a.jsx(LB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"aws":d=a.jsx(zB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"cloudflare":d=a.jsx(FB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"namesilo":d=a.jsx($B,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"godaddy":d=a.jsx(UB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"pdns":d=a.jsx(VB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"httpreq":d=a.jsx(BB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"local":d=a.jsx(WB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"ssh":d=a.jsx(HB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"webhook":d=a.jsx(KB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"k8s":d=a.jsx(YB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break}const f=h=>h==c?"border-primary":"";return a.jsxs(hl,{onOpenChange:o,open:s,children:[a.jsx(ml,{asChild:!0,className:se(r),children:e}),a.jsxs(Ai,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[a.jsx(Di,{children:a.jsx(Oi,{children:t=="add"?i("access.authorization.add"):t=="edit"?i("access.authorization.edit"):i("access.authorization.copy")})}),a.jsx(nm,{className:"max-h-[80vh]",children:a.jsxs("div",{className:"container py-3",children:[a.jsx(_t,{children:i("access.authorization.form.type.label")}),a.jsxs(ai,{onValueChange:h=>{u(h)},defaultValue:c,children:[a.jsx(ko,{className:"mt-3",children:a.jsx(li,{placeholder:i("access.authorization.form.type.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:i("access.authorization.form.type.list")}),l.map(h=>{var m,x;return a.jsx(Pn,{value:h,children:a.jsxs("div",{className:se("flex items-center space-x-2 rounded cursor-pointer",f(h)),children:[a.jsx("img",{src:(m=Ds.get(h))==null?void 0:m[1],className:"h-6 w-6"}),a.jsx("div",{children:i(((x=Ds.get(h))==null?void 0:x[0])||"")})]})},h)})]})})]}),d]})})]})]})};var d2=Symbol.for("immer-nothing"),Jb=Symbol.for("immer-draftable"),er=Symbol.for("immer-state");function Tr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Za=Object.getPrototypeOf;function qa(e){return!!e&&!!e[er]}function _i(e){var t;return e?f2(e)||Array.isArray(e)||!!e[Jb]||!!((t=e.constructor)!=null&&t[Jb])||sm(e)||om(e):!1}var GB=Object.prototype.constructor.toString();function f2(e){if(!e||typeof e!="object")return!1;const t=Za(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===GB}function Rf(e,t){rm(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function rm(e){const t=e[er];return t?t.type_:Array.isArray(e)?1:sm(e)?2:om(e)?3:0}function Zg(e,t){return rm(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function h2(e,t,n){const r=rm(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function ZB(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function sm(e){return e instanceof Map}function om(e){return e instanceof Set}function Ho(e){return e.copy_||e.base_}function qg(e,t){if(sm(e))return new Map(e);if(om(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=f2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[er];let s=Reflect.ownKeys(r);for(let o=0;o<s.length;o++){const i=s[o],l=r[i];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[i]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[i]})}return Object.create(Za(e),r)}else{const r=Za(e);if(r!==null&&n)return{...e};const s=Object.create(r);return Object.assign(s,e)}}function qx(e,t=!1){return im(e)||qa(e)||!_i(e)||(rm(e)>1&&(e.set=e.add=e.clear=e.delete=qB),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>qx(r,!0))),e}function qB(){Tr(2)}function im(e){return Object.isFrozen(e)}var XB={};function Si(e){const t=XB[e];return t||Tr(0,e),t}var Kc;function m2(){return Kc}function QB(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function e_(e,t){t&&(Si("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xg(e){Qg(e),e.drafts_.forEach(JB),e.drafts_=null}function Qg(e){e===Kc&&(Kc=e.parent_)}function t_(e){return Kc=QB(Kc,e)}function JB(e){const t=e[er];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function n_(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[er].modified_&&(Xg(t),Tr(4)),_i(e)&&(e=Af(t,e),t.parent_||Df(t,e)),t.patches_&&Si("Patches").generateReplacementPatches_(n[er].base_,e,t.patches_,t.inversePatches_)):e=Af(t,n,[]),Xg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==d2?e:void 0}function Af(e,t,n){if(im(t))return t;const r=t[er];if(!r)return Rf(t,(s,o)=>r_(e,r,t,s,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Df(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let o=s,i=!1;r.type_===3&&(o=new Set(s),s.clear(),i=!0),Rf(o,(l,c)=>r_(e,r,s,l,c,n,i)),Df(e,s,!1),n&&e.patches_&&Si("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function r_(e,t,n,r,s,o,i){if(qa(s)){const l=o&&t&&t.type_!==3&&!Zg(t.assigned_,r)?o.concat(r):void 0,c=Af(e,s,l);if(h2(n,r,c),qa(c))e.canAutoFreeze_=!1;else return}else i&&n.add(s);if(_i(s)&&!im(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Af(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Df(e,s)}}function Df(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qx(t,n)}function eW(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:m2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=Xx;n&&(s=[r],o=Yc);const{revoke:i,proxy:l}=Proxy.revocable(s,o);return r.draft_=l,r.revoke_=i,l}var Xx={get(e,t){if(t===er)return e;const n=Ho(e);if(!Zg(n,t))return tW(e,n,t);const r=n[t];return e.finalized_||!_i(r)?r:r===fp(e.base_,t)?(hp(e),e.copy_[t]=ey(r,e)):r},has(e,t){return t in Ho(e)},ownKeys(e){return Reflect.ownKeys(Ho(e))},set(e,t,n){const r=p2(Ho(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=fp(Ho(e),t),o=s==null?void 0:s[er];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(ZB(n,s)&&(n!==void 0||Zg(e.base_,t)))return!0;hp(e),Jg(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return fp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,hp(e),Jg(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ho(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Tr(11)},getPrototypeOf(e){return Za(e.base_)},setPrototypeOf(){Tr(12)}},Yc={};Rf(Xx,(e,t)=>{Yc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Yc.deleteProperty=function(e,t){return Yc.set.call(this,e,t,void 0)};Yc.set=function(e,t,n){return Xx.set.call(this,e[0],t,n,e[0])};function fp(e,t){const n=e[er];return(n?Ho(n):e)[t]}function tW(e,t,n){var s;const r=p2(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function p2(e,t){if(!(t in e))return;let n=Za(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Za(n)}}function Jg(e){e.modified_||(e.modified_=!0,e.parent_&&Jg(e.parent_))}function hp(e){e.copy_||(e.copy_=qg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var nW=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const i=this;return function(c=o,...u){return i.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&Tr(6),r!==void 0&&typeof r!="function"&&Tr(7);let s;if(_i(t)){const o=t_(this),i=ey(t,void 0);let l=!0;try{s=n(i),l=!1}finally{l?Xg(o):Qg(o)}return e_(o,r),n_(s,o)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===d2&&(s=void 0),this.autoFreeze_&&qx(s,!0),r){const o=[],i=[];Si("Patches").generateReplacementPatches_(t,s,o,i),r(o,i)}return s}else Tr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...l)=>this.produceWithPatches(i,c=>t(c,...l));let r,s;return[this.produce(t,n,(i,l)=>{r=i,s=l}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){_i(e)||Tr(8),qa(e)&&(e=rW(e));const t=t_(this),n=ey(e,void 0);return n[er].isManual_=!0,Qg(t),n}finishDraft(e,t){const n=e&&e[er];(!n||!n.isManual_)&&Tr(9);const{scope_:r}=n;return e_(r,t),n_(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Si("Patches").applyPatches_;return qa(e)?r(e,t):this.produce(e,s=>r(s,t))}};function ey(e,t){const n=sm(e)?Si("MapSet").proxyMap_(e,t):om(e)?Si("MapSet").proxySet_(e,t):eW(e,t);return(t?t.scope_:m2()).drafts_.push(n),n}function rW(e){return qa(e)||Tr(10,e),g2(e)}function g2(e){if(!_i(e)||im(e))return e;const t=e[er];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=qg(e,t.scope_.immer_.useStrictShallowCopy_)}else n=qg(e,!0);return Rf(n,(r,s)=>{h2(n,r,g2(s))}),t&&(t.finalized_=!1),n}var tr=new nW,Dn=tr.produce;tr.produceWithPatches.bind(tr);tr.setAutoFreeze.bind(tr);tr.setUseStrictShallowCopy.bind(tr);tr.applyPatches.bind(tr);tr.createDraft.bind(tr);tr.finishDraft.bind(tr);const sW="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let oW=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=sW[n[e]&63];return t};const iW=eu("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"}}),am=g.forwardRef(({className:e,variant:t,...n},r)=>a.jsx("div",{ref:r,role:"alert",className:se(iW({variant:t}),e),...n}));am.displayName="Alert";const Qx=g.forwardRef(({className:e,...t},n)=>a.jsx("h5",{ref:n,className:se("mb-1 font-medium leading-none tracking-tight",e),...t}));Qx.displayName="AlertTitle";const lm=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:se("text-sm [&_p]:leading-relaxed",e),...t}));lm.displayName="AlertDescription";const Of=g.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:se("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Of.displayName="Textarea";const aW=({variables:e,onValueChange:t})=>{const[n,r]=g.useState([]),{t:s}=Ue();g.useEffect(()=>{e&&r(e)},[e]);const o=c=>{const u=n.findIndex(f=>f.key===c.key),d=Dn(n,f=>{u===-1?f.push(c):f[u]=c});r(d),t==null||t(d)},i=c=>{const u=[...n];u.splice(c,1),r(u),t==null||t(u)},l=(c,u)=>{const d=[...n];d[c]=u,r(d),t==null||t(d)};return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex justify-between dark:text-stone-200",children:[a.jsx(_t,{children:s("domain.deployment.form.variables.label")}),a.jsx(pr,{when:!!(n!=null&&n.length),children:a.jsx(mp,{variable:{key:"",value:""},trigger:a.jsxs("div",{className:"flex items-center text-primary",children:[a.jsx(gi,{size:16,className:"cursor-pointer "}),a.jsx("div",{className:"text-sm ",children:s("common.add")})]}),onSave:c=>{o(c)}})})]}),a.jsx(pr,{when:!!(n!=null&&n.length),fallback:a.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:s("domain.deployment.form.variables.empty")}),a.jsx(mp,{trigger:a.jsxs("div",{className:"flex items-center text-primary",children:[a.jsx(gi,{size:16,className:"cursor-pointer "}),a.jsx("div",{className:"text-sm ",children:s("common.add")})]}),variable:{key:"",value:""},onSave:c=>{o(c)}})]}),children:a.jsx("div",{className:"border p-3 rounded-md text-stone-700 text-sm dark:text-stone-200",children:n==null?void 0:n.map((c,u)=>a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("div",{children:[c.key,"=",c.value]}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(mp,{trigger:a.jsx(iv,{size:16,className:"cursor-pointer"}),variable:c,onSave:d=>{l(u,d)}}),a.jsx(av,{size:16,className:"cursor-pointer",onClick:()=>{i(u)}})]})]},u))})})]})},mp=({variable:e,trigger:t,onSave:n})=>{const[r,s]=g.useState({key:"",value:""});g.useEffect(()=>{e&&s(e)},[e]);const{t:o}=Ue(),[i,l]=g.useState(!1),[c,u]=g.useState({}),d=()=>{if(!r.key){u({key:o("domain.deployment.form.variables.key.required")});return}if(!r.value){u({value:o("domain.deployment.form.variables.value.required")});return}n==null||n(r),l(!1),u({})};return a.jsxs(hl,{open:i,onOpenChange:()=>{l(!i)},children:[a.jsx(ml,{children:t}),a.jsxs(Ai,{className:"dark:text-stone-200",children:[a.jsxs(Di,{className:"flex flex-col",children:[a.jsx(Oi,{children:o("domain.deployment.form.variables.label")}),a.jsxs("div",{className:"pt-5 flex flex-col items-start",children:[a.jsx(_t,{children:o("domain.deployment.form.variables.key")}),a.jsx(oe,{placeholder:o("domain.deployment.form.variables.key.placeholder"),value:r==null?void 0:r.key,onChange:f=>{s({...r,key:f.target.value})},className:"w-full mt-1"}),a.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.key})]}),a.jsxs("div",{className:"pt-2 flex flex-col items-start",children:[a.jsx(_t,{children:o("domain.deployment.form.variables.value")}),a.jsx(oe,{placeholder:o("domain.deployment.form.variables.value.placeholder"),value:r==null?void 0:r.value,onChange:f=>{s({...r,value:f.target.value})},className:"w-full mt-1"}),a.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.value})]})]}),a.jsx(Jh,{children:a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{onClick:()=>{d()},children:o("common.save")})})})]})]})},If=new Map([["aliyun-oss",["common.provider.aliyun.oss","/imgs/providers/aliyun.svg"]],["aliyun-cdn",["common.provider.aliyun.cdn","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["common.provider.aliyun.dcdn","/imgs/providers/aliyun.svg"]],["tencent-cdn",["common.provider.tencent.cdn","/imgs/providers/tencent.svg"]],["qiniu-cdn",["common.provider.qiniu.cdn","/imgs/providers/qiniu.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]],["k8s-secret",["common.provider.kubernetes.secret","/imgs/providers/k8s.svg"]]]),lW=Array.from(If.keys()),y2=g.createContext({}),Io=()=>g.useContext(y2),cW=({deploys:e,onChange:t})=>{const[n,r]=g.useState([]),{t:s}=Ue();g.useEffect(()=>{r(e)},[e]);const o=c=>{c.id=oW();const u=[...n,c];r(u),t(u)},i=c=>{const u=n.filter(d=>d.id!==c);r(u),t(u)},l=c=>{const u=n.map(d=>d.id===c.id?{...c}:d);r(u),t(u)};return a.jsx(a.Fragment,{children:a.jsxs(pr,{when:n.length>0,fallback:a.jsx(am,{className:"w-full border dark:border-stone-400",children:a.jsxs(lm,{className:"flex flex-col items-center",children:[a.jsx("div",{children:s("domain.deployment.nodata")}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(ty,{onSave:c=>{o(c)},trigger:a.jsx(Re,{size:"sm",children:s("common.add")})})})]})}),children:[a.jsx("div",{className:"flex justify-end py-2 border-b dark:border-stone-400",children:a.jsx(ty,{trigger:a.jsx(Re,{size:"sm",children:s("common.add")}),onSave:c=>{o(c)}})}),a.jsx("div",{className:"w-full md:w-[35em] rounded mt-5 border dark:border-stone-400 dark:text-stone-200",children:a.jsx("div",{className:"",children:n.map(c=>a.jsx(uW,{item:c,onDelete:()=>{i(c.id??"")},onSave:u=>{l(u)}},c.id))})})]})})},uW=({item:e,onDelete:t,onSave:n})=>{const{config:{accesses:r}}=Wt(),{t:s}=Ue(),o=r.find(c=>c.id===e.access),i=()=>{if(!o)return"";const c=Ds.get(o.configType);return c?c[1]:""},l=()=>{if(!o)return"";const c=If.get(e.type);return c?s(c[0]):""};return a.jsxs("div",{className:"flex justify-between text-sm p-3 items-center text-stone-700 dark:text-stone-200",children:[a.jsxs("div",{className:"flex space-x-2 items-center",children:[a.jsx("div",{children:a.jsx("img",{src:i(),className:"w-9"})}),a.jsxs("div",{className:"text-stone-600 flex-col flex space-y-0 dark:text-stone-200",children:[a.jsx("div",{children:l()}),a.jsx("div",{children:o==null?void 0:o.name})]})]}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(ty,{trigger:a.jsx(iv,{size:16,className:"cursor-pointer"}),deployConfig:e,onSave:c=>{n(c)}}),a.jsx(av,{size:16,className:"cursor-pointer",onClick:()=>{t()}})]})]})},ty=({trigger:e,deployConfig:t,onSave:n})=>{const{config:{accesses:r}}=Wt(),[s,o]=g.useState(),[i,l]=g.useState({access:"",type:""}),[c,u]=g.useState({}),[d,f]=g.useState(!1);g.useEffect(()=>{l(t?{...t}:{access:"",type:""})},[t]),g.useEffect(()=>{const w=i.type.split("-");let y;w&&w.length>1?y=w[0]==="k8s"?w[0]:w[1]:y=i.type,o(y),u({})},[i.type]);const h=g.useCallback(w=>{w.type!==i.type?l({...w,access:"",config:{}}):l({...w})},[i.type]),{t:m}=Ue(),x=r.filter(w=>{if(w.usage=="apply")return!1;if(i.type=="")return!0;const y=i.type.split("-");return w.configType===y[0]}),p=()=>{const w={...c};i.type===""?w.type=m("domain.deployment.form.access.placeholder"):w.type="",i.access===""?w.access=m("domain.deployment.form.access.placeholder"):w.access="",u(w);for(const y in w)if(w[y]!=="")return;n(i),l({access:"",type:""}),u({}),f(!1)};return a.jsx(y2.Provider,{value:{deploy:i,setDeploy:h,error:c,setError:u},children:a.jsxs(hl,{open:d,onOpenChange:f,children:[a.jsx(ml,{children:e}),a.jsxs(Ai,{className:"dark:text-stone-200",children:[a.jsxs(Di,{children:[a.jsx(Oi,{children:m("history.page.title")}),a.jsx(qT,{})]}),a.jsxs("div",{children:[a.jsx(_t,{children:m("domain.deployment.form.type.label")}),a.jsxs(ai,{value:i.type,onValueChange:w=>{h({...i,type:w})},children:[a.jsx(ko,{className:"mt-2",children:a.jsx(li,{placeholder:m("domain.deployment.form.type.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:m("domain.deployment.form.type.list")}),lW.map(w=>{var y,v;return a.jsx(Pn,{value:w,children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{className:"w-6",src:(y=If.get(w))==null?void 0:y[1]}),a.jsx("div",{children:m(((v=If.get(w))==null?void 0:v[0])??"")})]})},w)})]})})]}),a.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.type})]}),a.jsxs("div",{children:[a.jsxs(_t,{className:"flex justify-between",children:[a.jsx("div",{children:m("domain.deployment.form.access.label")}),a.jsx(va,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(gi,{size:14}),m("common.add")]}),op:"add"})]}),a.jsxs(ai,{value:i.access,onValueChange:w=>{h({...i,access:w})},children:[a.jsx(ko,{className:"mt-2",children:a.jsx(li,{placeholder:m("domain.deployment.form.access.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:m("domain.deployment.form.access.list")}),x.map(w=>{var y;return a.jsx(Pn,{value:w.id,children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{className:"w-6",src:(y=Ds.get(w.configType))==null?void 0:y[1]}),a.jsx("div",{children:w.name})]})},w.id)})]})})]}),a.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.access})]}),a.jsx(dW,{type:s}),a.jsx(Jh,{children:a.jsx(Re,{onClick:w=>{w.stopPropagation(),p()},children:m("common.save")})})]})]})})},dW=({type:e})=>(()=>{switch(e){case"cdn":return a.jsx(pp,{});case"dcdn":return a.jsx(pp,{});case"oss":return a.jsx(hW,{});case"ssh":return a.jsx(s_,{});case"local":return a.jsx(s_,{});case"webhook":return a.jsx(fW,{});case"k8s":return a.jsx(mW,{});default:return a.jsx(pp,{})}})(),s_=()=>{var s,o,i,l;const{t:e}=Ue(),{setError:t}=Io();g.useEffect(()=>{t({})},[]);const{deploy:n,setDeploy:r}=Io();return g.useEffect(()=>{n.id||r({...n,config:{certPath:"/etc/nginx/ssl/nginx.crt",keyPath:"/etc/nginx/ssl/nginx.key",preCommand:"",command:"sudo service nginx reload"}})},[]),a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col space-y-2",children:[a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.ssh_cert_path.label")}),a.jsx(oe,{placeholder:e("domain.deployment.form.ssh_cert_path.label"),className:"w-full mt-1",value:(s=n==null?void 0:n.config)==null?void 0:s.certPath,onChange:c=>{const u=Dn(n,d=>{d.config||(d.config={}),d.config.certPath=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.ssh_key_path.label")}),a.jsx(oe,{placeholder:e("domain.deployment.form.ssh_key_path.placeholder"),className:"w-full mt-1",value:(o=n==null?void 0:n.config)==null?void 0:o.keyPath,onChange:c=>{const u=Dn(n,d=>{d.config||(d.config={}),d.config.keyPath=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.ssh_pre_command.label")}),a.jsx(Of,{className:"mt-1",value:(i=n==null?void 0:n.config)==null?void 0:i.preCommand,placeholder:e("domain.deployment.form.ssh_pre_command.placeholder"),onChange:c=>{const u=Dn(n,d=>{d.config||(d.config={}),d.config.preCommand=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.ssh_command.label")}),a.jsx(Of,{className:"mt-1",value:(l=n==null?void 0:n.config)==null?void 0:l.command,placeholder:e("domain.deployment.form.ssh_command.placeholder"),onChange:c=>{const u=Dn(n,d=>{d.config||(d.config={}),d.config.command=c.target.value});r(u)}})]})]})})},fW=()=>{var r;const{deploy:e,setDeploy:t}=Io(),{setError:n}=Io();return g.useEffect(()=>{n({})},[]),a.jsx(a.Fragment,{children:a.jsx(aW,{variables:(r=e==null?void 0:e.config)==null?void 0:r.variables,onValueChange:s=>{const o=Dn(e,i=>{i.config||(i.config={}),i.config.variables=s});t(o)}})})},hW=()=>{var l,c,u;const{deploy:e,setDeploy:t,error:n,setError:r}=Io(),{t:s}=Ue();g.useEffect(()=>{r({})},[]),g.useEffect(()=>{var f;const d=o.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,domain:""}):r({...n,domain:JSON.parse(d.error.message)[0].message})},[e]),g.useEffect(()=>{var f;const d=i.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(d.error.message)[0].message})},[]),g.useEffect(()=>{e.id||t({...e,config:{endpoint:"oss-cn-hangzhou.aliyuncs.com",bucket:"",domain:""}})},[]);const o=te.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")}),i=te.string().min(1,{message:s("domain.deployment.form.oss_bucket.placeholder")});return a.jsx("div",{className:"flex flex-col space-y-2",children:a.jsxs("div",{children:[a.jsx(_t,{children:s("domain.deployment.form.oss_endpoint.label")}),a.jsx(oe,{placeholder:s("domain.deployment.form.oss_endpoint.placeholder"),className:"w-full mt-1",value:(l=e==null?void 0:e.config)==null?void 0:l.endpoint,onChange:d=>{const f=d.target.value,h=Dn(e,m=>{m.config||(m.config={}),m.config.endpoint=f});t(h)}}),a.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.endpoint}),a.jsx(_t,{children:s("domain.deployment.form.oss_bucket.label")}),a.jsx(oe,{placeholder:s("domain.deployment.form.oss_bucket.placeholder"),className:"w-full mt-1",value:(c=e==null?void 0:e.config)==null?void 0:c.bucket,onChange:d=>{const f=d.target.value,h=i.safeParse(f);h.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(h.error.message)[0].message});const m=Dn(e,x=>{x.config||(x.config={}),x.config.bucket=f});t(m)}}),a.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.bucket}),a.jsx(_t,{children:s("domain.deployment.form.domain.label")}),a.jsx(oe,{placeholder:s("domain.deployment.form.domain.label"),className:"w-full mt-1",value:(u=e==null?void 0:e.config)==null?void 0:u.domain,onChange:d=>{const f=d.target.value,h=o.safeParse(f);h.success?r({...n,domain:""}):r({...n,domain:JSON.parse(h.error.message)[0].message});const m=Dn(e,x=>{x.config||(x.config={}),x.config.domain=f});t(m)}}),a.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},pp=()=>{var i;const{deploy:e,setDeploy:t,error:n,setError:r}=Io(),{t:s}=Ue();g.useEffect(()=>{r({})},[]),g.useEffect(()=>{var c;const l=o.safeParse((c=e.config)==null?void 0:c.domain);l.success?r({...n,domain:""}):r({...n,domain:JSON.parse(l.error.message)[0].message})},[e]);const o=te.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")});return a.jsx("div",{className:"flex flex-col space-y-2",children:a.jsxs("div",{children:[a.jsx(_t,{children:s("domain.deployment.form.domain.label")}),a.jsx(oe,{placeholder:s("domain.deployment.form.domain.placeholder"),className:"w-full mt-1",value:(i=e==null?void 0:e.config)==null?void 0:i.domain,onChange:l=>{const c=l.target.value,u=o.safeParse(c);u.success?r({...n,domain:""}):r({...n,domain:JSON.parse(u.error.message)[0].message});const d=Dn(e,f=>{f.config||(f.config={}),f.config.domain=c});t(d)}}),a.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},mW=()=>{var s,o,i,l;const{t:e}=Ue(),{setError:t}=Io();g.useEffect(()=>{t({})},[]);const{deploy:n,setDeploy:r}=Io();return g.useEffect(()=>{n.id||r({...n,config:{namespace:"default",secretName:"",secretDataKeyForCrt:"tls.crt",secretDataKeyForKey:"tls.key"}})},[]),a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col space-y-2",children:[a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.k8s_namespace.label")}),a.jsx(oe,{placeholder:e("domain.deployment.form.k8s_namespace.label"),className:"w-full mt-1",value:(s=n==null?void 0:n.config)==null?void 0:s.namespace,onChange:c=>{const u=Dn(n,d=>{d.config??(d.config={}),d.config.namespace=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.k8s_secret_name.label")}),a.jsx(oe,{placeholder:e("domain.deployment.form.k8s_secret_name.label"),className:"w-full mt-1",value:(o=n==null?void 0:n.config)==null?void 0:o.secretName,onChange:c=>{const u=Dn(n,d=>{d.config??(d.config={}),d.config.secretName=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.k8s_secret_data_key_for_crt.label")}),a.jsx(oe,{placeholder:e("domain.deployment.form.k8s_secret_data_key_for_crt.label"),className:"w-full mt-1",value:(i=n==null?void 0:n.config)==null?void 0:i.secretDataKeyForCrt,onChange:c=>{const u=Dn(n,d=>{d.config??(d.config={}),d.config.secretDataKeyForCrt=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.k8s_secret_data_key_for_key.label")}),a.jsx(oe,{placeholder:e("domain.deployment.form.k8s_secret_data_key_for_key.label"),className:"w-full mt-1",value:(l=n==null?void 0:n.config)==null?void 0:l.secretDataKeyForKey,onChange:c=>{const u=Dn(n,d=>{d.config??(d.config={}),d.config.secretDataKeyForKey=c.target.value});r(u)}})]})]})})},pW=({className:e,trigger:t})=>{const{config:{emails:n},setEmails:r}=Wt(),[s,o]=g.useState(!1),{t:i}=Ue(),l=te.object({email:te.string().email("common.errmsg.email_invalid")}),c=Ht({resolver:Kt(l),defaultValues:{email:""}}),u=async d=>{if(n.content.emails.includes(d.email)){c.setError("email",{message:"common.errmsg.email_duplicate"});return}const f=[...n.content.emails,d.email];try{const h=await Ri({...n,name:"emails",content:{emails:f}});r(h),c.reset(),c.clearErrors(),o(!1)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return a.jsxs(hl,{onOpenChange:o,open:s,children:[a.jsx(ml,{asChild:!0,className:se(e),children:t}),a.jsxs(Ai,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[a.jsx(Di,{children:a.jsx(Oi,{children:i("domain.application.form.email.add")})}),a.jsx("div",{className:"container py-3",children:a.jsx(Yt,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(he,{control:c.control,name:"email",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:i("domain.application.form.email.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:i("common.errmsg.email_empty"),...d,type:"email"})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:i("common.save")})})]})})})]})]})},v2={domain:"common.text.domain",ip:"common.text.ip",dns:"common.text.dns"},o_=({value:e,className:t,onValueChange:n,valueType:r="domain"})=>{const[s,o]=g.useState([]),{t:i}=Ue();g.useMemo(()=>{e&&o(e.split(";"))},[e]),g.useEffect(()=>{(()=>{n(s.join(";"))})()},[s]);const l=d=>{s.includes(d)||o([...s,d])},c=(d,f)=>{const h=[...s];h[d]=f,o(h)},u=d=>{const f=[...s];f.splice(d,1),o(f)};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:se(t),children:[a.jsxs(me,{className:"flex justify-between items-center",children:[a.jsx("div",{children:i(v2[r])}),a.jsx(pr,{when:s.length>0,children:a.jsx(gp,{op:"add",onValueChange:d=>{l(d)},valueType:r,value:"",trigger:a.jsxs("div",{className:"flex items-center text-primary",children:[a.jsx(gi,{size:16,className:"cursor-pointer "}),a.jsx("div",{className:"text-sm ",children:i("common.add")})]})})})]}),a.jsx(pe,{children:a.jsx(pr,{when:s.length>0,fallback:a.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:i("common.text."+r+".empty")}),a.jsx(gp,{value:"",trigger:i("common.add"),onValueChange:l,valueType:r})]}),children:a.jsx("div",{className:"border rounded-md p-3 text-sm mt-2 text-gray-700 space-y-2 dark:text-white dark:border-stone-700 dark:bg-stone-950",children:s.map((d,f)=>a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("div",{children:d}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(gp,{op:"edit",valueType:r,trigger:a.jsx(iv,{size:16,className:"cursor-pointer text-gray-600 dark:text-white"}),value:d,onValueChange:h=>{c(f,h)}}),a.jsx(av,{size:16,className:"cursor-pointer",onClick:()=>{u(f)}})]})]},f))})})})]})})},gp=({trigger:e,value:t,onValueChange:n,op:r="add",valueType:s})=>{const[o,i]=g.useState(""),[l,c]=g.useState(!1),[u,d]=g.useState(""),{t:f}=Ue();g.useEffect(()=>{i(t)},[t]);const h=te.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:f("common.errmsg.domain_invalid")}),m=te.string().ip({message:f("common.errmsg.ip_invalid")}),x={domain:h,dns:m,host:m},p=g.useCallback(()=>{const y=x[s].safeParse(o);if(!y.success){d(JSON.parse(y.error.message)[0].message);return}i(""),c(!1),d(""),n(o)},[o]);return a.jsxs(hl,{open:l,onOpenChange:w=>{c(w)},children:[a.jsx(ml,{className:"text-primary",children:e}),a.jsxs(Ai,{className:"dark:text-white",children:[a.jsx(Di,{children:a.jsx(Oi,{className:"dark:text-white",children:f(v2[s])})}),a.jsx(oe,{value:o,className:"dark:text-white",onChange:w=>{i(w.target.value)}}),a.jsx(pr,{when:u.length>0,children:a.jsx("div",{className:"text-red-500 text-sm",children:u})}),a.jsx(Jh,{children:a.jsx(Re,{onClick:()=>{p()},children:f(r==="add"?"common.add":"common.confirm")})})]})]})},gW=()=>{const{config:{accesses:e,emails:t}}=Wt(),[n,r]=g.useState({}),s=Ur(),{t:o}=Ue(),[i,l]=g.useState("apply");g.useEffect(()=>{const x=new URLSearchParams(s.search).get("id");x&&(async()=>{const w=await iU(x);r(w)})()},[s.search]);const c=te.object({id:te.string().optional(),domain:te.string().min(1,{message:"common.errmsg.domain_invalid"}),email:te.string().email("common.errmsg.email_invalid").optional(),access:te.string().regex(/^[a-zA-Z0-9]+$/,{message:"domain.application.form.access.placeholder"}),keyAlgorithm:te.string().optional(),nameservers:te.string().optional(),timeout:te.number().optional()}),u=Ht({resolver:Kt(c),defaultValues:{id:"",domain:"",email:"",access:"",keyAlgorithm:"RSA2048",nameservers:"",timeout:60}});g.useEffect(()=>{var m,x,p,w,y;n&&u.reset({id:n.id,domain:n.domain,email:(m=n.applyConfig)==null?void 0:m.email,access:(x=n.applyConfig)==null?void 0:x.access,keyAlgorithm:(p=n.applyConfig)==null?void 0:p.keyAlgorithm,nameservers:(w=n.applyConfig)==null?void 0:w.nameservers,timeout:(y=n.applyConfig)==null?void 0:y.timeout})},[n,u]);const{toast:d}=wr(),f=async m=>{const x={id:m.id,crontab:"0 0 * * *",domain:m.domain,email:m.email,access:m.access,applyConfig:{email:m.email??"",access:m.access,keyAlgorithm:m.keyAlgorithm,nameservers:m.nameservers,timeout:m.timeout}};try{const p=await pf(x);let w=o("domain.application.form.domain.changed.message");x.id==""&&(w=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:w}),n!=null&&n.id||l("deploy"),r({...p})}catch(p){Object.entries(p.response.data).forEach(([y,v])=>{u.setError(y,{type:"manual",message:v.message})});return}},h=async m=>{const x={...n,deployConfig:m};try{const p=await pf(x);let w=o("domain.application.form.domain.changed.message");x.id==""&&(w=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:w}),n!=null&&n.id||l("deploy"),r({...p})}catch(p){Object.entries(p.response.data).forEach(([y,v])=>{u.setError(y,{type:"manual",message:v.message})});return}};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"",children:[a.jsx(Ax,{}),a.jsx("div",{className:" h-5 text-muted-foreground",children:a.jsx(XN,{children:a.jsxs(QN,{children:[a.jsx(Vg,{children:a.jsx(JN,{href:"#/domains",children:o("domain.page.title")})}),a.jsx(tT,{}),a.jsx(Vg,{children:a.jsx(eT,{children:n!=null&&n.id?o("domain.edit"):o("domain.add")})})]})})}),a.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[a.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex md:mt-5",children:[a.jsx("div",{className:se("cursor-pointer text-right",i==="apply"?"text-primary":""),onClick:()=>{l("apply")},children:o("domain.application.tab")}),a.jsx("div",{className:se("cursor-pointer text-right",i==="deploy"?"text-primary":""),onClick:()=>{if(!(n!=null&&n.id)){d({title:o("domain.application.unsaved.message"),description:o("domain.application.unsaved.message"),variant:"destructive"});return}l("deploy")},children:o("domain.deployment.tab")})]}),a.jsxs("div",{className:"flex flex-col",children:[a.jsx("div",{className:se("w-full md:w-[35em] p-5 rounded mt-3 md:mt-0",i=="deploy"&&"hidden"),children:a.jsx(Yt,{...u,children:a.jsxs("form",{onSubmit:u.handleSubmit(f),className:"space-y-8 dark:text-stone-200",children:[a.jsx(he,{control:u.control,name:"domain",render:({field:m})=>a.jsxs(de,{children:[a.jsx(a.Fragment,{children:a.jsx(o_,{value:m.value,valueType:"domain",onValueChange:x=>{u.setValue("domain",x)}})}),a.jsx(le,{})]})}),a.jsx(he,{control:u.control,name:"email",render:({field:m})=>a.jsxs(de,{children:[a.jsxs(me,{className:"flex w-full justify-between",children:[a.jsx("div",{children:o("domain.application.form.email.label")+" "+o("domain.application.form.email.tips")}),a.jsx(pW,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(gi,{size:14}),o("common.add")]})})]}),a.jsx(pe,{children:a.jsxs(ai,{...m,value:m.value,onValueChange:x=>{u.setValue("email",x)},children:[a.jsx(ko,{children:a.jsx(li,{placeholder:o("domain.application.form.email.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:o("domain.application.form.email.list")}),t.content.emails.map(x=>a.jsx(Pn,{value:x,children:a.jsx("div",{children:x})},x))]})})]})}),a.jsx(le,{})]})}),a.jsx(he,{control:u.control,name:"access",render:({field:m})=>a.jsxs(de,{children:[a.jsxs(me,{className:"flex w-full justify-between",children:[a.jsx("div",{children:o("domain.application.form.access.label")}),a.jsx(va,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(gi,{size:14}),o("common.add")]}),op:"add"})]}),a.jsx(pe,{children:a.jsxs(ai,{...m,value:m.value,onValueChange:x=>{u.setValue("access",x)},children:[a.jsx(ko,{children:a.jsx(li,{placeholder:o("domain.application.form.access.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:o("domain.application.form.access.list")}),e.filter(x=>x.usage!="deploy").map(x=>{var p;return a.jsx(Pn,{value:x.id,children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{className:"w-6",src:(p=Ds.get(x.configType))==null?void 0:p[1]}),a.jsx("div",{children:x.name})]})},x.id)})]})})]})}),a.jsx(le,{})]})}),a.jsxs("div",{children:[a.jsx("hr",{}),a.jsxs(VV,{children:[a.jsx(BV,{className:"w-full my-4",children:a.jsxs("div",{className:"flex items-center justify-between space-x-4",children:[a.jsx("span",{className:"flex-1 text-sm text-gray-600 text-left",children:o("domain.application.form.advanced_settings.label")}),a.jsx(fI,{className:"h-4 w-4"})]})}),a.jsx(iT,{children:a.jsxs("div",{className:"flex flex-col space-y-8",children:[a.jsx(he,{control:u.control,name:"keyAlgorithm",render:({field:m})=>a.jsxs(de,{children:[a.jsx(me,{children:o("domain.application.form.key_algorithm.label")}),a.jsxs(ai,{...m,value:m.value,onValueChange:x=>{u.setValue("keyAlgorithm",x)},children:[a.jsx(ko,{children:a.jsx(li,{placeholder:o("domain.application.form.key_algorithm.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Pn,{value:"RSA2048",children:"RSA2048"}),a.jsx(Pn,{value:"RSA3072",children:"RSA3072"}),a.jsx(Pn,{value:"RSA4096",children:"RSA4096"}),a.jsx(Pn,{value:"RSA8192",children:"RSA8192"}),a.jsx(Pn,{value:"EC256",children:"EC256"}),a.jsx(Pn,{value:"EC384",children:"EC384"})]})})]})]})}),a.jsx(he,{control:u.control,name:"nameservers",render:({field:m})=>a.jsxs(de,{children:[a.jsx(o_,{value:m.value??"",onValueChange:x=>{u.setValue("nameservers",x)},valueType:"dns"}),a.jsx(le,{})]})}),a.jsx(he,{control:u.control,name:"timeout",render:({field:m})=>a.jsxs(de,{children:[a.jsx(me,{children:o("domain.application.form.timeout.label")}),a.jsx(pe,{children:a.jsx(oe,{type:"number",placeholder:o("domain.application.form.timeout.placeholder"),...m,value:m.value,onChange:x=>{u.setValue("timeout",parseInt(x.target.value))}})}),a.jsx(le,{})]})})]})})]})]}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:n!=null&&n.id?o("common.save"):o("common.next")})})]})})}),a.jsx("div",{className:se("flex flex-col space-y-5 w-full md:w-[35em]",i=="apply"&&"hidden"),children:a.jsx(cW,{deploys:(n==null?void 0:n.deployConfig)??[],onChange:m=>{h(m)}})})]})]})]})})};var Jx="Tabs",[yW,T9]=un(Jx,[al]),x2=al(),[vW,e0]=yW(Jx),w2=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=Ci(l),[f,h]=zn({prop:r,onChange:s,defaultProp:o});return a.jsx(vW,{scope:n,baseId:Ln(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:c,children:a.jsx(Te.div,{dir:d,"data-orientation":i,...u,ref:t})})});w2.displayName=Jx;var b2="TabsList",_2=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=e0(b2,n),i=x2(n);return a.jsx(Cv,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:a.jsx(Te.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});_2.displayName=b2;var S2="TabsTrigger",k2=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,i=e0(S2,n),l=x2(n),c=E2(i.baseId,r),u=N2(i.baseId,r),d=r===i.value;return a.jsx(Ev,{asChild:!0,...l,focusable:!s,active:d,children:a.jsx(Te.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:ge(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ge(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ge(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(r)})})})});k2.displayName=S2;var j2="TabsContent",C2=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...i}=e,l=e0(j2,n),c=E2(l.baseId,r),u=N2(l.baseId,r),d=r===l.value,f=g.useRef(d);return g.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),a.jsx(dn,{present:s||d,children:({present:h})=>a.jsx(Te.div,{"data-state":d?"active":"inactive","data-orientation":l.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})})});C2.displayName=j2;function E2(e,t){return`${e}-trigger-${t}`}function N2(e,t){return`${e}-content-${t}`}var xW=w2,T2=_2,P2=k2,R2=C2;const A2=xW,t0=g.forwardRef(({className:e,...t},n)=>a.jsx(T2,{ref:n,className:se("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));t0.displayName=T2.displayName;const ti=g.forwardRef(({className:e,...t},n)=>a.jsx(P2,{ref:n,className:se("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}));ti.displayName=P2.displayName;const Mf=g.forwardRef(({className:e,...t},n)=>a.jsx(R2,{ref:n,className:se("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Mf.displayName=R2.displayName;const D2=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:se("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));D2.displayName="Card";const O2=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:se("flex flex-col space-y-1.5 p-6",e),...t}));O2.displayName="CardHeader";const I2=g.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:se("text-2xl font-semibold leading-none tracking-tight",e),...t}));I2.displayName="CardTitle";const M2=g.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:se("text-sm text-muted-foreground",e),...t}));M2.displayName="CardDescription";const L2=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:se("p-6 pt-0",e),...t}));L2.displayName="CardContent";const z2=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:se("flex items-center p-6 pt-0",e),...t}));z2.displayName="CardFooter";const cs=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",wW=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=Wt(),{toast:n}=wr(),r=sr(),{t:s}=Ue(),o=async l=>{try{await O8(l),t()}catch(c){n({title:s("common.delete.failed.message"),description:cs(c),variant:"destructive"});return}},i=()=>{r("/access")};return a.jsxs("div",{className:"mt-10",children:[a.jsx(pr,{when:e.length==0,children:a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col items-center mt-10",children:[a.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:a.jsx(qw,{size:40,className:"text-primary"})}),a.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:s("access.group.domains.nodata")}),a.jsx(Zx,{trigger:a.jsx(Re,{children:s("access.group.add")}),className:"mt-3"})]})})}),a.jsx(nm,{className:"h-[75vh] overflow-hidden",children:a.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(l=>a.jsxs(D2,{className:"w-full md:w-[350px]",children:[a.jsxs(O2,{children:[a.jsx(I2,{children:l.name}),a.jsx(M2,{children:s("access.group.total",{total:l.expand?l.expand.access.length:0})})]}),a.jsx(L2,{className:"min-h-[180px]",children:l.expand?a.jsx(a.Fragment,{children:l.expand.access.slice(0,3).map(c=>a.jsx("div",{className:"flex flex-col mb-3",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"",children:a.jsx("img",{src:Qb(c.configType)[1],alt:"provider",className:"w-8 h-8"})}),a.jsxs("div",{className:"ml-3",children:[a.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:c.name}),a.jsx("div",{className:"text-xs text-muted-foreground",children:Qb(c.configType)[0]})]})]})},c.id))}):a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[a.jsx("div",{children:a.jsx(qw,{size:40})}),a.jsx("div",{className:"ml-2",children:s("access.group.nodata")})]})})}),a.jsx(z2,{children:a.jsxs("div",{className:"flex justify-end w-full",children:[a.jsx(pr,{when:!!(l.expand&&l.expand.access.length>0),children:a.jsx("div",{children:a.jsx(Re,{size:"sm",variant:"link",onClick:()=>{r(`/access?accessGroupId=${l.id}&tab=access`,{replace:!0})},children:s("access.group.domains")})})}),a.jsx(pr,{when:!l.expand||l.expand.access.length==0,children:a.jsx("div",{children:a.jsx(Re,{size:"sm",onClick:i,children:s("access.authorization.add")})})}),a.jsx("div",{className:"ml-3",children:a.jsxs(jx,{children:[a.jsx(Cx,{asChild:!0,children:a.jsx(Re,{variant:"destructive",size:"sm",children:s("common.delete")})}),a.jsxs(Lh,{children:[a.jsxs(zh,{children:[a.jsx($h,{className:"dark:text-gray-200",children:s("access.group.delete")}),a.jsx(Uh,{children:s("access.group.delete.confirm")})]}),a.jsxs(Fh,{children:[a.jsx(Bh,{className:"dark:text-gray-200",children:s("common.cancel")}),a.jsx(Vh,{onClick:()=>{o(l.id?l.id:"")},children:s("common.confirm")})]})]})]})})]})})]}))})})]})},bW=()=>{const{t:e}=Ue(),{config:t,deleteAccess:n}=Wt(),{accesses:r}=t,s=10,o=Math.ceil(r.length/s),i=sr(),l=Ur(),c=new URLSearchParams(l.search),u=c.get("page"),d=u?Number(u):1,f=c.get("tab"),h=c.get("accessGroupId"),m=(d-1)*s,x=m+s,p=async y=>{const v=await D8(y);n(v.id)},w=y=>{c.set("tab",y),i({search:c.toString()})};return a.jsxs("div",{className:"",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:e("access.page.title")}),f!="access_group"?a.jsx(va,{trigger:a.jsx(Re,{children:e("access.authorization.add")}),op:"add"}):a.jsx(Zx,{trigger:a.jsx(Re,{children:e("access.group.add")})})]}),a.jsxs(A2,{defaultValue:f||"access",value:f||"access",className:"w-full mt-5",children:[a.jsxs(t0,{className:"space-x-5 px-3",children:[a.jsx(ti,{value:"access",onClick:()=>{w("access")},children:e("access.authorization.tab")}),a.jsx(ti,{value:"access_group",onClick:()=>{w("access_group")},children:e("access.group.tab")})]}),a.jsx(Mf,{value:"access",children:r.length===0?a.jsxs("div",{className:"flex flex-col items-center mt-10",children:[a.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:a.jsx(yI,{size:40,className:"text-primary"})}),a.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:e("access.authorization.nodata")}),a.jsx(va,{trigger:a.jsx(Re,{children:e("access.authorization.add")}),op:"add",className:"mt-3"})]}):a.jsxs(a.Fragment,{children:[a.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:[a.jsx("div",{className:"w-48",children:e("common.text.name")}),a.jsx("div",{className:"w-48",children:e("common.text.provider")}),a.jsx("div",{className:"w-60",children:e("common.text.created_at")}),a.jsx("div",{className:"w-60",children:e("common.text.updated_at")}),a.jsx("div",{className:"grow",children:e("common.text.operations")})]}),r.filter(y=>h?y.group==h:!0).slice(m,x).map(y=>{var v,b;return a.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:[a.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:y.name}),a.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[a.jsx("img",{src:(v=Ds.get(y.configType))==null?void 0:v[1],className:"w-6"}),a.jsx("div",{children:e(((b=Ds.get(y.configType))==null?void 0:b[0])||"")})]}),a.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:y.created&&Ba(y.created)}),a.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:y.updated&&Ba(y.updated)}),a.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[a.jsx(va,{trigger:a.jsx(Re,{variant:"link",className:"p-0",children:e("common.edit")}),op:"edit",data:y}),a.jsx(Er,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(va,{trigger:a.jsx(Re,{variant:"link",className:"p-0",children:e("common.copy")}),op:"copy",data:y}),a.jsx(Er,{orientation:"vertical",className:"h-4 mx-2"}),a.jsxs(jx,{children:[a.jsx(Cx,{asChild:!0,children:a.jsx(Re,{variant:"link",className:"p-0",children:e("common.delete")})}),a.jsxs(Lh,{children:[a.jsxs(zh,{children:[a.jsx($h,{className:"dark:text-gray-200",children:e("access.authorization.delete")}),a.jsx(Uh,{children:e("access.authorization.delete.confirm")})]}),a.jsxs(Fh,{children:[a.jsx(Bh,{className:"dark:text-gray-200",children:e("common.cancel")}),a.jsx(Vh,{onClick:()=>{p(y)},children:e("common.confirm")})]})]})]})]})]},y.id)}),a.jsx(jE,{totalPages:o,currentPage:d,onPageChange:y=>{c.set("page",y.toString()),i({search:c.toString()})}})]})}),a.jsx(Mf,{value:"access_group",children:a.jsx(wW,{})})]})]})},F2=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 ot().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},_W=()=>{const e=sr(),[t,n]=g.useState(),[r]=IO(),{t:s}=Ue(),o=r.get("domain");return g.useEffect(()=>{(async()=>{const l={};o&&(l.domain=o);const c=await F2(l);n(c.items)})()},[o]),a.jsxs(nm,{className:"h-[80vh] overflow-hidden",children:[a.jsx("div",{className:"text-muted-foreground",children:s("history.page.title")}),t!=null&&t.length?a.jsxs(a.Fragment,{children:[a.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:[a.jsx("div",{className:"w-48",children:s("history.props.domain")}),a.jsx("div",{className:"w-24",children:s("history.props.status")}),a.jsx("div",{className:"w-56",children:s("history.props.stage")}),a.jsx("div",{className:"w-56 sm:ml-2 text-center",children:s("history.props.last_execution_time")}),a.jsx("div",{className:"grow",children:s("common.text.operations")})]}),t==null?void 0:t.map(i=>{var l,c;return a.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:[a.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(l=i.expand.domain)==null?void 0:l.domain.split(";").map(u=>a.jsxs(a.Fragment,{children:[u,a.jsx("br",{})]}))}),a.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(kx,{deployment:i})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(Sx,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ba(i.deployedAt)}),a.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:a.jsxs(Kv,{children:[a.jsx(Yv,{asChild:!0,children:a.jsx(Re,{variant:"link",className:"p-0",children:s("history.log")})}),a.jsxs(bh,{className:"sm:max-w-5xl",children:[a.jsx(Gv,{children:a.jsxs(Zv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,s("history.log")]})}),a.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&a.jsx(a.Fragment,{children:i.log.check.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&a.jsx(a.Fragment,{children:i.log.apply.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>a.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&a.jsx(a.Fragment,{children:i.log.deploy.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]}):a.jsx(a.Fragment,{children:a.jsxs(am,{className:"max-w-[40em] mx-auto mt-20",children:[a.jsx(Qx,{children:s("common.text.nodata")}),a.jsxs(lm,{children:[a.jsxs("div",{className:"flex items-center mt-5",children:[a.jsx("div",{children:a.jsx(dk,{className:"text-yellow-400",size:36})}),a.jsxs("div",{className:"ml-2",children:[" ",s("history.nodata")]})]}),a.jsx("div",{className:"mt-2 flex justify-end",children:a.jsx(Re,{onClick:()=>{e("/")},children:s("domain.add")})})]})]})})]})},SW=te.object({username:te.string().email({message:"login.username.errmsg.invalid"}),password:te.string().min(10,{message:"login.password.errmsg.invalid"})}),kW=()=>{const{t:e}=Ue(),t=Ht({resolver:Kt(SW),defaultValues:{username:"",password:""}}),n=async s=>{try{await ot().admins.authWithPassword(s.username,s.password),r("/")}catch(o){const i=cs(o);t.setError("username",{message:i}),t.setError("password",{message:i})}},r=sr();return a.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[a.jsx("div",{className:"flex justify-center mb-10",children:a.jsx("img",{src:"/vite.svg",className:"w-16"})}),a.jsx(Yt,{...t,children:a.jsxs("form",{onSubmit:t.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[a.jsx(he,{control:t.control,name:"username",render:({field:s})=>a.jsxs(de,{children:[a.jsx(me,{children:e("login.username.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:e("login.username.placeholder"),...s})}),a.jsx(le,{})]})}),a.jsx(he,{control:t.control,name:"password",render:({field:s})=>a.jsxs(de,{children:[a.jsx(me,{children:e("login.password.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:e("login.password.placeholder"),...s,type:"password"})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:e("login.submit")})})]})})]})},jW=()=>ot().authStore.isValid&&ot().authStore.isAdmin?a.jsx(JS,{to:"/"}):a.jsxs("div",{className:"container",children:[a.jsx(rv,{}),a.jsx(dE,{})]}),CW=te.object({oldPassword:te.string().min(10,{message:"settings.password.password.errmsg.length"}),newPassword:te.string().min(10,{message:"settings.password.password.errmsg.length"}),confirmPassword:te.string().min(10,{message:"settings.password.password.errmsg.length"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"settings.password.password.errmsg.not_matched",path:["confirmPassword"]}),EW=()=>{const{toast:e}=wr(),t=sr(),{t:n}=Ue(),r=Ht({resolver:Kt(CW),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),s=async o=>{var i,l;try{await ot().admins.authWithPassword((i=ot().authStore.model)==null?void 0:i.email,o.oldPassword)}catch(c){const u=cs(c);r.setError("oldPassword",{message:u})}try{await ot().admins.update((l=ot().authStore.model)==null?void 0:l.id,{password:o.newPassword,passwordConfirm:o.confirmPassword}),ot().authStore.clear(),e({title:n("settings.password.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(c){const u=cs(c);e({title:n("settings.password.failed.message"),description:u,variant:"destructive"})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"w-full md:max-w-[35em]",children:a.jsx(Yt,{...r,children:a.jsxs("form",{onSubmit:r.handleSubmit(s),className:"space-y-8 dark:text-stone-200",children:[a.jsx(he,{control:r.control,name:"oldPassword",render:({field:o})=>a.jsxs(de,{children:[a.jsx(me,{children:n("settings.password.current_password.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:n("settings.password.current_password.placeholder"),...o,type:"password"})}),a.jsx(le,{})]})}),a.jsx(he,{control:r.control,name:"newPassword",render:({field:o})=>a.jsxs(de,{children:[a.jsx(me,{children:n("settings.password.new_password.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:n("settings.password.new_password.placeholder"),...o,type:"password"})}),a.jsx(le,{})]})}),a.jsx(he,{control:r.control,name:"confirmPassword",render:({field:o})=>a.jsxs(de,{children:[a.jsx(me,{children:n("settings.password.confirm_password.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:n("settings.password.confirm_password.placeholder"),...o,type:"password"})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:n("common.update")})})]})})})})},NW=()=>{const e=Ur(),[t,n]=g.useState("account"),r=sr(),{t:s}=Ue();return g.useEffect(()=>{const i=e.pathname.split("/")[2];n(i)},[e]),a.jsxs("div",{children:[a.jsx(Ax,{}),a.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:s("settings.page.title")}),a.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:a.jsxs(A2,{defaultValue:"account",className:"w-full",value:t,children:[a.jsxs(t0,{className:"mx-auto",children:[a.jsxs(ti,{value:"account",onClick:()=>{r("/setting/account")},className:"px-5",children:[a.jsx(CI,{size:14}),a.jsx("div",{className:"ml-1",children:s("settings.account.tab")})]}),a.jsxs(ti,{value:"password",onClick:()=>{r("/setting/password")},className:"px-5",children:[a.jsx(gI,{size:14}),a.jsx("div",{className:"ml-1",children:s("settings.password.tab")})]}),a.jsxs(ti,{value:"notify",onClick:()=>{r("/setting/notify")},className:"px-5",children:[a.jsx(wI,{size:14}),a.jsx("div",{className:"ml-1",children:s("settings.notification.tab")})]}),a.jsxs(ti,{value:"ssl-provider",onClick:()=>{r("/setting/ssl-provider")},className:"px-5",children:[a.jsx(SI,{size:14}),a.jsx("div",{className:"ml-1",children:s("settings.ca.tab")})]})]}),a.jsx(Mf,{value:t,children:a.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:a.jsx(rv,{})})})]})})]})},TW=()=>{const[e,t]=g.useState(),[n,r]=g.useState(),s=sr(),{t:o}=Ue();return g.useEffect(()=>{(async()=>{const l=await oU();t(l)})()},[]),g.useEffect(()=>{(async()=>{const c=await F2({perPage:8});r(c.items)})()},[]),a.jsxs("div",{className:"flex flex-col",children:[a.jsx("div",{className:"flex justify-between items-center",children:a.jsx("div",{className:"text-muted-foreground",children:o("dashboard.page.title")})}),a.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[a.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[a.jsx("div",{className:"p-3",children:a.jsx(kI,{size:48,strokeWidth:1,className:"text-blue-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.all")}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?a.jsx(wn,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),a.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[a.jsx("div",{className:"p-3",children:a.jsx(uI,{size:48,strokeWidth:1,className:"text-red-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.near_expired")}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?a.jsx(wn,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),a.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[a.jsx("div",{className:"p-3",children:a.jsx(xI,{size:48,strokeWidth:1,className:"text-green-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.enabled")}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?a.jsx(wn,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),a.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[a.jsx("div",{className:"p-3",children:a.jsx(lI,{size:48,strokeWidth:1,className:"text-gray-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.disabled")}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?a.jsx(wn,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]})]}),a.jsx("div",{className:"my-4",children:a.jsx("hr",{})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:o("dashboard.history")}),(n==null?void 0:n.length)==0?a.jsx(a.Fragment,{children:a.jsxs(am,{className:"max-w-[40em] mt-10",children:[a.jsx(Qx,{children:o("common.text.nodata")}),a.jsxs(lm,{children:[a.jsxs("div",{className:"flex items-center mt-5",children:[a.jsx("div",{children:a.jsx(dk,{className:"text-yellow-400",size:36})}),a.jsxs("div",{className:"ml-2",children:[" ",o("history.nodata")]})]}),a.jsx("div",{className:"mt-2 flex justify-end",children:a.jsx(Re,{onClick:()=>{s("/edit")},children:o("domain.add")})})]})]})}):a.jsxs(a.Fragment,{children:[a.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:[a.jsx("div",{className:"w-48",children:o("history.props.domain")}),a.jsx("div",{className:"w-24",children:o("history.props.status")}),a.jsx("div",{className:"w-56",children:o("history.props.stage")}),a.jsx("div",{className:"w-56 sm:ml-2 text-center",children:o("history.props.last_execution_time")}),a.jsx("div",{className:"grow",children:o("common.text.operations")})]}),n==null?void 0:n.map(i=>{var l,c;return a.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:[a.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(l=i.expand.domain)==null?void 0:l.domain.split(";").map(u=>a.jsxs(a.Fragment,{children:[u,a.jsx("br",{})]}))}),a.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(kx,{deployment:i})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(Sx,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ba(i.deployedAt)}),a.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:a.jsxs(Kv,{children:[a.jsx(Yv,{asChild:!0,children:a.jsx(Re,{variant:"link",className:"p-0",children:o("history.log")})}),a.jsxs(bh,{className:"sm:max-w-5xl",children:[a.jsx(Gv,{children:a.jsxs(Zv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,o("history.log")]})}),a.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&a.jsx(a.Fragment,{children:i.log.check.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&a.jsx(a.Fragment,{children:i.log.apply.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>a.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&a.jsx(a.Fragment,{children:i.log.deploy.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]})]})]})},PW=te.object({email:te.string().email("settings.account.email.errmsg.invalid")}),RW=()=>{var l;const{toast:e}=wr(),t=sr(),{t:n}=Ue(),[r,s]=g.useState(!1),o=Ht({resolver:Kt(PW),defaultValues:{email:(l=ot().authStore.model)==null?void 0:l.email}}),i=async c=>{var u;try{await ot().admins.update((u=ot().authStore.model)==null?void 0:u.id,{email:c.email}),ot().authStore.clear(),e({title:n("settings.account.email.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(d){const f=cs(d);e({title:n("settings.account.email.failed.message"),description:f,variant:"destructive"})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"w-full md:max-w-[35em]",children:a.jsx(Yt,{...o,children:a.jsxs("form",{onSubmit:o.handleSubmit(i),className:"space-y-8 dark:text-stone-200",children:[a.jsx(he,{control:o.control,name:"email",render:({field:c})=>a.jsxs(de,{children:[a.jsx(me,{children:n("settings.account.email.label")}),a.jsx(pe,{children:a.jsx(oe,{placeholder:n("settings.account.email.placeholder"),...c,type:"email",onChange:u=>{s(!0),o.setValue("email",u.target.value)}})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:r?a.jsx(Re,{type:"submit",children:n("common.update")}):a.jsx(Re,{type:"submit",disabled:!0,variant:"secondary",children:n("common.update")})})]})})})})};var n0="Collapsible",[AW,$2]=un(n0),[DW,r0]=AW(n0),U2=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...l}=e,[c=!1,u]=zn({prop:r,defaultProp:s,onChange:i});return a.jsx(DW,{scope:n,disabled:o,contentId:Ln(),open:c,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),children:a.jsx(Te.div,{"data-state":o0(c),"data-disabled":o?"":void 0,...l,ref:t})})});U2.displayName=n0;var V2="CollapsibleTrigger",B2=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=r0(V2,n);return a.jsx(Te.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":o0(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ge(e.onClick,s.onOpenToggle)})});B2.displayName=V2;var s0="CollapsibleContent",W2=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=r0(s0,e.__scopeCollapsible);return a.jsx(dn,{present:n||s.open,children:({present:o})=>a.jsx(OW,{...r,ref:t,present:o})})});W2.displayName=s0;var OW=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,i=r0(s0,n),[l,c]=g.useState(r),u=g.useRef(null),d=Ye(t,u),f=g.useRef(0),h=f.current,m=g.useRef(0),x=m.current,p=i.open||l,w=g.useRef(p),y=g.useRef();return g.useEffect(()=>{const v=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(v)},[]),Bt(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();f.current=b.height,m.current=b.width,w.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),c(r)}},[i.open,r]),a.jsx(Te.div,{"data-state":o0(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!p,...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:p&&s})});function o0(e){return e?"open":"closed"}var IW=U2,MW=B2,LW=W2,qs="Accordion",zW=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[i0,FW,$W]=tu(qs),[cm,P9]=un(qs,[$W,$2]),a0=$2(),H2=He.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,o=r;return a.jsx(i0.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?a.jsx(WW,{...o,ref:t}):a.jsx(BW,{...s,ref:t})})});H2.displayName=qs;var[K2,UW]=cm(qs),[Y2,VW]=cm(qs,{collapsible:!1}),BW=He.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[l,c]=zn({prop:n,defaultProp:r,onChange:s});return a.jsx(K2,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:He.useCallback(()=>o&&c(""),[o,c]),children:a.jsx(Y2,{scope:e.__scopeAccordion,collapsible:o,children:a.jsx(G2,{...i,ref:t})})})}),WW=He.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...o}=e,[i=[],l]=zn({prop:n,defaultProp:r,onChange:s}),c=He.useCallback(d=>l((f=[])=>[...f,d]),[l]),u=He.useCallback(d=>l((f=[])=>f.filter(h=>h!==d)),[l]);return a.jsx(K2,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:a.jsx(Y2,{scope:e.__scopeAccordion,collapsible:!0,children:a.jsx(G2,{...o,ref:t})})})}),[HW,um]=cm(qs),G2=He.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:o="vertical",...i}=e,l=He.useRef(null),c=Ye(l,t),u=FW(n),f=Ci(s)==="ltr",h=ge(e.onKeyDown,m=>{var R;if(!zW.includes(m.key))return;const x=m.target,p=u().filter(A=>{var O;return!((O=A.ref.current)!=null&&O.disabled)}),w=p.findIndex(A=>A.ref.current===x),y=p.length;if(w===-1)return;m.preventDefault();let v=w;const b=0,_=y-1,j=()=>{v=w+1,v>_&&(v=b)},C=()=>{v=w-1,v<b&&(v=_)};switch(m.key){case"Home":v=b;break;case"End":v=_;break;case"ArrowRight":o==="horizontal"&&(f?j():C());break;case"ArrowDown":o==="vertical"&&j();break;case"ArrowLeft":o==="horizontal"&&(f?C():j());break;case"ArrowUp":o==="vertical"&&C();break}const T=v%y;(R=p[T].ref.current)==null||R.focus()});return a.jsx(HW,{scope:n,disabled:r,direction:s,orientation:o,children:a.jsx(i0.Slot,{scope:n,children:a.jsx(Te.div,{...i,"data-orientation":o,ref:c,onKeyDown:r?void 0:h})})})}),Lf="AccordionItem",[KW,l0]=cm(Lf),Z2=He.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...s}=e,o=um(Lf,n),i=UW(Lf,n),l=a0(n),c=Ln(),u=r&&i.value.includes(r)||!1,d=o.disabled||e.disabled;return a.jsx(KW,{scope:n,open:u,disabled:d,triggerId:c,children:a.jsx(IW,{"data-orientation":o.orientation,"data-state":tP(u),...l,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?i.onItemOpen(r):i.onItemClose(r)}})})});Z2.displayName=Lf;var q2="AccordionHeader",X2=He.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(qs,n),o=l0(q2,n);return a.jsx(Te.h3,{"data-orientation":s.orientation,"data-state":tP(o.open),"data-disabled":o.disabled?"":void 0,...r,ref:t})});X2.displayName=q2;var ny="AccordionTrigger",Q2=He.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(qs,n),o=l0(ny,n),i=VW(ny,n),l=a0(n);return a.jsx(i0.ItemSlot,{scope:n,children:a.jsx(MW,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...l,...r,ref:t})})});Q2.displayName=ny;var J2="AccordionContent",eP=He.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(qs,n),o=l0(J2,n),i=a0(n);return a.jsx(LW,{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}})});eP.displayName=J2;function tP(e){return e?"open":"closed"}var YW=H2,GW=Z2,ZW=X2,nP=Q2,rP=eP;const i_=YW,Xi=g.forwardRef(({className:e,...t},n)=>a.jsx(GW,{ref:n,className:se("border-b",e),...t}));Xi.displayName="AccordionItem";const Qi=g.forwardRef(({className:e,children:t,...n},r)=>a.jsx(ZW,{className:"flex",children:a.jsxs(nP,{ref:r,className:se("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,a.jsx(ov,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Qi.displayName=nP.displayName;const Ji=g.forwardRef(({className:e,children:t,...n},r)=>a.jsx(rP,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:a.jsx("div",{className:se("pb-4 pt-0",e),children:t})}));Ji.displayName=rP.displayName;const qW=(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}},sP=g.createContext({}),dm=()=>g.useContext(sP),XW=({children:e})=>{const[t,n]=g.useReducer(qW,{});g.useEffect(()=>{(async()=>{const i=await xx("notifyChannels");n({type:"SET_CHANNELS",payload:i})})()},[]);const r=g.useCallback(o=>{n({type:"SET_CHANNEL",payload:o})},[]),s=g.useCallback(o=>{n({type:"SET_CHANNELS",payload:o})},[]);return a.jsx(sP.Provider,{value:{config:t,setChannel:r,setChannels:s},children:e})},QW=()=>{const{config:e,setChannels:t}=dm(),{t:n}=Ue(),[r,s]=g.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});g.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}=wr(),i=async()=>{try{const l=await Ri({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...r.data}}});t(l),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(l){const c=cs(l);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(oe,{placeholder:"AccessToken",value:r.data.accessToken,onChange:l=>{s({...r,data:{...r.data,accessToken:l.target.value}})}}),a.jsx(oe,{placeholder:n("settings.notification.dingtalk.secret.placeholder"),className:"mt-2",value:r.data.secret,onChange:l=>{s({...r,data:{...r.data,secret:l.target.value}})}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(dl,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),a.jsx(_t,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(Re,{onClick:()=>{i()},children:n("common.save")})})]})},JW=()=>{const{config:e,setChannels:t}=dm(),{t:n}=Ue(),[r,s]=g.useState({id:e.id??"",name:"notifyChannels",data:{webhookUrl:"",enabled:!1}});g.useEffect(()=>{const c=(()=>{const u={webhookUrl:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.lark?d.lark:u})();s({id:e.id??"",name:"lark",data:c})},[e]);const{toast:o}=wr(),i=async()=>{try{const l=await Ri({...e,name:"notifyChannels",content:{...e.content,lark:{...r.data}}});t(l),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(l){const c=cs(l);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(oe,{placeholder:"Webhook Url",value:r.data.webhookUrl,onChange:l=>{s({...r,data:{...r.data,webhookUrl:l.target.value}})}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(dl,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),a.jsx(_t,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(Re,{onClick:()=>{i()},children:n("common.save")})})]})},eH={title:"您有 {COUNT} 张证书即将过期",content:"有 {COUNT} 张证书即将过期,域名分别为 {DOMAINS},请保持关注!"},tH=()=>{const[e,t]=g.useState(""),[n,r]=g.useState([eH]),{toast:s}=wr(),{t:o}=Ue();g.useEffect(()=>{(async()=>{const d=await xx("templates");d.content&&(r(d.content.notifyTemplates),t(d.id?d.id:""))})()},[]);const i=u=>{const d=n[0];r([{...d,title:u}])},l=u=>{const d=n[0];r([{...d,content:u}])},c=async()=>{const u=await Ri({id:e,content:{notifyTemplates:n},name:"templates"});u.id&&t(u.id),s({title:o("common.save.succeeded.message"),description:o("settings.notification.template.saved.message")})};return a.jsxs("div",{children:[a.jsx(oe,{value:n[0].title,onChange:u=>{i(u.target.value)}}),a.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.title")}),a.jsx(Of,{className:"mt-2",value:n[0].content,onChange:u=>{l(u.target.value)}}),a.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.content")}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(Re,{onClick:c,children:o("common.save")})})]})},nH=()=>{const{config:e,setChannels:t}=dm(),{t:n}=Ue(),[r,s]=g.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});g.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:"common.provider.telegram",data:c})},[e]);const{toast:o}=wr(),i=async()=>{try{const l=await Ri({...e,name:"notifyChannels",content:{...e.content,telegram:{...r.data}}});t(l),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(l){const c=cs(l);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(oe,{placeholder:"ApiToken",value:r.data.apiToken,onChange:l=>{s({...r,data:{...r.data,apiToken:l.target.value}})}}),a.jsx(oe,{placeholder:"ChatId",value:r.data.chatId,onChange:l=>{s({...r,data:{...r.data,chatId:l.target.value}})}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(dl,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),a.jsx(_t,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(Re,{onClick:()=>{i()},children:n("common.save")})})]})};function rH(e){try{return new URL(e),!0}catch{return!1}}const sH=()=>{const{config:e,setChannels:t}=dm(),{t:n}=Ue(),[r,s]=g.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});g.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}=wr(),i=async()=>{try{if(r.data.url=r.data.url.trim(),!rH(r.data.url)){o({title:n("common.save.failed.message"),description:n("settings.notification.url.errmsg.invalid"),variant:"destructive"});return}const l=await Ri({...e,name:"notifyChannels",content:{...e.content,webhook:{...r.data}}});t(l),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(l){const c=cs(l);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(oe,{placeholder:"Url",value:r.data.url,onChange:l=>{s({...r,data:{...r.data,url:l.target.value}})}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(dl,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),a.jsx(_t,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(Re,{onClick:()=>{i()},children:n("common.save")})})]})},oH=()=>{const{t:e}=Ue();return a.jsx(a.Fragment,{children:a.jsxs(XW,{children:[a.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:a.jsx(i_,{type:"multiple",className:"dark:text-stone-200",children:a.jsxs(Xi,{value:"item-1",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("settings.notification.template.label")}),a.jsx(Ji,{children:a.jsx(tH,{})})]})})}),a.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:a.jsxs(i_,{type:"single",className:"dark:text-stone-200",children:[a.jsxs(Xi,{value:"item-2",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("common.provider.dingtalk")}),a.jsx(Ji,{children:a.jsx(QW,{})})]}),a.jsxs(Xi,{value:"item-3",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("common.provider.lark")}),a.jsx(Ji,{children:a.jsx(JW,{})})]}),a.jsxs(Xi,{value:"item-4",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("common.provider.telegram")}),a.jsx(Ji,{children:a.jsx(nH,{})})]}),a.jsxs(Xi,{value:"item-5",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("common.provider.webhook")}),a.jsx(Ji,{children:a.jsx(sH,{})})]})]})})]})})};var c0="Radio",[iH,oP]=un(c0),[aH,lH]=iH(c0),iP=g.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:i,value:l="on",onCheck:c,...u}=e,[d,f]=g.useState(null),h=Ye(t,p=>f(p)),m=g.useRef(!1),x=d?!!d.closest("form"):!0;return a.jsxs(aH,{scope:n,checked:s,disabled:i,children:[a.jsx(Te.button,{type:"button",role:"radio","aria-checked":s,"data-state":cP(s),"data-disabled":i?"":void 0,disabled:i,value:l,...u,ref:h,onClick:ge(e.onClick,p=>{s||c==null||c(),x&&(m.current=p.isPropagationStopped(),m.current||p.stopPropagation())})}),x&&a.jsx(cH,{control:d,bubbles:!m.current,name:r,value:l,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});iP.displayName=c0;var aP="RadioIndicator",lP=g.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=lH(aP,n);return a.jsx(dn,{present:r||o.checked,children:a.jsx(Te.span,{"data-state":cP(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});lP.displayName=aP;var cH=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=g.useRef(null),i=Ex(n),l=xv(t);return g.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]),a.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function cP(e){return e?"checked":"unchecked"}var uH=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],u0="RadioGroup",[dH,R9]=un(u0,[al,oP]),uP=al(),dP=oP(),[fH,hH]=dH(u0),fP=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,m=uP(n),x=Ci(u),[p,w]=zn({prop:o,defaultProp:s,onChange:f});return a.jsx(fH,{scope:n,name:r,required:i,disabled:l,value:p,onValueChange:w,children:a.jsx(Cv,{asChild:!0,...m,orientation:c,dir:x,loop:d,children:a.jsx(Te.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:x,...h,ref:t})})})});fP.displayName=u0;var hP="RadioGroupItem",mP=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=hH(hP,n),i=o.disabled||r,l=uP(n),c=dP(n),u=g.useRef(null),d=Ye(t,u),f=o.value===s.value,h=g.useRef(!1);return g.useEffect(()=>{const m=p=>{uH.includes(p.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",x)}},[]),a.jsx(Ev,{asChild:!0,...l,focusable:!i,active:f,children:a.jsx(iP,{disabled:i,required:o.required,checked:f,...c,...s,name:o.name,ref:d,onCheck:()=>o.onValueChange(s.value),onKeyDown:ge(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:ge(s.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});mP.displayName=hP;var mH="RadioGroupIndicator",pP=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=dP(n);return a.jsx(lP,{...s,...r,ref:t})});pP.displayName=mH;var gP=fP,yP=mP,pH=pP;const vP=g.forwardRef(({className:e,...t},n)=>a.jsx(gP,{className:se("grid gap-2",e),...t,ref:n}));vP.displayName=gP.displayName;const ry=g.forwardRef(({className:e,...t},n)=>a.jsx(yP,{ref:n,className:se("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(pH,{className:"flex items-center justify-center",children:a.jsx(uk,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ry.displayName=yP.displayName;const gH=()=>{const{t:e}=Ue(),t=te.object({provider:te.enum(["letsencrypt","zerossl"],{message:e("settings.ca.provider.errmsg.empty")}),eabKid:te.string().optional(),eabHmacKey:te.string().optional()}),n=Ht({resolver:Kt(t),defaultValues:{provider:"letsencrypt"}}),[r,s]=g.useState("letsencrypt"),[o,i]=g.useState(),{toast:l}=wr();g.useEffect(()=>{(async()=>{const f=await xx("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("settings.ca.eab_kid_hmac_key.errmsg.empty")}),d.eabHmacKey||n.setError("eabHmacKey",{message:e("settings.ca.eab_kid_hmac_key.errmsg.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 Ri(f),l({title:e("common.update.succeeded.message"),description:e("common.update.succeeded.message")})}catch(h){const m=cs(h);l({title:e("common.update.failed.message"),description:m,variant:"destructive"})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"w-full md:max-w-[35em]",children:a.jsx(Yt,{...n,children:a.jsxs("form",{onSubmit:n.handleSubmit(u),className:"space-y-8 dark:text-stone-200",children:[a.jsx(he,{control:n.control,name:"provider",render:({field:d})=>a.jsxs(de,{children:[a.jsx(me,{children:e("common.text.ca")}),a.jsx(pe,{children:a.jsxs(vP,{...d,className:"flex",onValueChange:f=>{s(f),n.setValue("provider",f)},value:r,children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(ry,{value:"letsencrypt",id:"letsencrypt"}),a.jsx(_t,{htmlFor:"letsencrypt",children:a.jsxs("div",{className:se("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("letsencrypt")),children:[a.jsx("img",{src:"/imgs/providers/letsencrypt.svg",className:"h-6"}),a.jsx("div",{children:"Let's Encrypt"})]})})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(ry,{value:"zerossl",id:"zerossl"}),a.jsx(_t,{htmlFor:"zerossl",children:a.jsxs("div",{className:se("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("zerossl")),children:[a.jsx("img",{src:"/imgs/providers/zerossl.svg",className:"h-6"}),a.jsx("div",{children:"ZeroSSL"})]})})]})]})}),a.jsx(he,{control:n.control,name:"eabKid",render:({field:f})=>a.jsxs(de,{hidden:r!=="zerossl",children:[a.jsx(me,{children:"EAB_KID"}),a.jsx(pe,{children:a.jsx(oe,{placeholder:e("settings.ca.eab_kid.errmsg.empty"),...f,type:"text"})}),a.jsx(le,{})]})}),a.jsx(he,{control:n.control,name:"eabHmacKey",render:({field:f})=>a.jsxs(de,{hidden:r!=="zerossl",children:[a.jsx(me,{children:"EAB_HMAC_KEY"}),a.jsx(pe,{children:a.jsx(oe,{placeholder:e("settings.ca.eab_hmac_key.errmsg.empty"),...f,type:"text"})}),a.jsx(le,{})]})}),a.jsx(le,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Re,{type:"submit",children:e("common.update")})})]})})})})},yH=wO([{path:"/",element:a.jsx(B8,{}),children:[{path:"/",element:a.jsx(TW,{})},{path:"/domains",element:a.jsx(uU,{})},{path:"/edit",element:a.jsx(gW,{})},{path:"/access",element:a.jsx(bW,{})},{path:"/history",element:a.jsx(_W,{})},{path:"/setting",element:a.jsx(NW,{}),children:[{path:"/setting/password",element:a.jsx(EW,{})},{path:"/setting/account",element:a.jsx(RW,{})},{path:"/setting/notify",element:a.jsx(oH,{})},{path:"/setting/ssl-provider",element:a.jsx(gH,{})}]}]},{path:"/login",element:a.jsx(jW,{}),children:[{path:"/login",element:a.jsx(kW,{})}]},{path:"/about",element:a.jsx("div",{children:"About"})}]),vH={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 zf{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||vH,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 zf(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new zf(this.logger,t)}}var es=new zf;class fm{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[l,c]=i;for(let u=0;u<c;u++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[l,c]=i;for(let u=0;u<c;u++)l.apply(l,[t,...r])})}}const Al=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},a_=e=>e==null?"":""+e,xH=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},wH=/###/g,l_=e=>e&&e.indexOf("###")>-1?e.replace(wH,"."):e,c_=e=>!e||typeof e=="string",rc=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let s=0;for(;s<r.length-1;){if(c_(e))return{};const o=l_(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return c_(e)?{}:{obj:e,k:l_(r[s])}},u_=(e,t,n)=>{const{obj:r,k:s}=rc(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),l=rc(e,i,Object);for(;l.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),l=rc(e,i,Object),l&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},bH=(e,t,n,r)=>{const{obj:s,k:o}=rc(e,t,Object);s[o]=s[o]||[],s[o].push(n)},Ff=(e,t)=>{const{obj:n,k:r}=rc(e,t);if(n)return n[r]},_H=(e,t,n)=>{const r=Ff(e,n);return r!==void 0?r:Ff(t,n)},xP=(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]):xP(e[r],t[r],n):e[r]=t[r]);return e},Yi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var SH={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const kH=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>SH[t]):e;class jH{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 CH=[" ",",","?","!",";"],EH=new jH(20),NH=(e,t,n)=>{t=t||"",n=n||"";const r=CH.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=EH.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},sy=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,l="";for(let c=o;c<r.length;++c)if(c!==o&&(l+=n),l+=r[c],i=s[l],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},$f=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class d_ extends fm{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 l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):typeof r=="string"&&o?l.push(...r.split(o)):l.push(r)));const c=Ff(this.data,l);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),c||!i||typeof r!="string"?c:sy(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 l=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),s=n,n=l[1]),this.addNamespaces(n),u_(this.data,l,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},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),s=r,r=n,n=l[1]),this.addNamespaces(n);let c=Ff(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?xP(c,r,o):c={...c,...r},u_(this.data,l,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 wP={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 f_={};class Uf extends fm{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),xH(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=es.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,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!NH(t,r,s);if(i&&!l){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:l}=this.extractFromKey(t[t.length-1],n),c=l[l.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 m=f&&f.usedKey||i,x=f&&f.exactUsedKey||i,p=Object.prototype.toString.apply(h),w=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&w.indexOf(p)<0&&!(typeof y=="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(m,h,{...n,ns:l}):`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),j=_?[]:{},C=_?x:m;for(const T in h)if(Object.prototype.hasOwnProperty.call(h,T)){const R=`${C}${o}${T}`;j[T]=this.translate(R,{...n,joinArrays:!1,ns:l}),j[T]===R&&(j[T]=h[T])}h=j}}else if(v&&typeof y=="string"&&Array.isArray(h))h=h.join(y),h&&(h=this.extendTranslation(h,t,n,r));else{let _=!1,j=!1;const C=n.count!==void 0&&typeof n.count!="string",T=Uf.hasDefaultValue(n),R=C?this.pluralResolver.getSuffix(u,n.count,n):"",A=n.ordinal&&C?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",O=C&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),G=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(h)&&T&&(_=!0,h=G),this.isValidLookup(h)||(j=!0,h=i);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:h,S=T&&G!==h&&this.options.updateMissing;if(j||_||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 F=(W,I,X)=>{const $=T&&X!==h?X:z;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&&C?U.forEach(W=>{const I=this.pluralResolver.getSuffixes(W,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(X=>{F([W],i+X,n[`defaultValue${X}`]||G)})}):F(U,i,G))}h=this.extendTranslation(h,t,n,f,r),j&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${i}`),(j||_)&&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),m=h&&h.length;d<m&&(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,m=new Array(h),x=0;x<h;x++)m[x]=arguments[x];return o&&o[0]===m[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):i.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,c=typeof l=="string"?[l]:l;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=wP.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,l;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",m=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),x=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",p=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{this.isValidLookup(r)||(l=w,!f_[`${p[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(f_[`${p[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${l}" 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!!!")),p.forEach(y=>{if(this.isValidLookup(r))return;i=y;const v=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,d,y,w,n);else{let _;h&&(_=this.pluralResolver.getSuffix(y,n.count,n));const j=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(v.push(d+_),n.ordinal&&_.indexOf(C)===0&&v.push(d+_.replace(C,this.options.pluralSeparator)),m&&v.push(d+j)),x){const T=`${d}${this.options.contextSeparator}${n.context}`;v.push(T),h&&(v.push(T+_),n.ordinal&&_.indexOf(C)===0&&v.push(T+_.replace(C,this.options.pluralSeparator)),m&&v.push(T+j))}}let b;for(;b=v.pop();)this.isValidLookup(r)||(o=b,r=this.getResource(y,w,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:l}}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 yp=e=>e.charAt(0).toUpperCase()+e.slice(1);class h_{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=es.create("languageUtils")}getScriptPartFromCode(t){if(t=$f(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=$f(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]=yp(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]=yp(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=yp(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 TH=[{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}],PH={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 RH=["v1","v2","v3"],AH=["v4"],m_={zero:0,one:1,two:2,few:3,many:4,other:5},DH=()=>{const e={};return TH.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:PH[t.fc]}})}),e};class OH{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=es.create("pluralResolver"),(!this.options.compatibilityJSON||AH.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=DH(),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=$f(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)=>m_[s]-m_[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!RH.includes(this.options.compatibilityJSON)}}const p_=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=_H(e,t,n);return!o&&s&&typeof n=="string"&&(o=sy(e,n,r),o===void 0&&(o=sy(t,n,r))),o},vp=e=>e.replace(/\$/g,"$$$$");class IH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=es.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:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:x,nestingSuffixEscaped:p,nestingOptionsSeparator:w,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:kH,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Yi(o):i||"{{",this.suffix=l?Yi(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=h?Yi(h):m||Yi("$t("),this.nestingSuffix=x?Yi(x):p||Yi(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!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,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const y=p_(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...s,...n,interpolationkey:m}):y}const x=m.split(this.formatSeparator),p=x.shift().trim(),w=x.join(this.formatSeparator).trim();return this.format(p_(n,c,p,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...n,interpolationkey:p})};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:m=>vp(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?vp(this.escape(m)):vp(m)}].forEach(m=>{for(l=0;o=m.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=a_(i));const p=m.safeValue(i);if(t=t.replace(o[0],p),f?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const l=(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 m=h.match(/'/g),x=h.match(/"/g);(m&&m.length%2===0&&!x||x.length%2!==0)&&(h=h.replace(/'/g,'"'));try{i=JSON.parse(h),u&&(i={...u,...i})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,p),`${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(l.call(this,s[1].trim(),i),i),o&&s[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=a_(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 MH=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[l,...c]=i.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=l.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}},Gi=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 l=t[i];return l||(l=e($f(r),s),t[i]=l),l(n)}};class LH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=es.create("formatter"),this.options=t,this.formats={number:Gi((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Gi((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Gi((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Gi((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Gi((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()]=Gi(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(l=>l.indexOf(")")>-1)){const l=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,c)=>{const{formatName:u,formatOptions:d}=MH(c);if(this.formats[u]){let f=l;try{const h=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](l,m,{...d,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const zH=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class FH extends fm{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=es.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={},l={},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||(l[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(l),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 l={};this.queue.forEach(c=>{bH(c.loaded,[o],i),zH(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),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 l=(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=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,n,l)}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,l)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=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=>l(null,f)).catch(l):l(null,d)}catch(d){l(d)}else u(t,n,r,s,l,c)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const g_=()=>({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}}),y_=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),sd=()=>{},$H=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Gc extends fm{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=y_(t),this.services={},this.logger=es,this.modules={external:[]},$H(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=g_();this.options={...s,...this.options,...y_(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?es.init(o(this.modules.logger),this.options):es.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=LH);const f=new h_(this.options);this.store=new d_(this.options.resources,this.options);const h=this.services;h.logger=es,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new OH(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 IH(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new FH(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(m){for(var x=arguments.length,p=new Array(x>1?x-1:0),w=1;w<x;w++)p[w-1]=arguments[w];t.emit(m,...p)}),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 Uf(this.services,this.options),this.translator.on("*",function(m){for(var x=arguments.length,p=new Array(x>1?x-1:0),w=1;w<x;w++)p[w-1]=arguments[w];t.emit(m,...p)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=sd),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=Al(),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]:sd;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=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).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(l=>i(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=Al();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=sd),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"&&wP.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=Al();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)})},l=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?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),s}getFixedT(t,n,r){var s=this;const o=function(i,l){let c;if(typeof l!="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,l].concat(d))}else c={...l};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 m;return c.keyPrefix&&Array.isArray(i)?m=i.map(x=>`${c.keyPrefix}${h}${x}`):m=c.keyPrefix?`${c.keyPrefix}${h}${i}`:i,s.t(m,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=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}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=Al();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=Al();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 h_(g_());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 Gc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sd;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Gc(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new d_(this.store.data,s),o.services.resourceStore=o.store),o.translator=new Uf(o.services,s),o.translator.on("*",function(l){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(l,...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 vn=Gc.createInstance();vn.createInstance=Gc.createInstance;vn.createInstance;vn.dir;vn.init;vn.loadResources;vn.reloadResources;vn.use;vn.changeLanguage;vn.getFixedT;vn.t;vn.exists;vn.setDefaultNamespace;vn.hasLoadedNamespace;vn.loadNamespaces;vn.loadLanguages;const{slice:UH,forEach:VH}=[];function BH(e){return VH.call(UH.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const v_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,WH=(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(!v_.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!v_.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},x_={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=WH(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 HH={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return x_.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&x_.create(n,e,r,s,o)}},KH={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 l=0;l<i.length;l++){const c=i[l].indexOf("=");c>0&&i[l].substring(0,c)===t&&(n=i[l].substring(c+1))}}return n}};let Dl=null;const w_=()=>{if(Dl!==null)return Dl;try{Dl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Dl=!1}return Dl};var YH={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&w_())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&w_()&&window.localStorage.setItem(n,e)}};let Ol=null;const b_=()=>{if(Ol!==null)return Ol;try{Ol=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ol=!1}return Ol};var GH={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&b_())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&b_()&&window.sessionStorage.setItem(n,e)}},ZH={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}},qH={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}},XH={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}},QH={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 JH(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class bP{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=BH(n,this.options||{},JH()),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(HH),this.addDetector(KH),this.addDetector(YH),this.addDetector(GH),this.addDetector(ZH),this.addDetector(qH),this.addDetector(XH),this.addDetector(QH)}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)}))}}bP.type="languageDetector";const e9={"common.add":"新增","common.save":"保存","common.save.succeeded.message":"保存成功","common.save.failed.message":"保存失败","common.edit":"编辑","common.copy":"复制","common.download":"下载","common.delete":"刪除","common.delete.succeeded.message":"删除成功","common.delete.failed.message":"删除失败","common.next":"下一步","common.confirm":"确认","common.cancel":"取消","common.submit":"提交","common.update":"更新","common.update.succeeded.message":"修改成功","common.update.failed.message":"修改失败","common.text.domain":"域名","common.text.domain.empty":"无域名","common.text.ip":"IP 地址","common.text.ip.empty":"无 IP 地址","common.text.dns":"DNS域名服务器","common.text.dns.empty":"无 DNS 地址","common.text.ca":"CA证书颁发机构","common.text.name":"名称","common.text.provider":"服务商","common.text.created_at":"创建时间","common.text.updated_at":"更新时间","common.text.operations":"操作","common.text.nodata":"暂无数据","common.menu.settings":"系统设置","common.menu.logout":"退出登录","common.menu.document":"文档","common.pagination.next":"下一页","common.pagination.prev":"上一页","common.pagination.more":"更多","common.theme.light":"浅色","common.theme.dark":"暗黑","common.theme.system":"跟随系统","common.errmsg.string_max":"请输入不超过 {{max}} 个字符","common.errmsg.email_empty":"请输入邮箱","common.errmsg.email_invalid":"请输入正确的邮箱","common.errmsg.email_duplicate":"邮箱已存在","common.errmsg.domain_invalid":"请输入正确的域名","common.errmsg.host_invalid":"请输入正确的域名或 IP 地址","common.errmsg.ip_invalid":"请输入正确的 IP 地址","common.errmsg.url_invalid":"请输入正确的 URL","common.provider.tencent":"腾讯云","common.provider.tencent.cdn":"腾讯云 - CDN","common.provider.aliyun":"阿里云","common.provider.aliyun.oss":"阿里云 - OSS","common.provider.aliyun.cdn":"阿里云 - CDN","common.provider.aliyun.dcdn":"阿里云 - DCDN","common.provider.huaweicloud":"华为云","common.provider.qiniu":"七牛云","common.provider.qiniu.cdn":"七牛云 - CDN","common.provider.aws":"AWS","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.pdns":"PowerDNS","common.provider.httpreq":"HTTP 请求","common.provider.local":"本地部署","common.provider.ssh":"SSH 部署","common.provider.webhook":"Webhook","common.provider.kubernetes":"Kubernetes","common.provider.kubernetes.secret":"Kubernetes - Secret","common.provider.dingtalk":"钉钉","common.provider.telegram":"Telegram","common.provider.lark":"飞书"},t9={"login.username.label":"用户名","login.username.placeholder":"请输入用户名/邮箱","login.username.errmsg.invalid":"请输入正确的用户名/邮箱","login.password.label":"密码","login.password.placeholder":"请输入密码","login.password.errmsg.invalid":"密码至少 10 个字符","login.submit":"登录"},n9={"dashboard.page.title":"仪表盘","dashboard.statistics.all":"所有","dashboard.statistics.near_expired":"即将过期","dashboard.statistics.enabled":"启用中","dashboard.statistics.disabled":"未启用","dashboard.statistics.unit":"个","dashboard.history":"最近部署"},r9={"settings.page.title":"系统设置","settings.account.relogin.message":"请重新登录","settings.account.tab":"账号","settings.account.email.label":"登录邮箱","settings.account.email.errmsg.invalid":"请输入正确的邮箱地址","settings.account.email.placeholder":"请输入邮箱","settings.account.email.changed.message":"修改账户邮箱成功","settings.account.email.failed.message":"修改账户邮箱失败","settings.password.tab":"密码","settings.password.password.errmsg.length":"密码至少10个字符","settings.password.password.errmsg.not_matched":"两次密码不一致","settings.password.current_password.label":"当前密码","settings.password.current_password.placeholder":"请输入旧密码","settings.password.new_password.label":"新密码","settings.password.new_password.placeholder":"请输入新密码","settings.password.confirm_password.label":"确认密码","settings.password.confirm_password.placeholder":"请再次输入新密码","settings.password.changed.message":"修改密码成功","settings.password.failed.message":"修改密码失败","settings.notification.tab":"消息推送","settings.notification.template.label":"内容模板","settings.notification.template.saved.message":"通知模板保存成功","settings.notification.template.variables.tips.title":"可选的变量({COUNT}: 即将过期张数)","settings.notification.template.variables.tips.content":"可选的变量({COUNT}: 即将过期张数;{DOMAINS}: 域名列表)","settings.notification.config.enable":"是否启用","settings.notification.config.saved.message":"配置保存成功","settings.notification.config.failed.message":"配置保存失败","settings.notification.dingtalk.secret.placeholder":"加签的签名","settings.notification.url.errmsg.invalid":"URL 格式不正确","settings.ca.tab":"证书颁发机构CA","settings.ca.provider.errmsg.empty":"请选择证书分发机构","settings.ca.eab_kid.errmsg.empty":"请输入EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"请输入EAB_HMAC_KEY","settings.ca.eab_kid_hmac_key.errmsg.empty":"请输入EAB_KID和EAB_HMAC_KEY"},s9={"domain.page.title":"域名列表","domain.nodata":"请添加域名开始部署证书吧。","domain.add":"新增域名","domain.edit":"编辑域名","domain.delete":"删除域名","domain.delete.confirm":"确定要删除域名吗?","domain.history":"部署历史","domain.deploy":"立即部署","domain.deploy.started.message":"开始部署","domain.deploy.started.tips":"已发起部署,请稍后查看部署日志。","domain.deploy.failed.message":"执行失败","domain.deploy.failed.tips":"执行失败,请在 <1>部署历史</1> 查看详情。","domain.deploy_forced":"强行部署","domain.props.expiry":"有效期限","domain.props.expiry.date1":"有效期 {{date}} 天","domain.props.expiry.date2":"{{date}} 到期","domain.props.last_execution_status":"最近执行状态","domain.props.last_execution_stage":"最近执行阶段","domain.props.last_execution_time":"最近执行时间","domain.props.enable":"是否启用","domain.props.enable.enabled":"启用","domain.props.enable.disabled":"禁用","domain.application.tab":"申请配置","domain.application.form.domain.added.message":"域名添加成功","domain.application.form.domain.changed.message":"域名编辑成功","domain.application.form.email.label":"邮箱","domain.application.form.email.tips":"(申请证书需要提供邮箱)","domain.application.form.email.placeholder":"请选择邮箱","domain.application.form.email.add":"添加邮箱","domain.application.form.email.list":"邮箱列表","domain.application.form.access.label":"DNS 服务商授权配置","domain.application.form.access.placeholder":"请选择 DNS 服务商授权配置","domain.application.form.access.list":"已有的 DNS 服务商授权配置","domain.application.form.advanced_settings.label":"高级设置","domain.application.form.key_algorithm.label":"数字证书算法","domain.application.form.key_algorithm.placeholder":"请选择数字证书算法","domain.application.form.timeout.label":"DNS 传播检查超时时间(单位:秒)","domain.application.form.timeoue.placeholder":"请输入 DNS 传播检查超时时间","domain.application.unsaved.message":"请先保存申请配置","domain.deployment.tab":"部署配置","domain.deployment.nodata":"暂无部署配置,请添加后开始部署证书吧","domain.deployment.form.type.label":"部署方式","domain.deployment.form.type.placeholder":"请选择部署方式","domain.deployment.form.type.list":"支持的部署方式","domain.deployment.form.access.label":"授权配置","domain.deployment.form.access.placeholder":"请选择授权配置","domain.deployment.form.access.list":"已有的服务商授权配置","domain.deployment.form.domain.label":"部署到域名(仅支持单个域名;不支持泛域名)","domain.deployment.form.domain.placeholder":"请输入部署到的域名","domain.deployment.form.ssh_key_path.label":"私钥保存路径","domain.deployment.form.ssh_key_path.placeholder":"请输入私钥保存路径","domain.deployment.form.ssh_cert_path.label":"证书保存路径","domain.deployment.form.ssh_cert_path.placeholder":"请输入证书保存路径","domain.deployment.form.ssh_pre_command.label":"前置命令","domain.deployment.form.ssh_pre_command.placeholder":"在部署证书前执行的命令","domain.deployment.form.ssh_command.label":"命令","domain.deployment.form.ssh_command.placeholder":"请输入要执行的命令","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_endpoint.placeholder":"请输入 Endpoint","domain.deployment.form.oss_bucket.label":"存储桶","domain.deployment.form.oss_bucket.placeholder":"请输入存储桶名","domain.deployment.form.k8s_namespace.label":"命名空间","domain.deployment.form.k8s_namespace.placeholder":"请输入 K8S 命名空间","domain.deployment.form.k8s_secret_name.label":"Secret 名称","domain.deployment.form.k8s_secret_name.placeholder":"请输入 K8S Secret 名称","domain.deployment.form.k8s_secret_data_key_for_key.label":"Secret 数据键(用于存放公钥的 Key","domain.deployment.form.k8s_secret_data_key_for_key.placeholder":"请输入 K8S Secret 中用于存放公钥的数据键","domain.deployment.form.k8s_secret_data_key_for_crt.label":"Secret 数据键(用于存放证书的 Key","domain.deployment.form.k8s_secret_data_key_for_crt.placeholder":"请输入 K8S Secret 中用于存放证书的数据键","domain.deployment.form.variables.label":"变量","domain.deployment.form.variables.key":"变量名","domain.deployment.form.variables.value":"值","domain.deployment.form.variables.empty":"尚未添加变量","domain.deployment.form.variables.key.required":"变量名不能为空","domain.deployment.form.variables.value.required":"变量值不能为空","domain.deployment.form.variables.key.placeholder":"请输入变量名","domain.deployment.form.variables.value.placeholder":"请输入变量值"},o9={"access.page.title":"授权管理","access.authorization.tab":"授权","access.authorization.nodata":"请添加授权开始部署证书吧。","access.authorization.add":"新增授权","access.authorization.edit":"编辑授权","access.authorization.copy":"复制授权","access.authorization.delete":"删除授权","access.authorization.delete.confirm":"确定要删除授权吗?","access.authorization.form.type.label":"服务商","access.authorization.form.type.placeholder":"请选择服务商","access.authorization.form.type.list":"服务商列表","access.authorization.form.name.label":"名称","access.authorization.form.name.placeholder":"请输入授权名称","access.authorization.form.config.label":"配置类型","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"请输入区域","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"请输入 AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"请输入 AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"请输入 AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"请输入 SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"请输入 SecretKey","access.authorization.form.secret_access_key.label":"SecretAccessKey","access.authorization.form.secret_access_key.placeholder":"请输入 SecretAccessKey","access.authorization.form.aws_hosted_zone_id.label":"AWS 托管区域 ID","access.authorization.form.aws_hosted_zone_id.placeholder":"请输入 AWS Hosted Zone ID","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"请输入 CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"请输入 GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"请输入 GO_DADDY_API_SECRET","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.pdns_api_url.label":"PDNS_API_URL","access.authorization.form.pdns_api_url.placeholder":"请输入 PDNS_API_URL","access.authorization.form.pdns_api_key.label":"PDNS_API_KEY","access.authorization.form.pdns_api_key.placeholder":"请输入 PDNS_API_KEY","access.authorization.form.httpreq_endpoint.label":"HTTPREQ_ENDPOINT","access.authorization.form.httpreq_endpoint.placeholder":"请输入 HTTPREQ_ENDPOINT","access.authorization.form.httpreq_mode.label":"HTTPREQ_MODE","access.authorization.form.httpreq_mode.placeholder":"请输入 HTTPREQ_MODE(RAW or '')","access.authorization.form.namesilo_api_key.placeholder":"请输入 NAMESILO_API_KEY","access.authorization.form.username.label":"用户名","access.authorization.form.username.placeholder":"请输入用户名","access.authorization.form.password.label":"密码","access.authorization.form.password.placeholder":"请输入密码","access.authorization.form.access_group.placeholder":"请选择分组","access.authorization.form.ssh_group.label":"授权配置组(用于将一个域名证书部署到多个 SSH 主机)","access.authorization.form.ssh_host.label":"服务器 Host","access.authorization.form.ssh_host.placeholder":"请输入 Host","access.authorization.form.ssh_port.label":"SSH 端口","access.authorization.form.ssh_port.placeholder":"请输入 Port","access.authorization.form.ssh_username.label":"用户名","access.authorization.form.ssh_username.placeholder":"请输入用户名","access.authorization.form.ssh_password.label":"密码(使用密码登录)","access.authorization.form.ssh_password.placeholder":"请输入密码","access.authorization.form.ssh_key.label":"Key使用私钥登录","access.authorization.form.ssh_key.placeholder":"请输入 Key","access.authorization.form.ssh_key_file.placeholder":"请选择文件","access.authorization.form.ssh_key_passphrase.label":"Key 口令(使用私钥登录)","access.authorization.form.ssh_key_passphrase.placeholder":"请输入 Key 口令","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"请输入 Webhook URL","access.authorization.form.k8s_kubeconfig.label":"KubeConfig","access.authorization.form.k8s_kubeconfig.placeholder":"请输入 KubeConfig","access.authorization.form.k8s_kubeconfig_file.placeholder":"请选择文件","access.group.tab":"授权组","access.group.nodata":"暂无部署授权配置,请添加后开始使用吧","access.group.total":"共有 {{total}} 个部署授权配置","access.group.add":"添加授权组","access.group.delete":"删除组","access.group.delete.confirm":"确定要删除部署授权组吗?","access.group.form.name.label":"组名","access.group.form.name.errmsg.empty":"请输入组名","access.group.domains":"所有授权","access.group.domains.nodata":"请添加域名开始部署证书吧。"},i9={"history.page.title":"部署历史","history.nodata":"你暂未创建任何部署,请先添加域名进行部署吧!","history.props.domain":"域名","history.props.status":"状态","history.props.stage":"阶段","history.props.stage.progress.check":"检查","history.props.stage.progress.apply":"获取","history.props.stage.progress.deploy":"部署","history.props.last_execution_time":"最近执行时间","history.log":"日志"},a9=Object.freeze({...e9,...t9,...n9,...r9,...s9,...o9,...i9}),l9={"common.save":"Save","common.save.succeeded.message":"Save Successful","common.save.failed.message":"Save Failed","common.add":"Add","common.edit":"Edit","common.copy":"Copy","common.download":"Download","common.delete":"Delete","common.delete.succeeded.message":"Delete Successful","common.delete.failed.message":"Delete Failed","common.next":"Next","common.confirm":"Confirm","common.cancel":"Cancel","common.submit":"Submit","common.update":"Update","common.update.succeeded.message":"Update Successful","common.update.failed.message":"Update Failed","common.text.domain":"Domain","common.text.domain.empty":"No Domain","common.text.ip":"IP Address","common.text.ip.empty":"No IP address","common.text.dns":"Domain Name Server","common.text.dns.empty":"No DNS","common.text.ca":"Certificate Authority","common.text.provider":"Provider","common.text.name":"Name","common.text.created_at":"Created At","common.text.updated_at":"Updated At","common.text.operations":"Operations","common.text.nodata":"No data available","common.menu.settings":"Settings","common.menu.logout":"Logout","common.menu.document":"Document","common.pagination.next":"Next","common.pagination.prev":"Previous","common.pagination.more":"More pages","common.theme.light":"Light","common.theme.dark":"Dark","common.theme.system":"System","common.errmsg.string_max":"Please enter no more than {{max}} characters","common.errmsg.email_invalid":"Please enter a valid email address","common.errmsg.email_empty":"Please enter email","common.errmsg.email_duplicate":"Email already exists","common.errmsg.domain_invalid":"Please enter domain","common.errmsg.host_invalid":"Please enter the correct domain name or IP","common.errmsg.ip_invalid":"Please enter IP","common.errmsg.url_invalid":"Please enter a valid URL","common.provider.aliyun":"Alibaba Cloud","common.provider.aliyun.oss":"Alibaba Cloud - OSS","common.provider.aliyun.cdn":"Alibaba Cloud - CDN","common.provider.aliyun.dcdn":"Alibaba Cloud - DCDN","common.provider.tencent":"Tencent","common.provider.tencent.cdn":"Tencent - CDN","common.provider.huaweicloud":"Huawei Cloud","common.provider.qiniu":"Qiniu","common.provider.qiniu.cdn":"Qiniu - CDN","common.provider.aws":"AWS","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.pdns":"PowerDNS","common.provider.httpreq":"Http Request","common.provider.local":"Local Deployment","common.provider.ssh":"SSH Deployment","common.provider.webhook":"Webhook","common.provider.kubernetes":"Kubernetes","common.provider.kubernetes.secret":"Kubernetes - Secret","common.provider.dingtalk":"DingTalk","common.provider.telegram":"Telegram","common.provider.lark":"Lark"},c9={"login.username.label":"Username","login.username.placeholder":"Username/Email","login.username.errmsg.invalid":"Please enter a valid email address","login.password.label":"Password","login.password.placeholder":"Password","login.password.errmsg.invalid":"Password should be at least 10 characters","login.submit":"Log In"},u9={"dashboard.page.title":"Dashboard","dashboard.statistics.all":"All","dashboard.statistics.near_expired":"About to Expire","dashboard.statistics.enabled":"Enabled","dashboard.statistics.disabled":"Not Enabled","dashboard.statistics.unit":"","dashboard.history":"Recently Deployment History"},d9={"settings.page.title":"Settings","settings.account.relogin.message":"Please login again","settings.account.tab":"Account","settings.account.email.label":"Email","settings.account.email.placeholder":"Please enter email","settings.account.email.errmsg.invalid":"Please enter a valid email address","settings.account.email.changed.message":"Account email altered successfully","settings.account.email.failed.message":"Account email alteration failed","settings.password.tab":"Password","settings.password.current_password.label":"Current Password","settings.password.current_password.placeholder":"Please enter the current password","settings.password.new_password.label":"New Password","settings.password.new_password.placeholder":"Please enter the new password","settings.password.confirm_password.label":"Confirm Password","settings.password.confirm_password.placeholder":"Please enter the new password again","settings.password.password.errmsg.length":"Password should be at least 10 characters","settings.password.password.errmsg.not_matched":"Passwords do not match","settings.password.changed.message":"Password changed successfully","settings.password.failed.message":"Password change failed","settings.notification.tab":"Notification","settings.notification.template.label":"Template","settings.notification.template.saved.message":"Notification template saved successfully","settings.notification.template.variables.tips.title":"Optional variables ({COUNT}: number of expiring soon)","settings.notification.template.variables.tips.content":"Optional variables ({COUNT}: number of expiring soon. {DOMAINS}: Domain list)","settings.notification.config.enable":"Enable","settings.notification.config.saved.message":"Configuration saved successfully","settings.notification.config.failed.message":"Configuration save failed","settings.notification.dingtalk.secret.placeholder":"Signature for signed addition","settings.notification.url.errmsg.invalid":"Invalid Url format","settings.ca.tab":"Certificate Authority","settings.ca.provider.errmsg.empty":"Please select a Certificate Authority","settings.ca.eab_kid.errmsg.empty":"Please enter EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"Please enter EAB_HMAC_KEY.","settings.ca.eab_kid_hmac_key.errmsg.empty":"Please enter EAB_KID and EAB_HMAC_KEY"},f9={"domain.page.title":"Domain List","domain.nodata":"Please add a domain to start deploying the certificate.","domain.add":"Add Domain","domain.edit":"Edit Domain","domain.delete":"Delete Domain","domain.delete.confirm":"Are you sure you want to delete this domain?","domain.history":"Deployment History","domain.deploy":"Deploy Now","domain.deploy.started.message":"Deploy Started","domain.deploy.started.tips":"Deployment initiated, please check the deployment log later.","domain.deploy.failed.message":"Execution Failed","domain.deploy.failed.tips":"Execution failed, please check the details in <1>Deployment History</1>.","domain.deploy_forced":"Force Deployment","domain.props.expiry":"Validity Period","domain.props.expiry.date1":"Valid for {{date}} days","domain.props.expiry.date2":"Expiry on {{date}}","domain.props.last_execution_status":"Last Execution Status","domain.props.last_execution_stage":"Last Execution Stage","domain.props.last_execution_time":"Last Execution Time","domain.props.enable":"Enable","domain.props.enable.enabled":"Enable","domain.props.enable.disabled":"Disable","domain.application.tab":"Apply Settings","domain.application.form.domain.added.message":"Domain added successfully","domain.application.form.domain.changed.message":"Domain updated successfully","domain.application.form.email.label":"Email","domain.application.form.email.tips":"(A email is required to apply for a certificate)","domain.application.form.email.placeholder":"Please select email","domain.application.form.email.add":"Add Email","domain.application.form.email.list":"Email List","domain.application.form.access.label":"DNS Provider Authorization Configuration","domain.application.form.access.placeholder":"Please select DNS provider authorization configuration","domain.application.form.access.list":"Provider Authorization Configurations","domain.application.form.advanced_settings.label":"Advanced Settings","domain.application.form.key_algorithm.label":"Certificate Key Algorithm","domain.application.form.key_algorithm.placeholder":"Please select certificate key algorithm","domain.application.form.timeout.label":"DNS Propagation Timeout (Seconds)","domain.application.form.timeoue.placeholder":"Please enter maximum waiting time for DNS propagation","domain.application.unsaved.message":"Please save applyment configuration first","domain.deployment.tab":"Deploy Settings","domain.deployment.nodata":"Deployment not added yet","domain.deployment.form.type.label":"Deploy Method","domain.deployment.form.type.placeholder":"Please select deploy method","domain.deployment.form.type.list":"Deploy Method List","domain.deployment.form.access.label":"Access Configuration","domain.deployment.form.access.placeholder":"Please select provider authorization configuration","domain.deployment.form.access.list":"Provider Authorization Configurations","domain.deployment.form.domain.label":"Deploy to domain (Single domain only, not wildcard domain)","domain.deployment.form.domain.placeholder":"Please enter domain to be deployed","domain.deployment.form.ssh_key_path.label":"Private Key Save Path","domain.deployment.form.ssh_key_path.placeholder":"Please enter private key save path","domain.deployment.form.ssh_cert_path.label":"Certificate Save Path","domain.deployment.form.ssh_cert_path.placeholder":"Please enter certificate save path","domain.deployment.form.ssh_pre_command.label":"Pre-deployment Command","domain.deployment.form.ssh_pre_command.placeholder":"Command to be executed before deploying the certificate","domain.deployment.form.ssh_command.label":"Command","domain.deployment.form.ssh_command.placeholder":"Please enter command","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_endpoint.placeholder":"Please enter endpoint","domain.deployment.form.oss_bucket.label":"Bucket","domain.deployment.form.oss_bucket.placeholder":"Please enter bucket","domain.deployment.form.k8s_namespace.label":"Namespace","domain.deployment.form.k8s_namespace.placeholder":"Please enter namespace","domain.deployment.form.k8s_secret_name.label":"Secret Name","domain.deployment.form.k8s_secret_name.placeholder":"Please enter secret name","domain.deployment.form.k8s_secret_data_key_for_key.label":"Secret Data Key for PublicKey","domain.deployment.form.k8s_secret_data_key_for_key.placeholder":"Please enter secret data key for public key","domain.deployment.form.k8s_secret_data_key_for_crt.label":"Secret Data Key for Certificate","domain.deployment.form.k8s_secret_data_key_for_crt.placeholder":"Please enter secret data key for certificate","domain.deployment.form.variables.label":"Variable","domain.deployment.form.variables.key":"Name","domain.deployment.form.variables.value":"Value","domain.deployment.form.variables.empty":"Variable not added yet","domain.deployment.form.variables.key.required":"Variable name cannot be empty","domain.deployment.form.variables.value.required":"Variable value cannot be empty","domain.deployment.form.variables.key.placeholder":"Variable name","domain.deployment.form.variables.value.placeholder":"Variable value"},h9={"access.page.title":"Authorization Management","access.authorization.tab":"Authorization","access.authorization.nodata":"Please add authorization to start deploying certificate.","access.authorization.add":"Add Authorization","access.authorization.edit":"Edit Authorization","access.authorization.copy":"Copy Authorization","access.authorization.delete":"Delete Authorization","access.authorization.delete.confirm":"Are you sure you want to delete the deployment authorization?","access.authorization.form.type.label":"Provider","access.authorization.form.type.placeholder":"Please select a provider","access.authorization.form.type.list":"Authorization List","access.authorization.form.name.label":"Name","access.authorization.form.name.placeholder":"Please enter authorization name","access.authorization.form.config.label":"Configuration Type","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"Please enter Region","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"Please enter AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"Please enter AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"Please enter AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"Please enter SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"Please enter SecretKey","access.authorization.form.secret_access_key.label":"SecretAccessKey","access.authorization.form.secret_access_key.placeholder":"Please enter SecretAccessKey","access.authorization.form.aws_hosted_zone_id.label":"AWS Hosted Zone ID","access.authorization.form.aws_hosted_zone_id.placeholder":"Please enter AWS Hosted Zone ID","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"Please enter CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"Please enter GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"Please enter GO_DADDY_API_SECRET","access.authorization.form.pdns_api_url.label":"PDNS_API_URL","access.authorization.form.pdns_api_url.placeholder":"Please enter PDNS_API_URL","access.authorization.form.pdns_api_key.label":"PDNS_API_KEY","access.authorization.form.pdns_api_key.placeholder":"Please enter PDNS_API_KEY","access.authorization.form.httpreq_endpoint.label":"HTTPREQ_ENDPOINT","access.authorization.form.httpreq_endpoint.placeholder":"Please enter HTTPREQ_ENDPOINT","access.authorization.form.httpreq_mode.label":"HTTPREQ_MODE","access.authorization.form.httpreq_mode.placeholder":"Please enter HTTPREQ_MODE(RAW or '')","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.namesilo_api_key.placeholder":"Please enter NAMESILO_API_KEY","access.authorization.form.username.label":"Username","access.authorization.form.username.placeholder":"Please enter username","access.authorization.form.password.label":"Password","access.authorization.form.password.placeholder":"Please enter password","access.authorization.form.access_group.placeholder":"Please select a group","access.authorization.form.ssh_group.label":"Authorization Configuration Group (used to deploy a single domain certificate to multiple SSH hosts)","access.authorization.form.ssh_host.label":"Server Host","access.authorization.form.ssh_host.placeholder":"Please enter Host","access.authorization.form.ssh_port.label":"SSH Port","access.authorization.form.ssh_port.placeholder":"Please enter Port","access.authorization.form.ssh_username.label":"Username","access.authorization.form.ssh_username.placeholder":"Please enter username","access.authorization.form.ssh_password.label":"Password (Log-in using password)","access.authorization.form.ssh_password.placeholder":"Please enter password","access.authorization.form.ssh_key.label":"Key (Log-in using private key)","access.authorization.form.ssh_key.placeholder":"Please enter Key","access.authorization.form.ssh_key_file.placeholder":"Please select file","access.authorization.form.ssh_key_passphrase.label":"Key Passphrase (Log-in using private key)","access.authorization.form.ssh_key_passphrase.placeholder":"Please enter Key Passphrase","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"Please enter Webhook URL","access.authorization.form.k8s_kubeconfig.label":"KubeConfig","access.authorization.form.k8s_kubeconfig.placeholder":"Please enter KubeConfig","access.authorization.form.k8s_kubeconfig_file.placeholder":"Please select file","access.group.tab":"Authorization Group","access.group.nodata":"No deployment authorization configuration yet, please add after starting use.","access.group.total":"Totally {{total}} deployment authorization configuration","access.group.add":"Add Group","access.group.delete":"Delete Group","access.group.delete.confirm":"Are you sure you want to delete the deployment authorization group?","access.group.form.name.label":"Group Name","access.group.form.name.errmsg.empty":"Please enter group name","access.group.domains":"All Authorizations","access.group.domains.nodata":"Please add a domain to start deploying the certificate."},m9={"history.page.title":"Deployment History","history.nodata":"You have not created any deployments yet, please add a domain to start deployment!","history.props.domain":"Domain","history.props.status":"Status","history.props.stage":"Stage","history.props.stage.progress.check":"Check","history.props.stage.progress.apply":"Apply","history.props.stage.progress.deploy":"Deploy","history.props.last_execution_time":"Last Execution Time","history.log":"Log"},p9=Object.freeze({...l9,...c9,...u9,...d9,...f9,...h9,...m9}),g9={zh:{name:"简体中文",translation:a9},en:{name:"English",translation:p9}};vn.use(bP).use(eI).init({resources:g9,fallbackLng:"zh",debug:!0,interpolation:{escapeValue:!1},backend:{loadPath:"/locales/{{lng}}.json"}});xp.createRoot(document.getElementById("root")).render(a.jsx(He.StrictMode,{children:a.jsx(e4,{defaultTheme:"system",storageKey:"vite-ui-theme",children:a.jsx(TO,{router:yH})})}))});export default y9();