@xpert-ai/plugin-live-dashboard 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.xpertai-plugin/plugin.json +1 -1
- package/dist/lib/dashboard-view.schema.d.ts +81 -0
- package/dist/lib/dashboard-view.schema.js +2 -1
- package/dist/lib/dashboard.service.d.ts +12 -3
- package/dist/lib/dashboard.service.js +13 -1
- package/dist/lib/projects.schema.d.ts +14 -0
- package/dist/lib/projects.schema.js +2 -1
- package/dist/lib/projects.service.d.ts +2 -0
- package/dist/lib/projects.service.js +10 -0
- package/dist/lib/view.provider.d.ts +33 -4
- package/dist/lib/view.provider.js +13 -5
- package/dist/remote/app.css +1 -1
- package/dist/remote/app.js +20 -20
- package/dist/remote/build-manifest.json +16 -15
- package/package.json +1 -1
package/dist/remote/app.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(){"use strict";function vw(n,e){for(var o=0;o<e.length;o++){const s=e[o];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in n)){const l=Object.getOwnPropertyDescriptor(s,a);l&&Object.defineProperty(n,a,l.get?l:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function yw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Pc={exports:{}},je={};var ap;function xw(){if(ap)return je;ap=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function w(D){return D===null||typeof D!="object"?null:(D=y&&D[y]||D["@@iterator"],typeof D=="function"?D:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function k(D,P,W){this.props=D,this.context=P,this.refs=C,this.updater=W||b}k.prototype.isReactComponent={},k.prototype.setState=function(D,P){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,P,"setState")},k.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function A(){}A.prototype=k.prototype;function N(D,P,W){this.props=D,this.context=P,this.refs=C,this.updater=W||b}var O=N.prototype=new A;O.constructor=N,S(O,k.prototype),O.isPureReactComponent=!0;var T=Array.isArray,z=Object.prototype.hasOwnProperty,R={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function L(D,P,W){var J,H={},oe=null,de=null;if(P!=null)for(J in P.ref!==void 0&&(de=P.ref),P.key!==void 0&&(oe=""+P.key),P)z.call(P,J)&&!B.hasOwnProperty(J)&&(H[J]=P[J]);var K=arguments.length-2;if(K===1)H.children=W;else if(1<K){for(var se=Array(K),Ne=0;Ne<K;Ne++)se[Ne]=arguments[Ne+2];H.children=se}if(D&&D.defaultProps)for(J in K=D.defaultProps,K)H[J]===void 0&&(H[J]=K[J]);return{$$typeof:n,type:D,key:oe,ref:de,props:H,_owner:R.current}}function Z(D,P){return{$$typeof:n,type:D.type,key:P,ref:D.ref,props:D.props,_owner:D._owner}}function ae(D){return typeof D=="object"&&D!==null&&D.$$typeof===n}function be(D){var P={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(W){return P[W]})}var ue=/\/+/g;function ce(D,P){return typeof D=="object"&&D!==null&&D.key!=null?be(""+D.key):P.toString(36)}function Y(D,P,W,J,H){var oe=typeof D;(oe==="undefined"||oe==="boolean")&&(D=null);var de=!1;if(D===null)de=!0;else switch(oe){case"string":case"number":de=!0;break;case"object":switch(D.$$typeof){case n:case e:de=!0}}if(de)return de=D,H=H(de),D=J===""?"."+ce(de,0):J,T(H)?(W="",D!=null&&(W=D.replace(ue,"$&/")+"/"),Y(H,P,W,"",function(Ne){return Ne})):H!=null&&(ae(H)&&(H=Z(H,W+(!H.key||de&&de.key===H.key?"":(""+H.key).replace(ue,"$&/")+"/")+D)),P.push(H)),1;if(de=0,J=J===""?".":J+":",T(D))for(var K=0;K<D.length;K++){oe=D[K];var se=J+ce(oe,K);de+=Y(oe,P,W,se,H)}else if(se=w(D),typeof se=="function")for(D=se.call(D),K=0;!(oe=D.next()).done;)oe=oe.value,se=J+ce(oe,K++),de+=Y(oe,P,W,se,H);else if(oe==="object")throw P=String(D),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.");return de}function xe(D,P,W){if(D==null)return D;var J=[],H=0;return Y(D,J,"","",function(oe){return P.call(W,oe,H++)}),J}function le(D){if(D._status===-1){var P=D._result;P=P(),P.then(function(W){(D._status===0||D._status===-1)&&(D._status=1,D._result=W)},function(W){(D._status===0||D._status===-1)&&(D._status=2,D._result=W)}),D._status===-1&&(D._status=0,D._result=P)}if(D._status===1)return D._result.default;throw D._result}var te={current:null},U={transition:null},G={ReactCurrentDispatcher:te,ReactCurrentBatchConfig:U,ReactCurrentOwner:R};function $(){throw Error("act(...) is not supported in production builds of React.")}return je.Children={map:xe,forEach:function(D,P,W){xe(D,function(){P.apply(this,arguments)},W)},count:function(D){var P=0;return xe(D,function(){P++}),P},toArray:function(D){return xe(D,function(P){return P})||[]},only:function(D){if(!ae(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},je.Component=k,je.Fragment=o,je.Profiler=a,je.PureComponent=N,je.StrictMode=s,je.Suspense=h,je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,je.act=$,je.cloneElement=function(D,P,W){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var J=S({},D.props),H=D.key,oe=D.ref,de=D._owner;if(P!=null){if(P.ref!==void 0&&(oe=P.ref,de=R.current),P.key!==void 0&&(H=""+P.key),D.type&&D.type.defaultProps)var K=D.type.defaultProps;for(se in P)z.call(P,se)&&!B.hasOwnProperty(se)&&(J[se]=P[se]===void 0&&K!==void 0?K[se]:P[se])}var se=arguments.length-2;if(se===1)J.children=W;else if(1<se){K=Array(se);for(var Ne=0;Ne<se;Ne++)K[Ne]=arguments[Ne+2];J.children=K}return{$$typeof:n,type:D.type,key:H,ref:oe,props:J,_owner:de}},je.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:l,_context:D},D.Consumer=D},je.createElement=L,je.createFactory=function(D){var P=L.bind(null,D);return P.type=D,P},je.createRef=function(){return{current:null}},je.forwardRef=function(D){return{$$typeof:d,render:D}},je.isValidElement=ae,je.lazy=function(D){return{$$typeof:v,_payload:{_status:-1,_result:D},_init:le}},je.memo=function(D,P){return{$$typeof:m,type:D,compare:P===void 0?null:P}},je.startTransition=function(D){var P=U.transition;U.transition={};try{D()}finally{U.transition=P}},je.unstable_act=$,je.useCallback=function(D,P){return te.current.useCallback(D,P)},je.useContext=function(D){return te.current.useContext(D)},je.useDebugValue=function(){},je.useDeferredValue=function(D){return te.current.useDeferredValue(D)},je.useEffect=function(D,P){return te.current.useEffect(D,P)},je.useId=function(){return te.current.useId()},je.useImperativeHandle=function(D,P,W){return te.current.useImperativeHandle(D,P,W)},je.useInsertionEffect=function(D,P){return te.current.useInsertionEffect(D,P)},je.useLayoutEffect=function(D,P){return te.current.useLayoutEffect(D,P)},je.useMemo=function(D,P){return te.current.useMemo(D,P)},je.useReducer=function(D,P,W){return te.current.useReducer(D,P,W)},je.useRef=function(D){return te.current.useRef(D)},je.useState=function(D){return te.current.useState(D)},je.useSyncExternalStore=function(D,P,W){return te.current.useSyncExternalStore(D,P,W)},je.useTransition=function(){return te.current.useTransition()},je.version="18.3.1",je}var lp;function Rc(){return lp||(lp=1,Pc.exports=xw()),Pc.exports}var f=Rc();const Qo=vw({__proto__:null,default:yw(f)},[f]);var na={},Ic={exports:{}},Wt={},Dc={exports:{}},Nc={};var cp;function ww(){return cp||(cp=1,(function(n){function e(U,G){var $=U.length;U.push(G);e:for(;0<$;){var D=$-1>>>1,P=U[D];if(0<a(P,G))U[D]=G,U[$]=P,$=D;else break e}}function o(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var G=U[0],$=U.pop();if($!==G){U[0]=$;e:for(var D=0,P=U.length,W=P>>>1;D<W;){var J=2*(D+1)-1,H=U[J],oe=J+1,de=U[oe];if(0>a(H,$))oe<P&&0>a(de,H)?(U[D]=de,U[oe]=$,D=oe):(U[D]=H,U[J]=$,D=J);else if(oe<P&&0>a(de,$))U[D]=de,U[oe]=$,D=oe;else break e}}return G}function a(U,G){var $=U.sortIndex-G.sortIndex;return $!==0?$:U.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();n.unstable_now=function(){return u.now()-d}}var h=[],m=[],v=1,y=null,w=3,b=!1,S=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(U){for(var G=o(m);G!==null;){if(G.callback===null)s(m);else if(G.startTime<=U)s(m),G.sortIndex=G.expirationTime,e(h,G);else break;G=o(m)}}function T(U){if(C=!1,O(U),!S)if(o(h)!==null)S=!0,le(z);else{var G=o(m);G!==null&&te(T,G.startTime-U)}}function z(U,G){S=!1,C&&(C=!1,A(L),L=-1),b=!0;var $=w;try{for(O(G),y=o(h);y!==null&&(!(y.expirationTime>G)||U&&!be());){var D=y.callback;if(typeof D=="function"){y.callback=null,w=y.priorityLevel;var P=D(y.expirationTime<=G);G=n.unstable_now(),typeof P=="function"?y.callback=P:y===o(h)&&s(h),O(G)}else s(h);y=o(h)}if(y!==null)var W=!0;else{var J=o(m);J!==null&&te(T,J.startTime-G),W=!1}return W}finally{y=null,w=$,b=!1}}var R=!1,B=null,L=-1,Z=5,ae=-1;function be(){return!(n.unstable_now()-ae<Z)}function ue(){if(B!==null){var U=n.unstable_now();ae=U;var G=!0;try{G=B(!0,U)}finally{G?ce():(R=!1,B=null)}}else R=!1}var ce;if(typeof N=="function")ce=function(){N(ue)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,xe=Y.port2;Y.port1.onmessage=ue,ce=function(){xe.postMessage(null)}}else ce=function(){k(ue,0)};function le(U){B=U,R||(R=!0,ce())}function te(U,G){L=k(function(){U(n.unstable_now())},G)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_continueExecution=function(){S||b||(S=!0,le(z))},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_getFirstCallbackNode=function(){return o(h)},n.unstable_next=function(U){switch(w){case 1:case 2:case 3:var G=3;break;default:G=w}var $=w;w=G;try{return U()}finally{w=$}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(U,G){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var $=w;w=U;try{return G()}finally{w=$}},n.unstable_scheduleCallback=function(U,G,$){var D=n.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?D+$:D):$=D,U){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=$+P,U={id:v++,callback:G,priorityLevel:U,startTime:$,expirationTime:P,sortIndex:-1},$>D?(U.sortIndex=$,e(m,U),o(h)===null&&U===o(m)&&(C?(A(L),L=-1):C=!0,te(T,$-D))):(U.sortIndex=P,e(h,U),S||b||(S=!0,le(z))),U},n.unstable_shouldYield=be,n.unstable_wrapCallback=function(U){var G=w;return function(){var $=w;w=G;try{return U.apply(this,arguments)}finally{w=$}}}})(Nc)),Nc}var up;function bw(){return up||(up=1,Dc.exports=ww()),Dc.exports}var dp;function Sw(){if(dp)return Wt;dp=1;var n=Rc(),e=bw();function o(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=1;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(t,r){u(t,r),u(t+"Capture",r)}function u(t,r){for(a[t]=r,t=0;t<r.length;t++)s.add(r[t])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[: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]*$/,v={},y={};function w(t){return h.call(y,t)?!0:h.call(v,t)?!1:m.test(t)?y[t]=!0:(v[t]=!0,!1)}function b(t,r,i,c){if(i!==null&&i.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return c?!1:i!==null?!i.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function S(t,r,i,c){if(r===null||typeof r>"u"||b(t,r,i,c))return!0;if(c)return!1;if(i!==null)switch(i.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function C(t,r,i,c,p,g,x){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=c,this.attributeNamespace=p,this.mustUseProperty=i,this.propertyName=t,this.type=r,this.sanitizeURL=g,this.removeEmptyString=x}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){k[t]=new C(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];k[r]=new C(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){k[t]=new C(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){k[t]=new C(t,2,!1,t,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(t){k[t]=new C(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){k[t]=new C(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){k[t]=new C(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){k[t]=new C(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){k[t]=new C(t,5,!1,t.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function N(t){return t[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(t){var r=t.replace(A,N);k[r]=new C(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(A,N);k[r]=new C(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(A,N);k[r]=new C(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){k[t]=new C(t,1,!1,t.toLowerCase(),null,!1,!1)}),k.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){k[t]=new C(t,1,!1,t.toLowerCase(),null,!0,!0)});function O(t,r,i,c){var p=k.hasOwnProperty(r)?k[r]:null;(p!==null?p.type!==0:c||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(S(r,i,p,c)&&(i=null),c||p===null?w(r)&&(i===null?t.removeAttribute(r):t.setAttribute(r,""+i)):p.mustUseProperty?t[p.propertyName]=i===null?p.type===3?!1:"":i:(r=p.attributeName,c=p.attributeNamespace,i===null?t.removeAttribute(r):(p=p.type,i=p===3||p===4&&i===!0?"":""+i,c?t.setAttributeNS(c,r,i):t.setAttribute(r,i))))}var T=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,z=Symbol.for("react.element"),R=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),ae=Symbol.for("react.provider"),be=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),te=Symbol.for("react.offscreen"),U=Symbol.iterator;function G(t){return t===null||typeof t!="object"?null:(t=U&&t[U]||t["@@iterator"],typeof t=="function"?t:null)}var $=Object.assign,D;function P(t){if(D===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);D=r&&r[1]||""}return`
|
|
2
|
-
`+
|
|
1
|
+
(function(){"use strict";function Kw(n,e){for(var o=0;o<e.length;o++){const s=e[o];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in n)){const l=Object.getOwnPropertyDescriptor(s,i);l&&Object.defineProperty(n,i,l.get?l:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function Gw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Mc={exports:{}},ze={};var bp;function Zw(){if(bp)return ze;bp=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function x(T){return T===null||typeof T!="object"?null:(T=v&&T[v]||T["@@iterator"],typeof T=="function"?T:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function k(T,P,W){this.props=T,this.context=P,this.refs=C,this.updater=W||b}k.prototype.isReactComponent={},k.prototype.setState=function(T,P){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,P,"setState")},k.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function N(){}N.prototype=k.prototype;function D(T,P,W){this.props=T,this.context=P,this.refs=C,this.updater=W||b}var O=D.prototype=new N;O.constructor=D,S(O,k.prototype),O.isPureReactComponent=!0;var R=Array.isArray,L=Object.prototype.hasOwnProperty,j={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function I(T,P,W){var Z,H={},re=null,de=null;if(P!=null)for(Z in P.ref!==void 0&&(de=P.ref),P.key!==void 0&&(re=""+P.key),P)L.call(P,Z)&&!B.hasOwnProperty(Z)&&(H[Z]=P[Z]);var Y=arguments.length-2;if(Y===1)H.children=W;else if(1<Y){for(var se=Array(Y),Oe=0;Oe<Y;Oe++)se[Oe]=arguments[Oe+2];H.children=se}if(T&&T.defaultProps)for(Z in Y=T.defaultProps,Y)H[Z]===void 0&&(H[Z]=Y[Z]);return{$$typeof:n,type:T,key:re,ref:de,props:H,_owner:j.current}}function K(T,P){return{$$typeof:n,type:T.type,key:P,ref:T.ref,props:T.props,_owner:T._owner}}function ae(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function be(T){var P={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(W){return P[W]})}var le=/\/+/g;function ce(T,P){return typeof T=="object"&&T!==null&&T.key!=null?be(""+T.key):P.toString(36)}function ue(T,P,W,Z,H){var re=typeof T;(re==="undefined"||re==="boolean")&&(T=null);var de=!1;if(T===null)de=!0;else switch(re){case"string":case"number":de=!0;break;case"object":switch(T.$$typeof){case n:case e:de=!0}}if(de)return de=T,H=H(de),T=Z===""?"."+ce(de,0):Z,R(H)?(W="",T!=null&&(W=T.replace(le,"$&/")+"/"),ue(H,P,W,"",function(Oe){return Oe})):H!=null&&(ae(H)&&(H=K(H,W+(!H.key||de&&de.key===H.key?"":(""+H.key).replace(le,"$&/")+"/")+T)),P.push(H)),1;if(de=0,Z=Z===""?".":Z+":",R(T))for(var Y=0;Y<T.length;Y++){re=T[Y];var se=Z+ce(re,Y);de+=ue(re,P,W,se,H)}else if(se=x(T),typeof se=="function")for(T=se.call(T),Y=0;!(re=T.next()).done;)re=re.value,se=Z+ce(re,Y++),de+=ue(re,P,W,se,H);else if(re==="object")throw P=String(T),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.");return de}function Se(T,P,W){if(T==null)return T;var Z=[],H=0;return ue(T,Z,"","",function(re){return P.call(W,re,H++)}),Z}function q(T){if(T._status===-1){var P=T._result;P=P(),P.then(function(W){(T._status===0||T._status===-1)&&(T._status=1,T._result=W)},function(W){(T._status===0||T._status===-1)&&(T._status=2,T._result=W)}),T._status===-1&&(T._status=0,T._result=P)}if(T._status===1)return T._result.default;throw T._result}var ne={current:null},U={transition:null},Q={ReactCurrentDispatcher:ne,ReactCurrentBatchConfig:U,ReactCurrentOwner:j};function M(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:Se,forEach:function(T,P,W){Se(T,function(){P.apply(this,arguments)},W)},count:function(T){var P=0;return Se(T,function(){P++}),P},toArray:function(T){return Se(T,function(P){return P})||[]},only:function(T){if(!ae(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},ze.Component=k,ze.Fragment=o,ze.Profiler=i,ze.PureComponent=D,ze.StrictMode=s,ze.Suspense=h,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q,ze.act=M,ze.cloneElement=function(T,P,W){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var Z=S({},T.props),H=T.key,re=T.ref,de=T._owner;if(P!=null){if(P.ref!==void 0&&(re=P.ref,de=j.current),P.key!==void 0&&(H=""+P.key),T.type&&T.type.defaultProps)var Y=T.type.defaultProps;for(se in P)L.call(P,se)&&!B.hasOwnProperty(se)&&(Z[se]=P[se]===void 0&&Y!==void 0?Y[se]:P[se])}var se=arguments.length-2;if(se===1)Z.children=W;else if(1<se){Y=Array(se);for(var Oe=0;Oe<se;Oe++)Y[Oe]=arguments[Oe+2];Z.children=Y}return{$$typeof:n,type:T.type,key:H,ref:re,props:Z,_owner:de}},ze.createContext=function(T){return T={$$typeof:u,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:l,_context:T},T.Consumer=T},ze.createElement=I,ze.createFactory=function(T){var P=I.bind(null,T);return P.type=T,P},ze.createRef=function(){return{current:null}},ze.forwardRef=function(T){return{$$typeof:d,render:T}},ze.isValidElement=ae,ze.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:q}},ze.memo=function(T,P){return{$$typeof:m,type:T,compare:P===void 0?null:P}},ze.startTransition=function(T){var P=U.transition;U.transition={};try{T()}finally{U.transition=P}},ze.unstable_act=M,ze.useCallback=function(T,P){return ne.current.useCallback(T,P)},ze.useContext=function(T){return ne.current.useContext(T)},ze.useDebugValue=function(){},ze.useDeferredValue=function(T){return ne.current.useDeferredValue(T)},ze.useEffect=function(T,P){return ne.current.useEffect(T,P)},ze.useId=function(){return ne.current.useId()},ze.useImperativeHandle=function(T,P,W){return ne.current.useImperativeHandle(T,P,W)},ze.useInsertionEffect=function(T,P){return ne.current.useInsertionEffect(T,P)},ze.useLayoutEffect=function(T,P){return ne.current.useLayoutEffect(T,P)},ze.useMemo=function(T,P){return ne.current.useMemo(T,P)},ze.useReducer=function(T,P,W){return ne.current.useReducer(T,P,W)},ze.useRef=function(T){return ne.current.useRef(T)},ze.useState=function(T){return ne.current.useState(T)},ze.useSyncExternalStore=function(T,P,W){return ne.current.useSyncExternalStore(T,P,W)},ze.useTransition=function(){return ne.current.useTransition()},ze.version="18.3.1",ze}var Sp;function jc(){return Sp||(Sp=1,Mc.exports=Zw()),Mc.exports}var f=jc();const ns=Kw({__proto__:null,default:Gw(f)},[f]);var fa={},Lc={exports:{}},Wt={},Fc={exports:{}},zc={};var Cp;function qw(){return Cp||(Cp=1,(function(n){function e(U,Q){var M=U.length;U.push(Q);e:for(;0<M;){var T=M-1>>>1,P=U[T];if(0<i(P,Q))U[T]=Q,U[M]=P,M=T;else break e}}function o(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var Q=U[0],M=U.pop();if(M!==Q){U[0]=M;e:for(var T=0,P=U.length,W=P>>>1;T<W;){var Z=2*(T+1)-1,H=U[Z],re=Z+1,de=U[re];if(0>i(H,M))re<P&&0>i(de,H)?(U[T]=de,U[re]=M,T=re):(U[T]=H,U[Z]=M,T=Z);else if(re<P&&0>i(de,M))U[T]=de,U[re]=M,T=re;else break e}}return Q}function i(U,Q){var M=U.sortIndex-Q.sortIndex;return M!==0?M:U.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();n.unstable_now=function(){return u.now()-d}}var h=[],m=[],y=1,v=null,x=3,b=!1,S=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(U){for(var Q=o(m);Q!==null;){if(Q.callback===null)s(m);else if(Q.startTime<=U)s(m),Q.sortIndex=Q.expirationTime,e(h,Q);else break;Q=o(m)}}function R(U){if(C=!1,O(U),!S)if(o(h)!==null)S=!0,q(L);else{var Q=o(m);Q!==null&&ne(R,Q.startTime-U)}}function L(U,Q){S=!1,C&&(C=!1,N(I),I=-1),b=!0;var M=x;try{for(O(Q),v=o(h);v!==null&&(!(v.expirationTime>Q)||U&&!be());){var T=v.callback;if(typeof T=="function"){v.callback=null,x=v.priorityLevel;var P=T(v.expirationTime<=Q);Q=n.unstable_now(),typeof P=="function"?v.callback=P:v===o(h)&&s(h),O(Q)}else s(h);v=o(h)}if(v!==null)var W=!0;else{var Z=o(m);Z!==null&&ne(R,Z.startTime-Q),W=!1}return W}finally{v=null,x=M,b=!1}}var j=!1,B=null,I=-1,K=5,ae=-1;function be(){return!(n.unstable_now()-ae<K)}function le(){if(B!==null){var U=n.unstable_now();ae=U;var Q=!0;try{Q=B(!0,U)}finally{Q?ce():(j=!1,B=null)}}else j=!1}var ce;if(typeof D=="function")ce=function(){D(le)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,Se=ue.port2;ue.port1.onmessage=le,ce=function(){Se.postMessage(null)}}else ce=function(){k(le,0)};function q(U){B=U,j||(j=!0,ce())}function ne(U,Q){I=k(function(){U(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_continueExecution=function(){S||b||(S=!0,q(L))},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_getFirstCallbackNode=function(){return o(h)},n.unstable_next=function(U){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var M=x;x=Q;try{return U()}finally{x=M}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(U,Q){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var M=x;x=U;try{return Q()}finally{x=M}},n.unstable_scheduleCallback=function(U,Q,M){var T=n.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?T+M:T):M=T,U){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=M+P,U={id:y++,callback:Q,priorityLevel:U,startTime:M,expirationTime:P,sortIndex:-1},M>T?(U.sortIndex=M,e(m,U),o(h)===null&&U===o(m)&&(C?(N(I),I=-1):C=!0,ne(R,M-T))):(U.sortIndex=P,e(h,U),S||b||(S=!0,q(L))),U},n.unstable_shouldYield=be,n.unstable_wrapCallback=function(U){var Q=x;return function(){var M=x;x=Q;try{return U.apply(this,arguments)}finally{x=M}}}})(zc)),zc}var kp;function Yw(){return kp||(kp=1,Fc.exports=qw()),Fc.exports}var Ep;function Qw(){if(Ep)return Wt;Ep=1;var n=jc(),e=Yw();function o(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,a=1;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,i={};function l(t,r){u(t,r),u(t+"Capture",r)}function u(t,r){for(i[t]=r,t=0;t<r.length;t++)s.add(r[t])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},v={};function x(t){return h.call(v,t)?!0:h.call(y,t)?!1:m.test(t)?v[t]=!0:(y[t]=!0,!1)}function b(t,r,a,c){if(a!==null&&a.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function S(t,r,a,c){if(r===null||typeof r>"u"||b(t,r,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function C(t,r,a,c,p,g,w){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=c,this.attributeNamespace=p,this.mustUseProperty=a,this.propertyName=t,this.type=r,this.sanitizeURL=g,this.removeEmptyString=w}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){k[t]=new C(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];k[r]=new C(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){k[t]=new C(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){k[t]=new C(t,2,!1,t,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(t){k[t]=new C(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){k[t]=new C(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){k[t]=new C(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){k[t]=new C(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){k[t]=new C(t,5,!1,t.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function D(t){return t[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(t){var r=t.replace(N,D);k[r]=new C(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(N,D);k[r]=new C(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(N,D);k[r]=new C(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){k[t]=new C(t,1,!1,t.toLowerCase(),null,!1,!1)}),k.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){k[t]=new C(t,1,!1,t.toLowerCase(),null,!0,!0)});function O(t,r,a,c){var p=k.hasOwnProperty(r)?k[r]:null;(p!==null?p.type!==0:c||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(S(r,a,p,c)&&(a=null),c||p===null?x(r)&&(a===null?t.removeAttribute(r):t.setAttribute(r,""+a)):p.mustUseProperty?t[p.propertyName]=a===null?p.type===3?!1:"":a:(r=p.attributeName,c=p.attributeNamespace,a===null?t.removeAttribute(r):(p=p.type,a=p===3||p===4&&a===!0?"":""+a,c?t.setAttributeNS(c,r,a):t.setAttribute(r,a))))}var R=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,L=Symbol.for("react.element"),j=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),ae=Symbol.for("react.provider"),be=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),Se=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ne=Symbol.for("react.offscreen"),U=Symbol.iterator;function Q(t){return t===null||typeof t!="object"?null:(t=U&&t[U]||t["@@iterator"],typeof t=="function"?t:null)}var M=Object.assign,T;function P(t){if(T===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);T=r&&r[1]||""}return`
|
|
2
|
+
`+T+t}var W=!1;function Z(t,r){if(!t||W)return"";W=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(V){var c=V}Reflect.construct(t,[],r)}else{try{r.call()}catch(V){c=V}t.call(r.prototype)}else{try{throw Error()}catch(V){c=V}t()}}catch(V){if(V&&c&&typeof V.stack=="string"){for(var p=V.stack.split(`
|
|
3
3
|
`),g=c.stack.split(`
|
|
4
|
-
`),
|
|
5
|
-
`+p[x].replace(" at new "," at ");return t.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",t.displayName)),I}while(1<=x&&0<=E);break}}}finally{W=!1,Error.prepareStackTrace=i}return(t=t?t.displayName||t.name:"")?P(t):""}function H(t){switch(t.tag){case 5:return P(t.type);case 16:return P("Lazy");case 13:return P("Suspense");case 19:return P("SuspenseList");case 0:case 2:case 15:return t=J(t.type,!1),t;case 11:return t=J(t.type.render,!1),t;case 1:return t=J(t.type,!0),t;default:return""}}function oe(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case B:return"Fragment";case R:return"Portal";case Z:return"Profiler";case L:return"StrictMode";case ce:return"Suspense";case Y:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case be:return(t.displayName||"Context")+".Consumer";case ae:return(t._context.displayName||"Context")+".Provider";case ue:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case xe:return r=t.displayName||null,r!==null?r:oe(t.type)||"Memo";case le:r=t._payload,t=t._init;try{return oe(t(r))}catch{}}return null}function de(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oe(r);case 8:return r===L?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function K(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function se(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Ne(t){var r=se(t)?"checked":"value",i=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var p=i.get,g=i.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(x){c=""+x,g.call(this,x)}}),Object.defineProperty(t,r,{enumerable:i.enumerable}),{getValue:function(){return c},setValue:function(x){c=""+x},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function $e(t){t._valueTracker||(t._valueTracker=Ne(t))}function We(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),c="";return t&&(c=se(t)?t.checked?"true":"false":t.value),t=c,t!==i?(r.setValue(t),!0):!1}function Ue(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ft(t,r){var i=r.checked;return $({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??t._wrapperState.initialChecked})}function wt(t,r){var i=r.defaultValue==null?"":r.defaultValue,c=r.checked!=null?r.checked:r.defaultChecked;i=K(r.value!=null?r.value:i),t._wrapperState={initialChecked:c,initialValue:i,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function Hr(t,r){r=r.checked,r!=null&&O(t,"checked",r,!1)}function Cn(t,r){Hr(t,r);var i=K(r.value),c=r.type;if(i!=null)c==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+i):t.value!==""+i&&(t.value=""+i);else if(c==="submit"||c==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?Wr(t,r.type,i):r.hasOwnProperty("defaultValue")&&Wr(t,r.type,K(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function ct(t,r,i){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var c=r.type;if(!(c!=="submit"&&c!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,i||r===t.value||(t.value=r),t.defaultValue=r}i=t.name,i!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,i!==""&&(t.name=i)}function Wr(t,r,i){(r!=="number"||Ue(t.ownerDocument)!==t)&&(i==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+i&&(t.defaultValue=""+i))}var gr=Array.isArray;function un(t,r,i,c){if(t=t.options,r){r={};for(var p=0;p<i.length;p++)r["$"+i[p]]=!0;for(i=0;i<t.length;i++)p=r.hasOwnProperty("$"+t[i].value),t[i].selected!==p&&(t[i].selected=p),p&&c&&(t[i].defaultSelected=!0)}else{for(i=""+K(i),r=null,p=0;p<t.length;p++){if(t[p].value===i){t[p].selected=!0,c&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function Kr(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(o(91));return $({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function _n(t,r){var i=r.value;if(i==null){if(i=r.children,r=r.defaultValue,i!=null){if(r!=null)throw Error(o(92));if(gr(i)){if(1<i.length)throw Error(o(93));i=i[0]}r=i}r==null&&(r=""),i=r}t._wrapperState={initialValue:K(i)}}function gi(t,r){var i=K(r.value),c=K(r.defaultValue);i!=null&&(i=""+i,i!==t.value&&(t.value=i),r.defaultValue==null&&t.defaultValue!==i&&(t.defaultValue=i)),c!=null&&(t.defaultValue=""+c)}function Kn(t){var r=t.textContent;r===t._wrapperState.initialValue&&r!==""&&r!==null&&(t.value=r)}function Ss(t){switch(t){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 ks(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?Ss(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var En,Zn=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,i,c,p){MSApp.execUnsafeLocalFunction(function(){return t(r,i,c,p)})}:t})(function(t,r){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=r;else{for(En=En||document.createElement("div"),En.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=En.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function dn(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var vr={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},Zr=["Webkit","ms","Moz","O"];Object.keys(vr).forEach(function(t){Zr.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),vr[r]=vr[t]})});function It(t,r,i){return r==null||typeof r=="boolean"||r===""?"":i||typeof r!="number"||r===0||vr.hasOwnProperty(t)&&vr[t]?(""+r).trim():r+"px"}function $o(t,r){t=t.style;for(var i in r)if(r.hasOwnProperty(i)){var c=i.indexOf("--")===0,p=It(i,r[i],c);i==="float"&&(i="cssFloat"),c?t.setProperty(i,p):t[i]=p}}var vi=$({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 Mo(t,r){if(r){if(vi[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(o(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(o(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(o(61))}if(r.style!=null&&typeof r.style!="object")throw Error(o(62))}}function yi(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){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 xi=null;function wi(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var bi=null,Gr=null,yr=null;function Si(t){if(t=Vi(t)){if(typeof bi!="function")throw Error(o(280));var r=t.stateNode;r&&(r=Ul(r),bi(t.stateNode,t.type,r))}}function Q(t){Gr?yr?yr.push(t):yr=[t]:Gr=t}function Re(){if(Gr){var t=Gr,r=yr;if(yr=Gr=null,Si(t),r)for(t=0;t<r.length;t++)Si(r[t])}}function Be(t,r){return t(r)}function Qe(){}var Ge=!1;function qr(t,r,i){if(Ge)return t(r,i);Ge=!0;try{return Be(t,r,i)}finally{Ge=!1,(Gr!==null||yr!==null)&&(Qe(),Re())}}function Dt(t,r){var i=t.stateNode;if(i===null)return null;var c=Ul(i);if(c===null)return null;i=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,r,typeof i));return i}var Je=!1;if(d)try{var Pn={};Object.defineProperty(Pn,"passive",{get:function(){Je=!0}}),window.addEventListener("test",Pn,Pn),window.removeEventListener("test",Pn,Pn)}catch{Je=!1}function Yr(t,r,i,c,p,g,x,E,I){var V=Array.prototype.slice.call(arguments,3);try{r.apply(i,V)}catch(X){this.onError(X)}}var jo=!1,wl=null,bl=!1,_d=null,CR={onError:function(t){jo=!0,wl=t}};function _R(t,r,i,c,p,g,x,E,I){jo=!1,wl=null,Yr.apply(CR,arguments)}function ER(t,r,i,c,p,g,x,E,I){if(_R.apply(this,arguments),jo){if(jo){var V=wl;jo=!1,wl=null}else throw Error(o(198));bl||(bl=!0,_d=V)}}function Lo(t){var r=t,i=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(i=r.return),t=r.return;while(t)}return r.tag===3?i:null}function Fv(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function Vv(t){if(Lo(t)!==t)throw Error(o(188))}function PR(t){var r=t.alternate;if(!r){if(r=Lo(t),r===null)throw Error(o(188));return r!==t?null:t}for(var i=t,c=r;;){var p=i.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){i=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===i)return Vv(p),t;if(g===c)return Vv(p),r;g=g.sibling}throw Error(o(188))}if(i.return!==c.return)i=p,c=g;else{for(var x=!1,E=p.child;E;){if(E===i){x=!0,i=p,c=g;break}if(E===c){x=!0,c=p,i=g;break}E=E.sibling}if(!x){for(E=g.child;E;){if(E===i){x=!0,i=g,c=p;break}if(E===c){x=!0,c=g,i=p;break}E=E.sibling}if(!x)throw Error(o(189))}}if(i.alternate!==c)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:r}function Uv(t){return t=PR(t),t!==null?Bv(t):null}function Bv(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=Bv(t);if(r!==null)return r;t=t.sibling}return null}var Hv=e.unstable_scheduleCallback,Wv=e.unstable_cancelCallback,RR=e.unstable_shouldYield,IR=e.unstable_requestPaint,mt=e.unstable_now,DR=e.unstable_getCurrentPriorityLevel,Ed=e.unstable_ImmediatePriority,Kv=e.unstable_UserBlockingPriority,Sl=e.unstable_NormalPriority,NR=e.unstable_LowPriority,Zv=e.unstable_IdlePriority,kl=null,Gn=null;function OR(t){if(Gn&&typeof Gn.onCommitFiberRoot=="function")try{Gn.onCommitFiberRoot(kl,t,void 0,(t.current.flags&128)===128)}catch{}}var Rn=Math.clz32?Math.clz32:$R,TR=Math.log,AR=Math.LN2;function $R(t){return t>>>=0,t===0?32:31-(TR(t)/AR|0)|0}var Cl=64,_l=4194304;function ki(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function El(t,r){var i=t.pendingLanes;if(i===0)return 0;var c=0,p=t.suspendedLanes,g=t.pingedLanes,x=i&268435455;if(x!==0){var E=x&~p;E!==0?c=ki(E):(g&=x,g!==0&&(c=ki(g)))}else x=i&~p,x!==0?c=ki(x):g!==0&&(c=ki(g));if(c===0)return 0;if(r!==0&&r!==c&&(r&p)===0&&(p=c&-c,g=r&-r,p>=g||p===16&&(g&4194240)!==0))return r;if((c&4)!==0&&(c|=i&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=c;0<r;)i=31-Rn(r),p=1<<i,c|=t[i],r&=~p;return c}function MR(t,r){switch(t){case 1:case 2:case 4:return r+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 r+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 jR(t,r){for(var i=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,g=t.pendingLanes;0<g;){var x=31-Rn(g),E=1<<x,I=p[x];I===-1?((E&i)===0||(E&c)!==0)&&(p[x]=MR(E,r)):I<=r&&(t.expiredLanes|=E),g&=~E}}function Pd(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Gv(){var t=Cl;return Cl<<=1,(Cl&4194240)===0&&(Cl=64),t}function Rd(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function Ci(t,r,i){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Rn(r),t[r]=i}function LR(t,r){var i=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var c=t.eventTimes;for(t=t.expirationTimes;0<i;){var p=31-Rn(i),g=1<<p;r[p]=0,c[p]=-1,t[p]=-1,i&=~g}}function Id(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var c=31-Rn(i),p=1<<c;p&r|t[c]&r&&(t[c]|=r),i&=~p}}var et=0;function qv(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Yv,Dd,Qv,Xv,Jv,Nd=!1,Pl=[],Qr=null,Xr=null,Jr=null,_i=new Map,Ei=new Map,eo=[],zR="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 ey(t,r){switch(t){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Xr=null;break;case"mouseover":case"mouseout":Jr=null;break;case"pointerover":case"pointerout":_i.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ei.delete(r.pointerId)}}function Pi(t,r,i,c,p,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:i,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},r!==null&&(r=Vi(r),r!==null&&Dd(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function FR(t,r,i,c,p){switch(r){case"focusin":return Qr=Pi(Qr,t,r,i,c,p),!0;case"dragenter":return Xr=Pi(Xr,t,r,i,c,p),!0;case"mouseover":return Jr=Pi(Jr,t,r,i,c,p),!0;case"pointerover":var g=p.pointerId;return _i.set(g,Pi(_i.get(g)||null,t,r,i,c,p)),!0;case"gotpointercapture":return g=p.pointerId,Ei.set(g,Pi(Ei.get(g)||null,t,r,i,c,p)),!0}return!1}function ty(t){var r=zo(t.target);if(r!==null){var i=Lo(r);if(i!==null){if(r=i.tag,r===13){if(r=Fv(i),r!==null){t.blockedOn=r,Jv(t.priority,function(){Qv(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Rl(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=Td(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(i===null){i=t.nativeEvent;var c=new i.constructor(i.type,i);xi=c,i.target.dispatchEvent(c),xi=null}else return r=Vi(i),r!==null&&Dd(r),t.blockedOn=i,!1;r.shift()}return!0}function ny(t,r,i){Rl(t)&&i.delete(r)}function VR(){Nd=!1,Qr!==null&&Rl(Qr)&&(Qr=null),Xr!==null&&Rl(Xr)&&(Xr=null),Jr!==null&&Rl(Jr)&&(Jr=null),_i.forEach(ny),Ei.forEach(ny)}function Ri(t,r){t.blockedOn===r&&(t.blockedOn=null,Nd||(Nd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,VR)))}function Ii(t){function r(p){return Ri(p,t)}if(0<Pl.length){Ri(Pl[0],t);for(var i=1;i<Pl.length;i++){var c=Pl[i];c.blockedOn===t&&(c.blockedOn=null)}}for(Qr!==null&&Ri(Qr,t),Xr!==null&&Ri(Xr,t),Jr!==null&&Ri(Jr,t),_i.forEach(r),Ei.forEach(r),i=0;i<eo.length;i++)c=eo[i],c.blockedOn===t&&(c.blockedOn=null);for(;0<eo.length&&(i=eo[0],i.blockedOn===null);)ty(i),i.blockedOn===null&&eo.shift()}var Cs=T.ReactCurrentBatchConfig,Il=!0;function UR(t,r,i,c){var p=et,g=Cs.transition;Cs.transition=null;try{et=1,Od(t,r,i,c)}finally{et=p,Cs.transition=g}}function BR(t,r,i,c){var p=et,g=Cs.transition;Cs.transition=null;try{et=4,Od(t,r,i,c)}finally{et=p,Cs.transition=g}}function Od(t,r,i,c){if(Il){var p=Td(t,r,i,c);if(p===null)Yd(t,r,c,Dl,i),ey(t,c);else if(FR(p,t,r,i,c))c.stopPropagation();else if(ey(t,c),r&4&&-1<zR.indexOf(t)){for(;p!==null;){var g=Vi(p);if(g!==null&&Yv(g),g=Td(t,r,i,c),g===null&&Yd(t,r,c,Dl,i),g===p)break;p=g}p!==null&&c.stopPropagation()}else Yd(t,r,c,null,i)}}var Dl=null;function Td(t,r,i,c){if(Dl=null,t=wi(c),t=zo(t),t!==null)if(r=Lo(t),r===null)t=null;else if(i=r.tag,i===13){if(t=Fv(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null);return Dl=t,null}function ry(t){switch(t){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(DR()){case Ed:return 1;case Kv:return 4;case Sl:case NR:return 16;case Zv:return 536870912;default:return 16}default:return 16}}var to=null,Ad=null,Nl=null;function oy(){if(Nl)return Nl;var t,r=Ad,i=r.length,c,p="value"in to?to.value:to.textContent,g=p.length;for(t=0;t<i&&r[t]===p[t];t++);var x=i-t;for(c=1;c<=x&&r[i-c]===p[g-c];c++);return Nl=p.slice(t,1<c?1-c:void 0)}function Ol(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Tl(){return!0}function sy(){return!1}function nn(t){function r(i,c,p,g,x){this._reactName=i,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=x,this.currentTarget=null;for(var E in t)t.hasOwnProperty(E)&&(i=t[E],this[E]=i?i(g):g[E]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Tl:sy,this.isPropagationStopped=sy,this}return $(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Tl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Tl)},persist:function(){},isPersistent:Tl}),r}var _s={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$d=nn(_s),Di=$({},_s,{view:0,detail:0}),HR=nn(Di),Md,jd,Ni,Al=$({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ni&&(Ni&&t.type==="mousemove"?(Md=t.screenX-Ni.screenX,jd=t.screenY-Ni.screenY):jd=Md=0,Ni=t),Md)},movementY:function(t){return"movementY"in t?t.movementY:jd}}),iy=nn(Al),WR=$({},Al,{dataTransfer:0}),KR=nn(WR),ZR=$({},Di,{relatedTarget:0}),Ld=nn(ZR),GR=$({},_s,{animationName:0,elapsedTime:0,pseudoElement:0}),qR=nn(GR),YR=$({},_s,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),QR=nn(YR),XR=$({},_s,{data:0}),ay=nn(XR),JR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eI={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"},tI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nI(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=tI[t])?!!r[t]:!1}function zd(){return nI}var rI=$({},Di,{key:function(t){if(t.key){var r=JR[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Ol(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?eI[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(t){return t.type==="keypress"?Ol(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ol(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),oI=nn(rI),sI=$({},Al,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ly=nn(sI),iI=$({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),aI=nn(iI),lI=$({},_s,{propertyName:0,elapsedTime:0,pseudoElement:0}),cI=nn(lI),uI=$({},Al,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),dI=nn(uI),fI=[9,13,27,32],Fd=d&&"CompositionEvent"in window,Oi=null;d&&"documentMode"in document&&(Oi=document.documentMode);var pI=d&&"TextEvent"in window&&!Oi,cy=d&&(!Fd||Oi&&8<Oi&&11>=Oi),uy=" ",dy=!1;function fy(t,r){switch(t){case"keyup":return fI.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function py(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Es=!1;function hI(t,r){switch(t){case"compositionend":return py(r);case"keypress":return r.which!==32?null:(dy=!0,uy);case"textInput":return t=r.data,t===uy&&dy?null:t;default:return null}}function mI(t,r){if(Es)return t==="compositionend"||!Fd&&fy(t,r)?(t=oy(),Nl=Ad=to=null,Es=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return cy&&r.locale!=="ko"?null:r.data;default:return null}}var gI={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 hy(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!gI[t.type]:r==="textarea"}function my(t,r,i,c){Q(c),r=zl(r,"onChange"),0<r.length&&(i=new $d("onChange","change",null,i,c),t.push({event:i,listeners:r}))}var Ti=null,Ai=null;function vI(t){Ty(t,0)}function $l(t){var r=Ns(t);if(We(r))return t}function yI(t,r){if(t==="change")return r}var gy=!1;if(d){var Vd;if(d){var Ud="oninput"in document;if(!Ud){var vy=document.createElement("div");vy.setAttribute("oninput","return;"),Ud=typeof vy.oninput=="function"}Vd=Ud}else Vd=!1;gy=Vd&&(!document.documentMode||9<document.documentMode)}function yy(){Ti&&(Ti.detachEvent("onpropertychange",xy),Ai=Ti=null)}function xy(t){if(t.propertyName==="value"&&$l(Ai)){var r=[];my(r,Ai,t,wi(t)),qr(vI,r)}}function xI(t,r,i){t==="focusin"?(yy(),Ti=r,Ai=i,Ti.attachEvent("onpropertychange",xy)):t==="focusout"&&yy()}function wI(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return $l(Ai)}function bI(t,r){if(t==="click")return $l(r)}function SI(t,r){if(t==="input"||t==="change")return $l(r)}function kI(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var In=typeof Object.is=="function"?Object.is:kI;function $i(t,r){if(In(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),c=Object.keys(r);if(i.length!==c.length)return!1;for(c=0;c<i.length;c++){var p=i[c];if(!h.call(r,p)||!In(t[p],r[p]))return!1}return!0}function wy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function by(t,r){var i=wy(t);t=0;for(var c;i;){if(i.nodeType===3){if(c=t+i.textContent.length,t<=r&&c>=r)return{node:i,offset:r-t};t=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=wy(i)}}function Sy(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Sy(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function ky(){for(var t=window,r=Ue();r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=Ue(t.document)}return r}function Bd(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function CI(t){var r=ky(),i=t.focusedElem,c=t.selectionRange;if(r!==i&&i&&i.ownerDocument&&Sy(i.ownerDocument.documentElement,i)){if(c!==null&&Bd(i)){if(r=c.start,t=c.end,t===void 0&&(t=r),"selectionStart"in i)i.selectionStart=r,i.selectionEnd=Math.min(t,i.value.length);else if(t=(r=i.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var p=i.textContent.length,g=Math.min(c.start,p);c=c.end===void 0?g:Math.min(c.end,p),!t.extend&&g>c&&(p=c,c=g,g=p),p=by(i,g);var x=by(i,c);p&&x&&(t.rangeCount!==1||t.anchorNode!==p.node||t.anchorOffset!==p.offset||t.focusNode!==x.node||t.focusOffset!==x.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),t.removeAllRanges(),g>c?(t.addRange(r),t.extend(x.node,x.offset)):(r.setEnd(x.node,x.offset),t.addRange(r)))}}for(r=[],t=i;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<r.length;i++)t=r[i],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var _I=d&&"documentMode"in document&&11>=document.documentMode,Ps=null,Hd=null,Mi=null,Wd=!1;function Cy(t,r,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Wd||Ps==null||Ps!==Ue(c)||(c=Ps,"selectionStart"in c&&Bd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Mi&&$i(Mi,c)||(Mi=c,c=zl(Hd,"onSelect"),0<c.length&&(r=new $d("onSelect","select",null,r,i),t.push({event:r,listeners:c}),r.target=Ps)))}function Ml(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var Rs={animationend:Ml("Animation","AnimationEnd"),animationiteration:Ml("Animation","AnimationIteration"),animationstart:Ml("Animation","AnimationStart"),transitionend:Ml("Transition","TransitionEnd")},Kd={},_y={};d&&(_y=document.createElement("div").style,"AnimationEvent"in window||(delete Rs.animationend.animation,delete Rs.animationiteration.animation,delete Rs.animationstart.animation),"TransitionEvent"in window||delete Rs.transitionend.transition);function jl(t){if(Kd[t])return Kd[t];if(!Rs[t])return t;var r=Rs[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in _y)return Kd[t]=r[i];return t}var Ey=jl("animationend"),Py=jl("animationiteration"),Ry=jl("animationstart"),Iy=jl("transitionend"),Dy=new Map,Ny="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 no(t,r){Dy.set(t,r),l(r,[t])}for(var Zd=0;Zd<Ny.length;Zd++){var Gd=Ny[Zd],EI=Gd.toLowerCase(),PI=Gd[0].toUpperCase()+Gd.slice(1);no(EI,"on"+PI)}no(Ey,"onAnimationEnd"),no(Py,"onAnimationIteration"),no(Ry,"onAnimationStart"),no("dblclick","onDoubleClick"),no("focusin","onFocus"),no("focusout","onBlur"),no(Iy,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ji="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(" "),RI=new Set("cancel close invalid load scroll toggle".split(" ").concat(ji));function Oy(t,r,i){var c=t.type||"unknown-event";t.currentTarget=i,ER(c,r,void 0,t),t.currentTarget=null}function Ty(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var c=t[i],p=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var x=c.length-1;0<=x;x--){var E=c[x],I=E.instance,V=E.currentTarget;if(E=E.listener,I!==g&&p.isPropagationStopped())break e;Oy(p,E,V),g=I}else for(x=0;x<c.length;x++){if(E=c[x],I=E.instance,V=E.currentTarget,E=E.listener,I!==g&&p.isPropagationStopped())break e;Oy(p,E,V),g=I}}}if(bl)throw t=_d,bl=!1,_d=null,t}function ot(t,r){var i=r[nf];i===void 0&&(i=r[nf]=new Set);var c=t+"__bubble";i.has(c)||(Ay(r,t,2,!1),i.add(c))}function qd(t,r,i){var c=0;r&&(c|=4),Ay(i,t,c,r)}var Ll="_reactListening"+Math.random().toString(36).slice(2);function Li(t){if(!t[Ll]){t[Ll]=!0,s.forEach(function(i){i!=="selectionchange"&&(RI.has(i)||qd(i,!1,t),qd(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Ll]||(r[Ll]=!0,qd("selectionchange",!1,r))}}function Ay(t,r,i,c){switch(ry(r)){case 1:var p=UR;break;case 4:p=BR;break;default:p=Od}i=p.bind(null,r,i,t),p=void 0,!Je||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),c?p!==void 0?t.addEventListener(r,i,{capture:!0,passive:p}):t.addEventListener(r,i,!0):p!==void 0?t.addEventListener(r,i,{passive:p}):t.addEventListener(r,i,!1)}function Yd(t,r,i,c,p){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var x=c.tag;if(x===3||x===4){var E=c.stateNode.containerInfo;if(E===p||E.nodeType===8&&E.parentNode===p)break;if(x===4)for(x=c.return;x!==null;){var I=x.tag;if((I===3||I===4)&&(I=x.stateNode.containerInfo,I===p||I.nodeType===8&&I.parentNode===p))return;x=x.return}for(;E!==null;){if(x=zo(E),x===null)return;if(I=x.tag,I===5||I===6){c=g=x;continue e}E=E.parentNode}}c=c.return}qr(function(){var V=g,X=wi(i),ee=[];e:{var q=Dy.get(t);if(q!==void 0){var pe=$d,we=t;switch(t){case"keypress":if(Ol(i)===0)break e;case"keydown":case"keyup":pe=oI;break;case"focusin":we="focus",pe=Ld;break;case"focusout":we="blur",pe=Ld;break;case"beforeblur":case"afterblur":pe=Ld;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=iy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=KR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=aI;break;case Ey:case Py:case Ry:pe=qR;break;case Iy:pe=cI;break;case"scroll":pe=HR;break;case"wheel":pe=dI;break;case"copy":case"cut":case"paste":pe=QR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=ly}var Se=(r&4)!==0,gt=!Se&&t==="scroll",j=Se?q!==null?q+"Capture":null:q;Se=[];for(var M=V,F;M!==null;){F=M;var ie=F.stateNode;if(F.tag===5&&ie!==null&&(F=ie,j!==null&&(ie=Dt(M,j),ie!=null&&Se.push(zi(M,ie,F)))),gt)break;M=M.return}0<Se.length&&(q=new pe(q,we,null,i,X),ee.push({event:q,listeners:Se}))}}if((r&7)===0){e:{if(q=t==="mouseover"||t==="pointerover",pe=t==="mouseout"||t==="pointerout",q&&i!==xi&&(we=i.relatedTarget||i.fromElement)&&(zo(we)||we[xr]))break e;if((pe||q)&&(q=X.window===X?X:(q=X.ownerDocument)?q.defaultView||q.parentWindow:window,pe?(we=i.relatedTarget||i.toElement,pe=V,we=we?zo(we):null,we!==null&&(gt=Lo(we),we!==gt||we.tag!==5&&we.tag!==6)&&(we=null)):(pe=null,we=V),pe!==we)){if(Se=iy,ie="onMouseLeave",j="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(Se=ly,ie="onPointerLeave",j="onPointerEnter",M="pointer"),gt=pe==null?q:Ns(pe),F=we==null?q:Ns(we),q=new Se(ie,M+"leave",pe,i,X),q.target=gt,q.relatedTarget=F,ie=null,zo(X)===V&&(Se=new Se(j,M+"enter",we,i,X),Se.target=F,Se.relatedTarget=gt,ie=Se),gt=ie,pe&&we)t:{for(Se=pe,j=we,M=0,F=Se;F;F=Is(F))M++;for(F=0,ie=j;ie;ie=Is(ie))F++;for(;0<M-F;)Se=Is(Se),M--;for(;0<F-M;)j=Is(j),F--;for(;M--;){if(Se===j||j!==null&&Se===j.alternate)break t;Se=Is(Se),j=Is(j)}Se=null}else Se=null;pe!==null&&$y(ee,q,pe,Se,!1),we!==null&>!==null&&$y(ee,gt,we,Se,!0)}}e:{if(q=V?Ns(V):window,pe=q.nodeName&&q.nodeName.toLowerCase(),pe==="select"||pe==="input"&&q.type==="file")var _e=yI;else if(hy(q))if(gy)_e=SI;else{_e=wI;var Ee=xI}else(pe=q.nodeName)&&pe.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(_e=bI);if(_e&&(_e=_e(t,V))){my(ee,_e,i,X);break e}Ee&&Ee(t,q,V),t==="focusout"&&(Ee=q._wrapperState)&&Ee.controlled&&q.type==="number"&&Wr(q,"number",q.value)}switch(Ee=V?Ns(V):window,t){case"focusin":(hy(Ee)||Ee.contentEditable==="true")&&(Ps=Ee,Hd=V,Mi=null);break;case"focusout":Mi=Hd=Ps=null;break;case"mousedown":Wd=!0;break;case"contextmenu":case"mouseup":case"dragend":Wd=!1,Cy(ee,i,X);break;case"selectionchange":if(_I)break;case"keydown":case"keyup":Cy(ee,i,X)}var Pe;if(Fd)e:{switch(t){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Es?fy(t,i)&&(Oe="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(Oe="onCompositionStart");Oe&&(cy&&i.locale!=="ko"&&(Es||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Es&&(Pe=oy()):(to=X,Ad="value"in to?to.value:to.textContent,Es=!0)),Ee=zl(V,Oe),0<Ee.length&&(Oe=new ay(Oe,t,null,i,X),ee.push({event:Oe,listeners:Ee}),Pe?Oe.data=Pe:(Pe=py(i),Pe!==null&&(Oe.data=Pe)))),(Pe=pI?hI(t,i):mI(t,i))&&(V=zl(V,"onBeforeInput"),0<V.length&&(X=new ay("onBeforeInput","beforeinput",null,i,X),ee.push({event:X,listeners:V}),X.data=Pe))}Ty(ee,r)})}function zi(t,r,i){return{instance:t,listener:r,currentTarget:i}}function zl(t,r){for(var i=r+"Capture",c=[];t!==null;){var p=t,g=p.stateNode;p.tag===5&&g!==null&&(p=g,g=Dt(t,i),g!=null&&c.unshift(zi(t,g,p)),g=Dt(t,r),g!=null&&c.push(zi(t,g,p))),t=t.return}return c}function Is(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function $y(t,r,i,c,p){for(var g=r._reactName,x=[];i!==null&&i!==c;){var E=i,I=E.alternate,V=E.stateNode;if(I!==null&&I===c)break;E.tag===5&&V!==null&&(E=V,p?(I=Dt(i,g),I!=null&&x.unshift(zi(i,I,E))):p||(I=Dt(i,g),I!=null&&x.push(zi(i,I,E)))),i=i.return}x.length!==0&&t.push({event:r,listeners:x})}var II=/\r\n?/g,DI=/\u0000|\uFFFD/g;function My(t){return(typeof t=="string"?t:""+t).replace(II,`
|
|
6
|
-
`).replace(DI,"")}function Fl(t,r,i){if(r=My(r),My(t)!==r&&i)throw Error(o(425))}function Vl(){}var Qd=null,Xd=null;function Jd(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var ef=typeof setTimeout=="function"?setTimeout:void 0,NI=typeof clearTimeout=="function"?clearTimeout:void 0,jy=typeof Promise=="function"?Promise:void 0,OI=typeof queueMicrotask=="function"?queueMicrotask:typeof jy<"u"?function(t){return jy.resolve(null).then(t).catch(TI)}:ef;function TI(t){setTimeout(function(){throw t})}function tf(t,r){var i=r,c=0;do{var p=i.nextSibling;if(t.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"){if(c===0){t.removeChild(p),Ii(r);return}c--}else i!=="$"&&i!=="$?"&&i!=="$!"||c++;i=p}while(i);Ii(r)}function ro(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return t}function Ly(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"){if(r===0)return t;r--}else i==="/$"&&r++}t=t.previousSibling}return null}var Ds=Math.random().toString(36).slice(2),qn="__reactFiber$"+Ds,Fi="__reactProps$"+Ds,xr="__reactContainer$"+Ds,nf="__reactEvents$"+Ds,AI="__reactListeners$"+Ds,$I="__reactHandles$"+Ds;function zo(t){var r=t[qn];if(r)return r;for(var i=t.parentNode;i;){if(r=i[xr]||i[qn]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=Ly(t);t!==null;){if(i=t[qn])return i;t=Ly(t)}return r}t=i,i=t.parentNode}return null}function Vi(t){return t=t[qn]||t[xr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Ns(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(o(33))}function Ul(t){return t[Fi]||null}var rf=[],Os=-1;function oo(t){return{current:t}}function st(t){0>Os||(t.current=rf[Os],rf[Os]=null,Os--)}function rt(t,r){Os++,rf[Os]=t.current,t.current=r}var so={},At=oo(so),Gt=oo(!1),Fo=so;function Ts(t,r){var i=t.type.contextTypes;if(!i)return so;var c=t.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===r)return c.__reactInternalMemoizedMaskedChildContext;var p={},g;for(g in i)p[g]=r[g];return c&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=p),p}function qt(t){return t=t.childContextTypes,t!=null}function Bl(){st(Gt),st(At)}function zy(t,r,i){if(At.current!==so)throw Error(o(168));rt(At,r),rt(Gt,i)}function Fy(t,r,i){var c=t.stateNode;if(r=r.childContextTypes,typeof c.getChildContext!="function")return i;c=c.getChildContext();for(var p in c)if(!(p in r))throw Error(o(108,de(t)||"Unknown",p));return $({},i,c)}function Hl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||so,Fo=At.current,rt(At,t),rt(Gt,Gt.current),!0}function Vy(t,r,i){var c=t.stateNode;if(!c)throw Error(o(169));i?(t=Fy(t,r,Fo),c.__reactInternalMemoizedMergedChildContext=t,st(Gt),st(At),rt(At,t)):st(Gt),rt(Gt,i)}var wr=null,Wl=!1,of=!1;function Uy(t){wr===null?wr=[t]:wr.push(t)}function MI(t){Wl=!0,Uy(t)}function io(){if(!of&&wr!==null){of=!0;var t=0,r=et;try{var i=wr;for(et=1;t<i.length;t++){var c=i[t];do c=c(!0);while(c!==null)}wr=null,Wl=!1}catch(p){throw wr!==null&&(wr=wr.slice(t+1)),Hv(Ed,io),p}finally{et=r,of=!1}}return null}var As=[],$s=0,Kl=null,Zl=0,fn=[],pn=0,Vo=null,br=1,Sr="";function Uo(t,r){As[$s++]=Zl,As[$s++]=Kl,Kl=t,Zl=r}function By(t,r,i){fn[pn++]=br,fn[pn++]=Sr,fn[pn++]=Vo,Vo=t;var c=br;t=Sr;var p=32-Rn(c)-1;c&=~(1<<p),i+=1;var g=32-Rn(r)+p;if(30<g){var x=p-p%5;g=(c&(1<<x)-1).toString(32),c>>=x,p-=x,br=1<<32-Rn(r)+p|i<<p|c,Sr=g+t}else br=1<<g|i<<p|c,Sr=t}function sf(t){t.return!==null&&(Uo(t,1),By(t,1,0))}function af(t){for(;t===Kl;)Kl=As[--$s],As[$s]=null,Zl=As[--$s],As[$s]=null;for(;t===Vo;)Vo=fn[--pn],fn[pn]=null,Sr=fn[--pn],fn[pn]=null,br=fn[--pn],fn[pn]=null}var rn=null,on=null,lt=!1,Dn=null;function Hy(t,r){var i=vn(5,null,null,0);i.elementType="DELETED",i.stateNode=r,i.return=t,r=t.deletions,r===null?(t.deletions=[i],t.flags|=16):r.push(i)}function Wy(t,r){switch(t.tag){case 5:var i=t.type;return r=r.nodeType!==1||i.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(t.stateNode=r,rn=t,on=ro(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,rn=t,on=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(i=Vo!==null?{id:br,overflow:Sr}:null,t.memoizedState={dehydrated:r,treeContext:i,retryLane:1073741824},i=vn(18,null,null,0),i.stateNode=r,i.return=t,t.child=i,rn=t,on=null,!0):!1;default:return!1}}function lf(t){return(t.mode&1)!==0&&(t.flags&128)===0}function cf(t){if(lt){var r=on;if(r){var i=r;if(!Wy(t,r)){if(lf(t))throw Error(o(418));r=ro(i.nextSibling);var c=rn;r&&Wy(t,r)?Hy(c,i):(t.flags=t.flags&-4097|2,lt=!1,rn=t)}}else{if(lf(t))throw Error(o(418));t.flags=t.flags&-4097|2,lt=!1,rn=t}}}function Ky(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;rn=t}function Gl(t){if(t!==rn)return!1;if(!lt)return Ky(t),lt=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!Jd(t.type,t.memoizedProps)),r&&(r=on)){if(lf(t))throw Zy(),Error(o(418));for(;r;)Hy(t,r),r=ro(r.nextSibling)}if(Ky(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"){if(r===0){on=ro(t.nextSibling);break e}r--}else i!=="$"&&i!=="$!"&&i!=="$?"||r++}t=t.nextSibling}on=null}}else on=rn?ro(t.stateNode.nextSibling):null;return!0}function Zy(){for(var t=on;t;)t=ro(t.nextSibling)}function Ms(){on=rn=null,lt=!1}function uf(t){Dn===null?Dn=[t]:Dn.push(t)}var jI=T.ReactCurrentBatchConfig;function Ui(t,r,i){if(t=i.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(o(309));var c=i.stateNode}if(!c)throw Error(o(147,t));var p=c,g=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===g?r.ref:(r=function(x){var E=p.refs;x===null?delete E[g]:E[g]=x},r._stringRef=g,r)}if(typeof t!="string")throw Error(o(284));if(!i._owner)throw Error(o(290,t))}return t}function ql(t,r){throw t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function Gy(t){var r=t._init;return r(t._payload)}function qy(t){function r(j,M){if(t){var F=j.deletions;F===null?(j.deletions=[M],j.flags|=16):F.push(M)}}function i(j,M){if(!t)return null;for(;M!==null;)r(j,M),M=M.sibling;return null}function c(j,M){for(j=new Map;M!==null;)M.key!==null?j.set(M.key,M):j.set(M.index,M),M=M.sibling;return j}function p(j,M){return j=mo(j,M),j.index=0,j.sibling=null,j}function g(j,M,F){return j.index=F,t?(F=j.alternate,F!==null?(F=F.index,F<M?(j.flags|=2,M):F):(j.flags|=2,M)):(j.flags|=1048576,M)}function x(j){return t&&j.alternate===null&&(j.flags|=2),j}function E(j,M,F,ie){return M===null||M.tag!==6?(M=tp(F,j.mode,ie),M.return=j,M):(M=p(M,F),M.return=j,M)}function I(j,M,F,ie){var _e=F.type;return _e===B?X(j,M,F.props.children,ie,F.key):M!==null&&(M.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===le&&Gy(_e)===M.type)?(ie=p(M,F.props),ie.ref=Ui(j,M,F),ie.return=j,ie):(ie=xc(F.type,F.key,F.props,null,j.mode,ie),ie.ref=Ui(j,M,F),ie.return=j,ie)}function V(j,M,F,ie){return M===null||M.tag!==4||M.stateNode.containerInfo!==F.containerInfo||M.stateNode.implementation!==F.implementation?(M=np(F,j.mode,ie),M.return=j,M):(M=p(M,F.children||[]),M.return=j,M)}function X(j,M,F,ie,_e){return M===null||M.tag!==7?(M=Yo(F,j.mode,ie,_e),M.return=j,M):(M=p(M,F),M.return=j,M)}function ee(j,M,F){if(typeof M=="string"&&M!==""||typeof M=="number")return M=tp(""+M,j.mode,F),M.return=j,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case z:return F=xc(M.type,M.key,M.props,null,j.mode,F),F.ref=Ui(j,null,M),F.return=j,F;case R:return M=np(M,j.mode,F),M.return=j,M;case le:var ie=M._init;return ee(j,ie(M._payload),F)}if(gr(M)||G(M))return M=Yo(M,j.mode,F,null),M.return=j,M;ql(j,M)}return null}function q(j,M,F,ie){var _e=M!==null?M.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return _e!==null?null:E(j,M,""+F,ie);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case z:return F.key===_e?I(j,M,F,ie):null;case R:return F.key===_e?V(j,M,F,ie):null;case le:return _e=F._init,q(j,M,_e(F._payload),ie)}if(gr(F)||G(F))return _e!==null?null:X(j,M,F,ie,null);ql(j,F)}return null}function pe(j,M,F,ie,_e){if(typeof ie=="string"&&ie!==""||typeof ie=="number")return j=j.get(F)||null,E(M,j,""+ie,_e);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case z:return j=j.get(ie.key===null?F:ie.key)||null,I(M,j,ie,_e);case R:return j=j.get(ie.key===null?F:ie.key)||null,V(M,j,ie,_e);case le:var Ee=ie._init;return pe(j,M,F,Ee(ie._payload),_e)}if(gr(ie)||G(ie))return j=j.get(F)||null,X(M,j,ie,_e,null);ql(M,ie)}return null}function we(j,M,F,ie){for(var _e=null,Ee=null,Pe=M,Oe=M=0,Rt=null;Pe!==null&&Oe<F.length;Oe++){Pe.index>Oe?(Rt=Pe,Pe=null):Rt=Pe.sibling;var Ye=q(j,Pe,F[Oe],ie);if(Ye===null){Pe===null&&(Pe=Rt);break}t&&Pe&&Ye.alternate===null&&r(j,Pe),M=g(Ye,M,Oe),Ee===null?_e=Ye:Ee.sibling=Ye,Ee=Ye,Pe=Rt}if(Oe===F.length)return i(j,Pe),lt&&Uo(j,Oe),_e;if(Pe===null){for(;Oe<F.length;Oe++)Pe=ee(j,F[Oe],ie),Pe!==null&&(M=g(Pe,M,Oe),Ee===null?_e=Pe:Ee.sibling=Pe,Ee=Pe);return lt&&Uo(j,Oe),_e}for(Pe=c(j,Pe);Oe<F.length;Oe++)Rt=pe(Pe,j,Oe,F[Oe],ie),Rt!==null&&(t&&Rt.alternate!==null&&Pe.delete(Rt.key===null?Oe:Rt.key),M=g(Rt,M,Oe),Ee===null?_e=Rt:Ee.sibling=Rt,Ee=Rt);return t&&Pe.forEach(function(go){return r(j,go)}),lt&&Uo(j,Oe),_e}function Se(j,M,F,ie){var _e=G(F);if(typeof _e!="function")throw Error(o(150));if(F=_e.call(F),F==null)throw Error(o(151));for(var Ee=_e=null,Pe=M,Oe=M=0,Rt=null,Ye=F.next();Pe!==null&&!Ye.done;Oe++,Ye=F.next()){Pe.index>Oe?(Rt=Pe,Pe=null):Rt=Pe.sibling;var go=q(j,Pe,Ye.value,ie);if(go===null){Pe===null&&(Pe=Rt);break}t&&Pe&&go.alternate===null&&r(j,Pe),M=g(go,M,Oe),Ee===null?_e=go:Ee.sibling=go,Ee=go,Pe=Rt}if(Ye.done)return i(j,Pe),lt&&Uo(j,Oe),_e;if(Pe===null){for(;!Ye.done;Oe++,Ye=F.next())Ye=ee(j,Ye.value,ie),Ye!==null&&(M=g(Ye,M,Oe),Ee===null?_e=Ye:Ee.sibling=Ye,Ee=Ye);return lt&&Uo(j,Oe),_e}for(Pe=c(j,Pe);!Ye.done;Oe++,Ye=F.next())Ye=pe(Pe,j,Oe,Ye.value,ie),Ye!==null&&(t&&Ye.alternate!==null&&Pe.delete(Ye.key===null?Oe:Ye.key),M=g(Ye,M,Oe),Ee===null?_e=Ye:Ee.sibling=Ye,Ee=Ye);return t&&Pe.forEach(function(g2){return r(j,g2)}),lt&&Uo(j,Oe),_e}function gt(j,M,F,ie){if(typeof F=="object"&&F!==null&&F.type===B&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case z:e:{for(var _e=F.key,Ee=M;Ee!==null;){if(Ee.key===_e){if(_e=F.type,_e===B){if(Ee.tag===7){i(j,Ee.sibling),M=p(Ee,F.props.children),M.return=j,j=M;break e}}else if(Ee.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===le&&Gy(_e)===Ee.type){i(j,Ee.sibling),M=p(Ee,F.props),M.ref=Ui(j,Ee,F),M.return=j,j=M;break e}i(j,Ee);break}else r(j,Ee);Ee=Ee.sibling}F.type===B?(M=Yo(F.props.children,j.mode,ie,F.key),M.return=j,j=M):(ie=xc(F.type,F.key,F.props,null,j.mode,ie),ie.ref=Ui(j,M,F),ie.return=j,j=ie)}return x(j);case R:e:{for(Ee=F.key;M!==null;){if(M.key===Ee)if(M.tag===4&&M.stateNode.containerInfo===F.containerInfo&&M.stateNode.implementation===F.implementation){i(j,M.sibling),M=p(M,F.children||[]),M.return=j,j=M;break e}else{i(j,M);break}else r(j,M);M=M.sibling}M=np(F,j.mode,ie),M.return=j,j=M}return x(j);case le:return Ee=F._init,gt(j,M,Ee(F._payload),ie)}if(gr(F))return we(j,M,F,ie);if(G(F))return Se(j,M,F,ie);ql(j,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,M!==null&&M.tag===6?(i(j,M.sibling),M=p(M,F),M.return=j,j=M):(i(j,M),M=tp(F,j.mode,ie),M.return=j,j=M),x(j)):i(j,M)}return gt}var js=qy(!0),Yy=qy(!1),Yl=oo(null),Ql=null,Ls=null,df=null;function ff(){df=Ls=Ql=null}function pf(t){var r=Yl.current;st(Yl),t._currentValue=r}function hf(t,r,i){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===i)break;t=t.return}}function zs(t,r){Ql=t,df=Ls=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(Yt=!0),t.firstContext=null)}function hn(t){var r=t._currentValue;if(df!==t)if(t={context:t,memoizedValue:r,next:null},Ls===null){if(Ql===null)throw Error(o(308));Ls=t,Ql.dependencies={lanes:0,firstContext:t}}else Ls=Ls.next=t;return r}var Bo=null;function mf(t){Bo===null?Bo=[t]:Bo.push(t)}function Qy(t,r,i,c){var p=r.interleaved;return p===null?(i.next=i,mf(r)):(i.next=p.next,p.next=i),r.interleaved=i,kr(t,c)}function kr(t,r){t.lanes|=r;var i=t.alternate;for(i!==null&&(i.lanes|=r),i=t,t=t.return;t!==null;)t.childLanes|=r,i=t.alternate,i!==null&&(i.childLanes|=r),i=t,t=t.return;return i.tag===3?i.stateNode:null}var ao=!1;function gf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xy(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Cr(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function lo(t,r,i){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(qe&2)!==0){var p=c.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),c.pending=r,kr(t,i)}return p=c.interleaved,p===null?(r.next=r,mf(c)):(r.next=p.next,p.next=r),c.interleaved=r,kr(t,i)}function Xl(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194240)!==0)){var c=r.lanes;c&=t.pendingLanes,i|=c,r.lanes=i,Id(t,i)}}function Jy(t,r){var i=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var p=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var x={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};g===null?p=g=x:g=g.next=x,i=i.next}while(i!==null);g===null?p=g=r:g=g.next=r}else p=g=r;i={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,effects:c.effects},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}function Jl(t,r,i,c){var p=t.updateQueue;ao=!1;var g=p.firstBaseUpdate,x=p.lastBaseUpdate,E=p.shared.pending;if(E!==null){p.shared.pending=null;var I=E,V=I.next;I.next=null,x===null?g=V:x.next=V,x=I;var X=t.alternate;X!==null&&(X=X.updateQueue,E=X.lastBaseUpdate,E!==x&&(E===null?X.firstBaseUpdate=V:E.next=V,X.lastBaseUpdate=I))}if(g!==null){var ee=p.baseState;x=0,X=V=I=null,E=g;do{var q=E.lane,pe=E.eventTime;if((c&q)===q){X!==null&&(X=X.next={eventTime:pe,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var we=t,Se=E;switch(q=r,pe=i,Se.tag){case 1:if(we=Se.payload,typeof we=="function"){ee=we.call(pe,ee,q);break e}ee=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Se.payload,q=typeof we=="function"?we.call(pe,ee,q):we,q==null)break e;ee=$({},ee,q);break e;case 2:ao=!0}}E.callback!==null&&E.lane!==0&&(t.flags|=64,q=p.effects,q===null?p.effects=[E]:q.push(E))}else pe={eventTime:pe,lane:q,tag:E.tag,payload:E.payload,callback:E.callback,next:null},X===null?(V=X=pe,I=ee):X=X.next=pe,x|=q;if(E=E.next,E===null){if(E=p.shared.pending,E===null)break;q=E,E=q.next,q.next=null,p.lastBaseUpdate=q,p.shared.pending=null}}while(!0);if(X===null&&(I=ee),p.baseState=I,p.firstBaseUpdate=V,p.lastBaseUpdate=X,r=p.shared.interleaved,r!==null){p=r;do x|=p.lane,p=p.next;while(p!==r)}else g===null&&(p.shared.lanes=0);Ko|=x,t.lanes=x,t.memoizedState=ee}}function ex(t,r,i){if(t=r.effects,r.effects=null,t!==null)for(r=0;r<t.length;r++){var c=t[r],p=c.callback;if(p!==null){if(c.callback=null,c=i,typeof p!="function")throw Error(o(191,p));p.call(c)}}}var Bi={},Yn=oo(Bi),Hi=oo(Bi),Wi=oo(Bi);function Ho(t){if(t===Bi)throw Error(o(174));return t}function vf(t,r){switch(rt(Wi,r),rt(Hi,t),rt(Yn,Bi),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:ks(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=ks(r,t)}st(Yn),rt(Yn,r)}function Fs(){st(Yn),st(Hi),st(Wi)}function tx(t){Ho(Wi.current);var r=Ho(Yn.current),i=ks(r,t.type);r!==i&&(rt(Hi,t),rt(Yn,i))}function yf(t){Hi.current===t&&(st(Yn),st(Hi))}var ut=oo(0);function ec(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var xf=[];function wf(){for(var t=0;t<xf.length;t++)xf[t]._workInProgressVersionPrimary=null;xf.length=0}var tc=T.ReactCurrentDispatcher,bf=T.ReactCurrentBatchConfig,Wo=0,dt=null,bt=null,Et=null,nc=!1,Ki=!1,Zi=0,LI=0;function $t(){throw Error(o(321))}function Sf(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!In(t[i],r[i]))return!1;return!0}function kf(t,r,i,c,p,g){if(Wo=g,dt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,tc.current=t===null||t.memoizedState===null?UI:BI,t=i(c,p),Ki){g=0;do{if(Ki=!1,Zi=0,25<=g)throw Error(o(301));g+=1,Et=bt=null,r.updateQueue=null,tc.current=HI,t=i(c,p)}while(Ki)}if(tc.current=sc,r=bt!==null&&bt.next!==null,Wo=0,Et=bt=dt=null,nc=!1,r)throw Error(o(300));return t}function Cf(){var t=Zi!==0;return Zi=0,t}function Qn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Et===null?dt.memoizedState=Et=t:Et=Et.next=t,Et}function mn(){if(bt===null){var t=dt.alternate;t=t!==null?t.memoizedState:null}else t=bt.next;var r=Et===null?dt.memoizedState:Et.next;if(r!==null)Et=r,bt=t;else{if(t===null)throw Error(o(310));bt=t,t={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},Et===null?dt.memoizedState=Et=t:Et=Et.next=t}return Et}function Gi(t,r){return typeof r=="function"?r(t):r}function _f(t){var r=mn(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var c=bt,p=c.baseQueue,g=i.pending;if(g!==null){if(p!==null){var x=p.next;p.next=g.next,g.next=x}c.baseQueue=p=g,i.pending=null}if(p!==null){g=p.next,c=c.baseState;var E=x=null,I=null,V=g;do{var X=V.lane;if((Wo&X)===X)I!==null&&(I=I.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),c=V.hasEagerState?V.eagerState:t(c,V.action);else{var ee={lane:X,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};I===null?(E=I=ee,x=c):I=I.next=ee,dt.lanes|=X,Ko|=X}V=V.next}while(V!==null&&V!==g);I===null?x=c:I.next=E,In(c,r.memoizedState)||(Yt=!0),r.memoizedState=c,r.baseState=x,r.baseQueue=I,i.lastRenderedState=c}if(t=i.interleaved,t!==null){p=t;do g=p.lane,dt.lanes|=g,Ko|=g,p=p.next;while(p!==t)}else p===null&&(i.lanes=0);return[r.memoizedState,i.dispatch]}function Ef(t){var r=mn(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var c=i.dispatch,p=i.pending,g=r.memoizedState;if(p!==null){i.pending=null;var x=p=p.next;do g=t(g,x.action),x=x.next;while(x!==p);In(g,r.memoizedState)||(Yt=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),i.lastRenderedState=g}return[g,c]}function nx(){}function rx(t,r){var i=dt,c=mn(),p=r(),g=!In(c.memoizedState,p);if(g&&(c.memoizedState=p,Yt=!0),c=c.queue,Pf(ix.bind(null,i,c,t),[t]),c.getSnapshot!==r||g||Et!==null&&Et.memoizedState.tag&1){if(i.flags|=2048,qi(9,sx.bind(null,i,c,p,r),void 0,null),Pt===null)throw Error(o(349));(Wo&30)!==0||ox(i,r,p)}return p}function ox(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=dt.updateQueue,r===null?(r={lastEffect:null,stores:null},dt.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function sx(t,r,i,c){r.value=i,r.getSnapshot=c,ax(r)&&lx(t)}function ix(t,r,i){return i(function(){ax(r)&&lx(t)})}function ax(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!In(t,i)}catch{return!0}}function lx(t){var r=kr(t,1);r!==null&&An(r,t,1,-1)}function cx(t){var r=Qn();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gi,lastRenderedState:t},r.queue=t,t=t.dispatch=VI.bind(null,dt,t),[r.memoizedState,t]}function qi(t,r,i,c){return t={tag:t,create:r,destroy:i,deps:c,next:null},r=dt.updateQueue,r===null?(r={lastEffect:null,stores:null},dt.updateQueue=r,r.lastEffect=t.next=t):(i=r.lastEffect,i===null?r.lastEffect=t.next=t:(c=i.next,i.next=t,t.next=c,r.lastEffect=t)),t}function ux(){return mn().memoizedState}function rc(t,r,i,c){var p=Qn();dt.flags|=t,p.memoizedState=qi(1|r,i,void 0,c===void 0?null:c)}function oc(t,r,i,c){var p=mn();c=c===void 0?null:c;var g=void 0;if(bt!==null){var x=bt.memoizedState;if(g=x.destroy,c!==null&&Sf(c,x.deps)){p.memoizedState=qi(r,i,g,c);return}}dt.flags|=t,p.memoizedState=qi(1|r,i,g,c)}function dx(t,r){return rc(8390656,8,t,r)}function Pf(t,r){return oc(2048,8,t,r)}function fx(t,r){return oc(4,2,t,r)}function px(t,r){return oc(4,4,t,r)}function hx(t,r){if(typeof r=="function")return t=t(),r(t),function(){r(null)};if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function mx(t,r,i){return i=i!=null?i.concat([t]):null,oc(4,4,hx.bind(null,r,t),i)}function Rf(){}function gx(t,r){var i=mn();r=r===void 0?null:r;var c=i.memoizedState;return c!==null&&r!==null&&Sf(r,c[1])?c[0]:(i.memoizedState=[t,r],t)}function vx(t,r){var i=mn();r=r===void 0?null:r;var c=i.memoizedState;return c!==null&&r!==null&&Sf(r,c[1])?c[0]:(t=t(),i.memoizedState=[t,r],t)}function yx(t,r,i){return(Wo&21)===0?(t.baseState&&(t.baseState=!1,Yt=!0),t.memoizedState=i):(In(i,r)||(i=Gv(),dt.lanes|=i,Ko|=i,t.baseState=!0),r)}function zI(t,r){var i=et;et=i!==0&&4>i?i:4,t(!0);var c=bf.transition;bf.transition={};try{t(!1),r()}finally{et=i,bf.transition=c}}function xx(){return mn().memoizedState}function FI(t,r,i){var c=po(t);if(i={lane:c,action:i,hasEagerState:!1,eagerState:null,next:null},wx(t))bx(r,i);else if(i=Qy(t,r,i,c),i!==null){var p=Ht();An(i,t,c,p),Sx(i,r,c)}}function VI(t,r,i){var c=po(t),p={lane:c,action:i,hasEagerState:!1,eagerState:null,next:null};if(wx(t))bx(r,p);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var x=r.lastRenderedState,E=g(x,i);if(p.hasEagerState=!0,p.eagerState=E,In(E,x)){var I=r.interleaved;I===null?(p.next=p,mf(r)):(p.next=I.next,I.next=p),r.interleaved=p;return}}catch{}i=Qy(t,r,p,c),i!==null&&(p=Ht(),An(i,t,c,p),Sx(i,r,c))}}function wx(t){var r=t.alternate;return t===dt||r!==null&&r===dt}function bx(t,r){Ki=nc=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function Sx(t,r,i){if((i&4194240)!==0){var c=r.lanes;c&=t.pendingLanes,i|=c,r.lanes=i,Id(t,i)}}var sc={readContext:hn,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},UI={readContext:hn,useCallback:function(t,r){return Qn().memoizedState=[t,r===void 0?null:r],t},useContext:hn,useEffect:dx,useImperativeHandle:function(t,r,i){return i=i!=null?i.concat([t]):null,rc(4194308,4,hx.bind(null,r,t),i)},useLayoutEffect:function(t,r){return rc(4194308,4,t,r)},useInsertionEffect:function(t,r){return rc(4,2,t,r)},useMemo:function(t,r){var i=Qn();return r=r===void 0?null:r,t=t(),i.memoizedState=[t,r],t},useReducer:function(t,r,i){var c=Qn();return r=i!==void 0?i(r):r,c.memoizedState=c.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},c.queue=t,t=t.dispatch=FI.bind(null,dt,t),[c.memoizedState,t]},useRef:function(t){var r=Qn();return t={current:t},r.memoizedState=t},useState:cx,useDebugValue:Rf,useDeferredValue:function(t){return Qn().memoizedState=t},useTransition:function(){var t=cx(!1),r=t[0];return t=zI.bind(null,t[1]),Qn().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,i){var c=dt,p=Qn();if(lt){if(i===void 0)throw Error(o(407));i=i()}else{if(i=r(),Pt===null)throw Error(o(349));(Wo&30)!==0||ox(c,r,i)}p.memoizedState=i;var g={value:i,getSnapshot:r};return p.queue=g,dx(ix.bind(null,c,g,t),[t]),c.flags|=2048,qi(9,sx.bind(null,c,g,i,r),void 0,null),i},useId:function(){var t=Qn(),r=Pt.identifierPrefix;if(lt){var i=Sr,c=br;i=(c&~(1<<32-Rn(c)-1)).toString(32)+i,r=":"+r+"R"+i,i=Zi++,0<i&&(r+="H"+i.toString(32)),r+=":"}else i=LI++,r=":"+r+"r"+i.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},BI={readContext:hn,useCallback:gx,useContext:hn,useEffect:Pf,useImperativeHandle:mx,useInsertionEffect:fx,useLayoutEffect:px,useMemo:vx,useReducer:_f,useRef:ux,useState:function(){return _f(Gi)},useDebugValue:Rf,useDeferredValue:function(t){var r=mn();return yx(r,bt.memoizedState,t)},useTransition:function(){var t=_f(Gi)[0],r=mn().memoizedState;return[t,r]},useMutableSource:nx,useSyncExternalStore:rx,useId:xx,unstable_isNewReconciler:!1},HI={readContext:hn,useCallback:gx,useContext:hn,useEffect:Pf,useImperativeHandle:mx,useInsertionEffect:fx,useLayoutEffect:px,useMemo:vx,useReducer:Ef,useRef:ux,useState:function(){return Ef(Gi)},useDebugValue:Rf,useDeferredValue:function(t){var r=mn();return bt===null?r.memoizedState=t:yx(r,bt.memoizedState,t)},useTransition:function(){var t=Ef(Gi)[0],r=mn().memoizedState;return[t,r]},useMutableSource:nx,useSyncExternalStore:rx,useId:xx,unstable_isNewReconciler:!1};function Nn(t,r){if(t&&t.defaultProps){r=$({},r),t=t.defaultProps;for(var i in t)r[i]===void 0&&(r[i]=t[i]);return r}return r}function If(t,r,i,c){r=t.memoizedState,i=i(c,r),i=i==null?r:$({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var ic={isMounted:function(t){return(t=t._reactInternals)?Lo(t)===t:!1},enqueueSetState:function(t,r,i){t=t._reactInternals;var c=Ht(),p=po(t),g=Cr(c,p);g.payload=r,i!=null&&(g.callback=i),r=lo(t,g,p),r!==null&&(An(r,t,p,c),Xl(r,t,p))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var c=Ht(),p=po(t),g=Cr(c,p);g.tag=1,g.payload=r,i!=null&&(g.callback=i),r=lo(t,g,p),r!==null&&(An(r,t,p,c),Xl(r,t,p))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=Ht(),c=po(t),p=Cr(i,c);p.tag=2,r!=null&&(p.callback=r),r=lo(t,p,c),r!==null&&(An(r,t,c,i),Xl(r,t,c))}};function kx(t,r,i,c,p,g,x){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,x):r.prototype&&r.prototype.isPureReactComponent?!$i(i,c)||!$i(p,g):!0}function Cx(t,r,i){var c=!1,p=so,g=r.contextType;return typeof g=="object"&&g!==null?g=hn(g):(p=qt(r)?Fo:At.current,c=r.contextTypes,g=(c=c!=null)?Ts(t,p):so),r=new r(i,g),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=ic,t.stateNode=r,r._reactInternals=t,c&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=p,t.__reactInternalMemoizedMaskedChildContext=g),r}function _x(t,r,i,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,c),r.state!==t&&ic.enqueueReplaceState(r,r.state,null)}function Df(t,r,i,c){var p=t.stateNode;p.props=i,p.state=t.memoizedState,p.refs={},gf(t);var g=r.contextType;typeof g=="object"&&g!==null?p.context=hn(g):(g=qt(r)?Fo:At.current,p.context=Ts(t,g)),p.state=t.memoizedState,g=r.getDerivedStateFromProps,typeof g=="function"&&(If(t,r,g,i),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(r=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),r!==p.state&&ic.enqueueReplaceState(p,p.state,null),Jl(t,i,p,c),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308)}function Vs(t,r){try{var i="",c=r;do i+=H(c),c=c.return;while(c);var p=i}catch(g){p=`
|
|
4
|
+
`),w=p.length-1,_=g.length-1;1<=w&&0<=_&&p[w]!==g[_];)_--;for(;1<=w&&0<=_;w--,_--)if(p[w]!==g[_]){if(w!==1||_!==1)do if(w--,_--,0>_||p[w]!==g[_]){var A=`
|
|
5
|
+
`+p[w].replace(" at new "," at ");return t.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",t.displayName)),A}while(1<=w&&0<=_);break}}}finally{W=!1,Error.prepareStackTrace=a}return(t=t?t.displayName||t.name:"")?P(t):""}function H(t){switch(t.tag){case 5:return P(t.type);case 16:return P("Lazy");case 13:return P("Suspense");case 19:return P("SuspenseList");case 0:case 2:case 15:return t=Z(t.type,!1),t;case 11:return t=Z(t.type.render,!1),t;case 1:return t=Z(t.type,!0),t;default:return""}}function re(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case B:return"Fragment";case j:return"Portal";case K:return"Profiler";case I:return"StrictMode";case ce:return"Suspense";case ue:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case be:return(t.displayName||"Context")+".Consumer";case ae:return(t._context.displayName||"Context")+".Provider";case le:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Se:return r=t.displayName||null,r!==null?r:re(t.type)||"Memo";case q:r=t._payload,t=t._init;try{return re(t(r))}catch{}}return null}function de(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(r);case 8:return r===I?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Y(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function se(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Oe(t){var r=se(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var p=a.get,g=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(w){c=""+w,g.call(this,w)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Ue(t){t._valueTracker||(t._valueTracker=Oe(t))}function je(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return t&&(c=se(t)?t.checked?"true":"false":t.value),t=c,t!==a?(r.setValue(t),!0):!1}function We(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function xt(t,r){var a=r.checked;return M({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??t._wrapperState.initialChecked})}function ht(t,r){var a=r.defaultValue==null?"":r.defaultValue,c=r.checked!=null?r.checked:r.defaultChecked;a=Y(r.value!=null?r.value:a),t._wrapperState={initialChecked:c,initialValue:a,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function Qn(t,r){r=r.checked,r!=null&&O(t,"checked",r,!1)}function Rn(t,r){Qn(t,r);var a=Y(r.value),c=r.type;if(a!=null)c==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+a):t.value!==""+a&&(t.value=""+a);else if(c==="submit"||c==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?Lo(t,r.type,a):r.hasOwnProperty("defaultValue")&&Lo(t,r.type,Y(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function Zr(t,r,a){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var c=r.type;if(!(c!=="submit"&&c!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,a||r===t.value||(t.value=r),t.defaultValue=r}a=t.name,a!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,a!==""&&(t.name=a)}function Lo(t,r,a){(r!=="number"||We(t.ownerDocument)!==t)&&(a==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+a&&(t.defaultValue=""+a))}var ft=Array.isArray;function In(t,r,a,c){if(t=t.options,r){r={};for(var p=0;p<a.length;p++)r["$"+a[p]]=!0;for(a=0;a<t.length;a++)p=r.hasOwnProperty("$"+t[a].value),t[a].selected!==p&&(t[a].selected=p),p&&c&&(t[a].defaultSelected=!0)}else{for(a=""+Y(a),r=null,p=0;p<t.length;p++){if(t[p].value===a){t[p].selected=!0,c&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function Fo(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(o(91));return M({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function qr(t,r){var a=r.value;if(a==null){if(a=r.children,r=r.defaultValue,a!=null){if(r!=null)throw Error(o(92));if(ft(a)){if(1<a.length)throw Error(o(93));a=a[0]}r=a}r==null&&(r=""),a=r}t._wrapperState={initialValue:Y(a)}}function zo(t,r){var a=Y(r.value),c=Y(r.defaultValue);a!=null&&(a=""+a,a!==t.value&&(t.value=a),r.defaultValue==null&&t.defaultValue!==a&&(t.defaultValue=a)),c!=null&&(t.defaultValue=""+c)}function Tn(t){var r=t.textContent;r===t._wrapperState.initialValue&&r!==""&&r!==null&&(t.value=r)}function Ei(t){switch(t){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 Dn(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?Ei(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Yr,_i=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,a,c,p){MSApp.execUnsafeLocalFunction(function(){return t(r,a,c,p)})}:t})(function(t,r){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=r;else{for(Yr=Yr||document.createElement("div"),Yr.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=Yr.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function gn(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var an={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},Qr=["Webkit","ms","Moz","O"];Object.keys(an).forEach(function(t){Qr.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),an[r]=an[t]})});function _s(t,r,a){return r==null||typeof r=="boolean"||r===""?"":a||typeof r!="number"||r===0||an.hasOwnProperty(t)&&an[t]?(""+r).trim():r+"px"}function Sr(t,r){t=t.style;for(var a in r)if(r.hasOwnProperty(a)){var c=a.indexOf("--")===0,p=_s(a,r[a],c);a==="float"&&(a="cssFloat"),c?t.setProperty(a,p):t[a]=p}}var Vt=M({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 Xr(t,r){if(r){if(Vt[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(o(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(o(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(o(61))}if(r.style!=null&&typeof r.style!="object")throw Error(o(62))}}function Vo(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){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 Uo=null;function Pi(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ri=null,Jr=null,Cr=null;function Ii(t){if(t=Qi(t)){if(typeof Ri!="function")throw Error(o(280));var r=t.stateNode;r&&(r=Ql(r),Ri(t.stateNode,t.type,r))}}function Tl(t){Jr?Cr?Cr.push(t):Cr=[t]:Jr=t}function Ti(){if(Jr){var t=Jr,r=Cr;if(Cr=Jr=null,Ii(t),r)for(t=0;t<r.length;t++)Ii(r[t])}}function Di(t,r){return t(r)}function G(){}var Ee=!1;function Le(t,r,a){if(Ee)return t(r,a);Ee=!0;try{return Di(t,r,a)}finally{Ee=!1,(Jr!==null||Cr!==null)&&(G(),Ti())}}function Be(t,r){var a=t.stateNode;if(a===null)return null;var c=Ql(a);if(c===null)return null;a=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(o(231,r,typeof a));return a}var Ke=!1;if(d)try{var ln={};Object.defineProperty(ln,"passive",{get:function(){Ke=!0}}),window.addEventListener("test",ln,ln),window.removeEventListener("test",ln,ln)}catch{Ke=!1}function Ut(t,r,a,c,p,g,w,_,A){var V=Array.prototype.slice.call(arguments,3);try{r.apply(a,V)}catch(J){this.onError(J)}}var Xe=!1,Xn=null,cn=!1,Ni=null,QI={onError:function(t){Xe=!0,Xn=t}};function XI(t,r,a,c,p,g,w,_,A){Xe=!1,Xn=null,Ut.apply(QI,arguments)}function JI(t,r,a,c,p,g,w,_,A){if(XI.apply(this,arguments),Xe){if(Xe){var V=Xn;Xe=!1,Xn=null}else throw Error(o(198));cn||(cn=!0,Ni=V)}}function Bo(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function my(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function gy(t){if(Bo(t)!==t)throw Error(o(188))}function eT(t){var r=t.alternate;if(!r){if(r=Bo(t),r===null)throw Error(o(188));return r!==t?null:t}for(var a=t,c=r;;){var p=a.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){a=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===a)return gy(p),t;if(g===c)return gy(p),r;g=g.sibling}throw Error(o(188))}if(a.return!==c.return)a=p,c=g;else{for(var w=!1,_=p.child;_;){if(_===a){w=!0,a=p,c=g;break}if(_===c){w=!0,c=p,a=g;break}_=_.sibling}if(!w){for(_=g.child;_;){if(_===a){w=!0,a=g,c=p;break}if(_===c){w=!0,c=g,a=p;break}_=_.sibling}if(!w)throw Error(o(189))}}if(a.alternate!==c)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?t:r}function vy(t){return t=eT(t),t!==null?yy(t):null}function yy(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=yy(t);if(r!==null)return r;t=t.sibling}return null}var xy=e.unstable_scheduleCallback,wy=e.unstable_cancelCallback,tT=e.unstable_shouldYield,nT=e.unstable_requestPaint,mt=e.unstable_now,rT=e.unstable_getCurrentPriorityLevel,zd=e.unstable_ImmediatePriority,by=e.unstable_UserBlockingPriority,Dl=e.unstable_NormalPriority,oT=e.unstable_LowPriority,Sy=e.unstable_IdlePriority,Nl=null,Jn=null;function sT(t){if(Jn&&typeof Jn.onCommitFiberRoot=="function")try{Jn.onCommitFiberRoot(Nl,t,void 0,(t.current.flags&128)===128)}catch{}}var Nn=Math.clz32?Math.clz32:lT,iT=Math.log,aT=Math.LN2;function lT(t){return t>>>=0,t===0?32:31-(iT(t)/aT|0)|0}var Ol=64,Al=4194304;function Oi(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function $l(t,r){var a=t.pendingLanes;if(a===0)return 0;var c=0,p=t.suspendedLanes,g=t.pingedLanes,w=a&268435455;if(w!==0){var _=w&~p;_!==0?c=Oi(_):(g&=w,g!==0&&(c=Oi(g)))}else w=a&~p,w!==0?c=Oi(w):g!==0&&(c=Oi(g));if(c===0)return 0;if(r!==0&&r!==c&&(r&p)===0&&(p=c&-c,g=r&-r,p>=g||p===16&&(g&4194240)!==0))return r;if((c&4)!==0&&(c|=a&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=c;0<r;)a=31-Nn(r),p=1<<a,c|=t[a],r&=~p;return c}function cT(t,r){switch(t){case 1:case 2:case 4:return r+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 r+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 uT(t,r){for(var a=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,g=t.pendingLanes;0<g;){var w=31-Nn(g),_=1<<w,A=p[w];A===-1?((_&a)===0||(_&c)!==0)&&(p[w]=cT(_,r)):A<=r&&(t.expiredLanes|=_),g&=~_}}function Vd(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Cy(){var t=Ol;return Ol<<=1,(Ol&4194240)===0&&(Ol=64),t}function Ud(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function Ai(t,r,a){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Nn(r),t[r]=a}function dT(t,r){var a=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var c=t.eventTimes;for(t=t.expirationTimes;0<a;){var p=31-Nn(a),g=1<<p;r[p]=0,c[p]=-1,t[p]=-1,a&=~g}}function Bd(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var c=31-Nn(a),p=1<<c;p&r|t[c]&r&&(t[c]|=r),a&=~p}}var et=0;function ky(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Ey,Hd,_y,Py,Ry,Wd=!1,Ml=[],eo=null,to=null,no=null,$i=new Map,Mi=new Map,ro=[],fT="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 Iy(t,r){switch(t){case"focusin":case"focusout":eo=null;break;case"dragenter":case"dragleave":to=null;break;case"mouseover":case"mouseout":no=null;break;case"pointerover":case"pointerout":$i.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mi.delete(r.pointerId)}}function ji(t,r,a,c,p,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},r!==null&&(r=Qi(r),r!==null&&Hd(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function pT(t,r,a,c,p){switch(r){case"focusin":return eo=ji(eo,t,r,a,c,p),!0;case"dragenter":return to=ji(to,t,r,a,c,p),!0;case"mouseover":return no=ji(no,t,r,a,c,p),!0;case"pointerover":var g=p.pointerId;return $i.set(g,ji($i.get(g)||null,t,r,a,c,p)),!0;case"gotpointercapture":return g=p.pointerId,Mi.set(g,ji(Mi.get(g)||null,t,r,a,c,p)),!0}return!1}function Ty(t){var r=Ho(t.target);if(r!==null){var a=Bo(r);if(a!==null){if(r=a.tag,r===13){if(r=my(a),r!==null){t.blockedOn=r,Ry(t.priority,function(){_y(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function jl(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Gd(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(a===null){a=t.nativeEvent;var c=new a.constructor(a.type,a);Uo=c,a.target.dispatchEvent(c),Uo=null}else return r=Qi(a),r!==null&&Hd(r),t.blockedOn=a,!1;r.shift()}return!0}function Dy(t,r,a){jl(t)&&a.delete(r)}function hT(){Wd=!1,eo!==null&&jl(eo)&&(eo=null),to!==null&&jl(to)&&(to=null),no!==null&&jl(no)&&(no=null),$i.forEach(Dy),Mi.forEach(Dy)}function Li(t,r){t.blockedOn===r&&(t.blockedOn=null,Wd||(Wd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,hT)))}function Fi(t){function r(p){return Li(p,t)}if(0<Ml.length){Li(Ml[0],t);for(var a=1;a<Ml.length;a++){var c=Ml[a];c.blockedOn===t&&(c.blockedOn=null)}}for(eo!==null&&Li(eo,t),to!==null&&Li(to,t),no!==null&&Li(no,t),$i.forEach(r),Mi.forEach(r),a=0;a<ro.length;a++)c=ro[a],c.blockedOn===t&&(c.blockedOn=null);for(;0<ro.length&&(a=ro[0],a.blockedOn===null);)Ty(a),a.blockedOn===null&&ro.shift()}var Ps=R.ReactCurrentBatchConfig,Ll=!0;function mT(t,r,a,c){var p=et,g=Ps.transition;Ps.transition=null;try{et=1,Kd(t,r,a,c)}finally{et=p,Ps.transition=g}}function gT(t,r,a,c){var p=et,g=Ps.transition;Ps.transition=null;try{et=4,Kd(t,r,a,c)}finally{et=p,Ps.transition=g}}function Kd(t,r,a,c){if(Ll){var p=Gd(t,r,a,c);if(p===null)df(t,r,c,Fl,a),Iy(t,c);else if(pT(p,t,r,a,c))c.stopPropagation();else if(Iy(t,c),r&4&&-1<fT.indexOf(t)){for(;p!==null;){var g=Qi(p);if(g!==null&&Ey(g),g=Gd(t,r,a,c),g===null&&df(t,r,c,Fl,a),g===p)break;p=g}p!==null&&c.stopPropagation()}else df(t,r,c,null,a)}}var Fl=null;function Gd(t,r,a,c){if(Fl=null,t=Pi(c),t=Ho(t),t!==null)if(r=Bo(t),r===null)t=null;else if(a=r.tag,a===13){if(t=my(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null);return Fl=t,null}function Ny(t){switch(t){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(rT()){case zd:return 1;case by:return 4;case Dl:case oT:return 16;case Sy:return 536870912;default:return 16}default:return 16}}var oo=null,Zd=null,zl=null;function Oy(){if(zl)return zl;var t,r=Zd,a=r.length,c,p="value"in oo?oo.value:oo.textContent,g=p.length;for(t=0;t<a&&r[t]===p[t];t++);var w=a-t;for(c=1;c<=w&&r[a-c]===p[g-c];c++);return zl=p.slice(t,1<c?1-c:void 0)}function Vl(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Ul(){return!0}function Ay(){return!1}function un(t){function r(a,c,p,g,w){this._reactName=a,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Ul:Ay,this.isPropagationStopped=Ay,this}return M(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ul)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ul)},persist:function(){},isPersistent:Ul}),r}var Rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qd=un(Rs),zi=M({},Rs,{view:0,detail:0}),vT=un(zi),Yd,Qd,Vi,Bl=M({},zi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jd,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Vi&&(Vi&&t.type==="mousemove"?(Yd=t.screenX-Vi.screenX,Qd=t.screenY-Vi.screenY):Qd=Yd=0,Vi=t),Yd)},movementY:function(t){return"movementY"in t?t.movementY:Qd}}),$y=un(Bl),yT=M({},Bl,{dataTransfer:0}),xT=un(yT),wT=M({},zi,{relatedTarget:0}),Xd=un(wT),bT=M({},Rs,{animationName:0,elapsedTime:0,pseudoElement:0}),ST=un(bT),CT=M({},Rs,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),kT=un(CT),ET=M({},Rs,{data:0}),My=un(ET),_T={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PT={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"},RT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IT(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=RT[t])?!!r[t]:!1}function Jd(){return IT}var TT=M({},zi,{key:function(t){if(t.key){var r=_T[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Vl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?PT[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jd,charCode:function(t){return t.type==="keypress"?Vl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Vl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),DT=un(TT),NT=M({},Bl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jy=un(NT),OT=M({},zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jd}),AT=un(OT),$T=M({},Rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),MT=un($T),jT=M({},Bl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),LT=un(jT),FT=[9,13,27,32],ef=d&&"CompositionEvent"in window,Ui=null;d&&"documentMode"in document&&(Ui=document.documentMode);var zT=d&&"TextEvent"in window&&!Ui,Ly=d&&(!ef||Ui&&8<Ui&&11>=Ui),Fy=" ",zy=!1;function Vy(t,r){switch(t){case"keyup":return FT.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Is=!1;function VT(t,r){switch(t){case"compositionend":return Uy(r);case"keypress":return r.which!==32?null:(zy=!0,Fy);case"textInput":return t=r.data,t===Fy&&zy?null:t;default:return null}}function UT(t,r){if(Is)return t==="compositionend"||!ef&&Vy(t,r)?(t=Oy(),zl=Zd=oo=null,Is=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Ly&&r.locale!=="ko"?null:r.data;default:return null}}var BT={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 By(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!BT[t.type]:r==="textarea"}function Hy(t,r,a,c){Tl(c),r=Zl(r,"onChange"),0<r.length&&(a=new qd("onChange","change",null,a,c),t.push({event:a,listeners:r}))}var Bi=null,Hi=null;function HT(t){lx(t,0)}function Hl(t){var r=As(t);if(je(r))return t}function WT(t,r){if(t==="change")return r}var Wy=!1;if(d){var tf;if(d){var nf="oninput"in document;if(!nf){var Ky=document.createElement("div");Ky.setAttribute("oninput","return;"),nf=typeof Ky.oninput=="function"}tf=nf}else tf=!1;Wy=tf&&(!document.documentMode||9<document.documentMode)}function Gy(){Bi&&(Bi.detachEvent("onpropertychange",Zy),Hi=Bi=null)}function Zy(t){if(t.propertyName==="value"&&Hl(Hi)){var r=[];Hy(r,Hi,t,Pi(t)),Le(HT,r)}}function KT(t,r,a){t==="focusin"?(Gy(),Bi=r,Hi=a,Bi.attachEvent("onpropertychange",Zy)):t==="focusout"&&Gy()}function GT(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Hl(Hi)}function ZT(t,r){if(t==="click")return Hl(r)}function qT(t,r){if(t==="input"||t==="change")return Hl(r)}function YT(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var On=typeof Object.is=="function"?Object.is:YT;function Wi(t,r){if(On(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var p=a[c];if(!h.call(r,p)||!On(t[p],r[p]))return!1}return!0}function qy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Yy(t,r){var a=qy(t);t=0;for(var c;a;){if(a.nodeType===3){if(c=t+a.textContent.length,t<=r&&c>=r)return{node:a,offset:r-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=qy(a)}}function Qy(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Qy(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Xy(){for(var t=window,r=We();r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=We(t.document)}return r}function rf(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function QT(t){var r=Xy(),a=t.focusedElem,c=t.selectionRange;if(r!==a&&a&&a.ownerDocument&&Qy(a.ownerDocument.documentElement,a)){if(c!==null&&rf(a)){if(r=c.start,t=c.end,t===void 0&&(t=r),"selectionStart"in a)a.selectionStart=r,a.selectionEnd=Math.min(t,a.value.length);else if(t=(r=a.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var p=a.textContent.length,g=Math.min(c.start,p);c=c.end===void 0?g:Math.min(c.end,p),!t.extend&&g>c&&(p=c,c=g,g=p),p=Yy(a,g);var w=Yy(a,c);p&&w&&(t.rangeCount!==1||t.anchorNode!==p.node||t.anchorOffset!==p.offset||t.focusNode!==w.node||t.focusOffset!==w.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),t.removeAllRanges(),g>c?(t.addRange(r),t.extend(w.node,w.offset)):(r.setEnd(w.node,w.offset),t.addRange(r)))}}for(r=[],t=a;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<r.length;a++)t=r[a],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var XT=d&&"documentMode"in document&&11>=document.documentMode,Ts=null,of=null,Ki=null,sf=!1;function Jy(t,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;sf||Ts==null||Ts!==We(c)||(c=Ts,"selectionStart"in c&&rf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ki&&Wi(Ki,c)||(Ki=c,c=Zl(of,"onSelect"),0<c.length&&(r=new qd("onSelect","select",null,r,a),t.push({event:r,listeners:c}),r.target=Ts)))}function Wl(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var Ds={animationend:Wl("Animation","AnimationEnd"),animationiteration:Wl("Animation","AnimationIteration"),animationstart:Wl("Animation","AnimationStart"),transitionend:Wl("Transition","TransitionEnd")},af={},ex={};d&&(ex=document.createElement("div").style,"AnimationEvent"in window||(delete Ds.animationend.animation,delete Ds.animationiteration.animation,delete Ds.animationstart.animation),"TransitionEvent"in window||delete Ds.transitionend.transition);function Kl(t){if(af[t])return af[t];if(!Ds[t])return t;var r=Ds[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in ex)return af[t]=r[a];return t}var tx=Kl("animationend"),nx=Kl("animationiteration"),rx=Kl("animationstart"),ox=Kl("transitionend"),sx=new Map,ix="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 so(t,r){sx.set(t,r),l(r,[t])}for(var lf=0;lf<ix.length;lf++){var cf=ix[lf],JT=cf.toLowerCase(),eD=cf[0].toUpperCase()+cf.slice(1);so(JT,"on"+eD)}so(tx,"onAnimationEnd"),so(nx,"onAnimationIteration"),so(rx,"onAnimationStart"),so("dblclick","onDoubleClick"),so("focusin","onFocus"),so("focusout","onBlur"),so(ox,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gi="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(" "),tD=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gi));function ax(t,r,a){var c=t.type||"unknown-event";t.currentTarget=a,JI(c,r,void 0,t),t.currentTarget=null}function lx(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var c=t[a],p=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var w=c.length-1;0<=w;w--){var _=c[w],A=_.instance,V=_.currentTarget;if(_=_.listener,A!==g&&p.isPropagationStopped())break e;ax(p,_,V),g=A}else for(w=0;w<c.length;w++){if(_=c[w],A=_.instance,V=_.currentTarget,_=_.listener,A!==g&&p.isPropagationStopped())break e;ax(p,_,V),g=A}}}if(cn)throw t=Ni,cn=!1,Ni=null,t}function st(t,r){var a=r[vf];a===void 0&&(a=r[vf]=new Set);var c=t+"__bubble";a.has(c)||(cx(r,t,2,!1),a.add(c))}function uf(t,r,a){var c=0;r&&(c|=4),cx(a,t,c,r)}var Gl="_reactListening"+Math.random().toString(36).slice(2);function Zi(t){if(!t[Gl]){t[Gl]=!0,s.forEach(function(a){a!=="selectionchange"&&(tD.has(a)||uf(a,!1,t),uf(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Gl]||(r[Gl]=!0,uf("selectionchange",!1,r))}}function cx(t,r,a,c){switch(Ny(r)){case 1:var p=mT;break;case 4:p=gT;break;default:p=Kd}a=p.bind(null,r,a,t),p=void 0,!Ke||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),c?p!==void 0?t.addEventListener(r,a,{capture:!0,passive:p}):t.addEventListener(r,a,!0):p!==void 0?t.addEventListener(r,a,{passive:p}):t.addEventListener(r,a,!1)}function df(t,r,a,c,p){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var _=c.stateNode.containerInfo;if(_===p||_.nodeType===8&&_.parentNode===p)break;if(w===4)for(w=c.return;w!==null;){var A=w.tag;if((A===3||A===4)&&(A=w.stateNode.containerInfo,A===p||A.nodeType===8&&A.parentNode===p))return;w=w.return}for(;_!==null;){if(w=Ho(_),w===null)return;if(A=w.tag,A===5||A===6){c=g=w;continue e}_=_.parentNode}}c=c.return}Le(function(){var V=g,J=Pi(a),ee=[];e:{var X=sx.get(t);if(X!==void 0){var he=qd,we=t;switch(t){case"keypress":if(Vl(a)===0)break e;case"keydown":case"keyup":he=DT;break;case"focusin":we="focus",he=Xd;break;case"focusout":we="blur",he=Xd;break;case"beforeblur":case"afterblur":he=Xd;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=$y;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=xT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=AT;break;case tx:case nx:case rx:he=ST;break;case ox:he=MT;break;case"scroll":he=vT;break;case"wheel":he=LT;break;case"copy":case"cut":case"paste":he=kT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=jy}var Ce=(r&4)!==0,gt=!Ce&&t==="scroll",F=Ce?X!==null?X+"Capture":null:X;Ce=[];for(var $=V,z;$!==null;){z=$;var ie=z.stateNode;if(z.tag===5&&ie!==null&&(z=ie,F!==null&&(ie=Be($,F),ie!=null&&Ce.push(qi($,ie,z)))),gt)break;$=$.return}0<Ce.length&&(X=new he(X,we,null,a,J),ee.push({event:X,listeners:Ce}))}}if((r&7)===0){e:{if(X=t==="mouseover"||t==="pointerover",he=t==="mouseout"||t==="pointerout",X&&a!==Uo&&(we=a.relatedTarget||a.fromElement)&&(Ho(we)||we[kr]))break e;if((he||X)&&(X=J.window===J?J:(X=J.ownerDocument)?X.defaultView||X.parentWindow:window,he?(we=a.relatedTarget||a.toElement,he=V,we=we?Ho(we):null,we!==null&&(gt=Bo(we),we!==gt||we.tag!==5&&we.tag!==6)&&(we=null)):(he=null,we=V),he!==we)){if(Ce=$y,ie="onMouseLeave",F="onMouseEnter",$="mouse",(t==="pointerout"||t==="pointerover")&&(Ce=jy,ie="onPointerLeave",F="onPointerEnter",$="pointer"),gt=he==null?X:As(he),z=we==null?X:As(we),X=new Ce(ie,$+"leave",he,a,J),X.target=gt,X.relatedTarget=z,ie=null,Ho(J)===V&&(Ce=new Ce(F,$+"enter",we,a,J),Ce.target=z,Ce.relatedTarget=gt,ie=Ce),gt=ie,he&&we)t:{for(Ce=he,F=we,$=0,z=Ce;z;z=Ns(z))$++;for(z=0,ie=F;ie;ie=Ns(ie))z++;for(;0<$-z;)Ce=Ns(Ce),$--;for(;0<z-$;)F=Ns(F),z--;for(;$--;){if(Ce===F||F!==null&&Ce===F.alternate)break t;Ce=Ns(Ce),F=Ns(F)}Ce=null}else Ce=null;he!==null&&ux(ee,X,he,Ce,!1),we!==null&>!==null&&ux(ee,gt,we,Ce,!0)}}e:{if(X=V?As(V):window,he=X.nodeName&&X.nodeName.toLowerCase(),he==="select"||he==="input"&&X.type==="file")var _e=WT;else if(By(X))if(Wy)_e=qT;else{_e=GT;var Pe=KT}else(he=X.nodeName)&&he.toLowerCase()==="input"&&(X.type==="checkbox"||X.type==="radio")&&(_e=ZT);if(_e&&(_e=_e(t,V))){Hy(ee,_e,a,J);break e}Pe&&Pe(t,X,V),t==="focusout"&&(Pe=X._wrapperState)&&Pe.controlled&&X.type==="number"&&Lo(X,"number",X.value)}switch(Pe=V?As(V):window,t){case"focusin":(By(Pe)||Pe.contentEditable==="true")&&(Ts=Pe,of=V,Ki=null);break;case"focusout":Ki=of=Ts=null;break;case"mousedown":sf=!0;break;case"contextmenu":case"mouseup":case"dragend":sf=!1,Jy(ee,a,J);break;case"selectionchange":if(XT)break;case"keydown":case"keyup":Jy(ee,a,J)}var Re;if(ef)e:{switch(t){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Is?Vy(t,a)&&(De="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(De="onCompositionStart");De&&(Ly&&a.locale!=="ko"&&(Is||De!=="onCompositionStart"?De==="onCompositionEnd"&&Is&&(Re=Oy()):(oo=J,Zd="value"in oo?oo.value:oo.textContent,Is=!0)),Pe=Zl(V,De),0<Pe.length&&(De=new My(De,t,null,a,J),ee.push({event:De,listeners:Pe}),Re?De.data=Re:(Re=Uy(a),Re!==null&&(De.data=Re)))),(Re=zT?VT(t,a):UT(t,a))&&(V=Zl(V,"onBeforeInput"),0<V.length&&(J=new My("onBeforeInput","beforeinput",null,a,J),ee.push({event:J,listeners:V}),J.data=Re))}lx(ee,r)})}function qi(t,r,a){return{instance:t,listener:r,currentTarget:a}}function Zl(t,r){for(var a=r+"Capture",c=[];t!==null;){var p=t,g=p.stateNode;p.tag===5&&g!==null&&(p=g,g=Be(t,a),g!=null&&c.unshift(qi(t,g,p)),g=Be(t,r),g!=null&&c.push(qi(t,g,p))),t=t.return}return c}function Ns(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function ux(t,r,a,c,p){for(var g=r._reactName,w=[];a!==null&&a!==c;){var _=a,A=_.alternate,V=_.stateNode;if(A!==null&&A===c)break;_.tag===5&&V!==null&&(_=V,p?(A=Be(a,g),A!=null&&w.unshift(qi(a,A,_))):p||(A=Be(a,g),A!=null&&w.push(qi(a,A,_)))),a=a.return}w.length!==0&&t.push({event:r,listeners:w})}var nD=/\r\n?/g,rD=/\u0000|\uFFFD/g;function dx(t){return(typeof t=="string"?t:""+t).replace(nD,`
|
|
6
|
+
`).replace(rD,"")}function ql(t,r,a){if(r=dx(r),dx(t)!==r&&a)throw Error(o(425))}function Yl(){}var ff=null,pf=null;function hf(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var mf=typeof setTimeout=="function"?setTimeout:void 0,oD=typeof clearTimeout=="function"?clearTimeout:void 0,fx=typeof Promise=="function"?Promise:void 0,sD=typeof queueMicrotask=="function"?queueMicrotask:typeof fx<"u"?function(t){return fx.resolve(null).then(t).catch(iD)}:mf;function iD(t){setTimeout(function(){throw t})}function gf(t,r){var a=r,c=0;do{var p=a.nextSibling;if(t.removeChild(a),p&&p.nodeType===8)if(a=p.data,a==="/$"){if(c===0){t.removeChild(p),Fi(r);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=p}while(a);Fi(r)}function io(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return t}function px(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return t;r--}else a==="/$"&&r++}t=t.previousSibling}return null}var Os=Math.random().toString(36).slice(2),er="__reactFiber$"+Os,Yi="__reactProps$"+Os,kr="__reactContainer$"+Os,vf="__reactEvents$"+Os,aD="__reactListeners$"+Os,lD="__reactHandles$"+Os;function Ho(t){var r=t[er];if(r)return r;for(var a=t.parentNode;a;){if(r=a[kr]||a[er]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=px(t);t!==null;){if(a=t[er])return a;t=px(t)}return r}t=a,a=t.parentNode}return null}function Qi(t){return t=t[er]||t[kr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function As(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(o(33))}function Ql(t){return t[Yi]||null}var yf=[],$s=-1;function ao(t){return{current:t}}function it(t){0>$s||(t.current=yf[$s],yf[$s]=null,$s--)}function rt(t,r){$s++,yf[$s]=t.current,t.current=r}var lo={},At=ao(lo),qt=ao(!1),Wo=lo;function Ms(t,r){var a=t.type.contextTypes;if(!a)return lo;var c=t.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===r)return c.__reactInternalMemoizedMaskedChildContext;var p={},g;for(g in a)p[g]=r[g];return c&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=p),p}function Yt(t){return t=t.childContextTypes,t!=null}function Xl(){it(qt),it(At)}function hx(t,r,a){if(At.current!==lo)throw Error(o(168));rt(At,r),rt(qt,a)}function mx(t,r,a){var c=t.stateNode;if(r=r.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var p in c)if(!(p in r))throw Error(o(108,de(t)||"Unknown",p));return M({},a,c)}function Jl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||lo,Wo=At.current,rt(At,t),rt(qt,qt.current),!0}function gx(t,r,a){var c=t.stateNode;if(!c)throw Error(o(169));a?(t=mx(t,r,Wo),c.__reactInternalMemoizedMergedChildContext=t,it(qt),it(At),rt(At,t)):it(qt),rt(qt,a)}var Er=null,ec=!1,xf=!1;function vx(t){Er===null?Er=[t]:Er.push(t)}function cD(t){ec=!0,vx(t)}function co(){if(!xf&&Er!==null){xf=!0;var t=0,r=et;try{var a=Er;for(et=1;t<a.length;t++){var c=a[t];do c=c(!0);while(c!==null)}Er=null,ec=!1}catch(p){throw Er!==null&&(Er=Er.slice(t+1)),xy(zd,co),p}finally{et=r,xf=!1}}return null}var js=[],Ls=0,tc=null,nc=0,vn=[],yn=0,Ko=null,_r=1,Pr="";function Go(t,r){js[Ls++]=nc,js[Ls++]=tc,tc=t,nc=r}function yx(t,r,a){vn[yn++]=_r,vn[yn++]=Pr,vn[yn++]=Ko,Ko=t;var c=_r;t=Pr;var p=32-Nn(c)-1;c&=~(1<<p),a+=1;var g=32-Nn(r)+p;if(30<g){var w=p-p%5;g=(c&(1<<w)-1).toString(32),c>>=w,p-=w,_r=1<<32-Nn(r)+p|a<<p|c,Pr=g+t}else _r=1<<g|a<<p|c,Pr=t}function wf(t){t.return!==null&&(Go(t,1),yx(t,1,0))}function bf(t){for(;t===tc;)tc=js[--Ls],js[Ls]=null,nc=js[--Ls],js[Ls]=null;for(;t===Ko;)Ko=vn[--yn],vn[yn]=null,Pr=vn[--yn],vn[yn]=null,_r=vn[--yn],vn[yn]=null}var dn=null,fn=null,at=!1,An=null;function xx(t,r){var a=Sn(5,null,null,0);a.elementType="DELETED",a.stateNode=r,a.return=t,r=t.deletions,r===null?(t.deletions=[a],t.flags|=16):r.push(a)}function wx(t,r){switch(t.tag){case 5:var a=t.type;return r=r.nodeType!==1||a.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(t.stateNode=r,dn=t,fn=io(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,dn=t,fn=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(a=Ko!==null?{id:_r,overflow:Pr}:null,t.memoizedState={dehydrated:r,treeContext:a,retryLane:1073741824},a=Sn(18,null,null,0),a.stateNode=r,a.return=t,t.child=a,dn=t,fn=null,!0):!1;default:return!1}}function Sf(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Cf(t){if(at){var r=fn;if(r){var a=r;if(!wx(t,r)){if(Sf(t))throw Error(o(418));r=io(a.nextSibling);var c=dn;r&&wx(t,r)?xx(c,a):(t.flags=t.flags&-4097|2,at=!1,dn=t)}}else{if(Sf(t))throw Error(o(418));t.flags=t.flags&-4097|2,at=!1,dn=t}}}function bx(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;dn=t}function rc(t){if(t!==dn)return!1;if(!at)return bx(t),at=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!hf(t.type,t.memoizedProps)),r&&(r=fn)){if(Sf(t))throw Sx(),Error(o(418));for(;r;)xx(t,r),r=io(r.nextSibling)}if(bx(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"){if(r===0){fn=io(t.nextSibling);break e}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++}t=t.nextSibling}fn=null}}else fn=dn?io(t.stateNode.nextSibling):null;return!0}function Sx(){for(var t=fn;t;)t=io(t.nextSibling)}function Fs(){fn=dn=null,at=!1}function kf(t){An===null?An=[t]:An.push(t)}var uD=R.ReactCurrentBatchConfig;function Xi(t,r,a){if(t=a.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(o(309));var c=a.stateNode}if(!c)throw Error(o(147,t));var p=c,g=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===g?r.ref:(r=function(w){var _=p.refs;w===null?delete _[g]:_[g]=w},r._stringRef=g,r)}if(typeof t!="string")throw Error(o(284));if(!a._owner)throw Error(o(290,t))}return t}function oc(t,r){throw t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function Cx(t){var r=t._init;return r(t._payload)}function kx(t){function r(F,$){if(t){var z=F.deletions;z===null?(F.deletions=[$],F.flags|=16):z.push($)}}function a(F,$){if(!t)return null;for(;$!==null;)r(F,$),$=$.sibling;return null}function c(F,$){for(F=new Map;$!==null;)$.key!==null?F.set($.key,$):F.set($.index,$),$=$.sibling;return F}function p(F,$){return F=yo(F,$),F.index=0,F.sibling=null,F}function g(F,$,z){return F.index=z,t?(z=F.alternate,z!==null?(z=z.index,z<$?(F.flags|=2,$):z):(F.flags|=2,$)):(F.flags|=1048576,$)}function w(F){return t&&F.alternate===null&&(F.flags|=2),F}function _(F,$,z,ie){return $===null||$.tag!==6?($=mp(z,F.mode,ie),$.return=F,$):($=p($,z),$.return=F,$)}function A(F,$,z,ie){var _e=z.type;return _e===B?J(F,$,z.props.children,ie,z.key):$!==null&&($.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===q&&Cx(_e)===$.type)?(ie=p($,z.props),ie.ref=Xi(F,$,z),ie.return=F,ie):(ie=Rc(z.type,z.key,z.props,null,F.mode,ie),ie.ref=Xi(F,$,z),ie.return=F,ie)}function V(F,$,z,ie){return $===null||$.tag!==4||$.stateNode.containerInfo!==z.containerInfo||$.stateNode.implementation!==z.implementation?($=gp(z,F.mode,ie),$.return=F,$):($=p($,z.children||[]),$.return=F,$)}function J(F,$,z,ie,_e){return $===null||$.tag!==7?($=ts(z,F.mode,ie,_e),$.return=F,$):($=p($,z),$.return=F,$)}function ee(F,$,z){if(typeof $=="string"&&$!==""||typeof $=="number")return $=mp(""+$,F.mode,z),$.return=F,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case L:return z=Rc($.type,$.key,$.props,null,F.mode,z),z.ref=Xi(F,null,$),z.return=F,z;case j:return $=gp($,F.mode,z),$.return=F,$;case q:var ie=$._init;return ee(F,ie($._payload),z)}if(ft($)||Q($))return $=ts($,F.mode,z,null),$.return=F,$;oc(F,$)}return null}function X(F,$,z,ie){var _e=$!==null?$.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return _e!==null?null:_(F,$,""+z,ie);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case L:return z.key===_e?A(F,$,z,ie):null;case j:return z.key===_e?V(F,$,z,ie):null;case q:return _e=z._init,X(F,$,_e(z._payload),ie)}if(ft(z)||Q(z))return _e!==null?null:J(F,$,z,ie,null);oc(F,z)}return null}function he(F,$,z,ie,_e){if(typeof ie=="string"&&ie!==""||typeof ie=="number")return F=F.get(z)||null,_($,F,""+ie,_e);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case L:return F=F.get(ie.key===null?z:ie.key)||null,A($,F,ie,_e);case j:return F=F.get(ie.key===null?z:ie.key)||null,V($,F,ie,_e);case q:var Pe=ie._init;return he(F,$,z,Pe(ie._payload),_e)}if(ft(ie)||Q(ie))return F=F.get(z)||null,J($,F,ie,_e,null);oc($,ie)}return null}function we(F,$,z,ie){for(var _e=null,Pe=null,Re=$,De=$=0,It=null;Re!==null&&De<z.length;De++){Re.index>De?(It=Re,Re=null):It=Re.sibling;var Qe=X(F,Re,z[De],ie);if(Qe===null){Re===null&&(Re=It);break}t&&Re&&Qe.alternate===null&&r(F,Re),$=g(Qe,$,De),Pe===null?_e=Qe:Pe.sibling=Qe,Pe=Qe,Re=It}if(De===z.length)return a(F,Re),at&&Go(F,De),_e;if(Re===null){for(;De<z.length;De++)Re=ee(F,z[De],ie),Re!==null&&($=g(Re,$,De),Pe===null?_e=Re:Pe.sibling=Re,Pe=Re);return at&&Go(F,De),_e}for(Re=c(F,Re);De<z.length;De++)It=he(Re,F,De,z[De],ie),It!==null&&(t&&It.alternate!==null&&Re.delete(It.key===null?De:It.key),$=g(It,$,De),Pe===null?_e=It:Pe.sibling=It,Pe=It);return t&&Re.forEach(function(xo){return r(F,xo)}),at&&Go(F,De),_e}function Ce(F,$,z,ie){var _e=Q(z);if(typeof _e!="function")throw Error(o(150));if(z=_e.call(z),z==null)throw Error(o(151));for(var Pe=_e=null,Re=$,De=$=0,It=null,Qe=z.next();Re!==null&&!Qe.done;De++,Qe=z.next()){Re.index>De?(It=Re,Re=null):It=Re.sibling;var xo=X(F,Re,Qe.value,ie);if(xo===null){Re===null&&(Re=It);break}t&&Re&&xo.alternate===null&&r(F,Re),$=g(xo,$,De),Pe===null?_e=xo:Pe.sibling=xo,Pe=xo,Re=It}if(Qe.done)return a(F,Re),at&&Go(F,De),_e;if(Re===null){for(;!Qe.done;De++,Qe=z.next())Qe=ee(F,Qe.value,ie),Qe!==null&&($=g(Qe,$,De),Pe===null?_e=Qe:Pe.sibling=Qe,Pe=Qe);return at&&Go(F,De),_e}for(Re=c(F,Re);!Qe.done;De++,Qe=z.next())Qe=he(Re,F,De,Qe.value,ie),Qe!==null&&(t&&Qe.alternate!==null&&Re.delete(Qe.key===null?De:Qe.key),$=g(Qe,$,De),Pe===null?_e=Qe:Pe.sibling=Qe,Pe=Qe);return t&&Re.forEach(function(BD){return r(F,BD)}),at&&Go(F,De),_e}function gt(F,$,z,ie){if(typeof z=="object"&&z!==null&&z.type===B&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case L:e:{for(var _e=z.key,Pe=$;Pe!==null;){if(Pe.key===_e){if(_e=z.type,_e===B){if(Pe.tag===7){a(F,Pe.sibling),$=p(Pe,z.props.children),$.return=F,F=$;break e}}else if(Pe.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===q&&Cx(_e)===Pe.type){a(F,Pe.sibling),$=p(Pe,z.props),$.ref=Xi(F,Pe,z),$.return=F,F=$;break e}a(F,Pe);break}else r(F,Pe);Pe=Pe.sibling}z.type===B?($=ts(z.props.children,F.mode,ie,z.key),$.return=F,F=$):(ie=Rc(z.type,z.key,z.props,null,F.mode,ie),ie.ref=Xi(F,$,z),ie.return=F,F=ie)}return w(F);case j:e:{for(Pe=z.key;$!==null;){if($.key===Pe)if($.tag===4&&$.stateNode.containerInfo===z.containerInfo&&$.stateNode.implementation===z.implementation){a(F,$.sibling),$=p($,z.children||[]),$.return=F,F=$;break e}else{a(F,$);break}else r(F,$);$=$.sibling}$=gp(z,F.mode,ie),$.return=F,F=$}return w(F);case q:return Pe=z._init,gt(F,$,Pe(z._payload),ie)}if(ft(z))return we(F,$,z,ie);if(Q(z))return Ce(F,$,z,ie);oc(F,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,$!==null&&$.tag===6?(a(F,$.sibling),$=p($,z),$.return=F,F=$):(a(F,$),$=mp(z,F.mode,ie),$.return=F,F=$),w(F)):a(F,$)}return gt}var zs=kx(!0),Ex=kx(!1),sc=ao(null),ic=null,Vs=null,Ef=null;function _f(){Ef=Vs=ic=null}function Pf(t){var r=sc.current;it(sc),t._currentValue=r}function Rf(t,r,a){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===a)break;t=t.return}}function Us(t,r){ic=t,Ef=Vs=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(Qt=!0),t.firstContext=null)}function xn(t){var r=t._currentValue;if(Ef!==t)if(t={context:t,memoizedValue:r,next:null},Vs===null){if(ic===null)throw Error(o(308));Vs=t,ic.dependencies={lanes:0,firstContext:t}}else Vs=Vs.next=t;return r}var Zo=null;function If(t){Zo===null?Zo=[t]:Zo.push(t)}function _x(t,r,a,c){var p=r.interleaved;return p===null?(a.next=a,If(r)):(a.next=p.next,p.next=a),r.interleaved=a,Rr(t,c)}function Rr(t,r){t.lanes|=r;var a=t.alternate;for(a!==null&&(a.lanes|=r),a=t,t=t.return;t!==null;)t.childLanes|=r,a=t.alternate,a!==null&&(a.childLanes|=r),a=t,t=t.return;return a.tag===3?a.stateNode:null}var uo=!1;function Tf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Px(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ir(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function fo(t,r,a){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ye&2)!==0){var p=c.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),c.pending=r,Rr(t,a)}return p=c.interleaved,p===null?(r.next=r,If(c)):(r.next=p.next,p.next=r),c.interleaved=r,Rr(t,a)}function ac(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194240)!==0)){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,Bd(t,a)}}function Rx(t,r){var a=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var p=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var w={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?p=g=w:g=g.next=w,a=a.next}while(a!==null);g===null?p=g=r:g=g.next=r}else p=g=r;a={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,effects:c.effects},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}function lc(t,r,a,c){var p=t.updateQueue;uo=!1;var g=p.firstBaseUpdate,w=p.lastBaseUpdate,_=p.shared.pending;if(_!==null){p.shared.pending=null;var A=_,V=A.next;A.next=null,w===null?g=V:w.next=V,w=A;var J=t.alternate;J!==null&&(J=J.updateQueue,_=J.lastBaseUpdate,_!==w&&(_===null?J.firstBaseUpdate=V:_.next=V,J.lastBaseUpdate=A))}if(g!==null){var ee=p.baseState;w=0,J=V=A=null,_=g;do{var X=_.lane,he=_.eventTime;if((c&X)===X){J!==null&&(J=J.next={eventTime:he,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var we=t,Ce=_;switch(X=r,he=a,Ce.tag){case 1:if(we=Ce.payload,typeof we=="function"){ee=we.call(he,ee,X);break e}ee=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Ce.payload,X=typeof we=="function"?we.call(he,ee,X):we,X==null)break e;ee=M({},ee,X);break e;case 2:uo=!0}}_.callback!==null&&_.lane!==0&&(t.flags|=64,X=p.effects,X===null?p.effects=[_]:X.push(_))}else he={eventTime:he,lane:X,tag:_.tag,payload:_.payload,callback:_.callback,next:null},J===null?(V=J=he,A=ee):J=J.next=he,w|=X;if(_=_.next,_===null){if(_=p.shared.pending,_===null)break;X=_,_=X.next,X.next=null,p.lastBaseUpdate=X,p.shared.pending=null}}while(!0);if(J===null&&(A=ee),p.baseState=A,p.firstBaseUpdate=V,p.lastBaseUpdate=J,r=p.shared.interleaved,r!==null){p=r;do w|=p.lane,p=p.next;while(p!==r)}else g===null&&(p.shared.lanes=0);Qo|=w,t.lanes=w,t.memoizedState=ee}}function Ix(t,r,a){if(t=r.effects,r.effects=null,t!==null)for(r=0;r<t.length;r++){var c=t[r],p=c.callback;if(p!==null){if(c.callback=null,c=a,typeof p!="function")throw Error(o(191,p));p.call(c)}}}var Ji={},tr=ao(Ji),ea=ao(Ji),ta=ao(Ji);function qo(t){if(t===Ji)throw Error(o(174));return t}function Df(t,r){switch(rt(ta,r),rt(ea,t),rt(tr,Ji),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:Dn(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=Dn(r,t)}it(tr),rt(tr,r)}function Bs(){it(tr),it(ea),it(ta)}function Tx(t){qo(ta.current);var r=qo(tr.current),a=Dn(r,t.type);r!==a&&(rt(ea,t),rt(tr,a))}function Nf(t){ea.current===t&&(it(tr),it(ea))}var ct=ao(0);function cc(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Of=[];function Af(){for(var t=0;t<Of.length;t++)Of[t]._workInProgressVersionPrimary=null;Of.length=0}var uc=R.ReactCurrentDispatcher,$f=R.ReactCurrentBatchConfig,Yo=0,ut=null,Ct=null,Pt=null,dc=!1,na=!1,ra=0,dD=0;function $t(){throw Error(o(321))}function Mf(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!On(t[a],r[a]))return!1;return!0}function jf(t,r,a,c,p,g){if(Yo=g,ut=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,uc.current=t===null||t.memoizedState===null?mD:gD,t=a(c,p),na){g=0;do{if(na=!1,ra=0,25<=g)throw Error(o(301));g+=1,Pt=Ct=null,r.updateQueue=null,uc.current=vD,t=a(c,p)}while(na)}if(uc.current=hc,r=Ct!==null&&Ct.next!==null,Yo=0,Pt=Ct=ut=null,dc=!1,r)throw Error(o(300));return t}function Lf(){var t=ra!==0;return ra=0,t}function nr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?ut.memoizedState=Pt=t:Pt=Pt.next=t,Pt}function wn(){if(Ct===null){var t=ut.alternate;t=t!==null?t.memoizedState:null}else t=Ct.next;var r=Pt===null?ut.memoizedState:Pt.next;if(r!==null)Pt=r,Ct=t;else{if(t===null)throw Error(o(310));Ct=t,t={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Pt===null?ut.memoizedState=Pt=t:Pt=Pt.next=t}return Pt}function oa(t,r){return typeof r=="function"?r(t):r}function Ff(t){var r=wn(),a=r.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=t;var c=Ct,p=c.baseQueue,g=a.pending;if(g!==null){if(p!==null){var w=p.next;p.next=g.next,g.next=w}c.baseQueue=p=g,a.pending=null}if(p!==null){g=p.next,c=c.baseState;var _=w=null,A=null,V=g;do{var J=V.lane;if((Yo&J)===J)A!==null&&(A=A.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),c=V.hasEagerState?V.eagerState:t(c,V.action);else{var ee={lane:J,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};A===null?(_=A=ee,w=c):A=A.next=ee,ut.lanes|=J,Qo|=J}V=V.next}while(V!==null&&V!==g);A===null?w=c:A.next=_,On(c,r.memoizedState)||(Qt=!0),r.memoizedState=c,r.baseState=w,r.baseQueue=A,a.lastRenderedState=c}if(t=a.interleaved,t!==null){p=t;do g=p.lane,ut.lanes|=g,Qo|=g,p=p.next;while(p!==t)}else p===null&&(a.lanes=0);return[r.memoizedState,a.dispatch]}function zf(t){var r=wn(),a=r.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=t;var c=a.dispatch,p=a.pending,g=r.memoizedState;if(p!==null){a.pending=null;var w=p=p.next;do g=t(g,w.action),w=w.next;while(w!==p);On(g,r.memoizedState)||(Qt=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),a.lastRenderedState=g}return[g,c]}function Dx(){}function Nx(t,r){var a=ut,c=wn(),p=r(),g=!On(c.memoizedState,p);if(g&&(c.memoizedState=p,Qt=!0),c=c.queue,Vf($x.bind(null,a,c,t),[t]),c.getSnapshot!==r||g||Pt!==null&&Pt.memoizedState.tag&1){if(a.flags|=2048,sa(9,Ax.bind(null,a,c,p,r),void 0,null),Rt===null)throw Error(o(349));(Yo&30)!==0||Ox(a,r,p)}return p}function Ox(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=ut.updateQueue,r===null?(r={lastEffect:null,stores:null},ut.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function Ax(t,r,a,c){r.value=a,r.getSnapshot=c,Mx(r)&&jx(t)}function $x(t,r,a){return a(function(){Mx(r)&&jx(t)})}function Mx(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!On(t,a)}catch{return!0}}function jx(t){var r=Rr(t,1);r!==null&&Ln(r,t,1,-1)}function Lx(t){var r=nr();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:t},r.queue=t,t=t.dispatch=hD.bind(null,ut,t),[r.memoizedState,t]}function sa(t,r,a,c){return t={tag:t,create:r,destroy:a,deps:c,next:null},r=ut.updateQueue,r===null?(r={lastEffect:null,stores:null},ut.updateQueue=r,r.lastEffect=t.next=t):(a=r.lastEffect,a===null?r.lastEffect=t.next=t:(c=a.next,a.next=t,t.next=c,r.lastEffect=t)),t}function Fx(){return wn().memoizedState}function fc(t,r,a,c){var p=nr();ut.flags|=t,p.memoizedState=sa(1|r,a,void 0,c===void 0?null:c)}function pc(t,r,a,c){var p=wn();c=c===void 0?null:c;var g=void 0;if(Ct!==null){var w=Ct.memoizedState;if(g=w.destroy,c!==null&&Mf(c,w.deps)){p.memoizedState=sa(r,a,g,c);return}}ut.flags|=t,p.memoizedState=sa(1|r,a,g,c)}function zx(t,r){return fc(8390656,8,t,r)}function Vf(t,r){return pc(2048,8,t,r)}function Vx(t,r){return pc(4,2,t,r)}function Ux(t,r){return pc(4,4,t,r)}function Bx(t,r){if(typeof r=="function")return t=t(),r(t),function(){r(null)};if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Hx(t,r,a){return a=a!=null?a.concat([t]):null,pc(4,4,Bx.bind(null,r,t),a)}function Uf(){}function Wx(t,r){var a=wn();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&Mf(r,c[1])?c[0]:(a.memoizedState=[t,r],t)}function Kx(t,r){var a=wn();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&Mf(r,c[1])?c[0]:(t=t(),a.memoizedState=[t,r],t)}function Gx(t,r,a){return(Yo&21)===0?(t.baseState&&(t.baseState=!1,Qt=!0),t.memoizedState=a):(On(a,r)||(a=Cy(),ut.lanes|=a,Qo|=a,t.baseState=!0),r)}function fD(t,r){var a=et;et=a!==0&&4>a?a:4,t(!0);var c=$f.transition;$f.transition={};try{t(!1),r()}finally{et=a,$f.transition=c}}function Zx(){return wn().memoizedState}function pD(t,r,a){var c=go(t);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},qx(t))Yx(r,a);else if(a=_x(t,r,a,c),a!==null){var p=Ht();Ln(a,t,c,p),Qx(a,r,c)}}function hD(t,r,a){var c=go(t),p={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(qx(t))Yx(r,p);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var w=r.lastRenderedState,_=g(w,a);if(p.hasEagerState=!0,p.eagerState=_,On(_,w)){var A=r.interleaved;A===null?(p.next=p,If(r)):(p.next=A.next,A.next=p),r.interleaved=p;return}}catch{}a=_x(t,r,p,c),a!==null&&(p=Ht(),Ln(a,t,c,p),Qx(a,r,c))}}function qx(t){var r=t.alternate;return t===ut||r!==null&&r===ut}function Yx(t,r){na=dc=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function Qx(t,r,a){if((a&4194240)!==0){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,Bd(t,a)}}var hc={readContext:xn,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},mD={readContext:xn,useCallback:function(t,r){return nr().memoizedState=[t,r===void 0?null:r],t},useContext:xn,useEffect:zx,useImperativeHandle:function(t,r,a){return a=a!=null?a.concat([t]):null,fc(4194308,4,Bx.bind(null,r,t),a)},useLayoutEffect:function(t,r){return fc(4194308,4,t,r)},useInsertionEffect:function(t,r){return fc(4,2,t,r)},useMemo:function(t,r){var a=nr();return r=r===void 0?null:r,t=t(),a.memoizedState=[t,r],t},useReducer:function(t,r,a){var c=nr();return r=a!==void 0?a(r):r,c.memoizedState=c.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},c.queue=t,t=t.dispatch=pD.bind(null,ut,t),[c.memoizedState,t]},useRef:function(t){var r=nr();return t={current:t},r.memoizedState=t},useState:Lx,useDebugValue:Uf,useDeferredValue:function(t){return nr().memoizedState=t},useTransition:function(){var t=Lx(!1),r=t[0];return t=fD.bind(null,t[1]),nr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,a){var c=ut,p=nr();if(at){if(a===void 0)throw Error(o(407));a=a()}else{if(a=r(),Rt===null)throw Error(o(349));(Yo&30)!==0||Ox(c,r,a)}p.memoizedState=a;var g={value:a,getSnapshot:r};return p.queue=g,zx($x.bind(null,c,g,t),[t]),c.flags|=2048,sa(9,Ax.bind(null,c,g,a,r),void 0,null),a},useId:function(){var t=nr(),r=Rt.identifierPrefix;if(at){var a=Pr,c=_r;a=(c&~(1<<32-Nn(c)-1)).toString(32)+a,r=":"+r+"R"+a,a=ra++,0<a&&(r+="H"+a.toString(32)),r+=":"}else a=dD++,r=":"+r+"r"+a.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},gD={readContext:xn,useCallback:Wx,useContext:xn,useEffect:Vf,useImperativeHandle:Hx,useInsertionEffect:Vx,useLayoutEffect:Ux,useMemo:Kx,useReducer:Ff,useRef:Fx,useState:function(){return Ff(oa)},useDebugValue:Uf,useDeferredValue:function(t){var r=wn();return Gx(r,Ct.memoizedState,t)},useTransition:function(){var t=Ff(oa)[0],r=wn().memoizedState;return[t,r]},useMutableSource:Dx,useSyncExternalStore:Nx,useId:Zx,unstable_isNewReconciler:!1},vD={readContext:xn,useCallback:Wx,useContext:xn,useEffect:Vf,useImperativeHandle:Hx,useInsertionEffect:Vx,useLayoutEffect:Ux,useMemo:Kx,useReducer:zf,useRef:Fx,useState:function(){return zf(oa)},useDebugValue:Uf,useDeferredValue:function(t){var r=wn();return Ct===null?r.memoizedState=t:Gx(r,Ct.memoizedState,t)},useTransition:function(){var t=zf(oa)[0],r=wn().memoizedState;return[t,r]},useMutableSource:Dx,useSyncExternalStore:Nx,useId:Zx,unstable_isNewReconciler:!1};function $n(t,r){if(t&&t.defaultProps){r=M({},r),t=t.defaultProps;for(var a in t)r[a]===void 0&&(r[a]=t[a]);return r}return r}function Bf(t,r,a,c){r=t.memoizedState,a=a(c,r),a=a==null?r:M({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var mc={isMounted:function(t){return(t=t._reactInternals)?Bo(t)===t:!1},enqueueSetState:function(t,r,a){t=t._reactInternals;var c=Ht(),p=go(t),g=Ir(c,p);g.payload=r,a!=null&&(g.callback=a),r=fo(t,g,p),r!==null&&(Ln(r,t,p,c),ac(r,t,p))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var c=Ht(),p=go(t),g=Ir(c,p);g.tag=1,g.payload=r,a!=null&&(g.callback=a),r=fo(t,g,p),r!==null&&(Ln(r,t,p,c),ac(r,t,p))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=Ht(),c=go(t),p=Ir(a,c);p.tag=2,r!=null&&(p.callback=r),r=fo(t,p,c),r!==null&&(Ln(r,t,c,a),ac(r,t,c))}};function Xx(t,r,a,c,p,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):r.prototype&&r.prototype.isPureReactComponent?!Wi(a,c)||!Wi(p,g):!0}function Jx(t,r,a){var c=!1,p=lo,g=r.contextType;return typeof g=="object"&&g!==null?g=xn(g):(p=Yt(r)?Wo:At.current,c=r.contextTypes,g=(c=c!=null)?Ms(t,p):lo),r=new r(a,g),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=mc,t.stateNode=r,r._reactInternals=t,c&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=p,t.__reactInternalMemoizedMaskedChildContext=g),r}function ew(t,r,a,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==t&&mc.enqueueReplaceState(r,r.state,null)}function Hf(t,r,a,c){var p=t.stateNode;p.props=a,p.state=t.memoizedState,p.refs={},Tf(t);var g=r.contextType;typeof g=="object"&&g!==null?p.context=xn(g):(g=Yt(r)?Wo:At.current,p.context=Ms(t,g)),p.state=t.memoizedState,g=r.getDerivedStateFromProps,typeof g=="function"&&(Bf(t,r,g,a),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(r=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),r!==p.state&&mc.enqueueReplaceState(p,p.state,null),lc(t,a,p,c),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308)}function Hs(t,r){try{var a="",c=r;do a+=H(c),c=c.return;while(c);var p=a}catch(g){p=`
|
|
7
7
|
Error generating stack: `+g.message+`
|
|
8
|
-
`+g.stack}return{value:t,source:r,stack:p,digest:null}}function Nf(t,r,i){return{value:t,source:null,stack:i??null,digest:r??null}}function Of(t,r){try{console.error(r.value)}catch(i){setTimeout(function(){throw i})}}var WI=typeof WeakMap=="function"?WeakMap:Map;function Ex(t,r,i){i=Cr(-1,i),i.tag=3,i.payload={element:null};var c=r.value;return i.callback=function(){pc||(pc=!0,Zf=c),Of(t,r)},i}function Px(t,r,i){i=Cr(-1,i),i.tag=3;var c=t.type.getDerivedStateFromError;if(typeof c=="function"){var p=r.value;i.payload=function(){return c(p)},i.callback=function(){Of(t,r)}}var g=t.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(i.callback=function(){Of(t,r),typeof c!="function"&&(uo===null?uo=new Set([this]):uo.add(this));var x=r.stack;this.componentDidCatch(r.value,{componentStack:x!==null?x:""})}),i}function Rx(t,r,i){var c=t.pingCache;if(c===null){c=t.pingCache=new WI;var p=new Set;c.set(r,p)}else p=c.get(r),p===void 0&&(p=new Set,c.set(r,p));p.has(i)||(p.add(i),t=s2.bind(null,t,r,i),r.then(t,t))}function Ix(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function Dx(t,r,i,c,p){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(r=Cr(-1,1),r.tag=2,lo(i,r,1))),i.lanes|=1),t):(t.flags|=65536,t.lanes=p,t)}var KI=T.ReactCurrentOwner,Yt=!1;function Bt(t,r,i,c){r.child=t===null?Yy(r,null,i,c):js(r,t.child,i,c)}function Nx(t,r,i,c,p){i=i.render;var g=r.ref;return zs(r,p),c=kf(t,r,i,c,g,p),i=Cf(),t!==null&&!Yt?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,_r(t,r,p)):(lt&&i&&sf(r),r.flags|=1,Bt(t,r,c,p),r.child)}function Ox(t,r,i,c,p){if(t===null){var g=i.type;return typeof g=="function"&&!ep(g)&&g.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(r.tag=15,r.type=g,Tx(t,r,g,c,p)):(t=xc(i.type,null,c,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,(t.lanes&p)===0){var x=g.memoizedProps;if(i=i.compare,i=i!==null?i:$i,i(x,c)&&t.ref===r.ref)return _r(t,r,p)}return r.flags|=1,t=mo(g,c),t.ref=r.ref,t.return=r,r.child=t}function Tx(t,r,i,c,p){if(t!==null){var g=t.memoizedProps;if($i(g,c)&&t.ref===r.ref)if(Yt=!1,r.pendingProps=c=g,(t.lanes&p)!==0)(t.flags&131072)!==0&&(Yt=!0);else return r.lanes=t.lanes,_r(t,r,p)}return Tf(t,r,i,c,p)}function Ax(t,r,i){var c=r.pendingProps,p=c.children,g=t!==null?t.memoizedState:null;if(c.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},rt(Bs,sn),sn|=i;else{if((i&1073741824)===0)return t=g!==null?g.baseLanes|i:i,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,rt(Bs,sn),sn|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:i,rt(Bs,sn),sn|=c}else g!==null?(c=g.baseLanes|i,r.memoizedState=null):c=i,rt(Bs,sn),sn|=c;return Bt(t,r,p,i),r.child}function $x(t,r){var i=r.ref;(t===null&&i!==null||t!==null&&t.ref!==i)&&(r.flags|=512,r.flags|=2097152)}function Tf(t,r,i,c,p){var g=qt(i)?Fo:At.current;return g=Ts(r,g),zs(r,p),i=kf(t,r,i,c,g,p),c=Cf(),t!==null&&!Yt?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,_r(t,r,p)):(lt&&c&&sf(r),r.flags|=1,Bt(t,r,i,p),r.child)}function Mx(t,r,i,c,p){if(qt(i)){var g=!0;Hl(r)}else g=!1;if(zs(r,p),r.stateNode===null)lc(t,r),Cx(r,i,c),Df(r,i,c,p),c=!0;else if(t===null){var x=r.stateNode,E=r.memoizedProps;x.props=E;var I=x.context,V=i.contextType;typeof V=="object"&&V!==null?V=hn(V):(V=qt(i)?Fo:At.current,V=Ts(r,V));var X=i.getDerivedStateFromProps,ee=typeof X=="function"||typeof x.getSnapshotBeforeUpdate=="function";ee||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(E!==c||I!==V)&&_x(r,x,c,V),ao=!1;var q=r.memoizedState;x.state=q,Jl(r,c,x,p),I=r.memoizedState,E!==c||q!==I||Gt.current||ao?(typeof X=="function"&&(If(r,i,X,c),I=r.memoizedState),(E=ao||kx(r,i,E,c,q,I,V))?(ee||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(r.flags|=4194308)):(typeof x.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=I),x.props=c,x.state=I,x.context=V,c=E):(typeof x.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{x=r.stateNode,Xy(t,r),E=r.memoizedProps,V=r.type===r.elementType?E:Nn(r.type,E),x.props=V,ee=r.pendingProps,q=x.context,I=i.contextType,typeof I=="object"&&I!==null?I=hn(I):(I=qt(i)?Fo:At.current,I=Ts(r,I));var pe=i.getDerivedStateFromProps;(X=typeof pe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(E!==ee||q!==I)&&_x(r,x,c,I),ao=!1,q=r.memoizedState,x.state=q,Jl(r,c,x,p);var we=r.memoizedState;E!==ee||q!==we||Gt.current||ao?(typeof pe=="function"&&(If(r,i,pe,c),we=r.memoizedState),(V=ao||kx(r,i,V,c,q,we,I)||!1)?(X||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(c,we,I),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(c,we,I)),typeof x.componentDidUpdate=="function"&&(r.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof x.componentDidUpdate!="function"||E===t.memoizedProps&&q===t.memoizedState||(r.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&q===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=we),x.props=c,x.state=we,x.context=I,c=V):(typeof x.componentDidUpdate!="function"||E===t.memoizedProps&&q===t.memoizedState||(r.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&q===t.memoizedState||(r.flags|=1024),c=!1)}return Af(t,r,i,c,g,p)}function Af(t,r,i,c,p,g){$x(t,r);var x=(r.flags&128)!==0;if(!c&&!x)return p&&Vy(r,i,!1),_r(t,r,g);c=r.stateNode,KI.current=r;var E=x&&typeof i.getDerivedStateFromError!="function"?null:c.render();return r.flags|=1,t!==null&&x?(r.child=js(r,t.child,null,g),r.child=js(r,null,E,g)):Bt(t,r,E,g),r.memoizedState=c.state,p&&Vy(r,i,!0),r.child}function jx(t){var r=t.stateNode;r.pendingContext?zy(t,r.pendingContext,r.pendingContext!==r.context):r.context&&zy(t,r.context,!1),vf(t,r.containerInfo)}function Lx(t,r,i,c,p){return Ms(),uf(p),r.flags|=256,Bt(t,r,i,c),r.child}var $f={dehydrated:null,treeContext:null,retryLane:0};function Mf(t){return{baseLanes:t,cachePool:null,transitions:null}}function zx(t,r,i){var c=r.pendingProps,p=ut.current,g=!1,x=(r.flags&128)!==0,E;if((E=x)||(E=t!==null&&t.memoizedState===null?!1:(p&2)!==0),E?(g=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(p|=1),rt(ut,p&1),t===null)return cf(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(x=c.children,t=c.fallback,g?(c=r.mode,g=r.child,x={mode:"hidden",children:x},(c&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=x):g=wc(x,c,0,null),t=Yo(t,c,i,null),g.return=r,t.return=r,g.sibling=t,r.child=g,r.child.memoizedState=Mf(i),r.memoizedState=$f,t):jf(r,x));if(p=t.memoizedState,p!==null&&(E=p.dehydrated,E!==null))return ZI(t,r,x,c,E,p,i);if(g){g=c.fallback,x=r.mode,p=t.child,E=p.sibling;var I={mode:"hidden",children:c.children};return(x&1)===0&&r.child!==p?(c=r.child,c.childLanes=0,c.pendingProps=I,r.deletions=null):(c=mo(p,I),c.subtreeFlags=p.subtreeFlags&14680064),E!==null?g=mo(E,g):(g=Yo(g,x,i,null),g.flags|=2),g.return=r,c.return=r,c.sibling=g,r.child=c,c=g,g=r.child,x=t.child.memoizedState,x=x===null?Mf(i):{baseLanes:x.baseLanes|i,cachePool:null,transitions:x.transitions},g.memoizedState=x,g.childLanes=t.childLanes&~i,r.memoizedState=$f,c}return g=t.child,t=g.sibling,c=mo(g,{mode:"visible",children:c.children}),(r.mode&1)===0&&(c.lanes=i),c.return=r,c.sibling=null,t!==null&&(i=r.deletions,i===null?(r.deletions=[t],r.flags|=16):i.push(t)),r.child=c,r.memoizedState=null,c}function jf(t,r){return r=wc({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function ac(t,r,i,c){return c!==null&&uf(c),js(r,t.child,null,i),t=jf(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function ZI(t,r,i,c,p,g,x){if(i)return r.flags&256?(r.flags&=-257,c=Nf(Error(o(422))),ac(t,r,x,c)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(g=c.fallback,p=r.mode,c=wc({mode:"visible",children:c.children},p,0,null),g=Yo(g,p,x,null),g.flags|=2,c.return=r,g.return=r,c.sibling=g,r.child=c,(r.mode&1)!==0&&js(r,t.child,null,x),r.child.memoizedState=Mf(x),r.memoizedState=$f,g);if((r.mode&1)===0)return ac(t,r,x,null);if(p.data==="$!"){if(c=p.nextSibling&&p.nextSibling.dataset,c)var E=c.dgst;return c=E,g=Error(o(419)),c=Nf(g,c,void 0),ac(t,r,x,c)}if(E=(x&t.childLanes)!==0,Yt||E){if(c=Pt,c!==null){switch(x&-x){case 4:p=2;break;case 16:p=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:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(c.suspendedLanes|x))!==0?0:p,p!==0&&p!==g.retryLane&&(g.retryLane=p,kr(t,p),An(c,t,p,-1))}return Jf(),c=Nf(Error(o(421))),ac(t,r,x,c)}return p.data==="$?"?(r.flags|=128,r.child=t.child,r=i2.bind(null,t),p._reactRetry=r,null):(t=g.treeContext,on=ro(p.nextSibling),rn=r,lt=!0,Dn=null,t!==null&&(fn[pn++]=br,fn[pn++]=Sr,fn[pn++]=Vo,br=t.id,Sr=t.overflow,Vo=r),r=jf(r,c.children),r.flags|=4096,r)}function Fx(t,r,i){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),hf(t.return,r,i)}function Lf(t,r,i,c,p){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:i,tailMode:p}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=i,g.tailMode=p)}function Vx(t,r,i){var c=r.pendingProps,p=c.revealOrder,g=c.tail;if(Bt(t,r,c.children,i),c=ut.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Fx(t,i,r);else if(t.tag===19)Fx(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}if(rt(ut,c),(r.mode&1)===0)r.memoizedState=null;else switch(p){case"forwards":for(i=r.child,p=null;i!==null;)t=i.alternate,t!==null&&ec(t)===null&&(p=i),i=i.sibling;i=p,i===null?(p=r.child,r.child=null):(p=i.sibling,i.sibling=null),Lf(r,!1,p,i,g);break;case"backwards":for(i=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&ec(t)===null){r.child=p;break}t=p.sibling,p.sibling=i,i=p,p=t}Lf(r,!0,i,null,g);break;case"together":Lf(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function lc(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function _r(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),Ko|=r.lanes,(i&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,i=mo(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=mo(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function GI(t,r,i){switch(r.tag){case 3:jx(r),Ms();break;case 5:tx(r);break;case 1:qt(r.type)&&Hl(r);break;case 4:vf(r,r.stateNode.containerInfo);break;case 10:var c=r.type._context,p=r.memoizedProps.value;rt(Yl,c._currentValue),c._currentValue=p;break;case 13:if(c=r.memoizedState,c!==null)return c.dehydrated!==null?(rt(ut,ut.current&1),r.flags|=128,null):(i&r.child.childLanes)!==0?zx(t,r,i):(rt(ut,ut.current&1),t=_r(t,r,i),t!==null?t.sibling:null);rt(ut,ut.current&1);break;case 19:if(c=(i&r.childLanes)!==0,(t.flags&128)!==0){if(c)return Vx(t,r,i);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),rt(ut,ut.current),c)break;return null;case 22:case 23:return r.lanes=0,Ax(t,r,i)}return _r(t,r,i)}var Ux,zf,Bx,Hx;Ux=function(t,r){for(var i=r.child;i!==null;){if(i.tag===5||i.tag===6)t.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},zf=function(){},Bx=function(t,r,i,c){var p=t.memoizedProps;if(p!==c){t=r.stateNode,Ho(Yn.current);var g=null;switch(i){case"input":p=ft(t,p),c=ft(t,c),g=[];break;case"select":p=$({},p,{value:void 0}),c=$({},c,{value:void 0}),g=[];break;case"textarea":p=Kr(t,p),c=Kr(t,c),g=[];break;default:typeof p.onClick!="function"&&typeof c.onClick=="function"&&(t.onclick=Vl)}Mo(i,c);var x;i=null;for(V in p)if(!c.hasOwnProperty(V)&&p.hasOwnProperty(V)&&p[V]!=null)if(V==="style"){var E=p[V];for(x in E)E.hasOwnProperty(x)&&(i||(i={}),i[x]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(a.hasOwnProperty(V)?g||(g=[]):(g=g||[]).push(V,null));for(V in c){var I=c[V];if(E=p?.[V],c.hasOwnProperty(V)&&I!==E&&(I!=null||E!=null))if(V==="style")if(E){for(x in E)!E.hasOwnProperty(x)||I&&I.hasOwnProperty(x)||(i||(i={}),i[x]="");for(x in I)I.hasOwnProperty(x)&&E[x]!==I[x]&&(i||(i={}),i[x]=I[x])}else i||(g||(g=[]),g.push(V,i)),i=I;else V==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,E=E?E.__html:void 0,I!=null&&E!==I&&(g=g||[]).push(V,I)):V==="children"?typeof I!="string"&&typeof I!="number"||(g=g||[]).push(V,""+I):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(a.hasOwnProperty(V)?(I!=null&&V==="onScroll"&&ot("scroll",t),g||E===I||(g=[])):(g=g||[]).push(V,I))}i&&(g=g||[]).push("style",i);var V=g;(r.updateQueue=V)&&(r.flags|=4)}},Hx=function(t,r,i,c){i!==c&&(r.flags|=4)};function Yi(t,r){if(!lt)switch(t.tailMode){case"hidden":r=t.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var c=null;i!==null;)i.alternate!==null&&(c=i),i=i.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Mt(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,c=0;if(r)for(var p=t.child;p!==null;)i|=p.lanes|p.childLanes,c|=p.subtreeFlags&14680064,c|=p.flags&14680064,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)i|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=c,t.childLanes=i,r}function qI(t,r,i){var c=r.pendingProps;switch(af(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(r),null;case 1:return qt(r.type)&&Bl(),Mt(r),null;case 3:return c=r.stateNode,Fs(),st(Gt),st(At),wf(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(t===null||t.child===null)&&(Gl(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Dn!==null&&(Yf(Dn),Dn=null))),zf(t,r),Mt(r),null;case 5:yf(r);var p=Ho(Wi.current);if(i=r.type,t!==null&&r.stateNode!=null)Bx(t,r,i,c,p),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!c){if(r.stateNode===null)throw Error(o(166));return Mt(r),null}if(t=Ho(Yn.current),Gl(r)){c=r.stateNode,i=r.type;var g=r.memoizedProps;switch(c[qn]=r,c[Fi]=g,t=(r.mode&1)!==0,i){case"dialog":ot("cancel",c),ot("close",c);break;case"iframe":case"object":case"embed":ot("load",c);break;case"video":case"audio":for(p=0;p<ji.length;p++)ot(ji[p],c);break;case"source":ot("error",c);break;case"img":case"image":case"link":ot("error",c),ot("load",c);break;case"details":ot("toggle",c);break;case"input":wt(c,g),ot("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!g.multiple},ot("invalid",c);break;case"textarea":_n(c,g),ot("invalid",c)}Mo(i,g),p=null;for(var x in g)if(g.hasOwnProperty(x)){var E=g[x];x==="children"?typeof E=="string"?c.textContent!==E&&(g.suppressHydrationWarning!==!0&&Fl(c.textContent,E,t),p=["children",E]):typeof E=="number"&&c.textContent!==""+E&&(g.suppressHydrationWarning!==!0&&Fl(c.textContent,E,t),p=["children",""+E]):a.hasOwnProperty(x)&&E!=null&&x==="onScroll"&&ot("scroll",c)}switch(i){case"input":$e(c),ct(c,g,!0);break;case"textarea":$e(c),Kn(c);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(c.onclick=Vl)}c=p,r.updateQueue=c,c!==null&&(r.flags|=4)}else{x=p.nodeType===9?p:p.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Ss(i)),t==="http://www.w3.org/1999/xhtml"?i==="script"?(t=x.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof c.is=="string"?t=x.createElement(i,{is:c.is}):(t=x.createElement(i),i==="select"&&(x=t,c.multiple?x.multiple=!0:c.size&&(x.size=c.size))):t=x.createElementNS(t,i),t[qn]=r,t[Fi]=c,Ux(t,r,!1,!1),r.stateNode=t;e:{switch(x=yi(i,c),i){case"dialog":ot("cancel",t),ot("close",t),p=c;break;case"iframe":case"object":case"embed":ot("load",t),p=c;break;case"video":case"audio":for(p=0;p<ji.length;p++)ot(ji[p],t);p=c;break;case"source":ot("error",t),p=c;break;case"img":case"image":case"link":ot("error",t),ot("load",t),p=c;break;case"details":ot("toggle",t),p=c;break;case"input":wt(t,c),p=ft(t,c),ot("invalid",t);break;case"option":p=c;break;case"select":t._wrapperState={wasMultiple:!!c.multiple},p=$({},c,{value:void 0}),ot("invalid",t);break;case"textarea":_n(t,c),p=Kr(t,c),ot("invalid",t);break;default:p=c}Mo(i,p),E=p;for(g in E)if(E.hasOwnProperty(g)){var I=E[g];g==="style"?$o(t,I):g==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&Zn(t,I)):g==="children"?typeof I=="string"?(i!=="textarea"||I!=="")&&dn(t,I):typeof I=="number"&&dn(t,""+I):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(a.hasOwnProperty(g)?I!=null&&g==="onScroll"&&ot("scroll",t):I!=null&&O(t,g,I,x))}switch(i){case"input":$e(t),ct(t,c,!1);break;case"textarea":$e(t),Kn(t);break;case"option":c.value!=null&&t.setAttribute("value",""+K(c.value));break;case"select":t.multiple=!!c.multiple,g=c.value,g!=null?un(t,!!c.multiple,g,!1):c.defaultValue!=null&&un(t,!!c.multiple,c.defaultValue,!0);break;default:typeof p.onClick=="function"&&(t.onclick=Vl)}switch(i){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Mt(r),null;case 6:if(t&&r.stateNode!=null)Hx(t,r,t.memoizedProps,c);else{if(typeof c!="string"&&r.stateNode===null)throw Error(o(166));if(i=Ho(Wi.current),Ho(Yn.current),Gl(r)){if(c=r.stateNode,i=r.memoizedProps,c[qn]=r,(g=c.nodeValue!==i)&&(t=rn,t!==null))switch(t.tag){case 3:Fl(c.nodeValue,i,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Fl(c.nodeValue,i,(t.mode&1)!==0)}g&&(r.flags|=4)}else c=(i.nodeType===9?i:i.ownerDocument).createTextNode(c),c[qn]=r,r.stateNode=c}return Mt(r),null;case 13:if(st(ut),c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(lt&&on!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Zy(),Ms(),r.flags|=98560,g=!1;else if(g=Gl(r),c!==null&&c.dehydrated!==null){if(t===null){if(!g)throw Error(o(318));if(g=r.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(o(317));g[qn]=r}else Ms(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Mt(r),g=!1}else Dn!==null&&(Yf(Dn),Dn=null),g=!0;if(!g)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=i,r):(c=c!==null,c!==(t!==null&&t.memoizedState!==null)&&c&&(r.child.flags|=8192,(r.mode&1)!==0&&(t===null||(ut.current&1)!==0?St===0&&(St=3):Jf())),r.updateQueue!==null&&(r.flags|=4),Mt(r),null);case 4:return Fs(),zf(t,r),t===null&&Li(r.stateNode.containerInfo),Mt(r),null;case 10:return pf(r.type._context),Mt(r),null;case 17:return qt(r.type)&&Bl(),Mt(r),null;case 19:if(st(ut),g=r.memoizedState,g===null)return Mt(r),null;if(c=(r.flags&128)!==0,x=g.rendering,x===null)if(c)Yi(g,!1);else{if(St!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(x=ec(t),x!==null){for(r.flags|=128,Yi(g,!1),c=x.updateQueue,c!==null&&(r.updateQueue=c,r.flags|=4),r.subtreeFlags=0,c=i,i=r.child;i!==null;)g=i,t=c,g.flags&=14680066,x=g.alternate,x===null?(g.childLanes=0,g.lanes=t,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=x.childLanes,g.lanes=x.lanes,g.child=x.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=x.memoizedProps,g.memoizedState=x.memoizedState,g.updateQueue=x.updateQueue,g.type=x.type,t=x.dependencies,g.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),i=i.sibling;return rt(ut,ut.current&1|2),r.child}t=t.sibling}g.tail!==null&&mt()>Hs&&(r.flags|=128,c=!0,Yi(g,!1),r.lanes=4194304)}else{if(!c)if(t=ec(x),t!==null){if(r.flags|=128,c=!0,i=t.updateQueue,i!==null&&(r.updateQueue=i,r.flags|=4),Yi(g,!0),g.tail===null&&g.tailMode==="hidden"&&!x.alternate&&!lt)return Mt(r),null}else 2*mt()-g.renderingStartTime>Hs&&i!==1073741824&&(r.flags|=128,c=!0,Yi(g,!1),r.lanes=4194304);g.isBackwards?(x.sibling=r.child,r.child=x):(i=g.last,i!==null?i.sibling=x:r.child=x,g.last=x)}return g.tail!==null?(r=g.tail,g.rendering=r,g.tail=r.sibling,g.renderingStartTime=mt(),r.sibling=null,i=ut.current,rt(ut,c?i&1|2:i&1),r):(Mt(r),null);case 22:case 23:return Xf(),c=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==c&&(r.flags|=8192),c&&(r.mode&1)!==0?(sn&1073741824)!==0&&(Mt(r),r.subtreeFlags&6&&(r.flags|=8192)):Mt(r),null;case 24:return null;case 25:return null}throw Error(o(156,r.tag))}function YI(t,r){switch(af(r),r.tag){case 1:return qt(r.type)&&Bl(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Fs(),st(Gt),st(At),wf(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return yf(r),null;case 13:if(st(ut),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Ms()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return st(ut),null;case 4:return Fs(),null;case 10:return pf(r.type._context),null;case 22:case 23:return Xf(),null;case 24:return null;default:return null}}var cc=!1,jt=!1,QI=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Us(t,r){var i=t.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(c){pt(t,r,c)}else i.current=null}function Ff(t,r,i){try{i()}catch(c){pt(t,r,c)}}var Wx=!1;function XI(t,r){if(Qd=Il,t=ky(),Bd(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var x=0,E=-1,I=-1,V=0,X=0,ee=t,q=null;t:for(;;){for(var pe;ee!==i||p!==0&&ee.nodeType!==3||(E=x+p),ee!==g||c!==0&&ee.nodeType!==3||(I=x+c),ee.nodeType===3&&(x+=ee.nodeValue.length),(pe=ee.firstChild)!==null;)q=ee,ee=pe;for(;;){if(ee===t)break t;if(q===i&&++V===p&&(E=x),q===g&&++X===c&&(I=x),(pe=ee.nextSibling)!==null)break;ee=q,q=ee.parentNode}ee=pe}i=E===-1||I===-1?null:{start:E,end:I}}else i=null}i=i||{start:0,end:0}}else i=null;for(Xd={focusedElem:t,selectionRange:i},Il=!1,ye=r;ye!==null;)if(r=ye,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,ye=t;else for(;ye!==null;){r=ye;try{var we=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Se=we.memoizedProps,gt=we.memoizedState,j=r.stateNode,M=j.getSnapshotBeforeUpdate(r.elementType===r.type?Se:Nn(r.type,Se),gt);j.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var F=r.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ie){pt(r,r.return,ie)}if(t=r.sibling,t!==null){t.return=r.return,ye=t;break}ye=r.return}return we=Wx,Wx=!1,we}function Qi(t,r,i){var c=r.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var p=c=c.next;do{if((p.tag&t)===t){var g=p.destroy;p.destroy=void 0,g!==void 0&&Ff(r,i,g)}p=p.next}while(p!==c)}}function uc(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var c=i.create;i.destroy=c()}i=i.next}while(i!==r)}}function Vf(t){var r=t.ref;if(r!==null){var i=t.stateNode;t.tag,t=i,typeof r=="function"?r(t):r.current=t}}function Kx(t){var r=t.alternate;r!==null&&(t.alternate=null,Kx(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[qn],delete r[Fi],delete r[nf],delete r[AI],delete r[$I])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Zx(t){return t.tag===5||t.tag===3||t.tag===4}function Gx(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Zx(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Uf(t,r,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?i.nodeType===8?i.parentNode.insertBefore(t,r):i.insertBefore(t,r):(i.nodeType===8?(r=i.parentNode,r.insertBefore(t,i)):(r=i,r.appendChild(t)),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Vl));else if(c!==4&&(t=t.child,t!==null))for(Uf(t,r,i),t=t.sibling;t!==null;)Uf(t,r,i),t=t.sibling}function Bf(t,r,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?i.insertBefore(t,r):i.appendChild(t);else if(c!==4&&(t=t.child,t!==null))for(Bf(t,r,i),t=t.sibling;t!==null;)Bf(t,r,i),t=t.sibling}var Nt=null,On=!1;function co(t,r,i){for(i=i.child;i!==null;)qx(t,r,i),i=i.sibling}function qx(t,r,i){if(Gn&&typeof Gn.onCommitFiberUnmount=="function")try{Gn.onCommitFiberUnmount(kl,i)}catch{}switch(i.tag){case 5:jt||Us(i,r);case 6:var c=Nt,p=On;Nt=null,co(t,r,i),Nt=c,On=p,Nt!==null&&(On?(t=Nt,i=i.stateNode,t.nodeType===8?t.parentNode.removeChild(i):t.removeChild(i)):Nt.removeChild(i.stateNode));break;case 18:Nt!==null&&(On?(t=Nt,i=i.stateNode,t.nodeType===8?tf(t.parentNode,i):t.nodeType===1&&tf(t,i),Ii(t)):tf(Nt,i.stateNode));break;case 4:c=Nt,p=On,Nt=i.stateNode.containerInfo,On=!0,co(t,r,i),Nt=c,On=p;break;case 0:case 11:case 14:case 15:if(!jt&&(c=i.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){p=c=c.next;do{var g=p,x=g.destroy;g=g.tag,x!==void 0&&((g&2)!==0||(g&4)!==0)&&Ff(i,r,x),p=p.next}while(p!==c)}co(t,r,i);break;case 1:if(!jt&&(Us(i,r),c=i.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=i.memoizedProps,c.state=i.memoizedState,c.componentWillUnmount()}catch(E){pt(i,r,E)}co(t,r,i);break;case 21:co(t,r,i);break;case 22:i.mode&1?(jt=(c=jt)||i.memoizedState!==null,co(t,r,i),jt=c):co(t,r,i);break;default:co(t,r,i)}}function Yx(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var i=t.stateNode;i===null&&(i=t.stateNode=new QI),r.forEach(function(c){var p=a2.bind(null,t,c);i.has(c)||(i.add(c),c.then(p,p))})}}function Tn(t,r){var i=r.deletions;if(i!==null)for(var c=0;c<i.length;c++){var p=i[c];try{var g=t,x=r,E=x;e:for(;E!==null;){switch(E.tag){case 5:Nt=E.stateNode,On=!1;break e;case 3:Nt=E.stateNode.containerInfo,On=!0;break e;case 4:Nt=E.stateNode.containerInfo,On=!0;break e}E=E.return}if(Nt===null)throw Error(o(160));qx(g,x,p),Nt=null,On=!1;var I=p.alternate;I!==null&&(I.return=null),p.return=null}catch(V){pt(p,r,V)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)Qx(r,t),r=r.sibling}function Qx(t,r){var i=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Tn(r,t),Xn(t),c&4){try{Qi(3,t,t.return),uc(3,t)}catch(Se){pt(t,t.return,Se)}try{Qi(5,t,t.return)}catch(Se){pt(t,t.return,Se)}}break;case 1:Tn(r,t),Xn(t),c&512&&i!==null&&Us(i,i.return);break;case 5:if(Tn(r,t),Xn(t),c&512&&i!==null&&Us(i,i.return),t.flags&32){var p=t.stateNode;try{dn(p,"")}catch(Se){pt(t,t.return,Se)}}if(c&4&&(p=t.stateNode,p!=null)){var g=t.memoizedProps,x=i!==null?i.memoizedProps:g,E=t.type,I=t.updateQueue;if(t.updateQueue=null,I!==null)try{E==="input"&&g.type==="radio"&&g.name!=null&&Hr(p,g),yi(E,x);var V=yi(E,g);for(x=0;x<I.length;x+=2){var X=I[x],ee=I[x+1];X==="style"?$o(p,ee):X==="dangerouslySetInnerHTML"?Zn(p,ee):X==="children"?dn(p,ee):O(p,X,ee,V)}switch(E){case"input":Cn(p,g);break;case"textarea":gi(p,g);break;case"select":var q=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!g.multiple;var pe=g.value;pe!=null?un(p,!!g.multiple,pe,!1):q!==!!g.multiple&&(g.defaultValue!=null?un(p,!!g.multiple,g.defaultValue,!0):un(p,!!g.multiple,g.multiple?[]:"",!1))}p[Fi]=g}catch(Se){pt(t,t.return,Se)}}break;case 6:if(Tn(r,t),Xn(t),c&4){if(t.stateNode===null)throw Error(o(162));p=t.stateNode,g=t.memoizedProps;try{p.nodeValue=g}catch(Se){pt(t,t.return,Se)}}break;case 3:if(Tn(r,t),Xn(t),c&4&&i!==null&&i.memoizedState.isDehydrated)try{Ii(r.containerInfo)}catch(Se){pt(t,t.return,Se)}break;case 4:Tn(r,t),Xn(t);break;case 13:Tn(r,t),Xn(t),p=t.child,p.flags&8192&&(g=p.memoizedState!==null,p.stateNode.isHidden=g,!g||p.alternate!==null&&p.alternate.memoizedState!==null||(Kf=mt())),c&4&&Yx(t);break;case 22:if(X=i!==null&&i.memoizedState!==null,t.mode&1?(jt=(V=jt)||X,Tn(r,t),jt=V):Tn(r,t),Xn(t),c&8192){if(V=t.memoizedState!==null,(t.stateNode.isHidden=V)&&!X&&(t.mode&1)!==0)for(ye=t,X=t.child;X!==null;){for(ee=ye=X;ye!==null;){switch(q=ye,pe=q.child,q.tag){case 0:case 11:case 14:case 15:Qi(4,q,q.return);break;case 1:Us(q,q.return);var we=q.stateNode;if(typeof we.componentWillUnmount=="function"){c=q,i=q.return;try{r=c,we.props=r.memoizedProps,we.state=r.memoizedState,we.componentWillUnmount()}catch(Se){pt(c,i,Se)}}break;case 5:Us(q,q.return);break;case 22:if(q.memoizedState!==null){ew(ee);continue}}pe!==null?(pe.return=q,ye=pe):ew(ee)}X=X.sibling}e:for(X=null,ee=t;;){if(ee.tag===5){if(X===null){X=ee;try{p=ee.stateNode,V?(g=p.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(E=ee.stateNode,I=ee.memoizedProps.style,x=I!=null&&I.hasOwnProperty("display")?I.display:null,E.style.display=It("display",x))}catch(Se){pt(t,t.return,Se)}}}else if(ee.tag===6){if(X===null)try{ee.stateNode.nodeValue=V?"":ee.memoizedProps}catch(Se){pt(t,t.return,Se)}}else if((ee.tag!==22&&ee.tag!==23||ee.memoizedState===null||ee===t)&&ee.child!==null){ee.child.return=ee,ee=ee.child;continue}if(ee===t)break e;for(;ee.sibling===null;){if(ee.return===null||ee.return===t)break e;X===ee&&(X=null),ee=ee.return}X===ee&&(X=null),ee.sibling.return=ee.return,ee=ee.sibling}}break;case 19:Tn(r,t),Xn(t),c&4&&Yx(t);break;case 21:break;default:Tn(r,t),Xn(t)}}function Xn(t){var r=t.flags;if(r&2){try{e:{for(var i=t.return;i!==null;){if(Zx(i)){var c=i;break e}i=i.return}throw Error(o(160))}switch(c.tag){case 5:var p=c.stateNode;c.flags&32&&(dn(p,""),c.flags&=-33);var g=Gx(t);Bf(t,g,p);break;case 3:case 4:var x=c.stateNode.containerInfo,E=Gx(t);Uf(t,E,x);break;default:throw Error(o(161))}}catch(I){pt(t,t.return,I)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function JI(t,r,i){ye=t,Xx(t)}function Xx(t,r,i){for(var c=(t.mode&1)!==0;ye!==null;){var p=ye,g=p.child;if(p.tag===22&&c){var x=p.memoizedState!==null||cc;if(!x){var E=p.alternate,I=E!==null&&E.memoizedState!==null||jt;E=cc;var V=jt;if(cc=x,(jt=I)&&!V)for(ye=p;ye!==null;)x=ye,I=x.child,x.tag===22&&x.memoizedState!==null?tw(p):I!==null?(I.return=x,ye=I):tw(p);for(;g!==null;)ye=g,Xx(g),g=g.sibling;ye=p,cc=E,jt=V}Jx(t)}else(p.subtreeFlags&8772)!==0&&g!==null?(g.return=p,ye=g):Jx(t)}}function Jx(t){for(;ye!==null;){var r=ye;if((r.flags&8772)!==0){var i=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:jt||uc(5,r);break;case 1:var c=r.stateNode;if(r.flags&4&&!jt)if(i===null)c.componentDidMount();else{var p=r.elementType===r.type?i.memoizedProps:Nn(r.type,i.memoizedProps);c.componentDidUpdate(p,i.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var g=r.updateQueue;g!==null&&ex(r,g,c);break;case 3:var x=r.updateQueue;if(x!==null){if(i=null,r.child!==null)switch(r.child.tag){case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}ex(r,x,i)}break;case 5:var E=r.stateNode;if(i===null&&r.flags&4){i=E;var I=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&i.focus();break;case"img":I.src&&(i.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var V=r.alternate;if(V!==null){var X=V.memoizedState;if(X!==null){var ee=X.dehydrated;ee!==null&&Ii(ee)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}jt||r.flags&512&&Vf(r)}catch(q){pt(r,r.return,q)}}if(r===t){ye=null;break}if(i=r.sibling,i!==null){i.return=r.return,ye=i;break}ye=r.return}}function ew(t){for(;ye!==null;){var r=ye;if(r===t){ye=null;break}var i=r.sibling;if(i!==null){i.return=r.return,ye=i;break}ye=r.return}}function tw(t){for(;ye!==null;){var r=ye;try{switch(r.tag){case 0:case 11:case 15:var i=r.return;try{uc(4,r)}catch(I){pt(r,i,I)}break;case 1:var c=r.stateNode;if(typeof c.componentDidMount=="function"){var p=r.return;try{c.componentDidMount()}catch(I){pt(r,p,I)}}var g=r.return;try{Vf(r)}catch(I){pt(r,g,I)}break;case 5:var x=r.return;try{Vf(r)}catch(I){pt(r,x,I)}}}catch(I){pt(r,r.return,I)}if(r===t){ye=null;break}var E=r.sibling;if(E!==null){E.return=r.return,ye=E;break}ye=r.return}}var e2=Math.ceil,dc=T.ReactCurrentDispatcher,Hf=T.ReactCurrentOwner,gn=T.ReactCurrentBatchConfig,qe=0,Pt=null,yt=null,Ot=0,sn=0,Bs=oo(0),St=0,Xi=null,Ko=0,fc=0,Wf=0,Ji=null,Qt=null,Kf=0,Hs=1/0,Er=null,pc=!1,Zf=null,uo=null,hc=!1,fo=null,mc=0,ea=0,Gf=null,gc=-1,vc=0;function Ht(){return(qe&6)!==0?mt():gc!==-1?gc:gc=mt()}function po(t){return(t.mode&1)===0?1:(qe&2)!==0&&Ot!==0?Ot&-Ot:jI.transition!==null?(vc===0&&(vc=Gv()),vc):(t=et,t!==0||(t=window.event,t=t===void 0?16:ry(t.type)),t)}function An(t,r,i,c){if(50<ea)throw ea=0,Gf=null,Error(o(185));Ci(t,i,c),((qe&2)===0||t!==Pt)&&(t===Pt&&((qe&2)===0&&(fc|=i),St===4&&ho(t,Ot)),Xt(t,c),i===1&&qe===0&&(r.mode&1)===0&&(Hs=mt()+500,Wl&&io()))}function Xt(t,r){var i=t.callbackNode;jR(t,r);var c=El(t,t===Pt?Ot:0);if(c===0)i!==null&&Wv(i),t.callbackNode=null,t.callbackPriority=0;else if(r=c&-c,t.callbackPriority!==r){if(i!=null&&Wv(i),r===1)t.tag===0?MI(rw.bind(null,t)):Uy(rw.bind(null,t)),OI(function(){(qe&6)===0&&io()}),i=null;else{switch(qv(c)){case 1:i=Ed;break;case 4:i=Kv;break;case 16:i=Sl;break;case 536870912:i=Zv;break;default:i=Sl}i=dw(i,nw.bind(null,t))}t.callbackPriority=r,t.callbackNode=i}}function nw(t,r){if(gc=-1,vc=0,(qe&6)!==0)throw Error(o(327));var i=t.callbackNode;if(Ws()&&t.callbackNode!==i)return null;var c=El(t,t===Pt?Ot:0);if(c===0)return null;if((c&30)!==0||(c&t.expiredLanes)!==0||r)r=yc(t,c);else{r=c;var p=qe;qe|=2;var g=sw();(Pt!==t||Ot!==r)&&(Er=null,Hs=mt()+500,Go(t,r));do try{r2();break}catch(E){ow(t,E)}while(!0);ff(),dc.current=g,qe=p,yt!==null?r=0:(Pt=null,Ot=0,r=St)}if(r!==0){if(r===2&&(p=Pd(t),p!==0&&(c=p,r=qf(t,p))),r===1)throw i=Xi,Go(t,0),ho(t,c),Xt(t,mt()),i;if(r===6)ho(t,c);else{if(p=t.current.alternate,(c&30)===0&&!t2(p)&&(r=yc(t,c),r===2&&(g=Pd(t),g!==0&&(c=g,r=qf(t,g))),r===1))throw i=Xi,Go(t,0),ho(t,c),Xt(t,mt()),i;switch(t.finishedWork=p,t.finishedLanes=c,r){case 0:case 1:throw Error(o(345));case 2:qo(t,Qt,Er);break;case 3:if(ho(t,c),(c&130023424)===c&&(r=Kf+500-mt(),10<r)){if(El(t,0)!==0)break;if(p=t.suspendedLanes,(p&c)!==c){Ht(),t.pingedLanes|=t.suspendedLanes&p;break}t.timeoutHandle=ef(qo.bind(null,t,Qt,Er),r);break}qo(t,Qt,Er);break;case 4:if(ho(t,c),(c&4194240)===c)break;for(r=t.eventTimes,p=-1;0<c;){var x=31-Rn(c);g=1<<x,x=r[x],x>p&&(p=x),c&=~g}if(c=p,c=mt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*e2(c/1960))-c,10<c){t.timeoutHandle=ef(qo.bind(null,t,Qt,Er),c);break}qo(t,Qt,Er);break;case 5:qo(t,Qt,Er);break;default:throw Error(o(329))}}}return Xt(t,mt()),t.callbackNode===i?nw.bind(null,t):null}function qf(t,r){var i=Ji;return t.current.memoizedState.isDehydrated&&(Go(t,r).flags|=256),t=yc(t,r),t!==2&&(r=Qt,Qt=i,r!==null&&Yf(r)),t}function Yf(t){Qt===null?Qt=t:Qt.push.apply(Qt,t)}function t2(t){for(var r=t;;){if(r.flags&16384){var i=r.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var c=0;c<i.length;c++){var p=i[c],g=p.getSnapshot;p=p.value;try{if(!In(g(),p))return!1}catch{return!1}}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function ho(t,r){for(r&=~Wf,r&=~fc,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var i=31-Rn(r),c=1<<i;t[i]=-1,r&=~c}}function rw(t){if((qe&6)!==0)throw Error(o(327));Ws();var r=El(t,0);if((r&1)===0)return Xt(t,mt()),null;var i=yc(t,r);if(t.tag!==0&&i===2){var c=Pd(t);c!==0&&(r=c,i=qf(t,c))}if(i===1)throw i=Xi,Go(t,0),ho(t,r),Xt(t,mt()),i;if(i===6)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,qo(t,Qt,Er),Xt(t,mt()),null}function Qf(t,r){var i=qe;qe|=1;try{return t(r)}finally{qe=i,qe===0&&(Hs=mt()+500,Wl&&io())}}function Zo(t){fo!==null&&fo.tag===0&&(qe&6)===0&&Ws();var r=qe;qe|=1;var i=gn.transition,c=et;try{if(gn.transition=null,et=1,t)return t()}finally{et=c,gn.transition=i,qe=r,(qe&6)===0&&io()}}function Xf(){sn=Bs.current,st(Bs)}function Go(t,r){t.finishedWork=null,t.finishedLanes=0;var i=t.timeoutHandle;if(i!==-1&&(t.timeoutHandle=-1,NI(i)),yt!==null)for(i=yt.return;i!==null;){var c=i;switch(af(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Bl();break;case 3:Fs(),st(Gt),st(At),wf();break;case 5:yf(c);break;case 4:Fs();break;case 13:st(ut);break;case 19:st(ut);break;case 10:pf(c.type._context);break;case 22:case 23:Xf()}i=i.return}if(Pt=t,yt=t=mo(t.current,null),Ot=sn=r,St=0,Xi=null,Wf=fc=Ko=0,Qt=Ji=null,Bo!==null){for(r=0;r<Bo.length;r++)if(i=Bo[r],c=i.interleaved,c!==null){i.interleaved=null;var p=c.next,g=i.pending;if(g!==null){var x=g.next;g.next=p,c.next=x}i.pending=c}Bo=null}return t}function ow(t,r){do{var i=yt;try{if(ff(),tc.current=sc,nc){for(var c=dt.memoizedState;c!==null;){var p=c.queue;p!==null&&(p.pending=null),c=c.next}nc=!1}if(Wo=0,Et=bt=dt=null,Ki=!1,Zi=0,Hf.current=null,i===null||i.return===null){St=1,Xi=r,yt=null;break}e:{var g=t,x=i.return,E=i,I=r;if(r=Ot,E.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var V=I,X=E,ee=X.tag;if((X.mode&1)===0&&(ee===0||ee===11||ee===15)){var q=X.alternate;q?(X.updateQueue=q.updateQueue,X.memoizedState=q.memoizedState,X.lanes=q.lanes):(X.updateQueue=null,X.memoizedState=null)}var pe=Ix(x);if(pe!==null){pe.flags&=-257,Dx(pe,x,E,g,r),pe.mode&1&&Rx(g,V,r),r=pe,I=V;var we=r.updateQueue;if(we===null){var Se=new Set;Se.add(I),r.updateQueue=Se}else we.add(I);break e}else{if((r&1)===0){Rx(g,V,r),Jf();break e}I=Error(o(426))}}else if(lt&&E.mode&1){var gt=Ix(x);if(gt!==null){(gt.flags&65536)===0&&(gt.flags|=256),Dx(gt,x,E,g,r),uf(Vs(I,E));break e}}g=I=Vs(I,E),St!==4&&(St=2),Ji===null?Ji=[g]:Ji.push(g),g=x;do{switch(g.tag){case 3:g.flags|=65536,r&=-r,g.lanes|=r;var j=Ex(g,I,r);Jy(g,j);break e;case 1:E=I;var M=g.type,F=g.stateNode;if((g.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(uo===null||!uo.has(F)))){g.flags|=65536,r&=-r,g.lanes|=r;var ie=Px(g,E,r);Jy(g,ie);break e}}g=g.return}while(g!==null)}aw(i)}catch(_e){r=_e,yt===i&&i!==null&&(yt=i=i.return);continue}break}while(!0)}function sw(){var t=dc.current;return dc.current=sc,t===null?sc:t}function Jf(){(St===0||St===3||St===2)&&(St=4),Pt===null||(Ko&268435455)===0&&(fc&268435455)===0||ho(Pt,Ot)}function yc(t,r){var i=qe;qe|=2;var c=sw();(Pt!==t||Ot!==r)&&(Er=null,Go(t,r));do try{n2();break}catch(p){ow(t,p)}while(!0);if(ff(),qe=i,dc.current=c,yt!==null)throw Error(o(261));return Pt=null,Ot=0,St}function n2(){for(;yt!==null;)iw(yt)}function r2(){for(;yt!==null&&!RR();)iw(yt)}function iw(t){var r=uw(t.alternate,t,sn);t.memoizedProps=t.pendingProps,r===null?aw(t):yt=r,Hf.current=null}function aw(t){var r=t;do{var i=r.alternate;if(t=r.return,(r.flags&32768)===0){if(i=qI(i,r,sn),i!==null){yt=i;return}}else{if(i=YI(i,r),i!==null){i.flags&=32767,yt=i;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{St=6,yt=null;return}}if(r=r.sibling,r!==null){yt=r;return}yt=r=t}while(r!==null);St===0&&(St=5)}function qo(t,r,i){var c=et,p=gn.transition;try{gn.transition=null,et=1,o2(t,r,i,c)}finally{gn.transition=p,et=c}return null}function o2(t,r,i,c){do Ws();while(fo!==null);if((qe&6)!==0)throw Error(o(327));i=t.finishedWork;var p=t.finishedLanes;if(i===null)return null;if(t.finishedWork=null,t.finishedLanes=0,i===t.current)throw Error(o(177));t.callbackNode=null,t.callbackPriority=0;var g=i.lanes|i.childLanes;if(LR(t,g),t===Pt&&(yt=Pt=null,Ot=0),(i.subtreeFlags&2064)===0&&(i.flags&2064)===0||hc||(hc=!0,dw(Sl,function(){return Ws(),null})),g=(i.flags&15990)!==0,(i.subtreeFlags&15990)!==0||g){g=gn.transition,gn.transition=null;var x=et;et=1;var E=qe;qe|=4,Hf.current=null,XI(t,i),Qx(i,t),CI(Xd),Il=!!Qd,Xd=Qd=null,t.current=i,JI(i),IR(),qe=E,et=x,gn.transition=g}else t.current=i;if(hc&&(hc=!1,fo=t,mc=p),g=t.pendingLanes,g===0&&(uo=null),OR(i.stateNode),Xt(t,mt()),r!==null)for(c=t.onRecoverableError,i=0;i<r.length;i++)p=r[i],c(p.value,{componentStack:p.stack,digest:p.digest});if(pc)throw pc=!1,t=Zf,Zf=null,t;return(mc&1)!==0&&t.tag!==0&&Ws(),g=t.pendingLanes,(g&1)!==0?t===Gf?ea++:(ea=0,Gf=t):ea=0,io(),null}function Ws(){if(fo!==null){var t=qv(mc),r=gn.transition,i=et;try{if(gn.transition=null,et=16>t?16:t,fo===null)var c=!1;else{if(t=fo,fo=null,mc=0,(qe&6)!==0)throw Error(o(331));var p=qe;for(qe|=4,ye=t.current;ye!==null;){var g=ye,x=g.child;if((ye.flags&16)!==0){var E=g.deletions;if(E!==null){for(var I=0;I<E.length;I++){var V=E[I];for(ye=V;ye!==null;){var X=ye;switch(X.tag){case 0:case 11:case 15:Qi(8,X,g)}var ee=X.child;if(ee!==null)ee.return=X,ye=ee;else for(;ye!==null;){X=ye;var q=X.sibling,pe=X.return;if(Kx(X),X===V){ye=null;break}if(q!==null){q.return=pe,ye=q;break}ye=pe}}}var we=g.alternate;if(we!==null){var Se=we.child;if(Se!==null){we.child=null;do{var gt=Se.sibling;Se.sibling=null,Se=gt}while(Se!==null)}}ye=g}}if((g.subtreeFlags&2064)!==0&&x!==null)x.return=g,ye=x;else e:for(;ye!==null;){if(g=ye,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:Qi(9,g,g.return)}var j=g.sibling;if(j!==null){j.return=g.return,ye=j;break e}ye=g.return}}var M=t.current;for(ye=M;ye!==null;){x=ye;var F=x.child;if((x.subtreeFlags&2064)!==0&&F!==null)F.return=x,ye=F;else e:for(x=M;ye!==null;){if(E=ye,(E.flags&2048)!==0)try{switch(E.tag){case 0:case 11:case 15:uc(9,E)}}catch(_e){pt(E,E.return,_e)}if(E===x){ye=null;break e}var ie=E.sibling;if(ie!==null){ie.return=E.return,ye=ie;break e}ye=E.return}}if(qe=p,io(),Gn&&typeof Gn.onPostCommitFiberRoot=="function")try{Gn.onPostCommitFiberRoot(kl,t)}catch{}c=!0}return c}finally{et=i,gn.transition=r}}return!1}function lw(t,r,i){r=Vs(i,r),r=Ex(t,r,1),t=lo(t,r,1),r=Ht(),t!==null&&(Ci(t,1,r),Xt(t,r))}function pt(t,r,i){if(t.tag===3)lw(t,t,i);else for(;r!==null;){if(r.tag===3){lw(r,t,i);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(uo===null||!uo.has(c))){t=Vs(i,t),t=Px(r,t,1),r=lo(r,t,1),t=Ht(),r!==null&&(Ci(r,1,t),Xt(r,t));break}}r=r.return}}function s2(t,r,i){var c=t.pingCache;c!==null&&c.delete(r),r=Ht(),t.pingedLanes|=t.suspendedLanes&i,Pt===t&&(Ot&i)===i&&(St===4||St===3&&(Ot&130023424)===Ot&&500>mt()-Kf?Go(t,0):Wf|=i),Xt(t,r)}function cw(t,r){r===0&&((t.mode&1)===0?r=1:(r=_l,_l<<=1,(_l&130023424)===0&&(_l=4194304)));var i=Ht();t=kr(t,r),t!==null&&(Ci(t,r,i),Xt(t,i))}function i2(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),cw(t,i)}function a2(t,r){var i=0;switch(t.tag){case 13:var c=t.stateNode,p=t.memoizedState;p!==null&&(i=p.retryLane);break;case 19:c=t.stateNode;break;default:throw Error(o(314))}c!==null&&c.delete(r),cw(t,i)}var uw;uw=function(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps||Gt.current)Yt=!0;else{if((t.lanes&i)===0&&(r.flags&128)===0)return Yt=!1,GI(t,r,i);Yt=(t.flags&131072)!==0}else Yt=!1,lt&&(r.flags&1048576)!==0&&By(r,Zl,r.index);switch(r.lanes=0,r.tag){case 2:var c=r.type;lc(t,r),t=r.pendingProps;var p=Ts(r,At.current);zs(r,i),p=kf(null,r,c,t,p,i);var g=Cf();return r.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,qt(c)?(g=!0,Hl(r)):g=!1,r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,gf(r),p.updater=ic,r.stateNode=p,p._reactInternals=r,Df(r,c,t,i),r=Af(null,r,c,!0,g,i)):(r.tag=0,lt&&g&&sf(r),Bt(null,r,p,i),r=r.child),r;case 16:c=r.elementType;e:{switch(lc(t,r),t=r.pendingProps,p=c._init,c=p(c._payload),r.type=c,p=r.tag=c2(c),t=Nn(c,t),p){case 0:r=Tf(null,r,c,t,i);break e;case 1:r=Mx(null,r,c,t,i);break e;case 11:r=Nx(null,r,c,t,i);break e;case 14:r=Ox(null,r,c,Nn(c.type,t),i);break e}throw Error(o(306,c,""))}return r;case 0:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:Nn(c,p),Tf(t,r,c,p,i);case 1:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:Nn(c,p),Mx(t,r,c,p,i);case 3:e:{if(jx(r),t===null)throw Error(o(387));c=r.pendingProps,g=r.memoizedState,p=g.element,Xy(t,r),Jl(r,c,null,i);var x=r.memoizedState;if(c=x.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){p=Vs(Error(o(423)),r),r=Lx(t,r,c,i,p);break e}else if(c!==p){p=Vs(Error(o(424)),r),r=Lx(t,r,c,i,p);break e}else for(on=ro(r.stateNode.containerInfo.firstChild),rn=r,lt=!0,Dn=null,i=Yy(r,null,c,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Ms(),c===p){r=_r(t,r,i);break e}Bt(t,r,c,i)}r=r.child}return r;case 5:return tx(r),t===null&&cf(r),c=r.type,p=r.pendingProps,g=t!==null?t.memoizedProps:null,x=p.children,Jd(c,p)?x=null:g!==null&&Jd(c,g)&&(r.flags|=32),$x(t,r),Bt(t,r,x,i),r.child;case 6:return t===null&&cf(r),null;case 13:return zx(t,r,i);case 4:return vf(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=js(r,null,c,i):Bt(t,r,c,i),r.child;case 11:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:Nn(c,p),Nx(t,r,c,p,i);case 7:return Bt(t,r,r.pendingProps,i),r.child;case 8:return Bt(t,r,r.pendingProps.children,i),r.child;case 12:return Bt(t,r,r.pendingProps.children,i),r.child;case 10:e:{if(c=r.type._context,p=r.pendingProps,g=r.memoizedProps,x=p.value,rt(Yl,c._currentValue),c._currentValue=x,g!==null)if(In(g.value,x)){if(g.children===p.children&&!Gt.current){r=_r(t,r,i);break e}}else for(g=r.child,g!==null&&(g.return=r);g!==null;){var E=g.dependencies;if(E!==null){x=g.child;for(var I=E.firstContext;I!==null;){if(I.context===c){if(g.tag===1){I=Cr(-1,i&-i),I.tag=2;var V=g.updateQueue;if(V!==null){V=V.shared;var X=V.pending;X===null?I.next=I:(I.next=X.next,X.next=I),V.pending=I}}g.lanes|=i,I=g.alternate,I!==null&&(I.lanes|=i),hf(g.return,i,r),E.lanes|=i;break}I=I.next}}else if(g.tag===10)x=g.type===r.type?null:g.child;else if(g.tag===18){if(x=g.return,x===null)throw Error(o(341));x.lanes|=i,E=x.alternate,E!==null&&(E.lanes|=i),hf(x,i,r),x=g.sibling}else x=g.child;if(x!==null)x.return=g;else for(x=g;x!==null;){if(x===r){x=null;break}if(g=x.sibling,g!==null){g.return=x.return,x=g;break}x=x.return}g=x}Bt(t,r,p.children,i),r=r.child}return r;case 9:return p=r.type,c=r.pendingProps.children,zs(r,i),p=hn(p),c=c(p),r.flags|=1,Bt(t,r,c,i),r.child;case 14:return c=r.type,p=Nn(c,r.pendingProps),p=Nn(c.type,p),Ox(t,r,c,p,i);case 15:return Tx(t,r,r.type,r.pendingProps,i);case 17:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:Nn(c,p),lc(t,r),r.tag=1,qt(c)?(t=!0,Hl(r)):t=!1,zs(r,i),Cx(r,c,p),Df(r,c,p,i),Af(null,r,c,!0,t,i);case 19:return Vx(t,r,i);case 22:return Ax(t,r,i)}throw Error(o(156,r.tag))};function dw(t,r){return Hv(t,r)}function l2(t,r,i,c){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(t,r,i,c){return new l2(t,r,i,c)}function ep(t){return t=t.prototype,!(!t||!t.isReactComponent)}function c2(t){if(typeof t=="function")return ep(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ue)return 11;if(t===xe)return 14}return 2}function mo(t,r){var i=t.alternate;return i===null?(i=vn(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&14680064,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i}function xc(t,r,i,c,p,g){var x=2;if(c=t,typeof t=="function")ep(t)&&(x=1);else if(typeof t=="string")x=5;else e:switch(t){case B:return Yo(i.children,p,g,r);case L:x=8,p|=8;break;case Z:return t=vn(12,i,r,p|2),t.elementType=Z,t.lanes=g,t;case ce:return t=vn(13,i,r,p),t.elementType=ce,t.lanes=g,t;case Y:return t=vn(19,i,r,p),t.elementType=Y,t.lanes=g,t;case te:return wc(i,p,g,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ae:x=10;break e;case be:x=9;break e;case ue:x=11;break e;case xe:x=14;break e;case le:x=16,c=null;break e}throw Error(o(130,t==null?t:typeof t,""))}return r=vn(x,i,r,p),r.elementType=t,r.type=c,r.lanes=g,r}function Yo(t,r,i,c){return t=vn(7,t,c,r),t.lanes=i,t}function wc(t,r,i,c){return t=vn(22,t,c,r),t.elementType=te,t.lanes=i,t.stateNode={isHidden:!1},t}function tp(t,r,i){return t=vn(6,t,null,r),t.lanes=i,t}function np(t,r,i){return r=vn(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function u2(t,r,i,c,p){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rd(0),this.expirationTimes=Rd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rd(0),this.identifierPrefix=c,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function rp(t,r,i,c,p,g,x,E,I){return t=new u2(t,r,i,E,I),r===1?(r=1,g===!0&&(r|=8)):r=0,g=vn(3,null,null,r),t.current=g,g.stateNode=t,g.memoizedState={element:c,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},gf(g),t}function d2(t,r,i){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:c==null?null:""+c,children:t,containerInfo:r,implementation:i}}function fw(t){if(!t)return so;t=t._reactInternals;e:{if(Lo(t)!==t||t.tag!==1)throw Error(o(170));var r=t;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(qt(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(o(171))}if(t.tag===1){var i=t.type;if(qt(i))return Fy(t,i,r)}return r}function pw(t,r,i,c,p,g,x,E,I){return t=rp(i,c,!0,t,p,g,x,E,I),t.context=fw(null),i=t.current,c=Ht(),p=po(i),g=Cr(c,p),g.callback=r??null,lo(i,g,p),t.current.lanes=p,Ci(t,p,c),Xt(t,c),t}function bc(t,r,i,c){var p=r.current,g=Ht(),x=po(p);return i=fw(i),r.context===null?r.context=i:r.pendingContext=i,r=Cr(g,x),r.payload={element:t},c=c===void 0?null:c,c!==null&&(r.callback=c),t=lo(p,r,x),t!==null&&(An(t,p,x,g),Xl(t,p,x)),x}function Sc(t){return t=t.current,t.child?(t.child.tag===5,t.child.stateNode):null}function hw(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function op(t,r){hw(t,r),(t=t.alternate)&&hw(t,r)}function f2(){return null}var mw=typeof reportError=="function"?reportError:function(t){console.error(t)};function sp(t){this._internalRoot=t}kc.prototype.render=sp.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));bc(t,r,null,null)},kc.prototype.unmount=sp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Zo(function(){bc(null,t,null,null)}),r[xr]=null}};function kc(t){this._internalRoot=t}kc.prototype.unstable_scheduleHydration=function(t){if(t){var r=Xv();t={blockedOn:null,target:t,priority:r};for(var i=0;i<eo.length&&r!==0&&r<eo[i].priority;i++);eo.splice(i,0,t),i===0&&ty(t)}};function ip(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Cc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function gw(){}function p2(t,r,i,c,p){if(p){if(typeof c=="function"){var g=c;c=function(){var V=Sc(x);g.call(V)}}var x=pw(r,c,t,0,null,!1,!1,"",gw);return t._reactRootContainer=x,t[xr]=x.current,Li(t.nodeType===8?t.parentNode:t),Zo(),x}for(;p=t.lastChild;)t.removeChild(p);if(typeof c=="function"){var E=c;c=function(){var V=Sc(I);E.call(V)}}var I=rp(t,0,!1,null,null,!1,!1,"",gw);return t._reactRootContainer=I,t[xr]=I.current,Li(t.nodeType===8?t.parentNode:t),Zo(function(){bc(r,I,i,c)}),I}function _c(t,r,i,c,p){var g=i._reactRootContainer;if(g){var x=g;if(typeof p=="function"){var E=p;p=function(){var I=Sc(x);E.call(I)}}bc(r,x,t,p)}else x=p2(i,r,t,p,c);return Sc(x)}Yv=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var i=ki(r.pendingLanes);i!==0&&(Id(r,i|1),Xt(r,mt()),(qe&6)===0&&(Hs=mt()+500,io()))}break;case 13:Zo(function(){var c=kr(t,1);if(c!==null){var p=Ht();An(c,t,1,p)}}),op(t,1)}},Dd=function(t){if(t.tag===13){var r=kr(t,134217728);if(r!==null){var i=Ht();An(r,t,134217728,i)}op(t,134217728)}},Qv=function(t){if(t.tag===13){var r=po(t),i=kr(t,r);if(i!==null){var c=Ht();An(i,t,r,c)}op(t,r)}},Xv=function(){return et},Jv=function(t,r){var i=et;try{return et=t,r()}finally{et=i}},bi=function(t,r,i){switch(r){case"input":if(Cn(t,i),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<i.length;r++){var c=i[r];if(c!==t&&c.form===t.form){var p=Ul(c);if(!p)throw Error(o(90));We(c),Cn(c,p)}}}break;case"textarea":gi(t,i);break;case"select":r=i.value,r!=null&&un(t,!!i.multiple,r,!1)}},Be=Qf,Qe=Zo;var h2={usingClientEntryPoint:!1,Events:[Vi,Ns,Ul,Q,Re,Qf]},ta={findFiberByHostInstance:zo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},m2={bundleType:ta.bundleType,version:ta.version,rendererPackageName:ta.rendererPackageName,rendererConfig:ta.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Uv(t),t===null?null:t.stateNode},findFiberByHostInstance:ta.findFiberByHostInstance||f2,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 Ec=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ec.isDisabled&&Ec.supportsFiber)try{kl=Ec.inject(m2),Gn=Ec}catch{}}return Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h2,Wt.createPortal=function(t,r){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ip(r))throw Error(o(200));return d2(t,r,null,i)},Wt.createRoot=function(t,r){if(!ip(t))throw Error(o(299));var i=!1,c="",p=mw;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),r=rp(t,1,!1,null,null,i,!1,c,p),t[xr]=r.current,Li(t.nodeType===8?t.parentNode:t),new sp(r)},Wt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=Uv(r),t=t===null?null:t.stateNode,t},Wt.flushSync=function(t){return Zo(t)},Wt.hydrate=function(t,r,i){if(!Cc(r))throw Error(o(200));return _c(null,t,r,!0,i)},Wt.hydrateRoot=function(t,r,i){if(!ip(t))throw Error(o(405));var c=i!=null&&i.hydratedSources||null,p=!1,g="",x=mw;if(i!=null&&(i.unstable_strictMode===!0&&(p=!0),i.identifierPrefix!==void 0&&(g=i.identifierPrefix),i.onRecoverableError!==void 0&&(x=i.onRecoverableError)),r=pw(r,null,t,1,i??null,p,!1,g,x),t[xr]=r.current,Li(t),c)for(t=0;t<c.length;t++)i=c[t],p=i._getVersion,p=p(i._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[i,p]:r.mutableSourceEagerHydrationData.push(i,p);return new kc(r)},Wt.render=function(t,r,i){if(!Cc(r))throw Error(o(200));return _c(null,t,r,!1,i)},Wt.unmountComponentAtNode=function(t){if(!Cc(t))throw Error(o(40));return t._reactRootContainer?(Zo(function(){_c(null,null,t,!1,function(){t._reactRootContainer=null,t[xr]=null})}),!0):!1},Wt.unstable_batchedUpdates=Qf,Wt.unstable_renderSubtreeIntoContainer=function(t,r,i,c){if(!Cc(i))throw Error(o(200));if(t==null||t._reactInternals===void 0)throw Error(o(38));return _c(t,r,i,!1,c)},Wt.version="18.3.1-next-f1338f8080-20240426",Wt}var fp;function pp(){if(fp)return Ic.exports;fp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Ic.exports=Sw(),Ic.exports}var hp;function kw(){if(hp)return na;hp=1;var n=pp();return na.createRoot=n.createRoot,na.hydrateRoot=n.hydrateRoot,na}var Cw=kw(),Ke;(function(n){n.assertEqual=a=>{};function e(a){}n.assertIs=e;function o(a){throw new Error}n.assertNever=o,n.arrayToEnum=a=>{const l={};for(const u of a)l[u]=u;return l},n.getValidEnumValues=a=>{const l=n.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),u={};for(const d of l)u[d]=a[d];return n.objectValues(u)},n.objectValues=a=>n.objectKeys(a).map(function(l){return a[l]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const l=[];for(const u in a)Object.prototype.hasOwnProperty.call(a,u)&&l.push(u);return l},n.find=(a,l)=>{for(const u of a)if(l(u))return u},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function s(a,l=" | "){return a.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}n.joinValues=s,n.jsonStringifyReplacer=(a,l)=>typeof l=="bigint"?l.toString():l})(Ke||(Ke={}));var mp;(function(n){n.mergeShapes=(e,o)=>({...e,...o})})(mp||(mp={}));const ge=Ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pr=n=>{switch(typeof n){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return Number.isNaN(n)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(n)?ge.array:n===null?ge.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?ge.promise:typeof Map<"u"&&n instanceof Map?ge.map:typeof Set<"u"&&n instanceof Set?ge.set:typeof Date<"u"&&n instanceof Date?ge.date:ge.object;default:return ge.unknown}},re=Ke.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"]);class Jn extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const o=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,o):this.__proto__=o,this.name="ZodError",this.issues=e}format(e){const o=e||function(l){return l.message},s={_errors:[]},a=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(a);else if(u.code==="invalid_return_type")a(u.returnTypeError);else if(u.code==="invalid_arguments")a(u.argumentsError);else if(u.path.length===0)s._errors.push(o(u));else{let d=s,h=0;for(;h<u.path.length;){const m=u.path[h];h===u.path.length-1?(d[m]=d[m]||{_errors:[]},d[m]._errors.push(o(u))):d[m]=d[m]||{_errors:[]},d=d[m],h++}}};return a(this),s}static assert(e){if(!(e instanceof Jn))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ke.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=o=>o.message){const o={},s=[];for(const a of this.issues)a.path.length>0?(o[a.path[0]]=o[a.path[0]]||[],o[a.path[0]].push(e(a))):s.push(e(a));return{formErrors:s,fieldErrors:o}}get formErrors(){return this.flatten()}}Jn.create=n=>new Jn(n);const Oc=(n,e)=>{let o;switch(n.code){case re.invalid_type:n.received===ge.undefined?o="Required":o=`Expected ${n.expected}, received ${n.received}`;break;case re.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(n.expected,Ke.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:o=`Unrecognized key(s) in object: ${Ke.joinValues(n.keys,", ")}`;break;case re.invalid_union:o="Invalid input";break;case re.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${Ke.joinValues(n.options)}`;break;case re.invalid_enum_value:o=`Invalid enum value. Expected ${Ke.joinValues(n.options)}, received '${n.received}'`;break;case re.invalid_arguments:o="Invalid function arguments";break;case re.invalid_return_type:o="Invalid function return type";break;case re.invalid_date:o="Invalid date";break;case re.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(o=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(o=`${o} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?o=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?o=`Invalid input: must end with "${n.validation.endsWith}"`:Ke.assertNever(n.validation):n.validation!=="regex"?o=`Invalid ${n.validation}`:o="Invalid";break;case re.too_small:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:o="Invalid input";break;case re.too_big:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?o=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:o="Invalid input";break;case re.custom:o="Invalid input";break;case re.invalid_intersection_types:o="Intersection results could not be merged";break;case re.not_multiple_of:o=`Number must be a multiple of ${n.multipleOf}`;break;case re.not_finite:o="Number must be finite";break;default:o=e.defaultError,Ke.assertNever(n)}return{message:o}};let _w=Oc;function Ew(){return _w}const Pw=n=>{const{data:e,path:o,errorMaps:s,issueData:a}=n,l=[...o,...a.path||[]],u={...a,path:l};if(a.message!==void 0)return{...a,path:l,message:a.message};let d="";const h=s.filter(m=>!!m).slice().reverse();for(const m of h)d=m(u,{data:e,defaultError:d}).message;return{...a,path:l,message:d}};function fe(n,e){const o=Ew(),s=Pw({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,o,o===Oc?void 0:Oc].filter(a=>!!a)});n.common.issues.push(s)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,o){const s=[];for(const a of o){if(a.status==="aborted")return Ie;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,o){const s=[];for(const a of o){const l=await a.key,u=await a.value;s.push({key:l,value:u})}return Lt.mergeObjectSync(e,s)}static mergeObjectSync(e,o){const s={};for(const a of o){const{key:l,value:u}=a;if(l.status==="aborted"||u.status==="aborted")return Ie;l.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||a.alwaysSet)&&(s[l.value]=u.value)}return{status:e.value,value:s}}}const Ie=Object.freeze({status:"aborted"}),Ks=n=>({status:"dirty",value:n}),an=n=>({status:"valid",value:n}),gp=n=>n.status==="aborted",vp=n=>n.status==="dirty",Xo=n=>n.status==="valid",ra=n=>typeof Promise<"u"&&n instanceof Promise;var Ce;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e?.message})(Ce||(Ce={}));class $n{constructor(e,o,s,a){this._cachedPath=[],this.parent=e,this.data=o,this._path=s,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const yp=(n,e)=>{if(Xo(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const o=new Jn(n.common.issues);return this._error=o,this._error}}};function Ae(n){if(!n)return{};const{errorMap:e,invalid_type_error:o,required_error:s,description:a}=n;if(e&&(o||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(u,d)=>{const{message:h}=n;return u.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??s??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:h??o??d.defaultError}},description:a}}class Fe{get description(){return this._def.description}_getType(e){return Pr(e.data)}_getOrReturnCtx(e,o){return o||{common:e.parent.common,data:e.data,parsedType:Pr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Lt,ctx:{common:e.parent.common,data:e.data,parsedType:Pr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const o=this._parse(e);if(ra(o))throw new Error("Synchronous parse encountered promise.");return o}_parseAsync(e){const o=this._parse(e);return Promise.resolve(o)}parse(e,o){const s=this.safeParse(e,o);if(s.success)return s.data;throw s.error}safeParse(e,o){const s={common:{issues:[],async:o?.async??!1,contextualErrorMap:o?.errorMap},path:o?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Pr(e)},a=this._parseSync({data:e,path:s.path,parent:s});return yp(s,a)}"~validate"(e){const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Pr(e)};if(!this["~standard"].async)try{const s=this._parseSync({data:e,path:[],parent:o});return Xo(s)?{value:s.value}:{issues:o.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:o}).then(s=>Xo(s)?{value:s.value}:{issues:o.common.issues})}async parseAsync(e,o){const s=await this.safeParseAsync(e,o);if(s.success)return s.data;throw s.error}async safeParseAsync(e,o){const s={common:{issues:[],contextualErrorMap:o?.errorMap,async:!0},path:o?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Pr(e)},a=this._parse({data:e,path:s.path,parent:s}),l=await(ra(a)?a:Promise.resolve(a));return yp(s,l)}refine(e,o){const s=a=>typeof o=="string"||typeof o>"u"?{message:o}:typeof o=="function"?o(a):o;return this._refinement((a,l)=>{const u=e(a),d=()=>l.addIssue({code:re.custom,...s(a)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(e,o){return this._refinement((s,a)=>e(s)?!0:(a.addIssue(typeof o=="function"?o(s,a):o),!1))}_refinement(e){return new wo({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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),this["~standard"]={version:1,vendor:"zod",validate:o=>this["~validate"](o)}}optional(){return nr.create(this,this._def)}nullable(){return bo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mn.create(this)}promise(){return da.create(this,this._def)}or(e){return ia.create([this,e],this._def)}and(e){return aa.create(this,e,this._def)}transform(e){return new wo({...Ae(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const o=typeof e=="function"?e:()=>e;return new fa({...Ae(this._def),innerType:this,defaultValue:o,typeName:De.ZodDefault})}brand(){return new Pp({typeName:De.ZodBranded,type:this,...Ae(this._def)})}catch(e){const o=typeof e=="function"?e:()=>e;return new pa({...Ae(this._def),innerType:this,catchValue:o,typeName:De.ZodCatch})}describe(e){const o=this.constructor;return new o({...this._def,description:e})}pipe(e){return Fc.create(this,e)}readonly(){return ha.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Rw=/^c[^\s-]{8,}$/i,Iw=/^[0-9a-z]+$/,Dw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Nw=/^[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,Ow=/^[a-z0-9_-]{21}$/i,Tw=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Aw=/^[-+]?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)?)??$/,$w=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Mw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Tc;const jw=/^(?:(?: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])$/,Lw=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,zw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Fw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Vw=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Uw=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xp="((\\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])))",Bw=new RegExp(`^${xp}$`);function wp(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);const o=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${o}`}function Hw(n){return new RegExp(`^${wp(n)}$`)}function Ww(n){let e=`${xp}T${wp(n)}`;const o=[];return o.push(n.local?"Z?":"Z"),n.offset&&o.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${o.join("|")})`,new RegExp(`^${e}$`)}function Kw(n,e){return!!((e==="v4"||!e)&&jw.test(n)||(e==="v6"||!e)&&zw.test(n))}function Zw(n,e){if(!Tw.test(n))return!1;try{const[o]=n.split("."),s=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),a=JSON.parse(atob(s));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Gw(n,e){return!!((e==="v4"||!e)&&Lw.test(n)||(e==="v6"||!e)&&Fw.test(n))}class er extends Fe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ge.string){const l=this._getOrReturnCtx(e);return fe(l,{code:re.invalid_type,expected:ge.string,received:l.parsedType}),Ie}const s=new Lt;let a;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(a=this._getOrReturnCtx(e,a),fe(a,{code:re.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="max")e.data.length>l.value&&(a=this._getOrReturnCtx(e,a),fe(a,{code:re.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="length"){const u=e.data.length>l.value,d=e.data.length<l.value;(u||d)&&(a=this._getOrReturnCtx(e,a),u?fe(a,{code:re.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&fe(a,{code:re.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),s.dirty())}else if(l.kind==="email")$w.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"email",code:re.invalid_string,message:l.message}),s.dirty());else if(l.kind==="emoji")Tc||(Tc=new RegExp(Mw,"u")),Tc.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"emoji",code:re.invalid_string,message:l.message}),s.dirty());else if(l.kind==="uuid")Nw.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"uuid",code:re.invalid_string,message:l.message}),s.dirty());else if(l.kind==="nanoid")Ow.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"nanoid",code:re.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid")Rw.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"cuid",code:re.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid2")Iw.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"cuid2",code:re.invalid_string,message:l.message}),s.dirty());else if(l.kind==="ulid")Dw.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"ulid",code:re.invalid_string,message:l.message}),s.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),fe(a,{validation:"url",code:re.invalid_string,message:l.message}),s.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"regex",code:re.invalid_string,message:l.message}),s.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(a=this._getOrReturnCtx(e,a),fe(a,{code:re.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),s.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(a=this._getOrReturnCtx(e,a),fe(a,{code:re.invalid_string,validation:{startsWith:l.value},message:l.message}),s.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(a=this._getOrReturnCtx(e,a),fe(a,{code:re.invalid_string,validation:{endsWith:l.value},message:l.message}),s.dirty()):l.kind==="datetime"?Ww(l).test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{code:re.invalid_string,validation:"datetime",message:l.message}),s.dirty()):l.kind==="date"?Bw.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{code:re.invalid_string,validation:"date",message:l.message}),s.dirty()):l.kind==="time"?Hw(l).test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{code:re.invalid_string,validation:"time",message:l.message}),s.dirty()):l.kind==="duration"?Aw.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"duration",code:re.invalid_string,message:l.message}),s.dirty()):l.kind==="ip"?Kw(e.data,l.version)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"ip",code:re.invalid_string,message:l.message}),s.dirty()):l.kind==="jwt"?Zw(e.data,l.alg)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"jwt",code:re.invalid_string,message:l.message}),s.dirty()):l.kind==="cidr"?Gw(e.data,l.version)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"cidr",code:re.invalid_string,message:l.message}),s.dirty()):l.kind==="base64"?Vw.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"base64",code:re.invalid_string,message:l.message}),s.dirty()):l.kind==="base64url"?Uw.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"base64url",code:re.invalid_string,message:l.message}),s.dirty()):Ke.assertNever(l);return{status:s.value,value:e.data}}_regex(e,o,s){return this.refinement(a=>e.test(a),{validation:o,code:re.invalid_string,...Ce.errToObj(s)})}_addCheck(e){return new er({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ce.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ce.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ce.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ce.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Ce.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ce.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ce.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ce.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Ce.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Ce.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Ce.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ce.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Ce.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Ce.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Ce.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Ce.errToObj(e)})}regex(e,o){return this._addCheck({kind:"regex",regex:e,...Ce.errToObj(o)})}includes(e,o){return this._addCheck({kind:"includes",value:e,position:o?.position,...Ce.errToObj(o?.message)})}startsWith(e,o){return this._addCheck({kind:"startsWith",value:e,...Ce.errToObj(o)})}endsWith(e,o){return this._addCheck({kind:"endsWith",value:e,...Ce.errToObj(o)})}min(e,o){return this._addCheck({kind:"min",value:e,...Ce.errToObj(o)})}max(e,o){return this._addCheck({kind:"max",value:e,...Ce.errToObj(o)})}length(e,o){return this._addCheck({kind:"length",value:e,...Ce.errToObj(o)})}nonempty(e){return this.min(1,Ce.errToObj(e))}trim(){return new er({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new er({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new er({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e}get maxLength(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e}}er.create=n=>new er({checks:[],typeName:De.ZodString,coerce:n?.coerce??!1,...Ae(n)});function qw(n,e){const o=(n.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=o>s?o:s,l=Number.parseInt(n.toFixed(a).replace(".","")),u=Number.parseInt(e.toFixed(a).replace(".",""));return l%u/10**a}class Jo extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ge.number){const l=this._getOrReturnCtx(e);return fe(l,{code:re.invalid_type,expected:ge.number,received:l.parsedType}),Ie}let s;const a=new Lt;for(const l of this._def.checks)l.kind==="int"?Ke.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),fe(s,{code:re.invalid_type,expected:"integer",received:"float",message:l.message}),a.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:re.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),a.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:re.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),a.dirty()):l.kind==="multipleOf"?qw(e.data,l.value)!==0&&(s=this._getOrReturnCtx(e,s),fe(s,{code:re.not_multiple_of,multipleOf:l.value,message:l.message}),a.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),fe(s,{code:re.not_finite,message:l.message}),a.dirty()):Ke.assertNever(l);return{status:a.value,value:e.data}}gte(e,o){return this.setLimit("min",e,!0,Ce.toString(o))}gt(e,o){return this.setLimit("min",e,!1,Ce.toString(o))}lte(e,o){return this.setLimit("max",e,!0,Ce.toString(o))}lt(e,o){return this.setLimit("max",e,!1,Ce.toString(o))}setLimit(e,o,s,a){return new Jo({...this._def,checks:[...this._def.checks,{kind:e,value:o,inclusive:s,message:Ce.toString(a)}]})}_addCheck(e){return new Jo({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ce.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(e)})}multipleOf(e,o){return this._addCheck({kind:"multipleOf",value:e,message:Ce.toString(o)})}finite(e){return this._addCheck({kind:"finite",message:Ce.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(e)})}get minValue(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e}get maxValue(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ke.isInteger(e.value))}get isFinite(){let e=null,o=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(o===null||s.value>o)&&(o=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(o)&&Number.isFinite(e)}}Jo.create=n=>new Jo({checks:[],typeName:De.ZodNumber,coerce:n?.coerce||!1,...Ae(n)});class Zs extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ge.bigint)return this._getInvalidInput(e);let s;const a=new Lt;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:re.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),a.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:re.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),a.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:re.not_multiple_of,multipleOf:l.value,message:l.message}),a.dirty()):Ke.assertNever(l);return{status:a.value,value:e.data}}_getInvalidInput(e){const o=this._getOrReturnCtx(e);return fe(o,{code:re.invalid_type,expected:ge.bigint,received:o.parsedType}),Ie}gte(e,o){return this.setLimit("min",e,!0,Ce.toString(o))}gt(e,o){return this.setLimit("min",e,!1,Ce.toString(o))}lte(e,o){return this.setLimit("max",e,!0,Ce.toString(o))}lt(e,o){return this.setLimit("max",e,!1,Ce.toString(o))}setLimit(e,o,s,a){return new Zs({...this._def,checks:[...this._def.checks,{kind:e,value:o,inclusive:s,message:Ce.toString(a)}]})}_addCheck(e){return new Zs({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(e)})}multipleOf(e,o){return this._addCheck({kind:"multipleOf",value:e,message:Ce.toString(o)})}get minValue(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e}get maxValue(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e}}Zs.create=n=>new Zs({checks:[],typeName:De.ZodBigInt,coerce:n?.coerce??!1,...Ae(n)});class Ac extends Fe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ge.boolean){const s=this._getOrReturnCtx(e);return fe(s,{code:re.invalid_type,expected:ge.boolean,received:s.parsedType}),Ie}return an(e.data)}}Ac.create=n=>new Ac({typeName:De.ZodBoolean,coerce:n?.coerce||!1,...Ae(n)});class oa extends Fe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ge.date){const l=this._getOrReturnCtx(e);return fe(l,{code:re.invalid_type,expected:ge.date,received:l.parsedType}),Ie}if(Number.isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return fe(l,{code:re.invalid_date}),Ie}const s=new Lt;let a;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(a=this._getOrReturnCtx(e,a),fe(a,{code:re.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),s.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(a=this._getOrReturnCtx(e,a),fe(a,{code:re.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),s.dirty()):Ke.assertNever(l);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new oa({...this._def,checks:[...this._def.checks,e]})}min(e,o){return this._addCheck({kind:"min",value:e.getTime(),message:Ce.toString(o)})}max(e,o){return this._addCheck({kind:"max",value:e.getTime(),message:Ce.toString(o)})}get minDate(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e!=null?new Date(e):null}}oa.create=n=>new oa({checks:[],coerce:n?.coerce||!1,typeName:De.ZodDate,...Ae(n)});class bp extends Fe{_parse(e){if(this._getType(e)!==ge.symbol){const s=this._getOrReturnCtx(e);return fe(s,{code:re.invalid_type,expected:ge.symbol,received:s.parsedType}),Ie}return an(e.data)}}bp.create=n=>new bp({typeName:De.ZodSymbol,...Ae(n)});class $c extends Fe{_parse(e){if(this._getType(e)!==ge.undefined){const s=this._getOrReturnCtx(e);return fe(s,{code:re.invalid_type,expected:ge.undefined,received:s.parsedType}),Ie}return an(e.data)}}$c.create=n=>new $c({typeName:De.ZodUndefined,...Ae(n)});class sa extends Fe{_parse(e){if(this._getType(e)!==ge.null){const s=this._getOrReturnCtx(e);return fe(s,{code:re.invalid_type,expected:ge.null,received:s.parsedType}),Ie}return an(e.data)}}sa.create=n=>new sa({typeName:De.ZodNull,...Ae(n)});class Sp extends Fe{constructor(){super(...arguments),this._any=!0}_parse(e){return an(e.data)}}Sp.create=n=>new Sp({typeName:De.ZodAny,...Ae(n)});class Mc extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return an(e.data)}}Mc.create=n=>new Mc({typeName:De.ZodUnknown,...Ae(n)});class Rr extends Fe{_parse(e){const o=this._getOrReturnCtx(e);return fe(o,{code:re.invalid_type,expected:ge.never,received:o.parsedType}),Ie}}Rr.create=n=>new Rr({typeName:De.ZodNever,...Ae(n)});class kp extends Fe{_parse(e){if(this._getType(e)!==ge.undefined){const s=this._getOrReturnCtx(e);return fe(s,{code:re.invalid_type,expected:ge.void,received:s.parsedType}),Ie}return an(e.data)}}kp.create=n=>new kp({typeName:De.ZodVoid,...Ae(n)});class Mn extends Fe{_parse(e){const{ctx:o,status:s}=this._processInputParams(e),a=this._def;if(o.parsedType!==ge.array)return fe(o,{code:re.invalid_type,expected:ge.array,received:o.parsedType}),Ie;if(a.exactLength!==null){const u=o.data.length>a.exactLength.value,d=o.data.length<a.exactLength.value;(u||d)&&(fe(o,{code:u?re.too_big:re.too_small,minimum:d?a.exactLength.value:void 0,maximum:u?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&o.data.length<a.minLength.value&&(fe(o,{code:re.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&o.data.length>a.maxLength.value&&(fe(o,{code:re.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),o.common.async)return Promise.all([...o.data].map((u,d)=>a.type._parseAsync(new $n(o,u,o.path,d)))).then(u=>Lt.mergeArray(s,u));const l=[...o.data].map((u,d)=>a.type._parseSync(new $n(o,u,o.path,d)));return Lt.mergeArray(s,l)}get element(){return this._def.type}min(e,o){return new Mn({...this._def,minLength:{value:e,message:Ce.toString(o)}})}max(e,o){return new Mn({...this._def,maxLength:{value:e,message:Ce.toString(o)}})}length(e,o){return new Mn({...this._def,exactLength:{value:e,message:Ce.toString(o)}})}nonempty(e){return this.min(1,e)}}Mn.create=(n,e)=>new Mn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...Ae(e)});function es(n){if(n instanceof vt){const e={};for(const o in n.shape){const s=n.shape[o];e[o]=nr.create(es(s))}return new vt({...n._def,shape:()=>e})}else return n instanceof Mn?new Mn({...n._def,type:es(n.element)}):n instanceof nr?nr.create(es(n.unwrap())):n instanceof bo?bo.create(es(n.unwrap())):n instanceof yo?yo.create(n.items.map(e=>es(e))):n}class vt extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),o=Ke.objectKeys(e);return this._cached={shape:e,keys:o},this._cached}_parse(e){if(this._getType(e)!==ge.object){const m=this._getOrReturnCtx(e);return fe(m,{code:re.invalid_type,expected:ge.object,received:m.parsedType}),Ie}const{status:s,ctx:a}=this._processInputParams(e),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof Rr&&this._def.unknownKeys==="strip"))for(const m in a.data)u.includes(m)||d.push(m);const h=[];for(const m of u){const v=l[m],y=a.data[m];h.push({key:{status:"valid",value:m},value:v._parse(new $n(a,y,a.path,m)),alwaysSet:m in a.data})}if(this._def.catchall instanceof Rr){const m=this._def.unknownKeys;if(m==="passthrough")for(const v of d)h.push({key:{status:"valid",value:v},value:{status:"valid",value:a.data[v]}});else if(m==="strict")d.length>0&&(fe(a,{code:re.unrecognized_keys,keys:d}),s.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const v of d){const y=a.data[v];h.push({key:{status:"valid",value:v},value:m._parse(new $n(a,y,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const m=[];for(const v of h){const y=await v.key,w=await v.value;m.push({key:y,value:w,alwaysSet:v.alwaysSet})}return m}).then(m=>Lt.mergeObjectSync(s,m)):Lt.mergeObjectSync(s,h)}get shape(){return this._def.shape()}strict(e){return Ce.errToObj,new vt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(o,s)=>{const a=this._def.errorMap?.(o,s).message??s.defaultError;return o.code==="unrecognized_keys"?{message:Ce.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(e){return new vt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new vt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:De.ZodObject})}setKey(e,o){return this.augment({[e]:o})}catchall(e){return new vt({...this._def,catchall:e})}pick(e){const o={};for(const s of Ke.objectKeys(e))e[s]&&this.shape[s]&&(o[s]=this.shape[s]);return new vt({...this._def,shape:()=>o})}omit(e){const o={};for(const s of Ke.objectKeys(this.shape))e[s]||(o[s]=this.shape[s]);return new vt({...this._def,shape:()=>o})}deepPartial(){return es(this)}partial(e){const o={};for(const s of Ke.objectKeys(this.shape)){const a=this.shape[s];e&&!e[s]?o[s]=a:o[s]=a.optional()}return new vt({...this._def,shape:()=>o})}required(e){const o={};for(const s of Ke.objectKeys(this.shape))if(e&&!e[s])o[s]=this.shape[s];else{let l=this.shape[s];for(;l instanceof nr;)l=l._def.innerType;o[s]=l}return new vt({...this._def,shape:()=>o})}keyof(){return _p(Ke.objectKeys(this.shape))}}vt.create=(n,e)=>new vt({shape:()=>n,unknownKeys:"strip",catchall:Rr.create(),typeName:De.ZodObject,...Ae(e)}),vt.strictCreate=(n,e)=>new vt({shape:()=>n,unknownKeys:"strict",catchall:Rr.create(),typeName:De.ZodObject,...Ae(e)}),vt.lazycreate=(n,e)=>new vt({shape:n,unknownKeys:"strip",catchall:Rr.create(),typeName:De.ZodObject,...Ae(e)});class ia extends Fe{_parse(e){const{ctx:o}=this._processInputParams(e),s=this._def.options;function a(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return o.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new Jn(d.ctx.common.issues));return fe(o,{code:re.invalid_union,unionErrors:u}),Ie}if(o.common.async)return Promise.all(s.map(async l=>{const u={...o,common:{...o.common,issues:[]},parent:null};return{result:await l._parseAsync({data:o.data,path:o.path,parent:u}),ctx:u}})).then(a);{let l;const u=[];for(const h of s){const m={...o,common:{...o.common,issues:[]},parent:null},v=h._parseSync({data:o.data,path:o.path,parent:m});if(v.status==="valid")return v;v.status==="dirty"&&!l&&(l={result:v,ctx:m}),m.common.issues.length&&u.push(m.common.issues)}if(l)return o.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(h=>new Jn(h));return fe(o,{code:re.invalid_union,unionErrors:d}),Ie}}get options(){return this._def.options}}ia.create=(n,e)=>new ia({options:n,typeName:De.ZodUnion,...Ae(e)});const tr=n=>n instanceof ca?tr(n.schema):n instanceof wo?tr(n.innerType()):n instanceof ua?[n.value]:n instanceof xo?n.options:n instanceof zc?Ke.objectValues(n.enum):n instanceof fa?tr(n._def.innerType):n instanceof $c?[void 0]:n instanceof sa?[null]:n instanceof nr?[void 0,...tr(n.unwrap())]:n instanceof bo?[null,...tr(n.unwrap())]:n instanceof Pp||n instanceof ha?tr(n.unwrap()):n instanceof pa?tr(n._def.innerType):[];class jc extends Fe{_parse(e){const{ctx:o}=this._processInputParams(e);if(o.parsedType!==ge.object)return fe(o,{code:re.invalid_type,expected:ge.object,received:o.parsedType}),Ie;const s=this.discriminator,a=o.data[s],l=this.optionsMap.get(a);return l?o.common.async?l._parseAsync({data:o.data,path:o.path,parent:o}):l._parseSync({data:o.data,path:o.path,parent:o}):(fe(o,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),Ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,o,s){const a=new Map;for(const l of o){const u=tr(l.shape[e]);if(!u.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const d of u){if(a.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);a.set(d,l)}}return new jc({typeName:De.ZodDiscriminatedUnion,discriminator:e,options:o,optionsMap:a,...Ae(s)})}}function Lc(n,e){const o=Pr(n),s=Pr(e);if(n===e)return{valid:!0,data:n};if(o===ge.object&&s===ge.object){const a=Ke.objectKeys(e),l=Ke.objectKeys(n).filter(d=>a.indexOf(d)!==-1),u={...n,...e};for(const d of l){const h=Lc(n[d],e[d]);if(!h.valid)return{valid:!1};u[d]=h.data}return{valid:!0,data:u}}else if(o===ge.array&&s===ge.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let l=0;l<n.length;l++){const u=n[l],d=e[l],h=Lc(u,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return o===ge.date&&s===ge.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class aa extends Fe{_parse(e){const{status:o,ctx:s}=this._processInputParams(e),a=(l,u)=>{if(gp(l)||gp(u))return Ie;const d=Lc(l.value,u.value);return d.valid?((vp(l)||vp(u))&&o.dirty(),{status:o.value,value:d.data}):(fe(s,{code:re.invalid_intersection_types}),Ie)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([l,u])=>a(l,u)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}aa.create=(n,e,o)=>new aa({left:n,right:e,typeName:De.ZodIntersection,...Ae(o)});class yo extends Fe{_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ge.array)return fe(s,{code:re.invalid_type,expected:ge.array,received:s.parsedType}),Ie;if(s.data.length<this._def.items.length)return fe(s,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ie;!this._def.rest&&s.data.length>this._def.items.length&&(fe(s,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o.dirty());const l=[...s.data].map((u,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new $n(s,u,s.path,d)):null}).filter(u=>!!u);return s.common.async?Promise.all(l).then(u=>Lt.mergeArray(o,u)):Lt.mergeArray(o,l)}get items(){return this._def.items}rest(e){return new yo({...this._def,rest:e})}}yo.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yo({items:n,typeName:De.ZodTuple,rest:null,...Ae(e)})};class la extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ge.object)return fe(s,{code:re.invalid_type,expected:ge.object,received:s.parsedType}),Ie;const a=[],l=this._def.keyType,u=this._def.valueType;for(const d in s.data)a.push({key:l._parse(new $n(s,d,s.path,d)),value:u._parse(new $n(s,s.data[d],s.path,d)),alwaysSet:d in s.data});return s.common.async?Lt.mergeObjectAsync(o,a):Lt.mergeObjectSync(o,a)}get element(){return this._def.valueType}static create(e,o,s){return o instanceof Fe?new la({keyType:e,valueType:o,typeName:De.ZodRecord,...Ae(s)}):new la({keyType:er.create(),valueType:e,typeName:De.ZodRecord,...Ae(o)})}}class Cp extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ge.map)return fe(s,{code:re.invalid_type,expected:ge.map,received:s.parsedType}),Ie;const a=this._def.keyType,l=this._def.valueType,u=[...s.data.entries()].map(([d,h],m)=>({key:a._parse(new $n(s,d,s.path,[m,"key"])),value:l._parse(new $n(s,h,s.path,[m,"value"]))}));if(s.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of u){const m=await h.key,v=await h.value;if(m.status==="aborted"||v.status==="aborted")return Ie;(m.status==="dirty"||v.status==="dirty")&&o.dirty(),d.set(m.value,v.value)}return{status:o.value,value:d}})}else{const d=new Map;for(const h of u){const m=h.key,v=h.value;if(m.status==="aborted"||v.status==="aborted")return Ie;(m.status==="dirty"||v.status==="dirty")&&o.dirty(),d.set(m.value,v.value)}return{status:o.value,value:d}}}}Cp.create=(n,e,o)=>new Cp({valueType:e,keyType:n,typeName:De.ZodMap,...Ae(o)});class Gs extends Fe{_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ge.set)return fe(s,{code:re.invalid_type,expected:ge.set,received:s.parsedType}),Ie;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(fe(s,{code:re.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),o.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(fe(s,{code:re.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),o.dirty());const l=this._def.valueType;function u(h){const m=new Set;for(const v of h){if(v.status==="aborted")return Ie;v.status==="dirty"&&o.dirty(),m.add(v.value)}return{status:o.value,value:m}}const d=[...s.data.values()].map((h,m)=>l._parse(new $n(s,h,s.path,m)));return s.common.async?Promise.all(d).then(h=>u(h)):u(d)}min(e,o){return new Gs({...this._def,minSize:{value:e,message:Ce.toString(o)}})}max(e,o){return new Gs({...this._def,maxSize:{value:e,message:Ce.toString(o)}})}size(e,o){return this.min(e,o).max(e,o)}nonempty(e){return this.min(1,e)}}Gs.create=(n,e)=>new Gs({valueType:n,minSize:null,maxSize:null,typeName:De.ZodSet,...Ae(e)});class ca extends Fe{get schema(){return this._def.getter()}_parse(e){const{ctx:o}=this._processInputParams(e);return this._def.getter()._parse({data:o.data,path:o.path,parent:o})}}ca.create=(n,e)=>new ca({getter:n,typeName:De.ZodLazy,...Ae(e)});class ua extends Fe{_parse(e){if(e.data!==this._def.value){const o=this._getOrReturnCtx(e);return fe(o,{received:o.data,code:re.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:e.data}}get value(){return this._def.value}}ua.create=(n,e)=>new ua({value:n,typeName:De.ZodLiteral,...Ae(e)});function _p(n,e){return new xo({values:n,typeName:De.ZodEnum,...Ae(e)})}class xo extends Fe{_parse(e){if(typeof e.data!="string"){const o=this._getOrReturnCtx(e),s=this._def.values;return fe(o,{expected:Ke.joinValues(s),received:o.parsedType,code:re.invalid_type}),Ie}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const o=this._getOrReturnCtx(e),s=this._def.values;return fe(o,{received:o.data,code:re.invalid_enum_value,options:s}),Ie}return an(e.data)}get options(){return this._def.values}get enum(){const e={};for(const o of this._def.values)e[o]=o;return e}get Values(){const e={};for(const o of this._def.values)e[o]=o;return e}get Enum(){const e={};for(const o of this._def.values)e[o]=o;return e}extract(e,o=this._def){return xo.create(e,{...this._def,...o})}exclude(e,o=this._def){return xo.create(this.options.filter(s=>!e.includes(s)),{...this._def,...o})}}xo.create=_p;class zc extends Fe{_parse(e){const o=Ke.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==ge.string&&s.parsedType!==ge.number){const a=Ke.objectValues(o);return fe(s,{expected:Ke.joinValues(a),received:s.parsedType,code:re.invalid_type}),Ie}if(this._cache||(this._cache=new Set(Ke.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=Ke.objectValues(o);return fe(s,{received:s.data,code:re.invalid_enum_value,options:a}),Ie}return an(e.data)}get enum(){return this._def.values}}zc.create=(n,e)=>new zc({values:n,typeName:De.ZodNativeEnum,...Ae(e)});class da extends Fe{unwrap(){return this._def.type}_parse(e){const{ctx:o}=this._processInputParams(e);if(o.parsedType!==ge.promise&&o.common.async===!1)return fe(o,{code:re.invalid_type,expected:ge.promise,received:o.parsedType}),Ie;const s=o.parsedType===ge.promise?o.data:Promise.resolve(o.data);return an(s.then(a=>this._def.type.parseAsync(a,{path:o.path,errorMap:o.common.contextualErrorMap})))}}da.create=(n,e)=>new da({type:n,typeName:De.ZodPromise,...Ae(e)});class wo extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:o,ctx:s}=this._processInputParams(e),a=this._def.effect||null,l={addIssue:u=>{fe(s,u),u.fatal?o.abort():o.dirty()},get path(){return s.path}};if(l.addIssue=l.addIssue.bind(l),a.type==="preprocess"){const u=a.transform(s.data,l);if(s.common.async)return Promise.resolve(u).then(async d=>{if(o.value==="aborted")return Ie;const h=await this._def.schema._parseAsync({data:d,path:s.path,parent:s});return h.status==="aborted"?Ie:h.status==="dirty"||o.value==="dirty"?Ks(h.value):h});{if(o.value==="aborted")return Ie;const d=this._def.schema._parseSync({data:u,path:s.path,parent:s});return d.status==="aborted"?Ie:d.status==="dirty"||o.value==="dirty"?Ks(d.value):d}}if(a.type==="refinement"){const u=d=>{const h=a.refinement(d,l);if(s.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return d.status==="aborted"?Ie:(d.status==="dirty"&&o.dirty(),u(d.value),{status:o.value,value:d.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(d=>d.status==="aborted"?Ie:(d.status==="dirty"&&o.dirty(),u(d.value).then(()=>({status:o.value,value:d.value}))))}if(a.type==="transform")if(s.common.async===!1){const u=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Xo(u))return Ie;const d=a.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:o.value,value:d}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(u=>Xo(u)?Promise.resolve(a.transform(u.value,l)).then(d=>({status:o.value,value:d})):Ie);Ke.assertNever(a)}}wo.create=(n,e,o)=>new wo({schema:n,typeName:De.ZodEffects,effect:e,...Ae(o)}),wo.createWithPreprocess=(n,e,o)=>new wo({schema:e,effect:{type:"preprocess",transform:n},typeName:De.ZodEffects,...Ae(o)});class nr extends Fe{_parse(e){return this._getType(e)===ge.undefined?an(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}nr.create=(n,e)=>new nr({innerType:n,typeName:De.ZodOptional,...Ae(e)});class bo extends Fe{_parse(e){return this._getType(e)===ge.null?an(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}bo.create=(n,e)=>new bo({innerType:n,typeName:De.ZodNullable,...Ae(e)});class fa extends Fe{_parse(e){const{ctx:o}=this._processInputParams(e);let s=o.data;return o.parsedType===ge.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:o.path,parent:o})}removeDefault(){return this._def.innerType}}fa.create=(n,e)=>new fa({innerType:n,typeName:De.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});class pa extends Fe{_parse(e){const{ctx:o}=this._processInputParams(e),s={...o,common:{...o.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return ra(a)?a.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Jn(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Jn(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}pa.create=(n,e)=>new pa({innerType:n,typeName:De.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});class Ep extends Fe{_parse(e){if(this._getType(e)!==ge.nan){const s=this._getOrReturnCtx(e);return fe(s,{code:re.invalid_type,expected:ge.nan,received:s.parsedType}),Ie}return{status:"valid",value:e.data}}}Ep.create=n=>new Ep({typeName:De.ZodNaN,...Ae(n)});class Pp extends Fe{_parse(e){const{ctx:o}=this._processInputParams(e),s=o.data;return this._def.type._parse({data:s,path:o.path,parent:o})}unwrap(){return this._def.type}}class Fc extends Fe{_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?Ie:l.status==="dirty"?(o.dirty(),Ks(l.value)):this._def.out._parseAsync({data:l.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?Ie:a.status==="dirty"?(o.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,o){return new Fc({in:e,out:o,typeName:De.ZodPipeline})}}class ha extends Fe{_parse(e){const o=this._def.innerType._parse(e),s=a=>(Xo(a)&&(a.value=Object.freeze(a.value)),a);return ra(o)?o.then(a=>s(a)):s(o)}unwrap(){return this._def.innerType}}ha.create=(n,e)=>new ha({innerType:n,typeName:De.ZodReadonly,...Ae(e)});var De;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(De||(De={}));const ne=er.create,tt=Jo.create,it=Ac.create,Ir=sa.create,Dr=Mc.create;Rr.create;const nt=Mn.create,he=vt.create,rr=ia.create,Yw=jc.create;aa.create,yo.create;const Nr=la.create,Qw=ca.create,Xe=ua.create,ln=xo.create;da.create,nr.create,bo.create;function Rp(n){var e,o,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(e=0;e<a;e++)n[e]&&(o=Rp(n[e]))&&(s&&(s+=" "),s+=o)}else for(o in n)n[o]&&(s&&(s+=" "),s+=o);return s}function Ip(){for(var n,e,o=0,s="",a=arguments.length;o<a;o++)(n=arguments[o])&&(e=Rp(n))&&(s&&(s+=" "),s+=e);return s}const Xw=(n,e)=>{const o=new Array(n.length+e.length);for(let s=0;s<n.length;s++)o[s]=n[s];for(let s=0;s<e.length;s++)o[n.length+s]=e[s];return o},Jw=(n,e)=>({classGroupId:n,validator:e}),Dp=(n=new Map,e=null,o)=>({nextPart:n,validators:e,classGroupId:o}),ma="-",Np=[],e0="arbitrary..",t0=n=>{const e=r0(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return n0(u);const d=u.split(ma),h=d[0]===""&&d.length>1?1:0;return Op(d,h,e)},getConflictingClassGroupIds:(u,d)=>{if(d){const h=s[u],m=o[u];return h?m?Xw(m,h):h:m||Np}return o[u]||Np}}},Op=(n,e,o)=>{if(n.length-e===0)return o.classGroupId;const a=n[e],l=o.nextPart.get(a);if(l){const m=Op(n,e+1,l);if(m)return m}const u=o.validators;if(u===null)return;const d=e===0?n.join(ma):n.slice(e).join(ma),h=u.length;for(let m=0;m<h;m++){const v=u[m];if(v.validator(d))return v.classGroupId}},n0=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=n.slice(1,-1),o=e.indexOf(":"),s=e.slice(0,o);return s?e0+s:void 0})(),r0=n=>{const{theme:e,classGroups:o}=n;return o0(o,e)},o0=(n,e)=>{const o=Dp();for(const s in n){const a=n[s];Vc(a,o,s,e)}return o},Vc=(n,e,o,s)=>{const a=n.length;for(let l=0;l<a;l++){const u=n[l];s0(u,e,o,s)}},s0=(n,e,o,s)=>{if(typeof n=="string"){i0(n,e,o);return}if(typeof n=="function"){a0(n,e,o,s);return}l0(n,e,o,s)},i0=(n,e,o)=>{const s=n===""?e:Tp(e,n);s.classGroupId=o},a0=(n,e,o,s)=>{if(c0(n)){Vc(n(s),e,o,s);return}e.validators===null&&(e.validators=[]),e.validators.push(Jw(o,n))},l0=(n,e,o,s)=>{const a=Object.entries(n),l=a.length;for(let u=0;u<l;u++){const[d,h]=a[u];Vc(h,Tp(e,d),o,s)}},Tp=(n,e)=>{let o=n;const s=e.split(ma),a=s.length;for(let l=0;l<a;l++){const u=s[l];let d=o.nextPart.get(u);d||(d=Dp(),o.nextPart.set(u,d)),o=d}return o},c0=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,u0=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,o=Object.create(null),s=Object.create(null);const a=(l,u)=>{o[l]=u,e++,e>n&&(e=0,s=o,o=Object.create(null))};return{get(l){let u=o[l];if(u!==void 0)return u;if((u=s[l])!==void 0)return a(l,u),u},set(l,u){l in o?o[l]=u:a(l,u)}}},Uc="!",Ap=":",d0=[],$p=(n,e,o,s,a)=>({modifiers:n,hasImportantModifier:e,baseClassName:o,maybePostfixModifierPosition:s,isExternal:a}),f0=n=>{const{prefix:e,experimentalParseClassName:o}=n;let s=a=>{const l=[];let u=0,d=0,h=0,m;const v=a.length;for(let C=0;C<v;C++){const k=a[C];if(u===0&&d===0){if(k===Ap){l.push(a.slice(h,C)),h=C+1;continue}if(k==="/"){m=C;continue}}k==="["?u++:k==="]"?u--:k==="("?d++:k===")"&&d--}const y=l.length===0?a:a.slice(h);let w=y,b=!1;y.endsWith(Uc)?(w=y.slice(0,-1),b=!0):y.startsWith(Uc)&&(w=y.slice(1),b=!0);const S=m&&m>h?m-h:void 0;return $p(l,b,w,S)};if(e){const a=e+Ap,l=s;s=u=>u.startsWith(a)?l(u.slice(a.length)):$p(d0,!1,u,void 0,!0)}if(o){const a=s;s=l=>o({className:l,parseClassName:a})}return s},p0=n=>{const e=new Map;return n.orderSensitiveModifiers.forEach((o,s)=>{e.set(o,1e6+s)}),o=>{const s=[];let a=[];for(let l=0;l<o.length;l++){const u=o[l],d=u[0]==="[",h=e.has(u);d||h?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(u)):a.push(u)}return a.length>0&&(a.sort(),s.push(...a)),s}},h0=n=>({cache:u0(n.cacheSize),parseClassName:f0(n),sortModifiers:p0(n),postfixLookupClassGroupIds:m0(n),...t0(n)}),m0=n=>{const e=Object.create(null),o=n.postfixLookupClassGroups;if(o)for(let s=0;s<o.length;s++)e[o[s]]=!0;return e},g0=/\s+/,v0=(n,e)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:l,postfixLookupClassGroupIds:u}=e,d=[],h=n.trim().split(g0);let m="";for(let v=h.length-1;v>=0;v-=1){const y=h[v],{isExternal:w,modifiers:b,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:k}=o(y);if(w){m=y+(m.length>0?" "+m:m);continue}let A=!!k,N;if(A){const B=C.substring(0,k);N=s(B);const L=N&&u[N]?s(C):void 0;L&&L!==N&&(N=L,A=!1)}else N=s(C);if(!N){if(!A){m=y+(m.length>0?" "+m:m);continue}if(N=s(C),!N){m=y+(m.length>0?" "+m:m);continue}A=!1}const O=b.length===0?"":b.length===1?b[0]:l(b).join(":"),T=S?O+Uc:O,z=T+N;if(d.indexOf(z)>-1)continue;d.push(z);const R=a(N,A);for(let B=0;B<R.length;++B){const L=R[B];d.push(T+L)}m=y+(m.length>0?" "+m:m)}return m},y0=(...n)=>{let e=0,o,s,a="";for(;e<n.length;)(o=n[e++])&&(s=Mp(o))&&(a&&(a+=" "),a+=s);return a},Mp=n=>{if(typeof n=="string")return n;let e,o="";for(let s=0;s<n.length;s++)n[s]&&(e=Mp(n[s]))&&(o&&(o+=" "),o+=e);return o},x0=(n,...e)=>{let o,s,a,l;const u=h=>{const m=e.reduce((v,y)=>y(v),n());return o=h0(m),s=o.cache.get,a=o.cache.set,l=d,d(h)},d=h=>{const m=s(h);if(m)return m;const v=v0(h,o);return a(h,v),v};return l=u,(...h)=>l(y0(...h))},w0=[],xt=n=>{const e=o=>o[n]||w0;return e.isThemeGetter=!0,e},jp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Lp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,b0=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,S0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k0=/\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$/,C0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,E0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Or=n=>b0.test(n),Me=n=>!!n&&!Number.isNaN(Number(n)),jn=n=>!!n&&Number.isInteger(Number(n)),Bc=n=>n.endsWith("%")&&Me(n.slice(0,-1)),or=n=>S0.test(n),zp=()=>!0,P0=n=>k0.test(n)&&!C0.test(n),Hc=()=>!1,R0=n=>_0.test(n),I0=n=>E0.test(n),D0=n=>!me(n)&&!ve(n),N0=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),O0=n=>Tr(n,Wp,Hc),me=n=>jp.test(n),So=n=>Tr(n,Kp,P0),Fp=n=>Tr(n,F0,Me),T0=n=>Tr(n,Gp,zp),A0=n=>Tr(n,Zp,Hc),Vp=n=>Tr(n,Bp,Hc),$0=n=>Tr(n,Hp,I0),ga=n=>Tr(n,qp,R0),ve=n=>Lp.test(n),qs=n=>ko(n,Kp),M0=n=>ko(n,Zp),Up=n=>ko(n,Bp),j0=n=>ko(n,Wp),L0=n=>ko(n,Hp),va=n=>ko(n,qp,!0),z0=n=>ko(n,Gp,!0),Tr=(n,e,o)=>{const s=jp.exec(n);return s?s[1]?e(s[1]):o(s[2]):!1},ko=(n,e,o=!1)=>{const s=Lp.exec(n);return s?s[1]?e(s[1]):o:!1},Bp=n=>n==="position"||n==="percentage",Hp=n=>n==="image"||n==="url",Wp=n=>n==="length"||n==="size"||n==="bg-size",Kp=n=>n==="length",F0=n=>n==="number",Zp=n=>n==="family-name",Gp=n=>n==="number"||n==="weight",qp=n=>n==="shadow",V0=x0(()=>{const n=xt("color"),e=xt("font"),o=xt("text"),s=xt("font-weight"),a=xt("tracking"),l=xt("leading"),u=xt("breakpoint"),d=xt("container"),h=xt("spacing"),m=xt("radius"),v=xt("shadow"),y=xt("inset-shadow"),w=xt("text-shadow"),b=xt("drop-shadow"),S=xt("blur"),C=xt("perspective"),k=xt("aspect"),A=xt("ease"),N=xt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...T(),ve,me],R=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],L=()=>[ve,me,h],Z=()=>[Or,"full","auto",...L()],ae=()=>[jn,"none","subgrid",ve,me],be=()=>["auto",{span:["full",jn,ve,me]},jn,ve,me],ue=()=>[jn,"auto",ve,me],ce=()=>["auto","min","max","fr",ve,me],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],xe=()=>["start","end","center","stretch","center-safe","end-safe"],le=()=>["auto",...L()],te=()=>[Or,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],U=()=>[Or,"screen","full","dvw","lvw","svw","min","max","fit",...L()],G=()=>[Or,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],$=()=>[n,ve,me],D=()=>[...T(),Up,Vp,{position:[ve,me]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",j0,O0,{size:[ve,me]}],J=()=>[Bc,qs,So],H=()=>["","none","full",m,ve,me],oe=()=>["",Me,qs,So],de=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Me,Bc,Up,Vp],Ne=()=>["","none",S,ve,me],$e=()=>["none",Me,ve,me],We=()=>["none",Me,ve,me],Ue=()=>[Me,ve,me],ft=()=>[Or,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[or],breakpoint:[or],color:[zp],container:[or],"drop-shadow":[or],ease:["in","out","in-out"],font:[D0],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[or],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[or],shadow:[or],spacing:["px",Me],text:[or],"text-shadow":[or],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Or,me,ve,k]}],container:["container"],"container-type":[{"@container":["","normal","size",ve,me]}],"container-named":[N0],columns:[{columns:[Me,me,ve,d]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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"],sr:["sr-only","not-sr-only"],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:z()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[jn,"auto",ve,me]}],basis:[{basis:[Or,"full","auto",d,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,Or,"auto","initial","none",me]}],grow:[{grow:["",Me,ve,me]}],shrink:[{shrink:["",Me,ve,me]}],order:[{order:[jn,"first","last","none",ve,me]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...xe(),"normal"]}],"justify-self":[{"justify-self":["auto",...xe()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...xe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...xe(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...xe(),"baseline"]}],"place-self":[{"place-self":["auto",...xe()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:le()}],mx:[{mx:le()}],my:[{my:le()}],ms:[{ms:le()}],me:[{me:le()}],mbs:[{mbs:le()}],mbe:[{mbe:le()}],mt:[{mt:le()}],mr:[{mr:le()}],mb:[{mb:le()}],ml:[{ml:le()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...G()]}],"min-block-size":[{"min-block":["auto",...G()]}],"max-block-size":[{"max-block":["none",...G()]}],w:[{w:[d,"screen",...te()]}],"min-w":[{"min-w":[d,"screen","none",...te()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",o,qs,So]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,z0,T0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bc,me]}],"font-family":[{font:[M0,A0,e]}],"font-features":[{"font-features":[me]}],"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-fractions"],tracking:[{tracking:[a,ve,me]}],"line-clamp":[{"line-clamp":[Me,"none",ve,Fp]}],leading:[{leading:[l,...L()]}],"list-image":[{"list-image":["none",ve,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",ve,So]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[Me,"auto",ve,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"tab-size":[{tab:[jn,ve,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jn,ve,me],radial:["",ve,me],conic:[jn,ve,me]},L0,$0]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,ve,me]}],"outline-w":[{outline:["",Me,qs,So]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",v,va,ga]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",y,va,ga]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[Me,So]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",w,va,ga]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[Me,ve,me]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[ve,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,me]}],filter:[{filter:["","none",ve,me]}],blur:[{blur:Ne()}],brightness:[{brightness:[Me,ve,me]}],contrast:[{contrast:[Me,ve,me]}],"drop-shadow":[{"drop-shadow":["","none",b,va,ga]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",Me,ve,me]}],"hue-rotate":[{"hue-rotate":[Me,ve,me]}],invert:[{invert:["",Me,ve,me]}],saturate:[{saturate:[Me,ve,me]}],sepia:[{sepia:["",Me,ve,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,me]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[Me,ve,me]}],"backdrop-contrast":[{"backdrop-contrast":[Me,ve,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,ve,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,ve,me]}],"backdrop-invert":[{"backdrop-invert":["",Me,ve,me]}],"backdrop-opacity":[{"backdrop-opacity":[Me,ve,me]}],"backdrop-saturate":[{"backdrop-saturate":[Me,ve,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,ve,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",ve,me]}],ease:[{ease:["linear","initial",A,ve,me]}],delay:[{delay:[Me,ve,me]}],animate:[{animate:["none",N,ve,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ve,me]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:$e()}],"rotate-x":[{"rotate-x":$e()}],"rotate-y":[{"rotate-y":$e()}],"rotate-z":[{"rotate-z":$e()}],scale:[{scale:We()}],"scale-x":[{"scale-x":We()}],"scale-y":[{"scale-y":We()}],"scale-z":[{"scale-z":We()}],"scale-3d":["scale-3d"],skew:[{skew:Ue()}],"skew-x":[{"skew-x":Ue()}],"skew-y":[{"skew-y":Ue()}],transform:[{transform:[ve,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ft()}],"translate-x":[{"translate-x":ft()}],"translate-y":[{"translate-y":ft()}],"translate-z":[{"translate-z":ft()}],"translate-none":["translate-none"],zoom:[{zoom:[jn,ve,me]}],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ve,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":$()}],"scrollbar-track-color":[{"scrollbar-track":$()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",ve,me]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[Me,qs,So,Fp]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function U0(n={}){const e=n.styleId??"xpert-shadcn-ui-theme-vars";if(typeof document>"u")return;n.density==="compact"?document.documentElement.dataset.xuiDensity="compact":n.density==="default"&&delete document.documentElement.dataset.xuiDensity;let o=document.getElementById(e);o||(o=document.createElement("style"),o.id=e,document.head.appendChild(o)),o.textContent=`
|
|
8
|
+
`+g.stack}return{value:t,source:r,stack:p,digest:null}}function Wf(t,r,a){return{value:t,source:null,stack:a??null,digest:r??null}}function Kf(t,r){try{console.error(r.value)}catch(a){setTimeout(function(){throw a})}}var yD=typeof WeakMap=="function"?WeakMap:Map;function tw(t,r,a){a=Ir(-1,a),a.tag=3,a.payload={element:null};var c=r.value;return a.callback=function(){Sc||(Sc=!0,ap=c),Kf(t,r)},a}function nw(t,r,a){a=Ir(-1,a),a.tag=3;var c=t.type.getDerivedStateFromError;if(typeof c=="function"){var p=r.value;a.payload=function(){return c(p)},a.callback=function(){Kf(t,r)}}var g=t.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){Kf(t,r),typeof c!="function"&&(ho===null?ho=new Set([this]):ho.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})}),a}function rw(t,r,a){var c=t.pingCache;if(c===null){c=t.pingCache=new yD;var p=new Set;c.set(r,p)}else p=c.get(r),p===void 0&&(p=new Set,c.set(r,p));p.has(a)||(p.add(a),t=ND.bind(null,t,r,a),r.then(t,t))}function ow(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function sw(t,r,a,c,p){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(r=Ir(-1,1),r.tag=2,fo(a,r,1))),a.lanes|=1),t):(t.flags|=65536,t.lanes=p,t)}var xD=R.ReactCurrentOwner,Qt=!1;function Bt(t,r,a,c){r.child=t===null?Ex(r,null,a,c):zs(r,t.child,a,c)}function iw(t,r,a,c,p){a=a.render;var g=r.ref;return Us(r,p),c=jf(t,r,a,c,g,p),a=Lf(),t!==null&&!Qt?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Tr(t,r,p)):(at&&a&&wf(r),r.flags|=1,Bt(t,r,c,p),r.child)}function aw(t,r,a,c,p){if(t===null){var g=a.type;return typeof g=="function"&&!hp(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(r.tag=15,r.type=g,lw(t,r,g,c,p)):(t=Rc(a.type,null,c,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,(t.lanes&p)===0){var w=g.memoizedProps;if(a=a.compare,a=a!==null?a:Wi,a(w,c)&&t.ref===r.ref)return Tr(t,r,p)}return r.flags|=1,t=yo(g,c),t.ref=r.ref,t.return=r,r.child=t}function lw(t,r,a,c,p){if(t!==null){var g=t.memoizedProps;if(Wi(g,c)&&t.ref===r.ref)if(Qt=!1,r.pendingProps=c=g,(t.lanes&p)!==0)(t.flags&131072)!==0&&(Qt=!0);else return r.lanes=t.lanes,Tr(t,r,p)}return Gf(t,r,a,c,p)}function cw(t,r,a){var c=r.pendingProps,p=c.children,g=t!==null?t.memoizedState:null;if(c.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},rt(Ks,pn),pn|=a;else{if((a&1073741824)===0)return t=g!==null?g.baseLanes|a:a,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,rt(Ks,pn),pn|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:a,rt(Ks,pn),pn|=c}else g!==null?(c=g.baseLanes|a,r.memoizedState=null):c=a,rt(Ks,pn),pn|=c;return Bt(t,r,p,a),r.child}function uw(t,r){var a=r.ref;(t===null&&a!==null||t!==null&&t.ref!==a)&&(r.flags|=512,r.flags|=2097152)}function Gf(t,r,a,c,p){var g=Yt(a)?Wo:At.current;return g=Ms(r,g),Us(r,p),a=jf(t,r,a,c,g,p),c=Lf(),t!==null&&!Qt?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Tr(t,r,p)):(at&&c&&wf(r),r.flags|=1,Bt(t,r,a,p),r.child)}function dw(t,r,a,c,p){if(Yt(a)){var g=!0;Jl(r)}else g=!1;if(Us(r,p),r.stateNode===null)vc(t,r),Jx(r,a,c),Hf(r,a,c,p),c=!0;else if(t===null){var w=r.stateNode,_=r.memoizedProps;w.props=_;var A=w.context,V=a.contextType;typeof V=="object"&&V!==null?V=xn(V):(V=Yt(a)?Wo:At.current,V=Ms(r,V));var J=a.getDerivedStateFromProps,ee=typeof J=="function"||typeof w.getSnapshotBeforeUpdate=="function";ee||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(_!==c||A!==V)&&ew(r,w,c,V),uo=!1;var X=r.memoizedState;w.state=X,lc(r,c,w,p),A=r.memoizedState,_!==c||X!==A||qt.current||uo?(typeof J=="function"&&(Bf(r,a,J,c),A=r.memoizedState),(_=uo||Xx(r,a,_,c,X,A,V))?(ee||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(r.flags|=4194308)):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=A),w.props=c,w.state=A,w.context=V,c=_):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{w=r.stateNode,Px(t,r),_=r.memoizedProps,V=r.type===r.elementType?_:$n(r.type,_),w.props=V,ee=r.pendingProps,X=w.context,A=a.contextType,typeof A=="object"&&A!==null?A=xn(A):(A=Yt(a)?Wo:At.current,A=Ms(r,A));var he=a.getDerivedStateFromProps;(J=typeof he=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(_!==ee||X!==A)&&ew(r,w,c,A),uo=!1,X=r.memoizedState,w.state=X,lc(r,c,w,p);var we=r.memoizedState;_!==ee||X!==we||qt.current||uo?(typeof he=="function"&&(Bf(r,a,he,c),we=r.memoizedState),(V=uo||Xx(r,a,V,c,X,we,A)||!1)?(J||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(c,we,A),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(c,we,A)),typeof w.componentDidUpdate=="function"&&(r.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof w.componentDidUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=we),w.props=c,w.state=we,w.context=A,c=V):(typeof w.componentDidUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(r.flags|=1024),c=!1)}return Zf(t,r,a,c,g,p)}function Zf(t,r,a,c,p,g){uw(t,r);var w=(r.flags&128)!==0;if(!c&&!w)return p&&gx(r,a,!1),Tr(t,r,g);c=r.stateNode,xD.current=r;var _=w&&typeof a.getDerivedStateFromError!="function"?null:c.render();return r.flags|=1,t!==null&&w?(r.child=zs(r,t.child,null,g),r.child=zs(r,null,_,g)):Bt(t,r,_,g),r.memoizedState=c.state,p&&gx(r,a,!0),r.child}function fw(t){var r=t.stateNode;r.pendingContext?hx(t,r.pendingContext,r.pendingContext!==r.context):r.context&&hx(t,r.context,!1),Df(t,r.containerInfo)}function pw(t,r,a,c,p){return Fs(),kf(p),r.flags|=256,Bt(t,r,a,c),r.child}var qf={dehydrated:null,treeContext:null,retryLane:0};function Yf(t){return{baseLanes:t,cachePool:null,transitions:null}}function hw(t,r,a){var c=r.pendingProps,p=ct.current,g=!1,w=(r.flags&128)!==0,_;if((_=w)||(_=t!==null&&t.memoizedState===null?!1:(p&2)!==0),_?(g=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(p|=1),rt(ct,p&1),t===null)return Cf(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(w=c.children,t=c.fallback,g?(c=r.mode,g=r.child,w={mode:"hidden",children:w},(c&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=w):g=Ic(w,c,0,null),t=ts(t,c,a,null),g.return=r,t.return=r,g.sibling=t,r.child=g,r.child.memoizedState=Yf(a),r.memoizedState=qf,t):Qf(r,w));if(p=t.memoizedState,p!==null&&(_=p.dehydrated,_!==null))return wD(t,r,w,c,_,p,a);if(g){g=c.fallback,w=r.mode,p=t.child,_=p.sibling;var A={mode:"hidden",children:c.children};return(w&1)===0&&r.child!==p?(c=r.child,c.childLanes=0,c.pendingProps=A,r.deletions=null):(c=yo(p,A),c.subtreeFlags=p.subtreeFlags&14680064),_!==null?g=yo(_,g):(g=ts(g,w,a,null),g.flags|=2),g.return=r,c.return=r,c.sibling=g,r.child=c,c=g,g=r.child,w=t.child.memoizedState,w=w===null?Yf(a):{baseLanes:w.baseLanes|a,cachePool:null,transitions:w.transitions},g.memoizedState=w,g.childLanes=t.childLanes&~a,r.memoizedState=qf,c}return g=t.child,t=g.sibling,c=yo(g,{mode:"visible",children:c.children}),(r.mode&1)===0&&(c.lanes=a),c.return=r,c.sibling=null,t!==null&&(a=r.deletions,a===null?(r.deletions=[t],r.flags|=16):a.push(t)),r.child=c,r.memoizedState=null,c}function Qf(t,r){return r=Ic({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function gc(t,r,a,c){return c!==null&&kf(c),zs(r,t.child,null,a),t=Qf(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function wD(t,r,a,c,p,g,w){if(a)return r.flags&256?(r.flags&=-257,c=Wf(Error(o(422))),gc(t,r,w,c)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(g=c.fallback,p=r.mode,c=Ic({mode:"visible",children:c.children},p,0,null),g=ts(g,p,w,null),g.flags|=2,c.return=r,g.return=r,c.sibling=g,r.child=c,(r.mode&1)!==0&&zs(r,t.child,null,w),r.child.memoizedState=Yf(w),r.memoizedState=qf,g);if((r.mode&1)===0)return gc(t,r,w,null);if(p.data==="$!"){if(c=p.nextSibling&&p.nextSibling.dataset,c)var _=c.dgst;return c=_,g=Error(o(419)),c=Wf(g,c,void 0),gc(t,r,w,c)}if(_=(w&t.childLanes)!==0,Qt||_){if(c=Rt,c!==null){switch(w&-w){case 4:p=2;break;case 16:p=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:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(c.suspendedLanes|w))!==0?0:p,p!==0&&p!==g.retryLane&&(g.retryLane=p,Rr(t,p),Ln(c,t,p,-1))}return pp(),c=Wf(Error(o(421))),gc(t,r,w,c)}return p.data==="$?"?(r.flags|=128,r.child=t.child,r=OD.bind(null,t),p._reactRetry=r,null):(t=g.treeContext,fn=io(p.nextSibling),dn=r,at=!0,An=null,t!==null&&(vn[yn++]=_r,vn[yn++]=Pr,vn[yn++]=Ko,_r=t.id,Pr=t.overflow,Ko=r),r=Qf(r,c.children),r.flags|=4096,r)}function mw(t,r,a){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),Rf(t.return,r,a)}function Xf(t,r,a,c,p){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:p}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=p)}function gw(t,r,a){var c=r.pendingProps,p=c.revealOrder,g=c.tail;if(Bt(t,r,c.children,a),c=ct.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&mw(t,a,r);else if(t.tag===19)mw(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}if(rt(ct,c),(r.mode&1)===0)r.memoizedState=null;else switch(p){case"forwards":for(a=r.child,p=null;a!==null;)t=a.alternate,t!==null&&cc(t)===null&&(p=a),a=a.sibling;a=p,a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null),Xf(r,!1,p,a,g);break;case"backwards":for(a=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&cc(t)===null){r.child=p;break}t=p.sibling,p.sibling=a,a=p,p=t}Xf(r,!0,a,null,g);break;case"together":Xf(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function vc(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function Tr(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),Qo|=r.lanes,(a&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,a=yo(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=yo(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function bD(t,r,a){switch(r.tag){case 3:fw(r),Fs();break;case 5:Tx(r);break;case 1:Yt(r.type)&&Jl(r);break;case 4:Df(r,r.stateNode.containerInfo);break;case 10:var c=r.type._context,p=r.memoizedProps.value;rt(sc,c._currentValue),c._currentValue=p;break;case 13:if(c=r.memoizedState,c!==null)return c.dehydrated!==null?(rt(ct,ct.current&1),r.flags|=128,null):(a&r.child.childLanes)!==0?hw(t,r,a):(rt(ct,ct.current&1),t=Tr(t,r,a),t!==null?t.sibling:null);rt(ct,ct.current&1);break;case 19:if(c=(a&r.childLanes)!==0,(t.flags&128)!==0){if(c)return gw(t,r,a);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),rt(ct,ct.current),c)break;return null;case 22:case 23:return r.lanes=0,cw(t,r,a)}return Tr(t,r,a)}var vw,Jf,yw,xw;vw=function(t,r){for(var a=r.child;a!==null;){if(a.tag===5||a.tag===6)t.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Jf=function(){},yw=function(t,r,a,c){var p=t.memoizedProps;if(p!==c){t=r.stateNode,qo(tr.current);var g=null;switch(a){case"input":p=xt(t,p),c=xt(t,c),g=[];break;case"select":p=M({},p,{value:void 0}),c=M({},c,{value:void 0}),g=[];break;case"textarea":p=Fo(t,p),c=Fo(t,c),g=[];break;default:typeof p.onClick!="function"&&typeof c.onClick=="function"&&(t.onclick=Yl)}Xr(a,c);var w;a=null;for(V in p)if(!c.hasOwnProperty(V)&&p.hasOwnProperty(V)&&p[V]!=null)if(V==="style"){var _=p[V];for(w in _)_.hasOwnProperty(w)&&(a||(a={}),a[w]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(i.hasOwnProperty(V)?g||(g=[]):(g=g||[]).push(V,null));for(V in c){var A=c[V];if(_=p?.[V],c.hasOwnProperty(V)&&A!==_&&(A!=null||_!=null))if(V==="style")if(_){for(w in _)!_.hasOwnProperty(w)||A&&A.hasOwnProperty(w)||(a||(a={}),a[w]="");for(w in A)A.hasOwnProperty(w)&&_[w]!==A[w]&&(a||(a={}),a[w]=A[w])}else a||(g||(g=[]),g.push(V,a)),a=A;else V==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,_=_?_.__html:void 0,A!=null&&_!==A&&(g=g||[]).push(V,A)):V==="children"?typeof A!="string"&&typeof A!="number"||(g=g||[]).push(V,""+A):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(i.hasOwnProperty(V)?(A!=null&&V==="onScroll"&&st("scroll",t),g||_===A||(g=[])):(g=g||[]).push(V,A))}a&&(g=g||[]).push("style",a);var V=g;(r.updateQueue=V)&&(r.flags|=4)}},xw=function(t,r,a,c){a!==c&&(r.flags|=4)};function ia(t,r){if(!at)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Mt(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,c=0;if(r)for(var p=t.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags&14680064,c|=p.flags&14680064,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=c,t.childLanes=a,r}function SD(t,r,a){var c=r.pendingProps;switch(bf(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(r),null;case 1:return Yt(r.type)&&Xl(),Mt(r),null;case 3:return c=r.stateNode,Bs(),it(qt),it(At),Af(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(t===null||t.child===null)&&(rc(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,An!==null&&(up(An),An=null))),Jf(t,r),Mt(r),null;case 5:Nf(r);var p=qo(ta.current);if(a=r.type,t!==null&&r.stateNode!=null)yw(t,r,a,c,p),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!c){if(r.stateNode===null)throw Error(o(166));return Mt(r),null}if(t=qo(tr.current),rc(r)){c=r.stateNode,a=r.type;var g=r.memoizedProps;switch(c[er]=r,c[Yi]=g,t=(r.mode&1)!==0,a){case"dialog":st("cancel",c),st("close",c);break;case"iframe":case"object":case"embed":st("load",c);break;case"video":case"audio":for(p=0;p<Gi.length;p++)st(Gi[p],c);break;case"source":st("error",c);break;case"img":case"image":case"link":st("error",c),st("load",c);break;case"details":st("toggle",c);break;case"input":ht(c,g),st("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!g.multiple},st("invalid",c);break;case"textarea":qr(c,g),st("invalid",c)}Xr(a,g),p=null;for(var w in g)if(g.hasOwnProperty(w)){var _=g[w];w==="children"?typeof _=="string"?c.textContent!==_&&(g.suppressHydrationWarning!==!0&&ql(c.textContent,_,t),p=["children",_]):typeof _=="number"&&c.textContent!==""+_&&(g.suppressHydrationWarning!==!0&&ql(c.textContent,_,t),p=["children",""+_]):i.hasOwnProperty(w)&&_!=null&&w==="onScroll"&&st("scroll",c)}switch(a){case"input":Ue(c),Zr(c,g,!0);break;case"textarea":Ue(c),Tn(c);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(c.onclick=Yl)}c=p,r.updateQueue=c,c!==null&&(r.flags|=4)}else{w=p.nodeType===9?p:p.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Ei(a)),t==="http://www.w3.org/1999/xhtml"?a==="script"?(t=w.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof c.is=="string"?t=w.createElement(a,{is:c.is}):(t=w.createElement(a),a==="select"&&(w=t,c.multiple?w.multiple=!0:c.size&&(w.size=c.size))):t=w.createElementNS(t,a),t[er]=r,t[Yi]=c,vw(t,r,!1,!1),r.stateNode=t;e:{switch(w=Vo(a,c),a){case"dialog":st("cancel",t),st("close",t),p=c;break;case"iframe":case"object":case"embed":st("load",t),p=c;break;case"video":case"audio":for(p=0;p<Gi.length;p++)st(Gi[p],t);p=c;break;case"source":st("error",t),p=c;break;case"img":case"image":case"link":st("error",t),st("load",t),p=c;break;case"details":st("toggle",t),p=c;break;case"input":ht(t,c),p=xt(t,c),st("invalid",t);break;case"option":p=c;break;case"select":t._wrapperState={wasMultiple:!!c.multiple},p=M({},c,{value:void 0}),st("invalid",t);break;case"textarea":qr(t,c),p=Fo(t,c),st("invalid",t);break;default:p=c}Xr(a,p),_=p;for(g in _)if(_.hasOwnProperty(g)){var A=_[g];g==="style"?Sr(t,A):g==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,A!=null&&_i(t,A)):g==="children"?typeof A=="string"?(a!=="textarea"||A!=="")&&gn(t,A):typeof A=="number"&&gn(t,""+A):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(i.hasOwnProperty(g)?A!=null&&g==="onScroll"&&st("scroll",t):A!=null&&O(t,g,A,w))}switch(a){case"input":Ue(t),Zr(t,c,!1);break;case"textarea":Ue(t),Tn(t);break;case"option":c.value!=null&&t.setAttribute("value",""+Y(c.value));break;case"select":t.multiple=!!c.multiple,g=c.value,g!=null?In(t,!!c.multiple,g,!1):c.defaultValue!=null&&In(t,!!c.multiple,c.defaultValue,!0);break;default:typeof p.onClick=="function"&&(t.onclick=Yl)}switch(a){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Mt(r),null;case 6:if(t&&r.stateNode!=null)xw(t,r,t.memoizedProps,c);else{if(typeof c!="string"&&r.stateNode===null)throw Error(o(166));if(a=qo(ta.current),qo(tr.current),rc(r)){if(c=r.stateNode,a=r.memoizedProps,c[er]=r,(g=c.nodeValue!==a)&&(t=dn,t!==null))switch(t.tag){case 3:ql(c.nodeValue,a,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ql(c.nodeValue,a,(t.mode&1)!==0)}g&&(r.flags|=4)}else c=(a.nodeType===9?a:a.ownerDocument).createTextNode(c),c[er]=r,r.stateNode=c}return Mt(r),null;case 13:if(it(ct),c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(at&&fn!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Sx(),Fs(),r.flags|=98560,g=!1;else if(g=rc(r),c!==null&&c.dehydrated!==null){if(t===null){if(!g)throw Error(o(318));if(g=r.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(o(317));g[er]=r}else Fs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Mt(r),g=!1}else An!==null&&(up(An),An=null),g=!0;if(!g)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=a,r):(c=c!==null,c!==(t!==null&&t.memoizedState!==null)&&c&&(r.child.flags|=8192,(r.mode&1)!==0&&(t===null||(ct.current&1)!==0?kt===0&&(kt=3):pp())),r.updateQueue!==null&&(r.flags|=4),Mt(r),null);case 4:return Bs(),Jf(t,r),t===null&&Zi(r.stateNode.containerInfo),Mt(r),null;case 10:return Pf(r.type._context),Mt(r),null;case 17:return Yt(r.type)&&Xl(),Mt(r),null;case 19:if(it(ct),g=r.memoizedState,g===null)return Mt(r),null;if(c=(r.flags&128)!==0,w=g.rendering,w===null)if(c)ia(g,!1);else{if(kt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(w=cc(t),w!==null){for(r.flags|=128,ia(g,!1),c=w.updateQueue,c!==null&&(r.updateQueue=c,r.flags|=4),r.subtreeFlags=0,c=a,a=r.child;a!==null;)g=a,t=c,g.flags&=14680066,w=g.alternate,w===null?(g.childLanes=0,g.lanes=t,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=w.childLanes,g.lanes=w.lanes,g.child=w.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=w.memoizedProps,g.memoizedState=w.memoizedState,g.updateQueue=w.updateQueue,g.type=w.type,t=w.dependencies,g.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),a=a.sibling;return rt(ct,ct.current&1|2),r.child}t=t.sibling}g.tail!==null&&mt()>Gs&&(r.flags|=128,c=!0,ia(g,!1),r.lanes=4194304)}else{if(!c)if(t=cc(w),t!==null){if(r.flags|=128,c=!0,a=t.updateQueue,a!==null&&(r.updateQueue=a,r.flags|=4),ia(g,!0),g.tail===null&&g.tailMode==="hidden"&&!w.alternate&&!at)return Mt(r),null}else 2*mt()-g.renderingStartTime>Gs&&a!==1073741824&&(r.flags|=128,c=!0,ia(g,!1),r.lanes=4194304);g.isBackwards?(w.sibling=r.child,r.child=w):(a=g.last,a!==null?a.sibling=w:r.child=w,g.last=w)}return g.tail!==null?(r=g.tail,g.rendering=r,g.tail=r.sibling,g.renderingStartTime=mt(),r.sibling=null,a=ct.current,rt(ct,c?a&1|2:a&1),r):(Mt(r),null);case 22:case 23:return fp(),c=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==c&&(r.flags|=8192),c&&(r.mode&1)!==0?(pn&1073741824)!==0&&(Mt(r),r.subtreeFlags&6&&(r.flags|=8192)):Mt(r),null;case 24:return null;case 25:return null}throw Error(o(156,r.tag))}function CD(t,r){switch(bf(r),r.tag){case 1:return Yt(r.type)&&Xl(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Bs(),it(qt),it(At),Af(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return Nf(r),null;case 13:if(it(ct),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Fs()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return it(ct),null;case 4:return Bs(),null;case 10:return Pf(r.type._context),null;case 22:case 23:return fp(),null;case 24:return null;default:return null}}var yc=!1,jt=!1,kD=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ws(t,r){var a=t.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){pt(t,r,c)}else a.current=null}function ep(t,r,a){try{a()}catch(c){pt(t,r,c)}}var ww=!1;function ED(t,r){if(ff=Ll,t=Xy(),rf(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var w=0,_=-1,A=-1,V=0,J=0,ee=t,X=null;t:for(;;){for(var he;ee!==a||p!==0&&ee.nodeType!==3||(_=w+p),ee!==g||c!==0&&ee.nodeType!==3||(A=w+c),ee.nodeType===3&&(w+=ee.nodeValue.length),(he=ee.firstChild)!==null;)X=ee,ee=he;for(;;){if(ee===t)break t;if(X===a&&++V===p&&(_=w),X===g&&++J===c&&(A=w),(he=ee.nextSibling)!==null)break;ee=X,X=ee.parentNode}ee=he}a=_===-1||A===-1?null:{start:_,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(pf={focusedElem:t,selectionRange:a},Ll=!1,xe=r;xe!==null;)if(r=xe,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,xe=t;else for(;xe!==null;){r=xe;try{var we=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Ce=we.memoizedProps,gt=we.memoizedState,F=r.stateNode,$=F.getSnapshotBeforeUpdate(r.elementType===r.type?Ce:$n(r.type,Ce),gt);F.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var z=r.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ie){pt(r,r.return,ie)}if(t=r.sibling,t!==null){t.return=r.return,xe=t;break}xe=r.return}return we=ww,ww=!1,we}function aa(t,r,a){var c=r.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var p=c=c.next;do{if((p.tag&t)===t){var g=p.destroy;p.destroy=void 0,g!==void 0&&ep(r,a,g)}p=p.next}while(p!==c)}}function xc(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&t)===t){var c=a.create;a.destroy=c()}a=a.next}while(a!==r)}}function tp(t){var r=t.ref;if(r!==null){var a=t.stateNode;t.tag,t=a,typeof r=="function"?r(t):r.current=t}}function bw(t){var r=t.alternate;r!==null&&(t.alternate=null,bw(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[er],delete r[Yi],delete r[vf],delete r[aD],delete r[lD])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Sw(t){return t.tag===5||t.tag===3||t.tag===4}function Cw(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Sw(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function np(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?a.nodeType===8?a.parentNode.insertBefore(t,r):a.insertBefore(t,r):(a.nodeType===8?(r=a.parentNode,r.insertBefore(t,a)):(r=a,r.appendChild(t)),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Yl));else if(c!==4&&(t=t.child,t!==null))for(np(t,r,a),t=t.sibling;t!==null;)np(t,r,a),t=t.sibling}function rp(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(c!==4&&(t=t.child,t!==null))for(rp(t,r,a),t=t.sibling;t!==null;)rp(t,r,a),t=t.sibling}var Tt=null,Mn=!1;function po(t,r,a){for(a=a.child;a!==null;)kw(t,r,a),a=a.sibling}function kw(t,r,a){if(Jn&&typeof Jn.onCommitFiberUnmount=="function")try{Jn.onCommitFiberUnmount(Nl,a)}catch{}switch(a.tag){case 5:jt||Ws(a,r);case 6:var c=Tt,p=Mn;Tt=null,po(t,r,a),Tt=c,Mn=p,Tt!==null&&(Mn?(t=Tt,a=a.stateNode,t.nodeType===8?t.parentNode.removeChild(a):t.removeChild(a)):Tt.removeChild(a.stateNode));break;case 18:Tt!==null&&(Mn?(t=Tt,a=a.stateNode,t.nodeType===8?gf(t.parentNode,a):t.nodeType===1&&gf(t,a),Fi(t)):gf(Tt,a.stateNode));break;case 4:c=Tt,p=Mn,Tt=a.stateNode.containerInfo,Mn=!0,po(t,r,a),Tt=c,Mn=p;break;case 0:case 11:case 14:case 15:if(!jt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){p=c=c.next;do{var g=p,w=g.destroy;g=g.tag,w!==void 0&&((g&2)!==0||(g&4)!==0)&&ep(a,r,w),p=p.next}while(p!==c)}po(t,r,a);break;case 1:if(!jt&&(Ws(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(_){pt(a,r,_)}po(t,r,a);break;case 21:po(t,r,a);break;case 22:a.mode&1?(jt=(c=jt)||a.memoizedState!==null,po(t,r,a),jt=c):po(t,r,a);break;default:po(t,r,a)}}function Ew(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var a=t.stateNode;a===null&&(a=t.stateNode=new kD),r.forEach(function(c){var p=AD.bind(null,t,c);a.has(c)||(a.add(c),c.then(p,p))})}}function jn(t,r){var a=r.deletions;if(a!==null)for(var c=0;c<a.length;c++){var p=a[c];try{var g=t,w=r,_=w;e:for(;_!==null;){switch(_.tag){case 5:Tt=_.stateNode,Mn=!1;break e;case 3:Tt=_.stateNode.containerInfo,Mn=!0;break e;case 4:Tt=_.stateNode.containerInfo,Mn=!0;break e}_=_.return}if(Tt===null)throw Error(o(160));kw(g,w,p),Tt=null,Mn=!1;var A=p.alternate;A!==null&&(A.return=null),p.return=null}catch(V){pt(p,r,V)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)_w(r,t),r=r.sibling}function _w(t,r){var a=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(jn(r,t),rr(t),c&4){try{aa(3,t,t.return),xc(3,t)}catch(Ce){pt(t,t.return,Ce)}try{aa(5,t,t.return)}catch(Ce){pt(t,t.return,Ce)}}break;case 1:jn(r,t),rr(t),c&512&&a!==null&&Ws(a,a.return);break;case 5:if(jn(r,t),rr(t),c&512&&a!==null&&Ws(a,a.return),t.flags&32){var p=t.stateNode;try{gn(p,"")}catch(Ce){pt(t,t.return,Ce)}}if(c&4&&(p=t.stateNode,p!=null)){var g=t.memoizedProps,w=a!==null?a.memoizedProps:g,_=t.type,A=t.updateQueue;if(t.updateQueue=null,A!==null)try{_==="input"&&g.type==="radio"&&g.name!=null&&Qn(p,g),Vo(_,w);var V=Vo(_,g);for(w=0;w<A.length;w+=2){var J=A[w],ee=A[w+1];J==="style"?Sr(p,ee):J==="dangerouslySetInnerHTML"?_i(p,ee):J==="children"?gn(p,ee):O(p,J,ee,V)}switch(_){case"input":Rn(p,g);break;case"textarea":zo(p,g);break;case"select":var X=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!g.multiple;var he=g.value;he!=null?In(p,!!g.multiple,he,!1):X!==!!g.multiple&&(g.defaultValue!=null?In(p,!!g.multiple,g.defaultValue,!0):In(p,!!g.multiple,g.multiple?[]:"",!1))}p[Yi]=g}catch(Ce){pt(t,t.return,Ce)}}break;case 6:if(jn(r,t),rr(t),c&4){if(t.stateNode===null)throw Error(o(162));p=t.stateNode,g=t.memoizedProps;try{p.nodeValue=g}catch(Ce){pt(t,t.return,Ce)}}break;case 3:if(jn(r,t),rr(t),c&4&&a!==null&&a.memoizedState.isDehydrated)try{Fi(r.containerInfo)}catch(Ce){pt(t,t.return,Ce)}break;case 4:jn(r,t),rr(t);break;case 13:jn(r,t),rr(t),p=t.child,p.flags&8192&&(g=p.memoizedState!==null,p.stateNode.isHidden=g,!g||p.alternate!==null&&p.alternate.memoizedState!==null||(ip=mt())),c&4&&Ew(t);break;case 22:if(J=a!==null&&a.memoizedState!==null,t.mode&1?(jt=(V=jt)||J,jn(r,t),jt=V):jn(r,t),rr(t),c&8192){if(V=t.memoizedState!==null,(t.stateNode.isHidden=V)&&!J&&(t.mode&1)!==0)for(xe=t,J=t.child;J!==null;){for(ee=xe=J;xe!==null;){switch(X=xe,he=X.child,X.tag){case 0:case 11:case 14:case 15:aa(4,X,X.return);break;case 1:Ws(X,X.return);var we=X.stateNode;if(typeof we.componentWillUnmount=="function"){c=X,a=X.return;try{r=c,we.props=r.memoizedProps,we.state=r.memoizedState,we.componentWillUnmount()}catch(Ce){pt(c,a,Ce)}}break;case 5:Ws(X,X.return);break;case 22:if(X.memoizedState!==null){Iw(ee);continue}}he!==null?(he.return=X,xe=he):Iw(ee)}J=J.sibling}e:for(J=null,ee=t;;){if(ee.tag===5){if(J===null){J=ee;try{p=ee.stateNode,V?(g=p.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(_=ee.stateNode,A=ee.memoizedProps.style,w=A!=null&&A.hasOwnProperty("display")?A.display:null,_.style.display=_s("display",w))}catch(Ce){pt(t,t.return,Ce)}}}else if(ee.tag===6){if(J===null)try{ee.stateNode.nodeValue=V?"":ee.memoizedProps}catch(Ce){pt(t,t.return,Ce)}}else if((ee.tag!==22&&ee.tag!==23||ee.memoizedState===null||ee===t)&&ee.child!==null){ee.child.return=ee,ee=ee.child;continue}if(ee===t)break e;for(;ee.sibling===null;){if(ee.return===null||ee.return===t)break e;J===ee&&(J=null),ee=ee.return}J===ee&&(J=null),ee.sibling.return=ee.return,ee=ee.sibling}}break;case 19:jn(r,t),rr(t),c&4&&Ew(t);break;case 21:break;default:jn(r,t),rr(t)}}function rr(t){var r=t.flags;if(r&2){try{e:{for(var a=t.return;a!==null;){if(Sw(a)){var c=a;break e}a=a.return}throw Error(o(160))}switch(c.tag){case 5:var p=c.stateNode;c.flags&32&&(gn(p,""),c.flags&=-33);var g=Cw(t);rp(t,g,p);break;case 3:case 4:var w=c.stateNode.containerInfo,_=Cw(t);np(t,_,w);break;default:throw Error(o(161))}}catch(A){pt(t,t.return,A)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function _D(t,r,a){xe=t,Pw(t)}function Pw(t,r,a){for(var c=(t.mode&1)!==0;xe!==null;){var p=xe,g=p.child;if(p.tag===22&&c){var w=p.memoizedState!==null||yc;if(!w){var _=p.alternate,A=_!==null&&_.memoizedState!==null||jt;_=yc;var V=jt;if(yc=w,(jt=A)&&!V)for(xe=p;xe!==null;)w=xe,A=w.child,w.tag===22&&w.memoizedState!==null?Tw(p):A!==null?(A.return=w,xe=A):Tw(p);for(;g!==null;)xe=g,Pw(g),g=g.sibling;xe=p,yc=_,jt=V}Rw(t)}else(p.subtreeFlags&8772)!==0&&g!==null?(g.return=p,xe=g):Rw(t)}}function Rw(t){for(;xe!==null;){var r=xe;if((r.flags&8772)!==0){var a=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:jt||xc(5,r);break;case 1:var c=r.stateNode;if(r.flags&4&&!jt)if(a===null)c.componentDidMount();else{var p=r.elementType===r.type?a.memoizedProps:$n(r.type,a.memoizedProps);c.componentDidUpdate(p,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var g=r.updateQueue;g!==null&&Ix(r,g,c);break;case 3:var w=r.updateQueue;if(w!==null){if(a=null,r.child!==null)switch(r.child.tag){case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}Ix(r,w,a)}break;case 5:var _=r.stateNode;if(a===null&&r.flags&4){a=_;var A=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":A.autoFocus&&a.focus();break;case"img":A.src&&(a.src=A.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var V=r.alternate;if(V!==null){var J=V.memoizedState;if(J!==null){var ee=J.dehydrated;ee!==null&&Fi(ee)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}jt||r.flags&512&&tp(r)}catch(X){pt(r,r.return,X)}}if(r===t){xe=null;break}if(a=r.sibling,a!==null){a.return=r.return,xe=a;break}xe=r.return}}function Iw(t){for(;xe!==null;){var r=xe;if(r===t){xe=null;break}var a=r.sibling;if(a!==null){a.return=r.return,xe=a;break}xe=r.return}}function Tw(t){for(;xe!==null;){var r=xe;try{switch(r.tag){case 0:case 11:case 15:var a=r.return;try{xc(4,r)}catch(A){pt(r,a,A)}break;case 1:var c=r.stateNode;if(typeof c.componentDidMount=="function"){var p=r.return;try{c.componentDidMount()}catch(A){pt(r,p,A)}}var g=r.return;try{tp(r)}catch(A){pt(r,g,A)}break;case 5:var w=r.return;try{tp(r)}catch(A){pt(r,w,A)}}}catch(A){pt(r,r.return,A)}if(r===t){xe=null;break}var _=r.sibling;if(_!==null){_.return=r.return,xe=_;break}xe=r.return}}var PD=Math.ceil,wc=R.ReactCurrentDispatcher,op=R.ReactCurrentOwner,bn=R.ReactCurrentBatchConfig,Ye=0,Rt=null,wt=null,Dt=0,pn=0,Ks=ao(0),kt=0,la=null,Qo=0,bc=0,sp=0,ca=null,Xt=null,ip=0,Gs=1/0,Dr=null,Sc=!1,ap=null,ho=null,Cc=!1,mo=null,kc=0,ua=0,lp=null,Ec=-1,_c=0;function Ht(){return(Ye&6)!==0?mt():Ec!==-1?Ec:Ec=mt()}function go(t){return(t.mode&1)===0?1:(Ye&2)!==0&&Dt!==0?Dt&-Dt:uD.transition!==null?(_c===0&&(_c=Cy()),_c):(t=et,t!==0||(t=window.event,t=t===void 0?16:Ny(t.type)),t)}function Ln(t,r,a,c){if(50<ua)throw ua=0,lp=null,Error(o(185));Ai(t,a,c),((Ye&2)===0||t!==Rt)&&(t===Rt&&((Ye&2)===0&&(bc|=a),kt===4&&vo(t,Dt)),Jt(t,c),a===1&&Ye===0&&(r.mode&1)===0&&(Gs=mt()+500,ec&&co()))}function Jt(t,r){var a=t.callbackNode;uT(t,r);var c=$l(t,t===Rt?Dt:0);if(c===0)a!==null&&wy(a),t.callbackNode=null,t.callbackPriority=0;else if(r=c&-c,t.callbackPriority!==r){if(a!=null&&wy(a),r===1)t.tag===0?cD(Nw.bind(null,t)):vx(Nw.bind(null,t)),sD(function(){(Ye&6)===0&&co()}),a=null;else{switch(ky(c)){case 1:a=zd;break;case 4:a=by;break;case 16:a=Dl;break;case 536870912:a=Sy;break;default:a=Dl}a=zw(a,Dw.bind(null,t))}t.callbackPriority=r,t.callbackNode=a}}function Dw(t,r){if(Ec=-1,_c=0,(Ye&6)!==0)throw Error(o(327));var a=t.callbackNode;if(Zs()&&t.callbackNode!==a)return null;var c=$l(t,t===Rt?Dt:0);if(c===0)return null;if((c&30)!==0||(c&t.expiredLanes)!==0||r)r=Pc(t,c);else{r=c;var p=Ye;Ye|=2;var g=Aw();(Rt!==t||Dt!==r)&&(Dr=null,Gs=mt()+500,Jo(t,r));do try{TD();break}catch(_){Ow(t,_)}while(!0);_f(),wc.current=g,Ye=p,wt!==null?r=0:(Rt=null,Dt=0,r=kt)}if(r!==0){if(r===2&&(p=Vd(t),p!==0&&(c=p,r=cp(t,p))),r===1)throw a=la,Jo(t,0),vo(t,c),Jt(t,mt()),a;if(r===6)vo(t,c);else{if(p=t.current.alternate,(c&30)===0&&!RD(p)&&(r=Pc(t,c),r===2&&(g=Vd(t),g!==0&&(c=g,r=cp(t,g))),r===1))throw a=la,Jo(t,0),vo(t,c),Jt(t,mt()),a;switch(t.finishedWork=p,t.finishedLanes=c,r){case 0:case 1:throw Error(o(345));case 2:es(t,Xt,Dr);break;case 3:if(vo(t,c),(c&130023424)===c&&(r=ip+500-mt(),10<r)){if($l(t,0)!==0)break;if(p=t.suspendedLanes,(p&c)!==c){Ht(),t.pingedLanes|=t.suspendedLanes&p;break}t.timeoutHandle=mf(es.bind(null,t,Xt,Dr),r);break}es(t,Xt,Dr);break;case 4:if(vo(t,c),(c&4194240)===c)break;for(r=t.eventTimes,p=-1;0<c;){var w=31-Nn(c);g=1<<w,w=r[w],w>p&&(p=w),c&=~g}if(c=p,c=mt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*PD(c/1960))-c,10<c){t.timeoutHandle=mf(es.bind(null,t,Xt,Dr),c);break}es(t,Xt,Dr);break;case 5:es(t,Xt,Dr);break;default:throw Error(o(329))}}}return Jt(t,mt()),t.callbackNode===a?Dw.bind(null,t):null}function cp(t,r){var a=ca;return t.current.memoizedState.isDehydrated&&(Jo(t,r).flags|=256),t=Pc(t,r),t!==2&&(r=Xt,Xt=a,r!==null&&up(r)),t}function up(t){Xt===null?Xt=t:Xt.push.apply(Xt,t)}function RD(t){for(var r=t;;){if(r.flags&16384){var a=r.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var p=a[c],g=p.getSnapshot;p=p.value;try{if(!On(g(),p))return!1}catch{return!1}}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function vo(t,r){for(r&=~sp,r&=~bc,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var a=31-Nn(r),c=1<<a;t[a]=-1,r&=~c}}function Nw(t){if((Ye&6)!==0)throw Error(o(327));Zs();var r=$l(t,0);if((r&1)===0)return Jt(t,mt()),null;var a=Pc(t,r);if(t.tag!==0&&a===2){var c=Vd(t);c!==0&&(r=c,a=cp(t,c))}if(a===1)throw a=la,Jo(t,0),vo(t,r),Jt(t,mt()),a;if(a===6)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,es(t,Xt,Dr),Jt(t,mt()),null}function dp(t,r){var a=Ye;Ye|=1;try{return t(r)}finally{Ye=a,Ye===0&&(Gs=mt()+500,ec&&co())}}function Xo(t){mo!==null&&mo.tag===0&&(Ye&6)===0&&Zs();var r=Ye;Ye|=1;var a=bn.transition,c=et;try{if(bn.transition=null,et=1,t)return t()}finally{et=c,bn.transition=a,Ye=r,(Ye&6)===0&&co()}}function fp(){pn=Ks.current,it(Ks)}function Jo(t,r){t.finishedWork=null,t.finishedLanes=0;var a=t.timeoutHandle;if(a!==-1&&(t.timeoutHandle=-1,oD(a)),wt!==null)for(a=wt.return;a!==null;){var c=a;switch(bf(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Xl();break;case 3:Bs(),it(qt),it(At),Af();break;case 5:Nf(c);break;case 4:Bs();break;case 13:it(ct);break;case 19:it(ct);break;case 10:Pf(c.type._context);break;case 22:case 23:fp()}a=a.return}if(Rt=t,wt=t=yo(t.current,null),Dt=pn=r,kt=0,la=null,sp=bc=Qo=0,Xt=ca=null,Zo!==null){for(r=0;r<Zo.length;r++)if(a=Zo[r],c=a.interleaved,c!==null){a.interleaved=null;var p=c.next,g=a.pending;if(g!==null){var w=g.next;g.next=p,c.next=w}a.pending=c}Zo=null}return t}function Ow(t,r){do{var a=wt;try{if(_f(),uc.current=hc,dc){for(var c=ut.memoizedState;c!==null;){var p=c.queue;p!==null&&(p.pending=null),c=c.next}dc=!1}if(Yo=0,Pt=Ct=ut=null,na=!1,ra=0,op.current=null,a===null||a.return===null){kt=1,la=r,wt=null;break}e:{var g=t,w=a.return,_=a,A=r;if(r=Dt,_.flags|=32768,A!==null&&typeof A=="object"&&typeof A.then=="function"){var V=A,J=_,ee=J.tag;if((J.mode&1)===0&&(ee===0||ee===11||ee===15)){var X=J.alternate;X?(J.updateQueue=X.updateQueue,J.memoizedState=X.memoizedState,J.lanes=X.lanes):(J.updateQueue=null,J.memoizedState=null)}var he=ow(w);if(he!==null){he.flags&=-257,sw(he,w,_,g,r),he.mode&1&&rw(g,V,r),r=he,A=V;var we=r.updateQueue;if(we===null){var Ce=new Set;Ce.add(A),r.updateQueue=Ce}else we.add(A);break e}else{if((r&1)===0){rw(g,V,r),pp();break e}A=Error(o(426))}}else if(at&&_.mode&1){var gt=ow(w);if(gt!==null){(gt.flags&65536)===0&&(gt.flags|=256),sw(gt,w,_,g,r),kf(Hs(A,_));break e}}g=A=Hs(A,_),kt!==4&&(kt=2),ca===null?ca=[g]:ca.push(g),g=w;do{switch(g.tag){case 3:g.flags|=65536,r&=-r,g.lanes|=r;var F=tw(g,A,r);Rx(g,F);break e;case 1:_=A;var $=g.type,z=g.stateNode;if((g.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(ho===null||!ho.has(z)))){g.flags|=65536,r&=-r,g.lanes|=r;var ie=nw(g,_,r);Rx(g,ie);break e}}g=g.return}while(g!==null)}Mw(a)}catch(_e){r=_e,wt===a&&a!==null&&(wt=a=a.return);continue}break}while(!0)}function Aw(){var t=wc.current;return wc.current=hc,t===null?hc:t}function pp(){(kt===0||kt===3||kt===2)&&(kt=4),Rt===null||(Qo&268435455)===0&&(bc&268435455)===0||vo(Rt,Dt)}function Pc(t,r){var a=Ye;Ye|=2;var c=Aw();(Rt!==t||Dt!==r)&&(Dr=null,Jo(t,r));do try{ID();break}catch(p){Ow(t,p)}while(!0);if(_f(),Ye=a,wc.current=c,wt!==null)throw Error(o(261));return Rt=null,Dt=0,kt}function ID(){for(;wt!==null;)$w(wt)}function TD(){for(;wt!==null&&!tT();)$w(wt)}function $w(t){var r=Fw(t.alternate,t,pn);t.memoizedProps=t.pendingProps,r===null?Mw(t):wt=r,op.current=null}function Mw(t){var r=t;do{var a=r.alternate;if(t=r.return,(r.flags&32768)===0){if(a=SD(a,r,pn),a!==null){wt=a;return}}else{if(a=CD(a,r),a!==null){a.flags&=32767,wt=a;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{kt=6,wt=null;return}}if(r=r.sibling,r!==null){wt=r;return}wt=r=t}while(r!==null);kt===0&&(kt=5)}function es(t,r,a){var c=et,p=bn.transition;try{bn.transition=null,et=1,DD(t,r,a,c)}finally{bn.transition=p,et=c}return null}function DD(t,r,a,c){do Zs();while(mo!==null);if((Ye&6)!==0)throw Error(o(327));a=t.finishedWork;var p=t.finishedLanes;if(a===null)return null;if(t.finishedWork=null,t.finishedLanes=0,a===t.current)throw Error(o(177));t.callbackNode=null,t.callbackPriority=0;var g=a.lanes|a.childLanes;if(dT(t,g),t===Rt&&(wt=Rt=null,Dt=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Cc||(Cc=!0,zw(Dl,function(){return Zs(),null})),g=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||g){g=bn.transition,bn.transition=null;var w=et;et=1;var _=Ye;Ye|=4,op.current=null,ED(t,a),_w(a,t),QT(pf),Ll=!!ff,pf=ff=null,t.current=a,_D(a),nT(),Ye=_,et=w,bn.transition=g}else t.current=a;if(Cc&&(Cc=!1,mo=t,kc=p),g=t.pendingLanes,g===0&&(ho=null),sT(a.stateNode),Jt(t,mt()),r!==null)for(c=t.onRecoverableError,a=0;a<r.length;a++)p=r[a],c(p.value,{componentStack:p.stack,digest:p.digest});if(Sc)throw Sc=!1,t=ap,ap=null,t;return(kc&1)!==0&&t.tag!==0&&Zs(),g=t.pendingLanes,(g&1)!==0?t===lp?ua++:(ua=0,lp=t):ua=0,co(),null}function Zs(){if(mo!==null){var t=ky(kc),r=bn.transition,a=et;try{if(bn.transition=null,et=16>t?16:t,mo===null)var c=!1;else{if(t=mo,mo=null,kc=0,(Ye&6)!==0)throw Error(o(331));var p=Ye;for(Ye|=4,xe=t.current;xe!==null;){var g=xe,w=g.child;if((xe.flags&16)!==0){var _=g.deletions;if(_!==null){for(var A=0;A<_.length;A++){var V=_[A];for(xe=V;xe!==null;){var J=xe;switch(J.tag){case 0:case 11:case 15:aa(8,J,g)}var ee=J.child;if(ee!==null)ee.return=J,xe=ee;else for(;xe!==null;){J=xe;var X=J.sibling,he=J.return;if(bw(J),J===V){xe=null;break}if(X!==null){X.return=he,xe=X;break}xe=he}}}var we=g.alternate;if(we!==null){var Ce=we.child;if(Ce!==null){we.child=null;do{var gt=Ce.sibling;Ce.sibling=null,Ce=gt}while(Ce!==null)}}xe=g}}if((g.subtreeFlags&2064)!==0&&w!==null)w.return=g,xe=w;else e:for(;xe!==null;){if(g=xe,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:aa(9,g,g.return)}var F=g.sibling;if(F!==null){F.return=g.return,xe=F;break e}xe=g.return}}var $=t.current;for(xe=$;xe!==null;){w=xe;var z=w.child;if((w.subtreeFlags&2064)!==0&&z!==null)z.return=w,xe=z;else e:for(w=$;xe!==null;){if(_=xe,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:xc(9,_)}}catch(_e){pt(_,_.return,_e)}if(_===w){xe=null;break e}var ie=_.sibling;if(ie!==null){ie.return=_.return,xe=ie;break e}xe=_.return}}if(Ye=p,co(),Jn&&typeof Jn.onPostCommitFiberRoot=="function")try{Jn.onPostCommitFiberRoot(Nl,t)}catch{}c=!0}return c}finally{et=a,bn.transition=r}}return!1}function jw(t,r,a){r=Hs(a,r),r=tw(t,r,1),t=fo(t,r,1),r=Ht(),t!==null&&(Ai(t,1,r),Jt(t,r))}function pt(t,r,a){if(t.tag===3)jw(t,t,a);else for(;r!==null;){if(r.tag===3){jw(r,t,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ho===null||!ho.has(c))){t=Hs(a,t),t=nw(r,t,1),r=fo(r,t,1),t=Ht(),r!==null&&(Ai(r,1,t),Jt(r,t));break}}r=r.return}}function ND(t,r,a){var c=t.pingCache;c!==null&&c.delete(r),r=Ht(),t.pingedLanes|=t.suspendedLanes&a,Rt===t&&(Dt&a)===a&&(kt===4||kt===3&&(Dt&130023424)===Dt&&500>mt()-ip?Jo(t,0):sp|=a),Jt(t,r)}function Lw(t,r){r===0&&((t.mode&1)===0?r=1:(r=Al,Al<<=1,(Al&130023424)===0&&(Al=4194304)));var a=Ht();t=Rr(t,r),t!==null&&(Ai(t,r,a),Jt(t,a))}function OD(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),Lw(t,a)}function AD(t,r){var a=0;switch(t.tag){case 13:var c=t.stateNode,p=t.memoizedState;p!==null&&(a=p.retryLane);break;case 19:c=t.stateNode;break;default:throw Error(o(314))}c!==null&&c.delete(r),Lw(t,a)}var Fw;Fw=function(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps||qt.current)Qt=!0;else{if((t.lanes&a)===0&&(r.flags&128)===0)return Qt=!1,bD(t,r,a);Qt=(t.flags&131072)!==0}else Qt=!1,at&&(r.flags&1048576)!==0&&yx(r,nc,r.index);switch(r.lanes=0,r.tag){case 2:var c=r.type;vc(t,r),t=r.pendingProps;var p=Ms(r,At.current);Us(r,a),p=jf(null,r,c,t,p,a);var g=Lf();return r.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Yt(c)?(g=!0,Jl(r)):g=!1,r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,Tf(r),p.updater=mc,r.stateNode=p,p._reactInternals=r,Hf(r,c,t,a),r=Zf(null,r,c,!0,g,a)):(r.tag=0,at&&g&&wf(r),Bt(null,r,p,a),r=r.child),r;case 16:c=r.elementType;e:{switch(vc(t,r),t=r.pendingProps,p=c._init,c=p(c._payload),r.type=c,p=r.tag=MD(c),t=$n(c,t),p){case 0:r=Gf(null,r,c,t,a);break e;case 1:r=dw(null,r,c,t,a);break e;case 11:r=iw(null,r,c,t,a);break e;case 14:r=aw(null,r,c,$n(c.type,t),a);break e}throw Error(o(306,c,""))}return r;case 0:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:$n(c,p),Gf(t,r,c,p,a);case 1:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:$n(c,p),dw(t,r,c,p,a);case 3:e:{if(fw(r),t===null)throw Error(o(387));c=r.pendingProps,g=r.memoizedState,p=g.element,Px(t,r),lc(r,c,null,a);var w=r.memoizedState;if(c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){p=Hs(Error(o(423)),r),r=pw(t,r,c,a,p);break e}else if(c!==p){p=Hs(Error(o(424)),r),r=pw(t,r,c,a,p);break e}else for(fn=io(r.stateNode.containerInfo.firstChild),dn=r,at=!0,An=null,a=Ex(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Fs(),c===p){r=Tr(t,r,a);break e}Bt(t,r,c,a)}r=r.child}return r;case 5:return Tx(r),t===null&&Cf(r),c=r.type,p=r.pendingProps,g=t!==null?t.memoizedProps:null,w=p.children,hf(c,p)?w=null:g!==null&&hf(c,g)&&(r.flags|=32),uw(t,r),Bt(t,r,w,a),r.child;case 6:return t===null&&Cf(r),null;case 13:return hw(t,r,a);case 4:return Df(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=zs(r,null,c,a):Bt(t,r,c,a),r.child;case 11:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:$n(c,p),iw(t,r,c,p,a);case 7:return Bt(t,r,r.pendingProps,a),r.child;case 8:return Bt(t,r,r.pendingProps.children,a),r.child;case 12:return Bt(t,r,r.pendingProps.children,a),r.child;case 10:e:{if(c=r.type._context,p=r.pendingProps,g=r.memoizedProps,w=p.value,rt(sc,c._currentValue),c._currentValue=w,g!==null)if(On(g.value,w)){if(g.children===p.children&&!qt.current){r=Tr(t,r,a);break e}}else for(g=r.child,g!==null&&(g.return=r);g!==null;){var _=g.dependencies;if(_!==null){w=g.child;for(var A=_.firstContext;A!==null;){if(A.context===c){if(g.tag===1){A=Ir(-1,a&-a),A.tag=2;var V=g.updateQueue;if(V!==null){V=V.shared;var J=V.pending;J===null?A.next=A:(A.next=J.next,J.next=A),V.pending=A}}g.lanes|=a,A=g.alternate,A!==null&&(A.lanes|=a),Rf(g.return,a,r),_.lanes|=a;break}A=A.next}}else if(g.tag===10)w=g.type===r.type?null:g.child;else if(g.tag===18){if(w=g.return,w===null)throw Error(o(341));w.lanes|=a,_=w.alternate,_!==null&&(_.lanes|=a),Rf(w,a,r),w=g.sibling}else w=g.child;if(w!==null)w.return=g;else for(w=g;w!==null;){if(w===r){w=null;break}if(g=w.sibling,g!==null){g.return=w.return,w=g;break}w=w.return}g=w}Bt(t,r,p.children,a),r=r.child}return r;case 9:return p=r.type,c=r.pendingProps.children,Us(r,a),p=xn(p),c=c(p),r.flags|=1,Bt(t,r,c,a),r.child;case 14:return c=r.type,p=$n(c,r.pendingProps),p=$n(c.type,p),aw(t,r,c,p,a);case 15:return lw(t,r,r.type,r.pendingProps,a);case 17:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:$n(c,p),vc(t,r),r.tag=1,Yt(c)?(t=!0,Jl(r)):t=!1,Us(r,a),Jx(r,c,p),Hf(r,c,p,a),Zf(null,r,c,!0,t,a);case 19:return gw(t,r,a);case 22:return cw(t,r,a)}throw Error(o(156,r.tag))};function zw(t,r){return xy(t,r)}function $D(t,r,a,c){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(t,r,a,c){return new $D(t,r,a,c)}function hp(t){return t=t.prototype,!(!t||!t.isReactComponent)}function MD(t){if(typeof t=="function")return hp(t)?1:0;if(t!=null){if(t=t.$$typeof,t===le)return 11;if(t===Se)return 14}return 2}function yo(t,r){var a=t.alternate;return a===null?(a=Sn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&14680064,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a}function Rc(t,r,a,c,p,g){var w=2;if(c=t,typeof t=="function")hp(t)&&(w=1);else if(typeof t=="string")w=5;else e:switch(t){case B:return ts(a.children,p,g,r);case I:w=8,p|=8;break;case K:return t=Sn(12,a,r,p|2),t.elementType=K,t.lanes=g,t;case ce:return t=Sn(13,a,r,p),t.elementType=ce,t.lanes=g,t;case ue:return t=Sn(19,a,r,p),t.elementType=ue,t.lanes=g,t;case ne:return Ic(a,p,g,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ae:w=10;break e;case be:w=9;break e;case le:w=11;break e;case Se:w=14;break e;case q:w=16,c=null;break e}throw Error(o(130,t==null?t:typeof t,""))}return r=Sn(w,a,r,p),r.elementType=t,r.type=c,r.lanes=g,r}function ts(t,r,a,c){return t=Sn(7,t,c,r),t.lanes=a,t}function Ic(t,r,a,c){return t=Sn(22,t,c,r),t.elementType=ne,t.lanes=a,t.stateNode={isHidden:!1},t}function mp(t,r,a){return t=Sn(6,t,null,r),t.lanes=a,t}function gp(t,r,a){return r=Sn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function jD(t,r,a,c,p){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ud(0),this.expirationTimes=Ud(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ud(0),this.identifierPrefix=c,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function vp(t,r,a,c,p,g,w,_,A){return t=new jD(t,r,a,_,A),r===1?(r=1,g===!0&&(r|=8)):r=0,g=Sn(3,null,null,r),t.current=g,g.stateNode=t,g.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tf(g),t}function LD(t,r,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:c==null?null:""+c,children:t,containerInfo:r,implementation:a}}function Vw(t){if(!t)return lo;t=t._reactInternals;e:{if(Bo(t)!==t||t.tag!==1)throw Error(o(170));var r=t;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(Yt(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(o(171))}if(t.tag===1){var a=t.type;if(Yt(a))return mx(t,a,r)}return r}function Uw(t,r,a,c,p,g,w,_,A){return t=vp(a,c,!0,t,p,g,w,_,A),t.context=Vw(null),a=t.current,c=Ht(),p=go(a),g=Ir(c,p),g.callback=r??null,fo(a,g,p),t.current.lanes=p,Ai(t,p,c),Jt(t,c),t}function Tc(t,r,a,c){var p=r.current,g=Ht(),w=go(p);return a=Vw(a),r.context===null?r.context=a:r.pendingContext=a,r=Ir(g,w),r.payload={element:t},c=c===void 0?null:c,c!==null&&(r.callback=c),t=fo(p,r,w),t!==null&&(Ln(t,p,w,g),ac(t,p,w)),w}function Dc(t){return t=t.current,t.child?(t.child.tag===5,t.child.stateNode):null}function Bw(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function yp(t,r){Bw(t,r),(t=t.alternate)&&Bw(t,r)}function FD(){return null}var Hw=typeof reportError=="function"?reportError:function(t){console.error(t)};function xp(t){this._internalRoot=t}Nc.prototype.render=xp.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));Tc(t,r,null,null)},Nc.prototype.unmount=xp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Xo(function(){Tc(null,t,null,null)}),r[kr]=null}};function Nc(t){this._internalRoot=t}Nc.prototype.unstable_scheduleHydration=function(t){if(t){var r=Py();t={blockedOn:null,target:t,priority:r};for(var a=0;a<ro.length&&r!==0&&r<ro[a].priority;a++);ro.splice(a,0,t),a===0&&Ty(t)}};function wp(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Oc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Ww(){}function zD(t,r,a,c,p){if(p){if(typeof c=="function"){var g=c;c=function(){var V=Dc(w);g.call(V)}}var w=Uw(r,c,t,0,null,!1,!1,"",Ww);return t._reactRootContainer=w,t[kr]=w.current,Zi(t.nodeType===8?t.parentNode:t),Xo(),w}for(;p=t.lastChild;)t.removeChild(p);if(typeof c=="function"){var _=c;c=function(){var V=Dc(A);_.call(V)}}var A=vp(t,0,!1,null,null,!1,!1,"",Ww);return t._reactRootContainer=A,t[kr]=A.current,Zi(t.nodeType===8?t.parentNode:t),Xo(function(){Tc(r,A,a,c)}),A}function Ac(t,r,a,c,p){var g=a._reactRootContainer;if(g){var w=g;if(typeof p=="function"){var _=p;p=function(){var A=Dc(w);_.call(A)}}Tc(r,w,t,p)}else w=zD(a,r,t,p,c);return Dc(w)}Ey=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var a=Oi(r.pendingLanes);a!==0&&(Bd(r,a|1),Jt(r,mt()),(Ye&6)===0&&(Gs=mt()+500,co()))}break;case 13:Xo(function(){var c=Rr(t,1);if(c!==null){var p=Ht();Ln(c,t,1,p)}}),yp(t,1)}},Hd=function(t){if(t.tag===13){var r=Rr(t,134217728);if(r!==null){var a=Ht();Ln(r,t,134217728,a)}yp(t,134217728)}},_y=function(t){if(t.tag===13){var r=go(t),a=Rr(t,r);if(a!==null){var c=Ht();Ln(a,t,r,c)}yp(t,r)}},Py=function(){return et},Ry=function(t,r){var a=et;try{return et=t,r()}finally{et=a}},Ri=function(t,r,a){switch(r){case"input":if(Rn(t,a),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==t&&c.form===t.form){var p=Ql(c);if(!p)throw Error(o(90));je(c),Rn(c,p)}}}break;case"textarea":zo(t,a);break;case"select":r=a.value,r!=null&&In(t,!!a.multiple,r,!1)}},Di=dp,G=Xo;var VD={usingClientEntryPoint:!1,Events:[Qi,As,Ql,Tl,Ti,dp]},da={findFiberByHostInstance:Ho,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},UD={bundleType:da.bundleType,version:da.version,rendererPackageName:da.rendererPackageName,rendererConfig:da.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=vy(t),t===null?null:t.stateNode},findFiberByHostInstance:da.findFiberByHostInstance||FD,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 $c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$c.isDisabled&&$c.supportsFiber)try{Nl=$c.inject(UD),Jn=$c}catch{}}return Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VD,Wt.createPortal=function(t,r){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wp(r))throw Error(o(200));return LD(t,r,null,a)},Wt.createRoot=function(t,r){if(!wp(t))throw Error(o(299));var a=!1,c="",p=Hw;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),r=vp(t,1,!1,null,null,a,!1,c,p),t[kr]=r.current,Zi(t.nodeType===8?t.parentNode:t),new xp(r)},Wt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=vy(r),t=t===null?null:t.stateNode,t},Wt.flushSync=function(t){return Xo(t)},Wt.hydrate=function(t,r,a){if(!Oc(r))throw Error(o(200));return Ac(null,t,r,!0,a)},Wt.hydrateRoot=function(t,r,a){if(!wp(t))throw Error(o(405));var c=a!=null&&a.hydratedSources||null,p=!1,g="",w=Hw;if(a!=null&&(a.unstable_strictMode===!0&&(p=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),r=Uw(r,null,t,1,a??null,p,!1,g,w),t[kr]=r.current,Zi(t),c)for(t=0;t<c.length;t++)a=c[t],p=a._getVersion,p=p(a._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[a,p]:r.mutableSourceEagerHydrationData.push(a,p);return new Nc(r)},Wt.render=function(t,r,a){if(!Oc(r))throw Error(o(200));return Ac(null,t,r,!1,a)},Wt.unmountComponentAtNode=function(t){if(!Oc(t))throw Error(o(40));return t._reactRootContainer?(Xo(function(){Ac(null,null,t,!1,function(){t._reactRootContainer=null,t[kr]=null})}),!0):!1},Wt.unstable_batchedUpdates=dp,Wt.unstable_renderSubtreeIntoContainer=function(t,r,a,c){if(!Oc(a))throw Error(o(200));if(t==null||t._reactInternals===void 0)throw Error(o(38));return Ac(t,r,a,!1,c)},Wt.version="18.3.1-next-f1338f8080-20240426",Wt}var _p;function Pp(){if(_p)return Lc.exports;_p=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Lc.exports=Qw(),Lc.exports}var Rp;function Xw(){if(Rp)return fa;Rp=1;var n=Pp();return fa.createRoot=n.createRoot,fa.hydrateRoot=n.hydrateRoot,fa}var Jw=Xw(),Ze;(function(n){n.assertEqual=i=>{};function e(i){}n.assertIs=e;function o(i){throw new Error}n.assertNever=o,n.arrayToEnum=i=>{const l={};for(const u of i)l[u]=u;return l},n.getValidEnumValues=i=>{const l=n.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),u={};for(const d of l)u[d]=i[d];return n.objectValues(u)},n.objectValues=i=>n.objectKeys(i).map(function(l){return i[l]}),n.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const u in i)Object.prototype.hasOwnProperty.call(i,u)&&l.push(u);return l},n.find=(i,l)=>{for(const u of i)if(l(u))return u},n.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function s(i,l=" | "){return i.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}n.joinValues=s,n.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})(Ze||(Ze={}));var Ip;(function(n){n.mergeShapes=(e,o)=>({...e,...o})})(Ip||(Ip={}));const ve=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Nr=n=>{switch(typeof n){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(n)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(n)?ve.array:n===null?ve.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?ve.promise:typeof Map<"u"&&n instanceof Map?ve.map:typeof Set<"u"&&n instanceof Set?ve.set:typeof Date<"u"&&n instanceof Date?ve.date:ve.object;default:return ve.unknown}},oe=Ze.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"]);class or extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const o=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,o):this.__proto__=o,this.name="ZodError",this.issues=e}format(e){const o=e||function(l){return l.message},s={_errors:[]},i=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(i);else if(u.code==="invalid_return_type")i(u.returnTypeError);else if(u.code==="invalid_arguments")i(u.argumentsError);else if(u.path.length===0)s._errors.push(o(u));else{let d=s,h=0;for(;h<u.path.length;){const m=u.path[h];h===u.path.length-1?(d[m]=d[m]||{_errors:[]},d[m]._errors.push(o(u))):d[m]=d[m]||{_errors:[]},d=d[m],h++}}};return i(this),s}static assert(e){if(!(e instanceof or))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=o=>o.message){const o={},s=[];for(const i of this.issues)i.path.length>0?(o[i.path[0]]=o[i.path[0]]||[],o[i.path[0]].push(e(i))):s.push(e(i));return{formErrors:s,fieldErrors:o}}get formErrors(){return this.flatten()}}or.create=n=>new or(n);const Vc=(n,e)=>{let o;switch(n.code){case oe.invalid_type:n.received===ve.undefined?o="Required":o=`Expected ${n.expected}, received ${n.received}`;break;case oe.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(n.expected,Ze.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:o=`Unrecognized key(s) in object: ${Ze.joinValues(n.keys,", ")}`;break;case oe.invalid_union:o="Invalid input";break;case oe.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${Ze.joinValues(n.options)}`;break;case oe.invalid_enum_value:o=`Invalid enum value. Expected ${Ze.joinValues(n.options)}, received '${n.received}'`;break;case oe.invalid_arguments:o="Invalid function arguments";break;case oe.invalid_return_type:o="Invalid function return type";break;case oe.invalid_date:o="Invalid date";break;case oe.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(o=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(o=`${o} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?o=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?o=`Invalid input: must end with "${n.validation.endsWith}"`:Ze.assertNever(n.validation):n.validation!=="regex"?o=`Invalid ${n.validation}`:o="Invalid";break;case oe.too_small:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:o="Invalid input";break;case oe.too_big:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?o=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:o="Invalid input";break;case oe.custom:o="Invalid input";break;case oe.invalid_intersection_types:o="Intersection results could not be merged";break;case oe.not_multiple_of:o=`Number must be a multiple of ${n.multipleOf}`;break;case oe.not_finite:o="Number must be finite";break;default:o=e.defaultError,Ze.assertNever(n)}return{message:o}};let e0=Vc;function t0(){return e0}const n0=n=>{const{data:e,path:o,errorMaps:s,issueData:i}=n,l=[...o,...i.path||[]],u={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const h=s.filter(m=>!!m).slice().reverse();for(const m of h)d=m(u,{data:e,defaultError:d}).message;return{...i,path:l,message:d}};function fe(n,e){const o=t0(),s=n0({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,o,o===Vc?void 0:Vc].filter(i=>!!i)});n.common.issues.push(s)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,o){const s=[];for(const i of o){if(i.status==="aborted")return Ie;i.status==="dirty"&&e.dirty(),s.push(i.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,o){const s=[];for(const i of o){const l=await i.key,u=await i.value;s.push({key:l,value:u})}return Lt.mergeObjectSync(e,s)}static mergeObjectSync(e,o){const s={};for(const i of o){const{key:l,value:u}=i;if(l.status==="aborted"||u.status==="aborted")return Ie;l.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||i.alwaysSet)&&(s[l.value]=u.value)}return{status:e.value,value:s}}}const Ie=Object.freeze({status:"aborted"}),qs=n=>({status:"dirty",value:n}),hn=n=>({status:"valid",value:n}),Tp=n=>n.status==="aborted",Dp=n=>n.status==="dirty",rs=n=>n.status==="valid",pa=n=>typeof Promise<"u"&&n instanceof Promise;var ke;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e?.message})(ke||(ke={}));class Fn{constructor(e,o,s,i){this._cachedPath=[],this.parent=e,this.data=o,this._path=s,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Np=(n,e)=>{if(rs(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const o=new or(n.common.issues);return this._error=o,this._error}}};function Me(n){if(!n)return{};const{errorMap:e,invalid_type_error:o,required_error:s,description:i}=n;if(e&&(o||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(u,d)=>{const{message:h}=n;return u.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??s??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:h??o??d.defaultError}},description:i}}class He{get description(){return this._def.description}_getType(e){return Nr(e.data)}_getOrReturnCtx(e,o){return o||{common:e.parent.common,data:e.data,parsedType:Nr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Lt,ctx:{common:e.parent.common,data:e.data,parsedType:Nr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const o=this._parse(e);if(pa(o))throw new Error("Synchronous parse encountered promise.");return o}_parseAsync(e){const o=this._parse(e);return Promise.resolve(o)}parse(e,o){const s=this.safeParse(e,o);if(s.success)return s.data;throw s.error}safeParse(e,o){const s={common:{issues:[],async:o?.async??!1,contextualErrorMap:o?.errorMap},path:o?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Nr(e)},i=this._parseSync({data:e,path:s.path,parent:s});return Np(s,i)}"~validate"(e){const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Nr(e)};if(!this["~standard"].async)try{const s=this._parseSync({data:e,path:[],parent:o});return rs(s)?{value:s.value}:{issues:o.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:o}).then(s=>rs(s)?{value:s.value}:{issues:o.common.issues})}async parseAsync(e,o){const s=await this.safeParseAsync(e,o);if(s.success)return s.data;throw s.error}async safeParseAsync(e,o){const s={common:{issues:[],contextualErrorMap:o?.errorMap,async:!0},path:o?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Nr(e)},i=this._parse({data:e,path:s.path,parent:s}),l=await(pa(i)?i:Promise.resolve(i));return Np(s,l)}refine(e,o){const s=i=>typeof o=="string"||typeof o>"u"?{message:o}:typeof o=="function"?o(i):o;return this._refinement((i,l)=>{const u=e(i),d=()=>l.addIssue({code:oe.custom,...s(i)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(e,o){return this._refinement((s,i)=>e(s)?!0:(i.addIssue(typeof o=="function"?o(s,i):o),!1))}_refinement(e){return new Co({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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),this["~standard"]={version:1,vendor:"zod",validate:o=>this["~validate"](o)}}optional(){return ar.create(this,this._def)}nullable(){return ko.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zn.create(this)}promise(){return ba.create(this,this._def)}or(e){return ga.create([this,e],this._def)}and(e){return va.create(this,e,this._def)}transform(e){return new Co({...Me(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const o=typeof e=="function"?e:()=>e;return new Sa({...Me(this._def),innerType:this,defaultValue:o,typeName:Te.ZodDefault})}brand(){return new Vp({typeName:Te.ZodBranded,type:this,...Me(this._def)})}catch(e){const o=typeof e=="function"?e:()=>e;return new Ca({...Me(this._def),innerType:this,catchValue:o,typeName:Te.ZodCatch})}describe(e){const o=this.constructor;return new o({...this._def,description:e})}pipe(e){return qc.create(this,e)}readonly(){return ka.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const r0=/^c[^\s-]{8,}$/i,o0=/^[0-9a-z]+$/,s0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,i0=/^[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,a0=/^[a-z0-9_-]{21}$/i,l0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,c0=/^[-+]?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)?)??$/,u0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,d0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Uc;const f0=/^(?:(?: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])$/,p0=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,h0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,m0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,g0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,v0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Op="((\\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])))",y0=new RegExp(`^${Op}$`);function Ap(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);const o=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${o}`}function x0(n){return new RegExp(`^${Ap(n)}$`)}function w0(n){let e=`${Op}T${Ap(n)}`;const o=[];return o.push(n.local?"Z?":"Z"),n.offset&&o.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${o.join("|")})`,new RegExp(`^${e}$`)}function b0(n,e){return!!((e==="v4"||!e)&&f0.test(n)||(e==="v6"||!e)&&h0.test(n))}function S0(n,e){if(!l0.test(n))return!1;try{const[o]=n.split("."),s=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),i=JSON.parse(atob(s));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function C0(n,e){return!!((e==="v4"||!e)&&p0.test(n)||(e==="v6"||!e)&&m0.test(n))}class sr extends He{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ve.string){const l=this._getOrReturnCtx(e);return fe(l,{code:oe.invalid_type,expected:ve.string,received:l.parsedType}),Ie}const s=new Lt;let i;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="max")e.data.length>l.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="length"){const u=e.data.length>l.value,d=e.data.length<l.value;(u||d)&&(i=this._getOrReturnCtx(e,i),u?fe(i,{code:oe.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&fe(i,{code:oe.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),s.dirty())}else if(l.kind==="email")u0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"email",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="emoji")Uc||(Uc=new RegExp(d0,"u")),Uc.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"emoji",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="uuid")i0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"uuid",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="nanoid")a0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"nanoid",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid")r0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid2")o0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid2",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="ulid")s0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ulid",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),fe(i,{validation:"url",code:oe.invalid_string,message:l.message}),s.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"regex",code:oe.invalid_string,message:l.message}),s.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),s.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:{startsWith:l.value},message:l.message}),s.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:{endsWith:l.value},message:l.message}),s.dirty()):l.kind==="datetime"?w0(l).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:"datetime",message:l.message}),s.dirty()):l.kind==="date"?y0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:"date",message:l.message}),s.dirty()):l.kind==="time"?x0(l).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:"time",message:l.message}),s.dirty()):l.kind==="duration"?c0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"duration",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="ip"?b0(e.data,l.version)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ip",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="jwt"?S0(e.data,l.alg)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"jwt",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="cidr"?C0(e.data,l.version)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cidr",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="base64"?g0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"base64",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="base64url"?v0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"base64url",code:oe.invalid_string,message:l.message}),s.dirty()):Ze.assertNever(l);return{status:s.value,value:e.data}}_regex(e,o,s){return this.refinement(i=>e.test(i),{validation:o,code:oe.invalid_string,...ke.errToObj(s)})}_addCheck(e){return new sr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ke.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ke.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ke.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ke.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ke.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ke.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ke.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ke.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ke.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ke.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ke.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ke.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ke.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...ke.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ke.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ke.errToObj(e)})}regex(e,o){return this._addCheck({kind:"regex",regex:e,...ke.errToObj(o)})}includes(e,o){return this._addCheck({kind:"includes",value:e,position:o?.position,...ke.errToObj(o?.message)})}startsWith(e,o){return this._addCheck({kind:"startsWith",value:e,...ke.errToObj(o)})}endsWith(e,o){return this._addCheck({kind:"endsWith",value:e,...ke.errToObj(o)})}min(e,o){return this._addCheck({kind:"min",value:e,...ke.errToObj(o)})}max(e,o){return this._addCheck({kind:"max",value:e,...ke.errToObj(o)})}length(e,o){return this._addCheck({kind:"length",value:e,...ke.errToObj(o)})}nonempty(e){return this.min(1,ke.errToObj(e))}trim(){return new sr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new sr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new sr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e}get maxLength(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e}}sr.create=n=>new sr({checks:[],typeName:Te.ZodString,coerce:n?.coerce??!1,...Me(n)});function k0(n,e){const o=(n.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,i=o>s?o:s,l=Number.parseInt(n.toFixed(i).replace(".","")),u=Number.parseInt(e.toFixed(i).replace(".",""));return l%u/10**i}class os extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ve.number){const l=this._getOrReturnCtx(e);return fe(l,{code:oe.invalid_type,expected:ve.number,received:l.parsedType}),Ie}let s;const i=new Lt;for(const l of this._def.checks)l.kind==="int"?Ze.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.invalid_type,expected:"integer",received:"float",message:l.message}),i.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="multipleOf"?k0(e.data,l.value)!==0&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.not_finite,message:l.message}),i.dirty()):Ze.assertNever(l);return{status:i.value,value:e.data}}gte(e,o){return this.setLimit("min",e,!0,ke.toString(o))}gt(e,o){return this.setLimit("min",e,!1,ke.toString(o))}lte(e,o){return this.setLimit("max",e,!0,ke.toString(o))}lt(e,o){return this.setLimit("max",e,!1,ke.toString(o))}setLimit(e,o,s,i){return new os({...this._def,checks:[...this._def.checks,{kind:e,value:o,inclusive:s,message:ke.toString(i)}]})}_addCheck(e){return new os({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ke.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(e)})}multipleOf(e,o){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(o)})}finite(e){return this._addCheck({kind:"finite",message:ke.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(e)})}get minValue(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e}get maxValue(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ze.isInteger(e.value))}get isFinite(){let e=null,o=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(o===null||s.value>o)&&(o=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(o)&&Number.isFinite(e)}}os.create=n=>new os({checks:[],typeName:Te.ZodNumber,coerce:n?.coerce||!1,...Me(n)});class Ys extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ve.bigint)return this._getInvalidInput(e);let s;const i=new Lt;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):Ze.assertNever(l);return{status:i.value,value:e.data}}_getInvalidInput(e){const o=this._getOrReturnCtx(e);return fe(o,{code:oe.invalid_type,expected:ve.bigint,received:o.parsedType}),Ie}gte(e,o){return this.setLimit("min",e,!0,ke.toString(o))}gt(e,o){return this.setLimit("min",e,!1,ke.toString(o))}lte(e,o){return this.setLimit("max",e,!0,ke.toString(o))}lt(e,o){return this.setLimit("max",e,!1,ke.toString(o))}setLimit(e,o,s,i){return new Ys({...this._def,checks:[...this._def.checks,{kind:e,value:o,inclusive:s,message:ke.toString(i)}]})}_addCheck(e){return new Ys({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}multipleOf(e,o){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(o)})}get minValue(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e}get maxValue(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e}}Ys.create=n=>new Ys({checks:[],typeName:Te.ZodBigInt,coerce:n?.coerce??!1,...Me(n)});class Bc extends He{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ve.boolean){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.boolean,received:s.parsedType}),Ie}return hn(e.data)}}Bc.create=n=>new Bc({typeName:Te.ZodBoolean,coerce:n?.coerce||!1,...Me(n)});class ha extends He{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ve.date){const l=this._getOrReturnCtx(e);return fe(l,{code:oe.invalid_type,expected:ve.date,received:l.parsedType}),Ie}if(Number.isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return fe(l,{code:oe.invalid_date}),Ie}const s=new Lt;let i;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),s.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),s.dirty()):Ze.assertNever(l);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ha({...this._def,checks:[...this._def.checks,e]})}min(e,o){return this._addCheck({kind:"min",value:e.getTime(),message:ke.toString(o)})}max(e,o){return this._addCheck({kind:"max",value:e.getTime(),message:ke.toString(o)})}get minDate(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e!=null?new Date(e):null}}ha.create=n=>new ha({checks:[],coerce:n?.coerce||!1,typeName:Te.ZodDate,...Me(n)});class $p extends He{_parse(e){if(this._getType(e)!==ve.symbol){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.symbol,received:s.parsedType}),Ie}return hn(e.data)}}$p.create=n=>new $p({typeName:Te.ZodSymbol,...Me(n)});class Hc extends He{_parse(e){if(this._getType(e)!==ve.undefined){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.undefined,received:s.parsedType}),Ie}return hn(e.data)}}Hc.create=n=>new Hc({typeName:Te.ZodUndefined,...Me(n)});class ma extends He{_parse(e){if(this._getType(e)!==ve.null){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.null,received:s.parsedType}),Ie}return hn(e.data)}}ma.create=n=>new ma({typeName:Te.ZodNull,...Me(n)});class Mp extends He{constructor(){super(...arguments),this._any=!0}_parse(e){return hn(e.data)}}Mp.create=n=>new Mp({typeName:Te.ZodAny,...Me(n)});class Wc extends He{constructor(){super(...arguments),this._unknown=!0}_parse(e){return hn(e.data)}}Wc.create=n=>new Wc({typeName:Te.ZodUnknown,...Me(n)});class Or extends He{_parse(e){const o=this._getOrReturnCtx(e);return fe(o,{code:oe.invalid_type,expected:ve.never,received:o.parsedType}),Ie}}Or.create=n=>new Or({typeName:Te.ZodNever,...Me(n)});class jp extends He{_parse(e){if(this._getType(e)!==ve.undefined){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.void,received:s.parsedType}),Ie}return hn(e.data)}}jp.create=n=>new jp({typeName:Te.ZodVoid,...Me(n)});class zn extends He{_parse(e){const{ctx:o,status:s}=this._processInputParams(e),i=this._def;if(o.parsedType!==ve.array)return fe(o,{code:oe.invalid_type,expected:ve.array,received:o.parsedType}),Ie;if(i.exactLength!==null){const u=o.data.length>i.exactLength.value,d=o.data.length<i.exactLength.value;(u||d)&&(fe(o,{code:u?oe.too_big:oe.too_small,minimum:d?i.exactLength.value:void 0,maximum:u?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),s.dirty())}if(i.minLength!==null&&o.data.length<i.minLength.value&&(fe(o,{code:oe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),s.dirty()),i.maxLength!==null&&o.data.length>i.maxLength.value&&(fe(o,{code:oe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),s.dirty()),o.common.async)return Promise.all([...o.data].map((u,d)=>i.type._parseAsync(new Fn(o,u,o.path,d)))).then(u=>Lt.mergeArray(s,u));const l=[...o.data].map((u,d)=>i.type._parseSync(new Fn(o,u,o.path,d)));return Lt.mergeArray(s,l)}get element(){return this._def.type}min(e,o){return new zn({...this._def,minLength:{value:e,message:ke.toString(o)}})}max(e,o){return new zn({...this._def,maxLength:{value:e,message:ke.toString(o)}})}length(e,o){return new zn({...this._def,exactLength:{value:e,message:ke.toString(o)}})}nonempty(e){return this.min(1,e)}}zn.create=(n,e)=>new zn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Me(e)});function ss(n){if(n instanceof vt){const e={};for(const o in n.shape){const s=n.shape[o];e[o]=ar.create(ss(s))}return new vt({...n._def,shape:()=>e})}else return n instanceof zn?new zn({...n._def,type:ss(n.element)}):n instanceof ar?ar.create(ss(n.unwrap())):n instanceof ko?ko.create(ss(n.unwrap())):n instanceof bo?bo.create(n.items.map(e=>ss(e))):n}class vt extends He{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),o=Ze.objectKeys(e);return this._cached={shape:e,keys:o},this._cached}_parse(e){if(this._getType(e)!==ve.object){const m=this._getOrReturnCtx(e);return fe(m,{code:oe.invalid_type,expected:ve.object,received:m.parsedType}),Ie}const{status:s,ctx:i}=this._processInputParams(e),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof Or&&this._def.unknownKeys==="strip"))for(const m in i.data)u.includes(m)||d.push(m);const h=[];for(const m of u){const y=l[m],v=i.data[m];h.push({key:{status:"valid",value:m},value:y._parse(new Fn(i,v,i.path,m)),alwaysSet:m in i.data})}if(this._def.catchall instanceof Or){const m=this._def.unknownKeys;if(m==="passthrough")for(const y of d)h.push({key:{status:"valid",value:y},value:{status:"valid",value:i.data[y]}});else if(m==="strict")d.length>0&&(fe(i,{code:oe.unrecognized_keys,keys:d}),s.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const y of d){const v=i.data[y];h.push({key:{status:"valid",value:y},value:m._parse(new Fn(i,v,i.path,y)),alwaysSet:y in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const m=[];for(const y of h){const v=await y.key,x=await y.value;m.push({key:v,value:x,alwaysSet:y.alwaysSet})}return m}).then(m=>Lt.mergeObjectSync(s,m)):Lt.mergeObjectSync(s,h)}get shape(){return this._def.shape()}strict(e){return ke.errToObj,new vt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(o,s)=>{const i=this._def.errorMap?.(o,s).message??s.defaultError;return o.code==="unrecognized_keys"?{message:ke.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(e){return new vt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new vt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Te.ZodObject})}setKey(e,o){return this.augment({[e]:o})}catchall(e){return new vt({...this._def,catchall:e})}pick(e){const o={};for(const s of Ze.objectKeys(e))e[s]&&this.shape[s]&&(o[s]=this.shape[s]);return new vt({...this._def,shape:()=>o})}omit(e){const o={};for(const s of Ze.objectKeys(this.shape))e[s]||(o[s]=this.shape[s]);return new vt({...this._def,shape:()=>o})}deepPartial(){return ss(this)}partial(e){const o={};for(const s of Ze.objectKeys(this.shape)){const i=this.shape[s];e&&!e[s]?o[s]=i:o[s]=i.optional()}return new vt({...this._def,shape:()=>o})}required(e){const o={};for(const s of Ze.objectKeys(this.shape))if(e&&!e[s])o[s]=this.shape[s];else{let l=this.shape[s];for(;l instanceof ar;)l=l._def.innerType;o[s]=l}return new vt({...this._def,shape:()=>o})}keyof(){return Fp(Ze.objectKeys(this.shape))}}vt.create=(n,e)=>new vt({shape:()=>n,unknownKeys:"strip",catchall:Or.create(),typeName:Te.ZodObject,...Me(e)}),vt.strictCreate=(n,e)=>new vt({shape:()=>n,unknownKeys:"strict",catchall:Or.create(),typeName:Te.ZodObject,...Me(e)}),vt.lazycreate=(n,e)=>new vt({shape:n,unknownKeys:"strip",catchall:Or.create(),typeName:Te.ZodObject,...Me(e)});class ga extends He{_parse(e){const{ctx:o}=this._processInputParams(e),s=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return o.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new or(d.ctx.common.issues));return fe(o,{code:oe.invalid_union,unionErrors:u}),Ie}if(o.common.async)return Promise.all(s.map(async l=>{const u={...o,common:{...o.common,issues:[]},parent:null};return{result:await l._parseAsync({data:o.data,path:o.path,parent:u}),ctx:u}})).then(i);{let l;const u=[];for(const h of s){const m={...o,common:{...o.common,issues:[]},parent:null},y=h._parseSync({data:o.data,path:o.path,parent:m});if(y.status==="valid")return y;y.status==="dirty"&&!l&&(l={result:y,ctx:m}),m.common.issues.length&&u.push(m.common.issues)}if(l)return o.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(h=>new or(h));return fe(o,{code:oe.invalid_union,unionErrors:d}),Ie}}get options(){return this._def.options}}ga.create=(n,e)=>new ga({options:n,typeName:Te.ZodUnion,...Me(e)});const ir=n=>n instanceof xa?ir(n.schema):n instanceof Co?ir(n.innerType()):n instanceof wa?[n.value]:n instanceof So?n.options:n instanceof Zc?Ze.objectValues(n.enum):n instanceof Sa?ir(n._def.innerType):n instanceof Hc?[void 0]:n instanceof ma?[null]:n instanceof ar?[void 0,...ir(n.unwrap())]:n instanceof ko?[null,...ir(n.unwrap())]:n instanceof Vp||n instanceof ka?ir(n.unwrap()):n instanceof Ca?ir(n._def.innerType):[];class Kc extends He{_parse(e){const{ctx:o}=this._processInputParams(e);if(o.parsedType!==ve.object)return fe(o,{code:oe.invalid_type,expected:ve.object,received:o.parsedType}),Ie;const s=this.discriminator,i=o.data[s],l=this.optionsMap.get(i);return l?o.common.async?l._parseAsync({data:o.data,path:o.path,parent:o}):l._parseSync({data:o.data,path:o.path,parent:o}):(fe(o,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),Ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,o,s){const i=new Map;for(const l of o){const u=ir(l.shape[e]);if(!u.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const d of u){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new Kc({typeName:Te.ZodDiscriminatedUnion,discriminator:e,options:o,optionsMap:i,...Me(s)})}}function Gc(n,e){const o=Nr(n),s=Nr(e);if(n===e)return{valid:!0,data:n};if(o===ve.object&&s===ve.object){const i=Ze.objectKeys(e),l=Ze.objectKeys(n).filter(d=>i.indexOf(d)!==-1),u={...n,...e};for(const d of l){const h=Gc(n[d],e[d]);if(!h.valid)return{valid:!1};u[d]=h.data}return{valid:!0,data:u}}else if(o===ve.array&&s===ve.array){if(n.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<n.length;l++){const u=n[l],d=e[l],h=Gc(u,d);if(!h.valid)return{valid:!1};i.push(h.data)}return{valid:!0,data:i}}else return o===ve.date&&s===ve.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class va extends He{_parse(e){const{status:o,ctx:s}=this._processInputParams(e),i=(l,u)=>{if(Tp(l)||Tp(u))return Ie;const d=Gc(l.value,u.value);return d.valid?((Dp(l)||Dp(u))&&o.dirty(),{status:o.value,value:d.data}):(fe(s,{code:oe.invalid_intersection_types}),Ie)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([l,u])=>i(l,u)):i(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}va.create=(n,e,o)=>new va({left:n,right:e,typeName:Te.ZodIntersection,...Me(o)});class bo extends He{_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ve.array)return fe(s,{code:oe.invalid_type,expected:ve.array,received:s.parsedType}),Ie;if(s.data.length<this._def.items.length)return fe(s,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ie;!this._def.rest&&s.data.length>this._def.items.length&&(fe(s,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o.dirty());const l=[...s.data].map((u,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new Fn(s,u,s.path,d)):null}).filter(u=>!!u);return s.common.async?Promise.all(l).then(u=>Lt.mergeArray(o,u)):Lt.mergeArray(o,l)}get items(){return this._def.items}rest(e){return new bo({...this._def,rest:e})}}bo.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new bo({items:n,typeName:Te.ZodTuple,rest:null,...Me(e)})};class ya extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ve.object)return fe(s,{code:oe.invalid_type,expected:ve.object,received:s.parsedType}),Ie;const i=[],l=this._def.keyType,u=this._def.valueType;for(const d in s.data)i.push({key:l._parse(new Fn(s,d,s.path,d)),value:u._parse(new Fn(s,s.data[d],s.path,d)),alwaysSet:d in s.data});return s.common.async?Lt.mergeObjectAsync(o,i):Lt.mergeObjectSync(o,i)}get element(){return this._def.valueType}static create(e,o,s){return o instanceof He?new ya({keyType:e,valueType:o,typeName:Te.ZodRecord,...Me(s)}):new ya({keyType:sr.create(),valueType:e,typeName:Te.ZodRecord,...Me(o)})}}class Lp extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ve.map)return fe(s,{code:oe.invalid_type,expected:ve.map,received:s.parsedType}),Ie;const i=this._def.keyType,l=this._def.valueType,u=[...s.data.entries()].map(([d,h],m)=>({key:i._parse(new Fn(s,d,s.path,[m,"key"])),value:l._parse(new Fn(s,h,s.path,[m,"value"]))}));if(s.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of u){const m=await h.key,y=await h.value;if(m.status==="aborted"||y.status==="aborted")return Ie;(m.status==="dirty"||y.status==="dirty")&&o.dirty(),d.set(m.value,y.value)}return{status:o.value,value:d}})}else{const d=new Map;for(const h of u){const m=h.key,y=h.value;if(m.status==="aborted"||y.status==="aborted")return Ie;(m.status==="dirty"||y.status==="dirty")&&o.dirty(),d.set(m.value,y.value)}return{status:o.value,value:d}}}}Lp.create=(n,e,o)=>new Lp({valueType:e,keyType:n,typeName:Te.ZodMap,...Me(o)});class Qs extends He{_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ve.set)return fe(s,{code:oe.invalid_type,expected:ve.set,received:s.parsedType}),Ie;const i=this._def;i.minSize!==null&&s.data.size<i.minSize.value&&(fe(s,{code:oe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),o.dirty()),i.maxSize!==null&&s.data.size>i.maxSize.value&&(fe(s,{code:oe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),o.dirty());const l=this._def.valueType;function u(h){const m=new Set;for(const y of h){if(y.status==="aborted")return Ie;y.status==="dirty"&&o.dirty(),m.add(y.value)}return{status:o.value,value:m}}const d=[...s.data.values()].map((h,m)=>l._parse(new Fn(s,h,s.path,m)));return s.common.async?Promise.all(d).then(h=>u(h)):u(d)}min(e,o){return new Qs({...this._def,minSize:{value:e,message:ke.toString(o)}})}max(e,o){return new Qs({...this._def,maxSize:{value:e,message:ke.toString(o)}})}size(e,o){return this.min(e,o).max(e,o)}nonempty(e){return this.min(1,e)}}Qs.create=(n,e)=>new Qs({valueType:n,minSize:null,maxSize:null,typeName:Te.ZodSet,...Me(e)});class xa extends He{get schema(){return this._def.getter()}_parse(e){const{ctx:o}=this._processInputParams(e);return this._def.getter()._parse({data:o.data,path:o.path,parent:o})}}xa.create=(n,e)=>new xa({getter:n,typeName:Te.ZodLazy,...Me(e)});class wa extends He{_parse(e){if(e.data!==this._def.value){const o=this._getOrReturnCtx(e);return fe(o,{received:o.data,code:oe.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:e.data}}get value(){return this._def.value}}wa.create=(n,e)=>new wa({value:n,typeName:Te.ZodLiteral,...Me(e)});function Fp(n,e){return new So({values:n,typeName:Te.ZodEnum,...Me(e)})}class So extends He{_parse(e){if(typeof e.data!="string"){const o=this._getOrReturnCtx(e),s=this._def.values;return fe(o,{expected:Ze.joinValues(s),received:o.parsedType,code:oe.invalid_type}),Ie}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const o=this._getOrReturnCtx(e),s=this._def.values;return fe(o,{received:o.data,code:oe.invalid_enum_value,options:s}),Ie}return hn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const o of this._def.values)e[o]=o;return e}get Values(){const e={};for(const o of this._def.values)e[o]=o;return e}get Enum(){const e={};for(const o of this._def.values)e[o]=o;return e}extract(e,o=this._def){return So.create(e,{...this._def,...o})}exclude(e,o=this._def){return So.create(this.options.filter(s=>!e.includes(s)),{...this._def,...o})}}So.create=Fp;class Zc extends He{_parse(e){const o=Ze.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==ve.string&&s.parsedType!==ve.number){const i=Ze.objectValues(o);return fe(s,{expected:Ze.joinValues(i),received:s.parsedType,code:oe.invalid_type}),Ie}if(this._cache||(this._cache=new Set(Ze.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=Ze.objectValues(o);return fe(s,{received:s.data,code:oe.invalid_enum_value,options:i}),Ie}return hn(e.data)}get enum(){return this._def.values}}Zc.create=(n,e)=>new Zc({values:n,typeName:Te.ZodNativeEnum,...Me(e)});class ba extends He{unwrap(){return this._def.type}_parse(e){const{ctx:o}=this._processInputParams(e);if(o.parsedType!==ve.promise&&o.common.async===!1)return fe(o,{code:oe.invalid_type,expected:ve.promise,received:o.parsedType}),Ie;const s=o.parsedType===ve.promise?o.data:Promise.resolve(o.data);return hn(s.then(i=>this._def.type.parseAsync(i,{path:o.path,errorMap:o.common.contextualErrorMap})))}}ba.create=(n,e)=>new ba({type:n,typeName:Te.ZodPromise,...Me(e)});class Co extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:o,ctx:s}=this._processInputParams(e),i=this._def.effect||null,l={addIssue:u=>{fe(s,u),u.fatal?o.abort():o.dirty()},get path(){return s.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const u=i.transform(s.data,l);if(s.common.async)return Promise.resolve(u).then(async d=>{if(o.value==="aborted")return Ie;const h=await this._def.schema._parseAsync({data:d,path:s.path,parent:s});return h.status==="aborted"?Ie:h.status==="dirty"||o.value==="dirty"?qs(h.value):h});{if(o.value==="aborted")return Ie;const d=this._def.schema._parseSync({data:u,path:s.path,parent:s});return d.status==="aborted"?Ie:d.status==="dirty"||o.value==="dirty"?qs(d.value):d}}if(i.type==="refinement"){const u=d=>{const h=i.refinement(d,l);if(s.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return d.status==="aborted"?Ie:(d.status==="dirty"&&o.dirty(),u(d.value),{status:o.value,value:d.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(d=>d.status==="aborted"?Ie:(d.status==="dirty"&&o.dirty(),u(d.value).then(()=>({status:o.value,value:d.value}))))}if(i.type==="transform")if(s.common.async===!1){const u=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!rs(u))return Ie;const d=i.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:o.value,value:d}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(u=>rs(u)?Promise.resolve(i.transform(u.value,l)).then(d=>({status:o.value,value:d})):Ie);Ze.assertNever(i)}}Co.create=(n,e,o)=>new Co({schema:n,typeName:Te.ZodEffects,effect:e,...Me(o)}),Co.createWithPreprocess=(n,e,o)=>new Co({schema:e,effect:{type:"preprocess",transform:n},typeName:Te.ZodEffects,...Me(o)});class ar extends He{_parse(e){return this._getType(e)===ve.undefined?hn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ar.create=(n,e)=>new ar({innerType:n,typeName:Te.ZodOptional,...Me(e)});class ko extends He{_parse(e){return this._getType(e)===ve.null?hn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ko.create=(n,e)=>new ko({innerType:n,typeName:Te.ZodNullable,...Me(e)});class Sa extends He{_parse(e){const{ctx:o}=this._processInputParams(e);let s=o.data;return o.parsedType===ve.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:o.path,parent:o})}removeDefault(){return this._def.innerType}}Sa.create=(n,e)=>new Sa({innerType:n,typeName:Te.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Me(e)});class Ca extends He{_parse(e){const{ctx:o}=this._processInputParams(e),s={...o,common:{...o.common,issues:[]}},i=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return pa(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new or(s.common.issues)},input:s.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new or(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Ca.create=(n,e)=>new Ca({innerType:n,typeName:Te.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Me(e)});class zp extends He{_parse(e){if(this._getType(e)!==ve.nan){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.nan,received:s.parsedType}),Ie}return{status:"valid",value:e.data}}}zp.create=n=>new zp({typeName:Te.ZodNaN,...Me(n)});class Vp extends He{_parse(e){const{ctx:o}=this._processInputParams(e),s=o.data;return this._def.type._parse({data:s,path:o.path,parent:o})}unwrap(){return this._def.type}}class qc extends He{_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?Ie:l.status==="dirty"?(o.dirty(),qs(l.value)):this._def.out._parseAsync({data:l.value,path:s.path,parent:s})})();{const i=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?Ie:i.status==="dirty"?(o.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:s.path,parent:s})}}static create(e,o){return new qc({in:e,out:o,typeName:Te.ZodPipeline})}}class ka extends He{_parse(e){const o=this._def.innerType._parse(e),s=i=>(rs(i)&&(i.value=Object.freeze(i.value)),i);return pa(o)?o.then(i=>s(i)):s(o)}unwrap(){return this._def.innerType}}ka.create=(n,e)=>new ka({innerType:n,typeName:Te.ZodReadonly,...Me(e)});var Te;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(Te||(Te={}));const te=sr.create,tt=os.create,ot=Bc.create,Ar=ma.create,$r=Wc.create;Or.create;const nt=zn.create,me=vt.create,lr=ga.create,E0=Kc.create;va.create,bo.create;const Mr=ya.create,_0=xa.create,Je=wa.create,en=So.create;ba.create,ar.create,ko.create;function Up(n){var e,o,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(o=Up(n[e]))&&(s&&(s+=" "),s+=o)}else for(o in n)n[o]&&(s&&(s+=" "),s+=o);return s}function Bp(){for(var n,e,o=0,s="",i=arguments.length;o<i;o++)(n=arguments[o])&&(e=Up(n))&&(s&&(s+=" "),s+=e);return s}const P0=(n,e)=>{const o=new Array(n.length+e.length);for(let s=0;s<n.length;s++)o[s]=n[s];for(let s=0;s<e.length;s++)o[n.length+s]=e[s];return o},R0=(n,e)=>({classGroupId:n,validator:e}),Hp=(n=new Map,e=null,o)=>({nextPart:n,validators:e,classGroupId:o}),Ea="-",Wp=[],I0="arbitrary..",T0=n=>{const e=N0(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return D0(u);const d=u.split(Ea),h=d[0]===""&&d.length>1?1:0;return Kp(d,h,e)},getConflictingClassGroupIds:(u,d)=>{if(d){const h=s[u],m=o[u];return h?m?P0(m,h):h:m||Wp}return o[u]||Wp}}},Kp=(n,e,o)=>{if(n.length-e===0)return o.classGroupId;const i=n[e],l=o.nextPart.get(i);if(l){const m=Kp(n,e+1,l);if(m)return m}const u=o.validators;if(u===null)return;const d=e===0?n.join(Ea):n.slice(e).join(Ea),h=u.length;for(let m=0;m<h;m++){const y=u[m];if(y.validator(d))return y.classGroupId}},D0=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=n.slice(1,-1),o=e.indexOf(":"),s=e.slice(0,o);return s?I0+s:void 0})(),N0=n=>{const{theme:e,classGroups:o}=n;return O0(o,e)},O0=(n,e)=>{const o=Hp();for(const s in n){const i=n[s];Yc(i,o,s,e)}return o},Yc=(n,e,o,s)=>{const i=n.length;for(let l=0;l<i;l++){const u=n[l];A0(u,e,o,s)}},A0=(n,e,o,s)=>{if(typeof n=="string"){$0(n,e,o);return}if(typeof n=="function"){M0(n,e,o,s);return}j0(n,e,o,s)},$0=(n,e,o)=>{const s=n===""?e:Gp(e,n);s.classGroupId=o},M0=(n,e,o,s)=>{if(L0(n)){Yc(n(s),e,o,s);return}e.validators===null&&(e.validators=[]),e.validators.push(R0(o,n))},j0=(n,e,o,s)=>{const i=Object.entries(n),l=i.length;for(let u=0;u<l;u++){const[d,h]=i[u];Yc(h,Gp(e,d),o,s)}},Gp=(n,e)=>{let o=n;const s=e.split(Ea),i=s.length;for(let l=0;l<i;l++){const u=s[l];let d=o.nextPart.get(u);d||(d=Hp(),o.nextPart.set(u,d)),o=d}return o},L0=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,F0=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,o=Object.create(null),s=Object.create(null);const i=(l,u)=>{o[l]=u,e++,e>n&&(e=0,s=o,o=Object.create(null))};return{get(l){let u=o[l];if(u!==void 0)return u;if((u=s[l])!==void 0)return i(l,u),u},set(l,u){l in o?o[l]=u:i(l,u)}}},Qc="!",Zp=":",z0=[],qp=(n,e,o,s,i)=>({modifiers:n,hasImportantModifier:e,baseClassName:o,maybePostfixModifierPosition:s,isExternal:i}),V0=n=>{const{prefix:e,experimentalParseClassName:o}=n;let s=i=>{const l=[];let u=0,d=0,h=0,m;const y=i.length;for(let C=0;C<y;C++){const k=i[C];if(u===0&&d===0){if(k===Zp){l.push(i.slice(h,C)),h=C+1;continue}if(k==="/"){m=C;continue}}k==="["?u++:k==="]"?u--:k==="("?d++:k===")"&&d--}const v=l.length===0?i:i.slice(h);let x=v,b=!1;v.endsWith(Qc)?(x=v.slice(0,-1),b=!0):v.startsWith(Qc)&&(x=v.slice(1),b=!0);const S=m&&m>h?m-h:void 0;return qp(l,b,x,S)};if(e){const i=e+Zp,l=s;s=u=>u.startsWith(i)?l(u.slice(i.length)):qp(z0,!1,u,void 0,!0)}if(o){const i=s;s=l=>o({className:l,parseClassName:i})}return s},U0=n=>{const e=new Map;return n.orderSensitiveModifiers.forEach((o,s)=>{e.set(o,1e6+s)}),o=>{const s=[];let i=[];for(let l=0;l<o.length;l++){const u=o[l],d=u[0]==="[",h=e.has(u);d||h?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(u)):i.push(u)}return i.length>0&&(i.sort(),s.push(...i)),s}},B0=n=>({cache:F0(n.cacheSize),parseClassName:V0(n),sortModifiers:U0(n),postfixLookupClassGroupIds:H0(n),...T0(n)}),H0=n=>{const e=Object.create(null),o=n.postfixLookupClassGroups;if(o)for(let s=0;s<o.length;s++)e[o[s]]=!0;return e},W0=/\s+/,K0=(n,e)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:l,postfixLookupClassGroupIds:u}=e,d=[],h=n.trim().split(W0);let m="";for(let y=h.length-1;y>=0;y-=1){const v=h[y],{isExternal:x,modifiers:b,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:k}=o(v);if(x){m=v+(m.length>0?" "+m:m);continue}let N=!!k,D;if(N){const B=C.substring(0,k);D=s(B);const I=D&&u[D]?s(C):void 0;I&&I!==D&&(D=I,N=!1)}else D=s(C);if(!D){if(!N){m=v+(m.length>0?" "+m:m);continue}if(D=s(C),!D){m=v+(m.length>0?" "+m:m);continue}N=!1}const O=b.length===0?"":b.length===1?b[0]:l(b).join(":"),R=S?O+Qc:O,L=R+D;if(d.indexOf(L)>-1)continue;d.push(L);const j=i(D,N);for(let B=0;B<j.length;++B){const I=j[B];d.push(R+I)}m=v+(m.length>0?" "+m:m)}return m},G0=(...n)=>{let e=0,o,s,i="";for(;e<n.length;)(o=n[e++])&&(s=Yp(o))&&(i&&(i+=" "),i+=s);return i},Yp=n=>{if(typeof n=="string")return n;let e,o="";for(let s=0;s<n.length;s++)n[s]&&(e=Yp(n[s]))&&(o&&(o+=" "),o+=e);return o},Z0=(n,...e)=>{let o,s,i,l;const u=h=>{const m=e.reduce((y,v)=>v(y),n());return o=B0(m),s=o.cache.get,i=o.cache.set,l=d,d(h)},d=h=>{const m=s(h);if(m)return m;const y=K0(h,o);return i(h,y),y};return l=u,(...h)=>l(G0(...h))},q0=[],bt=n=>{const e=o=>o[n]||q0;return e.isThemeGetter=!0,e},Qp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Y0=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Q0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X0=/\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$/,J0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jr=n=>Y0.test(n),Fe=n=>!!n&&!Number.isNaN(Number(n)),Vn=n=>!!n&&Number.isInteger(Number(n)),Xc=n=>n.endsWith("%")&&Fe(n.slice(0,-1)),cr=n=>Q0.test(n),Jp=()=>!0,nb=n=>X0.test(n)&&!J0.test(n),Jc=()=>!1,rb=n=>eb.test(n),ob=n=>tb.test(n),sb=n=>!ge(n)&&!ye(n),ib=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),ab=n=>Lr(n,sh,Jc),ge=n=>Qp.test(n),Eo=n=>Lr(n,ih,nb),eh=n=>Lr(n,mb,Fe),lb=n=>Lr(n,lh,Jp),cb=n=>Lr(n,ah,Jc),th=n=>Lr(n,rh,Jc),ub=n=>Lr(n,oh,ob),_a=n=>Lr(n,ch,rb),ye=n=>Xp.test(n),Xs=n=>_o(n,ih),db=n=>_o(n,ah),nh=n=>_o(n,rh),fb=n=>_o(n,sh),pb=n=>_o(n,oh),Pa=n=>_o(n,ch,!0),hb=n=>_o(n,lh,!0),Lr=(n,e,o)=>{const s=Qp.exec(n);return s?s[1]?e(s[1]):o(s[2]):!1},_o=(n,e,o=!1)=>{const s=Xp.exec(n);return s?s[1]?e(s[1]):o:!1},rh=n=>n==="position"||n==="percentage",oh=n=>n==="image"||n==="url",sh=n=>n==="length"||n==="size"||n==="bg-size",ih=n=>n==="length",mb=n=>n==="number",ah=n=>n==="family-name",lh=n=>n==="number"||n==="weight",ch=n=>n==="shadow",gb=Z0(()=>{const n=bt("color"),e=bt("font"),o=bt("text"),s=bt("font-weight"),i=bt("tracking"),l=bt("leading"),u=bt("breakpoint"),d=bt("container"),h=bt("spacing"),m=bt("radius"),y=bt("shadow"),v=bt("inset-shadow"),x=bt("text-shadow"),b=bt("drop-shadow"),S=bt("blur"),C=bt("perspective"),k=bt("aspect"),N=bt("ease"),D=bt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...R(),ye,ge],j=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],I=()=>[ye,ge,h],K=()=>[jr,"full","auto",...I()],ae=()=>[Vn,"none","subgrid",ye,ge],be=()=>["auto",{span:["full",Vn,ye,ge]},Vn,ye,ge],le=()=>[Vn,"auto",ye,ge],ce=()=>["auto","min","max","fr",ye,ge],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Se=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...I()],ne=()=>[jr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],U=()=>[jr,"screen","full","dvw","lvw","svw","min","max","fit",...I()],Q=()=>[jr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],M=()=>[n,ye,ge],T=()=>[...R(),nh,th,{position:[ye,ge]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",fb,ab,{size:[ye,ge]}],Z=()=>[Xc,Xs,Eo],H=()=>["","none","full",m,ye,ge],re=()=>["",Fe,Xs,Eo],de=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Fe,Xc,nh,th],Oe=()=>["","none",S,ye,ge],Ue=()=>["none",Fe,ye,ge],je=()=>["none",Fe,ye,ge],We=()=>[Fe,ye,ge],xt=()=>[jr,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[cr],breakpoint:[cr],color:[Jp],container:[cr],"drop-shadow":[cr],ease:["in","out","in-out"],font:[sb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[cr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[cr],shadow:[cr],spacing:["px",Fe],text:[cr],"text-shadow":[cr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jr,ge,ye,k]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,ge]}],"container-named":[ib],columns:[{columns:[Fe,ge,ye,d]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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"],sr:["sr-only","not-sr-only"],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:L()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Vn,"auto",ye,ge]}],basis:[{basis:[jr,"full","auto",d,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,jr,"auto","initial","none",ge]}],grow:[{grow:["",Fe,ye,ge]}],shrink:[{shrink:["",Fe,ye,ge]}],order:[{order:[Vn,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...Se(),"normal"]}],"justify-self":[{"justify-self":["auto",...Se()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...Se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...Se(),"baseline"]}],"place-self":[{"place-self":["auto",...Se()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[d,"screen",...ne()]}],"min-w":[{"min-w":[d,"screen","none",...ne()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",o,Xs,Eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,hb,lb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xc,ge]}],"font-family":[{font:[db,cb,e]}],"font-features":[{"font-features":[ge]}],"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-fractions"],tracking:[{tracking:[i,ye,ge]}],"line-clamp":[{"line-clamp":[Fe,"none",ye,eh]}],leading:[{leading:[l,...I()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",ye,Eo]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Fe,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"tab-size":[{tab:[Vn,ye,ge]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Vn,ye,ge],radial:["",ye,ge],conic:[Vn,ye,ge]},pb,ub]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,ye,ge]}],"outline-w":[{outline:["",Fe,Xs,Eo]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",y,Pa,_a]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",v,Pa,_a]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Fe,Eo]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",x,Pa,_a]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Fe,ye,ge]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:Oe()}],brightness:[{brightness:[Fe,ye,ge]}],contrast:[{contrast:[Fe,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",b,Pa,_a]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Fe,ye,ge]}],"hue-rotate":[{"hue-rotate":[Fe,ye,ge]}],invert:[{invert:["",Fe,ye,ge]}],saturate:[{saturate:[Fe,ye,ge]}],sepia:[{sepia:["",Fe,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",Fe,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,ye,ge]}],"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:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",ye,ge]}],ease:[{ease:["linear","initial",N,ye,ge]}],delay:[{delay:[Fe,ye,ge]}],animate:[{animate:["none",D,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ye,ge]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Ue()}],"rotate-x":[{"rotate-x":Ue()}],"rotate-y":[{"rotate-y":Ue()}],"rotate-z":[{"rotate-z":Ue()}],scale:[{scale:je()}],"scale-x":[{"scale-x":je()}],"scale-y":[{"scale-y":je()}],"scale-z":[{"scale-z":je()}],"scale-3d":["scale-3d"],skew:[{skew:We()}],"skew-x":[{"skew-x":We()}],"skew-y":[{"skew-y":We()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xt()}],"translate-x":[{"translate-x":xt()}],"translate-y":[{"translate-y":xt()}],"translate-z":[{"translate-z":xt()}],"translate-none":["translate-none"],zoom:[{zoom:[Vn,ye,ge]}],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ye,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",ye,ge]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Fe,Xs,Eo,eh]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function vb(n={}){const e=n.styleId??"xpert-shadcn-ui-theme-vars";if(typeof document>"u")return;n.density==="compact"?document.documentElement.dataset.xuiDensity="compact":n.density==="default"&&delete document.documentElement.dataset.xuiDensity;let o=document.getElementById(e);o||(o=document.createElement("style"),o.id=e,document.head.appendChild(o)),o.textContent=`
|
|
9
9
|
:root {
|
|
10
10
|
--background: var(--xui-color-background, #ffffff);
|
|
11
11
|
--foreground: var(--xui-color-foreground, #18181b);
|
|
@@ -60,16 +60,16 @@ Error generating stack: `+g.message+`
|
|
|
60
60
|
--border: var(--xui-color-border, #27272a);
|
|
61
61
|
--input: var(--xui-color-input, var(--border));
|
|
62
62
|
}
|
|
63
|
-
`}const Yp=(...n)=>n.filter((e,o,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===o).join(" ").trim();const B0=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const H0=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,s)=>s?s.toUpperCase():o.toLowerCase());const Qp=n=>{const e=H0(n);return e.charAt(0).toUpperCase()+e.slice(1)};var Wc={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"};const W0=n=>{for(const e in n)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},K0=f.createContext({}),Z0=()=>f.useContext(K0),G0=f.forwardRef(({color:n,size:e,strokeWidth:o,absoluteStrokeWidth:s,className:a="",children:l,iconNode:u,...d},h)=>{const{size:m=24,strokeWidth:v=2,absoluteStrokeWidth:y=!1,color:w="currentColor",className:b=""}=Z0()??{},S=s??y?Number(o??v)*24/Number(e??m):o??v;return f.createElement("svg",{ref:h,...Wc,width:e??m??Wc.width,height:e??m??Wc.height,stroke:n??w,strokeWidth:S,className:Yp("lucide",b,a),...!l&&!W0(d)&&{"aria-hidden":"true"},...d},[...u.map(([C,k])=>f.createElement(C,k)),...Array.isArray(l)?l:[l]])});const zt=(n,e)=>{const o=f.forwardRef(({className:s,...a},l)=>f.createElement(G0,{ref:l,iconNode:e,className:Yp(`lucide-${B0(Qp(n))}`,`lucide-${n}`,s),...a}));return o.displayName=Qp(n),o};const Ys=zt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const q0=zt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Kc=zt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ya=zt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Xp=zt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Jp=zt("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const Y0=zt("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Q0=zt("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);const eh=zt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Zc=zt("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const th=zt("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const X0=zt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const J0=zt("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const eb=zt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const tb=zt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Gc={exports:{}},Qs={};var nh;function nb(){if(nh)return Qs;nh=1;var n=Rc(),e=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(d,h,m){var v,y={},w=null,b=null;m!==void 0&&(w=""+m),h.key!==void 0&&(w=""+h.key),h.ref!==void 0&&(b=h.ref);for(v in h)s.call(h,v)&&!l.hasOwnProperty(v)&&(y[v]=h[v]);if(d&&d.defaultProps)for(v in h=d.defaultProps,h)y[v]===void 0&&(y[v]=h[v]);return{$$typeof:e,type:d,key:w,ref:b,props:y,_owner:a.current}}return Qs.Fragment=o,Qs.jsx=u,Qs.jsxs=u,Qs}var rh;function rb(){return rh||(rh=1,Gc.exports=nb()),Gc.exports}var _=rb(),Xs=pp(),ob=Object.defineProperty,qc=(n,e)=>ob(n,"name",{value:e,configurable:!0});function Yc(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}qc(Yc,"setRef");function Co(...n){return e=>{let o=!1;const s=n.map(a=>{const l=Yc(a,e);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let a=0;a<s.length;a++){const l=s[a];typeof l=="function"?l():Yc(n[a],null)}}}}qc(Co,"composeRefs");function Ve(...n){return f.useCallback(Co(...n),n)}qc(Ve,"useComposedRefs");var sb=Object.defineProperty,yn=(n,e)=>sb(n,"name",{value:e,configurable:!0});function xn(n){const e=f.forwardRef((o,s)=>{let{children:a,...l}=o,u=null,d=!1;const h=[];Qc(a)&&typeof xa=="function"&&(a=xa(a._payload)),f.Children.forEach(a,w=>{if(lh(w)){d=!0;const b=w;let S="child"in b.props?b.props.child:b.props.children;Qc(S)&&typeof xa=="function"&&(S=xa(S._payload)),u=ab(b,S),h.push(u?.props?.children)}else h.push(w)}),u?u=f.cloneElement(u,void 0,h):!d&&f.Children.count(a)===1&&f.isValidElement(a)&&(u=a);const m=u?ah(u):void 0,v=Ve(s,m);if(!u){if(a||a===0)throw new Error(d?ub(n):cb(n));return a}const y=ih(l,u.props??{});return u.type!==f.Fragment&&(y.ref=s?v:m),f.cloneElement(u,y)});return e.displayName=`${n}.Slot`,e}yn(xn,"createSlot");var oh=xn("Slot"),sh=Symbol.for("radix.slottable");function ib(n){const e=yn(o=>"child"in o?o.children(o.child):o.children,"Slottable");return e.displayName=`${n}.Slottable`,e.__radixId=sh,e}yn(ib,"createSlottable");var ab=yn((n,e)=>{if("child"in n.props){const o=n.props.child;return f.isValidElement(o)?f.cloneElement(o,void 0,n.props.children(o.props.children)):null}return f.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function ih(n,e){const o={...e};for(const s in e){const a=n[s],l=e[s];/^on[A-Z]/.test(s)?a&&l?o[s]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(o[s]=a):s==="style"?o[s]={...a,...l}:s==="className"&&(o[s]=[a,l].filter(Boolean).join(" "))}return{...n,...o}}yn(ih,"mergeProps");function ah(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning;return o?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}yn(ah,"getElementRef");function lh(n){return f.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===sh}yn(lh,"isSlottable");var lb=Symbol.for("react.lazy");function Qc(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===lb&&"_payload"in n&&ch(n._payload)}yn(Qc,"isLazyComponent");function ch(n){return typeof n=="object"&&n!==null&&"then"in n}yn(ch,"isPromiseLike");var cb=yn(n=>`${n} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ub=yn(n=>`${n} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),xa=Qo[" use ".trim().toString()],db=Object.defineProperty,fb=(n,e)=>db(n,"name",{value:e,configurable:!0}),pb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ze=pb.reduce((n,e)=>{const o=xn(`Primitive.${e}`),s=f.forwardRef((a,l)=>{const{asChild:u,...d}=a,h=u?o:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${e}`,{...n,[e]:s}},{});function Xc(n,e){n&&Xs.flushSync(()=>n.dispatchEvent(e))}fb(Xc,"dispatchDiscreteCustomEvent");var hb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),mb=Object.defineProperty,cn=(n,e)=>mb(n,"name",{value:e,configurable:!0});function gb(n,e){const o=f.createContext(e);o.displayName=n+"Context";const s=cn(l=>{const{children:u,...d}=l,h=f.useMemo(()=>d,Object.values(d));return _.jsx(o.Provider,{value:h,children:u})},"Provider");s.displayName=n+"Provider";function a(l,u={}){const{optional:d=!1}=u,h=f.useContext(o);if(h)return h;if(e!==void 0)return e;if(!d)throw new Error(`\`${l}\` must be used within \`${n}\``)}return cn(a,"useContext"),[s,a]}cn(gb,"createContext");function wn(n,e=[]){let o=[];function s(l,u){const d=f.createContext(u);d.displayName=l+"Context";const h=o.length;o=[...o,u];const m=cn(y=>{const{scope:w,children:b,...S}=y,C=w?.[n]?.[h]||d,k=f.useMemo(()=>S,Object.values(S));return _.jsx(C.Provider,{value:k,children:b})},"Provider");m.displayName=l+"Provider";function v(y,w,b={}){const{optional:S=!1}=b,C=w?.[n]?.[h]||d,k=f.useContext(C);if(k)return k;if(u!==void 0)return u;if(!S)throw new Error(`\`${y}\` must be used within \`${l}\``)}return cn(v,"useContext"),[m,v]}cn(s,"createContext");const a=cn(()=>{const l=o.map(u=>f.createContext(u));return cn(function(d){const h=d?.[n]||l;return f.useMemo(()=>({[`__scope${n}`]:{...d,[n]:h}}),[d,h])},"useScope")},"createScope");return a.scopeName=n,[s,uh(a,...e)]}cn(wn,"createContextScope");function uh(...n){const e=n[0];if(n.length===1)return e;const o=cn(()=>{const s=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return cn(function(l){const u=s.reduce((d,{useScope:h,scopeName:m})=>{const y=h(l)[`__scope${m}`];return{...d,...y}},{});return f.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return o.scopeName=e.scopeName,o}cn(uh,"composeContextScopes");var vb=Object.defineProperty,kt=(n,e)=>vb(n,"name",{value:e,configurable:!0});function wa(n){const e=n+"CollectionProvider",[o,s]=wn(e),[a,l]=o(e,{collectionRef:{current:null},itemMap:new Map}),u=kt(C=>{const{scope:k,children:A}=C,N=f.useRef(null),O=f.useRef(new Map).current;return _.jsx(a,{scope:k,itemMap:O,collectionRef:N,children:A})},"CollectionProvider");u.displayName=e;const d=n+"CollectionSlot",h=xn(d),m=f.forwardRef((C,k)=>{const{scope:A,children:N}=C,O=l(d,A),T=Ve(k,O.collectionRef);return _.jsx(h,{ref:T,children:N})});m.displayName=d;const v=n+"CollectionItemSlot",y="data-radix-collection-item",w=xn(v),b=f.forwardRef((C,k)=>{const{scope:A,children:N,...O}=C,T=f.useRef(null),z=Ve(k,T),R=l(v,A);return f.useEffect(()=>(R.itemMap.set(T,{ref:T,...O}),()=>{R.itemMap.delete(T)})),_.jsx(w,{[y]:"",ref:z,children:N})});b.displayName=v;function S(C){const k=l(n+"CollectionConsumer",C);return f.useCallback(()=>{const N=k.collectionRef.current;if(!N)return[];const O=Array.from(N.querySelectorAll(`[${y}]`));return Array.from(k.itemMap.values()).sort((R,B)=>O.indexOf(R.ref.current)-O.indexOf(B.ref.current))},[k.collectionRef,k.itemMap])}return kt(S,"useCollection"),[{Provider:u,Slot:m,ItemSlot:b},S,s]}kt(wa,"createCollection");var dh=new WeakMap,Jc=class vo extends Map{static{kt(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],dh.set(this,!0)}set(e,o){return dh.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,o),this}insert(e,o,s){const a=this.has(o),l=this.#e.length,u=eu(e);let d=u>=0?u:l+u;const h=d<0||d>=l?-1:d;if(h===this.size||a&&h===this.size-1||h===-1)return this.set(o,s),this;const m=this.size+(a?0:1);u<0&&d++;const v=[...this.#e];let y,w=!1;for(let b=d;b<m;b++)if(d===b){let S=v[b];v[b]===o&&(S=v[b+1]),a&&this.delete(o),y=this.get(S),this.set(o,s)}else{!w&&v[b-1]===o&&(w=!0);const S=v[w?b:b-1],C=y;y=this.get(S),this.delete(S),this.set(S,C)}return this}with(e,o,s){const a=new vo(this);return a.insert(e,o,s),a}before(e){const o=this.#e.indexOf(e)-1;if(!(o<0))return this.entryAt(o)}setBefore(e,o,s){const a=this.#e.indexOf(e);return a===-1?this:this.insert(a,o,s)}after(e){let o=this.#e.indexOf(e);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(e,o,s){const a=this.#e.indexOf(e);return a===-1?this:this.insert(a+1,o,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){const o=super.delete(e);return o&&this.#e.splice(this.#e.indexOf(e),1),o}deleteAt(e){const o=this.keyAt(e);return o!==void 0?this.delete(o):!1}at(e){const o=ba(this.#e,e);if(o!==void 0)return this.get(o)}entryAt(e){const o=ba(this.#e,e);if(o!==void 0)return[o,this.get(o)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return ba(this.#e,e)}from(e,o){const s=this.indexOf(e);if(s===-1)return;let a=s+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(e,o){const s=this.indexOf(e);if(s===-1)return;let a=s+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(e,o){let s=0;for(const a of this){if(Reflect.apply(e,o,[a,s,this]))return a;s++}}findIndex(e,o){let s=0;for(const a of this){if(Reflect.apply(e,o,[a,s,this]))return s;s++}return-1}filter(e,o){const s=[];let a=0;for(const l of this)Reflect.apply(e,o,[l,a,this])&&s.push(l),a++;return new vo(s)}map(e,o){const s=[];let a=0;for(const l of this)s.push([l[0],Reflect.apply(e,o,[l,a,this])]),a++;return new vo(s)}reduce(...e){const[o,s]=e;let a=0,l=s??this.at(0);for(const u of this)a===0&&e.length===1?l=u:l=Reflect.apply(o,this,[l,u,a,this]),a++;return l}reduceRight(...e){const[o,s]=e;let a=s??this.at(-1);for(let l=this.size-1;l>=0;l--){const u=this.at(l);l===this.size-1&&e.length===1?a=u:a=Reflect.apply(o,this,[a,u,l,this])}return a}toSorted(e){const o=[...this.entries()].sort(e);return new vo(o)}toReversed(){const e=new vo;for(let o=this.size-1;o>=0;o--){const s=this.keyAt(o),a=this.get(s);e.set(s,a)}return e}toSpliced(...e){const o=[...this.entries()];return o.splice(...e),new vo(o)}slice(e,o){const s=new vo;let a=this.size-1;if(e===void 0)return s;e<0&&(e=e+this.size),o!==void 0&&o>0&&(a=o-1);for(let l=e;l<=a;l++){const u=this.keyAt(l),d=this.get(u);s.set(u,d)}return s}every(e,o){let s=0;for(const a of this){if(!Reflect.apply(e,o,[a,s,this]))return!1;s++}return!0}some(e,o){let s=0;for(const a of this){if(Reflect.apply(e,o,[a,s,this]))return!0;s++}return!1}};function ba(n,e){if("at"in Array.prototype)return Array.prototype.at.call(n,e);const o=fh(n,e);return o===-1?void 0:n[o]}kt(ba,"at");function fh(n,e){const o=n.length,s=eu(e),a=s>=0?s:o+s;return a<0||a>=o?-1:a}kt(fh,"toSafeIndex");function eu(n){return n!==n||n===0?0:Math.trunc(n)}kt(eu,"toSafeInteger");function yb(n){const e=n+"CollectionProvider",[o,s]=wn(e),[a,l]=o(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Jc,setItemMap:kt(()=>{},"setItemMap")}),u=kt(({state:O,...T})=>O?_.jsx(h,{...T,state:O}):_.jsx(d,{...T}),"CollectionProvider");u.displayName=e;const d=kt(O=>{const T=k();return _.jsx(h,{...O,state:T})},"CollectionInit");d.displayName=e+"Init";const h=kt(O=>{const{scope:T,children:z,state:R}=O,B=f.useRef(null),[L,Z]=f.useState(null),ae=Ve(B,Z),[be,ue]=R;return f.useEffect(()=>{if(!L)return;const ce=mh(()=>{});return ce.observe(L,{childList:!0,subtree:!0}),()=>{ce.disconnect()}},[L]),_.jsx(a,{scope:T,itemMap:be,setItemMap:ue,collectionRef:ae,collectionRefObject:B,collectionElement:L,children:z})},"CollectionProviderImpl");h.displayName=e+"Impl";const m=n+"CollectionSlot",v=xn(m),y=f.forwardRef((O,T)=>{const{scope:z,children:R}=O,B=l(m,z),L=Ve(T,B.collectionRef);return _.jsx(v,{ref:L,children:R})});y.displayName=m;const w=n+"CollectionItemSlot",b="data-radix-collection-item",S=xn(w),C=f.forwardRef((O,T)=>{const{scope:z,children:R,...B}=O,L=f.useRef(null),[Z,ae]=f.useState(null),be=Ve(T,L,ae),ue=l(w,z),{setItemMap:ce}=ue,Y=f.useRef(B);ph(Y.current,B)||(Y.current=B);const xe=Y.current;return f.useEffect(()=>{const le=xe;return ce(te=>Z?te.has(Z)?te.set(Z,{...le,element:Z}).toSorted(tu):(te.set(Z,{...le,element:Z}),te.toSorted(tu)):te),()=>{ce(te=>!Z||!te.has(Z)?te:(te.delete(Z),new Jc(te)))}},[Z,xe,ce]),_.jsx(S,{[b]:"",ref:be,children:R})});C.displayName=w;function k(){return f.useState(new Jc)}kt(k,"useInitCollection");function A(O){const{itemMap:T}=l(n+"CollectionConsumer",O);return T}return kt(A,"useCollection"),[{Provider:u,Slot:y,ItemSlot:C},{createCollectionScope:s,useCollection:A,useInitCollection:k}]}kt(yb,"createCollection");function ph(n,e){if(n===e)return!0;if(typeof n!="object"||typeof e!="object"||n==null||e==null)return!1;const o=Object.keys(n),s=Object.keys(e);if(o.length!==s.length)return!1;for(const a of o)if(!Object.prototype.hasOwnProperty.call(e,a)||n[a]!==e[a])return!1;return!0}kt(ph,"shallowEqual");function hh(n,e){return!!(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING)}kt(hh,"isElementPreceding");function tu(n,e){return!n[1].element||!e[1].element?0:hh(n[1].element,e[1].element)?-1:1}kt(tu,"sortByDocumentPosition");function mh(n){return new MutationObserver(o=>{for(const s of o)if(s.type==="childList"){n();return}})}kt(mh,"getChildListObserver");var xb=Object.defineProperty,ts=(n,e)=>xb(n,"name",{value:e,configurable:!0}),gh=!!(typeof window<"u"&&window.document&&window.document.createElement);function ke(n,e,{checkForDefaultPrevented:o=!0}={}){return ts(function(a){if(n?.(a),o===!1||!a||!a.defaultPrevented)return e?.(a)},"handleEvent")}ts(ke,"composeEventHandlers");function wb(n){if(!gh)throw new Error("Cannot access window outside of the DOM");return n?.ownerDocument?.defaultView??window}ts(wb,"getOwnerWindow");function nu(n){if(!gh)throw new Error("Cannot access document outside of the DOM");return n?.ownerDocument??document}ts(nu,"getOwnerDocument");function vh(n,e=!1){const{activeElement:o}=nu(n);if(!o?.nodeName)return null;if(yh(o)&&o.contentDocument)return vh(o.contentDocument.body,e);if(e){const s=o.getAttribute("aria-activedescendant");if(s){const a=nu(o).getElementById(s);if(a)return a}}return o}ts(vh,"getActiveElement");function yh(n){return n.tagName==="IFRAME"}ts(yh,"isFrame");var ht=globalThis?.document?f.useLayoutEffect:()=>{},bb=Object.defineProperty,Sb=(n,e)=>bb(n,"name",{value:e,configurable:!0}),xh=Qo[" useEffectEvent ".trim().toString()],wh=Qo[" useInsertionEffect ".trim().toString()];function bh(n){if(typeof xh=="function")return xh(n);const e=f.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof wh=="function"?wh(()=>{e.current=n}):ht(()=>{e.current=n}),f.useMemo(()=>((...o)=>e.current?.(...o)),[])}Sb(bh,"useEffectEvent");var kb=Object.defineProperty,Js=(n,e)=>kb(n,"name",{value:e,configurable:!0}),Cb=Qo[" useInsertionEffect ".trim().toString()]||ht;function Ar({prop:n,defaultProp:e,onChange:o=Js(()=>{},"onChange"),caller:s}){const[a,l,u]=Sh({defaultProp:e,onChange:o}),d=n!==void 0,h=d?n:a,m=f.useCallback(v=>{if(d){const y=kh(v)?v(n):v;y!==n&&u.current?.(y)}else l(v)},[d,n,l,u]);return[h,m]}Js(Ar,"useControllableState");function Sh({defaultProp:n,onChange:e}){const[o,s]=f.useState(n),a=f.useRef(o),l=f.useRef(e);return Cb(()=>{l.current=e},[e]),f.useEffect(()=>{a.current!==o&&(l.current?.(o),a.current=o)},[o,a]),[o,s,l]}Js(Sh,"useUncontrolledState");function kh(n){return typeof n=="function"}Js(kh,"isFunction");var Ch=Symbol("RADIX:SYNC_STATE");function _b(n,e,o,s){const{prop:a,defaultProp:l,onChange:u,caller:d}=e,h=a!==void 0,m=bh(u),v=[{...o,state:l}];s&&v.push(s);const[y,w]=f.useReducer((k,A)=>{if(A.type===Ch)return{...k,state:A.state};const N=n(k,A);return h&&!Object.is(N.state,k.state)&&m(N.state),N},...v),b=y.state,S=f.useRef(b);f.useEffect(()=>{S.current!==b&&(S.current=b,h||m(b))},[b,S,h]);const C=f.useMemo(()=>a!==void 0?{...y,state:a}:y,[y,a]);return f.useEffect(()=>{h&&!Object.is(a,y.state)&&w({type:Ch,state:a})},[a,y.state,h]),[C,w]}Js(_b,"useControllableStateReducer");var Eb=Object.defineProperty,sr=(n,e)=>Eb(n,"name",{value:e,configurable:!0});function _h(n,e){return f.useReducer((o,s)=>e[o][s]??o,n)}sr(_h,"useStateMachine");var Ln=sr(n=>{const{present:e,children:o}=n,s=Eh(e),a=typeof o=="function"?o({present:s.isPresent}):f.Children.only(o),l=Ph(s.ref,Rh(a));return typeof o=="function"||s.isPresent?f.cloneElement(a,{ref:l}):null},"Presence");function Eh(n){const[e,o]=f.useState(),s=f.useRef(null),a=f.useRef(n),l=f.useRef("none"),u=f.useRef(void 0),d=n?"mounted":"unmounted",[h,m]=_h(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{h==="mounted"?(l.current=u.current??ns(s.current),u.current=void 0):l.current="none"},[h]),ht(()=>{const v=s.current,y=a.current;if(y!==n){const b=l.current,S=ns(v);n?(u.current=S,m("MOUNT")):S==="none"||v?.display==="none"?m("UNMOUNT"):m(y&&b!==S?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,m]),ht(()=>{if(e){let v;const y=e.ownerDocument.defaultView??window,w=sr(S=>{const k=ns(s.current).includes(CSS.escape(S.animationName));if(S.target===e&&k&&(m("ANIMATION_END"),!a.current)){const A=e.style.animationFillMode;e.style.animationFillMode="forwards",v=y.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=A)})}},"handleAnimationEnd"),b=sr(S=>{S.target===e&&(l.current=ns(s.current))},"handleAnimationStart");return e.addEventListener("animationstart",b),e.addEventListener("animationcancel",w),e.addEventListener("animationend",w),()=>{y.clearTimeout(v),e.removeEventListener("animationstart",b),e.removeEventListener("animationcancel",w),e.removeEventListener("animationend",w)}}else m("ANIMATION_END")},[e,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:f.useCallback(v=>{if(v){const y=getComputedStyle(v);s.current=y,u.current=ns(y)}else s.current=null;o(v)},[])}}sr(Eh,"usePresence");function ru(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}sr(ru,"setRef");function Ph(...n){const e=f.useRef(n);return e.current=n,f.useCallback(o=>{const s=e.current;let a=!1;const l=s.map(u=>{const d=ru(u,o);return!a&&typeof d=="function"&&(a=!0),d});if(a)return()=>{for(let u=0;u<l.length;u++){const d=l[u];typeof d=="function"?d():ru(s[u],null)}}},[])}sr(Ph,"useStableComposedRefs");function ns(n){return n?.animationName||"none"}sr(ns,"getAnimationName");function Rh(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning;return o?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}sr(Rh,"getElementRef");var Pb=Object.defineProperty,Rb=(n,e)=>Pb(n,"name",{value:e,configurable:!0}),Ib=Qo[" useId ".trim().toString()]||(()=>{}),Db=0;function Ct(n){const[e,o]=f.useState(Ib());return ht(()=>{n||o(s=>s??String(Db++))},[n]),n||(e?`radix-${e}`:"")}Rb(Ct,"useId");var Nb=Object.defineProperty,Ob=(n,e)=>Nb(n,"name",{value:e,configurable:!0}),Tb=f.createContext(void 0);function Sa(n){const e=f.useContext(Tb);return n||e||"ltr"}Ob(Sa,"useDirection");var Ab=Object.defineProperty,$b=(n,e)=>Ab(n,"name",{value:e,configurable:!0});function Kt(n){const e=f.useRef(n);return f.useEffect(()=>{e.current=n}),f.useMemo(()=>((...o)=>e.current?.(...o)),[])}$b(Kt,"useCallbackRef");var Mb=Object.defineProperty,_t=(n,e)=>Mb(n,"name",{value:e,configurable:!0}),ou="dismissableLayer.update",jb="dismissableLayer.pointerDownOutside",Lb="dismissableLayer.focusOutside",Ih,Dh=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ka=f.forwardRef(_t(function(e,o){const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:m,...v}=e,y=f.useContext(Dh),[w,b]=f.useState(null),S=w?.ownerDocument??globalThis?.document,[,C]=f.useState({}),k=Ve(o,b),A=Array.from(y.layers),[N]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),O=N?A.indexOf(N):-1,T=w?A.indexOf(w):-1,z=y.layersWithOutsidePointerEventsDisabled.size>0,R=T>=O,B=f.useRef(!1),L=Oh(ue=>{u?.(ue),h?.(ue),ue.defaultPrevented||m?.()},{ownerDocument:S,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:B,dismissableSurfaces:y.dismissableSurfaces,shouldHandlePointerDownOutside:f.useCallback(ue=>{if(!(ue instanceof Node))return!1;const ce=[...y.branches].some(Y=>Y.contains(ue));return R&&!ce},[y.branches,R])}),Z=Th(ue=>{if(a&&B.current)return;const ce=ue.target;[...y.branches].some(xe=>xe.contains(ce))||(d?.(ue),h?.(ue),ue.defaultPrevented||m?.())},S),ae=w?T===A.length-1:!1,be=Kt(ue=>{ue.key==="Escape"&&(l?.(ue),!ue.defaultPrevented&&m&&(ue.preventDefault(),m()))});return f.useEffect(()=>{if(ae)return S.addEventListener("keydown",be,{capture:!0}),()=>S.removeEventListener("keydown",be,{capture:!0})},[S,ae,be]),f.useEffect(()=>{if(w)return s&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(Ih=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(w)),y.layers.add(w),su(),()=>{s&&(y.layersWithOutsidePointerEventsDisabled.delete(w),y.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Ih))}},[w,S,s,y]),f.useEffect(()=>()=>{w&&(y.layers.delete(w),y.layersWithOutsidePointerEventsDisabled.delete(w),su())},[w,y]),f.useEffect(()=>{const ue=_t(()=>C({}),"handleUpdate");return document.addEventListener(ou,ue),()=>document.removeEventListener(ou,ue)},[]),_.jsx(ze.div,{...v,ref:k,style:{pointerEvents:z?R?"auto":"none":void 0,...e.style},onFocusCapture:ke(e.onFocusCapture,Z.onFocusCapture),onBlurCapture:ke(e.onBlurCapture,Z.onBlurCapture),onPointerDownCapture:ke(e.onPointerDownCapture,L.onPointerDownCapture)})},"DismissableLayer"));function Nh(){const n=f.useContext(Dh),[e,o]=f.useState(null);return f.useEffect(()=>{if(e)return n.dismissableSurfaces.add(e),()=>{n.dismissableSurfaces.delete(e)}},[e,n.dismissableSurfaces]),o}_t(Nh,"useDismissableLayerSurface");var zb=_t(()=>!0,"IS_TRUE");function Oh(n,e){const{ownerDocument:o=globalThis?.document,deferPointerDownOutside:s=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:l,shouldHandlePointerDownOutside:u=zb}=e,d=Kt(n),h=f.useRef(!1),m=f.useRef(!1),v=f.useRef(new Map),y=f.useRef(()=>{});return f.useEffect(()=>{function w(){m.current=!1,a.current=!1,v.current.clear()}_t(w,"resetOutsideInteraction");function b(){return Array.from(v.current.values()).some(Boolean)}_t(b,"isOutsideInteractionIntercepted");function S(O){if(!m.current)return;const T=O.target;T instanceof Node&&[...l].some(R=>R.contains(T))||v.current.set(O.type,!0),O.type==="click"&&window.setTimeout(()=>{m.current&&y.current()},0)}_t(S,"handleInteractionCapture");function C(O){m.current&&v.current.set(O.type,!1)}_t(C,"handleInteractionBubble");const k=_t(O=>{if(O.target&&!h.current){let T=function(){o.removeEventListener("click",y.current);const R=b();w(),R||iu(jb,d,z,{discrete:!0})};if(_t(T,"handleAndDispatchPointerDownOutsideEvent"),!u(O.target)){o.removeEventListener("click",y.current),w(),h.current=!1;return}const z={originalEvent:O};m.current=!0,a.current=s&&O.button===0,v.current.clear(),!s||O.button!==0?T():(o.removeEventListener("click",y.current),y.current=T,o.addEventListener("click",y.current,{once:!0}))}else o.removeEventListener("click",y.current),w();h.current=!1},"handlePointerDown"),A=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const O of A)o.addEventListener(O,S,!0),o.addEventListener(O,C);const N=window.setTimeout(()=>{o.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(N),o.removeEventListener("pointerdown",k),o.removeEventListener("click",y.current);for(const O of A)o.removeEventListener(O,S,!0),o.removeEventListener(O,C)}},[o,d,s,a,l,u]),{onPointerDownCapture:_t(()=>h.current=!0,"onPointerDownCapture")}}_t(Oh,"usePointerDownOutside");function Th(n,e=globalThis?.document){const o=Kt(n),s=f.useRef(!1);return f.useEffect(()=>{const a=_t(l=>{l.target&&!s.current&&iu(Lb,o,{originalEvent:l},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,o]),{onFocusCapture:_t(()=>s.current=!0,"onFocusCapture"),onBlurCapture:_t(()=>s.current=!1,"onBlurCapture")}}_t(Th,"useFocusOutside");function su(){const n=new CustomEvent(ou);document.dispatchEvent(n)}_t(su,"dispatchUpdate");function iu(n,e,o,{discrete:s}){const a=o.originalEvent.target,l=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});e&&a.addEventListener(n,e,{once:!0}),s?Xc(a,l):a.dispatchEvent(l)}_t(iu,"handleAndDispatchCustomEvent");var Fb=Object.defineProperty,Ft=(n,e)=>Fb(n,"name",{value:e,configurable:!0}),au="focusScope.autoFocusOnMount",lu="focusScope.autoFocusOnUnmount",Ah={bubbles:!1,cancelable:!0},Ca=f.forwardRef(Ft(function(e,o){const{loop:s=!1,trapped:a=!1,onMountAutoFocus:l,onUnmountAutoFocus:u,...d}=e,[h,m]=f.useState(null),v=Kt(l),y=Kt(u),w=f.useRef(null),b=Ve(o,m),S=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(a){let k=function(T){if(S.paused||!h)return;const z=T.target;h.contains(z)?w.current=z:ir(w.current,{select:!0})},A=function(T){if(S.paused||!h)return;const z=T.relatedTarget;z!==null&&(h.contains(z)||ir(w.current,{select:!0}))},N=function(T){if(document.activeElement===document.body)for(const R of T)R.removedNodes.length>0&&ir(h)};Ft(k,"handleFocusIn"),Ft(A,"handleFocusOut"),Ft(N,"handleMutations"),document.addEventListener("focusin",k),document.addEventListener("focusout",A);const O=new MutationObserver(N);return h&&O.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",A),O.disconnect()}}},[a,h,S.paused]),f.useEffect(()=>{if(h){zh.add(S);const k=document.activeElement;if(!h.contains(k)){const N=new CustomEvent(au,Ah);h.addEventListener(au,v),h.dispatchEvent(N),N.defaultPrevented||($h(Vh(cu(h)),{select:!0}),document.activeElement===k&&ir(h))}return()=>{h.removeEventListener(au,v),setTimeout(()=>{const N=new CustomEvent(lu,Ah);h.addEventListener(lu,y),h.dispatchEvent(N),N.defaultPrevented||ir(k??document.body,{select:!0}),h.removeEventListener(lu,y),zh.remove(S)},0)}}},[h,v,y,S]);const C=f.useCallback(k=>{if(!s&&!a||S.paused)return;const A=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,N=document.activeElement;if(A&&N){const O=k.currentTarget,[T,z]=Mh(O);T&&z?!k.shiftKey&&N===z?(k.preventDefault(),s&&ir(T,{select:!0})):k.shiftKey&&N===T&&(k.preventDefault(),s&&ir(z,{select:!0})):N===O&&k.preventDefault()}},[s,a,S.paused]);return _.jsx(ze.div,{tabIndex:-1,...d,ref:b,onKeyDown:C})},"FocusScope"));function $h(n,{select:e=!1}={}){const o=document.activeElement;for(const s of n)if(ir(s,{select:e}),document.activeElement!==o)return}Ft($h,"focusFirst");function Mh(n){const e=cu(n),o=uu(e,n),s=uu(e.reverse(),n);return[o,s]}Ft(Mh,"getTabbableEdges");function cu(n){const e=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:Ft(s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;o.nextNode();)e.push(o.currentNode);return e}Ft(cu,"getTabbableCandidates");function uu(n,e){const o=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const s of n)if(!(o?!s.checkVisibility({checkVisibilityCSS:!0}):jh(s,{upTo:e})))return s}Ft(uu,"findVisible");function jh(n,{upTo:e}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}Ft(jh,"isHidden");function Lh(n){return n instanceof HTMLInputElement&&"select"in n}Ft(Lh,"isSelectableInput");function ir(n,{select:e=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&Lh(n)&&e&&n.select()}}Ft(ir,"focus");var zh=Fh();function Fh(){let n=[];return{add(e){const o=n[0];e!==o&&o?.pause(),n=du(n,e),n.unshift(e)},remove(e){n=du(n,e),n[0]?.resume()}}}Ft(Fh,"createFocusScopesStack");function du(n,e){const o=[...n],s=o.indexOf(e);return s!==-1&&o.splice(s,1),o}Ft(du,"arrayRemove");function Vh(n){return n.filter(e=>e.tagName!=="A")}Ft(Vh,"removeLinks");var Vb=Object.defineProperty,Ub=(n,e)=>Vb(n,"name",{value:e,configurable:!0}),_a=f.forwardRef(Ub(function(e,o){const{container:s,...a}=e,[l,u]=f.useState(!1);ht(()=>u(!0),[]);const d=s||l&&globalThis?.document?.body;return d?Xs.createPortal(_.jsx(ze.div,{...a,ref:o}),d):null},"Portal")),Bb=Object.defineProperty,fu=(n,e)=>Bb(n,"name",{value:e,configurable:!0}),Ea=0,rs=null;function Hb(n){return os(),n.children}fu(Hb,"FocusGuards");function os(){f.useEffect(()=>{rs||(rs={start:pu(),end:pu()});const{start:n,end:e}=rs;return document.body.firstElementChild!==n&&document.body.insertAdjacentElement("afterbegin",n),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Ea++,()=>{Ea===1&&(rs?.start.remove(),rs?.end.remove(),rs=null),Ea=Math.max(0,Ea-1)}},[])}fu(os,"useFocusGuards");function pu(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}fu(pu,"createFocusGuard");var zn=function(){return zn=Object.assign||function(e){for(var o,s=1,a=arguments.length;s<a;s++){o=arguments[s];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(e[l]=o[l])}return e},zn.apply(this,arguments)};function Uh(n,e){var o={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(o[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(n);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(n,s[a])&&(o[s[a]]=n[s[a]]);return o}function Wb(n,e,o){if(o||arguments.length===2)for(var s=0,a=e.length,l;s<a;s++)(l||!(s in e))&&(l||(l=Array.prototype.slice.call(e,0,s)),l[s]=e[s]);return n.concat(l||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var Pa="right-scroll-bar-position",Ra="width-before-scroll-bar",Kb="with-scroll-bars-hidden",Zb="--removed-body-scroll-bar-size";function hu(n,e){return typeof n=="function"?n(e):n&&(n.current=e),n}function Gb(n,e){var o=f.useState(function(){return{value:n,callback:e,facade:{get current(){return o.value},set current(s){var a=o.value;a!==s&&(o.value=s,o.callback(s,a))}}}})[0];return o.callback=e,o.facade}var qb=typeof window<"u"?f.useLayoutEffect:f.useEffect,Bh=new WeakMap;function Yb(n,e){var o=Gb(null,function(s){return n.forEach(function(a){return hu(a,s)})});return qb(function(){var s=Bh.get(o);if(s){var a=new Set(s),l=new Set(n),u=o.current;a.forEach(function(d){l.has(d)||hu(d,null)}),l.forEach(function(d){a.has(d)||hu(d,u)})}Bh.set(o,n)},[n]),o}function Qb(n){return n}function Xb(n,e){e===void 0&&(e=Qb);var o=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(l){var u=e(l,s);return o.push(u),function(){o=o.filter(function(d){return d!==u})}},assignSyncMedium:function(l){for(s=!0;o.length;){var u=o;o=[],u.forEach(l)}o={push:function(d){return l(d)},filter:function(){return o}}},assignMedium:function(l){s=!0;var u=[];if(o.length){var d=o;o=[],d.forEach(l),u=o}var h=function(){var v=u;u=[],v.forEach(l)},m=function(){return Promise.resolve().then(h)};m(),o={push:function(v){u.push(v),m()},filter:function(v){return u=u.filter(v),o}}}};return a}function Jb(n){n===void 0&&(n={});var e=Xb(null);return e.options=zn({async:!0,ssr:!1},n),e}var Hh=function(n){var e=n.sideCar,o=Uh(n,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=e.read();if(!s)throw new Error("Sidecar medium not found");return f.createElement(s,zn({},o))};Hh.isSideCarExport=!0;function eS(n,e){return n.useMedium(e),Hh}var Wh=Jb(),mu=function(){},Ia=f.forwardRef(function(n,e){var o=f.useRef(null),s=f.useState({onScrollCapture:mu,onWheelCapture:mu,onTouchMoveCapture:mu}),a=s[0],l=s[1],u=n.forwardProps,d=n.children,h=n.className,m=n.removeScrollBar,v=n.enabled,y=n.shards,w=n.sideCar,b=n.noRelative,S=n.noIsolation,C=n.inert,k=n.allowPinchZoom,A=n.as,N=A===void 0?"div":A,O=n.gapMode,T=Uh(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=w,R=Yb([o,e]),B=zn(zn({},T),a);return f.createElement(f.Fragment,null,v&&f.createElement(z,{sideCar:Wh,removeScrollBar:m,shards:y,noRelative:b,noIsolation:S,inert:C,setCallbacks:l,allowPinchZoom:!!k,lockRef:o,gapMode:O}),u?f.cloneElement(f.Children.only(d),zn(zn({},B),{ref:R})):f.createElement(N,zn({},B,{className:h,ref:R}),d))});Ia.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ia.classNames={fullWidth:Ra,zeroRight:Pa};var tS=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nS(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var e=tS();return e&&n.setAttribute("nonce",e),n}function rS(n,e){n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}function oS(n){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(n)}var sS=function(){var n=0,e=null;return{add:function(o){n==0&&(e=nS())&&(rS(e,o),oS(e)),n++},remove:function(){n--,!n&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},iS=function(){var n=sS();return function(e,o){f.useEffect(function(){return n.add(e),function(){n.remove()}},[e&&o])}},Kh=function(){var n=iS(),e=function(o){var s=o.styles,a=o.dynamic;return n(s,a),null};return e},aS={left:0,top:0,right:0,gap:0},gu=function(n){return parseInt(n||"",10)||0},lS=function(n){var e=window.getComputedStyle(document.body),o=e[n==="padding"?"paddingLeft":"marginLeft"],s=e[n==="padding"?"paddingTop":"marginTop"],a=e[n==="padding"?"paddingRight":"marginRight"];return[gu(o),gu(s),gu(a)]},cS=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return aS;var e=lS(n),o=document.documentElement.clientWidth,s=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,s-o+e[2]-e[0])}},uS=Kh(),ss="data-scroll-locked",dS=function(n,e,o,s){var a=n.left,l=n.top,u=n.right,d=n.gap;return o===void 0&&(o="margin"),`
|
|
64
|
-
.`.concat(
|
|
63
|
+
`}const uh=(...n)=>n.filter((e,o,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===o).join(" ").trim();const yb=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const xb=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,s)=>s?s.toUpperCase():o.toLowerCase());const dh=n=>{const e=xb(n);return e.charAt(0).toUpperCase()+e.slice(1)};var eu={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"};const wb=n=>{for(const e in n)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},bb=f.createContext({}),Sb=()=>f.useContext(bb),Cb=f.forwardRef(({color:n,size:e,strokeWidth:o,absoluteStrokeWidth:s,className:i="",children:l,iconNode:u,...d},h)=>{const{size:m=24,strokeWidth:y=2,absoluteStrokeWidth:v=!1,color:x="currentColor",className:b=""}=Sb()??{},S=s??v?Number(o??y)*24/Number(e??m):o??y;return f.createElement("svg",{ref:h,...eu,width:e??m??eu.width,height:e??m??eu.height,stroke:n??x,strokeWidth:S,className:uh("lucide",b,i),...!l&&!wb(d)&&{"aria-hidden":"true"},...d},[...u.map(([C,k])=>f.createElement(C,k)),...Array.isArray(l)?l:[l]])});const Kt=(n,e)=>{const o=f.forwardRef(({className:s,...i},l)=>f.createElement(Cb,{ref:l,iconNode:e,className:uh(`lucide-${yb(dh(n))}`,`lucide-${n}`,s),...i}));return o.displayName=dh(n),o};const Js=Kt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const tu=Kt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const nu=Kt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const fh=Kt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const ph=Kt("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const kb=Kt("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Eb=Kt("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);const hh=Kt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const ru=Kt("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const mh=Kt("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const _b=Kt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Pb=Kt("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const gh=Kt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Rb=Kt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var ou={exports:{}},ei={};var vh;function Ib(){if(vh)return ei;vh=1;var n=jc(),e=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(d,h,m){var y,v={},x=null,b=null;m!==void 0&&(x=""+m),h.key!==void 0&&(x=""+h.key),h.ref!==void 0&&(b=h.ref);for(y in h)s.call(h,y)&&!l.hasOwnProperty(y)&&(v[y]=h[y]);if(d&&d.defaultProps)for(y in h=d.defaultProps,h)v[y]===void 0&&(v[y]=h[y]);return{$$typeof:e,type:d,key:x,ref:b,props:v,_owner:i.current}}return ei.Fragment=o,ei.jsx=u,ei.jsxs=u,ei}var yh;function Tb(){return yh||(yh=1,ou.exports=Ib()),ou.exports}var E=Tb(),ti=Pp(),Db=Object.defineProperty,su=(n,e)=>Db(n,"name",{value:e,configurable:!0});function iu(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}su(iu,"setRef");function Po(...n){return e=>{let o=!1;const s=n.map(i=>{const l=iu(i,e);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let i=0;i<s.length;i++){const l=s[i];typeof l=="function"?l():iu(n[i],null)}}}}su(Po,"composeRefs");function Ve(...n){return f.useCallback(Po(...n),n)}su(Ve,"useComposedRefs");var Nb=Object.defineProperty,Cn=(n,e)=>Nb(n,"name",{value:e,configurable:!0});function kn(n){const e=f.forwardRef((o,s)=>{let{children:i,...l}=o,u=null,d=!1;const h=[];au(i)&&typeof Ra=="function"&&(i=Ra(i._payload)),f.Children.forEach(i,x=>{if(kh(x)){d=!0;const b=x;let S="child"in b.props?b.props.child:b.props.children;au(S)&&typeof Ra=="function"&&(S=Ra(S._payload)),u=Ob(b,S),h.push(u?.props?.children)}else h.push(x)}),u?u=f.cloneElement(u,void 0,h):!d&&f.Children.count(i)===1&&f.isValidElement(i)&&(u=i);const m=u?Ch(u):void 0,y=Ve(s,m);if(!u){if(i||i===0)throw new Error(d?Mb(n):$b(n));return i}const v=Sh(l,u.props??{});return u.type!==f.Fragment&&(v.ref=s?y:m),f.cloneElement(u,v)});return e.displayName=`${n}.Slot`,e}Cn(kn,"createSlot");var xh=kn("Slot"),wh=Symbol.for("radix.slottable");function bh(n){const e=Cn(o=>"child"in o?o.children(o.child):o.children,"Slottable");return e.displayName=`${n}.Slottable`,e.__radixId=wh,e}Cn(bh,"createSlottable");var Ob=Cn((n,e)=>{if("child"in n.props){const o=n.props.child;return f.isValidElement(o)?f.cloneElement(o,void 0,n.props.children(o.props.children)):null}return f.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function Sh(n,e){const o={...e};for(const s in e){const i=n[s],l=e[s];/^on[A-Z]/.test(s)?i&&l?o[s]=(...d)=>{const h=l(...d);return i(...d),h}:i&&(o[s]=i):s==="style"?o[s]={...i,...l}:s==="className"&&(o[s]=[i,l].filter(Boolean).join(" "))}return{...n,...o}}Cn(Sh,"mergeProps");function Ch(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning;return o?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}Cn(Ch,"getElementRef");function kh(n){return f.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===wh}Cn(kh,"isSlottable");var Ab=Symbol.for("react.lazy");function au(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Ab&&"_payload"in n&&Eh(n._payload)}Cn(au,"isLazyComponent");function Eh(n){return typeof n=="object"&&n!==null&&"then"in n}Cn(Eh,"isPromiseLike");var $b=Cn(n=>`${n} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Mb=Cn(n=>`${n} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Ra=ns[" use ".trim().toString()],jb=Object.defineProperty,Lb=(n,e)=>jb(n,"name",{value:e,configurable:!0}),Fb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=Fb.reduce((n,e)=>{const o=kn(`Primitive.${e}`),s=f.forwardRef((i,l)=>{const{asChild:u,...d}=i,h=u?o:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${e}`,{...n,[e]:s}},{});function lu(n,e){n&&ti.flushSync(()=>n.dispatchEvent(e))}Lb(lu,"dispatchDiscreteCustomEvent");var zb=Object.defineProperty,Vb=(n,e)=>zb(n,"name",{value:e,configurable:!0}),_h=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ub=f.forwardRef(Vb(function(e,o){return E.jsx(Ae.span,{...e,ref:o,style:{..._h,...e.style}})},"VisuallyHidden")),Bb=Ub,Hb=Object.defineProperty,mn=(n,e)=>Hb(n,"name",{value:e,configurable:!0});function Wb(n,e){const o=f.createContext(e);o.displayName=n+"Context";const s=mn(l=>{const{children:u,...d}=l,h=f.useMemo(()=>d,Object.values(d));return E.jsx(o.Provider,{value:h,children:u})},"Provider");s.displayName=n+"Provider";function i(l,u={}){const{optional:d=!1}=u,h=f.useContext(o);if(h)return h;if(e!==void 0)return e;if(!d)throw new Error(`\`${l}\` must be used within \`${n}\``)}return mn(i,"useContext"),[s,i]}mn(Wb,"createContext");function tn(n,e=[]){let o=[];function s(l,u){const d=f.createContext(u);d.displayName=l+"Context";const h=o.length;o=[...o,u];const m=mn(v=>{const{scope:x,children:b,...S}=v,C=x?.[n]?.[h]||d,k=f.useMemo(()=>S,Object.values(S));return E.jsx(C.Provider,{value:k,children:b})},"Provider");m.displayName=l+"Provider";function y(v,x,b={}){const{optional:S=!1}=b,C=x?.[n]?.[h]||d,k=f.useContext(C);if(k)return k;if(u!==void 0)return u;if(!S)throw new Error(`\`${v}\` must be used within \`${l}\``)}return mn(y,"useContext"),[m,y]}mn(s,"createContext");const i=mn(()=>{const l=o.map(u=>f.createContext(u));return mn(function(d){const h=d?.[n]||l;return f.useMemo(()=>({[`__scope${n}`]:{...d,[n]:h}}),[d,h])},"useScope")},"createScope");return i.scopeName=n,[s,Ph(i,...e)]}mn(tn,"createContextScope");function Ph(...n){const e=n[0];if(n.length===1)return e;const o=mn(()=>{const s=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return mn(function(l){const u=s.reduce((d,{useScope:h,scopeName:m})=>{const v=h(l)[`__scope${m}`];return{...d,...v}},{});return f.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return o.scopeName=e.scopeName,o}mn(Ph,"composeContextScopes");var Kb=Object.defineProperty,Et=(n,e)=>Kb(n,"name",{value:e,configurable:!0});function Ia(n){const e=n+"CollectionProvider",[o,s]=tn(e),[i,l]=o(e,{collectionRef:{current:null},itemMap:new Map}),u=Et(C=>{const{scope:k,children:N}=C,D=f.useRef(null),O=f.useRef(new Map).current;return E.jsx(i,{scope:k,itemMap:O,collectionRef:D,children:N})},"CollectionProvider");u.displayName=e;const d=n+"CollectionSlot",h=kn(d),m=f.forwardRef((C,k)=>{const{scope:N,children:D}=C,O=l(d,N),R=Ve(k,O.collectionRef);return E.jsx(h,{ref:R,children:D})});m.displayName=d;const y=n+"CollectionItemSlot",v="data-radix-collection-item",x=kn(y),b=f.forwardRef((C,k)=>{const{scope:N,children:D,...O}=C,R=f.useRef(null),L=Ve(k,R),j=l(y,N);return f.useEffect(()=>(j.itemMap.set(R,{ref:R,...O}),()=>{j.itemMap.delete(R)})),E.jsx(x,{[v]:"",ref:L,children:D})});b.displayName=y;function S(C){const k=l(n+"CollectionConsumer",C);return f.useCallback(()=>{const D=k.collectionRef.current;if(!D)return[];const O=Array.from(D.querySelectorAll(`[${v}]`));return Array.from(k.itemMap.values()).sort((j,B)=>O.indexOf(j.ref.current)-O.indexOf(B.ref.current))},[k.collectionRef,k.itemMap])}return Et(S,"useCollection"),[{Provider:u,Slot:m,ItemSlot:b},S,s]}Et(Ia,"createCollection");var Rh=new WeakMap,cu=class wo extends Map{static{Et(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],Rh.set(this,!0)}set(e,o){return Rh.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,o),this}insert(e,o,s){const i=this.has(o),l=this.#e.length,u=uu(e);let d=u>=0?u:l+u;const h=d<0||d>=l?-1:d;if(h===this.size||i&&h===this.size-1||h===-1)return this.set(o,s),this;const m=this.size+(i?0:1);u<0&&d++;const y=[...this.#e];let v,x=!1;for(let b=d;b<m;b++)if(d===b){let S=y[b];y[b]===o&&(S=y[b+1]),i&&this.delete(o),v=this.get(S),this.set(o,s)}else{!x&&y[b-1]===o&&(x=!0);const S=y[x?b:b-1],C=v;v=this.get(S),this.delete(S),this.set(S,C)}return this}with(e,o,s){const i=new wo(this);return i.insert(e,o,s),i}before(e){const o=this.#e.indexOf(e)-1;if(!(o<0))return this.entryAt(o)}setBefore(e,o,s){const i=this.#e.indexOf(e);return i===-1?this:this.insert(i,o,s)}after(e){let o=this.#e.indexOf(e);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(e,o,s){const i=this.#e.indexOf(e);return i===-1?this:this.insert(i+1,o,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){const o=super.delete(e);return o&&this.#e.splice(this.#e.indexOf(e),1),o}deleteAt(e){const o=this.keyAt(e);return o!==void 0?this.delete(o):!1}at(e){const o=Ta(this.#e,e);if(o!==void 0)return this.get(o)}entryAt(e){const o=Ta(this.#e,e);if(o!==void 0)return[o,this.get(o)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Ta(this.#e,e)}from(e,o){const s=this.indexOf(e);if(s===-1)return;let i=s+o;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,o){const s=this.indexOf(e);if(s===-1)return;let i=s+o;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,o){let s=0;for(const i of this){if(Reflect.apply(e,o,[i,s,this]))return i;s++}}findIndex(e,o){let s=0;for(const i of this){if(Reflect.apply(e,o,[i,s,this]))return s;s++}return-1}filter(e,o){const s=[];let i=0;for(const l of this)Reflect.apply(e,o,[l,i,this])&&s.push(l),i++;return new wo(s)}map(e,o){const s=[];let i=0;for(const l of this)s.push([l[0],Reflect.apply(e,o,[l,i,this])]),i++;return new wo(s)}reduce(...e){const[o,s]=e;let i=0,l=s??this.at(0);for(const u of this)i===0&&e.length===1?l=u:l=Reflect.apply(o,this,[l,u,i,this]),i++;return l}reduceRight(...e){const[o,s]=e;let i=s??this.at(-1);for(let l=this.size-1;l>=0;l--){const u=this.at(l);l===this.size-1&&e.length===1?i=u:i=Reflect.apply(o,this,[i,u,l,this])}return i}toSorted(e){const o=[...this.entries()].sort(e);return new wo(o)}toReversed(){const e=new wo;for(let o=this.size-1;o>=0;o--){const s=this.keyAt(o),i=this.get(s);e.set(s,i)}return e}toSpliced(...e){const o=[...this.entries()];return o.splice(...e),new wo(o)}slice(e,o){const s=new wo;let i=this.size-1;if(e===void 0)return s;e<0&&(e=e+this.size),o!==void 0&&o>0&&(i=o-1);for(let l=e;l<=i;l++){const u=this.keyAt(l),d=this.get(u);s.set(u,d)}return s}every(e,o){let s=0;for(const i of this){if(!Reflect.apply(e,o,[i,s,this]))return!1;s++}return!0}some(e,o){let s=0;for(const i of this){if(Reflect.apply(e,o,[i,s,this]))return!0;s++}return!1}};function Ta(n,e){if("at"in Array.prototype)return Array.prototype.at.call(n,e);const o=Ih(n,e);return o===-1?void 0:n[o]}Et(Ta,"at");function Ih(n,e){const o=n.length,s=uu(e),i=s>=0?s:o+s;return i<0||i>=o?-1:i}Et(Ih,"toSafeIndex");function uu(n){return n!==n||n===0?0:Math.trunc(n)}Et(uu,"toSafeInteger");function Gb(n){const e=n+"CollectionProvider",[o,s]=tn(e),[i,l]=o(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new cu,setItemMap:Et(()=>{},"setItemMap")}),u=Et(({state:O,...R})=>O?E.jsx(h,{...R,state:O}):E.jsx(d,{...R}),"CollectionProvider");u.displayName=e;const d=Et(O=>{const R=k();return E.jsx(h,{...O,state:R})},"CollectionInit");d.displayName=e+"Init";const h=Et(O=>{const{scope:R,children:L,state:j}=O,B=f.useRef(null),[I,K]=f.useState(null),ae=Ve(B,K),[be,le]=j;return f.useEffect(()=>{if(!I)return;const ce=Nh(()=>{});return ce.observe(I,{childList:!0,subtree:!0}),()=>{ce.disconnect()}},[I]),E.jsx(i,{scope:R,itemMap:be,setItemMap:le,collectionRef:ae,collectionRefObject:B,collectionElement:I,children:L})},"CollectionProviderImpl");h.displayName=e+"Impl";const m=n+"CollectionSlot",y=kn(m),v=f.forwardRef((O,R)=>{const{scope:L,children:j}=O,B=l(m,L),I=Ve(R,B.collectionRef);return E.jsx(y,{ref:I,children:j})});v.displayName=m;const x=n+"CollectionItemSlot",b="data-radix-collection-item",S=kn(x),C=f.forwardRef((O,R)=>{const{scope:L,children:j,...B}=O,I=f.useRef(null),[K,ae]=f.useState(null),be=Ve(R,I,ae),le=l(x,L),{setItemMap:ce}=le,ue=f.useRef(B);Th(ue.current,B)||(ue.current=B);const Se=ue.current;return f.useEffect(()=>{const q=Se;return ce(ne=>K?ne.has(K)?ne.set(K,{...q,element:K}).toSorted(du):(ne.set(K,{...q,element:K}),ne.toSorted(du)):ne),()=>{ce(ne=>!K||!ne.has(K)?ne:(ne.delete(K),new cu(ne)))}},[K,Se,ce]),E.jsx(S,{[b]:"",ref:be,children:j})});C.displayName=x;function k(){return f.useState(new cu)}Et(k,"useInitCollection");function N(O){const{itemMap:R}=l(n+"CollectionConsumer",O);return R}return Et(N,"useCollection"),[{Provider:u,Slot:v,ItemSlot:C},{createCollectionScope:s,useCollection:N,useInitCollection:k}]}Et(Gb,"createCollection");function Th(n,e){if(n===e)return!0;if(typeof n!="object"||typeof e!="object"||n==null||e==null)return!1;const o=Object.keys(n),s=Object.keys(e);if(o.length!==s.length)return!1;for(const i of o)if(!Object.prototype.hasOwnProperty.call(e,i)||n[i]!==e[i])return!1;return!0}Et(Th,"shallowEqual");function Dh(n,e){return!!(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING)}Et(Dh,"isElementPreceding");function du(n,e){return!n[1].element||!e[1].element?0:Dh(n[1].element,e[1].element)?-1:1}Et(du,"sortByDocumentPosition");function Nh(n){return new MutationObserver(o=>{for(const s of o)if(s.type==="childList"){n();return}})}Et(Nh,"getChildListObserver");var Zb=Object.defineProperty,is=(n,e)=>Zb(n,"name",{value:e,configurable:!0}),Oh=!!(typeof window<"u"&&window.document&&window.document.createElement);function pe(n,e,{checkForDefaultPrevented:o=!0}={}){return is(function(i){if(n?.(i),o===!1||!i||!i.defaultPrevented)return e?.(i)},"handleEvent")}is(pe,"composeEventHandlers");function qb(n){if(!Oh)throw new Error("Cannot access window outside of the DOM");return n?.ownerDocument?.defaultView??window}is(qb,"getOwnerWindow");function fu(n){if(!Oh)throw new Error("Cannot access document outside of the DOM");return n?.ownerDocument??document}is(fu,"getOwnerDocument");function Ah(n,e=!1){const{activeElement:o}=fu(n);if(!o?.nodeName)return null;if($h(o)&&o.contentDocument)return Ah(o.contentDocument.body,e);if(e){const s=o.getAttribute("aria-activedescendant");if(s){const i=fu(o).getElementById(s);if(i)return i}}return o}is(Ah,"getActiveElement");function $h(n){return n.tagName==="IFRAME"}is($h,"isFrame");var dt=globalThis?.document?f.useLayoutEffect:()=>{},Yb=Object.defineProperty,Qb=(n,e)=>Yb(n,"name",{value:e,configurable:!0}),Mh=ns[" useEffectEvent ".trim().toString()],jh=ns[" useInsertionEffect ".trim().toString()];function Lh(n){if(typeof Mh=="function")return Mh(n);const e=f.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof jh=="function"?jh(()=>{e.current=n}):dt(()=>{e.current=n}),f.useMemo(()=>((...o)=>e.current?.(...o)),[])}Qb(Lh,"useEffectEvent");var Xb=Object.defineProperty,ni=(n,e)=>Xb(n,"name",{value:e,configurable:!0}),Jb=ns[" useInsertionEffect ".trim().toString()]||dt;function Un({prop:n,defaultProp:e,onChange:o=ni(()=>{},"onChange"),caller:s}){const[i,l,u]=Fh({defaultProp:e,onChange:o}),d=n!==void 0,h=d?n:i,m=f.useCallback(y=>{if(d){const v=zh(y)?y(n):y;v!==n&&u.current?.(v)}else l(y)},[d,n,l,u]);return[h,m]}ni(Un,"useControllableState");function Fh({defaultProp:n,onChange:e}){const[o,s]=f.useState(n),i=f.useRef(o),l=f.useRef(e);return Jb(()=>{l.current=e},[e]),f.useEffect(()=>{i.current!==o&&(l.current?.(o),i.current=o)},[o,i]),[o,s,l]}ni(Fh,"useUncontrolledState");function zh(n){return typeof n=="function"}ni(zh,"isFunction");var Vh=Symbol("RADIX:SYNC_STATE");function eS(n,e,o,s){const{prop:i,defaultProp:l,onChange:u,caller:d}=e,h=i!==void 0,m=Lh(u),y=[{...o,state:l}];s&&y.push(s);const[v,x]=f.useReducer((k,N)=>{if(N.type===Vh)return{...k,state:N.state};const D=n(k,N);return h&&!Object.is(D.state,k.state)&&m(D.state),D},...y),b=v.state,S=f.useRef(b);f.useEffect(()=>{S.current!==b&&(S.current=b,h||m(b))},[b,S,h]);const C=f.useMemo(()=>i!==void 0?{...v,state:i}:v,[v,i]);return f.useEffect(()=>{h&&!Object.is(i,v.state)&&x({type:Vh,state:i})},[i,v.state,h]),[C,x]}ni(eS,"useControllableStateReducer");var tS=Object.defineProperty,ur=(n,e)=>tS(n,"name",{value:e,configurable:!0});function Uh(n,e){return f.useReducer((o,s)=>e[o][s]??o,n)}ur(Uh,"useStateMachine");var nn=ur(n=>{const{present:e,children:o}=n,s=Bh(e),i=typeof o=="function"?o({present:s.isPresent}):f.Children.only(o),l=Hh(s.ref,Wh(i));return typeof o=="function"||s.isPresent?f.cloneElement(i,{ref:l}):null},"Presence");function Bh(n){const[e,o]=f.useState(),s=f.useRef(null),i=f.useRef(n),l=f.useRef("none"),u=f.useRef(void 0),d=n?"mounted":"unmounted",[h,m]=Uh(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{h==="mounted"?(l.current=u.current??as(s.current),u.current=void 0):l.current="none"},[h]),dt(()=>{const y=s.current,v=i.current;if(v!==n){const b=l.current,S=as(y);n?(u.current=S,m("MOUNT")):S==="none"||y?.display==="none"?m("UNMOUNT"):m(v&&b!==S?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,m]),dt(()=>{if(e){let y;const v=e.ownerDocument.defaultView??window,x=ur(S=>{const k=as(s.current).includes(CSS.escape(S.animationName));if(S.target===e&&k&&(m("ANIMATION_END"),!i.current)){const N=e.style.animationFillMode;e.style.animationFillMode="forwards",y=v.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=N)})}},"handleAnimationEnd"),b=ur(S=>{S.target===e&&(l.current=as(s.current))},"handleAnimationStart");return e.addEventListener("animationstart",b),e.addEventListener("animationcancel",x),e.addEventListener("animationend",x),()=>{v.clearTimeout(y),e.removeEventListener("animationstart",b),e.removeEventListener("animationcancel",x),e.removeEventListener("animationend",x)}}else m("ANIMATION_END")},[e,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:f.useCallback(y=>{if(y){const v=getComputedStyle(y);s.current=v,u.current=as(v)}else s.current=null;o(y)},[])}}ur(Bh,"usePresence");function pu(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}ur(pu,"setRef");function Hh(...n){const e=f.useRef(n);return e.current=n,f.useCallback(o=>{const s=e.current;let i=!1;const l=s.map(u=>{const d=pu(u,o);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let u=0;u<l.length;u++){const d=l[u];typeof d=="function"?d():pu(s[u],null)}}},[])}ur(Hh,"useStableComposedRefs");function as(n){return n?.animationName||"none"}ur(as,"getAnimationName");function Wh(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning;return o?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}ur(Wh,"getElementRef");var nS=Object.defineProperty,rS=(n,e)=>nS(n,"name",{value:e,configurable:!0}),oS=ns[" useId ".trim().toString()]||(()=>{}),sS=0;function yt(n){const[e,o]=f.useState(oS());return dt(()=>{n||o(s=>s??String(sS++))},[n]),n||(e?`radix-${e}`:"")}rS(yt,"useId");var iS=Object.defineProperty,aS=(n,e)=>iS(n,"name",{value:e,configurable:!0}),lS=f.createContext(void 0);function ri(n){const e=f.useContext(lS);return n||e||"ltr"}aS(ri,"useDirection");var cS=Object.defineProperty,uS=(n,e)=>cS(n,"name",{value:e,configurable:!0});function Gt(n){const e=f.useRef(n);return f.useEffect(()=>{e.current=n}),f.useMemo(()=>((...o)=>e.current?.(...o)),[])}uS(Gt,"useCallbackRef");var dS=Object.defineProperty,_t=(n,e)=>dS(n,"name",{value:e,configurable:!0}),hu="dismissableLayer.update",fS="dismissableLayer.pointerDownOutside",pS="dismissableLayer.focusOutside",Kh,Gh=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),oi=f.forwardRef(_t(function(e,o){const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:m,...y}=e,v=f.useContext(Gh),[x,b]=f.useState(null),S=x?.ownerDocument??globalThis?.document,[,C]=f.useState({}),k=Ve(o,b),N=Array.from(v.layers),[D]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),O=D?N.indexOf(D):-1,R=x?N.indexOf(x):-1,L=v.layersWithOutsidePointerEventsDisabled.size>0,j=R>=O,B=f.useRef(!1),I=qh(le=>{u?.(le),h?.(le),le.defaultPrevented||m?.()},{ownerDocument:S,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:B,dismissableSurfaces:v.dismissableSurfaces,shouldHandlePointerDownOutside:f.useCallback(le=>{if(!(le instanceof Node))return!1;const ce=[...v.branches].some(ue=>ue.contains(le));return j&&!ce},[v.branches,j])}),K=Yh(le=>{if(i&&B.current)return;const ce=le.target;[...v.branches].some(Se=>Se.contains(ce))||(d?.(le),h?.(le),le.defaultPrevented||m?.())},S),ae=x?R===N.length-1:!1,be=Gt(le=>{le.key==="Escape"&&(l?.(le),!le.defaultPrevented&&m&&(le.preventDefault(),m()))});return f.useEffect(()=>{if(ae)return S.addEventListener("keydown",be,{capture:!0}),()=>S.removeEventListener("keydown",be,{capture:!0})},[S,ae,be]),f.useEffect(()=>{if(x)return s&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Kh=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(x)),v.layers.add(x),mu(),()=>{s&&(v.layersWithOutsidePointerEventsDisabled.delete(x),v.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Kh))}},[x,S,s,v]),f.useEffect(()=>()=>{x&&(v.layers.delete(x),v.layersWithOutsidePointerEventsDisabled.delete(x),mu())},[x,v]),f.useEffect(()=>{const le=_t(()=>C({}),"handleUpdate");return document.addEventListener(hu,le),()=>document.removeEventListener(hu,le)},[]),E.jsx(Ae.div,{...y,ref:k,style:{pointerEvents:L?j?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,K.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,K.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function Zh(){const n=f.useContext(Gh),[e,o]=f.useState(null);return f.useEffect(()=>{if(e)return n.dismissableSurfaces.add(e),()=>{n.dismissableSurfaces.delete(e)}},[e,n.dismissableSurfaces]),o}_t(Zh,"useDismissableLayerSurface");var hS=_t(()=>!0,"IS_TRUE");function qh(n,e){const{ownerDocument:o=globalThis?.document,deferPointerDownOutside:s=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:l,shouldHandlePointerDownOutside:u=hS}=e,d=Gt(n),h=f.useRef(!1),m=f.useRef(!1),y=f.useRef(new Map),v=f.useRef(()=>{});return f.useEffect(()=>{function x(){m.current=!1,i.current=!1,y.current.clear()}_t(x,"resetOutsideInteraction");function b(){return Array.from(y.current.values()).some(Boolean)}_t(b,"isOutsideInteractionIntercepted");function S(O){if(!m.current)return;const R=O.target;R instanceof Node&&[...l].some(j=>j.contains(R))||y.current.set(O.type,!0),O.type==="click"&&window.setTimeout(()=>{m.current&&v.current()},0)}_t(S,"handleInteractionCapture");function C(O){m.current&&y.current.set(O.type,!1)}_t(C,"handleInteractionBubble");const k=_t(O=>{if(O.target&&!h.current){let R=function(){o.removeEventListener("click",v.current);const j=b();x(),j||gu(fS,d,L,{discrete:!0})};if(_t(R,"handleAndDispatchPointerDownOutsideEvent"),!u(O.target)){o.removeEventListener("click",v.current),x(),h.current=!1;return}const L={originalEvent:O};m.current=!0,i.current=s&&O.button===0,y.current.clear(),!s||O.button!==0?R():(o.removeEventListener("click",v.current),v.current=R,o.addEventListener("click",v.current,{once:!0}))}else o.removeEventListener("click",v.current),x();h.current=!1},"handlePointerDown"),N=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const O of N)o.addEventListener(O,S,!0),o.addEventListener(O,C);const D=window.setTimeout(()=>{o.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(D),o.removeEventListener("pointerdown",k),o.removeEventListener("click",v.current);for(const O of N)o.removeEventListener(O,S,!0),o.removeEventListener(O,C)}},[o,d,s,i,l,u]),{onPointerDownCapture:_t(()=>h.current=!0,"onPointerDownCapture")}}_t(qh,"usePointerDownOutside");function Yh(n,e=globalThis?.document){const o=Gt(n),s=f.useRef(!1);return f.useEffect(()=>{const i=_t(l=>{l.target&&!s.current&&gu(pS,o,{originalEvent:l},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,o]),{onFocusCapture:_t(()=>s.current=!0,"onFocusCapture"),onBlurCapture:_t(()=>s.current=!1,"onBlurCapture")}}_t(Yh,"useFocusOutside");function mu(){const n=new CustomEvent(hu);document.dispatchEvent(n)}_t(mu,"dispatchUpdate");function gu(n,e,o,{discrete:s}){const i=o.originalEvent.target,l=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});e&&i.addEventListener(n,e,{once:!0}),s?lu(i,l):i.dispatchEvent(l)}_t(gu,"handleAndDispatchCustomEvent");var mS=Object.defineProperty,Ft=(n,e)=>mS(n,"name",{value:e,configurable:!0}),vu="focusScope.autoFocusOnMount",yu="focusScope.autoFocusOnUnmount",Qh={bubbles:!1,cancelable:!0},Da=f.forwardRef(Ft(function(e,o){const{loop:s=!1,trapped:i=!1,onMountAutoFocus:l,onUnmountAutoFocus:u,...d}=e,[h,m]=f.useState(null),y=Gt(l),v=Gt(u),x=f.useRef(null),b=Ve(o,m),S=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(i){let k=function(R){if(S.paused||!h)return;const L=R.target;h.contains(L)?x.current=L:dr(x.current,{select:!0})},N=function(R){if(S.paused||!h)return;const L=R.relatedTarget;L!==null&&(h.contains(L)||dr(x.current,{select:!0}))},D=function(R){if(document.activeElement===document.body)for(const j of R)j.removedNodes.length>0&&dr(h)};Ft(k,"handleFocusIn"),Ft(N,"handleFocusOut"),Ft(D,"handleMutations"),document.addEventListener("focusin",k),document.addEventListener("focusout",N);const O=new MutationObserver(D);return h&&O.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",N),O.disconnect()}}},[i,h,S.paused]),f.useEffect(()=>{if(h){nm.add(S);const k=document.activeElement;if(!h.contains(k)){const D=new CustomEvent(vu,Qh);h.addEventListener(vu,y),h.dispatchEvent(D),D.defaultPrevented||(Xh(om(xu(h)),{select:!0}),document.activeElement===k&&dr(h))}return()=>{h.removeEventListener(vu,y),setTimeout(()=>{const D=new CustomEvent(yu,Qh);h.addEventListener(yu,v),h.dispatchEvent(D),D.defaultPrevented||dr(k??document.body,{select:!0}),h.removeEventListener(yu,v),nm.remove(S)},0)}}},[h,y,v,S]);const C=f.useCallback(k=>{if(!s&&!i||S.paused)return;const N=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,D=document.activeElement;if(N&&D){const O=k.currentTarget,[R,L]=Jh(O);R&&L?!k.shiftKey&&D===L?(k.preventDefault(),s&&dr(R,{select:!0})):k.shiftKey&&D===R&&(k.preventDefault(),s&&dr(L,{select:!0})):D===O&&k.preventDefault()}},[s,i,S.paused]);return E.jsx(Ae.div,{tabIndex:-1,...d,ref:b,onKeyDown:C})},"FocusScope"));function Xh(n,{select:e=!1}={}){const o=document.activeElement;for(const s of n)if(dr(s,{select:e}),document.activeElement!==o)return}Ft(Xh,"focusFirst");function Jh(n){const e=xu(n),o=wu(e,n),s=wu(e.reverse(),n);return[o,s]}Ft(Jh,"getTabbableEdges");function xu(n){const e=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:Ft(s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;o.nextNode();)e.push(o.currentNode);return e}Ft(xu,"getTabbableCandidates");function wu(n,e){const o=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const s of n)if(!(o?!s.checkVisibility({checkVisibilityCSS:!0}):em(s,{upTo:e})))return s}Ft(wu,"findVisible");function em(n,{upTo:e}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}Ft(em,"isHidden");function tm(n){return n instanceof HTMLInputElement&&"select"in n}Ft(tm,"isSelectableInput");function dr(n,{select:e=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&tm(n)&&e&&n.select()}}Ft(dr,"focus");var nm=rm();function rm(){let n=[];return{add(e){const o=n[0];e!==o&&o?.pause(),n=bu(n,e),n.unshift(e)},remove(e){n=bu(n,e),n[0]?.resume()}}}Ft(rm,"createFocusScopesStack");function bu(n,e){const o=[...n],s=o.indexOf(e);return s!==-1&&o.splice(s,1),o}Ft(bu,"arrayRemove");function om(n){return n.filter(e=>e.tagName!=="A")}Ft(om,"removeLinks");var gS=Object.defineProperty,vS=(n,e)=>gS(n,"name",{value:e,configurable:!0}),si=f.forwardRef(vS(function(e,o){const{container:s,...i}=e,[l,u]=f.useState(!1);dt(()=>u(!0),[]);const d=s||l&&globalThis?.document?.body;return d?ti.createPortal(E.jsx(Ae.div,{...i,ref:o}),d):null},"Portal")),yS=Object.defineProperty,Su=(n,e)=>yS(n,"name",{value:e,configurable:!0}),Na=0,ls=null;function xS(n){return cs(),n.children}Su(xS,"FocusGuards");function cs(){f.useEffect(()=>{ls||(ls={start:Cu(),end:Cu()});const{start:n,end:e}=ls;return document.body.firstElementChild!==n&&document.body.insertAdjacentElement("afterbegin",n),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Na++,()=>{Na===1&&(ls?.start.remove(),ls?.end.remove(),ls=null),Na=Math.max(0,Na-1)}},[])}Su(cs,"useFocusGuards");function Cu(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}Su(Cu,"createFocusGuard");var Bn=function(){return Bn=Object.assign||function(e){for(var o,s=1,i=arguments.length;s<i;s++){o=arguments[s];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(e[l]=o[l])}return e},Bn.apply(this,arguments)};function sm(n,e){var o={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(o[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(n);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(n,s[i])&&(o[s[i]]=n[s[i]]);return o}function wS(n,e,o){if(o||arguments.length===2)for(var s=0,i=e.length,l;s<i;s++)(l||!(s in e))&&(l||(l=Array.prototype.slice.call(e,0,s)),l[s]=e[s]);return n.concat(l||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var Oa="right-scroll-bar-position",Aa="width-before-scroll-bar",bS="with-scroll-bars-hidden",SS="--removed-body-scroll-bar-size";function ku(n,e){return typeof n=="function"?n(e):n&&(n.current=e),n}function CS(n,e){var o=f.useState(function(){return{value:n,callback:e,facade:{get current(){return o.value},set current(s){var i=o.value;i!==s&&(o.value=s,o.callback(s,i))}}}})[0];return o.callback=e,o.facade}var kS=typeof window<"u"?f.useLayoutEffect:f.useEffect,im=new WeakMap;function ES(n,e){var o=CS(null,function(s){return n.forEach(function(i){return ku(i,s)})});return kS(function(){var s=im.get(o);if(s){var i=new Set(s),l=new Set(n),u=o.current;i.forEach(function(d){l.has(d)||ku(d,null)}),l.forEach(function(d){i.has(d)||ku(d,u)})}im.set(o,n)},[n]),o}function _S(n){return n}function PS(n,e){e===void 0&&(e=_S);var o=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(l){var u=e(l,s);return o.push(u),function(){o=o.filter(function(d){return d!==u})}},assignSyncMedium:function(l){for(s=!0;o.length;){var u=o;o=[],u.forEach(l)}o={push:function(d){return l(d)},filter:function(){return o}}},assignMedium:function(l){s=!0;var u=[];if(o.length){var d=o;o=[],d.forEach(l),u=o}var h=function(){var y=u;u=[],y.forEach(l)},m=function(){return Promise.resolve().then(h)};m(),o={push:function(y){u.push(y),m()},filter:function(y){return u=u.filter(y),o}}}};return i}function RS(n){n===void 0&&(n={});var e=PS(null);return e.options=Bn({async:!0,ssr:!1},n),e}var am=function(n){var e=n.sideCar,o=sm(n,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=e.read();if(!s)throw new Error("Sidecar medium not found");return f.createElement(s,Bn({},o))};am.isSideCarExport=!0;function IS(n,e){return n.useMedium(e),am}var lm=RS(),Eu=function(){},$a=f.forwardRef(function(n,e){var o=f.useRef(null),s=f.useState({onScrollCapture:Eu,onWheelCapture:Eu,onTouchMoveCapture:Eu}),i=s[0],l=s[1],u=n.forwardProps,d=n.children,h=n.className,m=n.removeScrollBar,y=n.enabled,v=n.shards,x=n.sideCar,b=n.noRelative,S=n.noIsolation,C=n.inert,k=n.allowPinchZoom,N=n.as,D=N===void 0?"div":N,O=n.gapMode,R=sm(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=x,j=ES([o,e]),B=Bn(Bn({},R),i);return f.createElement(f.Fragment,null,y&&f.createElement(L,{sideCar:lm,removeScrollBar:m,shards:v,noRelative:b,noIsolation:S,inert:C,setCallbacks:l,allowPinchZoom:!!k,lockRef:o,gapMode:O}),u?f.cloneElement(f.Children.only(d),Bn(Bn({},B),{ref:j})):f.createElement(D,Bn({},B,{className:h,ref:j}),d))});$a.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$a.classNames={fullWidth:Aa,zeroRight:Oa};var TS=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DS(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var e=TS();return e&&n.setAttribute("nonce",e),n}function NS(n,e){n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}function OS(n){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(n)}var AS=function(){var n=0,e=null;return{add:function(o){n==0&&(e=DS())&&(NS(e,o),OS(e)),n++},remove:function(){n--,!n&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},$S=function(){var n=AS();return function(e,o){f.useEffect(function(){return n.add(e),function(){n.remove()}},[e&&o])}},cm=function(){var n=$S(),e=function(o){var s=o.styles,i=o.dynamic;return n(s,i),null};return e},MS={left:0,top:0,right:0,gap:0},_u=function(n){return parseInt(n||"",10)||0},jS=function(n){var e=window.getComputedStyle(document.body),o=e[n==="padding"?"paddingLeft":"marginLeft"],s=e[n==="padding"?"paddingTop":"marginTop"],i=e[n==="padding"?"paddingRight":"marginRight"];return[_u(o),_u(s),_u(i)]},LS=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return MS;var e=jS(n),o=document.documentElement.clientWidth,s=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,s-o+e[2]-e[0])}},FS=cm(),us="data-scroll-locked",zS=function(n,e,o,s){var i=n.left,l=n.top,u=n.right,d=n.gap;return o===void 0&&(o="margin"),`
|
|
64
|
+
.`.concat(bS,` {
|
|
65
65
|
overflow: hidden `).concat(s,`;
|
|
66
66
|
padding-right: `).concat(d,"px ").concat(s,`;
|
|
67
67
|
}
|
|
68
|
-
body[`).concat(
|
|
68
|
+
body[`).concat(us,`] {
|
|
69
69
|
overflow: hidden `).concat(s,`;
|
|
70
70
|
overscroll-behavior: contain;
|
|
71
71
|
`).concat([e&&"position: relative ".concat(s,";"),o==="margin"&&`
|
|
72
|
-
padding-left: `.concat(
|
|
72
|
+
padding-left: `.concat(i,`px;
|
|
73
73
|
padding-top: `).concat(l,`px;
|
|
74
74
|
padding-right: `).concat(u,`px;
|
|
75
75
|
margin-left:0;
|
|
@@ -78,29 +78,29 @@ Error generating stack: `+g.message+`
|
|
|
78
78
|
`),o==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.`).concat(
|
|
81
|
+
.`).concat(Oa,` {
|
|
82
82
|
right: `).concat(d,"px ").concat(s,`;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.`).concat(
|
|
85
|
+
.`).concat(Aa,` {
|
|
86
86
|
margin-right: `).concat(d,"px ").concat(s,`;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.`).concat(
|
|
89
|
+
.`).concat(Oa," .").concat(Oa,` {
|
|
90
90
|
right: 0 `).concat(s,`;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.`).concat(
|
|
93
|
+
.`).concat(Aa," .").concat(Aa,` {
|
|
94
94
|
margin-right: 0 `).concat(s,`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
body[`).concat(
|
|
98
|
-
`).concat(
|
|
97
|
+
body[`).concat(us,`] {
|
|
98
|
+
`).concat(SS,": ").concat(d,`px;
|
|
99
99
|
}
|
|
100
|
-
`)},
|
|
100
|
+
`)},um=function(){var n=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(n)?n:0},VS=function(){f.useEffect(function(){return document.body.setAttribute(us,(um()+1).toString()),function(){var n=um()-1;n<=0?document.body.removeAttribute(us):document.body.setAttribute(us,n.toString())}},[])},US=function(n){var e=n.noRelative,o=n.noImportant,s=n.gapMode,i=s===void 0?"margin":s;VS();var l=f.useMemo(function(){return LS(i)},[i]);return f.createElement(FS,{styles:zS(l,!e,i,o?"":"!important")})},Pu=!1;if(typeof window<"u")try{var Ma=Object.defineProperty({},"passive",{get:function(){return Pu=!0,!0}});window.addEventListener("test",Ma,Ma),window.removeEventListener("test",Ma,Ma)}catch{Pu=!1}var ds=Pu?{passive:!1}:!1,BS=function(n){return n.tagName==="TEXTAREA"},dm=function(n,e){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[e]!=="hidden"&&!(o.overflowY===o.overflowX&&!BS(n)&&o[e]==="visible")},HS=function(n){return dm(n,"overflowY")},WS=function(n){return dm(n,"overflowX")},fm=function(n,e){var o=e.ownerDocument,s=e;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=pm(n,s);if(i){var l=hm(n,s),u=l[1],d=l[2];if(u>d)return!0}s=s.parentNode}while(s&&s!==o.body);return!1},KS=function(n){var e=n.scrollTop,o=n.scrollHeight,s=n.clientHeight;return[e,o,s]},GS=function(n){var e=n.scrollLeft,o=n.scrollWidth,s=n.clientWidth;return[e,o,s]},pm=function(n,e){return n==="v"?HS(e):WS(e)},hm=function(n,e){return n==="v"?KS(e):GS(e)},ZS=function(n,e){return n==="h"&&e==="rtl"?-1:1},qS=function(n,e,o,s,i){var l=ZS(n,window.getComputedStyle(e).direction),u=l*s,d=o.target,h=e.contains(d),m=!1,y=u>0,v=0,x=0;do{if(!d)break;var b=hm(n,d),S=b[0],C=b[1],k=b[2],N=C-k-l*S;(S||N)&&pm(n,d)&&(v+=N,x+=S);var D=d.parentNode;d=D&&D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?D.host:D}while(!h&&d!==document.body||h&&(e.contains(d)||e===d));return(y&&Math.abs(v)<1||!y&&Math.abs(x)<1)&&(m=!0),m},ja=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},mm=function(n){return[n.deltaX,n.deltaY]},gm=function(n){return n&&"current"in n?n.current:n},YS=function(n,e){return n[0]===e[0]&&n[1]===e[1]},QS=function(n){return`
|
|
101
101
|
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
102
102
|
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
103
|
-
`)},kS=0,as=[];function CS(n){var e=f.useRef([]),o=f.useRef([0,0]),s=f.useRef(),a=f.useState(kS++)[0],l=f.useState(Kh)[0],u=f.useRef(n);f.useEffect(function(){u.current=n},[n]),f.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(a));var C=Wb([n.lockRef.current],(n.shards||[]).map(Jh),!0).filter(Boolean);return C.forEach(function(k){return k.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),C.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(a))})}}},[n.inert,n.lockRef.current,n.shards]);var d=f.useCallback(function(C,k){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!u.current.allowPinchZoom;var A=Na(C),N=o.current,O="deltaX"in C?C.deltaX:N[0]-A[0],T="deltaY"in C?C.deltaY:N[1]-A[1],z,R=C.target,B=Math.abs(O)>Math.abs(T)?"h":"v";if("touches"in C&&B==="h"&&R.type==="range")return!1;var L=window.getSelection(),Z=L&&L.anchorNode,ae=Z?Z===R||Z.contains(R):!1;if(ae)return!1;var be=qh(B,R);if(!be)return!0;if(be?z=B:(z=B==="v"?"h":"v",be=qh(B,R)),!be)return!1;if(!s.current&&"changedTouches"in C&&(O||T)&&(s.current=z),!z)return!0;var ue=s.current||z;return wS(ue,k,C,ue==="h"?O:T)},[]),h=f.useCallback(function(C){var k=C;if(!(!as.length||as[as.length-1]!==l)){var A="deltaY"in k?Xh(k):Na(k),N=e.current.filter(function(z){return z.name===k.type&&(z.target===k.target||k.target===z.shadowParent)&&bS(z.delta,A)})[0];if(N&&N.should){k.cancelable&&k.preventDefault();return}if(!N){var O=(u.current.shards||[]).map(Jh).filter(Boolean).filter(function(z){return z.contains(k.target)}),T=O.length>0?d(k,O[0]):!u.current.noIsolation;T&&k.cancelable&&k.preventDefault()}}},[]),m=f.useCallback(function(C,k,A,N){var O={name:C,delta:k,target:A,should:N,shadowParent:_S(A)};e.current.push(O),setTimeout(function(){e.current=e.current.filter(function(T){return T!==O})},1)},[]),v=f.useCallback(function(C){o.current=Na(C),s.current=void 0},[]),y=f.useCallback(function(C){m(C.type,Xh(C),C.target,d(C,n.lockRef.current))},[]),w=f.useCallback(function(C){m(C.type,Na(C),C.target,d(C,n.lockRef.current))},[]);f.useEffect(function(){return as.push(l),n.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:w}),document.addEventListener("wheel",h,is),document.addEventListener("touchmove",h,is),document.addEventListener("touchstart",v,is),function(){as=as.filter(function(C){return C!==l}),document.removeEventListener("wheel",h,is),document.removeEventListener("touchmove",h,is),document.removeEventListener("touchstart",v,is)}},[]);var b=n.removeScrollBar,S=n.inert;return f.createElement(f.Fragment,null,S?f.createElement(l,{styles:SS(a)}):null,b?f.createElement(pS,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function _S(n){for(var e=null;n!==null;)n instanceof ShadowRoot&&(e=n.host,n=n.host),n=n.parentNode;return e}const ES=eS(Wh,CS);var ei=f.forwardRef(function(n,e){return f.createElement(Ia,zn({},n,{ref:e,sideCar:ES}))});ei.classNames=Ia.classNames;var PS=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},ls=new WeakMap,Oa=new WeakMap,Ta={},yu=0,em=function(n){return n&&(n.host||em(n.parentNode))},RS=function(n,e){return e.map(function(o){if(n.contains(o))return o;var s=em(o);return s&&n.contains(s)?s:(console.error("aria-hidden",o,"in not contained inside",n,". Doing nothing"),null)}).filter(function(o){return!!o})},IS=function(n,e,o,s){var a=RS(e,Array.isArray(n)?n:[n]);Ta[o]||(Ta[o]=new WeakMap);var l=Ta[o],u=[],d=new Set,h=new Set(a),m=function(y){!y||d.has(y)||(d.add(y),m(y.parentNode))};a.forEach(m);var v=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(w){if(d.has(w))v(w);else try{var b=w.getAttribute(s),S=b!==null&&b!=="false",C=(ls.get(w)||0)+1,k=(l.get(w)||0)+1;ls.set(w,C),l.set(w,k),u.push(w),C===1&&S&&Oa.set(w,!0),k===1&&w.setAttribute(o,"true"),S||w.setAttribute(s,"true")}catch(A){console.error("aria-hidden: cannot operate on ",w,A)}})};return v(e),d.clear(),yu++,function(){u.forEach(function(y){var w=ls.get(y)-1,b=l.get(y)-1;ls.set(y,w),l.set(y,b),w||(Oa.has(y)||y.removeAttribute(s),Oa.delete(y)),b||y.removeAttribute(o)}),yu--,yu||(ls=new WeakMap,ls=new WeakMap,Oa=new WeakMap,Ta={})}},Aa=function(n,e,o){o===void 0&&(o="data-aria-hidden");var s=Array.from(Array.isArray(n)?n:[n]),a=PS(n);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),IS(s,a,o,"aria-hidden")):function(){return null}},DS=Object.defineProperty,Jt=(n,e)=>DS(n,"name",{value:e,configurable:!0}),xu="Dialog",[tm,nm]=wn(xu),[NS,bn]=tm(xu),wu=Jt(n=>{const{__scopeDialog:e,children:o,open:s,defaultOpen:a,onOpenChange:l,modal:u=!0}=n,d=f.useRef(null),h=f.useRef(null),[m,v]=Ar({prop:s,defaultProp:a??!1,onChange:l,caller:xu}),[y,w]=f.useState(0),[b,S]=f.useState(0);return _.jsx(NS,{scope:e,triggerRef:d,contentRef:h,contentId:Ct(),titleId:Ct(),descriptionId:Ct(),titlePresent:y>0,descriptionPresent:b>0,setTitleCount:w,setDescriptionCount:S,open:m,onOpenChange:v,onOpenToggle:f.useCallback(()=>v(C=>!C),[v]),modal:u,children:o})},"Dialog"),OS="DialogTrigger",TS=f.forwardRef(Jt(function(e,o){const{__scopeDialog:s,...a}=e,l=bn(OS,s),u=Ve(o,l.triggerRef);return _.jsx(ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":Ma(l.open),...a,ref:u,onClick:ke(e.onClick,l.onOpenToggle)})},"DialogTrigger")),rm="DialogPortal",[AS,om]=tm(rm,{forceMount:void 0}),bu=Jt(n=>{const{__scopeDialog:e,forceMount:o,children:s,container:a}=n,l=bn(rm,e);return _.jsx(AS,{scope:e,forceMount:o,children:f.Children.map(s,u=>_.jsx(Ln,{present:o||l.open,children:_.jsx(_a,{asChild:!0,container:a,children:u})}))})},"DialogPortal"),Su="DialogOverlay",ku=f.forwardRef(Jt(function(e,o){const s=om(Su,e.__scopeDialog),{forceMount:a=s.forceMount,...l}=e,u=bn(Su,e.__scopeDialog);return u.modal?_.jsx(Ln,{present:a||u.open,children:_.jsx(MS,{...l,ref:o})}):null},"DialogOverlay")),$S=xn("DialogOverlay.RemoveScroll"),MS=f.forwardRef(Jt(function(e,o){const{__scopeDialog:s,...a}=e,l=bn(Su,s),u=Nh(),d=Ve(o,u);return _.jsx(ei,{as:$S,allowPinchZoom:!0,shards:[l.contentRef],children:_.jsx(ze.div,{"data-state":Ma(l.open),...a,ref:d,style:{pointerEvents:"auto",...a.style}})})},"DialogOverlayImpl")),ti="DialogContent",Cu=f.forwardRef(Jt(function(e,o){const s=om(ti,e.__scopeDialog),{forceMount:a=s.forceMount,...l}=e,u=bn(ti,e.__scopeDialog);return _.jsx(Ln,{present:a||u.open,children:u.modal?_.jsx(jS,{...l,ref:o}):_.jsx(LS,{...l,ref:o})})},"DialogContent")),jS=f.forwardRef(Jt(function(e,o){const s=bn(ti,e.__scopeDialog),a=f.useRef(null),l=Ve(o,s.contentRef,a);return f.useEffect(()=>{const u=a.current;if(u)return Aa(u)},[]),_.jsx(sm,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:ke(e.onCloseAutoFocus,u=>{u.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0;(d.button===2||h)&&u.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,u=>u.preventDefault())})},"DialogContentModal")),LS=f.forwardRef(Jt(function(e,o){const s=bn(ti,e.__scopeDialog),a=f.useRef(!1),l=f.useRef(!1);return _.jsx(sm,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),u.defaultPrevented||(a.current||s.triggerRef.current?.focus(),u.preventDefault()),a.current=!1,l.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),u.defaultPrevented||(a.current=!0,u.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=u.target;s.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&l.current&&u.preventDefault()}})},"DialogContentNonModal")),sm=f.forwardRef(Jt(function(e,o){const{__scopeDialog:s,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:u,...d}=e,h=bn(ti,s);return os(),_.jsx(_.Fragment,{children:_.jsx(Ca,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:l,onUnmountAutoFocus:u,children:_.jsx(ka,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":Ma(h.open),...d,ref:o,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),zS="DialogTitle",im=f.forwardRef(Jt(function(e,o){const{__scopeDialog:s,...a}=e,l=bn(zS,s),{setTitleCount:u}=l;return ht(()=>(u(d=>d+1),()=>u(d=>d-1)),[u]),_.jsx(ze.h2,{id:l.titleId,...a,ref:o})},"DialogTitle")),FS="DialogDescription",am=f.forwardRef(Jt(function(e,o){const{__scopeDialog:s,...a}=e,l=bn(FS,s),{setDescriptionCount:u}=l;return ht(()=>(u(d=>d+1),()=>u(d=>d-1)),[u]),_.jsx(ze.p,{id:l.descriptionId,...a,ref:o})},"DialogDescription")),VS="DialogClose",$a=f.forwardRef(Jt(function(e,o){const{__scopeDialog:s,...a}=e,l=bn(VS,s);return _.jsx(ze.button,{type:"button",...a,ref:o,onClick:ke(e.onClick,()=>l.onOpenChange(!1))})},"DialogClose"));function Ma(n){return n?"open":"closed"}Jt(Ma,"getState");var US=Object.defineProperty,ar=(n,e)=>US(n,"name",{value:e,configurable:!0}),BS="AlertDialog",[HS,A2]=wn(BS,[nm]),lr=nm(),WS=ar(n=>{const{__scopeAlertDialog:e,...o}=n,s=lr(e);return _.jsx(wu,{...s,...o,modal:!0})},"AlertDialog");f.forwardRef(ar(function(e,o){const{__scopeAlertDialog:s,...a}=e,l=lr(s);return _.jsx(TS,{...l,...a,ref:o})},"AlertDialogTrigger"));var KS=ar(n=>{const{__scopeAlertDialog:e,...o}=n,s=lr(e);return _.jsx(bu,{...s,...o})},"AlertDialogPortal"),ZS=f.forwardRef(ar(function(e,o){const{__scopeAlertDialog:s,...a}=e,l=lr(s);return _.jsx(ku,{...l,...a,ref:o})},"AlertDialogOverlay")),GS="AlertDialogContent",[qS,YS]=HS(GS),QS=f.forwardRef(ar(function(e,o){const{__scopeAlertDialog:s,children:a,...l}=e,u=lr(s),d=f.useRef(null),h=Ve(o,d),m=f.useRef(null);return _.jsx(qS,{scope:s,cancelRef:m,children:_.jsx(Cu,{role:"alertdialog",...u,...l,ref:h,onOpenAutoFocus:ke(l.onOpenAutoFocus,v=>{v.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:v=>v.preventDefault(),onInteractOutside:v=>v.preventDefault(),children:a})})},"AlertDialogContent")),XS=f.forwardRef(ar(function(e,o){const{__scopeAlertDialog:s,...a}=e,l=lr(s);return _.jsx(im,{...l,...a,ref:o})},"AlertDialogTitle")),JS=f.forwardRef(ar(function(e,o){const{__scopeAlertDialog:s,...a}=e,l=lr(s);return _.jsx(am,{...l,...a,ref:o})},"AlertDialogDescription"));f.forwardRef(ar(function(e,o){const{__scopeAlertDialog:s,...a}=e,l=lr(s);return _.jsx($a,{...l,...a,ref:o})},"AlertDialogAction"));var e1="AlertDialogCancel",t1=f.forwardRef(ar(function(e,o){const{__scopeAlertDialog:s,...a}=e,{cancelRef:l}=YS(e1,s),u=lr(s),d=Ve(o,l);return _.jsx($a,{...u,...a,ref:d})},"AlertDialogCancel")),n1=WS,r1=KS,o1=ZS,s1=QS,i1=t1,a1=XS,l1=JS,c1=Object.defineProperty,u1=(n,e)=>c1(n,"name",{value:e,configurable:!0});function lm(n){const[e,o]=f.useState(void 0);return ht(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,d;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,d=m.blockSize}else u=n.offsetWidth,d=n.offsetHeight;o({width:u,height:d})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else o(void 0)},[n]),e}u1(lm,"useSize");const d1=["top","right","bottom","left"],$r=Math.min,cr=Math.max,ja=Math.round,La=Math.floor,ur=n=>({x:n,y:n}),f1={left:"right",right:"left",bottom:"top",top:"bottom"};function cm(n,e,o){return cr(n,$r(e,o))}function dr(n,e){return typeof n=="function"?n(e):n}function Mr(n){return n.split("-")[0]}function cs(n){return n.split("-")[1]}function _u(n){return n==="x"?"y":"x"}function Eu(n){return n==="y"?"height":"width"}function Fn(n){const e=n[0];return e==="t"||e==="b"?"y":"x"}function Pu(n){return _u(Fn(n))}function p1(n,e,o){o===void 0&&(o=!1);const s=cs(n),a=Pu(n),l=Eu(a);let u=a==="x"?s===(o?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[l]>e.floating[l]&&(u=za(u)),[u,za(u)]}function h1(n){const e=za(n);return[Ru(n),e,Ru(e)]}function Ru(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const um=["left","right"],dm=["right","left"],m1=["top","bottom"],g1=["bottom","top"];function v1(n,e,o){switch(n){case"top":case"bottom":return o?e?dm:um:e?um:dm;case"left":case"right":return e?m1:g1;default:return[]}}function y1(n,e,o,s){const a=cs(n);let l=v1(Mr(n),o==="start",s);return a&&(l=l.map(u=>u+"-"+a),e&&(l=l.concat(l.map(Ru)))),l}function za(n){const e=Mr(n);return f1[e]+n.slice(e.length)}function x1(n){var e,o,s,a;return{top:(e=n.top)!=null?e:0,right:(o=n.right)!=null?o:0,bottom:(s=n.bottom)!=null?s:0,left:(a=n.left)!=null?a:0}}function fm(n){return typeof n!="number"?x1(n):{top:n,right:n,bottom:n,left:n}}function Fa(n){const{x:e,y:o,width:s,height:a}=n;return{width:s,height:a,top:o,left:e,right:e+s,bottom:o+a,x:e,y:o}}function pm(n,e,o){let{reference:s,floating:a}=n;const l=Fn(e),u=Pu(e),d=Eu(u),h=Mr(e),m=l==="y",v=s.x+s.width/2-a.width/2,y=s.y+s.height/2-a.height/2,w=s[d]/2-a[d]/2;let b;switch(h){case"top":b={x:v,y:s.y-a.height};break;case"bottom":b={x:v,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y};break;case"left":b={x:s.x-a.width,y};break;default:b={x:s.x,y:s.y}}const S=cs(e);return S&&(b[u]+=w*(S==="end"?1:-1)*(o&&m?-1:1)),b}async function w1(n,e){var o;e===void 0&&(e={});const{x:s,y:a,platform:l,rects:u,elements:d,strategy:h}=n,{boundary:m="clippingAncestors",rootBoundary:v="viewport",elementContext:y="floating",altBoundary:w=!1,padding:b=0}=dr(e,n),S=fm(b),k=d[w?y==="floating"?"reference":"floating":y],A=Fa(await l.getClippingRect({element:(o=await(l.isElement==null?void 0:l.isElement(k)))==null||o?k:k.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:m,rootBoundary:v,strategy:h})),N=y==="floating"?{x:s,y:a,width:u.floating.width,height:u.floating.height}:u.reference,O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),T=await(l.isElement==null?void 0:l.isElement(O))&&await(l.getScale==null?void 0:l.getScale(O))||{x:1,y:1},z=Fa(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:N,offsetParent:O,strategy:h}):N);return{top:(A.top-z.top+S.top)/T.y,bottom:(z.bottom-A.bottom+S.bottom)/T.y,left:(A.left-z.left+S.left)/T.x,right:(z.right-A.right+S.right)/T.x}}const b1=50,S1=async(n,e,o)=>{const{placement:s="bottom",strategy:a="absolute",middleware:l=[],platform:u}=o,d=u.detectOverflow?u:{...u,detectOverflow:w1},h=await(u.isRTL==null?void 0:u.isRTL(e));let m=await u.getElementRects({reference:n,floating:e,strategy:a}),{x:v,y}=pm(m,s,h),w=s,b=0;const S={};for(let C=0;C<l.length;C++){const k=l[C];if(!k)continue;const{name:A,fn:N}=k,{x:O,y:T,data:z,reset:R}=await N({x:v,y,initialPlacement:s,placement:w,strategy:a,middlewareData:S,rects:m,platform:d,elements:{reference:n,floating:e}});v=O??v,y=T??y,S[A]={...S[A],...z},R&&b<b1&&(b++,typeof R=="object"&&(R.placement&&(w=R.placement),R.rects&&(m=R.rects===!0?await u.getElementRects({reference:n,floating:e,strategy:a}):R.rects),{x:v,y}=pm(m,w,h)),C=-1)}return{x:v,y,placement:w,strategy:a,middlewareData:S}},k1=n=>({name:"arrow",options:n,async fn(e){const{x:o,y:s,placement:a,rects:l,platform:u,elements:d,middlewareData:h}=e,{element:m,padding:v=0}=dr(n,e)||{};if(m==null)return{};const y=fm(v),w={x:o,y:s},b=Pu(a),S=Eu(b),C=await u.getDimensions(m),k=b==="y",A=k?"top":"left",N=k?"bottom":"right",O=k?"clientHeight":"clientWidth",T=l.reference[S]+l.reference[b]-w[b]-l.floating[S],z=w[b]-l.reference[b],R=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let B=R?R[O]:0;(!B||!await(u.isElement==null?void 0:u.isElement(R)))&&(B=d.floating[O]||l.floating[S]);const L=T/2-z/2,Z=B/2-C[S]/2-1,ae=$r(y[A],Z),be=$r(y[N],Z),ue=B-C[S]-be,ce=B/2-C[S]/2+L,Y=cm(ae,ce,ue),xe=!h.arrow&&cs(a)!=null&&ce!==Y&&l.reference[S]/2-(ce<ae?ae:be)-C[S]/2<0,le=xe?ce<ae?ce-ae:ce-ue:0;return{[b]:w[b]+le,data:{[b]:Y,centerOffset:ce-Y-le,...xe&&{alignmentOffset:le}},reset:xe}}}),C1=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var o,s;const{placement:a,middlewareData:l,rects:u,initialPlacement:d,platform:h,elements:m}=e,{mainAxis:v=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...k}=dr(n,e);if((o=l.arrow)!=null&&o.alignmentOffset)return{};const A=Mr(a),N=Fn(d),O=Mr(d)===d,T=await(h.isRTL==null?void 0:h.isRTL(m.floating)),z=w||(O||!C?[za(d)]:h1(d)),R=S!=="none";!w&&R&&z.push(...y1(d,C,S,T));const B=[d,...z],L=await h.detectOverflow(e,k),Z=[];let ae=((s=l.flip)==null?void 0:s.overflows)||[];if(v&&Z.push(L[A]),y){const Y=p1(a,u,T);Z.push(L[Y[0]],L[Y[1]])}if(ae=[...ae,{placement:a,overflows:Z}],!Z.every(Y=>Y<=0)){var be,ue;const Y=(((be=l.flip)==null?void 0:be.index)||0)+1,xe=B[Y];if(xe&&(!(y==="alignment"?N!==Fn(xe):!1)||ae.every(U=>Fn(U.placement)===N?U.overflows[0]>0:!0)))return{data:{index:Y,overflows:ae},reset:{placement:xe}};let le=(ue=ae.filter(te=>te.overflows[0]<=0).sort((te,U)=>te.overflows[1]-U.overflows[1])[0])==null?void 0:ue.placement;if(!le)switch(b){case"bestFit":{var ce;const te=(ce=ae.filter(U=>{if(R){const G=Fn(U.placement);return G===N||G==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(G=>G>0).reduce((G,$)=>G+$,0)]).sort((U,G)=>U[1]-G[1])[0])==null?void 0:ce[0];te&&(le=te);break}case"initialPlacement":le=d;break}if(a!==le)return{reset:{placement:le}}}return{}}}};function hm(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function mm(n){return d1.some(e=>n[e]>=0)}const _1=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:o,platform:s}=e,{strategy:a="referenceHidden",...l}=dr(n,e);switch(a){case"referenceHidden":{const u=await s.detectOverflow(e,{...l,elementContext:"reference"}),d=hm(u,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:mm(d)}}}case"escaped":{const u=await s.detectOverflow(e,{...l,altBoundary:!0}),d=hm(u,o.floating);return{data:{escapedOffsets:d,escaped:mm(d)}}}default:return{}}}}},gm=new Set(["left","top"]);async function E1(n,e){const{placement:o,platform:s,elements:a}=n,l=await(s.isRTL==null?void 0:s.isRTL(a.floating)),u=Mr(o),d=cs(o),h=Fn(o)==="y",m=gm.has(u)?-1:1,v=l&&h?-1:1,y=dr(e,n);let{mainAxis:w,crossAxis:b,alignmentAxis:S}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return d&&typeof S=="number"&&(b=d==="end"?S*-1:S),h?{x:b*v,y:w*m}:{x:w*m,y:b*v}}const P1=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var o,s;const{x:a,y:l,placement:u,middlewareData:d}=e,h=await E1(e,n);return u===((o=d.offset)==null?void 0:o.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+h.x,y:l+h.y,data:{...h,placement:u}}}}},R1=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:o,y:s,placement:a,platform:l}=e,{mainAxis:u=!0,crossAxis:d=!1,limiter:h={fn:N=>{let{x:O,y:T}=N;return{x:O,y:T}}},...m}=dr(n,e),v={x:o,y:s},y=await l.detectOverflow(e,m),w=Fn(a),b=_u(w);let S=v[b],C=v[w];const k=(N,O)=>cm(O+y[N==="y"?"top":"left"],O,O-y[N==="y"?"bottom":"right"]);u&&(S=k(b,S)),d&&(C=k(w,C));const A=h.fn({...e,[b]:S,[w]:C});return{...A,data:{x:A.x-o,y:A.y-s,enabled:{[b]:u,[w]:d}}}}}},I1=function(n){return n===void 0&&(n={}),{options:n,fn(e){var o,s;const{x:a,y:l,placement:u,rects:d,middlewareData:h}=e,{offset:m=0,mainAxis:v=!0,crossAxis:y=!0}=dr(n,e),w={x:a,y:l},b=Fn(u),S=_u(b);let C=w[S],k=w[b];const A=dr(m,e),N=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:(o=A.mainAxis)!=null?o:0,crossAxis:(s=A.crossAxis)!=null?s:0};if(v){const z=S==="y"?"height":"width",R=d.reference[S]-d.floating[z]+N.mainAxis,B=d.reference[S]+d.reference[z]-N.mainAxis;C<R?C=R:C>B&&(C=B)}if(y){var O,T;const z=S==="y"?"width":"height",R=gm.has(Mr(u)),B=d.reference[b]-d.floating[z]+(R&&((O=h.offset)==null?void 0:O[b])||0)+(R?0:N.crossAxis),L=d.reference[b]+d.reference[z]+(R?0:((T=h.offset)==null?void 0:T[b])||0)-(R?N.crossAxis:0);k<B?k=B:k>L&&(k=L)}return{[S]:C,[b]:k}}}},D1=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){const{placement:o,rects:s,platform:a,elements:l}=e,{apply:u=()=>{},...d}=dr(n,e),h=await a.detectOverflow(e,d),m=Mr(o),v=cs(o),y=Fn(o)==="y",{width:w,height:b}=s.floating;let S,C;m==="top"||m==="bottom"?(S=m,C=v===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(C=m,S=v==="end"?"top":"bottom");const k=b-h.top-h.bottom,A=w-h.left-h.right,N=$r(b-h[S],k),O=$r(w-h[C],A),T=e.middlewareData.shift,z=!T;let R=N,B=O;T!=null&&T.enabled.x&&(B=A),T!=null&&T.enabled.y&&(R=k),z&&!v&&(y?B=w-2*cr(h.left,h.right):R=b-2*cr(h.top,h.bottom)),await u({...e,availableWidth:B,availableHeight:R});const L=await a.getDimensions(l.floating);return w!==L.width||b!==L.height?{reset:{rects:!0}}:{}}}};function Va(){return typeof window<"u"}function us(n){return vm(n)?(n.nodeName||"").toLowerCase():"#document"}function Zt(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function fr(n){var e;return(e=(vm(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function vm(n){return Va()?n instanceof Node||n instanceof Zt(n).Node:!1}function Vn(n){return Va()?n instanceof Element||n instanceof Zt(n).Element:!1}function jr(n){return Va()?n instanceof HTMLElement||n instanceof Zt(n).HTMLElement:!1}function ym(n){return!Va()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Zt(n).ShadowRoot}function Ua(n){const{overflow:e,overflowX:o,overflowY:s,display:a}=Un(n);return/auto|scroll|overlay|hidden|clip/.test(e+s+o)&&a!=="inline"&&a!=="contents"}function N1(n){return/^(table|td|th)$/.test(us(n))}function Ba(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const O1=/transform|translate|scale|rotate|perspective|filter/,T1=/paint|layout|strict|content/,_o=n=>!!n&&n!=="none";let Iu;function Du(n){const e=Vn(n)?Un(n):n;return _o(e.transform)||_o(e.translate)||_o(e.scale)||_o(e.rotate)||_o(e.perspective)||!Nu()&&(_o(e.backdropFilter)||_o(e.filter))||O1.test(e.willChange||"")||T1.test(e.contain||"")}function A1(n){let e=Eo(n);for(;jr(e)&&!ni(e);){if(Du(e))return e;if(Ba(e))return null;e=Eo(e)}return null}function Nu(){return Iu==null&&(Iu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Iu}function ni(n){return/^(html|body|#document)$/.test(us(n))}function Un(n){return Zt(n).getComputedStyle(n)}function Ha(n){return Vn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Eo(n){if(us(n)==="html")return n;const e=n.assignedSlot||n.parentNode||ym(n)&&n.host||fr(n);return ym(e)?e.host:e}function xm(n){const e=Eo(n);return ni(e)?(n.ownerDocument||n).body:jr(e)&&Ua(e)?e:xm(e)}function ri(n,e,o){var s;e===void 0&&(e=[]),o===void 0&&(o=!0);const a=xm(n),l=a===((s=n.ownerDocument)==null?void 0:s.body),u=Zt(a);if(l){const d=Ou(u);return e.concat(u,u.visualViewport||[],Ua(a)?a:[],d&&o?ri(d):[])}else return e.concat(a,ri(a,[],o))}function Ou(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function wm(n){const e=Un(n);let o=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const a=jr(n),l=a?n.offsetWidth:o,u=a?n.offsetHeight:s,d=ja(o)!==l||ja(s)!==u;return d&&(o=l,s=u),{width:o,height:s,$:d}}function Tu(n){return Vn(n)?n:n.contextElement}function ds(n){const e=Tu(n);if(!jr(e))return ur(1);const o=e.getBoundingClientRect(),{width:s,height:a,$:l}=wm(e);let u=(l?ja(o.width):o.width)/s,d=(l?ja(o.height):o.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const $1=ur(0);function bm(n){const e=Zt(n);return!Nu()||!e.visualViewport?$1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function M1(n,e,o){return e===void 0&&(e=!1),!!o&&e&&o===Zt(n)}function Po(n,e,o,s){e===void 0&&(e=!1),o===void 0&&(o=!1);const a=n.getBoundingClientRect(),l=Tu(n);let u=ur(1);e&&(s?Vn(s)&&(u=ds(s)):u=ds(n));const d=M1(l,o,s)?bm(l):ur(0);let h=(a.left+d.x)/u.x,m=(a.top+d.y)/u.y,v=a.width/u.x,y=a.height/u.y;if(l&&s){const w=Zt(l),b=Vn(s)?Zt(s):s;let S=w,C=Ou(S);for(;C&&b!==S;){const k=ds(C),A=C.getBoundingClientRect(),N=Un(C),O=A.left+(C.clientLeft+parseFloat(N.paddingLeft))*k.x,T=A.top+(C.clientTop+parseFloat(N.paddingTop))*k.y;h*=k.x,m*=k.y,v*=k.x,y*=k.y,h+=O,m+=T,S=Zt(C),C=Ou(S)}}return Fa({width:v,height:y,x:h,y:m})}function Wa(n,e){const o=Ha(n).scrollLeft;return e?e.left+o:Po(fr(n)).left+o}function Sm(n,e){const o=n.getBoundingClientRect(),s=o.left+e.scrollLeft-Wa(n,o),a=o.top+e.scrollTop;return{x:s,y:a}}function j1(n){let{elements:e,rect:o,offsetParent:s,strategy:a}=n;const l=a==="fixed",u=fr(s),d=e?Ba(e.floating):!1;if(s===u||d&&l)return o;let h={scrollLeft:0,scrollTop:0},m=ur(1);const v=ur(0),y=jr(s);if((y||!l)&&((us(s)!=="body"||Ua(u))&&(h=Ha(s)),y)){const b=Po(s);m=ds(s),v.x=b.x+s.clientLeft,v.y=b.y+s.clientTop}const w=u&&!y&&!l?Sm(u,h):ur(0);return{width:o.width*m.x,height:o.height*m.y,x:o.x*m.x-h.scrollLeft*m.x+v.x+w.x,y:o.y*m.y-h.scrollTop*m.y+v.y+w.y}}function L1(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function z1(n){const e=Ha(n),o=n.ownerDocument.body,s=cr(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),a=cr(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-e.scrollLeft+Wa(n);const u=-e.scrollTop;return Un(o).direction==="rtl"&&(l+=cr(n.clientWidth,o.clientWidth)-s),{width:s,height:a,x:l,y:u}}const F1=25;function V1(n,e,o){o===void 0&&(o="viewport");const s=o==="layoutViewport",a=Zt(n),l=fr(n),u=a.visualViewport;let d=l.clientWidth,h=l.clientHeight,m=0,v=0;if(u){const w=!Nu()||e==="fixed";s?w||(m=-u.offsetLeft,v=-u.offsetTop):(d=u.width,h=u.height,w&&(m=u.offsetLeft,v=u.offsetTop))}if(Wa(l)<=0){const w=l.ownerDocument,b=w.body,S=getComputedStyle(b),C=w.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,k=Math.abs(l.clientWidth-b.clientWidth-C),A=getComputedStyle(l).scrollbarGutter==="stable both-edges"?k/2:k;A<=F1&&(d-=A)}return{width:d,height:h,x:m,y:v}}function U1(n,e){const o=Po(n,!0,e==="fixed"),s=o.top+n.clientTop,a=o.left+n.clientLeft,l=ds(n),u=n.clientWidth*l.x,d=n.clientHeight*l.y,h=a*l.x,m=s*l.y;return{width:u,height:d,x:h,y:m}}function km(n,e,o){let s;if(e==="viewport"||e==="layoutViewport")s=V1(n,o,e);else if(e==="document")s=z1(fr(n));else if(Vn(e))s=U1(e,o);else{const a=bm(n);s={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Fa(s)}function B1(n,e){const o=e.get(n);if(o)return o;let s=ri(n,[],!1).filter(d=>Vn(d)&&us(d)!=="body"),a=null;const l=Un(n).position==="fixed";let u=l?Eo(n):n;for(;Vn(u)&&!ni(u);){const d=Un(u),h=Du(u),m=a?a.position:l?"fixed":"";!h&&(m==="fixed"||m==="absolute"&&d.position==="static")?s=s.filter(y=>y!==u):a=d,u=Eo(u)}return e.set(n,s),s}function H1(n){let{element:e,boundary:o,rootBoundary:s,strategy:a}=n;const u=[...o==="clippingAncestors"?Ba(e)?[]:B1(e,this._c):[].concat(o),s],d=km(e,u[0],a);let h=d.top,m=d.right,v=d.bottom,y=d.left;for(let w=1;w<u.length;w++){const b=km(e,u[w],a);h=cr(b.top,h),m=$r(b.right,m),v=$r(b.bottom,v),y=cr(b.left,y)}return{width:m-y,height:v-h,x:y,y:h}}function W1(n){const{width:e,height:o}=wm(n);return{width:e,height:o}}function K1(n,e,o){const s=jr(e),a=fr(e),l=o==="fixed",u=Po(n,!0,l,e);let d={scrollLeft:0,scrollTop:0};const h=ur(0);if((s||!l)&&((us(e)!=="body"||Ua(a))&&(d=Ha(e)),s)){const w=Po(e,!0,l,e);h.x=w.x+e.clientLeft,h.y=w.y+e.clientTop}!s&&a&&(h.x=Wa(a));const m=a&&!s&&!l?Sm(a,d):ur(0),v=u.left+d.scrollLeft-h.x-m.x,y=u.top+d.scrollTop-h.y-m.y;return{x:v,y,width:u.width,height:u.height}}function Au(n){return Un(n).position==="static"}function Cm(n,e){if(!jr(n)||Un(n).position==="fixed")return null;if(e)return e(n);let o=n.offsetParent;return fr(n)===o&&(o=o.ownerDocument.body),o}function _m(n,e){const o=Zt(n);if(Ba(n))return o;if(!jr(n)){let a=Eo(n);for(;a&&!ni(a);){if(Vn(a)&&!Au(a))return a;a=Eo(a)}return o}let s=Cm(n,e);for(;s&&N1(s)&&Au(s);)s=Cm(s,e);return s&&ni(s)&&Au(s)&&!Du(s)?o:s||A1(n)||o}const Z1=async function(n){const e=this.getOffsetParent||_m,o=this.getDimensions,s=await o(n.floating);return{reference:K1(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function G1(n){return Un(n).direction==="rtl"}const q1={convertOffsetParentRelativeRectToViewportRelativeRect:j1,getDocumentElement:fr,getClippingRect:H1,getOffsetParent:_m,getElementRects:Z1,getClientRects:L1,getDimensions:W1,getScale:ds,isElement:Vn,isRTL:G1};function Em(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function Y1(n,e,o){let s=null,a;const l=fr(n);function u(){var v;clearTimeout(a),(v=s)==null||v.disconnect(),s=null}function d(v,y){v===void 0&&(v=!1),y===void 0&&(y=1),u();const w=n.getBoundingClientRect(),{left:b,top:S,width:C,height:k}=w;if(v||e(),!C||!k)return;const A=La(S),N=La(l.clientWidth-(b+C)),O=La(l.clientHeight-(S+k)),T=La(b),R={rootMargin:-A+"px "+-N+"px "+-O+"px "+-T+"px",threshold:cr(0,$r(1,y))||1};let B=!0;function L(Z){const ae=Z[0].intersectionRatio;if(!Em(w,n.getBoundingClientRect()))return d();if(ae!==y){if(!B)return d();ae?d(!1,ae):a=setTimeout(()=>{d(!1,1e-7)},1e3)}B=!1}try{s=new IntersectionObserver(L,{...R,root:l.ownerDocument})}catch{s=new IntersectionObserver(L,R)}s.observe(n)}const h=Zt(n),m=()=>d(o);return h.addEventListener("resize",m),d(!0),()=>{h.removeEventListener("resize",m),u()}}function Q1(n,e,o,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,m=Tu(n),v=a||l?[...m?ri(m):[],...e?ri(e):[]]:[];v.forEach(A=>{a&&A.addEventListener("scroll",o),l&&A.addEventListener("resize",o)});const y=m&&d?Y1(m,o,l):null;let w=-1,b=null;u&&(b=new ResizeObserver(A=>{let[N]=A;N&&N.target===m&&b&&e&&(b.unobserve(e),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(e)})),o()}),m&&!h&&b.observe(m),e&&b.observe(e));let S,C=h?Po(n):null;h&&k();function k(){const A=Po(n);C&&!Em(C,A)&&o(),C=A,S=requestAnimationFrame(k)}return o(),()=>{var A;v.forEach(N=>{a&&N.removeEventListener("scroll",o),l&&N.removeEventListener("resize",o)}),y?.(),(A=b)==null||A.disconnect(),b=null,h&&cancelAnimationFrame(S)}}const X1=P1,J1=R1,ek=C1,tk=D1,nk=_1,Pm=k1,rk=I1,ok=(n,e,o)=>{const s=new Map,a=o??{},l={...q1,...a.platform,_c:s};return S1(n,e,{...a,platform:l})};var sk=typeof document<"u",ik=function(){},Ka=sk?f.useLayoutEffect:ik;function Za(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let o,s,a;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==e.length)return!1;for(s=o;s--!==0;)if(!Za(n[s],e[s]))return!1;return!0}if(a=Object.keys(n),o=a.length,o!==Object.keys(e).length)return!1;for(s=o;s--!==0;)if(!{}.hasOwnProperty.call(e,a[s]))return!1;for(s=o;s--!==0;){const l=a[s];if(!(l==="_owner"&&n.$$typeof)&&!Za(n[l],e[l]))return!1}return!0}return n!==n&&e!==e}function Rm(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Im(n,e){const o=Rm(n);return Math.round(e*o)/o}function $u(n){const e=f.useRef(n);return Ka(()=>{e.current=n}),e}function ak(n){n===void 0&&(n={});const{placement:e="bottom",strategy:o="absolute",middleware:s=[],platform:a,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:h,open:m}=n,[v,y]=f.useState({x:0,y:0,strategy:o,placement:e,middlewareData:{},isPositioned:!1}),[w,b]=f.useState(s);Za(w,s)||b(s);const[S,C]=f.useState(null),[k,A]=f.useState(null),N=f.useCallback(U=>{U!==R.current&&(R.current=U,C(U))},[]),O=f.useCallback(U=>{U!==B.current&&(B.current=U,A(U))},[]),T=l||S,z=u||k,R=f.useRef(null),B=f.useRef(null),L=f.useRef(v),Z=h!=null,ae=$u(h),be=$u(a),ue=$u(m),ce=f.useCallback(()=>{if(!R.current||!B.current)return;const U={placement:e,strategy:o,middleware:w};be.current&&(U.platform=be.current),ok(R.current,B.current,U).then(G=>{const $={...G,isPositioned:ue.current!==!1};Y.current&&!Za(L.current,$)&&(L.current=$,Xs.flushSync(()=>{y($)}))})},[w,e,o,be,ue]);Ka(()=>{m===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,y(U=>({...U,isPositioned:!1})))},[m]);const Y=f.useRef(!1);Ka(()=>(Y.current=!0,()=>{Y.current=!1}),[]),Ka(()=>{if(T&&(R.current=T),z&&(B.current=z),T&&z){if(ae.current)return ae.current(T,z,ce);ce()}},[T,z,ce,ae,Z]);const xe=f.useMemo(()=>({reference:R,floating:B,setReference:N,setFloating:O}),[N,O]),le=f.useMemo(()=>({reference:T,floating:z}),[T,z]),te=f.useMemo(()=>{const U={position:o,left:0,top:0};if(!le.floating)return U;const G=Im(le.floating,v.x),$=Im(le.floating,v.y);return d?{...U,transform:"translate("+G+"px, "+$+"px)",...Rm(le.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:G,top:$}},[o,d,le.floating,v.x,v.y]);return f.useMemo(()=>({...v,update:ce,refs:xe,elements:le,floatingStyles:te}),[v,ce,xe,le,te])}const lk=n=>{function e(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:s,padding:a}=typeof n=="function"?n(o):n;return s&&e(s)?s.current!=null?Pm({element:s.current,padding:a}).fn(o):{}:s?Pm({element:s,padding:a}).fn(o):{}}}},ck=(n,e)=>{const o=X1(n);return{name:o.name,fn:o.fn,options:[n,e]}},uk=(n,e)=>{const o=J1(n);return{name:o.name,fn:o.fn,options:[n,e]}},dk=(n,e)=>({fn:rk(n).fn,options:[n,e]}),fk=(n,e)=>{const o=ek(n);return{name:o.name,fn:o.fn,options:[n,e]}},pk=(n,e)=>{const o=tk(n);return{name:o.name,fn:o.fn,options:[n,e]}},hk=(n,e)=>{const o=nk(n);return{name:o.name,fn:o.fn,options:[n,e]}},mk=(n,e)=>{const o=lk(n);return{name:o.name,fn:o.fn,options:[n,e]}};var gk=Object.defineProperty,Lr=(n,e)=>gk(n,"name",{value:e,configurable:!0}),Dm="Popper",[Nm,fs]=wn(Dm),[vk,Om]=Nm(Dm),yk=Lr(n=>{const{__scopePopper:e,children:o}=n,[s,a]=f.useState(null),[l,u]=f.useState(void 0);return _.jsx(vk,{scope:e,anchor:s,onAnchorChange:a,placementState:l,setPlacementState:u,children:o})},"Popper"),xk="PopperAnchor",wk=f.forwardRef(Lr(function(e,o){const{__scopePopper:s,virtualRef:a,...l}=e,u=Om(xk,s),d=f.useRef(null),h=u.onAnchorChange,m=f.useCallback(C=>{d.current=C,C&&h(C)},[h]),v=Ve(o,m),y=f.useRef(null);f.useEffect(()=>{if(!a)return;const C=y.current;y.current=a.current,C!==y.current&&h(y.current)});const w=u.placementState&&Ga(u.placementState),b=w?.[0],S=w?.[1];return a?null:_.jsx(ze.div,{"data-radix-popper-side":b,"data-radix-popper-align":S,...l,ref:v})},"PopperAnchor")),Tm="PopperContent",[bk,$2]=Nm(Tm),Sk=f.forwardRef(Lr(function(e,o){const{__scopePopper:s,side:a="bottom",sideOffset:l=0,align:u="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:C,...k}=e,A=Om(Tm,s),[N,O]=f.useState(null),T=Ve(o,O),[z,R]=f.useState(null),B=lm(z),L=B?.width??0,Z=B?.height??0,ae=a+(u!=="center"?"-"+u:""),be=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},ue=Array.isArray(v)?v:[v],ce=ue.length>0,Y={padding:be,boundary:ue.filter(Am),altBoundary:ce},{refs:xe,floatingStyles:le,placement:te,isPositioned:U,middlewareData:G}=ak({strategy:"fixed",placement:ae,whileElementsMounted:Lr((...se)=>Q1(...se,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:A.anchor},middleware:[ck({mainAxis:l+Z,alignmentAxis:d}),m&&uk({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?dk():void 0,...Y}),m&&fk({...Y}),pk({...Y,apply:Lr(({elements:se,rects:Ne,availableWidth:$e,availableHeight:We})=>{const{width:Ue,height:ft}=Ne.reference,wt=se.floating.style;wt.setProperty("--radix-popper-available-width",`${$e}px`),wt.setProperty("--radix-popper-available-height",`${We}px`),wt.setProperty("--radix-popper-anchor-width",`${Ue}px`),wt.setProperty("--radix-popper-anchor-height",`${ft}px`)},"apply")}),z&&mk({element:z,padding:h}),kk({arrowWidth:L,arrowHeight:Z}),b&&hk({strategy:"referenceHidden",...Y,boundary:ce?Y.boundary:void 0})]}),$=A.setPlacementState;ht(()=>($(te),()=>{$(void 0)}),[te,$]);const[D,P]=Ga(te),W=Kt(C);ht(()=>{U&&W?.()},[U,W]);const J=G.arrow?.x,H=G.arrow?.y,oe=G.arrow?.centerOffset!==0,[de,K]=f.useState();return ht(()=>{N&&K(window.getComputedStyle(N).zIndex)},[N]),_.jsx("div",{ref:xe.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:U?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[G.transformOrigin?.x,G.transformOrigin?.y].join(" "),...G.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:_.jsx(bk,{scope:s,placedSide:D,placedAlign:P,onArrowChange:R,arrowX:J,arrowY:H,shouldHideArrow:oe,children:_.jsx(ze.div,{"data-side":D,"data-align":P,...k,ref:T,style:{...k.style,animation:U?k.style?.animation:"none"}})})})},"PopperContent"));function Am(n){return n!==null}Lr(Am,"isNotNull");var kk=Lr(n=>({name:"transformOrigin",options:n,fn(e){const{placement:o,rects:s,middlewareData:a}=e,u=a.arrow?.centerOffset!==0,d=u?0:n.arrowWidth,h=u?0:n.arrowHeight,[m,v]=Ga(o),y={start:"0%",center:"50%",end:"100%"}[v],w=(a.arrow?.x??0)+d/2,b=(a.arrow?.y??0)+h/2;let S="",C="";return m==="bottom"?(S=u?y:`${w}px`,C=`${-h}px`):m==="top"?(S=u?y:`${w}px`,C=`${s.floating.height+h}px`):m==="right"?(S=`${-h}px`,C=u?y:`${b}px`):m==="left"&&(S=`${s.floating.width+h}px`,C=u?y:`${b}px`),{data:{x:S,y:C}}}}),"transformOrigin");function Ga(n){const[e,o="center"]=n.split("-");return[e,o]}Lr(Ga,"getSideAndAlignFromPlacement");var qa=yk,Mu=wk,ju=Sk,Ck=Object.defineProperty,Lu=(n,e)=>Ck(n,"name",{value:e,configurable:!0}),zu=!1;function $m(){const[n,e]=f.useState(zu);return f.useEffect(()=>{zu||(zu=!0,e(!0))},[]),n}Lu($m,"useIsHydrated");var Mm=Qo[" useSyncExternalStore ".trim().toString()];function jm(){return()=>{}}Lu(jm,"subscribe");function Lm(){return Mm(jm,()=>!0,()=>!1)}Lu(Lm,"useIsHydratedModern");var _k=typeof Mm=="function"?Lm:$m,Ek=Object.defineProperty,Ro=(n,e)=>Ek(n,"name",{value:e,configurable:!0}),Fu="rovingFocusGroup.onEntryFocus",Pk={bubbles:!1,cancelable:!0},Ya="RovingFocusGroup",[Vu,zm,Rk]=wa(Ya),[Ik,Fm]=wn(Ya,[Rk]),[Dk,Nk]=Ik(Ya),Ok=f.forwardRef(Ro(function(e,o){return _.jsx(Vu.Provider,{scope:e.__scopeRovingFocusGroup,children:_.jsx(Vu.Slot,{scope:e.__scopeRovingFocusGroup,children:_.jsx(Tk,{...e,ref:o})})})},"RovingFocusGroup")),Tk=f.forwardRef(Ro(function(e,o){const{__scopeRovingFocusGroup:s,orientation:a,loop:l=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:v,preventScrollOnEntryFocus:y=!1,...w}=e,b=f.useRef(null),S=Ve(o,b),C=Sa(u),[k,A]=Ar({prop:d,defaultProp:h??null,onChange:m,caller:Ya}),[N,O]=f.useState(!1),T=Kt(v),z=zm(s),R=f.useRef(!1),[B,L]=f.useState(0);return f.useEffect(()=>{const Z=b.current;if(Z)return Z.addEventListener(Fu,T),()=>Z.removeEventListener(Fu,T)},[T]),_.jsx(Dk,{scope:s,orientation:a,dir:C,loop:l,currentTabStopId:k,onItemFocus:f.useCallback(Z=>A(Z),[A]),onItemShiftTab:f.useCallback(()=>O(!0),[]),onFocusableItemAdd:f.useCallback(()=>L(Z=>Z+1),[]),onFocusableItemRemove:f.useCallback(()=>L(Z=>Z-1),[]),children:_.jsx(ze.div,{tabIndex:N||B===0?-1:0,"data-orientation":a,...w,ref:S,style:{outline:"none",...e.style},onMouseDown:ke(e.onMouseDown,()=>{R.current=!0}),onFocus:ke(e.onFocus,Z=>{const ae=!R.current;if(Z.target===Z.currentTarget&&ae&&!N){const be=new CustomEvent(Fu,Pk);if(Z.currentTarget.dispatchEvent(be),!be.defaultPrevented){const ue=z().filter(te=>te.focusable),ce=ue.find(te=>te.active),Y=ue.find(te=>te.id===k),le=[ce,Y,...ue].filter(Boolean).map(te=>te.ref.current);Uu(le,y)}}R.current=!1}),onBlur:ke(e.onBlur,()=>O(!1))})})},"RovingFocusGroupImpl")),Ak="RovingFocusGroupItem",$k=f.forwardRef(Ro(function(e,o){const{__scopeRovingFocusGroup:s,focusable:a=!0,active:l=!1,tabStopId:u,children:d,...h}=e,m=Ct(),v=u||m,y=Nk(Ak,s),w=y.currentTabStopId===v,b=zm(s),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:k}=y,A=_k();return ht(()=>{if(!(!A||!a))return S(),()=>C()},[A,a,S,C]),f.useEffect(()=>{if(!(A||!a))return S(),()=>C()},[A,a,S,C]),_.jsx(Vu.ItemSlot,{scope:s,id:v,focusable:a,active:l,children:_.jsx(ze.span,{tabIndex:w?0:-1,"data-orientation":y.orientation,...h,ref:o,onMouseDown:ke(e.onMouseDown,N=>{a?y.onItemFocus(v):N.preventDefault()}),onFocus:ke(e.onFocus,()=>y.onItemFocus(v)),onKeyDown:ke(e.onKeyDown,N=>{if(N.key==="Tab"&&N.shiftKey){y.onItemShiftTab();return}if(N.target!==N.currentTarget)return;const O=Um(N,y.orientation,y.dir);if(O!==void 0){if(N.metaKey||N.ctrlKey||N.altKey||N.shiftKey)return;N.preventDefault();let z=b().filter(R=>R.focusable).map(R=>R.ref.current);if(O==="last")z.reverse();else if(O==="prev"||O==="next"){O==="prev"&&z.reverse();const R=z.indexOf(N.currentTarget);z=y.loop?Bm(z,R+1):z.slice(R+1)}setTimeout(()=>Uu(z))}}),children:typeof d=="function"?d({isCurrentTabStop:w,hasTabStop:k!=null}):d})})},"RovingFocusGroupItem")),Mk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vm(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}Ro(Vm,"getDirectionAwareKey");function Um(n,e,o){const s=Vm(n.key,o);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return Mk[s]}Ro(Um,"getFocusIntent");function Uu(n,e=!1){const o=document.activeElement;for(const s of n)if(s===o||(s.focus({preventScroll:e}),document.activeElement!==o))return}Ro(Uu,"focusFirst");function Bm(n,e){return n.map((o,s)=>n[(e+s)%n.length])}Ro(Bm,"wrapArray");var jk=Ok,Lk=$k,zk=Object.defineProperty,He=(n,e)=>zk(n,"name",{value:e,configurable:!0}),Bu=["Enter"," "],Fk=["ArrowDown","PageUp","Home"],Hm=["ArrowUp","PageDown","End"],Vk=[...Fk,...Hm],Uk={ltr:[...Bu,"ArrowRight"],rtl:[...Bu,"ArrowLeft"]},Bk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Qa="Menu",[oi,Hk,Wk]=wa(Qa),[Io,Wm]=wn(Qa,[Wk,fs,Fm]),Xa=fs(),Km=Fm(),[Zm,zr]=Io(Qa),[Kk,si]=Io(Qa),Zk=He(n=>{const{__scopeMenu:e,open:o=!1,children:s,dir:a,onOpenChange:l,modal:u=!0}=n,d=Xa(e),[h,m]=f.useState(null),v=f.useRef(!1),y=Kt(l),w=Sa(a);return f.useEffect(()=>{const b=He(()=>{v.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},"handleKeyDown"),S=He(()=>v.current=!1,"handlePointer");return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),f.useEffect(()=>{if(!o)return;const b=He(()=>y(!1),"handleBlur");return window.addEventListener("blur",b),()=>window.removeEventListener("blur",b)},[o,y]),_.jsx(qa,{...d,children:_.jsx(Zm,{scope:e,open:o,onOpenChange:y,content:h,onContentChange:m,children:_.jsx(Kk,{scope:e,onClose:f.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:v,dir:w,modal:u,children:s})})})},"Menu"),Gm=f.forwardRef(He(function(e,o){const{__scopeMenu:s,...a}=e,l=Xa(s);return _.jsx(Mu,{...l,...a,ref:o})},"MenuAnchor")),qm="MenuPortal",[Gk,Ym]=Io(qm,{forceMount:void 0}),qk=He(n=>{const{__scopeMenu:e,forceMount:o,children:s,container:a}=n,l=zr(qm,e);return _.jsx(Gk,{scope:e,forceMount:o,children:_.jsx(Ln,{present:o||l.open,children:_.jsx(_a,{asChild:!0,container:a,children:s})})})},"MenuPortal"),Sn="MenuContent",[Yk,Hu]=Io(Sn),Qk=f.forwardRef(He(function(e,o){const s=Ym(Sn,e.__scopeMenu),{forceMount:a=s.forceMount,...l}=e,u=zr(Sn,e.__scopeMenu),d=si(Sn,e.__scopeMenu);return _.jsx(oi.Provider,{scope:e.__scopeMenu,children:_.jsx(Ln,{present:a||u.open,children:_.jsx(oi.Slot,{scope:e.__scopeMenu,children:d.modal?_.jsx(Xk,{...l,ref:o}):_.jsx(Jk,{...l,ref:o})})})})},"MenuContent")),Xk=f.forwardRef(He(function(e,o){const s=zr(Sn,e.__scopeMenu),a=f.useRef(null),l=Ve(o,a);return f.useEffect(()=>{const u=a.current;if(u)return Aa(u)},[]),_.jsx(Wu,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:ke(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentModal")),Jk=f.forwardRef(He(function(e,o){const s=zr(Sn,e.__scopeMenu);return _.jsx(Wu,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentNonModal")),eC=xn("MenuContent.ScrollLock"),Wu=f.forwardRef(He(function(e,o){const{__scopeMenu:s,loop:a=!1,trapFocus:l,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:S,disableOutsideScroll:C,...k}=e,A=zr(Sn,s),N=si(Sn,s),O=Xa(s),T=Km(s),z=Hk(s),[R,B]=f.useState(null),L=f.useRef(null),Z=Ve(o,L,A.onContentChange),ae=f.useRef(0),be=f.useRef(""),ue=f.useRef(0),ce=f.useRef(null),Y=f.useRef("right"),xe=f.useRef(0),le=C?ei:f.Fragment,te=C?{as:eC,allowPinchZoom:!0}:void 0,U=He($=>{const D=be.current+$,P=z().filter(K=>!K.disabled),W=document.activeElement,J=P.find(K=>K.ref.current===W)?.textValue,H=P.map(K=>K.textValue),oe=sg(H,D,J),de=P.find(K=>K.textValue===oe)?.ref.current;He((function K(se){be.current=se,window.clearTimeout(ae.current),se!==""&&(ae.current=window.setTimeout(()=>K(""),1e3))}),"updateSearch")(D),de&&setTimeout(()=>de.focus())},"handleTypeaheadSearch");f.useEffect(()=>()=>window.clearTimeout(ae.current),[]),os();const G=f.useCallback($=>Y.current===ce.current?.side&&ag($,ce.current?.area),[]);return _.jsx(Yk,{scope:s,searchRef:be,onItemEnter:f.useCallback($=>{G($)&&$.preventDefault()},[G]),onItemLeave:f.useCallback($=>{G($)||(L.current?.focus(),B(null))},[G]),onTriggerLeave:f.useCallback($=>{G($)&&$.preventDefault()},[G]),pointerGraceTimerRef:ue,onPointerGraceIntentChange:f.useCallback($=>{ce.current=$},[]),children:_.jsx(le,{...te,children:_.jsx(Ca,{asChild:!0,trapped:l,onMountAutoFocus:ke(u,$=>{$.preventDefault(),L.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:_.jsx(ka,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:w,onInteractOutside:b,onDismiss:S,children:_.jsx(jk,{asChild:!0,...T,dir:N.dir,orientation:"vertical",loop:a,currentTabStopId:R,onCurrentTabStopIdChange:B,onEntryFocus:ke(m,$=>{N.isUsingKeyboardRef.current||$.preventDefault()}),preventScrollOnEntryFocus:!0,children:_.jsx(ju,{role:"menu","aria-orientation":"vertical","data-state":Zu(A.open),"data-radix-menu-content":"",dir:N.dir,...O,...k,ref:Z,style:{outline:"none",...k.style},onKeyDown:ke(k.onKeyDown,$=>{const P=$.target.closest("[data-radix-menu-content]")===$.currentTarget,W=$.ctrlKey||$.altKey||$.metaKey,J=$.key.length===1;P&&($.key==="Tab"&&$.preventDefault(),!W&&J&&U($.key));const H=L.current;if($.target!==H||!Vk.includes($.key))return;$.preventDefault();const de=z().filter(K=>!K.disabled).map(K=>K.ref.current);Hm.includes($.key)&&de.reverse(),rg(de)}),onBlur:ke(e.onBlur,$=>{$.currentTarget.contains($.target)||(window.clearTimeout(ae.current),be.current="")}),onPointerMove:ke(e.onPointerMove,ps($=>{const D=$.target,P=xe.current!==$.clientX;if($.currentTarget.contains(D)&&P){const W=$.clientX>xe.current?"right":"left";Y.current=W,xe.current=$.clientX}}))})})})})})})},"MenuContentImpl")),tC=f.forwardRef(He(function(e,o){const{__scopeMenu:s,...a}=e;return _.jsx(ze.div,{role:"group",...a,ref:o})},"MenuGroup")),nC=f.forwardRef(He(function(e,o){const{__scopeMenu:s,...a}=e;return _.jsx(ze.div,{...a,ref:o})},"MenuLabel")),Ku="MenuItem",Qm="menu.itemSelect",Xm=f.forwardRef(He(function(e,o){const{disabled:s=!1,onSelect:a,...l}=e,u=f.useRef(null),d=si(Ku,e.__scopeMenu),h=Hu(Ku,e.__scopeMenu),m=Ve(o,u),v=f.useRef(!1),y=He(()=>{const w=u.current;if(!s&&w){const b=new CustomEvent(Qm,{bubbles:!0,cancelable:!0});w.addEventListener(Qm,S=>a?.(S),{once:!0}),Xc(w,b),b.defaultPrevented?v.current=!1:d.onClose()}},"handleSelect");return _.jsx(Jm,{...l,ref:m,disabled:s,onClick:ke(e.onClick,y),onPointerDown:w=>{e.onPointerDown?.(w),v.current=!0},onPointerUp:ke(e.onPointerUp,w=>{v.current||w.currentTarget?.click()}),onKeyDown:ke(e.onKeyDown,w=>{s||w.target!==w.currentTarget||h.searchRef.current!==""&&w.key===" "||Bu.includes(w.key)&&(w.currentTarget.click(),w.preventDefault())})})},"MenuItem")),Jm=f.forwardRef(He(function(e,o){const{__scopeMenu:s,disabled:a=!1,textValue:l,...u}=e,d=Hu(Ku,s),h=Km(s),m=f.useRef(null),v=Ve(o,m),[y,w]=f.useState(!1),[b,S]=f.useState("");return f.useEffect(()=>{const C=m.current;C&&S((C.textContent??"").trim())},[u.children]),_.jsx(oi.ItemSlot,{scope:s,disabled:a,textValue:l??b,children:_.jsx(Lk,{asChild:!0,...h,focusable:!a,children:_.jsx(ze.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...u,ref:v,onPointerMove:ke(e.onPointerMove,ps(C=>{a?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ke(e.onPointerLeave,ps(C=>d.onItemLeave(C))),onFocus:ke(e.onFocus,()=>w(!0)),onBlur:ke(e.onBlur,()=>w(!1))})})})},"MenuItemImpl")),rC="MenuRadioGroup",[oC,sC]=Io(rC,{value:void 0,onValueChange:He(()=>{},"onValueChange")}),iC=f.forwardRef(He(function(e,o){const{value:s,onValueChange:a,...l}=e,u=Kt(a);return _.jsx(oC,{scope:e.__scopeMenu,value:s,onValueChange:u,children:_.jsx(tC,{...l,ref:o})})},"MenuRadioGroup")),aC="MenuRadioItem",lC=f.forwardRef(He(function(e,o){const{value:s,...a}=e,l=sC(aC,e.__scopeMenu),u=s===l.value;return _.jsx(cC,{scope:e.__scopeMenu,checked:u,children:_.jsx(Xm,{role:"menuitemradio","aria-checked":u,...a,ref:o,"data-state":qu(u),onSelect:ke(a.onSelect,()=>l.onValueChange?.(s),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),eg="MenuItemIndicator",[cC,uC]=Io(eg,{checked:!1}),dC=f.forwardRef(He(function(e,o){const{__scopeMenu:s,forceMount:a,...l}=e,u=uC(eg,s);return _.jsx(Ln,{present:a||Gu(u.checked)||u.checked===!0,children:_.jsx(ze.span,{...l,ref:o,"data-state":qu(u.checked)})})},"MenuItemIndicator")),fC=f.forwardRef(He(function(e,o){const{__scopeMenu:s,...a}=e;return _.jsx(ze.div,{role:"separator","aria-orientation":"horizontal",...a,ref:o})},"MenuSeparator")),tg="MenuSub",[pC,ng]=Io(tg),hC=He(n=>{const{__scopeMenu:e,children:o,open:s=!1,onOpenChange:a}=n,l=zr(tg,e),u=Xa(e),[d,h]=f.useState(null),[m,v]=f.useState(null),y=Kt(a);return f.useEffect(()=>(l.open===!1&&y(!1),()=>y(!1)),[l.open,y]),_.jsx(qa,{...u,children:_.jsx(Zm,{scope:e,open:s,onOpenChange:y,content:m,onContentChange:v,children:_.jsx(pC,{scope:e,contentId:Ct(),triggerId:Ct(),trigger:d,onTriggerChange:h,children:o})})})},"MenuSub"),Ja="MenuSubTrigger",mC=f.forwardRef(He(function(e,o){const s=zr(Ja,e.__scopeMenu),a=si(Ja,e.__scopeMenu),l=ng(Ja,e.__scopeMenu),u=Hu(Ja,e.__scopeMenu),d=f.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=u,v={__scopeMenu:e.__scopeMenu},y=f.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);f.useEffect(()=>y,[y]),f.useEffect(()=>{const b=h.current;return()=>{window.clearTimeout(b),m(null)}},[h,m]);const w=Ve(o,l.onTriggerChange);return _.jsx(Gm,{asChild:!0,...v,children:_.jsx(Jm,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?l.contentId:void 0,"data-state":Zu(s.open),...e,ref:w,onClick:b=>{e.onClick?.(b),!(e.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:ke(e.onPointerMove,ps(b=>{u.onItemEnter(b),!b.defaultPrevented&&!e.disabled&&!s.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{s.onOpenChange(!0),y()},100))})),onPointerLeave:ke(e.onPointerLeave,ps(b=>{y();const S=s.content?.getBoundingClientRect();if(S){const C=s.content?.dataset.side,k=C==="right",A=k?-5:5,N=S[k?"left":"right"],O=S[k?"right":"left"];u.onPointerGraceIntentChange({area:[{x:b.clientX+A,y:b.clientY},{x:N,y:S.top},{x:O,y:S.top},{x:O,y:S.bottom},{x:N,y:S.bottom}],side:C}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(b),b.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:ke(e.onKeyDown,b=>{e.disabled||b.target!==b.currentTarget||u.searchRef.current!==""&&b.key===" "||Uk[a.dir].includes(b.key)&&(s.onOpenChange(!0),s.content?.focus(),b.preventDefault())})})})},"MenuSubTrigger")),gC="MenuSubContent",vC=f.forwardRef(He(function(e,o){const s=Ym(Sn,e.__scopeMenu),{forceMount:a=s.forceMount,align:l="start",...u}=e,d=zr(Sn,e.__scopeMenu),h=si(Sn,e.__scopeMenu),m=ng(gC,e.__scopeMenu),v=f.useRef(null),y=Ve(o,v);return _.jsx(oi.Provider,{scope:e.__scopeMenu,children:_.jsx(Ln,{present:a||d.open,children:_.jsx(oi.Slot,{scope:e.__scopeMenu,children:_.jsx(Wu,{id:m.contentId,"aria-labelledby":m.triggerId,...u,ref:y,align:l,side:h.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:w=>{h.isUsingKeyboardRef.current&&v.current?.focus(),w.preventDefault()},onCloseAutoFocus:w=>w.preventDefault(),onFocusOutside:ke(e.onFocusOutside,w=>{w.target!==m.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:ke(e.onEscapeKeyDown,w=>{h.onClose(),w.preventDefault()}),onKeyDown:ke(e.onKeyDown,w=>{const b=w.currentTarget.contains(w.target),S=Bk[h.dir].includes(w.key);b&&S&&(d.onOpenChange(!1),m.trigger?.focus(),w.preventDefault())})})})})})},"MenuSubContent"));function Zu(n){return n?"open":"closed"}He(Zu,"getOpenState");function Gu(n){return n==="indeterminate"}He(Gu,"isIndeterminate");function qu(n){return Gu(n)?"indeterminate":n?"checked":"unchecked"}He(qu,"getCheckedState");function rg(n){const e=document.activeElement;for(const o of n)if(o===e||(o.focus(),document.activeElement!==e))return}He(rg,"focusFirst");function og(n,e){return n.map((o,s)=>n[(e+s)%n.length])}He(og,"wrapArray");function sg(n,e,o){const a=e.length>1&&Array.from(e).every(m=>m===e[0])?e[0]:e,l=o?n.indexOf(o):-1;let u=og(n,Math.max(l,0));a.length===1&&(u=u.filter(m=>m!==o));const h=u.find(m=>m.toLowerCase().startsWith(a.toLowerCase()));return h!==o?h:void 0}He(sg,"getNextMatch");function ig(n,e){const{x:o,y:s}=n;let a=!1;for(let l=0,u=e.length-1;l<e.length;u=l++){const d=e[l],h=e[u],m=d.x,v=d.y,y=h.x,w=h.y;v>s!=w>s&&o<(y-m)*(s-v)/(w-v)+m&&(a=!a)}return a}He(ig,"isPointInPolygon");function ag(n,e){if(!e)return!1;const o={x:n.clientX,y:n.clientY};return ig(o,e)}He(ag,"isPointerInGraceArea");function ps(n){return e=>e.pointerType==="mouse"?n(e):void 0}He(ps,"whenMouse");var yC=Zk,xC=Gm,wC=qk,bC=Qk,SC=nC,kC=Xm,CC=iC,_C=lC,EC=dC,PC=fC,RC=hC,IC=mC,DC=vC,NC=Object.defineProperty,en=(n,e)=>NC(n,"name",{value:e,configurable:!0}),Yu="DropdownMenu",[OC,M2]=wn(Yu,[Wm]),tn=Wm(),[TC,lg]=OC(Yu),AC=en(n=>{const{__scopeDropdownMenu:e,children:o,dir:s,open:a,defaultOpen:l,onOpenChange:u,modal:d=!0}=n,h=tn(e),m=f.useRef(null),[v,y]=Ar({prop:a,defaultProp:l??!1,onChange:u,caller:Yu});return _.jsx(TC,{scope:e,triggerId:Ct(),triggerRef:m,contentId:Ct(),open:v,onOpenChange:y,onOpenToggle:f.useCallback(()=>y(w=>!w),[y]),modal:d,children:_.jsx(yC,{...h,open:v,onOpenChange:y,dir:s,modal:d,children:o})})},"DropdownMenu"),$C="DropdownMenuTrigger",MC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,disabled:a=!1,...l}=e,u=lg($C,s),d=tn(s),h=Ve(o,u.triggerRef);return _.jsx(xC,{asChild:!0,...d,children:_.jsx(ze.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...l,ref:h,onPointerDown:ke(e.onPointerDown,m=>{!a&&m.button===0&&m.ctrlKey===!1&&(u.onOpenToggle(),u.open||m.preventDefault())}),onKeyDown:ke(e.onKeyDown,m=>{a||(["Enter"," "].includes(m.key)&&u.onOpenToggle(),m.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})},"DropdownMenuTrigger")),jC=en(n=>{const{__scopeDropdownMenu:e,...o}=n,s=tn(e);return _.jsx(wC,{...s,...o})},"DropdownMenuPortal"),LC="DropdownMenuContent",zC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,...a}=e,l=lg(LC,s),u=tn(s),d=f.useRef(!1);return _.jsx(bC,{id:l.contentId,"aria-labelledby":l.triggerId,...u,...a,ref:o,onCloseAutoFocus:ke(e.onCloseAutoFocus,h=>{d.current||l.triggerRef.current?.focus(),d.current=!1,h.preventDefault()}),onInteractOutside:ke(e.onInteractOutside,h=>{const m=h.detail.originalEvent,v=m.button===0&&m.ctrlKey===!0,y=m.button===2||v;(!l.modal||y)&&(d.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)"}})},"DropdownMenuContent")),FC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,...a}=e,l=tn(s);return _.jsx(SC,{...l,...a,ref:o})},"DropdownMenuLabel")),VC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,...a}=e,l=tn(s);return _.jsx(kC,{...l,...a,ref:o})},"DropdownMenuItem")),UC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,...a}=e,l=tn(s);return _.jsx(CC,{...l,...a,ref:o})},"DropdownMenuRadioGroup")),BC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,...a}=e,l=tn(s);return _.jsx(_C,{...l,...a,ref:o})},"DropdownMenuRadioItem")),HC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,...a}=e,l=tn(s);return _.jsx(EC,{...l,...a,ref:o})},"DropdownMenuItemIndicator")),WC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,...a}=e,l=tn(s);return _.jsx(PC,{...l,...a,ref:o})},"DropdownMenuSeparator")),KC=en(n=>{const{__scopeDropdownMenu:e,children:o,open:s,onOpenChange:a,defaultOpen:l}=n,u=tn(e),[d,h]=Ar({prop:s,defaultProp:l??!1,onChange:a,caller:"DropdownMenuSub"});return _.jsx(RC,{...u,open:d,onOpenChange:h,children:o})},"DropdownMenuSub"),ZC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,...a}=e,l=tn(s);return _.jsx(IC,{...l,...a,ref:o})},"DropdownMenuSubTrigger")),GC=f.forwardRef(en(function(e,o){const{__scopeDropdownMenu:s,...a}=e,l=tn(s);return _.jsx(DC,{...l,...a,ref:o,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)"}})},"DropdownMenuSubContent")),qC=AC,YC=MC,cg=jC,QC=zC,XC=FC,JC=VC,e_=UC,t_=BC,n_=HC,r_=WC,o_=KC,s_=ZC,i_=GC,a_=Object.defineProperty,l_=(n,e)=>a_(n,"name",{value:e,configurable:!0});function ug(n){const e=f.useRef({value:n,previous:n});return f.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}l_(ug,"usePrevious");var c_=Object.defineProperty,u_=(n,e)=>c_(n,"name",{value:e,configurable:!0});function Qu(n,[e,o]){return Math.min(o,Math.max(e,n))}u_(Qu,"clamp");var d_=Object.defineProperty,Fr=(n,e)=>d_(n,"name",{value:e,configurable:!0}),Xu="Popover",[dg,j2]=wn(Xu,[fs]),Ju=fs(),[f_,hs]=dg(Xu),p_=Fr(n=>{const{__scopePopover:e,children:o,open:s,defaultOpen:a,onOpenChange:l,modal:u=!1}=n,d=Ju(e),h=f.useRef(null),[m,v]=f.useState(!1),[y,w]=Ar({prop:s,defaultProp:a??!1,onChange:l,caller:Xu});return _.jsx(qa,{...d,children:_.jsx(f_,{scope:e,contentId:Ct(),triggerRef:h,open:y,onOpenChange:w,onOpenToggle:f.useCallback(()=>w(b=>!b),[w]),hasCustomAnchor:m,onCustomAnchorAdd:f.useCallback(()=>v(!0),[]),onCustomAnchorRemove:f.useCallback(()=>v(!1),[]),modal:u,children:o})})},"Popover"),h_="PopoverTrigger",m_=f.forwardRef(Fr(function(e,o){const{__scopePopover:s,...a}=e,l=hs(h_,s),u=Ju(s),d=Ve(o,l.triggerRef),h=_.jsx(ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":ed(l.open),...a,ref:d,onClick:ke(e.onClick,l.onOpenToggle)});return l.hasCustomAnchor?h:_.jsx(Mu,{asChild:!0,...u,children:h})},"PopoverTrigger")),fg="PopoverPortal",[g_,v_]=dg(fg,{forceMount:void 0}),y_=Fr(n=>{const{__scopePopover:e,forceMount:o,children:s,container:a}=n,l=hs(fg,e);return _.jsx(g_,{scope:e,forceMount:o,children:_.jsx(Ln,{present:o||l.open,children:_.jsx(_a,{asChild:!0,container:a,children:s})})})},"PopoverPortal"),ii="PopoverContent",x_=f.forwardRef(Fr(function(e,o){const s=v_(ii,e.__scopePopover),{forceMount:a=s.forceMount,...l}=e,u=hs(ii,e.__scopePopover);return _.jsx(Ln,{present:a||u.open,children:u.modal?_.jsx(b_,{...l,ref:o}):_.jsx(S_,{...l,ref:o})})},"PopoverContent")),w_=xn("PopoverContent.RemoveScroll"),b_=f.forwardRef(Fr(function(e,o){const s=hs(ii,e.__scopePopover),a=f.useRef(null),l=Ve(o,a),u=f.useRef(!1);return f.useEffect(()=>{const d=a.current;if(d)return Aa(d)},[]),_.jsx(ei,{as:w_,allowPinchZoom:!0,children:_.jsx(pg,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,d=>{d.preventDefault(),u.current||s.triggerRef.current?.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,d=>{const h=d.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,v=h.button===2||m;u.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:ke(e.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),S_=f.forwardRef(Fr(function(e,o){const s=hs(ii,e.__scopePopover),a=f.useRef(!1),l=f.useRef(!1);return _.jsx(pg,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),u.defaultPrevented||(a.current||s.triggerRef.current?.focus(),u.preventDefault()),a.current=!1,l.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),u.defaultPrevented||(a.current=!0,u.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=u.target;s.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&l.current&&u.preventDefault()}})},"PopoverContentNonModal")),pg=f.forwardRef(Fr(function(e,o){const{__scopePopover:s,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:v,onInteractOutside:y,...w}=e,b=hs(ii,s),S=Ju(s);return os(),_.jsx(Ca,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:l,onUnmountAutoFocus:u,children:_.jsx(ka,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:y,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:v,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:_.jsx(ju,{"data-state":ed(b.open),role:"dialog",id:b.contentId,...S,...w,ref:o,style:{...w.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function ed(n){return n?"open":"closed"}Fr(ed,"getState");var k_=p_,C_=m_,__=y_,E_=x_,P_=Object.defineProperty,Ze=(n,e)=>P_(n,"name",{value:e,configurable:!0}),R_=[" ","Enter","ArrowUp","ArrowDown"],I_=[" ","Enter"],ms="Select",[el,tl,D_]=wa(ms),[Do,L2]=wn(ms,[D_,fs]),td=fs(),[N_,Vr]=Do(ms),[O_,T_]=Do(ms);function hg(n){const{__scopeSelect:e,children:o,open:s,defaultOpen:a,onOpenChange:l,value:u,defaultValue:d,onValueChange:h,dir:m,name:v,autoComplete:y,disabled:w,required:b,form:S,internal_do_not_use_render:C}=n,k=td(e),[A,N]=f.useState(null),[O,T]=f.useState(null),[z,R]=f.useState(!1),B=Sa(m),[L,Z]=Ar({prop:s,defaultProp:a??!1,onChange:l,caller:ms}),[ae,be]=Ar({prop:u,defaultProp:d,onChange:h,caller:ms}),ue=f.useRef(null),ce=f.useRef(ae);f.useEffect(()=>{const P=S?A?.ownerDocument.getElementById(S):A?.form;if(P instanceof HTMLFormElement){const W=Ze(()=>be(ce.current),"reset");return P.addEventListener("reset",W),()=>P.removeEventListener("reset",W)}},[S,A,be]);const Y=A?!!S||!!A.closest("form"):!0,[xe,le]=f.useState(new Set),te=Ct(),U=Array.from(xe).map(P=>P.props.value).join(";"),G=f.useCallback(P=>{le(W=>new Set(W).add(P))},[]),$=f.useCallback(P=>{le(W=>{const J=new Set(W);return J.delete(P),J})},[]),D={required:b,trigger:A,onTriggerChange:N,valueNode:O,onValueNodeChange:T,valueNodeHasChildren:z,onValueNodeHasChildrenChange:R,contentId:te,value:ae,onValueChange:be,open:L,onOpenChange:Z,dir:B,triggerPointerDownPosRef:ue,disabled:w,name:v,autoComplete:y,form:S,nativeOptions:xe,nativeSelectKey:U,isFormControl:Y};return _.jsx(qa,{...k,children:_.jsx(N_,{scope:e,...D,children:_.jsx(el.Provider,{scope:e,children:_.jsx(O_,{scope:e,onNativeOptionAdd:G,onNativeOptionRemove:$,children:Sg(C)?C(D):o})})})})}Ze(hg,"SelectProvider");var A_=Ze(n=>{const{__scopeSelect:e,children:o,...s}=n;return _.jsx(hg,{__scopeSelect:e,...s,internal_do_not_use_render:({isFormControl:a})=>_.jsxs(_.Fragment,{children:[o,a?_.jsx(iE,{__scopeSelect:e}):null]})})},"Select"),$_="SelectTrigger",M_=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,disabled:a=!1,...l}=e,u=td(s),d=Vr($_,s),h=d.disabled||a,m=Ve(o,d.onTriggerChange),v=tl(s),y=f.useRef("touch"),[w,b,S]=od(k=>{const A=v().filter(T=>!T.disabled),N=A.find(T=>T.value===d.value),O=sd(A,k,N);O!==void 0&&d.onValueChange(O.value)}),C=Ze(k=>{h||(d.onOpenChange(!0),S()),k&&(d.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})},"handleOpen");return _.jsx(Mu,{asChild:!0,...u,children:_.jsx(ze.button,{type:"button",role:"combobox","aria-controls":d.open?d.contentId:void 0,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":ai(d.value)?"":void 0,...l,ref:m,onClick:ke(l.onClick,k=>{k.currentTarget.focus(),y.current!=="mouse"&&C(k)}),onPointerDown:ke(l.onPointerDown,k=>{y.current=k.pointerType;const A=k.target;A.hasPointerCapture(k.pointerId)&&A.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(C(k),k.preventDefault())}),onKeyDown:ke(l.onKeyDown,k=>{const A=w.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&b(k.key),!(A&&k.key===" ")&&R_.includes(k.key)&&(C(),k.preventDefault())})})})},"SelectTrigger")),j_="SelectValue",L_=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,className:a,style:l,children:u,placeholder:d="",...h}=e,m=Vr(j_,s),{onValueNodeHasChildrenChange:v}=m,y=u!==void 0,w=Ve(o,m.onValueNodeChange);ht(()=>{v(y)},[v,y]);const b=ai(m.value);return _.jsx(ze.span,{...h,asChild:b?!1:h.asChild,ref:w,style:{pointerEvents:"none"},children:_.jsx(f.Fragment,{children:b?d:u},b?"placeholder":"value")})},"SelectValue")),z_=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,children:a,...l}=e;return _.jsx(ze.span,{"aria-hidden":!0,...l,ref:o,children:a||"▼"})},"SelectIcon")),F_="SelectPortal",[V_,U_]=Do(F_,{forceMount:void 0}),B_=Ze(n=>{const{__scopeSelect:e,forceMount:o,...s}=n;return _.jsx(V_,{scope:n.__scopeSelect,forceMount:o,children:_.jsx(_a,{asChild:!0,...s})})},"SelectPortal"),No="SelectContent",H_=f.forwardRef(Ze(function(e,o){const s=U_(No,e.__scopeSelect),{forceMount:a=s.forceMount,...l}=e,u=Vr(No,e.__scopeSelect),[d,h]=f.useState();return ht(()=>{h(new DocumentFragment)},[]),_.jsx(Ln,{present:a||u.open,children:({present:m})=>m?_.jsx(Z_,{...l,ref:o}):_.jsx(W_,{...l,fragment:d})})},"SelectContent")),W_=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,children:a,fragment:l}=e;return l?Xs.createPortal(_.jsx(mg,{scope:s,children:_.jsx(el.Slot,{scope:s,children:_.jsx("div",{ref:o,children:a})})}),l):null},"SelectContentFragment")),kn=10,[mg,Oo]=Do(No),K_=xn("SelectContent.RemoveScroll"),Z_=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s}=e,{position:a="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,side:h,sideOffset:m,align:v,alignOffset:y,arrowPadding:w,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:k,avoidCollisions:A,...N}=e,O=Vr(No,s),[T,z]=f.useState(null),[R,B]=f.useState(null),L=Ve(o,z),[Z,ae]=f.useState(null),[be,ue]=f.useState(null),ce=tl(s),[Y,xe]=f.useState(!1),le=f.useRef(!1);f.useEffect(()=>{if(T)return Aa(T)},[T]),os();const te=f.useCallback(K=>{const[se,...Ne]=ce().map(Ue=>Ue.ref.current),[$e]=Ne.slice(-1),We=document.activeElement;for(const Ue of K)if(Ue===We||(Ue?.scrollIntoView({block:"nearest"}),Ue===se&&R&&(R.scrollTop=0),Ue===$e&&R&&(R.scrollTop=R.scrollHeight),Ue?.focus(),document.activeElement!==We))return},[ce,R]),U=f.useCallback(()=>te([Z,T]),[te,Z,T]);f.useEffect(()=>{Y&&U()},[Y,U]);const{onOpenChange:G,triggerPointerDownPosRef:$}=O;f.useEffect(()=>{if(T){let K={x:0,y:0};const se=Ze($e=>{K={x:Math.abs(Math.round($e.pageX)-($.current?.x??0)),y:Math.abs(Math.round($e.pageY)-($.current?.y??0))}},"handlePointerMove"),Ne=Ze($e=>{K.x<=10&&K.y<=10?$e.preventDefault():$e.composedPath().includes(T)||G(!1),document.removeEventListener("pointermove",se),$.current=null},"handlePointerUp");return $.current!==null&&(document.addEventListener("pointermove",se),document.addEventListener("pointerup",Ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",se),document.removeEventListener("pointerup",Ne,{capture:!0})}}},[T,G,$]),f.useEffect(()=>{const K=Ze(()=>G(!1),"close");return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[G]);const[D,P]=od(K=>{const se=ce().filter(We=>!We.disabled),Ne=se.find(We=>We.ref.current===document.activeElement),$e=sd(se,K,Ne);$e&&setTimeout(()=>$e.ref.current?.focus())}),W=f.useCallback((K,se,Ne)=>{const $e=!le.current&&!Ne;(O.value!==void 0&&O.value===se||$e)&&(ae(K),$e&&(le.current=!0))},[O.value]),J=f.useCallback(()=>T?.focus(),[T]),H=f.useCallback((K,se,Ne)=>{const $e=!le.current&&!Ne;(O.value!==void 0&&O.value===se||$e)&&ue(K)},[O.value]),oe=a==="popper"?gg:G_,de=oe===gg?{side:h,sideOffset:m,align:v,alignOffset:y,arrowPadding:w,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:k,avoidCollisions:A}:{};return _.jsx(mg,{scope:s,content:T,viewport:R,onViewportChange:B,itemRefCallback:W,selectedItem:Z,onItemLeave:J,itemTextRefCallback:H,focusSelectedItem:U,selectedItemText:be,position:a,isPositioned:Y,searchRef:D,children:_.jsx(ei,{as:K_,allowPinchZoom:!0,children:_.jsx(Ca,{asChild:!0,trapped:O.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:ke(l,K=>{O.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:_.jsx(ka,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:_.jsx(oe,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:K=>K.preventDefault(),...N,...de,onPlaced:()=>xe(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:ke(N.onKeyDown,K=>{const se=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!se&&K.key.length===1&&P(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let $e=ce().filter(We=>!We.disabled).map(We=>We.ref.current);if(["ArrowUp","End"].includes(K.key)&&($e=$e.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const We=K.target,Ue=$e.indexOf(We);$e=$e.slice(Ue+1)}setTimeout(()=>te($e)),K.preventDefault()}})})})})})})},"SelectContentImpl")),G_=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,onPlaced:a,...l}=e,u=Vr(No,s),d=Oo(No,s),[h,m]=f.useState(null),[v,y]=f.useState(null),w=Ve(o,y),b=tl(s),S=f.useRef(!1),C=f.useRef(!0),{viewport:k,selectedItem:A,selectedItemText:N,focusSelectedItem:O}=d,T=f.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&v&&k&&A&&N){const L=u.trigger.getBoundingClientRect(),Z=v.getBoundingClientRect(),ae=u.valueNode.getBoundingClientRect(),be=N.getBoundingClientRect();if(u.dir!=="rtl"){const We=be.left-Z.left,Ue=ae.left-We,ft=L.left-Ue,wt=L.width+ft,Hr=Math.max(wt,Z.width),Cn=window.innerWidth-kn,ct=Qu(Ue,[kn,Math.max(kn,Cn-Hr)]);h.style.minWidth=wt+"px",h.style.left=ct+"px"}else{const We=Z.right-be.right,Ue=window.innerWidth-ae.right-We,ft=window.innerWidth-L.right-Ue,wt=L.width+ft,Hr=Math.max(wt,Z.width),Cn=window.innerWidth-kn,ct=Qu(Ue,[kn,Math.max(kn,Cn-Hr)]);h.style.minWidth=wt+"px",h.style.right=ct+"px"}const ue=b(),ce=window.innerHeight-kn*2,Y=k.scrollHeight,xe=window.getComputedStyle(v),le=parseInt(xe.borderTopWidth,10),te=parseInt(xe.paddingTop,10),U=parseInt(xe.borderBottomWidth,10),G=parseInt(xe.paddingBottom,10),$=le+te+Y+G+U,D=Math.min(A.offsetHeight*5,$),P=window.getComputedStyle(k),W=parseInt(P.paddingTop,10),J=parseInt(P.paddingBottom,10),H=L.top+L.height/2-kn,oe=ce-H,de=A.offsetHeight/2,K=A.offsetTop+de,se=le+te+K,Ne=$-se;if(se<=H){const We=ue.length>0&&A===ue[ue.length-1].ref.current;h.style.bottom="0px";const Ue=v.clientHeight-k.offsetTop-k.offsetHeight,ft=Math.max(oe,de+(We?J:0)+Ue+U),wt=se+ft;h.style.height=wt+"px"}else{const We=ue.length>0&&A===ue[0].ref.current;h.style.top="0px";const ft=Math.max(H,le+k.offsetTop+(We?W:0)+de)+Ne;h.style.height=ft+"px",k.scrollTop=se-H+k.offsetTop}h.style.margin=`${kn}px 0`,h.style.minHeight=D+"px",h.style.maxHeight=ce+"px",a?.(),requestAnimationFrame(()=>S.current=!0)}},[b,u.trigger,u.valueNode,h,v,k,A,N,u.dir,a]);ht(()=>T(),[T]);const[z,R]=f.useState();ht(()=>{v&&R(window.getComputedStyle(v).zIndex)},[v]);const B=f.useCallback(L=>{L&&C.current===!0&&(T(),O?.(),C.current=!1)},[T,O]);return _.jsx(q_,{scope:s,contentWrapper:h,shouldExpandOnScrollRef:S,onScrollButtonChange:B,children:_.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:_.jsx(ze.div,{...l,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})},"SelectItemAlignedPosition")),gg=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,align:a="start",collisionPadding:l=kn,...u}=e,d=td(s);return _.jsx(ju,{...d,...u,ref:o,align:a,collisionPadding:l,style:{boxSizing:"border-box",...u.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)"}})},"SelectPopperPosition")),[q_,nd]=Do(No,{}),vg="SelectViewport",Y_=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,nonce:a,...l}=e,u=Oo(vg,s),d=nd(vg,s),h=Ve(o,u.onViewportChange),m=f.useRef(0);return _.jsxs(_.Fragment,{children:[_.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:a}),_.jsx(el.Slot,{scope:s,children:_.jsx(ze.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:ke(l.onScroll,v=>{const y=v.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:b}=d;if(b?.current&&w){const S=Math.abs(m.current-y.scrollTop);if(S>0){const C=window.innerHeight-kn*2,k=parseFloat(w.style.minHeight),A=parseFloat(w.style.height),N=Math.max(k,A);if(N<C){const O=N+S,T=Math.min(C,O),z=O-T;w.style.height=T+"px",w.style.bottom==="0px"&&(y.scrollTop=z>0?z:0,w.style.justifyContent="flex-end")}}}m.current=y.scrollTop})})})]})},"SelectViewport")),Q_="SelectGroup",[z2,F2]=Do(Q_),rd="SelectItem",[X_,yg]=Do(rd),J_=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,value:a,disabled:l=!1,textValue:u,...d}=e,h=Vr(rd,s),m=Oo(rd,s),v=h.value===a,[y,w]=f.useState(u??""),[b,S]=f.useState(!1),C=Kt(T=>m.itemRefCallback?.(T,a,l)),k=Ve(o,C),A=Ct(),N=f.useRef("touch"),O=Ze(()=>{l||(h.onValueChange(a),h.onOpenChange(!1))},"handleSelect");return _.jsx(X_,{scope:s,value:a,disabled:l,textId:A,isSelected:v,onItemTextChange:f.useCallback(T=>{w(z=>z||(T?.textContent??"").trim())},[]),children:_.jsx(el.ItemSlot,{scope:s,value:a,disabled:l,textValue:y,children:_.jsx(ze.div,{role:"option","aria-labelledby":A,"data-highlighted":b?"":void 0,"aria-selected":v&&b,"data-state":v?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...d,ref:k,onFocus:ke(d.onFocus,()=>S(!0)),onBlur:ke(d.onBlur,()=>S(!1)),onClick:ke(d.onClick,()=>{N.current!=="mouse"&&O()}),onPointerUp:ke(d.onPointerUp,()=>{N.current==="mouse"&&O()}),onPointerDown:ke(d.onPointerDown,T=>{N.current=T.pointerType}),onPointerMove:ke(d.onPointerMove,T=>{N.current=T.pointerType,l?m.onItemLeave?.():N.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ke(d.onPointerLeave,T=>{T.currentTarget===document.activeElement&&m.onItemLeave?.()}),onKeyDown:ke(d.onKeyDown,T=>{l||T.target!==T.currentTarget||m.searchRef?.current!==""&&T.key===" "||(I_.includes(T.key)&&O(),T.key===" "&&T.preventDefault())})})})})},"SelectItem")),nl="SelectItemText",eE=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,className:a,style:l,...u}=e,d=Vr(nl,s),h=Oo(nl,s),m=yg(nl,s),v=T_(nl,s),[y,w]=f.useState(null),b=Kt(O=>h.itemTextRefCallback?.(O,m.value,m.disabled)),S=Ve(o,w,m.onItemTextChange,b),C=y?.textContent,k=f.useMemo(()=>_.jsx("option",{value:m.value,disabled:m.disabled,children:C},m.value),[m.disabled,m.value,C]),{onNativeOptionAdd:A,onNativeOptionRemove:N}=v;return ht(()=>(A(k),()=>N(k)),[A,N,k]),_.jsxs(_.Fragment,{children:[_.jsx(ze.span,{id:m.textId,...u,ref:S}),m.isSelected&&d.valueNode&&!d.valueNodeHasChildren&&!ai(d.value)?Xs.createPortal(u.children,d.valueNode):null]})},"SelectItemText")),tE="SelectItemIndicator",nE=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,...a}=e;return yg(tE,s).isSelected?_.jsx(ze.span,{"aria-hidden":!0,...a,ref:o}):null},"SelectItemIndicator")),xg="SelectScrollUpButton",rE=f.forwardRef(Ze(function(e,o){const s=Oo(xg,e.__scopeSelect),a=nd(xg,e.__scopeSelect),[l,u]=f.useState(!1),d=Ve(o,a.onScrollButtonChange);return ht(()=>{if(s.viewport&&s.isPositioned){let h=function(){const v=m.scrollTop>0;u(v)};Ze(h,"handleScroll");const m=s.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[s.viewport,s.isPositioned]),l?_.jsx(bg,{...e,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=s;h&&m&&(h.scrollTop=h.scrollTop-m.offsetHeight)}}):null},"SelectScrollUpButton")),wg="SelectScrollDownButton",oE=f.forwardRef(Ze(function(e,o){const s=Oo(wg,e.__scopeSelect),a=nd(wg,e.__scopeSelect),[l,u]=f.useState(!1),d=Ve(o,a.onScrollButtonChange);return ht(()=>{if(s.viewport&&s.isPositioned){let h=function(){const v=m.scrollHeight-m.clientHeight,y=Math.ceil(m.scrollTop)<v;u(y)};Ze(h,"handleScroll");const m=s.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[s.viewport,s.isPositioned]),l?_.jsx(bg,{...e,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=s;h&&m&&(h.scrollTop=h.scrollTop+m.offsetHeight)}}):null},"SelectScrollDownButton")),bg=f.forwardRef(Ze(function(e,o){const{__scopeSelect:s,onAutoScroll:a,...l}=e,u=Oo("SelectScrollButton",s),d=f.useRef(null),h=tl(s),m=f.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return f.useEffect(()=>()=>m(),[m]),ht(()=>{h().find(y=>y.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[h]),_.jsx(ze.div,{"aria-hidden":!0,...l,ref:o,style:{flexShrink:0,...l.style},onPointerDown:ke(l.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(a,50))}),onPointerMove:ke(l.onPointerMove,()=>{u.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(a,50))}),onPointerLeave:ke(l.onPointerLeave,()=>{m()})})},"SelectScrollButtonImpl")),sE="SelectBubbleInput",iE=f.forwardRef(Ze(function({__scopeSelect:e,...o},s){const a=Vr(sE,e),{value:l,onValueChange:u,required:d,disabled:h,name:m,autoComplete:v,form:y}=a,{nativeOptions:w,nativeSelectKey:b}=a,S=f.useRef(null),C=Ve(s,S),k=l??"",A=ug(k),N=Array.from(w).some(O=>(O.props.value??"")==="");return f.useEffect(()=>{const O=S.current;if(!O)return;const T=window.HTMLSelectElement.prototype,R=Object.getOwnPropertyDescriptor(T,"value").set;if(A!==k&&R){const B=new Event("change",{bubbles:!0});R.call(O,k),O.dispatchEvent(B)}},[A,k]),_.jsxs(ze.select,{"aria-hidden":!0,required:d,tabIndex:-1,name:m,autoComplete:v,disabled:h,form:y,onChange:O=>u(O.target.value),...o,style:{...hb,...o.style},ref:C,defaultValue:k,children:[ai(l)&&!N?_.jsx("option",{value:""}):null,Array.from(w)]},b)},"SelectBubbleInput"));function Sg(n){return typeof n=="function"}Ze(Sg,"isFunction");function ai(n){return n===""||n===void 0}Ze(ai,"shouldShowPlaceholder");function od(n){const e=Kt(n),o=f.useRef(""),s=f.useRef(0),a=f.useCallback(u=>{const d=o.current+u;e(d),Ze((function h(m){o.current=m,window.clearTimeout(s.current),m!==""&&(s.current=window.setTimeout(()=>h(""),1e3))}),"updateSearch")(d)},[e]),l=f.useCallback(()=>{o.current="",window.clearTimeout(s.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(s.current),[]),[o,a,l]}Ze(od,"useTypeaheadSearch");function sd(n,e,o){const a=e.length>1&&Array.from(e).every(m=>m===e[0])?e[0]:e,l=o?n.indexOf(o):-1;let u=kg(n,Math.max(l,0));a.length===1&&(u=u.filter(m=>m!==o));const h=u.find(m=>m.textValue.toLowerCase().startsWith(a.toLowerCase()));return h!==o?h:void 0}Ze(sd,"findNextItem");function kg(n,e){return n.map((o,s)=>n[(e+s)%n.length])}Ze(kg,"wrapArray");const Cg=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,_g=Ip,id=(n,e)=>o=>{var s;if(e?.variants==null)return _g(n,o?.class,o?.className);const{variants:a,defaultVariants:l}=e,u=Object.keys(a).map(m=>{const v=o?.[m],y=l?.[m];if(v===null)return null;const w=Cg(v)||Cg(y);return a[m][w]}),d=o&&Object.entries(o).reduce((m,v)=>{let[y,w]=v;return w===void 0||(m[y]=w),m},{}),h=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((m,v)=>{let{class:y,className:w,...b}=v;return Object.entries(b).every(S=>{let[C,k]=S;return Array.isArray(k)?k.includes({...l,...d}[C]):{...l,...d}[C]===k})?[...m,y,w]:m},[]);return _g(n,u,h,o?.class,o?.className)};var Eg=1,aE=.9,lE=.8,cE=.17,ad=.1,ld=.999,uE=.9999,dE=.99,fE=/[\\\/_+.#"@\[\(\{&]/,pE=/[\\\/_+.#"@\[\(\{&]/g,hE=/[\s-]/,Pg=/[\s-]/g;function cd(n,e,o,s,a,l,u){if(l===e.length)return a===n.length?Eg:dE;var d=`${a},${l}`;if(u[d]!==void 0)return u[d];for(var h=s.charAt(l),m=o.indexOf(h,a),v=0,y,w,b,S;m>=0;)y=cd(n,e,o,s,m+1,l+1,u),y>v&&(m===a?y*=Eg:fE.test(n.charAt(m-1))?(y*=lE,b=n.slice(a,m-1).match(pE),b&&a>0&&(y*=Math.pow(ld,b.length))):hE.test(n.charAt(m-1))?(y*=aE,S=n.slice(a,m-1).match(Pg),S&&a>0&&(y*=Math.pow(ld,S.length))):(y*=cE,a>0&&(y*=Math.pow(ld,m-a))),n.charAt(m)!==e.charAt(l)&&(y*=uE)),(y<ad&&o.charAt(m-1)===s.charAt(l+1)||s.charAt(l+1)===s.charAt(l)&&o.charAt(m-1)!==s.charAt(l))&&(w=cd(n,e,o,s,m+1,l+2,u),w*ad>y&&(y=w*ad)),y>v&&(v=y),m=o.indexOf(h,m+1);return u[d]=v,v}function Rg(n){return n.toLowerCase().replace(Pg," ")}function mE(n,e,o){return n=o&&o.length>0?`${n+" "+o.join(" ")}`:n,cd(n,e,Rg(n),Rg(e),0,0,{})}var li='[cmdk-group=""]',ud='[cmdk-group-items=""]',gE='[cmdk-group-heading=""]',Ig='[cmdk-item=""]',Dg=`${Ig}:not([aria-disabled="true"])`,dd="cmdk-item-select",gs="data-value",vE=(n,e,o)=>mE(n,e,o),Ng=f.createContext(void 0),ci=()=>f.useContext(Ng),Og=f.createContext(void 0),fd=()=>f.useContext(Og),Tg=f.createContext(void 0),Ag=f.forwardRef((n,e)=>{let o=vs(()=>{var P,W;return{search:"",value:(W=(P=n.value)!=null?P:n.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),s=vs(()=>new Set),a=vs(()=>new Map),l=vs(()=>new Map),u=vs(()=>new Set),d=$g(n),{label:h,children:m,value:v,onValueChange:y,filter:w,shouldFilter:b,loop:S,disablePointerSelection:C=!1,vimBindings:k=!0,...A}=n,N=Ct(),O=Ct(),T=Ct(),z=f.useRef(null),R=RE();To(()=>{if(v!==void 0){let P=v.trim();o.current.value=P,B.emit()}},[v]),To(()=>{R(6,ce)},[]);let B=f.useMemo(()=>({subscribe:P=>(u.current.add(P),()=>u.current.delete(P)),snapshot:()=>o.current,setState:(P,W,J)=>{var H,oe,de,K;if(!Object.is(o.current[P],W)){if(o.current[P]=W,P==="search")ue(),ae(),R(1,be);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let se=document.getElementById(T);se?se.focus():(H=document.getElementById(N))==null||H.focus()}if(R(7,()=>{var se;o.current.selectedItemId=(se=Y())==null?void 0:se.id,B.emit()}),J||R(5,ce),((oe=d.current)==null?void 0:oe.value)!==void 0){let se=W??"";(K=(de=d.current).onValueChange)==null||K.call(de,se);return}}B.emit()}},emit:()=>{u.current.forEach(P=>P())}}),[]),L=f.useMemo(()=>({value:(P,W,J)=>{var H;W!==((H=l.current.get(P))==null?void 0:H.value)&&(l.current.set(P,{value:W,keywords:J}),o.current.filtered.items.set(P,Z(W,J)),R(2,()=>{ae(),B.emit()}))},item:(P,W)=>(s.current.add(P),W&&(a.current.has(W)?a.current.get(W).add(P):a.current.set(W,new Set([P]))),R(3,()=>{ue(),ae(),o.current.value||be(),B.emit()}),()=>{l.current.delete(P),s.current.delete(P),o.current.filtered.items.delete(P);let J=Y();R(4,()=>{ue(),J?.getAttribute("id")===P&&be(),B.emit()})}),group:P=>(a.current.has(P)||a.current.set(P,new Set),()=>{l.current.delete(P),a.current.delete(P)}),filter:()=>d.current.shouldFilter,label:h||n["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:N,inputId:T,labelId:O,listInnerRef:z}),[]);function Z(P,W){var J,H;let oe=(H=(J=d.current)==null?void 0:J.filter)!=null?H:vE;return P?oe(P,o.current.search,W):0}function ae(){if(!o.current.search||d.current.shouldFilter===!1)return;let P=o.current.filtered.items,W=[];o.current.filtered.groups.forEach(H=>{let oe=a.current.get(H),de=0;oe.forEach(K=>{let se=P.get(K);de=Math.max(se,de)}),W.push([H,de])});let J=z.current;xe().sort((H,oe)=>{var de,K;let se=H.getAttribute("id"),Ne=oe.getAttribute("id");return((de=P.get(Ne))!=null?de:0)-((K=P.get(se))!=null?K:0)}).forEach(H=>{let oe=H.closest(ud);oe?oe.appendChild(H.parentElement===oe?H:H.closest(`${ud} > *`)):J.appendChild(H.parentElement===J?H:H.closest(`${ud} > *`))}),W.sort((H,oe)=>oe[1]-H[1]).forEach(H=>{var oe;let de=(oe=z.current)==null?void 0:oe.querySelector(`${li}[${gs}="${encodeURIComponent(H[0])}"]`);de?.parentElement.appendChild(de)})}function be(){let P=xe().find(J=>J.getAttribute("aria-disabled")!=="true"),W=P?.getAttribute(gs);B.setState("value",W||void 0)}function ue(){var P,W,J,H;if(!o.current.search||d.current.shouldFilter===!1){o.current.filtered.count=s.current.size;return}o.current.filtered.groups=new Set;let oe=0;for(let de of s.current){let K=(W=(P=l.current.get(de))==null?void 0:P.value)!=null?W:"",se=(H=(J=l.current.get(de))==null?void 0:J.keywords)!=null?H:[],Ne=Z(K,se);o.current.filtered.items.set(de,Ne),Ne>0&&oe++}for(let[de,K]of a.current)for(let se of K)if(o.current.filtered.items.get(se)>0){o.current.filtered.groups.add(de);break}o.current.filtered.count=oe}function ce(){var P,W,J;let H=Y();H&&(((P=H.parentElement)==null?void 0:P.firstChild)===H&&((J=(W=H.closest(li))==null?void 0:W.querySelector(gE))==null||J.scrollIntoView({block:"nearest"})),H.scrollIntoView({block:"nearest"}))}function Y(){var P;return(P=z.current)==null?void 0:P.querySelector(`${Ig}[aria-selected="true"]`)}function xe(){var P;return Array.from(((P=z.current)==null?void 0:P.querySelectorAll(Dg))||[])}function le(P){let W=xe()[P];W&&B.setState("value",W.getAttribute(gs))}function te(P){var W;let J=Y(),H=xe(),oe=H.findIndex(K=>K===J),de=H[oe+P];(W=d.current)!=null&&W.loop&&(de=oe+P<0?H[H.length-1]:oe+P===H.length?H[0]:H[oe+P]),de&&B.setState("value",de.getAttribute(gs))}function U(P){let W=Y(),J=W?.closest(li),H;for(;J&&!H;)J=P>0?EE(J,li):PE(J,li),H=J?.querySelector(Dg);H?B.setState("value",H.getAttribute(gs)):te(P)}let G=()=>le(xe().length-1),$=P=>{P.preventDefault(),P.metaKey?G():P.altKey?U(1):te(1)},D=P=>{P.preventDefault(),P.metaKey?le(0):P.altKey?U(-1):te(-1)};return f.createElement(ze.div,{ref:e,tabIndex:-1,...A,"cmdk-root":"",onKeyDown:P=>{var W;(W=A.onKeyDown)==null||W.call(A,P);let J=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||J))switch(P.key){case"n":case"j":{k&&P.ctrlKey&&$(P);break}case"ArrowDown":{$(P);break}case"p":case"k":{k&&P.ctrlKey&&D(P);break}case"ArrowUp":{D(P);break}case"Home":{P.preventDefault(),le(0);break}case"End":{P.preventDefault(),G();break}case"Enter":{P.preventDefault();let H=Y();if(H){let oe=new Event(dd);H.dispatchEvent(oe)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:DE},h),ol(n,P=>f.createElement(Og.Provider,{value:B},f.createElement(Ng.Provider,{value:L},P))))}),yE=f.forwardRef((n,e)=>{var o,s;let a=Ct(),l=f.useRef(null),u=f.useContext(Tg),d=ci(),h=$g(n),m=(s=(o=h.current)==null?void 0:o.forceMount)!=null?s:u?.forceMount;To(()=>{if(!m)return d.item(a,u?.id)},[m]);let v=Mg(a,l,[n.value,n.children,l],n.keywords),y=fd(),w=Ur(R=>R.value&&R.value===v.current),b=Ur(R=>m||d.filter()===!1?!0:R.search?R.filtered.items.get(a)>0:!0);f.useEffect(()=>{let R=l.current;if(!(!R||n.disabled))return R.addEventListener(dd,S),()=>R.removeEventListener(dd,S)},[b,n.onSelect,n.disabled]);function S(){var R,B;C(),(B=(R=h.current).onSelect)==null||B.call(R,v.current)}function C(){y.setState("value",v.current,!0)}if(!b)return null;let{disabled:k,value:A,onSelect:N,forceMount:O,keywords:T,...z}=n;return f.createElement(ze.div,{ref:Co(l,e),...z,id:a,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!w,"data-disabled":!!k,"data-selected":!!w,onPointerMove:k||d.getDisablePointerSelection()?void 0:C,onClick:k?void 0:S},n.children)}),xE=f.forwardRef((n,e)=>{let{heading:o,children:s,forceMount:a,...l}=n,u=Ct(),d=f.useRef(null),h=f.useRef(null),m=Ct(),v=ci(),y=Ur(b=>a||v.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);To(()=>v.group(u),[]),Mg(u,d,[n.value,n.heading,h]);let w=f.useMemo(()=>({id:u,forceMount:a}),[a]);return f.createElement(ze.div,{ref:Co(d,e),...l,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},o&&f.createElement("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:m},o),ol(n,b=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?m:void 0},f.createElement(Tg.Provider,{value:w},b))))}),wE=f.forwardRef((n,e)=>{let{alwaysRender:o,...s}=n,a=f.useRef(null),l=Ur(u=>!u.search);return!o&&!l?null:f.createElement(ze.div,{ref:Co(a,e),...s,"cmdk-separator":"",role:"separator"})}),bE=f.forwardRef((n,e)=>{let{onValueChange:o,...s}=n,a=n.value!=null,l=fd(),u=Ur(m=>m.search),d=Ur(m=>m.selectedItemId),h=ci();return f.useEffect(()=>{n.value!=null&&l.setState("search",n.value)},[n.value]),f.createElement(ze.input,{ref:e,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":d,id:h.inputId,type:"text",value:a?n.value:u,onChange:m=>{a||l.setState("search",m.target.value),o?.(m.target.value)}})}),SE=f.forwardRef((n,e)=>{let{children:o,label:s="Suggestions",...a}=n,l=f.useRef(null),u=f.useRef(null),d=Ur(m=>m.selectedItemId),h=ci();return f.useEffect(()=>{if(u.current&&l.current){let m=u.current,v=l.current,y,w=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let b=m.offsetHeight;v.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return w.observe(m),()=>{cancelAnimationFrame(y),w.unobserve(m)}}},[]),f.createElement(ze.div,{ref:Co(l,e),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":s,id:h.listId},ol(n,m=>f.createElement("div",{ref:Co(u,h.listInnerRef),"cmdk-list-sizer":""},m)))}),kE=f.forwardRef((n,e)=>{let{open:o,onOpenChange:s,overlayClassName:a,contentClassName:l,container:u,...d}=n;return f.createElement(wu,{open:o,onOpenChange:s},f.createElement(bu,{container:u},f.createElement(ku,{"cmdk-overlay":"",className:a}),f.createElement(Cu,{"aria-label":n.label,"cmdk-dialog":"",className:l},f.createElement(Ag,{ref:e,...d}))))}),CE=f.forwardRef((n,e)=>Ur(o=>o.filtered.count===0)?f.createElement(ze.div,{ref:e,...n,"cmdk-empty":"",role:"presentation"}):null),_E=f.forwardRef((n,e)=>{let{progress:o,children:s,label:a="Loading...",...l}=n;return f.createElement(ze.div,{ref:e,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ol(n,u=>f.createElement("div",{"aria-hidden":!0},u)))}),rl=Object.assign(Ag,{List:SE,Item:yE,Input:bE,Group:xE,Separator:wE,Dialog:kE,Empty:CE,Loading:_E});function EE(n,e){let o=n.nextElementSibling;for(;o;){if(o.matches(e))return o;o=o.nextElementSibling}}function PE(n,e){let o=n.previousElementSibling;for(;o;){if(o.matches(e))return o;o=o.previousElementSibling}}function $g(n){let e=f.useRef(n);return To(()=>{e.current=n}),e}var To=typeof window>"u"?f.useEffect:f.useLayoutEffect;function vs(n){let e=f.useRef();return e.current===void 0&&(e.current=n()),e}function Ur(n){let e=fd(),o=()=>n(e.snapshot());return f.useSyncExternalStore(e.subscribe,o,o)}function Mg(n,e,o,s=[]){let a=f.useRef(),l=ci();return To(()=>{var u;let d=(()=>{var m;for(let v of o){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(m=v.current.textContent)==null?void 0:m.trim():a.current}})(),h=s.map(m=>m.trim());l.value(n,d,h),(u=e.current)==null||u.setAttribute(gs,d),a.current=d}),a}var RE=()=>{let[n,e]=f.useState(),o=vs(()=>new Map);return To(()=>{o.current.forEach(s=>s()),o.current=new Map},[n]),(s,a)=>{o.current.set(s,a),e({})}};function IE(n){let e=n.type;return typeof e=="function"?e(n.props):"render"in e?e.render(n.props):n}function ol({asChild:n,children:e},o){return n&&f.isValidElement(e)?f.cloneElement(IE(e),{ref:e.ref},o(e.props.children)):o(e)}var DE={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Te=n=>typeof n=="string",ui=()=>{let n,e;const o=new Promise((s,a)=>{n=s,e=a});return o.resolve=n,o.reject=e,o},jg=n=>n==null?"":""+n,NE=(n,e,o)=>{n.forEach(s=>{e[s]&&(o[s]=e[s])})},OE=/###/g,Lg=n=>n&&n.indexOf("###")>-1?n.replace(OE,"."):n,zg=n=>!n||Te(n),di=(n,e,o)=>{const s=Te(e)?e.split("."):e;let a=0;for(;a<s.length-1;){if(zg(n))return{};const l=Lg(s[a]);!n[l]&&o&&(n[l]=new o),Object.prototype.hasOwnProperty.call(n,l)?n=n[l]:n={},++a}return zg(n)?{}:{obj:n,k:Lg(s[a])}},Fg=(n,e,o)=>{const{obj:s,k:a}=di(n,e,Object);if(s!==void 0||e.length===1){s[a]=o;return}let l=e[e.length-1],u=e.slice(0,e.length-1),d=di(n,u,Object);for(;d.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),d=di(n,u,Object),d?.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=o},TE=(n,e,o,s)=>{const{obj:a,k:l}=di(n,e,Object);a[l]=a[l]||[],a[l].push(o)},sl=(n,e)=>{const{obj:o,k:s}=di(n,e);if(o&&Object.prototype.hasOwnProperty.call(o,s))return o[s]},AE=(n,e,o)=>{const s=sl(n,o);return s!==void 0?s:sl(e,o)},Vg=(n,e,o)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?Te(n[s])||n[s]instanceof String||Te(e[s])||e[s]instanceof String?o&&(n[s]=e[s]):Vg(n[s],e[s],o):n[s]=e[s]);return n},ys=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var $E={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ME=n=>Te(n)?n.replace(/[&<>"'\/]/g,e=>$E[e]):n;class jE{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const o=this.regExpMap.get(e);if(o!==void 0)return o;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const LE=[" ",",","?","!",";"],zE=new jE(20),FE=(n,e,o)=>{e=e||"",o=o||"";const s=LE.filter(u=>e.indexOf(u)<0&&o.indexOf(u)<0);if(s.length===0)return!0;const a=zE.getRegExp(`(${s.map(u=>u==="?"?"\\?":u).join("|")})`);let l=!a.test(n);if(!l){const u=n.indexOf(o);u>0&&!a.test(n.substring(0,u))&&(l=!0)}return l},pd=(n,e,o=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const s=e.split(o);let a=n;for(let l=0;l<s.length;){if(!a||typeof a!="object")return;let u,d="";for(let h=l;h<s.length;++h)if(h!==l&&(d+=o),d+=s[h],u=a[d],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&h<s.length-1)continue;l+=h-l+1;break}a=u}return a},fi=n=>n?.replace("_","-"),VE={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console?.[n]?.apply?.(console,e)}};class il{constructor(e,o={}){this.init(e,o)}init(e,o={}){this.prefix=o.prefix||"i18next:",this.logger=e||VE,this.options=o,this.debug=o.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,o,s,a){return a&&!this.debug?null:(Te(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[o](e))}create(e){return new il(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new il(this.logger,e)}}var Bn=new il;class al{constructor(){this.observers={}}on(e,o){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const a=this.observers[s].get(o)||0;this.observers[s].set(o,a+1)}),this}off(e,o){if(this.observers[e]){if(!o){delete this.observers[e];return}this.observers[e].delete(o)}}emit(e,...o){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([a,l])=>{for(let u=0;u<l;u++)a(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([a,l])=>{for(let u=0;u<l;u++)a.apply(a,[e,...o])})}}class Ug extends al{constructor(e,o={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const o=this.options.ns.indexOf(e);o>-1&&this.options.ns.splice(o,1)}getResource(e,o,s,a={}){const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;e.indexOf(".")>-1?d=e.split("."):(d=[e,o],s&&(Array.isArray(s)?d.push(...s):Te(s)&&l?d.push(...s.split(l)):d.push(s)));const h=sl(this.data,d);return!h&&!o&&!s&&e.indexOf(".")>-1&&(e=d[0],o=d[1],s=d.slice(2).join(".")),h||!u||!Te(s)?h:pd(this.data?.[e]?.[o],s,l)}addResource(e,o,s,a,l={silent:!1}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=[e,o];s&&(d=d.concat(u?s.split(u):s)),e.indexOf(".")>-1&&(d=e.split("."),a=o,o=d[1]),this.addNamespaces(o),Fg(this.data,d,a),l.silent||this.emit("added",e,o,s,a)}addResources(e,o,s,a={silent:!1}){for(const l in s)(Te(s[l])||Array.isArray(s[l]))&&this.addResource(e,o,l,s[l],{silent:!0});a.silent||this.emit("added",e,o,s)}addResourceBundle(e,o,s,a,l,u={silent:!1,skipCopy:!1}){let d=[e,o];e.indexOf(".")>-1&&(d=e.split("."),a=s,s=o,o=d[1]),this.addNamespaces(o);let h=sl(this.data,d)||{};u.skipCopy||(s=JSON.parse(JSON.stringify(s))),a?Vg(h,s,l):h={...h,...s},Fg(this.data,d,h),u.silent||this.emit("added",e,o,s)}removeResourceBundle(e,o){this.hasResourceBundle(e,o)&&delete this.data[e][o],this.removeNamespaces(o),this.emit("removed",e,o)}hasResourceBundle(e,o){return this.getResource(e,o)!==void 0}getResourceBundle(e,o){return o||(o=this.options.defaultNS),this.getResource(e,o)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const o=this.getDataByLanguage(e);return!!(o&&Object.keys(o)||[]).find(a=>o[a]&&Object.keys(o[a]).length>0)}toJSON(){return this.data}}var Bg={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,o,s,a){return n.forEach(l=>{e=this.processors[l]?.process(e,o,s,a)??e}),e}};const Hg=Symbol("i18next/PATH_KEY");function UE(){const n=[],e=Object.create(null);let o;return e.get=(s,a)=>(o?.revoke?.(),a===Hg?n:(n.push(a),o=Proxy.revocable(s,e),o.proxy)),Proxy.revocable(Object.create(null),e).proxy}function hd(n,e){const{[Hg]:o}=n(UE());return o.join(e?.keySeparator??".")}const Wg={},md=n=>!Te(n)&&typeof n!="boolean"&&typeof n!="number";class ll extends al{constructor(e,o={}){super(),NE(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Bn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,o={interpolation:{}}){const s={...o};if(e==null)return!1;const a=this.resolve(e,s);if(a?.res===void 0)return!1;const l=md(a.res);return!(s.returnObjects===!1&&l)}extractFromKey(e,o){let s=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=o.ns||this.options.defaultNS||[];const u=s&&e.indexOf(s)>-1,d=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!FE(e,s,a);if(u&&!d){const h=e.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:e,namespaces:Te(l)?[l]:l};const m=e.split(s);(s!==a||s===a&&this.options.ns.indexOf(m[0])>-1)&&(l=m.shift()),e=m.join(a)}return{key:e,namespaces:Te(l)?[l]:l}}translate(e,o,s){let a=typeof o=="object"?{...o}:o;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),e==null)return"";typeof e=="function"&&(e=hd(e,{...this.options,...a})),Array.isArray(e)||(e=[String(e)]);const l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,u=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:d,namespaces:h}=this.extractFromKey(e[e.length-1],a),m=h[h.length-1];let v=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const y=a.lng||this.language,w=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(y?.toLowerCase()==="cimode")return w?l?{res:`${m}${v}${d}`,usedKey:d,exactUsedKey:d,usedLng:y,usedNS:m,usedParams:this.getUsedParamsDetails(a)}:`${m}${v}${d}`:l?{res:d,usedKey:d,exactUsedKey:d,usedLng:y,usedNS:m,usedParams:this.getUsedParamsDetails(a)}:d;const b=this.resolve(e,a);let S=b?.res;const C=b?.usedKey||d,k=b?.exactUsedKey||d,A=["[object Number]","[object Function]","[object RegExp]"],N=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,T=a.count!==void 0&&!Te(a.count),z=ll.hasDefaultValue(a),R=T?this.pluralResolver.getSuffix(y,a.count,a):"",B=a.ordinal&&T?this.pluralResolver.getSuffix(y,a.count,{ordinal:!1}):"",L=T&&!a.ordinal&&a.count===0,Z=L&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${R}`]||a[`defaultValue${B}`]||a.defaultValue;let ae=S;O&&!S&&z&&(ae=Z);const be=md(ae),ue=Object.prototype.toString.apply(ae);if(O&&ae&&be&&A.indexOf(ue)<0&&!(Te(N)&&Array.isArray(ae))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ce=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,ae,{...a,ns:h}):`key '${d} (${this.language})' returned an object instead of string.`;return l?(b.res=ce,b.usedParams=this.getUsedParamsDetails(a),b):ce}if(u){const ce=Array.isArray(ae),Y=ce?[]:{},xe=ce?k:C;for(const le in ae)if(Object.prototype.hasOwnProperty.call(ae,le)){const te=`${xe}${u}${le}`;z&&!S?Y[le]=this.translate(te,{...a,defaultValue:md(Z)?Z[le]:void 0,joinArrays:!1,ns:h}):Y[le]=this.translate(te,{...a,joinArrays:!1,ns:h}),Y[le]===te&&(Y[le]=ae[le])}S=Y}}else if(O&&Te(N)&&Array.isArray(S))S=S.join(N),S&&(S=this.extendTranslation(S,e,a,s));else{let ce=!1,Y=!1;!this.isValidLookup(S)&&z&&(ce=!0,S=Z),this.isValidLookup(S)||(Y=!0,S=d);const le=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Y?void 0:S,te=z&&Z!==S&&this.options.updateMissing;if(Y||ce||te){if(this.logger.log(te?"updateKey":"missingKey",y,m,d,te?Z:S),u){const D=this.resolve(d,{...a,keySeparator:!1});D&&D.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 G=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&G&&G[0])for(let D=0;D<G.length;D++)U.push(G[D]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(a.lng||this.language):U.push(a.lng||this.language);const $=(D,P,W)=>{const J=z&&W!==S?W:le;this.options.missingKeyHandler?this.options.missingKeyHandler(D,m,P,J,te,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(D,m,P,J,te,a),this.emit("missingKey",D,m,P,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?U.forEach(D=>{const P=this.pluralResolver.getSuffixes(D,a);L&&a[`defaultValue${this.options.pluralSeparator}zero`]&&P.indexOf(`${this.options.pluralSeparator}zero`)<0&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(W=>{$([D],d+W,a[`defaultValue${W}`]||Z)})}):$(U,d,Z))}S=this.extendTranslation(S,e,a,b,s),Y&&S===d&&this.options.appendNamespaceToMissingKey&&(S=`${m}${v}${d}`),(Y||ce)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${v}${d}`:d,ce?S:void 0,a))}return l?(b.res=S,b.usedParams=this.getUsedParamsDetails(a),b):S}extendTranslation(e,o,s,a,l){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const h=Te(e)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(h){const y=e.match(this.interpolator.nestingRegexp);m=y&&y.length}let v=s.replace&&!Te(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),e=this.interpolator.interpolate(e,v,s.lng||this.language||a.usedLng,s),h){const y=e.match(this.interpolator.nestingRegexp),w=y&&y.length;m<w&&(s.nest=!1)}!s.lng&&a&&a.res&&(s.lng=this.language||a.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,(...y)=>l?.[0]===y[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${o[0]}`),null):this.translate(...y,o),s)),s.interpolation&&this.interpolator.reset()}const u=s.postProcess||this.options.postProcess,d=Te(u)?[u]:u;return e!=null&&d?.length&&s.applyPostProcessor!==!1&&(e=Bg.handle(d,e,o,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,o={}){let s,a,l,u,d;return Te(e)&&(e=[e]),e.forEach(h=>{if(this.isValidLookup(s))return;const m=this.extractFromKey(h,o),v=m.key;a=v;let y=m.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const w=o.count!==void 0&&!Te(o.count),b=w&&!o.ordinal&&o.count===0,S=o.context!==void 0&&(Te(o.context)||typeof o.context=="number")&&o.context!=="",C=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);y.forEach(k=>{this.isValidLookup(s)||(d=k,!Wg[`${C[0]}-${k}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(Wg[`${C[0]}-${k}`]=!0,this.logger.warn(`key "${a}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" 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!!!")),C.forEach(A=>{if(this.isValidLookup(s))return;u=A;const N=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(N,v,A,k,o);else{let T;w&&(T=this.pluralResolver.getSuffix(A,o.count,o));const z=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(w&&(o.ordinal&&T.indexOf(R)===0&&N.push(v+T.replace(R,this.options.pluralSeparator)),N.push(v+T),b&&N.push(v+z)),S){const B=`${v}${this.options.contextSeparator||"_"}${o.context}`;N.push(B),w&&(o.ordinal&&T.indexOf(R)===0&&N.push(B+T.replace(R,this.options.pluralSeparator)),N.push(B+T),b&&N.push(B+z))}}let O;for(;O=N.pop();)this.isValidLookup(s)||(l=O,s=this.getResource(A,k,O,o))}))})}),{res:s,usedKey:a,exactUsedKey:l,usedLng:u,usedNS:d}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,o,s,a={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,o,s,a):this.resourceStore.getResource(e,o,s,a)}getUsedParamsDetails(e={}){const o=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!Te(e.replace);let a=s?e.replace:e;if(s&&typeof e.count<"u"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!s){a={...a};for(const l of o)delete a[l]}return a}static hasDefaultValue(e){const o="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&o===s.substring(0,o.length)&&e[s]!==void 0)return!0;return!1}}class Kg{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Bn.create("languageUtils")}getScriptPartFromCode(e){if(e=fi(e),!e||e.indexOf("-")<0)return null;const o=e.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(e){if(e=fi(e),!e||e.indexOf("-")<0)return e;const o=e.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(e){if(Te(e)&&e.indexOf("-")>-1){let o;try{o=Intl.getCanonicalLocales(e)[0]}catch{}return o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let o;return e.forEach(s=>{if(o)return;const a=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(a))&&(o=a)}),!o&&this.options.supportedLngs&&e.forEach(s=>{if(o)return;const a=this.getScriptPartFromCode(s);if(this.isSupportedCode(a))return o=a;const l=this.getLanguagePartFromCode(s);if(this.isSupportedCode(l))return o=l;o=this.options.supportedLngs.find(u=>{if(u===l)return u;if(!(u.indexOf("-")<0&&l.indexOf("-")<0)&&(u.indexOf("-")>0&&l.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===l||u.indexOf(l)===0&&l.length>1))return u})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(e,o){if(!e)return[];if(typeof e=="function"&&(e=e(o)),Te(e)&&(e=[e]),Array.isArray(e))return e;if(!o)return e.default||[];let s=e[o];return s||(s=e[this.getScriptPartFromCode(o)]),s||(s=e[this.formatLanguageCode(o)]),s||(s=e[this.getLanguagePartFromCode(o)]),s||(s=e.default),s||[]}toResolveHierarchy(e,o){const s=this.getFallbackCodes((o===!1?[]:o)||this.options.fallbackLng||[],e),a=[],l=u=>{u&&(this.isSupportedCode(u)?a.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return Te(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(e))):Te(e)&&l(this.formatLanguageCode(e)),s.forEach(u=>{a.indexOf(u)<0&&l(this.formatLanguageCode(u))}),a}}const Zg={zero:0,one:1,two:2,few:3,many:4,other:5},Gg={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class BE{constructor(e,o={}){this.languageUtils=e,this.options=o,this.logger=Bn.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,o){this.rules[e]=o}clearCache(){this.pluralRulesCache={}}getRule(e,o={}){const s=fi(e==="dev"?"en":e),a=o.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:s,type:a});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let u;try{u=new Intl.PluralRules(s,{type:a})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Gg;if(!e.match(/-|_/))return Gg;const h=this.languageUtils.getLanguagePartFromCode(e);u=this.getRule(h,o)}return this.pluralRulesCache[l]=u,u}needsPlural(e,o={}){let s=this.getRule(e,o);return s||(s=this.getRule("dev",o)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,o,s={}){return this.getSuffixes(e,s).map(a=>`${o}${a}`)}getSuffixes(e,o={}){let s=this.getRule(e,o);return s||(s=this.getRule("dev",o)),s?s.resolvedOptions().pluralCategories.sort((a,l)=>Zg[a]-Zg[l]).map(a=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(e,o,s={}){const a=this.getRule(e,s);return a?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${a.select(o)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",o,s))}}const qg=(n,e,o,s=".",a=!0)=>{let l=AE(n,e,o);return!l&&a&&Te(o)&&(l=pd(n,o,s),l===void 0&&(l=pd(e,o,s))),l},gd=n=>n.replace(/\$/g,"$$$$");class HE{constructor(e={}){this.logger=Bn.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(o=>o),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:o,escapeValue:s,useRawValueToEscape:a,prefix:l,prefixEscaped:u,suffix:d,suffixEscaped:h,formatSeparator:m,unescapeSuffix:v,unescapePrefix:y,nestingPrefix:w,nestingPrefixEscaped:b,nestingSuffix:S,nestingSuffixEscaped:C,nestingOptionsSeparator:k,maxReplaces:A,alwaysFormat:N}=e.interpolation;this.escape=o!==void 0?o:ME,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=l?ys(l):u||"{{",this.suffix=d?ys(d):h||"}}",this.formatSeparator=m||",",this.unescapePrefix=v?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=w?ys(w):b||ys("$t("),this.nestingSuffix=S?ys(S):C||ys(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=A||1e3,this.alwaysFormat=N!==void 0?N:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(o,s)=>o?.source===s?(o.lastIndex=0,o):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,o,s,a){let l,u,d;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=b=>{if(b.indexOf(this.formatSeparator)<0){const A=qg(o,h,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(A,void 0,s,{...a,...o,interpolationkey:b}):A}const S=b.split(this.formatSeparator),C=S.shift().trim(),k=S.join(this.formatSeparator).trim();return this.format(qg(o,h,C,this.options.keySeparator,this.options.ignoreJSONStructure),k,s,{...a,...o,interpolationkey:C})};this.resetRegExp();const v=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,y=a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>gd(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?gd(this.escape(b)):gd(b)}].forEach(b=>{for(d=0;l=b.regex.exec(e);){const S=l[1].trim();if(u=m(S),u===void 0)if(typeof v=="function"){const k=v(e,l,a);u=Te(k)?k:""}else if(a&&Object.prototype.hasOwnProperty.call(a,S))u="";else if(y){u=l[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),u="";else!Te(u)&&!this.useRawValueToEscape&&(u=jg(u));const C=b.safeValue(u);if(e=e.replace(l[0],C),y?(b.regex.lastIndex+=u.length,b.regex.lastIndex-=l[0].length):b.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),e}nest(e,o,s={}){let a,l,u;const d=(h,m)=>{const v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;const y=h.split(new RegExp(`${v}[ ]*{`));let w=`{${y[1]}`;h=y[0],w=this.interpolate(w,u);const b=w.match(/'/g),S=w.match(/"/g);((b?.length??0)%2===0&&!S||S.length%2!==0)&&(w=w.replace(/'/g,'"'));try{u=JSON.parse(w),m&&(u={...m,...u})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,C),`${h}${v}${w}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,h};for(;a=this.nestingRegexp.exec(e);){let h=[];u={...s},u=u.replace&&!Te(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const m=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(m!==-1&&(h=a[1].slice(m).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),a[1]=a[1].slice(0,m)),l=o(d.call(this,a[1].trim(),u),u),l&&a[0]===e&&!Te(l))return l;Te(l)||(l=jg(l)),l||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),l=""),h.length&&(l=h.reduce((v,y)=>this.format(v,y,s.lng,{...s,interpolationkey:a[1].trim()}),l.trim())),e=e.replace(a[0],l),this.regexp.lastIndex=0}return e}}const WE=n=>{let e=n.toLowerCase().trim();const o={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const a=s[1].substring(0,s[1].length-1);e==="currency"&&a.indexOf(":")<0?o.currency||(o.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?o.range||(o.range=a.trim()):a.split(";").forEach(u=>{if(u){const[d,...h]=u.split(":"),m=h.join(":").trim().replace(/^'+|'+$/g,""),v=d.trim();o[v]||(o[v]=m),m==="false"&&(o[v]=!1),m==="true"&&(o[v]=!0),isNaN(m)||(o[v]=parseInt(m,10))}})}return{formatName:e,formatOptions:o}},Yg=n=>{const e={};return(o,s,a)=>{let l=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(l={...l,[a.interpolationkey]:void 0});const u=s+JSON.stringify(l);let d=e[u];return d||(d=n(fi(s),a),e[u]=d),d(o)}},KE=n=>(e,o,s)=>n(fi(o),s)(e);class ZE{constructor(e={}){this.logger=Bn.create("formatter"),this.options=e,this.init(e)}init(e,o={interpolation:{}}){this.formatSeparator=o.interpolation.formatSeparator||",";const s=o.cacheInBuiltFormats?Yg:KE;this.formats={number:s((a,l)=>{const u=new Intl.NumberFormat(a,{...l});return d=>u.format(d)}),currency:s((a,l)=>{const u=new Intl.NumberFormat(a,{...l,style:"currency"});return d=>u.format(d)}),datetime:s((a,l)=>{const u=new Intl.DateTimeFormat(a,{...l});return d=>u.format(d)}),relativetime:s((a,l)=>{const u=new Intl.RelativeTimeFormat(a,{...l});return d=>u.format(d,l.range||"day")}),list:s((a,l)=>{const u=new Intl.ListFormat(a,{...l});return d=>u.format(d)})}}add(e,o){this.formats[e.toLowerCase().trim()]=o}addCached(e,o){this.formats[e.toLowerCase().trim()]=Yg(o)}format(e,o,s,a={}){const l=o.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(d=>d.indexOf(")")>-1)){const d=l.findIndex(h=>h.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,d)].join(this.formatSeparator)}return l.reduce((d,h)=>{const{formatName:m,formatOptions:v}=WE(h);if(this.formats[m]){let y=d;try{const w=a?.formatParams?.[a.interpolationkey]||{},b=w.locale||w.lng||a.locale||a.lng||s;y=this.formats[m](d,b,{...v,...a,...w})}catch(w){this.logger.warn(w)}return y}else this.logger.warn(`there was no format function for ${m}`);return d},e)}}const GE=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class qE extends al{constructor(e,o,s,a={}){super(),this.backend=e,this.store=o,this.services=s,this.languageUtils=s.languageUtils,this.options=a,this.logger=Bn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,a.backend,a)}queueLoad(e,o,s,a){const l={},u={},d={},h={};return e.forEach(m=>{let v=!0;o.forEach(y=>{const w=`${m}|${y}`;!s.reload&&this.store.hasResourceBundle(m,y)?this.state[w]=2:this.state[w]<0||(this.state[w]===1?u[w]===void 0&&(u[w]=!0):(this.state[w]=1,v=!1,u[w]===void 0&&(u[w]=!0),l[w]===void 0&&(l[w]=!0),h[y]===void 0&&(h[y]=!0)))}),v||(d[m]=!0)}),(Object.keys(l).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(l),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(h)}}loaded(e,o,s){const a=e.split("|"),l=a[0],u=a[1];o&&this.emit("failedLoading",l,u,o),!o&&s&&this.store.addResourceBundle(l,u,s,void 0,void 0,{skipCopy:!0}),this.state[e]=o?-1:2,o&&s&&(this.state[e]=0);const d={};this.queue.forEach(h=>{TE(h.loaded,[l],u),GE(h,e),o&&h.errors.push(o),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(m=>{d[m]||(d[m]={});const v=h.loaded[m];v.length&&v.forEach(y=>{d[m][y]===void 0&&(d[m][y]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(h=>!h.done)}read(e,o,s,a=0,l=this.retryTimeout,u){if(!e.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:o,fcName:s,tried:a,wait:l,callback:u});return}this.readingCalls++;const d=(m,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(m&&v&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,o,s,a+1,l*2,u)},l);return}u(m,v)},h=this.backend[s].bind(this.backend);if(h.length===2){try{const m=h(e,o);m&&typeof m.then=="function"?m.then(v=>d(null,v)).catch(d):d(null,m)}catch(m){d(m)}return}return h(e,o,d)}prepareLoading(e,o,s={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();Te(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Te(o)&&(o=[o]);const l=this.queueLoad(e,o,s,a);if(!l.toLoad.length)return l.pending.length||a(),null;l.toLoad.forEach(u=>{this.loadOne(u)})}load(e,o,s){this.prepareLoading(e,o,{},s)}reload(e,o,s){this.prepareLoading(e,o,{reload:!0},s)}loadOne(e,o=""){const s=e.split("|"),a=s[0],l=s[1];this.read(a,l,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${o}loading namespace ${l} for language ${a} failed`,u),!u&&d&&this.logger.log(`${o}loaded namespace ${l} for language ${a}`,d),this.loaded(e,u,d)})}saveMissing(e,o,s,a,l,u={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${s}" as the namespace "${o}" 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(!(s==null||s==="")){if(this.backend?.create){const h={...u,isUpdate:l},m=this.backend.create.bind(this.backend);if(m.length<6)try{let v;m.length===5?v=m(e,o,s,a,h):v=m(e,o,s,a),v&&typeof v.then=="function"?v.then(y=>d(null,y)).catch(d):d(null,v)}catch(v){d(v)}else m(e,o,s,a,d,h)}!e||!e[0]||this.store.addResource(e[0],o,s,a)}}}const Qg=()=>({debug:!1,initAsync:!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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),Te(n[1])&&(e.defaultValue=n[1]),Te(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const o=n[3]||n[2];Object.keys(o).forEach(s=>{e[s]=o[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Xg=n=>(Te(n.ns)&&(n.ns=[n.ns]),Te(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Te(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),cl=()=>{},YE=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(o=>{typeof n[o]=="function"&&(n[o]=n[o].bind(n))})};class pi extends al{constructor(e={},o){if(super(),this.options=Xg(e),this.services={},this.logger=Bn,this.modules={external:[]},YE(this),o&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,o),this;setTimeout(()=>{this.init(e,o)},0)}}init(e={},o){this.isInitializing=!0,typeof e=="function"&&(o=e,e={}),e.defaultNS==null&&e.ns&&(Te(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=Qg();this.options={...s,...this.options,...Xg(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const a=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Bn.init(a(this.modules.logger),this.options):Bn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=ZE;const v=new Kg(this.options);this.store=new Ug(this.options.resources,this.options);const y=this.services;y.logger=Bn,y.resourceStore=this.store,y.languageUtils=v,y.pluralResolver=new BE(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(y.formatter=a(m),y.formatter.init&&y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new HE(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new qE(a(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.languageDetector&&(y.languageDetector=a(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=a(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new ll(this.services,this.options),this.translator.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,o||(o=cl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=(...v)=>this.store[m](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...v)=>(this.store[m](...v),this)});const d=ui(),h=()=>{const m=(v,y)=>{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),d.resolve(y),o(v,y)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?h():setTimeout(h,0),d}loadResources(e,o=cl){let s=o;const a=Te(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(a?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const l=[],u=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(m=>{m!=="cimode"&&l.indexOf(m)<0&&l.push(m)})};a?u(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>u(h)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(l,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(d)})}else s(null)}reloadResources(e,o,s){const a=ui();return typeof e=="function"&&(s=e,e=void 0),typeof o=="function"&&(s=o,o=void 0),e||(e=this.languages),o||(o=this.options.ns),s||(s=cl),this.services.backendConnector.reload(e,o,l=>{a.resolve(),s(l)}),a}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Bg.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let o=0;o<this.languages.length;o++){const s=this.languages[o];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,o){this.isLanguageChangingTo=e;const s=ui();this.emit("languageChanging",e);const a=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,h)=>{h?this.isLanguageChangingTo===e&&(a(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,s.resolve((...m)=>this.t(...m)),o&&o(d,(...m)=>this.t(...m))},u=d=>{!e&&!d&&this.services.languageDetector&&(d=[]);const h=Te(d)?d:d&&d[0],m=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(Te(d)?[d]:d);m&&(this.language||a(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,v=>{l(v,m)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),s}getFixedT(e,o,s){const a=(l,u,...d)=>{let h;typeof u!="object"?h=this.options.overloadTranslationOptionHandler([l,u].concat(d)):h={...u},h.lng=h.lng||a.lng,h.lngs=h.lngs||a.lngs,h.ns=h.ns||a.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||s||a.keyPrefix);const m=this.options.keySeparator||".";let v;return h.keyPrefix&&Array.isArray(l)?v=l.map(y=>(typeof y=="function"&&(y=hd(y,{...this.options,...u})),`${h.keyPrefix}${m}${y}`)):(typeof l=="function"&&(l=hd(l,{...this.options,...u})),v=h.keyPrefix?`${h.keyPrefix}${m}${l}`:l),this.t(v,h)};return Te(e)?a.lng=e:a.lngs=e,a.ns=o,a.keyPrefix=s,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,o={}){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 s=o.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const u=(d,h)=>{const m=this.services.backendConnector.state[`${d}|${h}`];return m===-1||m===0||m===2};if(o.precheck){const d=o.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,e)&&(!a||u(l,e)))}loadNamespaces(e,o){const s=ui();return this.options.ns?(Te(e)&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{s.resolve(),o&&o(a)}),s):(o&&o(),Promise.resolve())}loadLanguages(e,o){const s=ui();Te(e)&&(e=[e]);const a=this.options.preload||[],l=e.filter(u=>a.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return l.length?(this.options.preload=a.concat(l),this.loadResources(u=>{s.resolve(),o&&o(u)}),s):(o&&o(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const l=a.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const o=["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"],s=this.services?.languageUtils||new Kg(Qg());return e.toLowerCase().indexOf("-latn")>1?"ltr":o.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},o){return new pi(e,o)}cloneInstance(e={},o=cl){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},l=new pi(a);if((e.debug!==void 0||e.prefix!==void 0)&&(l.logger=l.logger.clone(e)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},s){const d=Object.keys(this.store.data).reduce((h,m)=>(h[m]={...this.store.data[m]},h[m]=Object.keys(h[m]).reduce((v,y)=>(v[y]={...h[m][y]},v),h[m]),h),{});l.store=new Ug(d,a),l.services.resourceStore=l.store}return l.translator=new ll(l.services,a),l.translator.on("*",(d,...h)=>{l.emit(d,...h)}),l.init(a,o),l.translator.options=a,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Vt=pi.createInstance();Vt.createInstance=pi.createInstance;const QE=Vt.createInstance;Vt.dir,Vt.init,Vt.loadResources,Vt.reloadResources,Vt.use,Vt.changeLanguage,Vt.getFixedT,Vt.t,Vt.exists,Vt.setDefaultNamespace,Vt.hasLoadedNamespace,Vt.loadNamespaces,Vt.loadLanguages;const XE=Symbol("remote-view.message");class JE extends Error{constructor(e,o,s){super(),this.key=e,this.values=o,Object.defineProperty(this,"message",{configurable:!0,get:()=>s(e,o)}),this.name="ViewMessageError"}key;values}const vd={en:{close:"Close",commandTitle:"Command palette",commandDescription:"Search for a command to run…"},"zh-Hans":{close:"关闭",commandTitle:"命令面板",commandDescription:"搜索要运行的命令…"},"zh-Hant":{close:"關閉",commandTitle:"命令面板",commandDescription:"搜尋要執行的命令…"}};function Jg(n){try{const e=new Intl.Locale((n||"en").replaceAll("_","-"));return e.language==="zh"?e.maximize().script==="Hant"?"zh-Hant":"zh-Hans":"en"}catch{return"en"}}function ev(n,e=typeof navigator>"u"?"en":navigator.language){const o=d=>{const h=Jg(d);return h==="zh-Hant"&&!n["zh-Hant"]?"zh-Hans":h},s=QE();s.init({lng:o(e),fallbackLng:"en",supportedLngs:["en","zh-Hans","zh-Hant"],load:"currentOnly",initAsync:!1,keySeparator:!1,defaultNS:"view",interpolation:{escapeValue:!1},resources:{en:{view:n.en,ui:vd.en},"zh-Hans":{view:n["zh-Hans"],ui:vd["zh-Hans"]},"zh-Hant":{view:n["zh-Hant"]??n["zh-Hans"],ui:vd["zh-Hant"]}}});const a=()=>o(s.resolvedLanguage??s.language),l=d=>(s.on("languageChanged",d),()=>{s.off("languageChanged",d)}),u=(d,h)=>String(s.t(d,h));return{getLocale:a,subscribe:l,setLocale(d){d!==void 0&&s.changeLanguage(o(d)),typeof document<"u"&&(document.documentElement.lang=a())},t:(d,h)=>u(d,h),message:(d,h)=>({[XE]:!0,key:d,values:h}),error:(d,h)=>new JE(d,h,u),format(d){return typeof d=="string"?d:d instanceof Error?d.message:u(d.key,d.values)},ui:d=>String(s.t(d,{ns:"ui"})),date(d,h={}){const m=new Date(d);return Number.isNaN(m.getTime())?"":new Intl.DateTimeFormat(a(),h).format(m)},number(d,h){return new Intl.NumberFormat(a(),h).format(d)},label(d,h=""){if(typeof d=="string")return d;const m=Object.entries(d),v=a();return m.find(([y])=>Jg(y)===v&&/^(en|zh)([-_]|$)/i.test(y))?.[1]??d.en_US??d.en??d["en-US"]??h}}}const eP=ev({en:{},"zh-Hans":{}},"en"),tv=f.createContext(eP);function tP({i18n:n,children:e}){return _.jsx(tv.Provider,{value:n,children:e})}function nP(n){return f.useSyncExternalStore(n.subscribe,n.getLocale,n.getLocale)}function nv(){const n=f.useContext(tv);return nP(n),n.ui}f.createContext(null);function Le(...n){return V0(Ip(n))}const yd=id("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}}),at=f.forwardRef(function({className:n,variant:e="default",size:o="default",asChild:s=!1,...a},l){const u=s?oh:"button";return _.jsx(u,{ref:l,"data-slot":"button","data-variant":e,"data-size":o,className:Le(yd({variant:e,size:o,className:n})),...a})});function rv({...n}){return _.jsx(n1,{"data-slot":"alert-dialog",...n})}function rP({...n}){return _.jsx(r1,{"data-slot":"alert-dialog-portal",...n})}function oP({className:n,...e}){return _.jsx(o1,{"data-slot":"alert-dialog-overlay",className:Le("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),...e})}function ov({className:n,size:e="default",...o}){return _.jsxs(rP,{children:[_.jsx(oP,{}),_.jsx(s1,{"data-slot":"alert-dialog-content","data-size":e,className:Le("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...o})]})}function sv({className:n,...e}){return _.jsx("div",{"data-slot":"alert-dialog-footer",className:Le("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",n),...e})}function iv({className:n,...e}){return _.jsx(a1,{"data-slot":"alert-dialog-title",className:Le("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",n),...e})}function av({className:n,...e}){return _.jsx(l1,{"data-slot":"alert-dialog-description",className:Le("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",n),...e})}function lv({className:n,variant:e="outline",size:o="default",...s}){return _.jsx(at,{variant:e,size:o,asChild:!0,children:_.jsx(i1,{"data-slot":"alert-dialog-cancel",className:Le(n),...s})})}const sP=id("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function iP({className:n,variant:e="default",asChild:o=!1,...s}){const a=o?oh:"span";return _.jsx(a,{"data-slot":"badge","data-variant":e,className:Le(sP({variant:e}),n),...s})}function aP({...n}){return _.jsx(wu,{"data-slot":"dialog",...n})}function lP({...n}){return _.jsx(bu,{"data-slot":"dialog-portal",...n})}function cP({className:n,...e}){return _.jsx(ku,{"data-slot":"dialog-overlay",className:Le("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),...e})}function uP({className:n,children:e,showCloseButton:o=!0,...s}){const a=nv();return _.jsxs(lP,{children:[_.jsx(cP,{}),_.jsxs(Cu,{"data-slot":"dialog-content",className:Le("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s,children:[e,o&&_.jsx($a,{"data-slot":"dialog-close",asChild:!0,children:_.jsxs(at,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[_.jsx(tb,{}),_.jsx("span",{className:"sr-only",children:a("close")})]})})]})]})}function dP({className:n,...e}){return _.jsx("div",{"data-slot":"dialog-header",className:Le("flex flex-col gap-2",n),...e})}function fP({className:n,showCloseButton:e=!1,children:o,...s}){const a=nv();return _.jsxs("div",{"data-slot":"dialog-footer",className:Le("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",n),...s,children:[o,e&&_.jsx($a,{asChild:!0,children:_.jsx(at,{variant:"outline",children:a("close")})})]})}function pP({className:n,...e}){return _.jsx(im,{"data-slot":"dialog-title",className:Le("text-base leading-none font-medium",n),...e})}function hP({className:n,...e}){return _.jsx(am,{"data-slot":"dialog-description",className:Le("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",n),...e})}function cv({className:n,type:e,...o}){return _.jsx("input",{type:e,"data-slot":"input",className:Le("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),...o})}function mP({className:n,...e}){return _.jsx("textarea",{"data-slot":"textarea",className:Le("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),...e})}function gP({className:n,...e}){return _.jsx("div",{"data-slot":"input-group",role:"group",className:Le("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",n),...e})}const vP=id("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function yP({className:n,align:e="inline-start",...o}){return _.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:Le(vP({align:e}),n),onClick:s=>{s.target.closest("button")||s.currentTarget.parentElement?.querySelector("input")?.focus()},...o})}function uv({className:n,...e}){return _.jsx(rl,{"data-slot":"command",className:Le("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",n),...e})}function dv({className:n,...e}){return _.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:_.jsxs(gP,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[_.jsx(rl.Input,{"data-slot":"command-input",className:Le("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),...e}),_.jsx(yP,{children:_.jsx(X0,{className:"size-4 shrink-0 opacity-50"})})]})})}function fv({className:n,...e}){return _.jsx(rl.List,{"data-slot":"command-list",className:Le("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",n),...e})}function pv({className:n,children:e,...o}){return _.jsxs(rl.Item,{"data-slot":"command-item",className:Le("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",n),...o,children:[e,_.jsx(Ys,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function xP({...n}){return _.jsx(qC,{"data-slot":"dropdown-menu",...n})}function hv({...n}){return _.jsx(cg,{"data-slot":"dropdown-menu-portal",...n})}function wP({...n}){return _.jsx(YC,{"data-slot":"dropdown-menu-trigger",...n})}function bP({className:n,align:e="start",sideOffset:o=4,...s}){return _.jsx(cg,{children:_.jsx(QC,{"data-slot":"dropdown-menu-content",sideOffset:o,align:e,className:Le("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s})})}function ul({className:n,inset:e,variant:o="default",...s}){return _.jsx(JC,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":o,className:Le("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),...s})}function mv({...n}){return _.jsx(e_,{"data-slot":"dropdown-menu-radio-group",...n})}function hi({className:n,children:e,inset:o,...s}){return _.jsxs(t_,{"data-slot":"dropdown-menu-radio-item","data-inset":o,className:Le("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...s,children:[_.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:_.jsx(n_,{children:_.jsx(Ys,{})})}),e]})}function SP({className:n,inset:e,...o}){return _.jsx(XC,{"data-slot":"dropdown-menu-label","data-inset":e,className:Le("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",n),...o})}function gv({className:n,...e}){return _.jsx(r_,{"data-slot":"dropdown-menu-separator",className:Le("-mx-1 my-1 h-px bg-border",n),...e})}function vv({...n}){return _.jsx(o_,{"data-slot":"dropdown-menu-sub",...n})}function yv({className:n,inset:e,children:o,...s}){return _.jsxs(s_,{"data-slot":"dropdown-menu-sub-trigger","data-inset":e,className:Le("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...s,children:[o,_.jsx(ya,{className:"ml-auto"})]})}function xv({className:n,...e}){return _.jsx(i_,{"data-slot":"dropdown-menu-sub-content",className:Le("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...e})}function wv({...n}){return _.jsx(k_,{"data-slot":"popover",...n})}function bv({...n}){return _.jsx(C_,{"data-slot":"popover-trigger",...n})}function Sv({className:n,align:e="center",sideOffset:o=4,...s}){return _.jsx(__,{children:_.jsx(E_,{"data-slot":"popover-content",align:e,sideOffset:o,className:Le("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s})})}function dl({...n}){return _.jsx(A_,{"data-slot":"select",...n})}function fl({...n}){return _.jsx(L_,{"data-slot":"select-value",...n})}function pl({className:n,size:e="default",children:o,...s}){return _.jsxs(M_,{"data-slot":"select-trigger","data-size":e,className:Le("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...s,children:[o,_.jsx(z_,{asChild:!0,children:_.jsx(Kc,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function hl({className:n,children:e,position:o="item-aligned",align:s="center",...a}){return _.jsx(B_,{children:_.jsxs(H_,{"data-slot":"select-content","data-align-trigger":o==="item-aligned",className:Le("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o==="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",n),position:o,align:s,...a,children:[_.jsx(kP,{}),_.jsx(Y_,{"data-position":o,className:Le("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",o==="popper"&&""),children:e}),_.jsx(CP,{})]})})}function xs({className:n,children:e,...o}){return _.jsxs(J_,{"data-slot":"select-item",className:Le("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),...o,children:[_.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:_.jsx(nE,{children:_.jsx(Ys,{className:"pointer-events-none"})})}),_.jsx(eE,{children:e})]})}function kP({className:n,...e}){return _.jsx(rE,{"data-slot":"select-scroll-up-button",className:Le("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),...e,children:_.jsx(Xp,{})})}function CP({className:n,...e}){return _.jsx(oE,{"data-slot":"select-scroll-down-button",className:Le("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),...e,children:_.jsx(Kc,{})})}f.createContext(null),f.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});const pr=ne().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),xd=rr([ne().max(4e3),tt().finite(),it(),Ir()]),hr=Qw(()=>rr([ne().max(32e3),tt().finite(),it(),Ir(),nt(hr).max(1e3),Nr(hr)])),wd=Yw("kind",[he({kind:Xe("data-source"),dataSourceId:ne().uuid()}).strict(),he({kind:Xe("definition"),definitionId:ne().uuid(),versionId:ne().uuid()}).strict(),he({kind:Xe("artifact"),artifactId:ne().uuid(),versionId:ne().uuid()}).strict()]);Nr(hr);const _P=he({id:pr,sourceField:ne().min(1).max(256),label:ne().min(1).max(160),logicalType:ln(["string","boolean","int64","float64","decimal","date","timestamp"]),nullable:it(),role:ln(["dimension","measure","time","identifier"]),semanticRef:ne().max(512).optional(),unit:ne().max(80).optional()}).strict(),EP=he({name:pr,controlId:pr,type:ln(["string","number","boolean","date"]),required:it(),defaultValue:xd.optional(),allowedValues:nt(xd).max(200).optional()}).strict(),PP=he({id:pr,source:wd,providerId:ne().min(1).max(160),operation:pr,contractVersion:tt().int().positive(),payload:hr,parameters:nt(EP).max(24),output:he({datasetId:pr,fields:nt(_P).min(1).max(80),grain:nt(pr).max(20)}).strict()}).strict();function RP(n,e){const o=n.output.fields.map(a=>a.id),s=n.parameters.map(a=>a.name);(new Set(o).size!==o.length||new Set(s).size!==s.length)&&e.addIssue({code:"custom",message:"Duplicate field or parameter identifier"}),(new Set(n.output.grain).size!==n.output.grain.length||n.output.grain.some(a=>!o.includes(a)))&&e.addIssue({code:"custom",message:"Grain references an undeclared field"}),new TextEncoder().encode(JSON.stringify(n.payload)).byteLength>64e3&&e.addIssue({code:"custom",message:"Query payload exceeds limit"})}const kv=PP.superRefine(RP),IP=Nr(pr,xd).default({});he({binding:kv,controls:IP}).strict(),he({source:wd,providerId:ne().min(1).max(160),request:hr.default({})}).strict().refine(n=>new TextEncoder().encode(JSON.stringify(n)).byteLength<=16e3,"Discovery request exceeds limit"),he({items:nt(he({id:ne().min(1).max(512),name:ne().min(1).max(512),kind:ln(["collection","dataset"]),description:ne().max(4e3).optional(),inspectRequest:hr.optional(),metadata:hr}).strict()).max(50),nextRequest:hr.optional(),queryContract:he({operation:pr,contractVersion:tt().int().positive(),payloadSchema:hr,instructions:ne().max(8e3)}).strict()}).strict().refine(n=>new TextEncoder().encode(JSON.stringify(n)).byteLength<=128e3,"Discovery response exceeds limit");function DP(n,e){if(n==null)return{};var o={},s=Object.keys(n),a,l;for(l=0;l<s.length;l++)a=s[l],!(e.indexOf(a)>=0)&&(o[a]=n[a]);return o}const Cv="xpert.artifact-document",_v=1,ml=ne().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),NP=rr([ne().max(4e3),tt().finite(),it(),Ir()]),Ev=Nr(ml,NP).refine(n=>Object.keys(n).length<=24,"Too many controls"),OP=he({type:Xe("query"),requestId:ne().min(1).max(80),bindingId:ml,controls:Ev}).strict(),TP=he({bindingIds:nt(ml).max(64).refine(n=>new Set(n).size===n.length,"Duplicate binding IDs"),defaults:Ev,theme:ln(["light","dark"]),locale:ne().min(1).max(80)}).strict(),Pv=ne().min(1).max(3e5).superRefine((n,e)=>{(new TextEncoder().encode(n).byteLength>3e5||!/<html[\s>]/i.test(n)||!/<body[\s>]/i.test(n))&&e.addIssue({code:"custom",message:"Supply a complete UTF-8 HTML document, at most 300 KB"})}),AP=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Hn=(n,e)=>n>>>e|n<<32-e;function $P(n){const e=new Uint8Array(Math.ceil((n.length+9)/64)*64);e.set(n),e[n.length]=128;const o=new DataView(e.buffer);o.setUint32(e.length-8,Math.floor(n.length/536870912)),o.setUint32(e.length-4,n.length*8>>>0);const s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);for(let l=0;l<e.length;l+=64){for(let S=0;S<16;S++)a[S]=o.getUint32(l+S*4);for(let S=16;S<64;S++){const C=a[S-15],k=a[S-2],A=Hn(C,7)^Hn(C,18)^C>>>3,N=Hn(k,17)^Hn(k,19)^k>>>10;a[S]=a[S-16]+A+a[S-7]+N>>>0}let[u,d,h,m,v,y,w,b]=s;for(let S=0;S<64;S++){const C=Hn(v,6)^Hn(v,11)^Hn(v,25),k=v&y^~v&w,A=b+C+k+AP[S]+a[S]>>>0,N=Hn(u,2)^Hn(u,13)^Hn(u,22),O=u&d^u&h^d&h,T=N+O>>>0;b=w,w=y,y=v,v=m+A>>>0,m=h,h=d,d=u,u=A+T>>>0}s[0]=s[0]+u>>>0,s[1]=s[1]+d>>>0,s[2]=s[2]+h>>>0,s[3]=s[3]+m>>>0,s[4]=s[4]+v>>>0,s[5]=s[5]+y>>>0,s[6]=s[6]+w>>>0,s[7]=s[7]+b>>>0}return Array.from(s,l=>l.toString(16).padStart(8,"0")).join("")}const Rv=he({id:ml,version:ne().regex(/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/),format:Xe("classic-script"),global:ne().regex(/^[A-Za-z_$][A-Za-z0-9_$]{0,79}$/).refine(n=>!["window","self","globalThis","document","parent","top","location","xpertLiveArtifact","__proto__","constructor","prototype"].includes(n)),sha256:ne().regex(/^[a-f0-9]{64}$/)}).strict(),MP=Rv.transform(n=>({id:n.id,version:n.version,format:"classic-script",global:n.global,sha256:n.sha256})),bd=nt(MP).max(8).superRefine((n,e)=>{(new Set(n.map(o=>o.id)).size!==n.length||new Set(n.map(o=>o.global)).size!==n.length)&&e.addIssue({code:"custom",message:"Duplicate dependency ID or global"})}),Iv=nt(Rv.extend({source:ne().min(1).max(4e6)}).strict().transform(n=>({id:n.id,version:n.version,format:"classic-script",global:n.global,sha256:n.sha256,source:n.source}))).max(8);function Dv(n,e){const o=Iv.parse(n),s=bd.parse(o.map(l=>{var{source:u}=l,d=DP(l,["source"]);return d}));let a=0;for(const l of o){const u=new TextEncoder().encode(l.source);if(a+=u.length,u.length>4e6||a>8e6)throw new Error("DOCUMENT_DEPENDENCY_TOO_LARGE");if($P(u)!==l.sha256)throw new Error("DOCUMENT_DEPENDENCY_INTEGRITY_FAILED")}if(e&&JSON.stringify(bd.parse(e))!==JSON.stringify(s))throw new Error("DOCUMENT_DEPENDENCY_LOCK_MISMATCH");return o.map(l=>({id:l.id,version:l.version,global:l.global,sha256:l.sha256,source:l.source,format:"classic-script"}))}function jP(n){const e=o=>JSON.stringify(o).replace(/</g,"\\u003c").replace(/>/g,"\\u003e");return Dv(n).map(o=>`<script>(()=>{const s=document.createElement('script');s.textContent=${e(o.source)};document.head.appendChild(s);s.remove();if(typeof window[${e(o.global)}]==='undefined')throw new Error('DOCUMENT_DEPENDENCY_GLOBAL_MISSING');})();<\/script>`).join("")}const LP=ne().max(250).refine(n=>{try{const e=new URL(n);return e.protocol==="https:"&&e.origin===n&&!e.username&&!e.password&&/^(?:[a-z0-9.-]+|\[[a-f0-9:]+\])$/i.test(e.hostname)}catch{return!1}},"Use an exact HTTPS origin without a path, credentials or wildcard"),gl=nt(LP).max(16),zP=he({mode:ln(["restricted","unrestricted"]).optional(),scripts:gl.optional(),styles:gl.optional(),fonts:gl.optional(),images:gl.optional()}).strict();function Nv(n){const e=zP.parse(n??{});if(e.mode==="unrestricted")return["default-src * data: blob:","script-src * data: blob: 'unsafe-inline'","style-src * data: blob: 'unsafe-inline'","img-src * data: blob:","font-src * data: blob:","connect-src * data: blob: ws: wss:","media-src * data: blob:","frame-src * data: blob:","worker-src * data: blob:","object-src 'none'","base-uri 'none'","form-action 'none'"].join("; ");const o=s=>s?.length?` ${[...new Set(s)].join(" ")}`:"";return["default-src 'none'",`script-src 'unsafe-inline'${o(e.scripts)}`,`style-src 'unsafe-inline'${o(e.styles)}`,`img-src data: blob:${o(e.images)}`,`font-src data:${o(e.fonts)}`,"connect-src 'none'","frame-src 'none'","worker-src 'none'","object-src 'none'","base-uri 'none'","form-action 'none'"].join("; ")}Nv();function FP(n,e,o=[],s){if(Pv.parse(n),!/^[a-f0-9]{32}$/.test(e))throw new Error("Invalid Artifact document session ID");return`<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${Nv(s)}"><script>${VP.replace("__XPERT_DOCUMENT_SESSION__",e)}<\/script>${jP(o)}${n}`}const VP=String.raw`
|
|
103
|
+
`)},XS=0,fs=[];function JS(n){var e=f.useRef([]),o=f.useRef([0,0]),s=f.useRef(),i=f.useState(XS++)[0],l=f.useState(cm)[0],u=f.useRef(n);f.useEffect(function(){u.current=n},[n]),f.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(i));var C=wS([n.lockRef.current],(n.shards||[]).map(gm),!0).filter(Boolean);return C.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[n.inert,n.lockRef.current,n.shards]);var d=f.useCallback(function(C,k){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!u.current.allowPinchZoom;var N=ja(C),D=o.current,O="deltaX"in C?C.deltaX:D[0]-N[0],R="deltaY"in C?C.deltaY:D[1]-N[1],L,j=C.target,B=Math.abs(O)>Math.abs(R)?"h":"v";if("touches"in C&&B==="h"&&j.type==="range")return!1;var I=window.getSelection(),K=I&&I.anchorNode,ae=K?K===j||K.contains(j):!1;if(ae)return!1;var be=fm(B,j);if(!be)return!0;if(be?L=B:(L=B==="v"?"h":"v",be=fm(B,j)),!be)return!1;if(!s.current&&"changedTouches"in C&&(O||R)&&(s.current=L),!L)return!0;var le=s.current||L;return qS(le,k,C,le==="h"?O:R)},[]),h=f.useCallback(function(C){var k=C;if(!(!fs.length||fs[fs.length-1]!==l)){var N="deltaY"in k?mm(k):ja(k),D=e.current.filter(function(L){return L.name===k.type&&(L.target===k.target||k.target===L.shadowParent)&&YS(L.delta,N)})[0];if(D&&D.should){k.cancelable&&k.preventDefault();return}if(!D){var O=(u.current.shards||[]).map(gm).filter(Boolean).filter(function(L){return L.contains(k.target)}),R=O.length>0?d(k,O[0]):!u.current.noIsolation;R&&k.cancelable&&k.preventDefault()}}},[]),m=f.useCallback(function(C,k,N,D){var O={name:C,delta:k,target:N,should:D,shadowParent:e1(N)};e.current.push(O),setTimeout(function(){e.current=e.current.filter(function(R){return R!==O})},1)},[]),y=f.useCallback(function(C){o.current=ja(C),s.current=void 0},[]),v=f.useCallback(function(C){m(C.type,mm(C),C.target,d(C,n.lockRef.current))},[]),x=f.useCallback(function(C){m(C.type,ja(C),C.target,d(C,n.lockRef.current))},[]);f.useEffect(function(){return fs.push(l),n.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",h,ds),document.addEventListener("touchmove",h,ds),document.addEventListener("touchstart",y,ds),function(){fs=fs.filter(function(C){return C!==l}),document.removeEventListener("wheel",h,ds),document.removeEventListener("touchmove",h,ds),document.removeEventListener("touchstart",y,ds)}},[]);var b=n.removeScrollBar,S=n.inert;return f.createElement(f.Fragment,null,S?f.createElement(l,{styles:QS(i)}):null,b?f.createElement(US,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function e1(n){for(var e=null;n!==null;)n instanceof ShadowRoot&&(e=n.host,n=n.host),n=n.parentNode;return e}const t1=IS(lm,JS);var ii=f.forwardRef(function(n,e){return f.createElement($a,Bn({},n,{ref:e,sideCar:t1}))});ii.classNames=$a.classNames;var n1=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},ps=new WeakMap,La=new WeakMap,Fa={},Ru=0,vm=function(n){return n&&(n.host||vm(n.parentNode))},r1=function(n,e){return e.map(function(o){if(n.contains(o))return o;var s=vm(o);return s&&n.contains(s)?s:(console.error("aria-hidden",o,"in not contained inside",n,". Doing nothing"),null)}).filter(function(o){return!!o})},o1=function(n,e,o,s){var i=r1(e,Array.isArray(n)?n:[n]);Fa[o]||(Fa[o]=new WeakMap);var l=Fa[o],u=[],d=new Set,h=new Set(i),m=function(v){!v||d.has(v)||(d.add(v),m(v.parentNode))};i.forEach(m);var y=function(v){!v||h.has(v)||Array.prototype.forEach.call(v.children,function(x){if(d.has(x))y(x);else try{var b=x.getAttribute(s),S=b!==null&&b!=="false",C=(ps.get(x)||0)+1,k=(l.get(x)||0)+1;ps.set(x,C),l.set(x,k),u.push(x),C===1&&S&&La.set(x,!0),k===1&&x.setAttribute(o,"true"),S||x.setAttribute(s,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return y(e),d.clear(),Ru++,function(){u.forEach(function(v){var x=ps.get(v)-1,b=l.get(v)-1;ps.set(v,x),l.set(v,b),x||(La.has(v)||v.removeAttribute(s),La.delete(v)),b||v.removeAttribute(o)}),Ru--,Ru||(ps=new WeakMap,ps=new WeakMap,La=new WeakMap,Fa={})}},za=function(n,e,o){o===void 0&&(o="data-aria-hidden");var s=Array.from(Array.isArray(n)?n:[n]),i=n1(n);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),o1(s,i,o,"aria-hidden")):function(){return null}},s1=Object.defineProperty,rn=(n,e)=>s1(n,"name",{value:e,configurable:!0}),Iu="Dialog",[ym,xm]=tn(Iu),[i1,En]=ym(Iu),Tu=rn(n=>{const{__scopeDialog:e,children:o,open:s,defaultOpen:i,onOpenChange:l,modal:u=!0}=n,d=f.useRef(null),h=f.useRef(null),[m,y]=Un({prop:s,defaultProp:i??!1,onChange:l,caller:Iu}),[v,x]=f.useState(0),[b,S]=f.useState(0);return E.jsx(i1,{scope:e,triggerRef:d,contentRef:h,contentId:yt(),titleId:yt(),descriptionId:yt(),titlePresent:v>0,descriptionPresent:b>0,setTitleCount:x,setDescriptionCount:S,open:m,onOpenChange:y,onOpenToggle:f.useCallback(()=>y(C=>!C),[y]),modal:u,children:o})},"Dialog"),a1="DialogTrigger",l1=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(a1,s),u=Ve(o,l.triggerRef);return E.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":Ua(l.open),...i,ref:u,onClick:pe(e.onClick,l.onOpenToggle)})},"DialogTrigger")),wm="DialogPortal",[c1,bm]=ym(wm,{forceMount:void 0}),Du=rn(n=>{const{__scopeDialog:e,forceMount:o,children:s,container:i}=n,l=En(wm,e);return E.jsx(c1,{scope:e,forceMount:o,children:f.Children.map(s,u=>E.jsx(nn,{present:o||l.open,children:E.jsx(si,{asChild:!0,container:i,children:u})}))})},"DialogPortal"),Nu="DialogOverlay",Ou=f.forwardRef(rn(function(e,o){const s=bm(Nu,e.__scopeDialog),{forceMount:i=s.forceMount,...l}=e,u=En(Nu,e.__scopeDialog);return u.modal?E.jsx(nn,{present:i||u.open,children:E.jsx(d1,{...l,ref:o})}):null},"DialogOverlay")),u1=kn("DialogOverlay.RemoveScroll"),d1=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(Nu,s),u=Zh(),d=Ve(o,u);return E.jsx(ii,{as:u1,allowPinchZoom:!0,shards:[l.contentRef],children:E.jsx(Ae.div,{"data-state":Ua(l.open),...i,ref:d,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),ai="DialogContent",Au=f.forwardRef(rn(function(e,o){const s=bm(ai,e.__scopeDialog),{forceMount:i=s.forceMount,...l}=e,u=En(ai,e.__scopeDialog);return E.jsx(nn,{present:i||u.open,children:u.modal?E.jsx(f1,{...l,ref:o}):E.jsx(p1,{...l,ref:o})})},"DialogContent")),f1=f.forwardRef(rn(function(e,o){const s=En(ai,e.__scopeDialog),i=f.useRef(null),l=Ve(o,s.contentRef,i);return f.useEffect(()=>{const u=i.current;if(u)return za(u)},[]),E.jsx(Sm,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:pe(e.onCloseAutoFocus,u=>{u.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0;(d.button===2||h)&&u.preventDefault()}),onFocusOutside:pe(e.onFocusOutside,u=>u.preventDefault())})},"DialogContentModal")),p1=f.forwardRef(rn(function(e,o){const s=En(ai,e.__scopeDialog),i=f.useRef(!1),l=f.useRef(!1);return E.jsx(Sm,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||s.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=u.target;s.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&l.current&&u.preventDefault()}})},"DialogContentNonModal")),Sm=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:u,...d}=e,h=En(ai,s);return cs(),E.jsx(E.Fragment,{children:E.jsx(Da,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:u,children:E.jsx(oi,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":Ua(h.open),...d,ref:o,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),h1="DialogTitle",Cm=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(h1,s),{setTitleCount:u}=l;return dt(()=>(u(d=>d+1),()=>u(d=>d-1)),[u]),E.jsx(Ae.h2,{id:l.titleId,...i,ref:o})},"DialogTitle")),m1="DialogDescription",km=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(m1,s),{setDescriptionCount:u}=l;return dt(()=>(u(d=>d+1),()=>u(d=>d-1)),[u]),E.jsx(Ae.p,{id:l.descriptionId,...i,ref:o})},"DialogDescription")),g1="DialogClose",Va=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(g1,s);return E.jsx(Ae.button,{type:"button",...i,ref:o,onClick:pe(e.onClick,()=>l.onOpenChange(!1))})},"DialogClose"));function Ua(n){return n?"open":"closed"}rn(Ua,"getState");var v1=Object.defineProperty,fr=(n,e)=>v1(n,"name",{value:e,configurable:!0}),y1="AlertDialog",[x1,i2]=tn(y1,[xm]),pr=xm(),w1=fr(n=>{const{__scopeAlertDialog:e,...o}=n,s=pr(e);return E.jsx(Tu,{...s,...o,modal:!0})},"AlertDialog");f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(l1,{...l,...i,ref:o})},"AlertDialogTrigger"));var b1=fr(n=>{const{__scopeAlertDialog:e,...o}=n,s=pr(e);return E.jsx(Du,{...s,...o})},"AlertDialogPortal"),S1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(Ou,{...l,...i,ref:o})},"AlertDialogOverlay")),C1="AlertDialogContent",[k1,E1]=x1(C1),_1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,children:i,...l}=e,u=pr(s),d=f.useRef(null),h=Ve(o,d),m=f.useRef(null);return E.jsx(k1,{scope:s,cancelRef:m,children:E.jsx(Au,{role:"alertdialog",...u,...l,ref:h,onOpenAutoFocus:pe(l.onOpenAutoFocus,y=>{y.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:y=>y.preventDefault(),onInteractOutside:y=>y.preventDefault(),children:i})})},"AlertDialogContent")),P1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(Cm,{...l,...i,ref:o})},"AlertDialogTitle")),R1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(km,{...l,...i,ref:o})},"AlertDialogDescription"));f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(Va,{...l,...i,ref:o})},"AlertDialogAction"));var I1="AlertDialogCancel",T1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,{cancelRef:l}=E1(I1,s),u=pr(s),d=Ve(o,l);return E.jsx(Va,{...u,...i,ref:d})},"AlertDialogCancel")),D1=w1,N1=b1,O1=S1,A1=_1,$1=T1,M1=P1,j1=R1,L1=Object.defineProperty,F1=(n,e)=>L1(n,"name",{value:e,configurable:!0});function Em(n){const[e,o]=f.useState(void 0);return dt(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let u,d;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,d=m.blockSize}else u=n.offsetWidth,d=n.offsetHeight;o({width:u,height:d})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else o(void 0)},[n]),e}F1(Em,"useSize");const z1=["top","right","bottom","left"],Fr=Math.min,hr=Math.max,Ba=Math.round,Ha=Math.floor,mr=n=>({x:n,y:n}),V1={left:"right",right:"left",bottom:"top",top:"bottom"};function _m(n,e,o){return hr(n,Fr(e,o))}function gr(n,e){return typeof n=="function"?n(e):n}function zr(n){return n.split("-")[0]}function hs(n){return n.split("-")[1]}function $u(n){return n==="x"?"y":"x"}function Mu(n){return n==="y"?"height":"width"}function Hn(n){const e=n[0];return e==="t"||e==="b"?"y":"x"}function ju(n){return $u(Hn(n))}function U1(n,e,o){o===void 0&&(o=!1);const s=hs(n),i=ju(n),l=Mu(i);let u=i==="x"?s===(o?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[l]>e.floating[l]&&(u=Wa(u)),[u,Wa(u)]}function B1(n){const e=Wa(n);return[Lu(n),e,Lu(e)]}function Lu(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Pm=["left","right"],Rm=["right","left"],H1=["top","bottom"],W1=["bottom","top"];function K1(n,e,o){switch(n){case"top":case"bottom":return o?e?Rm:Pm:e?Pm:Rm;case"left":case"right":return e?H1:W1;default:return[]}}function G1(n,e,o,s){const i=hs(n);let l=K1(zr(n),o==="start",s);return i&&(l=l.map(u=>u+"-"+i),e&&(l=l.concat(l.map(Lu)))),l}function Wa(n){const e=zr(n);return V1[e]+n.slice(e.length)}function Z1(n){var e,o,s,i;return{top:(e=n.top)!=null?e:0,right:(o=n.right)!=null?o:0,bottom:(s=n.bottom)!=null?s:0,left:(i=n.left)!=null?i:0}}function Im(n){return typeof n!="number"?Z1(n):{top:n,right:n,bottom:n,left:n}}function Ka(n){const{x:e,y:o,width:s,height:i}=n;return{width:s,height:i,top:o,left:e,right:e+s,bottom:o+i,x:e,y:o}}function Tm(n,e,o){let{reference:s,floating:i}=n;const l=Hn(e),u=ju(e),d=Mu(u),h=zr(e),m=l==="y",y=s.x+s.width/2-i.width/2,v=s.y+s.height/2-i.height/2,x=s[d]/2-i[d]/2;let b;switch(h){case"top":b={x:y,y:s.y-i.height};break;case"bottom":b={x:y,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y:v};break;case"left":b={x:s.x-i.width,y:v};break;default:b={x:s.x,y:s.y}}const S=hs(e);return S&&(b[u]+=x*(S==="end"?1:-1)*(o&&m?-1:1)),b}async function q1(n,e){var o;e===void 0&&(e={});const{x:s,y:i,platform:l,rects:u,elements:d,strategy:h}=n,{boundary:m="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:x=!1,padding:b=0}=gr(e,n),S=Im(b),k=d[x?v==="floating"?"reference":"floating":v],N=Ka(await l.getClippingRect({element:(o=await(l.isElement==null?void 0:l.isElement(k)))==null||o?k:k.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:m,rootBoundary:y,strategy:h})),D=v==="floating"?{x:s,y:i,width:u.floating.width,height:u.floating.height}:u.reference,O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),R=await(l.isElement==null?void 0:l.isElement(O))&&await(l.getScale==null?void 0:l.getScale(O))||{x:1,y:1},L=Ka(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:D,offsetParent:O,strategy:h}):D);return{top:(N.top-L.top+S.top)/R.y,bottom:(L.bottom-N.bottom+S.bottom)/R.y,left:(N.left-L.left+S.left)/R.x,right:(L.right-N.right+S.right)/R.x}}const Y1=50,Q1=async(n,e,o)=>{const{placement:s="bottom",strategy:i="absolute",middleware:l=[],platform:u}=o,d=u.detectOverflow?u:{...u,detectOverflow:q1},h=await(u.isRTL==null?void 0:u.isRTL(e));let m=await u.getElementRects({reference:n,floating:e,strategy:i}),{x:y,y:v}=Tm(m,s,h),x=s,b=0;const S={};for(let C=0;C<l.length;C++){const k=l[C];if(!k)continue;const{name:N,fn:D}=k,{x:O,y:R,data:L,reset:j}=await D({x:y,y:v,initialPlacement:s,placement:x,strategy:i,middlewareData:S,rects:m,platform:d,elements:{reference:n,floating:e}});y=O??y,v=R??v,S[N]={...S[N],...L},j&&b<Y1&&(b++,typeof j=="object"&&(j.placement&&(x=j.placement),j.rects&&(m=j.rects===!0?await u.getElementRects({reference:n,floating:e,strategy:i}):j.rects),{x:y,y:v}=Tm(m,x,h)),C=-1)}return{x:y,y:v,placement:x,strategy:i,middlewareData:S}},X1=n=>({name:"arrow",options:n,async fn(e){const{x:o,y:s,placement:i,rects:l,platform:u,elements:d,middlewareData:h}=e,{element:m,padding:y=0}=gr(n,e)||{};if(m==null)return{};const v=Im(y),x={x:o,y:s},b=ju(i),S=Mu(b),C=await u.getDimensions(m),k=b==="y",N=k?"top":"left",D=k?"bottom":"right",O=k?"clientHeight":"clientWidth",R=l.reference[S]+l.reference[b]-x[b]-l.floating[S],L=x[b]-l.reference[b],j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let B=j?j[O]:0;(!B||!await(u.isElement==null?void 0:u.isElement(j)))&&(B=d.floating[O]||l.floating[S]);const I=R/2-L/2,K=B/2-C[S]/2-1,ae=Fr(v[N],K),be=Fr(v[D],K),le=B-C[S]-be,ce=B/2-C[S]/2+I,ue=_m(ae,ce,le),Se=!h.arrow&&hs(i)!=null&&ce!==ue&&l.reference[S]/2-(ce<ae?ae:be)-C[S]/2<0,q=Se?ce<ae?ce-ae:ce-le:0;return{[b]:x[b]+q,data:{[b]:ue,centerOffset:ce-ue-q,...Se&&{alignmentOffset:q}},reset:Se}}}),J1=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var o,s;const{placement:i,middlewareData:l,rects:u,initialPlacement:d,platform:h,elements:m}=e,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...k}=gr(n,e);if((o=l.arrow)!=null&&o.alignmentOffset)return{};const N=zr(i),D=Hn(d),O=zr(d)===d,R=await(h.isRTL==null?void 0:h.isRTL(m.floating)),L=x||(O||!C?[Wa(d)]:B1(d)),j=S!=="none";!x&&j&&L.push(...G1(d,C,S,R));const B=[d,...L],I=await h.detectOverflow(e,k),K=[];let ae=((s=l.flip)==null?void 0:s.overflows)||[];if(y&&K.push(I[N]),v){const ue=U1(i,u,R);K.push(I[ue[0]],I[ue[1]])}if(ae=[...ae,{placement:i,overflows:K}],!K.every(ue=>ue<=0)){var be,le;const ue=(((be=l.flip)==null?void 0:be.index)||0)+1,Se=B[ue];if(Se&&(!(v==="alignment"?D!==Hn(Se):!1)||ae.every(U=>Hn(U.placement)===D?U.overflows[0]>0:!0)))return{data:{index:ue,overflows:ae},reset:{placement:Se}};let q=(le=ae.filter(ne=>ne.overflows[0]<=0).sort((ne,U)=>ne.overflows[1]-U.overflows[1])[0])==null?void 0:le.placement;if(!q)switch(b){case"bestFit":{var ce;const ne=(ce=ae.filter(U=>{if(j){const Q=Hn(U.placement);return Q===D||Q==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Q=>Q>0).reduce((Q,M)=>Q+M,0)]).sort((U,Q)=>U[1]-Q[1])[0])==null?void 0:ce[0];ne&&(q=ne);break}case"initialPlacement":q=d;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function Dm(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function Nm(n){return z1.some(e=>n[e]>=0)}const eC=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:o,platform:s}=e,{strategy:i="referenceHidden",...l}=gr(n,e);switch(i){case"referenceHidden":{const u=await s.detectOverflow(e,{...l,elementContext:"reference"}),d=Dm(u,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Nm(d)}}}case"escaped":{const u=await s.detectOverflow(e,{...l,altBoundary:!0}),d=Dm(u,o.floating);return{data:{escapedOffsets:d,escaped:Nm(d)}}}default:return{}}}}},Om=new Set(["left","top"]);async function tC(n,e){const{placement:o,platform:s,elements:i}=n,l=await(s.isRTL==null?void 0:s.isRTL(i.floating)),u=zr(o),d=hs(o),h=Hn(o)==="y",m=Om.has(u)?-1:1,y=l&&h?-1:1,v=gr(e,n);let{mainAxis:x,crossAxis:b,alignmentAxis:S}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return d&&typeof S=="number"&&(b=d==="end"?S*-1:S),h?{x:b*y,y:x*m}:{x:x*m,y:b*y}}const nC=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var o,s;const{x:i,y:l,placement:u,middlewareData:d}=e,h=await tC(e,n);return u===((o=d.offset)==null?void 0:o.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:i+h.x,y:l+h.y,data:{...h,placement:u}}}}},rC=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:o,y:s,placement:i,platform:l}=e,{mainAxis:u=!0,crossAxis:d=!1,limiter:h={fn:D=>{let{x:O,y:R}=D;return{x:O,y:R}}},...m}=gr(n,e),y={x:o,y:s},v=await l.detectOverflow(e,m),x=Hn(i),b=$u(x);let S=y[b],C=y[x];const k=(D,O)=>_m(O+v[D==="y"?"top":"left"],O,O-v[D==="y"?"bottom":"right"]);u&&(S=k(b,S)),d&&(C=k(x,C));const N=h.fn({...e,[b]:S,[x]:C});return{...N,data:{x:N.x-o,y:N.y-s,enabled:{[b]:u,[x]:d}}}}}},oC=function(n){return n===void 0&&(n={}),{options:n,fn(e){var o,s;const{x:i,y:l,placement:u,rects:d,middlewareData:h}=e,{offset:m=0,mainAxis:y=!0,crossAxis:v=!0}=gr(n,e),x={x:i,y:l},b=Hn(u),S=$u(b);let C=x[S],k=x[b];const N=gr(m,e),D=typeof N=="number"?{mainAxis:N,crossAxis:0}:{mainAxis:(o=N.mainAxis)!=null?o:0,crossAxis:(s=N.crossAxis)!=null?s:0};if(y){const L=S==="y"?"height":"width",j=d.reference[S]-d.floating[L]+D.mainAxis,B=d.reference[S]+d.reference[L]-D.mainAxis;C<j?C=j:C>B&&(C=B)}if(v){var O,R;const L=S==="y"?"width":"height",j=Om.has(zr(u)),B=d.reference[b]-d.floating[L]+(j&&((O=h.offset)==null?void 0:O[b])||0)+(j?0:D.crossAxis),I=d.reference[b]+d.reference[L]+(j?0:((R=h.offset)==null?void 0:R[b])||0)-(j?D.crossAxis:0);k<B?k=B:k>I&&(k=I)}return{[S]:C,[b]:k}}}},sC=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){const{placement:o,rects:s,platform:i,elements:l}=e,{apply:u=()=>{},...d}=gr(n,e),h=await i.detectOverflow(e,d),m=zr(o),y=hs(o),v=Hn(o)==="y",{width:x,height:b}=s.floating;let S,C;m==="top"||m==="bottom"?(S=m,C=y===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(C=m,S=y==="end"?"top":"bottom");const k=b-h.top-h.bottom,N=x-h.left-h.right,D=Fr(b-h[S],k),O=Fr(x-h[C],N),R=e.middlewareData.shift,L=!R;let j=D,B=O;R!=null&&R.enabled.x&&(B=N),R!=null&&R.enabled.y&&(j=k),L&&!y&&(v?B=x-2*hr(h.left,h.right):j=b-2*hr(h.top,h.bottom)),await u({...e,availableWidth:B,availableHeight:j});const I=await i.getDimensions(l.floating);return x!==I.width||b!==I.height?{reset:{rects:!0}}:{}}}};function Ga(){return typeof window<"u"}function ms(n){return Am(n)?(n.nodeName||"").toLowerCase():"#document"}function Zt(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function vr(n){var e;return(e=(Am(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function Am(n){return Ga()?n instanceof Node||n instanceof Zt(n).Node:!1}function Wn(n){return Ga()?n instanceof Element||n instanceof Zt(n).Element:!1}function Vr(n){return Ga()?n instanceof HTMLElement||n instanceof Zt(n).HTMLElement:!1}function $m(n){return!Ga()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Zt(n).ShadowRoot}function Za(n){const{overflow:e,overflowX:o,overflowY:s,display:i}=Kn(n);return/auto|scroll|overlay|hidden|clip/.test(e+s+o)&&i!=="inline"&&i!=="contents"}function iC(n){return/^(table|td|th)$/.test(ms(n))}function qa(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const aC=/transform|translate|scale|rotate|perspective|filter/,lC=/paint|layout|strict|content/,Ro=n=>!!n&&n!=="none";let Fu;function zu(n){const e=Wn(n)?Kn(n):n;return Ro(e.transform)||Ro(e.translate)||Ro(e.scale)||Ro(e.rotate)||Ro(e.perspective)||!Vu()&&(Ro(e.backdropFilter)||Ro(e.filter))||aC.test(e.willChange||"")||lC.test(e.contain||"")}function cC(n){let e=Io(n);for(;Vr(e)&&!li(e);){if(zu(e))return e;if(qa(e))return null;e=Io(e)}return null}function Vu(){return Fu==null&&(Fu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Fu}function li(n){return/^(html|body|#document)$/.test(ms(n))}function Kn(n){return Zt(n).getComputedStyle(n)}function Ya(n){return Wn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Io(n){if(ms(n)==="html")return n;const e=n.assignedSlot||n.parentNode||$m(n)&&n.host||vr(n);return $m(e)?e.host:e}function Mm(n){const e=Io(n);return li(e)?(n.ownerDocument||n).body:Vr(e)&&Za(e)?e:Mm(e)}function ci(n,e,o){var s;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Mm(n),l=i===((s=n.ownerDocument)==null?void 0:s.body),u=Zt(i);if(l){const d=Uu(u);return e.concat(u,u.visualViewport||[],Za(i)?i:[],d&&o?ci(d):[])}else return e.concat(i,ci(i,[],o))}function Uu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function jm(n){const e=Kn(n);let o=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=Vr(n),l=i?n.offsetWidth:o,u=i?n.offsetHeight:s,d=Ba(o)!==l||Ba(s)!==u;return d&&(o=l,s=u),{width:o,height:s,$:d}}function Bu(n){return Wn(n)?n:n.contextElement}function gs(n){const e=Bu(n);if(!Vr(e))return mr(1);const o=e.getBoundingClientRect(),{width:s,height:i,$:l}=jm(e);let u=(l?Ba(o.width):o.width)/s,d=(l?Ba(o.height):o.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const uC=mr(0);function Lm(n){const e=Zt(n);return!Vu()||!e.visualViewport?uC:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function dC(n,e,o){return e===void 0&&(e=!1),!!o&&e&&o===Zt(n)}function To(n,e,o,s){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=n.getBoundingClientRect(),l=Bu(n);let u=mr(1);e&&(s?Wn(s)&&(u=gs(s)):u=gs(n));const d=dC(l,o,s)?Lm(l):mr(0);let h=(i.left+d.x)/u.x,m=(i.top+d.y)/u.y,y=i.width/u.x,v=i.height/u.y;if(l&&s){const x=Zt(l),b=Wn(s)?Zt(s):s;let S=x,C=Uu(S);for(;C&&b!==S;){const k=gs(C),N=C.getBoundingClientRect(),D=Kn(C),O=N.left+(C.clientLeft+parseFloat(D.paddingLeft))*k.x,R=N.top+(C.clientTop+parseFloat(D.paddingTop))*k.y;h*=k.x,m*=k.y,y*=k.x,v*=k.y,h+=O,m+=R,S=Zt(C),C=Uu(S)}}return Ka({width:y,height:v,x:h,y:m})}function Qa(n,e){const o=Ya(n).scrollLeft;return e?e.left+o:To(vr(n)).left+o}function Fm(n,e){const o=n.getBoundingClientRect(),s=o.left+e.scrollLeft-Qa(n,o),i=o.top+e.scrollTop;return{x:s,y:i}}function fC(n){let{elements:e,rect:o,offsetParent:s,strategy:i}=n;const l=i==="fixed",u=vr(s),d=e?qa(e.floating):!1;if(s===u||d&&l)return o;let h={scrollLeft:0,scrollTop:0},m=mr(1);const y=mr(0),v=Vr(s);if((v||!l)&&((ms(s)!=="body"||Za(u))&&(h=Ya(s)),v)){const b=To(s);m=gs(s),y.x=b.x+s.clientLeft,y.y=b.y+s.clientTop}const x=u&&!v&&!l?Fm(u,h):mr(0);return{width:o.width*m.x,height:o.height*m.y,x:o.x*m.x-h.scrollLeft*m.x+y.x+x.x,y:o.y*m.y-h.scrollTop*m.y+y.y+x.y}}function pC(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function hC(n){const e=Ya(n),o=n.ownerDocument.body,s=hr(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=hr(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-e.scrollLeft+Qa(n);const u=-e.scrollTop;return Kn(o).direction==="rtl"&&(l+=hr(n.clientWidth,o.clientWidth)-s),{width:s,height:i,x:l,y:u}}const mC=25;function gC(n,e,o){o===void 0&&(o="viewport");const s=o==="layoutViewport",i=Zt(n),l=vr(n),u=i.visualViewport;let d=l.clientWidth,h=l.clientHeight,m=0,y=0;if(u){const x=!Vu()||e==="fixed";s?x||(m=-u.offsetLeft,y=-u.offsetTop):(d=u.width,h=u.height,x&&(m=u.offsetLeft,y=u.offsetTop))}if(Qa(l)<=0){const x=l.ownerDocument,b=x.body,S=getComputedStyle(b),C=x.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,k=Math.abs(l.clientWidth-b.clientWidth-C),N=getComputedStyle(l).scrollbarGutter==="stable both-edges"?k/2:k;N<=mC&&(d-=N)}return{width:d,height:h,x:m,y}}function vC(n,e){const o=To(n,!0,e==="fixed"),s=o.top+n.clientTop,i=o.left+n.clientLeft,l=gs(n),u=n.clientWidth*l.x,d=n.clientHeight*l.y,h=i*l.x,m=s*l.y;return{width:u,height:d,x:h,y:m}}function zm(n,e,o){let s;if(e==="viewport"||e==="layoutViewport")s=gC(n,o,e);else if(e==="document")s=hC(vr(n));else if(Wn(e))s=vC(e,o);else{const i=Lm(n);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ka(s)}function yC(n,e){const o=e.get(n);if(o)return o;let s=ci(n,[],!1).filter(d=>Wn(d)&&ms(d)!=="body"),i=null;const l=Kn(n).position==="fixed";let u=l?Io(n):n;for(;Wn(u)&&!li(u);){const d=Kn(u),h=zu(u),m=i?i.position:l?"fixed":"";!h&&(m==="fixed"||m==="absolute"&&d.position==="static")?s=s.filter(v=>v!==u):i=d,u=Io(u)}return e.set(n,s),s}function xC(n){let{element:e,boundary:o,rootBoundary:s,strategy:i}=n;const u=[...o==="clippingAncestors"?qa(e)?[]:yC(e,this._c):[].concat(o),s],d=zm(e,u[0],i);let h=d.top,m=d.right,y=d.bottom,v=d.left;for(let x=1;x<u.length;x++){const b=zm(e,u[x],i);h=hr(b.top,h),m=Fr(b.right,m),y=Fr(b.bottom,y),v=hr(b.left,v)}return{width:m-v,height:y-h,x:v,y:h}}function wC(n){const{width:e,height:o}=jm(n);return{width:e,height:o}}function bC(n,e,o){const s=Vr(e),i=vr(e),l=o==="fixed",u=To(n,!0,l,e);let d={scrollLeft:0,scrollTop:0};const h=mr(0);if((s||!l)&&((ms(e)!=="body"||Za(i))&&(d=Ya(e)),s)){const x=To(e,!0,l,e);h.x=x.x+e.clientLeft,h.y=x.y+e.clientTop}!s&&i&&(h.x=Qa(i));const m=i&&!s&&!l?Fm(i,d):mr(0),y=u.left+d.scrollLeft-h.x-m.x,v=u.top+d.scrollTop-h.y-m.y;return{x:y,y:v,width:u.width,height:u.height}}function Hu(n){return Kn(n).position==="static"}function Vm(n,e){if(!Vr(n)||Kn(n).position==="fixed")return null;if(e)return e(n);let o=n.offsetParent;return vr(n)===o&&(o=o.ownerDocument.body),o}function Um(n,e){const o=Zt(n);if(qa(n))return o;if(!Vr(n)){let i=Io(n);for(;i&&!li(i);){if(Wn(i)&&!Hu(i))return i;i=Io(i)}return o}let s=Vm(n,e);for(;s&&iC(s)&&Hu(s);)s=Vm(s,e);return s&&li(s)&&Hu(s)&&!zu(s)?o:s||cC(n)||o}const SC=async function(n){const e=this.getOffsetParent||Um,o=this.getDimensions,s=await o(n.floating);return{reference:bC(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function CC(n){return Kn(n).direction==="rtl"}const kC={convertOffsetParentRelativeRectToViewportRelativeRect:fC,getDocumentElement:vr,getClippingRect:xC,getOffsetParent:Um,getElementRects:SC,getClientRects:pC,getDimensions:wC,getScale:gs,isElement:Wn,isRTL:CC};function Bm(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function EC(n,e,o){let s=null,i;const l=vr(n);function u(){var y;clearTimeout(i),(y=s)==null||y.disconnect(),s=null}function d(y,v){y===void 0&&(y=!1),v===void 0&&(v=1),u();const x=n.getBoundingClientRect(),{left:b,top:S,width:C,height:k}=x;if(y||e(),!C||!k)return;const N=Ha(S),D=Ha(l.clientWidth-(b+C)),O=Ha(l.clientHeight-(S+k)),R=Ha(b),j={rootMargin:-N+"px "+-D+"px "+-O+"px "+-R+"px",threshold:hr(0,Fr(1,v))||1};let B=!0;function I(K){const ae=K[0].intersectionRatio;if(!Bm(x,n.getBoundingClientRect()))return d();if(ae!==v){if(!B)return d();ae?d(!1,ae):i=setTimeout(()=>{d(!1,1e-7)},1e3)}B=!1}try{s=new IntersectionObserver(I,{...j,root:l.ownerDocument})}catch{s=new IntersectionObserver(I,j)}s.observe(n)}const h=Zt(n),m=()=>d(o);return h.addEventListener("resize",m),d(!0),()=>{h.removeEventListener("resize",m),u()}}function _C(n,e,o,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,m=Bu(n),y=i||l?[...m?ci(m):[],...e?ci(e):[]]:[];y.forEach(N=>{i&&N.addEventListener("scroll",o),l&&N.addEventListener("resize",o)});const v=m&&d?EC(m,o,l):null;let x=-1,b=null;u&&(b=new ResizeObserver(N=>{let[D]=N;D&&D.target===m&&b&&e&&(b.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(e)})),o()}),m&&!h&&b.observe(m),e&&b.observe(e));let S,C=h?To(n):null;h&&k();function k(){const N=To(n);C&&!Bm(C,N)&&o(),C=N,S=requestAnimationFrame(k)}return o(),()=>{var N;y.forEach(D=>{i&&D.removeEventListener("scroll",o),l&&D.removeEventListener("resize",o)}),v?.(),(N=b)==null||N.disconnect(),b=null,h&&cancelAnimationFrame(S)}}const PC=nC,RC=rC,IC=J1,TC=sC,DC=eC,Hm=X1,NC=oC,OC=(n,e,o)=>{const s=new Map,i=o??{},l={...kC,...i.platform,_c:s};return Q1(n,e,{...i,platform:l})};var AC=typeof document<"u",$C=function(){},Xa=AC?f.useLayoutEffect:$C;function Ja(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let o,s,i;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==e.length)return!1;for(s=o;s--!==0;)if(!Ja(n[s],e[s]))return!1;return!0}if(i=Object.keys(n),o=i.length,o!==Object.keys(e).length)return!1;for(s=o;s--!==0;)if(!{}.hasOwnProperty.call(e,i[s]))return!1;for(s=o;s--!==0;){const l=i[s];if(!(l==="_owner"&&n.$$typeof)&&!Ja(n[l],e[l]))return!1}return!0}return n!==n&&e!==e}function Wm(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Km(n,e){const o=Wm(n);return Math.round(e*o)/o}function Wu(n){const e=f.useRef(n);return Xa(()=>{e.current=n}),e}function MC(n){n===void 0&&(n={});const{placement:e="bottom",strategy:o="absolute",middleware:s=[],platform:i,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:h,open:m}=n,[y,v]=f.useState({x:0,y:0,strategy:o,placement:e,middlewareData:{},isPositioned:!1}),[x,b]=f.useState(s);Ja(x,s)||b(s);const[S,C]=f.useState(null),[k,N]=f.useState(null),D=f.useCallback(U=>{U!==j.current&&(j.current=U,C(U))},[]),O=f.useCallback(U=>{U!==B.current&&(B.current=U,N(U))},[]),R=l||S,L=u||k,j=f.useRef(null),B=f.useRef(null),I=f.useRef(y),K=h!=null,ae=Wu(h),be=Wu(i),le=Wu(m),ce=f.useCallback(()=>{if(!j.current||!B.current)return;const U={placement:e,strategy:o,middleware:x};be.current&&(U.platform=be.current),OC(j.current,B.current,U).then(Q=>{const M={...Q,isPositioned:le.current!==!1};ue.current&&!Ja(I.current,M)&&(I.current=M,ti.flushSync(()=>{v(M)}))})},[x,e,o,be,le]);Xa(()=>{m===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,v(U=>({...U,isPositioned:!1})))},[m]);const ue=f.useRef(!1);Xa(()=>(ue.current=!0,()=>{ue.current=!1}),[]),Xa(()=>{if(R&&(j.current=R),L&&(B.current=L),R&&L){if(ae.current)return ae.current(R,L,ce);ce()}},[R,L,ce,ae,K]);const Se=f.useMemo(()=>({reference:j,floating:B,setReference:D,setFloating:O}),[D,O]),q=f.useMemo(()=>({reference:R,floating:L}),[R,L]),ne=f.useMemo(()=>{const U={position:o,left:0,top:0};if(!q.floating)return U;const Q=Km(q.floating,y.x),M=Km(q.floating,y.y);return d?{...U,transform:"translate("+Q+"px, "+M+"px)",...Wm(q.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:Q,top:M}},[o,d,q.floating,y.x,y.y]);return f.useMemo(()=>({...y,update:ce,refs:Se,elements:q,floatingStyles:ne}),[y,ce,Se,q,ne])}const jC=n=>{function e(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:s,padding:i}=typeof n=="function"?n(o):n;return s&&e(s)?s.current!=null?Hm({element:s.current,padding:i}).fn(o):{}:s?Hm({element:s,padding:i}).fn(o):{}}}},LC=(n,e)=>{const o=PC(n);return{name:o.name,fn:o.fn,options:[n,e]}},FC=(n,e)=>{const o=RC(n);return{name:o.name,fn:o.fn,options:[n,e]}},zC=(n,e)=>({fn:NC(n).fn,options:[n,e]}),VC=(n,e)=>{const o=IC(n);return{name:o.name,fn:o.fn,options:[n,e]}},UC=(n,e)=>{const o=TC(n);return{name:o.name,fn:o.fn,options:[n,e]}},BC=(n,e)=>{const o=DC(n);return{name:o.name,fn:o.fn,options:[n,e]}},HC=(n,e)=>{const o=jC(n);return{name:o.name,fn:o.fn,options:[n,e]}};var WC=Object.defineProperty,KC=(n,e)=>WC(n,"name",{value:e,configurable:!0}),GC=f.forwardRef(KC(function(e,o){const{children:s,width:i=10,height:l=5,...u}=e;return E.jsx(Ae.svg,{...u,ref:o,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:E.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),ZC=GC,qC=Object.defineProperty,yr=(n,e)=>qC(n,"name",{value:e,configurable:!0}),Gm="Popper",[Zm,Ur]=tn(Gm),[YC,qm]=Zm(Gm),QC=yr(n=>{const{__scopePopper:e,children:o}=n,[s,i]=f.useState(null),[l,u]=f.useState(void 0);return E.jsx(YC,{scope:e,anchor:s,onAnchorChange:i,placementState:l,setPlacementState:u,children:o})},"Popper"),XC="PopperAnchor",JC=f.forwardRef(yr(function(e,o){const{__scopePopper:s,virtualRef:i,...l}=e,u=qm(XC,s),d=f.useRef(null),h=u.onAnchorChange,m=f.useCallback(C=>{d.current=C,C&&h(C)},[h]),y=Ve(o,m),v=f.useRef(null);f.useEffect(()=>{if(!i)return;const C=v.current;v.current=i.current,C!==v.current&&h(v.current)});const x=u.placementState&&el(u.placementState),b=x?.[0],S=x?.[1];return i?null:E.jsx(Ae.div,{"data-radix-popper-side":b,"data-radix-popper-align":S,...l,ref:y})},"PopperAnchor")),Ym="PopperContent",[ek,tk]=Zm(Ym),nk=f.forwardRef(yr(function(e,o){const{__scopePopper:s,side:i="bottom",sideOffset:l=0,align:u="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:y=[],collisionPadding:v=0,sticky:x="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:C,...k}=e,N=qm(Ym,s),[D,O]=f.useState(null),R=Ve(o,O),[L,j]=f.useState(null),B=Em(L),I=B?.width??0,K=B?.height??0,ae=i+(u!=="center"?"-"+u:""),be=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},le=Array.isArray(y)?y:[y],ce=le.length>0,ue={padding:be,boundary:le.filter(Qm),altBoundary:ce},{refs:Se,floatingStyles:q,placement:ne,isPositioned:U,middlewareData:Q}=MC({strategy:"fixed",placement:ae,whileElementsMounted:yr((...se)=>_C(...se,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:N.anchor},middleware:[LC({mainAxis:l+K,alignmentAxis:d}),m&&FC({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?zC():void 0,...ue}),m&&VC({...ue}),UC({...ue,apply:yr(({elements:se,rects:Oe,availableWidth:Ue,availableHeight:je})=>{const{width:We,height:xt}=Oe.reference,ht=se.floating.style;ht.setProperty("--radix-popper-available-width",`${Ue}px`),ht.setProperty("--radix-popper-available-height",`${je}px`),ht.setProperty("--radix-popper-anchor-width",`${We}px`),ht.setProperty("--radix-popper-anchor-height",`${xt}px`)},"apply")}),L&&HC({element:L,padding:h}),ik({arrowWidth:I,arrowHeight:K}),b&&BC({strategy:"referenceHidden",...ue,boundary:ce?ue.boundary:void 0})]}),M=N.setPlacementState;dt(()=>(M(ne),()=>{M(void 0)}),[ne,M]);const[T,P]=el(ne),W=Gt(C);dt(()=>{U&&W?.()},[U,W]);const Z=Q.arrow?.x,H=Q.arrow?.y,re=Q.arrow?.centerOffset!==0,[de,Y]=f.useState();return dt(()=>{D&&Y(window.getComputedStyle(D).zIndex)},[D]),E.jsx("div",{ref:Se.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:U?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[Q.transformOrigin?.x,Q.transformOrigin?.y].join(" "),...Q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(ek,{scope:s,placedSide:T,placedAlign:P,onArrowChange:j,arrowX:Z,arrowY:H,shouldHideArrow:re,children:E.jsx(Ae.div,{"data-side":T,"data-align":P,...k,ref:R,style:{...k.style,animation:U?k.style?.animation:"none"}})})})},"PopperContent")),rk="PopperArrow",ok={top:"bottom",right:"left",bottom:"top",left:"right"},sk=f.forwardRef(yr(function(e,o){const{__scopePopper:s,...i}=e,l=tk(rk,s),u=ok[l.placedSide];return E.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:E.jsx(ZC,{...i,ref:o,style:{...i.style,display:"block"}})})},"PopperArrow"));function Qm(n){return n!==null}yr(Qm,"isNotNull");var ik=yr(n=>({name:"transformOrigin",options:n,fn(e){const{placement:o,rects:s,middlewareData:i}=e,u=i.arrow?.centerOffset!==0,d=u?0:n.arrowWidth,h=u?0:n.arrowHeight,[m,y]=el(o),v={start:"0%",center:"50%",end:"100%"}[y],x=(i.arrow?.x??0)+d/2,b=(i.arrow?.y??0)+h/2;let S="",C="";return m==="bottom"?(S=u?v:`${x}px`,C=`${-h}px`):m==="top"?(S=u?v:`${x}px`,C=`${s.floating.height+h}px`):m==="right"?(S=`${-h}px`,C=u?v:`${b}px`):m==="left"&&(S=`${s.floating.width+h}px`,C=u?v:`${b}px`),{data:{x:S,y:C}}}}),"transformOrigin");function el(n){const[e,o="center"]=n.split("-");return[e,o]}yr(el,"getSideAndAlignFromPlacement");var ui=QC,tl=JC,nl=nk,ak=sk,lk=Object.defineProperty,Ku=(n,e)=>lk(n,"name",{value:e,configurable:!0}),Gu=!1;function Xm(){const[n,e]=f.useState(Gu);return f.useEffect(()=>{Gu||(Gu=!0,e(!0))},[]),n}Ku(Xm,"useIsHydrated");var Jm=ns[" useSyncExternalStore ".trim().toString()];function eg(){return()=>{}}Ku(eg,"subscribe");function tg(){return Jm(eg,()=>!0,()=>!1)}Ku(tg,"useIsHydratedModern");var ck=typeof Jm=="function"?tg:Xm,uk=Object.defineProperty,Do=(n,e)=>uk(n,"name",{value:e,configurable:!0}),Zu="rovingFocusGroup.onEntryFocus",dk={bubbles:!1,cancelable:!0},rl="RovingFocusGroup",[qu,ng,fk]=Ia(rl),[pk,ol]=tn(rl,[fk]),[hk,mk]=pk(rl),gk=f.forwardRef(Do(function(e,o){return E.jsx(qu.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(qu.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(vk,{...e,ref:o})})})},"RovingFocusGroup")),vk=f.forwardRef(Do(function(e,o){const{__scopeRovingFocusGroup:s,orientation:i,loop:l=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:y,preventScrollOnEntryFocus:v=!1,...x}=e,b=f.useRef(null),S=Ve(o,b),C=ri(u),[k,N]=Un({prop:d,defaultProp:h??null,onChange:m,caller:rl}),[D,O]=f.useState(!1),R=Gt(y),L=ng(s),j=f.useRef(!1),[B,I]=f.useState(0);return f.useEffect(()=>{const K=b.current;if(K)return K.addEventListener(Zu,R),()=>K.removeEventListener(Zu,R)},[R]),E.jsx(hk,{scope:s,orientation:i,dir:C,loop:l,currentTabStopId:k,onItemFocus:f.useCallback(K=>N(K),[N]),onItemShiftTab:f.useCallback(()=>O(!0),[]),onFocusableItemAdd:f.useCallback(()=>I(K=>K+1),[]),onFocusableItemRemove:f.useCallback(()=>I(K=>K-1),[]),children:E.jsx(Ae.div,{tabIndex:D||B===0?-1:0,"data-orientation":i,...x,ref:S,style:{outline:"none",...e.style},onMouseDown:pe(e.onMouseDown,()=>{j.current=!0}),onFocus:pe(e.onFocus,K=>{const ae=!j.current;if(K.target===K.currentTarget&&ae&&!D){const be=new CustomEvent(Zu,dk);if(K.currentTarget.dispatchEvent(be),!be.defaultPrevented){const le=L().filter(ne=>ne.focusable),ce=le.find(ne=>ne.active),ue=le.find(ne=>ne.id===k),q=[ce,ue,...le].filter(Boolean).map(ne=>ne.ref.current);Yu(q,v)}}j.current=!1}),onBlur:pe(e.onBlur,()=>O(!1))})})},"RovingFocusGroupImpl")),yk="RovingFocusGroupItem",xk=f.forwardRef(Do(function(e,o){const{__scopeRovingFocusGroup:s,focusable:i=!0,active:l=!1,tabStopId:u,children:d,...h}=e,m=yt(),y=u||m,v=mk(yk,s),x=v.currentTabStopId===y,b=ng(s),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:k}=v,N=ck();return dt(()=>{if(!(!N||!i))return S(),()=>C()},[N,i,S,C]),f.useEffect(()=>{if(!(N||!i))return S(),()=>C()},[N,i,S,C]),E.jsx(qu.ItemSlot,{scope:s,id:y,focusable:i,active:l,children:E.jsx(Ae.span,{tabIndex:x?0:-1,"data-orientation":v.orientation,...h,ref:o,onMouseDown:pe(e.onMouseDown,D=>{i?v.onItemFocus(y):D.preventDefault()}),onFocus:pe(e.onFocus,()=>v.onItemFocus(y)),onKeyDown:pe(e.onKeyDown,D=>{if(D.key==="Tab"&&D.shiftKey){v.onItemShiftTab();return}if(D.target!==D.currentTarget)return;const O=og(D,v.orientation,v.dir);if(O!==void 0){if(D.metaKey||D.ctrlKey||D.altKey||D.shiftKey)return;D.preventDefault();let L=b().filter(j=>j.focusable).map(j=>j.ref.current);if(O==="last")L.reverse();else if(O==="prev"||O==="next"){O==="prev"&&L.reverse();const j=L.indexOf(D.currentTarget);L=v.loop?sg(L,j+1):L.slice(j+1)}setTimeout(()=>Yu(L))}}),children:typeof d=="function"?d({isCurrentTabStop:x,hasTabStop:k!=null}):d})})},"RovingFocusGroupItem")),wk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rg(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}Do(rg,"getDirectionAwareKey");function og(n,e,o){const s=rg(n.key,o);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return wk[s]}Do(og,"getFocusIntent");function Yu(n,e=!1){const o=document.activeElement;for(const s of n)if(s===o||(s.focus({preventScroll:e}),document.activeElement!==o))return}Do(Yu,"focusFirst");function sg(n,e){return n.map((o,s)=>n[(e+s)%n.length])}Do(sg,"wrapArray");var ig=gk,ag=xk,bk=Object.defineProperty,Ge=(n,e)=>bk(n,"name",{value:e,configurable:!0}),Qu=["Enter"," "],Sk=["ArrowDown","PageUp","Home"],lg=["ArrowUp","PageDown","End"],Ck=[...Sk,...lg],kk={ltr:[...Qu,"ArrowRight"],rtl:[...Qu,"ArrowLeft"]},Ek={ltr:["ArrowLeft"],rtl:["ArrowRight"]},sl="Menu",[di,_k,Pk]=Ia(sl),[No,cg]=tn(sl,[Pk,Ur,ol]),il=Ur(),ug=ol(),[dg,Br]=No(sl),[Rk,fi]=No(sl),Ik=Ge(n=>{const{__scopeMenu:e,open:o=!1,children:s,dir:i,onOpenChange:l,modal:u=!0}=n,d=il(e),[h,m]=f.useState(null),y=f.useRef(!1),v=Gt(l),x=ri(i);return f.useEffect(()=>{const b=Ge(()=>{y.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},"handleKeyDown"),S=Ge(()=>y.current=!1,"handlePointer");return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),f.useEffect(()=>{if(!o)return;const b=Ge(()=>v(!1),"handleBlur");return window.addEventListener("blur",b),()=>window.removeEventListener("blur",b)},[o,v]),E.jsx(ui,{...d,children:E.jsx(dg,{scope:e,open:o,onOpenChange:v,content:h,onContentChange:m,children:E.jsx(Rk,{scope:e,onClose:f.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:y,dir:x,modal:u,children:s})})})},"Menu"),fg=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,...i}=e,l=il(s);return E.jsx(tl,{...l,...i,ref:o})},"MenuAnchor")),pg="MenuPortal",[Tk,hg]=No(pg,{forceMount:void 0}),Dk=Ge(n=>{const{__scopeMenu:e,forceMount:o,children:s,container:i}=n,l=Br(pg,e);return E.jsx(Tk,{scope:e,forceMount:o,children:E.jsx(nn,{present:o||l.open,children:E.jsx(si,{asChild:!0,container:i,children:s})})})},"MenuPortal"),_n="MenuContent",[Nk,Xu]=No(_n),Ok=f.forwardRef(Ge(function(e,o){const s=hg(_n,e.__scopeMenu),{forceMount:i=s.forceMount,...l}=e,u=Br(_n,e.__scopeMenu),d=fi(_n,e.__scopeMenu);return E.jsx(di.Provider,{scope:e.__scopeMenu,children:E.jsx(nn,{present:i||u.open,children:E.jsx(di.Slot,{scope:e.__scopeMenu,children:d.modal?E.jsx(Ak,{...l,ref:o}):E.jsx($k,{...l,ref:o})})})})},"MenuContent")),Ak=f.forwardRef(Ge(function(e,o){const s=Br(_n,e.__scopeMenu),i=f.useRef(null),l=Ve(o,i);return f.useEffect(()=>{const u=i.current;if(u)return za(u)},[]),E.jsx(Ju,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:pe(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentModal")),$k=f.forwardRef(Ge(function(e,o){const s=Br(_n,e.__scopeMenu);return E.jsx(Ju,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentNonModal")),Mk=kn("MenuContent.ScrollLock"),Ju=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,loop:i=!1,trapFocus:l,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:y,onPointerDownOutside:v,onFocusOutside:x,onInteractOutside:b,onDismiss:S,disableOutsideScroll:C,...k}=e,N=Br(_n,s),D=fi(_n,s),O=il(s),R=ug(s),L=_k(s),[j,B]=f.useState(null),I=f.useRef(null),K=Ve(o,I,N.onContentChange),ae=f.useRef(0),be=f.useRef(""),le=f.useRef(0),ce=f.useRef(null),ue=f.useRef("right"),Se=f.useRef(0),q=C?ii:f.Fragment,ne=C?{as:Mk,allowPinchZoom:!0}:void 0,U=Ge(M=>{const T=be.current+M,P=L().filter(Y=>!Y.disabled),W=document.activeElement,Z=P.find(Y=>Y.ref.current===W)?.textValue,H=P.map(Y=>Y.textValue),re=Cg(H,T,Z),de=P.find(Y=>Y.textValue===re)?.ref.current;Ge((function Y(se){be.current=se,window.clearTimeout(ae.current),se!==""&&(ae.current=window.setTimeout(()=>Y(""),1e3))}),"updateSearch")(T),de&&setTimeout(()=>de.focus())},"handleTypeaheadSearch");f.useEffect(()=>()=>window.clearTimeout(ae.current),[]),cs();const Q=f.useCallback(M=>ue.current===ce.current?.side&&Eg(M,ce.current?.area),[]);return E.jsx(Nk,{scope:s,searchRef:be,onItemEnter:f.useCallback(M=>{Q(M)&&M.preventDefault()},[Q]),onItemLeave:f.useCallback(M=>{Q(M)||(I.current?.focus(),B(null))},[Q]),onTriggerLeave:f.useCallback(M=>{Q(M)&&M.preventDefault()},[Q]),pointerGraceTimerRef:le,onPointerGraceIntentChange:f.useCallback(M=>{ce.current=M},[]),children:E.jsx(q,{...ne,children:E.jsx(Da,{asChild:!0,trapped:l,onMountAutoFocus:pe(u,M=>{M.preventDefault(),I.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:E.jsx(oi,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:y,onPointerDownOutside:v,onFocusOutside:x,onInteractOutside:b,onDismiss:S,children:E.jsx(ig,{asChild:!0,...R,dir:D.dir,orientation:"vertical",loop:i,currentTabStopId:j,onCurrentTabStopIdChange:B,onEntryFocus:pe(m,M=>{D.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(nl,{role:"menu","aria-orientation":"vertical","data-state":td(N.open),"data-radix-menu-content":"",dir:D.dir,...O,...k,ref:K,style:{outline:"none",...k.style},onKeyDown:pe(k.onKeyDown,M=>{const P=M.target.closest("[data-radix-menu-content]")===M.currentTarget,W=M.ctrlKey||M.altKey||M.metaKey,Z=M.key.length===1;P&&(M.key==="Tab"&&M.preventDefault(),!W&&Z&&U(M.key));const H=I.current;if(M.target!==H||!Ck.includes(M.key))return;M.preventDefault();const de=L().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);lg.includes(M.key)&&de.reverse(),bg(de)}),onBlur:pe(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(ae.current),be.current="")}),onPointerMove:pe(e.onPointerMove,vs(M=>{const T=M.target,P=Se.current!==M.clientX;if(M.currentTarget.contains(T)&&P){const W=M.clientX>Se.current?"right":"left";ue.current=W,Se.current=M.clientX}}))})})})})})})},"MenuContentImpl")),jk=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,...i}=e;return E.jsx(Ae.div,{role:"group",...i,ref:o})},"MenuGroup")),Lk=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,...i}=e;return E.jsx(Ae.div,{...i,ref:o})},"MenuLabel")),ed="MenuItem",mg="menu.itemSelect",gg=f.forwardRef(Ge(function(e,o){const{disabled:s=!1,onSelect:i,...l}=e,u=f.useRef(null),d=fi(ed,e.__scopeMenu),h=Xu(ed,e.__scopeMenu),m=Ve(o,u),y=f.useRef(!1),v=Ge(()=>{const x=u.current;if(!s&&x){const b=new CustomEvent(mg,{bubbles:!0,cancelable:!0});x.addEventListener(mg,S=>i?.(S),{once:!0}),lu(x,b),b.defaultPrevented?y.current=!1:d.onClose()}},"handleSelect");return E.jsx(vg,{...l,ref:m,disabled:s,onClick:pe(e.onClick,v),onPointerDown:x=>{e.onPointerDown?.(x),y.current=!0},onPointerUp:pe(e.onPointerUp,x=>{y.current||x.currentTarget?.click()}),onKeyDown:pe(e.onKeyDown,x=>{s||x.target!==x.currentTarget||h.searchRef.current!==""&&x.key===" "||Qu.includes(x.key)&&(x.currentTarget.click(),x.preventDefault())})})},"MenuItem")),vg=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,disabled:i=!1,textValue:l,...u}=e,d=Xu(ed,s),h=ug(s),m=f.useRef(null),y=Ve(o,m),[v,x]=f.useState(!1),[b,S]=f.useState("");return f.useEffect(()=>{const C=m.current;C&&S((C.textContent??"").trim())},[u.children]),E.jsx(di.ItemSlot,{scope:s,disabled:i,textValue:l??b,children:E.jsx(ag,{asChild:!0,...h,focusable:!i,children:E.jsx(Ae.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:y,onPointerMove:pe(e.onPointerMove,vs(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:pe(e.onPointerLeave,vs(C=>d.onItemLeave(C))),onFocus:pe(e.onFocus,()=>x(!0)),onBlur:pe(e.onBlur,()=>x(!1))})})})},"MenuItemImpl")),Fk="MenuRadioGroup",[zk,Vk]=No(Fk,{value:void 0,onValueChange:Ge(()=>{},"onValueChange")}),Uk=f.forwardRef(Ge(function(e,o){const{value:s,onValueChange:i,...l}=e,u=Gt(i);return E.jsx(zk,{scope:e.__scopeMenu,value:s,onValueChange:u,children:E.jsx(jk,{...l,ref:o})})},"MenuRadioGroup")),Bk="MenuRadioItem",Hk=f.forwardRef(Ge(function(e,o){const{value:s,...i}=e,l=Vk(Bk,e.__scopeMenu),u=s===l.value;return E.jsx(Wk,{scope:e.__scopeMenu,checked:u,children:E.jsx(gg,{role:"menuitemradio","aria-checked":u,...i,ref:o,"data-state":rd(u),onSelect:pe(i.onSelect,()=>l.onValueChange?.(s),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),yg="MenuItemIndicator",[Wk,Kk]=No(yg,{checked:!1}),Gk=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,forceMount:i,...l}=e,u=Kk(yg,s);return E.jsx(nn,{present:i||nd(u.checked)||u.checked===!0,children:E.jsx(Ae.span,{...l,ref:o,"data-state":rd(u.checked)})})},"MenuItemIndicator")),Zk=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,...i}=e;return E.jsx(Ae.div,{role:"separator","aria-orientation":"horizontal",...i,ref:o})},"MenuSeparator")),xg="MenuSub",[qk,wg]=No(xg),Yk=Ge(n=>{const{__scopeMenu:e,children:o,open:s=!1,onOpenChange:i}=n,l=Br(xg,e),u=il(e),[d,h]=f.useState(null),[m,y]=f.useState(null),v=Gt(i);return f.useEffect(()=>(l.open===!1&&v(!1),()=>v(!1)),[l.open,v]),E.jsx(ui,{...u,children:E.jsx(dg,{scope:e,open:s,onOpenChange:v,content:m,onContentChange:y,children:E.jsx(qk,{scope:e,contentId:yt(),triggerId:yt(),trigger:d,onTriggerChange:h,children:o})})})},"MenuSub"),al="MenuSubTrigger",Qk=f.forwardRef(Ge(function(e,o){const s=Br(al,e.__scopeMenu),i=fi(al,e.__scopeMenu),l=wg(al,e.__scopeMenu),u=Xu(al,e.__scopeMenu),d=f.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=u,y={__scopeMenu:e.__scopeMenu},v=f.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);f.useEffect(()=>v,[v]),f.useEffect(()=>{const b=h.current;return()=>{window.clearTimeout(b),m(null)}},[h,m]);const x=Ve(o,l.onTriggerChange);return E.jsx(fg,{asChild:!0,...y,children:E.jsx(vg,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?l.contentId:void 0,"data-state":td(s.open),...e,ref:x,onClick:b=>{e.onClick?.(b),!(e.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:pe(e.onPointerMove,vs(b=>{u.onItemEnter(b),!b.defaultPrevented&&!e.disabled&&!s.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{s.onOpenChange(!0),v()},100))})),onPointerLeave:pe(e.onPointerLeave,vs(b=>{v();const S=s.content?.getBoundingClientRect();if(S){const C=s.content?.dataset.side,k=C==="right",N=k?-5:5,D=S[k?"left":"right"],O=S[k?"right":"left"];u.onPointerGraceIntentChange({area:[{x:b.clientX+N,y:b.clientY},{x:D,y:S.top},{x:O,y:S.top},{x:O,y:S.bottom},{x:D,y:S.bottom}],side:C}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(b),b.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:pe(e.onKeyDown,b=>{e.disabled||b.target!==b.currentTarget||u.searchRef.current!==""&&b.key===" "||kk[i.dir].includes(b.key)&&(s.onOpenChange(!0),s.content?.focus(),b.preventDefault())})})})},"MenuSubTrigger")),Xk="MenuSubContent",Jk=f.forwardRef(Ge(function(e,o){const s=hg(_n,e.__scopeMenu),{forceMount:i=s.forceMount,align:l="start",...u}=e,d=Br(_n,e.__scopeMenu),h=fi(_n,e.__scopeMenu),m=wg(Xk,e.__scopeMenu),y=f.useRef(null),v=Ve(o,y);return E.jsx(di.Provider,{scope:e.__scopeMenu,children:E.jsx(nn,{present:i||d.open,children:E.jsx(di.Slot,{scope:e.__scopeMenu,children:E.jsx(Ju,{id:m.contentId,"aria-labelledby":m.triggerId,...u,ref:v,align:l,side:h.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{h.isUsingKeyboardRef.current&&y.current?.focus(),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:pe(e.onFocusOutside,x=>{x.target!==m.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:pe(e.onEscapeKeyDown,x=>{h.onClose(),x.preventDefault()}),onKeyDown:pe(e.onKeyDown,x=>{const b=x.currentTarget.contains(x.target),S=Ek[h.dir].includes(x.key);b&&S&&(d.onOpenChange(!1),m.trigger?.focus(),x.preventDefault())})})})})})},"MenuSubContent"));function td(n){return n?"open":"closed"}Ge(td,"getOpenState");function nd(n){return n==="indeterminate"}Ge(nd,"isIndeterminate");function rd(n){return nd(n)?"indeterminate":n?"checked":"unchecked"}Ge(rd,"getCheckedState");function bg(n){const e=document.activeElement;for(const o of n)if(o===e||(o.focus(),document.activeElement!==e))return}Ge(bg,"focusFirst");function Sg(n,e){return n.map((o,s)=>n[(e+s)%n.length])}Ge(Sg,"wrapArray");function Cg(n,e,o){const i=e.length>1&&Array.from(e).every(m=>m===e[0])?e[0]:e,l=o?n.indexOf(o):-1;let u=Sg(n,Math.max(l,0));i.length===1&&(u=u.filter(m=>m!==o));const h=u.find(m=>m.toLowerCase().startsWith(i.toLowerCase()));return h!==o?h:void 0}Ge(Cg,"getNextMatch");function kg(n,e){const{x:o,y:s}=n;let i=!1;for(let l=0,u=e.length-1;l<e.length;u=l++){const d=e[l],h=e[u],m=d.x,y=d.y,v=h.x,x=h.y;y>s!=x>s&&o<(v-m)*(s-y)/(x-y)+m&&(i=!i)}return i}Ge(kg,"isPointInPolygon");function Eg(n,e){if(!e)return!1;const o={x:n.clientX,y:n.clientY};return kg(o,e)}Ge(Eg,"isPointerInGraceArea");function vs(n){return e=>e.pointerType==="mouse"?n(e):void 0}Ge(vs,"whenMouse");var eE=Ik,tE=fg,nE=Dk,rE=Ok,oE=Lk,sE=gg,iE=Uk,aE=Hk,lE=Gk,cE=Zk,uE=Yk,dE=Qk,fE=Jk,pE=Object.defineProperty,on=(n,e)=>pE(n,"name",{value:e,configurable:!0}),od="DropdownMenu",[hE,a2]=tn(od,[cg]),sn=cg(),[mE,_g]=hE(od),gE=on(n=>{const{__scopeDropdownMenu:e,children:o,dir:s,open:i,defaultOpen:l,onOpenChange:u,modal:d=!0}=n,h=sn(e),m=f.useRef(null),[y,v]=Un({prop:i,defaultProp:l??!1,onChange:u,caller:od});return E.jsx(mE,{scope:e,triggerId:yt(),triggerRef:m,contentId:yt(),open:y,onOpenChange:v,onOpenToggle:f.useCallback(()=>v(x=>!x),[v]),modal:d,children:E.jsx(eE,{...h,open:y,onOpenChange:v,dir:s,modal:d,children:o})})},"DropdownMenu"),vE="DropdownMenuTrigger",yE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,disabled:i=!1,...l}=e,u=_g(vE,s),d=sn(s),h=Ve(o,u.triggerRef);return E.jsx(tE,{asChild:!0,...d,children:E.jsx(Ae.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...l,ref:h,onPointerDown:pe(e.onPointerDown,m=>{!i&&m.button===0&&m.ctrlKey===!1&&(u.onOpenToggle(),u.open||m.preventDefault())}),onKeyDown:pe(e.onKeyDown,m=>{i||(["Enter"," "].includes(m.key)&&u.onOpenToggle(),m.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})},"DropdownMenuTrigger")),xE=on(n=>{const{__scopeDropdownMenu:e,...o}=n,s=sn(e);return E.jsx(nE,{...s,...o})},"DropdownMenuPortal"),wE="DropdownMenuContent",bE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=_g(wE,s),u=sn(s),d=f.useRef(!1);return E.jsx(rE,{id:l.contentId,"aria-labelledby":l.triggerId,...u,...i,ref:o,onCloseAutoFocus:pe(e.onCloseAutoFocus,h=>{d.current||l.triggerRef.current?.focus(),d.current=!1,h.preventDefault()}),onInteractOutside:pe(e.onInteractOutside,h=>{const m=h.detail.originalEvent,y=m.button===0&&m.ctrlKey===!0,v=m.button===2||y;(!l.modal||v)&&(d.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)"}})},"DropdownMenuContent")),SE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(oE,{...l,...i,ref:o})},"DropdownMenuLabel")),CE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(sE,{...l,...i,ref:o})},"DropdownMenuItem")),kE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(iE,{...l,...i,ref:o})},"DropdownMenuRadioGroup")),EE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(aE,{...l,...i,ref:o})},"DropdownMenuRadioItem")),_E=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(lE,{...l,...i,ref:o})},"DropdownMenuItemIndicator")),PE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(cE,{...l,...i,ref:o})},"DropdownMenuSeparator")),RE=on(n=>{const{__scopeDropdownMenu:e,children:o,open:s,onOpenChange:i,defaultOpen:l}=n,u=sn(e),[d,h]=Un({prop:s,defaultProp:l??!1,onChange:i,caller:"DropdownMenuSub"});return E.jsx(uE,{...u,open:d,onOpenChange:h,children:o})},"DropdownMenuSub"),IE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(dE,{...l,...i,ref:o})},"DropdownMenuSubTrigger")),TE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(fE,{...l,...i,ref:o,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)"}})},"DropdownMenuSubContent")),DE=gE,NE=yE,Pg=xE,OE=bE,AE=SE,$E=CE,ME=kE,jE=EE,LE=_E,FE=PE,zE=RE,VE=IE,UE=TE,BE=Object.defineProperty,HE=(n,e)=>BE(n,"name",{value:e,configurable:!0});function Rg(n){const e=f.useRef({value:n,previous:n});return f.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}HE(Rg,"usePrevious");var WE=Object.defineProperty,KE=(n,e)=>WE(n,"name",{value:e,configurable:!0});function sd(n,[e,o]){return Math.min(o,Math.max(e,n))}KE(sd,"clamp");var GE=Object.defineProperty,Hr=(n,e)=>GE(n,"name",{value:e,configurable:!0}),id="Popover",[Ig,l2]=tn(id,[Ur]),ad=Ur(),[ZE,ys]=Ig(id),qE=Hr(n=>{const{__scopePopover:e,children:o,open:s,defaultOpen:i,onOpenChange:l,modal:u=!1}=n,d=ad(e),h=f.useRef(null),[m,y]=f.useState(!1),[v,x]=Un({prop:s,defaultProp:i??!1,onChange:l,caller:id});return E.jsx(ui,{...d,children:E.jsx(ZE,{scope:e,contentId:yt(),triggerRef:h,open:v,onOpenChange:x,onOpenToggle:f.useCallback(()=>x(b=>!b),[x]),hasCustomAnchor:m,onCustomAnchorAdd:f.useCallback(()=>y(!0),[]),onCustomAnchorRemove:f.useCallback(()=>y(!1),[]),modal:u,children:o})})},"Popover"),YE="PopoverTrigger",QE=f.forwardRef(Hr(function(e,o){const{__scopePopover:s,...i}=e,l=ys(YE,s),u=ad(s),d=Ve(o,l.triggerRef),h=E.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":ld(l.open),...i,ref:d,onClick:pe(e.onClick,l.onOpenToggle)});return l.hasCustomAnchor?h:E.jsx(tl,{asChild:!0,...u,children:h})},"PopoverTrigger")),Tg="PopoverPortal",[XE,JE]=Ig(Tg,{forceMount:void 0}),e_=Hr(n=>{const{__scopePopover:e,forceMount:o,children:s,container:i}=n,l=ys(Tg,e);return E.jsx(XE,{scope:e,forceMount:o,children:E.jsx(nn,{present:o||l.open,children:E.jsx(si,{asChild:!0,container:i,children:s})})})},"PopoverPortal"),pi="PopoverContent",t_=f.forwardRef(Hr(function(e,o){const s=JE(pi,e.__scopePopover),{forceMount:i=s.forceMount,...l}=e,u=ys(pi,e.__scopePopover);return E.jsx(nn,{present:i||u.open,children:u.modal?E.jsx(r_,{...l,ref:o}):E.jsx(o_,{...l,ref:o})})},"PopoverContent")),n_=kn("PopoverContent.RemoveScroll"),r_=f.forwardRef(Hr(function(e,o){const s=ys(pi,e.__scopePopover),i=f.useRef(null),l=Ve(o,i),u=f.useRef(!1);return f.useEffect(()=>{const d=i.current;if(d)return za(d)},[]),E.jsx(ii,{as:n_,allowPinchZoom:!0,children:E.jsx(Dg,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pe(e.onCloseAutoFocus,d=>{d.preventDefault(),u.current||s.triggerRef.current?.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,d=>{const h=d.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,y=h.button===2||m;u.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:pe(e.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),o_=f.forwardRef(Hr(function(e,o){const s=ys(pi,e.__scopePopover),i=f.useRef(!1),l=f.useRef(!1);return E.jsx(Dg,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||s.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=u.target;s.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&l.current&&u.preventDefault()}})},"PopoverContentNonModal")),Dg=f.forwardRef(Hr(function(e,o){const{__scopePopover:s,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:v,...x}=e,b=ys(pi,s),S=ad(s);return cs(),E.jsx(Da,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:u,children:E.jsx(oi,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:v,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:E.jsx(nl,{"data-state":ld(b.open),role:"dialog",id:b.contentId,...S,...x,ref:o,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function ld(n){return n?"open":"closed"}Hr(ld,"getState");var s_=qE,i_=QE,a_=e_,l_=t_,c_=Object.defineProperty,qe=(n,e)=>c_(n,"name",{value:e,configurable:!0}),u_=[" ","Enter","ArrowUp","ArrowDown"],d_=[" ","Enter"],xs="Select",[ll,cl,f_]=Ia(xs),[Oo,c2]=tn(xs,[f_,Ur]),cd=Ur(),[p_,Wr]=Oo(xs),[h_,m_]=Oo(xs);function Ng(n){const{__scopeSelect:e,children:o,open:s,defaultOpen:i,onOpenChange:l,value:u,defaultValue:d,onValueChange:h,dir:m,name:y,autoComplete:v,disabled:x,required:b,form:S,internal_do_not_use_render:C}=n,k=cd(e),[N,D]=f.useState(null),[O,R]=f.useState(null),[L,j]=f.useState(!1),B=ri(m),[I,K]=Un({prop:s,defaultProp:i??!1,onChange:l,caller:xs}),[ae,be]=Un({prop:u,defaultProp:d,onChange:h,caller:xs}),le=f.useRef(null),ce=f.useRef(ae);f.useEffect(()=>{const P=S?N?.ownerDocument.getElementById(S):N?.form;if(P instanceof HTMLFormElement){const W=qe(()=>be(ce.current),"reset");return P.addEventListener("reset",W),()=>P.removeEventListener("reset",W)}},[S,N,be]);const ue=N?!!S||!!N.closest("form"):!0,[Se,q]=f.useState(new Set),ne=yt(),U=Array.from(Se).map(P=>P.props.value).join(";"),Q=f.useCallback(P=>{q(W=>new Set(W).add(P))},[]),M=f.useCallback(P=>{q(W=>{const Z=new Set(W);return Z.delete(P),Z})},[]),T={required:b,trigger:N,onTriggerChange:D,valueNode:O,onValueNodeChange:R,valueNodeHasChildren:L,onValueNodeHasChildrenChange:j,contentId:ne,value:ae,onValueChange:be,open:I,onOpenChange:K,dir:B,triggerPointerDownPosRef:le,disabled:x,name:y,autoComplete:v,form:S,nativeOptions:Se,nativeSelectKey:U,isFormControl:ue};return E.jsx(ui,{...k,children:E.jsx(p_,{scope:e,...T,children:E.jsx(ll.Provider,{scope:e,children:E.jsx(h_,{scope:e,onNativeOptionAdd:Q,onNativeOptionRemove:M,children:zg(C)?C(T):o})})})})}qe(Ng,"SelectProvider");var g_=qe(n=>{const{__scopeSelect:e,children:o,...s}=n;return E.jsx(Ng,{__scopeSelect:e,...s,internal_do_not_use_render:({isFormControl:i})=>E.jsxs(E.Fragment,{children:[o,i?E.jsx(U_,{__scopeSelect:e}):null]})})},"Select"),v_="SelectTrigger",y_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,disabled:i=!1,...l}=e,u=cd(s),d=Wr(v_,s),h=d.disabled||i,m=Ve(o,d.onTriggerChange),y=cl(s),v=f.useRef("touch"),[x,b,S]=fd(k=>{const N=y().filter(R=>!R.disabled),D=N.find(R=>R.value===d.value),O=pd(N,k,D);O!==void 0&&d.onValueChange(O.value)}),C=qe(k=>{h||(d.onOpenChange(!0),S()),k&&(d.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})},"handleOpen");return E.jsx(tl,{asChild:!0,...u,children:E.jsx(Ae.button,{type:"button",role:"combobox","aria-controls":d.open?d.contentId:void 0,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":hi(d.value)?"":void 0,...l,ref:m,onClick:pe(l.onClick,k=>{k.currentTarget.focus(),v.current!=="mouse"&&C(k)}),onPointerDown:pe(l.onPointerDown,k=>{v.current=k.pointerType;const N=k.target;N.hasPointerCapture(k.pointerId)&&N.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(C(k),k.preventDefault())}),onKeyDown:pe(l.onKeyDown,k=>{const N=x.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&b(k.key),!(N&&k.key===" ")&&u_.includes(k.key)&&(C(),k.preventDefault())})})})},"SelectTrigger")),x_="SelectValue",w_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,className:i,style:l,children:u,placeholder:d="",...h}=e,m=Wr(x_,s),{onValueNodeHasChildrenChange:y}=m,v=u!==void 0,x=Ve(o,m.onValueNodeChange);dt(()=>{y(v)},[y,v]);const b=hi(m.value);return E.jsx(Ae.span,{...h,asChild:b?!1:h.asChild,ref:x,style:{pointerEvents:"none"},children:E.jsx(f.Fragment,{children:b?d:u},b?"placeholder":"value")})},"SelectValue")),b_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,children:i,...l}=e;return E.jsx(Ae.span,{"aria-hidden":!0,...l,ref:o,children:i||"▼"})},"SelectIcon")),S_="SelectPortal",[C_,k_]=Oo(S_,{forceMount:void 0}),E_=qe(n=>{const{__scopeSelect:e,forceMount:o,...s}=n;return E.jsx(C_,{scope:n.__scopeSelect,forceMount:o,children:E.jsx(si,{asChild:!0,...s})})},"SelectPortal"),Ao="SelectContent",__=f.forwardRef(qe(function(e,o){const s=k_(Ao,e.__scopeSelect),{forceMount:i=s.forceMount,...l}=e,u=Wr(Ao,e.__scopeSelect),[d,h]=f.useState();return dt(()=>{h(new DocumentFragment)},[]),E.jsx(nn,{present:i||u.open,children:({present:m})=>m?E.jsx(I_,{...l,ref:o}):E.jsx(P_,{...l,fragment:d})})},"SelectContent")),P_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,children:i,fragment:l}=e;return l?ti.createPortal(E.jsx(Og,{scope:s,children:E.jsx(ll.Slot,{scope:s,children:E.jsx("div",{ref:o,children:i})})}),l):null},"SelectContentFragment")),Pn=10,[Og,$o]=Oo(Ao),R_=kn("SelectContent.RemoveScroll"),I_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s}=e,{position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,side:h,sideOffset:m,align:y,alignOffset:v,arrowPadding:x,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:k,avoidCollisions:N,...D}=e,O=Wr(Ao,s),[R,L]=f.useState(null),[j,B]=f.useState(null),I=Ve(o,L),[K,ae]=f.useState(null),[be,le]=f.useState(null),ce=cl(s),[ue,Se]=f.useState(!1),q=f.useRef(!1);f.useEffect(()=>{if(R)return za(R)},[R]),cs();const ne=f.useCallback(Y=>{const[se,...Oe]=ce().map(We=>We.ref.current),[Ue]=Oe.slice(-1),je=document.activeElement;for(const We of Y)if(We===je||(We?.scrollIntoView({block:"nearest"}),We===se&&j&&(j.scrollTop=0),We===Ue&&j&&(j.scrollTop=j.scrollHeight),We?.focus(),document.activeElement!==je))return},[ce,j]),U=f.useCallback(()=>ne([K,R]),[ne,K,R]);f.useEffect(()=>{ue&&U()},[ue,U]);const{onOpenChange:Q,triggerPointerDownPosRef:M}=O;f.useEffect(()=>{if(R){let Y={x:0,y:0};const se=qe(Ue=>{Y={x:Math.abs(Math.round(Ue.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(Ue.pageY)-(M.current?.y??0))}},"handlePointerMove"),Oe=qe(Ue=>{Y.x<=10&&Y.y<=10?Ue.preventDefault():Ue.composedPath().includes(R)||Q(!1),document.removeEventListener("pointermove",se),M.current=null},"handlePointerUp");return M.current!==null&&(document.addEventListener("pointermove",se),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",se),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[R,Q,M]),f.useEffect(()=>{const Y=qe(()=>Q(!1),"close");return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[Q]);const[T,P]=fd(Y=>{const se=ce().filter(je=>!je.disabled),Oe=se.find(je=>je.ref.current===document.activeElement),Ue=pd(se,Y,Oe);Ue&&setTimeout(()=>Ue.ref.current?.focus())}),W=f.useCallback((Y,se,Oe)=>{const Ue=!q.current&&!Oe;(O.value!==void 0&&O.value===se||Ue)&&(ae(Y),Ue&&(q.current=!0))},[O.value]),Z=f.useCallback(()=>R?.focus(),[R]),H=f.useCallback((Y,se,Oe)=>{const Ue=!q.current&&!Oe;(O.value!==void 0&&O.value===se||Ue)&&le(Y)},[O.value]),re=i==="popper"?Ag:T_,de=re===Ag?{side:h,sideOffset:m,align:y,alignOffset:v,arrowPadding:x,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:k,avoidCollisions:N}:{};return E.jsx(Og,{scope:s,content:R,viewport:j,onViewportChange:B,itemRefCallback:W,selectedItem:K,onItemLeave:Z,itemTextRefCallback:H,focusSelectedItem:U,selectedItemText:be,position:i,isPositioned:ue,searchRef:T,children:E.jsx(ii,{as:R_,allowPinchZoom:!0,children:E.jsx(Da,{asChild:!0,trapped:O.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:pe(l,Y=>{O.trigger?.focus({preventScroll:!0}),Y.preventDefault()}),children:E.jsx(oi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:E.jsx(re,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:Y=>Y.preventDefault(),...D,...de,onPlaced:()=>Se(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...D.style},onKeyDown:pe(D.onKeyDown,Y=>{const se=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!se&&Y.key.length===1&&P(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let Ue=ce().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(Ue=Ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const je=Y.target,We=Ue.indexOf(je);Ue=Ue.slice(We+1)}setTimeout(()=>ne(Ue)),Y.preventDefault()}})})})})})})},"SelectContentImpl")),T_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,onPlaced:i,...l}=e,u=Wr(Ao,s),d=$o(Ao,s),[h,m]=f.useState(null),[y,v]=f.useState(null),x=Ve(o,v),b=cl(s),S=f.useRef(!1),C=f.useRef(!0),{viewport:k,selectedItem:N,selectedItemText:D,focusSelectedItem:O}=d,R=f.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&y&&k&&N&&D){const I=u.trigger.getBoundingClientRect(),K=y.getBoundingClientRect(),ae=u.valueNode.getBoundingClientRect(),be=D.getBoundingClientRect();if(u.dir!=="rtl"){const je=be.left-K.left,We=ae.left-je,xt=I.left-We,ht=I.width+xt,Qn=Math.max(ht,K.width),Rn=window.innerWidth-Pn,Zr=sd(We,[Pn,Math.max(Pn,Rn-Qn)]);h.style.minWidth=ht+"px",h.style.left=Zr+"px"}else{const je=K.right-be.right,We=window.innerWidth-ae.right-je,xt=window.innerWidth-I.right-We,ht=I.width+xt,Qn=Math.max(ht,K.width),Rn=window.innerWidth-Pn,Zr=sd(We,[Pn,Math.max(Pn,Rn-Qn)]);h.style.minWidth=ht+"px",h.style.right=Zr+"px"}const le=b(),ce=window.innerHeight-Pn*2,ue=k.scrollHeight,Se=window.getComputedStyle(y),q=parseInt(Se.borderTopWidth,10),ne=parseInt(Se.paddingTop,10),U=parseInt(Se.borderBottomWidth,10),Q=parseInt(Se.paddingBottom,10),M=q+ne+ue+Q+U,T=Math.min(N.offsetHeight*5,M),P=window.getComputedStyle(k),W=parseInt(P.paddingTop,10),Z=parseInt(P.paddingBottom,10),H=I.top+I.height/2-Pn,re=ce-H,de=N.offsetHeight/2,Y=N.offsetTop+de,se=q+ne+Y,Oe=M-se;if(se<=H){const je=le.length>0&&N===le[le.length-1].ref.current;h.style.bottom="0px";const We=y.clientHeight-k.offsetTop-k.offsetHeight,xt=Math.max(re,de+(je?Z:0)+We+U),ht=se+xt;h.style.height=ht+"px"}else{const je=le.length>0&&N===le[0].ref.current;h.style.top="0px";const xt=Math.max(H,q+k.offsetTop+(je?W:0)+de)+Oe;h.style.height=xt+"px",k.scrollTop=se-H+k.offsetTop}h.style.margin=`${Pn}px 0`,h.style.minHeight=T+"px",h.style.maxHeight=ce+"px",i?.(),requestAnimationFrame(()=>S.current=!0)}},[b,u.trigger,u.valueNode,h,y,k,N,D,u.dir,i]);dt(()=>R(),[R]);const[L,j]=f.useState();dt(()=>{y&&j(window.getComputedStyle(y).zIndex)},[y]);const B=f.useCallback(I=>{I&&C.current===!0&&(R(),O?.(),C.current=!1)},[R,O]);return E.jsx(D_,{scope:s,contentWrapper:h,shouldExpandOnScrollRef:S,onScrollButtonChange:B,children:E.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:E.jsx(Ae.div,{...l,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})},"SelectItemAlignedPosition")),Ag=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,align:i="start",collisionPadding:l=Pn,...u}=e,d=cd(s);return E.jsx(nl,{...d,...u,ref:o,align:i,collisionPadding:l,style:{boxSizing:"border-box",...u.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)"}})},"SelectPopperPosition")),[D_,ud]=Oo(Ao,{}),$g="SelectViewport",N_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,nonce:i,...l}=e,u=$o($g,s),d=ud($g,s),h=Ve(o,u.onViewportChange),m=f.useRef(0);return E.jsxs(E.Fragment,{children:[E.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:i}),E.jsx(ll.Slot,{scope:s,children:E.jsx(Ae.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:pe(l.onScroll,y=>{const v=y.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:b}=d;if(b?.current&&x){const S=Math.abs(m.current-v.scrollTop);if(S>0){const C=window.innerHeight-Pn*2,k=parseFloat(x.style.minHeight),N=parseFloat(x.style.height),D=Math.max(k,N);if(D<C){const O=D+S,R=Math.min(C,O),L=O-R;x.style.height=R+"px",x.style.bottom==="0px"&&(v.scrollTop=L>0?L:0,x.style.justifyContent="flex-end")}}}m.current=v.scrollTop})})})]})},"SelectViewport")),O_="SelectGroup",[u2,d2]=Oo(O_),dd="SelectItem",[A_,Mg]=Oo(dd),$_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,value:i,disabled:l=!1,textValue:u,...d}=e,h=Wr(dd,s),m=$o(dd,s),y=h.value===i,[v,x]=f.useState(u??""),[b,S]=f.useState(!1),C=Gt(R=>m.itemRefCallback?.(R,i,l)),k=Ve(o,C),N=yt(),D=f.useRef("touch"),O=qe(()=>{l||(h.onValueChange(i),h.onOpenChange(!1))},"handleSelect");return E.jsx(A_,{scope:s,value:i,disabled:l,textId:N,isSelected:y,onItemTextChange:f.useCallback(R=>{x(L=>L||(R?.textContent??"").trim())},[]),children:E.jsx(ll.ItemSlot,{scope:s,value:i,disabled:l,textValue:v,children:E.jsx(Ae.div,{role:"option","aria-labelledby":N,"data-highlighted":b?"":void 0,"aria-selected":y&&b,"data-state":y?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...d,ref:k,onFocus:pe(d.onFocus,()=>S(!0)),onBlur:pe(d.onBlur,()=>S(!1)),onClick:pe(d.onClick,()=>{D.current!=="mouse"&&O()}),onPointerUp:pe(d.onPointerUp,()=>{D.current==="mouse"&&O()}),onPointerDown:pe(d.onPointerDown,R=>{D.current=R.pointerType}),onPointerMove:pe(d.onPointerMove,R=>{D.current=R.pointerType,l?m.onItemLeave?.():D.current==="mouse"&&R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pe(d.onPointerLeave,R=>{R.currentTarget===document.activeElement&&m.onItemLeave?.()}),onKeyDown:pe(d.onKeyDown,R=>{l||R.target!==R.currentTarget||m.searchRef?.current!==""&&R.key===" "||(d_.includes(R.key)&&O(),R.key===" "&&R.preventDefault())})})})})},"SelectItem")),ul="SelectItemText",M_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,className:i,style:l,...u}=e,d=Wr(ul,s),h=$o(ul,s),m=Mg(ul,s),y=m_(ul,s),[v,x]=f.useState(null),b=Gt(O=>h.itemTextRefCallback?.(O,m.value,m.disabled)),S=Ve(o,x,m.onItemTextChange,b),C=v?.textContent,k=f.useMemo(()=>E.jsx("option",{value:m.value,disabled:m.disabled,children:C},m.value),[m.disabled,m.value,C]),{onNativeOptionAdd:N,onNativeOptionRemove:D}=y;return dt(()=>(N(k),()=>D(k)),[N,D,k]),E.jsxs(E.Fragment,{children:[E.jsx(Ae.span,{id:m.textId,...u,ref:S}),m.isSelected&&d.valueNode&&!d.valueNodeHasChildren&&!hi(d.value)?ti.createPortal(u.children,d.valueNode):null]})},"SelectItemText")),j_="SelectItemIndicator",L_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,...i}=e;return Mg(j_,s).isSelected?E.jsx(Ae.span,{"aria-hidden":!0,...i,ref:o}):null},"SelectItemIndicator")),jg="SelectScrollUpButton",F_=f.forwardRef(qe(function(e,o){const s=$o(jg,e.__scopeSelect),i=ud(jg,e.__scopeSelect),[l,u]=f.useState(!1),d=Ve(o,i.onScrollButtonChange);return dt(()=>{if(s.viewport&&s.isPositioned){let h=function(){const y=m.scrollTop>0;u(y)};qe(h,"handleScroll");const m=s.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[s.viewport,s.isPositioned]),l?E.jsx(Fg,{...e,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=s;h&&m&&(h.scrollTop=h.scrollTop-m.offsetHeight)}}):null},"SelectScrollUpButton")),Lg="SelectScrollDownButton",z_=f.forwardRef(qe(function(e,o){const s=$o(Lg,e.__scopeSelect),i=ud(Lg,e.__scopeSelect),[l,u]=f.useState(!1),d=Ve(o,i.onScrollButtonChange);return dt(()=>{if(s.viewport&&s.isPositioned){let h=function(){const y=m.scrollHeight-m.clientHeight,v=Math.ceil(m.scrollTop)<y;u(v)};qe(h,"handleScroll");const m=s.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[s.viewport,s.isPositioned]),l?E.jsx(Fg,{...e,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=s;h&&m&&(h.scrollTop=h.scrollTop+m.offsetHeight)}}):null},"SelectScrollDownButton")),Fg=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,onAutoScroll:i,...l}=e,u=$o("SelectScrollButton",s),d=f.useRef(null),h=cl(s),m=f.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return f.useEffect(()=>()=>m(),[m]),dt(()=>{h().find(v=>v.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[h]),E.jsx(Ae.div,{"aria-hidden":!0,...l,ref:o,style:{flexShrink:0,...l.style},onPointerDown:pe(l.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:pe(l.onPointerMove,()=>{u.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:pe(l.onPointerLeave,()=>{m()})})},"SelectScrollButtonImpl")),V_="SelectBubbleInput",U_=f.forwardRef(qe(function({__scopeSelect:e,...o},s){const i=Wr(V_,e),{value:l,onValueChange:u,required:d,disabled:h,name:m,autoComplete:y,form:v}=i,{nativeOptions:x,nativeSelectKey:b}=i,S=f.useRef(null),C=Ve(s,S),k=l??"",N=Rg(k),D=Array.from(x).some(O=>(O.props.value??"")==="");return f.useEffect(()=>{const O=S.current;if(!O)return;const R=window.HTMLSelectElement.prototype,j=Object.getOwnPropertyDescriptor(R,"value").set;if(N!==k&&j){const B=new Event("change",{bubbles:!0});j.call(O,k),O.dispatchEvent(B)}},[N,k]),E.jsxs(Ae.select,{"aria-hidden":!0,required:d,tabIndex:-1,name:m,autoComplete:y,disabled:h,form:v,onChange:O=>u(O.target.value),...o,style:{..._h,...o.style},ref:C,defaultValue:k,children:[hi(l)&&!D?E.jsx("option",{value:""}):null,Array.from(x)]},b)},"SelectBubbleInput"));function zg(n){return typeof n=="function"}qe(zg,"isFunction");function hi(n){return n===""||n===void 0}qe(hi,"shouldShowPlaceholder");function fd(n){const e=Gt(n),o=f.useRef(""),s=f.useRef(0),i=f.useCallback(u=>{const d=o.current+u;e(d),qe((function h(m){o.current=m,window.clearTimeout(s.current),m!==""&&(s.current=window.setTimeout(()=>h(""),1e3))}),"updateSearch")(d)},[e]),l=f.useCallback(()=>{o.current="",window.clearTimeout(s.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(s.current),[]),[o,i,l]}qe(fd,"useTypeaheadSearch");function pd(n,e,o){const i=e.length>1&&Array.from(e).every(m=>m===e[0])?e[0]:e,l=o?n.indexOf(o):-1;let u=Vg(n,Math.max(l,0));i.length===1&&(u=u.filter(m=>m!==o));const h=u.find(m=>m.textValue.toLowerCase().startsWith(i.toLowerCase()));return h!==o?h:void 0}qe(pd,"findNextItem");function Vg(n,e){return n.map((o,s)=>n[(e+s)%n.length])}qe(Vg,"wrapArray");var B_=Object.defineProperty,ws=(n,e)=>B_(n,"name",{value:e,configurable:!0}),hd="Tabs",[H_,f2]=tn(hd,[ol]),Ug=ol(),[W_,md]=H_(hd),K_=f.forwardRef(ws(function(e,o){const{__scopeTabs:s,value:i,onValueChange:l,defaultValue:u,orientation:d="horizontal",dir:h,activationMode:m="automatic",...y}=e,v=ri(h),[x,b]=Un({prop:i,onChange:l,defaultProp:u??"",caller:hd});return E.jsx(W_,{scope:s,baseId:yt(),value:x,onValueChange:b,orientation:d,dir:v,activationMode:m,children:E.jsx(Ae.div,{dir:v,"data-orientation":d,...y,ref:o})})},"Tabs")),G_="TabsList",Z_=f.forwardRef(ws(function(e,o){const{__scopeTabs:s,loop:i=!0,...l}=e,u=md(G_,s),d=Ug(s);return E.jsx(ig,{asChild:!0,...d,orientation:u.orientation,dir:u.dir,loop:i,children:E.jsx(Ae.div,{role:"tablist","aria-orientation":u.orientation,...l,ref:o})})},"TabsList")),q_="TabsTrigger",Y_=f.forwardRef(ws(function(e,o){const{__scopeTabs:s,value:i,disabled:l=!1,...u}=e,d=md(q_,s),h=Ug(s),m=gd(d.baseId,i),y=vd(d.baseId,i),v=i===d.value;return E.jsx(ag,{asChild:!0,...h,focusable:!l,active:v,children:E.jsx(Ae.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":y,"data-state":v?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:m,...u,ref:o,onMouseDown:pe(e.onMouseDown,x=>{!l&&x.button===0&&x.ctrlKey===!1?d.onValueChange(i):x.preventDefault()}),onKeyDown:pe(e.onKeyDown,x=>{l||x.target!==x.currentTarget||[" ","Enter"].includes(x.key)&&d.onValueChange(i)}),onFocus:pe(e.onFocus,()=>{const x=d.activationMode!=="manual";!v&&!l&&x&&d.onValueChange(i)})})})},"TabsTrigger")),Q_="TabsContent",X_=f.forwardRef(ws(function(e,o){const{__scopeTabs:s,value:i,forceMount:l,children:u,...d}=e,h=md(Q_,s),m=gd(h.baseId,i),y=vd(h.baseId,i),v=i===h.value,x=f.useRef(v);return f.useEffect(()=>{const b=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(b)},[]),E.jsx(nn,{present:l||v,children:({present:b})=>E.jsx(Ae.div,{"data-state":v?"active":"inactive","data-orientation":h.orientation,role:"tabpanel","aria-labelledby":m,hidden:!b,id:y,tabIndex:0,...d,ref:o,style:{...e.style,animationDuration:x.current?"0s":void 0},children:b&&u})})},"TabsContent"));function gd(n,e){return`${n}-trigger-${e}`}ws(gd,"makeTriggerId");function vd(n,e){return`${n}-content-${e}`}ws(vd,"makeContentId");var J_=K_,eP=Z_,tP=Y_,nP=X_,rP=Object.defineProperty,St=(n,e)=>rP(n,"name",{value:e,configurable:!0}),[yd,p2]=tn("Tooltip",[Ur]),dl=Ur(),oP="TooltipProvider",sP=700,xd="tooltip.open",[iP,wd]=yd(oP),aP=St(n=>{const{__scopeTooltip:e,delayDuration:o=sP,skipDelayDuration:s=300,disableHoverableContent:i=!1,children:l}=n,u=f.useRef(!0),d=f.useRef(!1),h=f.useRef(0);return f.useEffect(()=>{const m=h.current;return()=>window.clearTimeout(m)},[]),E.jsx(iP,{scope:e,isOpenDelayedRef:u,delayDuration:o,onOpen:f.useCallback(()=>{s<=0||(window.clearTimeout(h.current),u.current=!1)},[s]),onClose:f.useCallback(()=>{s<=0||(window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,s))},[s]),isPointerInTransitRef:d,onPointerInTransitChange:f.useCallback(m=>{d.current=m},[]),disableHoverableContent:i,children:l})},"TooltipProvider"),bd="Tooltip",[lP,mi]=yd(bd),cP=St(n=>{const{__scopeTooltip:e,children:o,open:s,defaultOpen:i,onOpenChange:l,disableHoverableContent:u,delayDuration:d}=n,h=wd(bd,n.__scopeTooltip),m=dl(e),[y,v]=f.useState(null),[x,b]=f.useState(void 0),S=yt(),C=f.useRef(0),k=u??h.disableHoverableContent,N=d??h.delayDuration,D=f.useRef(!1),[O,R]=Un({prop:s,defaultProp:i??!1,onChange:St(ae=>{ae?(h.onOpen(),document.dispatchEvent(new CustomEvent(xd))):h.onClose(),l?.(ae)},"onChange"),caller:bd}),L=f.useMemo(()=>O?D.current?"delayed-open":"instant-open":"closed",[O]),j=f.useCallback(()=>{window.clearTimeout(C.current),C.current=0,D.current=!1,R(!0)},[R]),B=f.useCallback(()=>{window.clearTimeout(C.current),C.current=0,R(!1)},[R]),I=f.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>{D.current=!0,R(!0),C.current=0},N)},[N,R]);f.useEffect(()=>()=>{C.current&&(window.clearTimeout(C.current),C.current=0)},[]);const K=x??S;return E.jsx(ui,{...m,children:E.jsx(lP,{scope:e,contentId:K,setContentId:b,open:O,stateAttribute:L,trigger:y,onTriggerChange:v,onTriggerEnter:f.useCallback(()=>{h.isOpenDelayedRef.current?I():j()},[h.isOpenDelayedRef,I,j]),onTriggerLeave:f.useCallback(()=>{k?B():(window.clearTimeout(C.current),C.current=0)},[B,k]),onOpen:j,onClose:B,disableHoverableContent:k,children:o})})},"Tooltip"),Bg="TooltipTrigger",uP=f.forwardRef(St(function(e,o){const{__scopeTooltip:s,...i}=e,l=mi(Bg,s),u=wd(Bg,s),d=dl(s),h=f.useRef(null),m=Ve(o,h,l.onTriggerChange),y=f.useRef(!1),v=f.useRef(!1),x=f.useCallback(()=>y.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),E.jsx(tl,{asChild:!0,...d,children:E.jsx(Ae.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...i,ref:m,onPointerMove:pe(e.onPointerMove,b=>{b.pointerType!=="touch"&&!v.current&&!u.isPointerInTransitRef.current&&(l.onTriggerEnter(),v.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{l.onTriggerLeave(),v.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{l.open&&l.onClose(),y.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:pe(e.onFocus,()=>{y.current||l.onOpen()}),onBlur:pe(e.onBlur,l.onClose),onClick:pe(e.onClick,l.onClose)})})},"TooltipTrigger")),Hg="TooltipPortal",[dP,fP]=yd(Hg,{forceMount:void 0}),pP=St(n=>{const{__scopeTooltip:e,forceMount:o,children:s,container:i}=n,l=mi(Hg,e);return E.jsx(dP,{scope:e,forceMount:o,children:E.jsx(nn,{present:o||l.open,children:E.jsx(si,{asChild:!0,container:i,children:s})})})},"TooltipPortal"),gi="TooltipContent",hP=f.forwardRef(St(function(e,o){const s=fP(gi,e.__scopeTooltip),{forceMount:i=s.forceMount,side:l="top",...u}=e,d=mi(gi,e.__scopeTooltip);return E.jsx(nn,{present:i||d.open,children:d.disableHoverableContent?E.jsx(Wg,{side:l,...u,ref:o}):E.jsx(mP,{side:l,...u,ref:o})})},"TooltipContent")),mP=f.forwardRef(St(function(e,o){const s=mi(gi,e.__scopeTooltip),i=wd(gi,e.__scopeTooltip),l=f.useRef(null),u=Ve(o,l),[d,h]=f.useState(null),{trigger:m,onClose:y}=s,v=l.current,{onPointerInTransitChange:x}=i,b=f.useCallback(()=>{h(null),x(!1)},[x]),S=f.useCallback((C,k)=>{const N=C.currentTarget,D={x:C.clientX,y:C.clientY},O=Kg(D,N.getBoundingClientRect()),R=Gg(D,O),L=Zg(k.getBoundingClientRect()),j=Yg([...R,...L]);h(j),x(!0)},[x]);return f.useEffect(()=>()=>b(),[b]),f.useEffect(()=>{if(m&&v){const C=St(N=>S(N,v),"handleTriggerLeave"),k=St(N=>S(N,m),"handleContentLeave");return m.addEventListener("pointerleave",C),v.addEventListener("pointerleave",k),()=>{m.removeEventListener("pointerleave",C),v.removeEventListener("pointerleave",k)}}},[m,v,S,b]),f.useEffect(()=>{if(d){const C=St(k=>{const N=k.target,D={x:k.clientX,y:k.clientY},O=m?.contains(N)||v?.contains(N),R=!qg(D,d);O?b():R&&(b(),y())},"handleTrackPointerGrace");return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[m,v,d,y,b]),E.jsx(Wg,{...e,ref:u})},"TooltipContentHoverable")),gP=bh("TooltipContent"),Wg=f.forwardRef(St(function(e,o){const{__scopeTooltip:s,children:i,"aria-label":l,id:u,onEscapeKeyDown:d,onPointerDownOutside:h,...m}=e,y=mi(gi,s),v=dl(s),{onClose:x}=y;f.useEffect(()=>(document.addEventListener(xd,x),()=>document.removeEventListener(xd,x)),[x]),f.useEffect(()=>{if(y.trigger){const S=St(C=>{C.target instanceof Node&&C.target.contains(y.trigger)&&x()},"handleScroll");return window.addEventListener("scroll",S,{capture:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})}},[y.trigger,x]);const{setContentId:b}=y;return dt(()=>(b(u),()=>{b(void 0)}),[u,b]),E.jsx(oi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:S=>S.preventDefault(),onDismiss:x,children:E.jsxs(nl,{"data-state":y.stateAttribute,role:l?void 0:"tooltip",id:l?void 0:y.contentId,...v,...m,ref:o,style:{...m.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:[E.jsx(gP,{children:i}),l?E.jsx(Bb,{id:y.contentId,role:"tooltip",children:l}):null]})})},"TooltipContentImpl")),vP=f.forwardRef(St(function(e,o){const{__scopeTooltip:s,...i}=e,l=dl(s);return E.jsx(ak,{...l,...i,ref:o})},"TooltipArrow"));function Kg(n,e){const o=Math.abs(e.top-n.y),s=Math.abs(e.bottom-n.y),i=Math.abs(e.right-n.x),l=Math.abs(e.left-n.x);switch(Math.min(o,s,i,l)){case l:return"left";case i:return"right";case o:return"top";case s:return"bottom";default:throw new Error("unreachable")}}St(Kg,"getExitSideFromRect");function Gg(n,e,o=5){const s=[];switch(e){case"top":s.push({x:n.x-o,y:n.y+o},{x:n.x+o,y:n.y+o});break;case"bottom":s.push({x:n.x-o,y:n.y-o},{x:n.x+o,y:n.y-o});break;case"left":s.push({x:n.x+o,y:n.y-o},{x:n.x+o,y:n.y+o});break;case"right":s.push({x:n.x-o,y:n.y-o},{x:n.x-o,y:n.y+o});break}return s}St(Gg,"getPaddedExitPoints");function Zg(n){const{top:e,right:o,bottom:s,left:i}=n;return[{x:i,y:e},{x:o,y:e},{x:o,y:s},{x:i,y:s}]}St(Zg,"getPointsFromRect");function qg(n,e){const{x:o,y:s}=n;let i=!1;for(let l=0,u=e.length-1;l<e.length;u=l++){const d=e[l],h=e[u],m=d.x,y=d.y,v=h.x,x=h.y;y>s!=x>s&&o<(v-m)*(s-y)/(x-y)+m&&(i=!i)}return i}St(qg,"isPointInPolygon");function Yg(n){const e=n.slice();return e.sort((o,s)=>o.x<s.x?-1:o.x>s.x?1:o.y<s.y?-1:o.y>s.y?1:0),Qg(e)}St(Yg,"getHull");function Qg(n){if(n.length<=1)return n.slice();const e=[];for(let s=0;s<n.length;s++){const i=n[s];for(;e.length>=2;){const l=e[e.length-1],u=e[e.length-2];if((l.x-u.x)*(i.y-u.y)>=(l.y-u.y)*(i.x-u.x))e.pop();else break}e.push(i)}e.pop();const o=[];for(let s=n.length-1;s>=0;s--){const i=n[s];for(;o.length>=2;){const l=o[o.length-1],u=o[o.length-2];if((l.x-u.x)*(i.y-u.y)>=(l.y-u.y)*(i.x-u.x))o.pop();else break}o.push(i)}return o.pop(),e.length===1&&o.length===1&&e[0].x===o[0].x&&e[0].y===o[0].y?e:e.concat(o)}St(Qg,"getHullPresorted");var yP=aP,xP=cP,wP=uP,bP=pP,SP=hP,CP=vP;const Xg=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Jg=Bp,fl=(n,e)=>o=>{var s;if(e?.variants==null)return Jg(n,o?.class,o?.className);const{variants:i,defaultVariants:l}=e,u=Object.keys(i).map(m=>{const y=o?.[m],v=l?.[m];if(y===null)return null;const x=Xg(y)||Xg(v);return i[m][x]}),d=o&&Object.entries(o).reduce((m,y)=>{let[v,x]=y;return x===void 0||(m[v]=x),m},{}),h=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((m,y)=>{let{class:v,className:x,...b}=y;return Object.entries(b).every(S=>{let[C,k]=S;return Array.isArray(k)?k.includes({...l,...d}[C]):{...l,...d}[C]===k})?[...m,v,x]:m},[]);return Jg(n,u,h,o?.class,o?.className)};var ev=1,kP=.9,EP=.8,_P=.17,Sd=.1,Cd=.999,PP=.9999,RP=.99,IP=/[\\\/_+.#"@\[\(\{&]/,TP=/[\\\/_+.#"@\[\(\{&]/g,DP=/[\s-]/,tv=/[\s-]/g;function kd(n,e,o,s,i,l,u){if(l===e.length)return i===n.length?ev:RP;var d=`${i},${l}`;if(u[d]!==void 0)return u[d];for(var h=s.charAt(l),m=o.indexOf(h,i),y=0,v,x,b,S;m>=0;)v=kd(n,e,o,s,m+1,l+1,u),v>y&&(m===i?v*=ev:IP.test(n.charAt(m-1))?(v*=EP,b=n.slice(i,m-1).match(TP),b&&i>0&&(v*=Math.pow(Cd,b.length))):DP.test(n.charAt(m-1))?(v*=kP,S=n.slice(i,m-1).match(tv),S&&i>0&&(v*=Math.pow(Cd,S.length))):(v*=_P,i>0&&(v*=Math.pow(Cd,m-i))),n.charAt(m)!==e.charAt(l)&&(v*=PP)),(v<Sd&&o.charAt(m-1)===s.charAt(l+1)||s.charAt(l+1)===s.charAt(l)&&o.charAt(m-1)!==s.charAt(l))&&(x=kd(n,e,o,s,m+1,l+2,u),x*Sd>v&&(v=x*Sd)),v>y&&(y=v),m=o.indexOf(h,m+1);return u[d]=y,y}function nv(n){return n.toLowerCase().replace(tv," ")}function NP(n,e,o){return n=o&&o.length>0?`${n+" "+o.join(" ")}`:n,kd(n,e,nv(n),nv(e),0,0,{})}var vi='[cmdk-group=""]',Ed='[cmdk-group-items=""]',OP='[cmdk-group-heading=""]',rv='[cmdk-item=""]',ov=`${rv}:not([aria-disabled="true"])`,_d="cmdk-item-select",bs="data-value",AP=(n,e,o)=>NP(n,e,o),sv=f.createContext(void 0),yi=()=>f.useContext(sv),iv=f.createContext(void 0),Pd=()=>f.useContext(iv),av=f.createContext(void 0),lv=f.forwardRef((n,e)=>{let o=Ss(()=>{var P,W;return{search:"",value:(W=(P=n.value)!=null?P:n.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),s=Ss(()=>new Set),i=Ss(()=>new Map),l=Ss(()=>new Map),u=Ss(()=>new Set),d=cv(n),{label:h,children:m,value:y,onValueChange:v,filter:x,shouldFilter:b,loop:S,disablePointerSelection:C=!1,vimBindings:k=!0,...N}=n,D=yt(),O=yt(),R=yt(),L=f.useRef(null),j=WP();Mo(()=>{if(y!==void 0){let P=y.trim();o.current.value=P,B.emit()}},[y]),Mo(()=>{j(6,ce)},[]);let B=f.useMemo(()=>({subscribe:P=>(u.current.add(P),()=>u.current.delete(P)),snapshot:()=>o.current,setState:(P,W,Z)=>{var H,re,de,Y;if(!Object.is(o.current[P],W)){if(o.current[P]=W,P==="search")le(),ae(),j(1,be);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let se=document.getElementById(R);se?se.focus():(H=document.getElementById(D))==null||H.focus()}if(j(7,()=>{var se;o.current.selectedItemId=(se=ue())==null?void 0:se.id,B.emit()}),Z||j(5,ce),((re=d.current)==null?void 0:re.value)!==void 0){let se=W??"";(Y=(de=d.current).onValueChange)==null||Y.call(de,se);return}}B.emit()}},emit:()=>{u.current.forEach(P=>P())}}),[]),I=f.useMemo(()=>({value:(P,W,Z)=>{var H;W!==((H=l.current.get(P))==null?void 0:H.value)&&(l.current.set(P,{value:W,keywords:Z}),o.current.filtered.items.set(P,K(W,Z)),j(2,()=>{ae(),B.emit()}))},item:(P,W)=>(s.current.add(P),W&&(i.current.has(W)?i.current.get(W).add(P):i.current.set(W,new Set([P]))),j(3,()=>{le(),ae(),o.current.value||be(),B.emit()}),()=>{l.current.delete(P),s.current.delete(P),o.current.filtered.items.delete(P);let Z=ue();j(4,()=>{le(),Z?.getAttribute("id")===P&&be(),B.emit()})}),group:P=>(i.current.has(P)||i.current.set(P,new Set),()=>{l.current.delete(P),i.current.delete(P)}),filter:()=>d.current.shouldFilter,label:h||n["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:D,inputId:R,labelId:O,listInnerRef:L}),[]);function K(P,W){var Z,H;let re=(H=(Z=d.current)==null?void 0:Z.filter)!=null?H:AP;return P?re(P,o.current.search,W):0}function ae(){if(!o.current.search||d.current.shouldFilter===!1)return;let P=o.current.filtered.items,W=[];o.current.filtered.groups.forEach(H=>{let re=i.current.get(H),de=0;re.forEach(Y=>{let se=P.get(Y);de=Math.max(se,de)}),W.push([H,de])});let Z=L.current;Se().sort((H,re)=>{var de,Y;let se=H.getAttribute("id"),Oe=re.getAttribute("id");return((de=P.get(Oe))!=null?de:0)-((Y=P.get(se))!=null?Y:0)}).forEach(H=>{let re=H.closest(Ed);re?re.appendChild(H.parentElement===re?H:H.closest(`${Ed} > *`)):Z.appendChild(H.parentElement===Z?H:H.closest(`${Ed} > *`))}),W.sort((H,re)=>re[1]-H[1]).forEach(H=>{var re;let de=(re=L.current)==null?void 0:re.querySelector(`${vi}[${bs}="${encodeURIComponent(H[0])}"]`);de?.parentElement.appendChild(de)})}function be(){let P=Se().find(Z=>Z.getAttribute("aria-disabled")!=="true"),W=P?.getAttribute(bs);B.setState("value",W||void 0)}function le(){var P,W,Z,H;if(!o.current.search||d.current.shouldFilter===!1){o.current.filtered.count=s.current.size;return}o.current.filtered.groups=new Set;let re=0;for(let de of s.current){let Y=(W=(P=l.current.get(de))==null?void 0:P.value)!=null?W:"",se=(H=(Z=l.current.get(de))==null?void 0:Z.keywords)!=null?H:[],Oe=K(Y,se);o.current.filtered.items.set(de,Oe),Oe>0&&re++}for(let[de,Y]of i.current)for(let se of Y)if(o.current.filtered.items.get(se)>0){o.current.filtered.groups.add(de);break}o.current.filtered.count=re}function ce(){var P,W,Z;let H=ue();H&&(((P=H.parentElement)==null?void 0:P.firstChild)===H&&((Z=(W=H.closest(vi))==null?void 0:W.querySelector(OP))==null||Z.scrollIntoView({block:"nearest"})),H.scrollIntoView({block:"nearest"}))}function ue(){var P;return(P=L.current)==null?void 0:P.querySelector(`${rv}[aria-selected="true"]`)}function Se(){var P;return Array.from(((P=L.current)==null?void 0:P.querySelectorAll(ov))||[])}function q(P){let W=Se()[P];W&&B.setState("value",W.getAttribute(bs))}function ne(P){var W;let Z=ue(),H=Se(),re=H.findIndex(Y=>Y===Z),de=H[re+P];(W=d.current)!=null&&W.loop&&(de=re+P<0?H[H.length-1]:re+P===H.length?H[0]:H[re+P]),de&&B.setState("value",de.getAttribute(bs))}function U(P){let W=ue(),Z=W?.closest(vi),H;for(;Z&&!H;)Z=P>0?BP(Z,vi):HP(Z,vi),H=Z?.querySelector(ov);H?B.setState("value",H.getAttribute(bs)):ne(P)}let Q=()=>q(Se().length-1),M=P=>{P.preventDefault(),P.metaKey?Q():P.altKey?U(1):ne(1)},T=P=>{P.preventDefault(),P.metaKey?q(0):P.altKey?U(-1):ne(-1)};return f.createElement(Ae.div,{ref:e,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:P=>{var W;(W=N.onKeyDown)==null||W.call(N,P);let Z=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||Z))switch(P.key){case"n":case"j":{k&&P.ctrlKey&&M(P);break}case"ArrowDown":{M(P);break}case"p":case"k":{k&&P.ctrlKey&&T(P);break}case"ArrowUp":{T(P);break}case"Home":{P.preventDefault(),q(0);break}case"End":{P.preventDefault(),Q();break}case"Enter":{P.preventDefault();let H=ue();if(H){let re=new Event(_d);H.dispatchEvent(re)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:GP},h),hl(n,P=>f.createElement(iv.Provider,{value:B},f.createElement(sv.Provider,{value:I},P))))}),$P=f.forwardRef((n,e)=>{var o,s;let i=yt(),l=f.useRef(null),u=f.useContext(av),d=yi(),h=cv(n),m=(s=(o=h.current)==null?void 0:o.forceMount)!=null?s:u?.forceMount;Mo(()=>{if(!m)return d.item(i,u?.id)},[m]);let y=uv(i,l,[n.value,n.children,l],n.keywords),v=Pd(),x=Kr(j=>j.value&&j.value===y.current),b=Kr(j=>m||d.filter()===!1?!0:j.search?j.filtered.items.get(i)>0:!0);f.useEffect(()=>{let j=l.current;if(!(!j||n.disabled))return j.addEventListener(_d,S),()=>j.removeEventListener(_d,S)},[b,n.onSelect,n.disabled]);function S(){var j,B;C(),(B=(j=h.current).onSelect)==null||B.call(j,y.current)}function C(){v.setState("value",y.current,!0)}if(!b)return null;let{disabled:k,value:N,onSelect:D,forceMount:O,keywords:R,...L}=n;return f.createElement(Ae.div,{ref:Po(l,e),...L,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!x,"data-disabled":!!k,"data-selected":!!x,onPointerMove:k||d.getDisablePointerSelection()?void 0:C,onClick:k?void 0:S},n.children)}),MP=f.forwardRef((n,e)=>{let{heading:o,children:s,forceMount:i,...l}=n,u=yt(),d=f.useRef(null),h=f.useRef(null),m=yt(),y=yi(),v=Kr(b=>i||y.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);Mo(()=>y.group(u),[]),uv(u,d,[n.value,n.heading,h]);let x=f.useMemo(()=>({id:u,forceMount:i}),[i]);return f.createElement(Ae.div,{ref:Po(d,e),...l,"cmdk-group":"",role:"presentation",hidden:v?void 0:!0},o&&f.createElement("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:m},o),hl(n,b=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?m:void 0},f.createElement(av.Provider,{value:x},b))))}),jP=f.forwardRef((n,e)=>{let{alwaysRender:o,...s}=n,i=f.useRef(null),l=Kr(u=>!u.search);return!o&&!l?null:f.createElement(Ae.div,{ref:Po(i,e),...s,"cmdk-separator":"",role:"separator"})}),LP=f.forwardRef((n,e)=>{let{onValueChange:o,...s}=n,i=n.value!=null,l=Pd(),u=Kr(m=>m.search),d=Kr(m=>m.selectedItemId),h=yi();return f.useEffect(()=>{n.value!=null&&l.setState("search",n.value)},[n.value]),f.createElement(Ae.input,{ref:e,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":d,id:h.inputId,type:"text",value:i?n.value:u,onChange:m=>{i||l.setState("search",m.target.value),o?.(m.target.value)}})}),FP=f.forwardRef((n,e)=>{let{children:o,label:s="Suggestions",...i}=n,l=f.useRef(null),u=f.useRef(null),d=Kr(m=>m.selectedItemId),h=yi();return f.useEffect(()=>{if(u.current&&l.current){let m=u.current,y=l.current,v,x=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let b=m.offsetHeight;y.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(m),()=>{cancelAnimationFrame(v),x.unobserve(m)}}},[]),f.createElement(Ae.div,{ref:Po(l,e),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":s,id:h.listId},hl(n,m=>f.createElement("div",{ref:Po(u,h.listInnerRef),"cmdk-list-sizer":""},m)))}),zP=f.forwardRef((n,e)=>{let{open:o,onOpenChange:s,overlayClassName:i,contentClassName:l,container:u,...d}=n;return f.createElement(Tu,{open:o,onOpenChange:s},f.createElement(Du,{container:u},f.createElement(Ou,{"cmdk-overlay":"",className:i}),f.createElement(Au,{"aria-label":n.label,"cmdk-dialog":"",className:l},f.createElement(lv,{ref:e,...d}))))}),VP=f.forwardRef((n,e)=>Kr(o=>o.filtered.count===0)?f.createElement(Ae.div,{ref:e,...n,"cmdk-empty":"",role:"presentation"}):null),UP=f.forwardRef((n,e)=>{let{progress:o,children:s,label:i="Loading...",...l}=n;return f.createElement(Ae.div,{ref:e,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},hl(n,u=>f.createElement("div",{"aria-hidden":!0},u)))}),pl=Object.assign(lv,{List:FP,Item:$P,Input:LP,Group:MP,Separator:jP,Dialog:zP,Empty:VP,Loading:UP});function BP(n,e){let o=n.nextElementSibling;for(;o;){if(o.matches(e))return o;o=o.nextElementSibling}}function HP(n,e){let o=n.previousElementSibling;for(;o;){if(o.matches(e))return o;o=o.previousElementSibling}}function cv(n){let e=f.useRef(n);return Mo(()=>{e.current=n}),e}var Mo=typeof window>"u"?f.useEffect:f.useLayoutEffect;function Ss(n){let e=f.useRef();return e.current===void 0&&(e.current=n()),e}function Kr(n){let e=Pd(),o=()=>n(e.snapshot());return f.useSyncExternalStore(e.subscribe,o,o)}function uv(n,e,o,s=[]){let i=f.useRef(),l=yi();return Mo(()=>{var u;let d=(()=>{var m;for(let y of o){if(typeof y=="string")return y.trim();if(typeof y=="object"&&"current"in y)return y.current?(m=y.current.textContent)==null?void 0:m.trim():i.current}})(),h=s.map(m=>m.trim());l.value(n,d,h),(u=e.current)==null||u.setAttribute(bs,d),i.current=d}),i}var WP=()=>{let[n,e]=f.useState(),o=Ss(()=>new Map);return Mo(()=>{o.current.forEach(s=>s()),o.current=new Map},[n]),(s,i)=>{o.current.set(s,i),e({})}};function KP(n){let e=n.type;return typeof e=="function"?e(n.props):"render"in e?e.render(n.props):n}function hl({asChild:n,children:e},o){return n&&f.isValidElement(e)?f.cloneElement(KP(e),{ref:e.ref},o(e.props.children)):o(e)}var GP={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Ne=n=>typeof n=="string",xi=()=>{let n,e;const o=new Promise((s,i)=>{n=s,e=i});return o.resolve=n,o.reject=e,o},dv=n=>n==null?"":""+n,ZP=(n,e,o)=>{n.forEach(s=>{e[s]&&(o[s]=e[s])})},qP=/###/g,fv=n=>n&&n.indexOf("###")>-1?n.replace(qP,"."):n,pv=n=>!n||Ne(n),wi=(n,e,o)=>{const s=Ne(e)?e.split("."):e;let i=0;for(;i<s.length-1;){if(pv(n))return{};const l=fv(s[i]);!n[l]&&o&&(n[l]=new o),Object.prototype.hasOwnProperty.call(n,l)?n=n[l]:n={},++i}return pv(n)?{}:{obj:n,k:fv(s[i])}},hv=(n,e,o)=>{const{obj:s,k:i}=wi(n,e,Object);if(s!==void 0||e.length===1){s[i]=o;return}let l=e[e.length-1],u=e.slice(0,e.length-1),d=wi(n,u,Object);for(;d.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),d=wi(n,u,Object),d?.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=o},YP=(n,e,o,s)=>{const{obj:i,k:l}=wi(n,e,Object);i[l]=i[l]||[],i[l].push(o)},ml=(n,e)=>{const{obj:o,k:s}=wi(n,e);if(o&&Object.prototype.hasOwnProperty.call(o,s))return o[s]},QP=(n,e,o)=>{const s=ml(n,o);return s!==void 0?s:ml(e,o)},mv=(n,e,o)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?Ne(n[s])||n[s]instanceof String||Ne(e[s])||e[s]instanceof String?o&&(n[s]=e[s]):mv(n[s],e[s],o):n[s]=e[s]);return n},Cs=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var XP={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const JP=n=>Ne(n)?n.replace(/[&<>"'\/]/g,e=>XP[e]):n;class eR{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const o=this.regExpMap.get(e);if(o!==void 0)return o;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const tR=[" ",",","?","!",";"],nR=new eR(20),rR=(n,e,o)=>{e=e||"",o=o||"";const s=tR.filter(u=>e.indexOf(u)<0&&o.indexOf(u)<0);if(s.length===0)return!0;const i=nR.getRegExp(`(${s.map(u=>u==="?"?"\\?":u).join("|")})`);let l=!i.test(n);if(!l){const u=n.indexOf(o);u>0&&!i.test(n.substring(0,u))&&(l=!0)}return l},Rd=(n,e,o=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const s=e.split(o);let i=n;for(let l=0;l<s.length;){if(!i||typeof i!="object")return;let u,d="";for(let h=l;h<s.length;++h)if(h!==l&&(d+=o),d+=s[h],u=i[d],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&h<s.length-1)continue;l+=h-l+1;break}i=u}return i},bi=n=>n?.replace("_","-"),oR={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console?.[n]?.apply?.(console,e)}};class gl{constructor(e,o={}){this.init(e,o)}init(e,o={}){this.prefix=o.prefix||"i18next:",this.logger=e||oR,this.options=o,this.debug=o.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,o,s,i){return i&&!this.debug?null:(Ne(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[o](e))}create(e){return new gl(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new gl(this.logger,e)}}var Gn=new gl;class vl{constructor(){this.observers={}}on(e,o){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(o)||0;this.observers[s].set(o,i+1)}),this}off(e,o){if(this.observers[e]){if(!o){delete this.observers[e];return}this.observers[e].delete(o)}}emit(e,...o){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,l])=>{for(let u=0;u<l;u++)i(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,l])=>{for(let u=0;u<l;u++)i.apply(i,[e,...o])})}}class gv extends vl{constructor(e,o={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const o=this.options.ns.indexOf(e);o>-1&&this.options.ns.splice(o,1)}getResource(e,o,s,i={}){const l=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,u=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;e.indexOf(".")>-1?d=e.split("."):(d=[e,o],s&&(Array.isArray(s)?d.push(...s):Ne(s)&&l?d.push(...s.split(l)):d.push(s)));const h=ml(this.data,d);return!h&&!o&&!s&&e.indexOf(".")>-1&&(e=d[0],o=d[1],s=d.slice(2).join(".")),h||!u||!Ne(s)?h:Rd(this.data?.[e]?.[o],s,l)}addResource(e,o,s,i,l={silent:!1}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=[e,o];s&&(d=d.concat(u?s.split(u):s)),e.indexOf(".")>-1&&(d=e.split("."),i=o,o=d[1]),this.addNamespaces(o),hv(this.data,d,i),l.silent||this.emit("added",e,o,s,i)}addResources(e,o,s,i={silent:!1}){for(const l in s)(Ne(s[l])||Array.isArray(s[l]))&&this.addResource(e,o,l,s[l],{silent:!0});i.silent||this.emit("added",e,o,s)}addResourceBundle(e,o,s,i,l,u={silent:!1,skipCopy:!1}){let d=[e,o];e.indexOf(".")>-1&&(d=e.split("."),i=s,s=o,o=d[1]),this.addNamespaces(o);let h=ml(this.data,d)||{};u.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?mv(h,s,l):h={...h,...s},hv(this.data,d,h),u.silent||this.emit("added",e,o,s)}removeResourceBundle(e,o){this.hasResourceBundle(e,o)&&delete this.data[e][o],this.removeNamespaces(o),this.emit("removed",e,o)}hasResourceBundle(e,o){return this.getResource(e,o)!==void 0}getResourceBundle(e,o){return o||(o=this.options.defaultNS),this.getResource(e,o)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const o=this.getDataByLanguage(e);return!!(o&&Object.keys(o)||[]).find(i=>o[i]&&Object.keys(o[i]).length>0)}toJSON(){return this.data}}var vv={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,o,s,i){return n.forEach(l=>{e=this.processors[l]?.process(e,o,s,i)??e}),e}};const yv=Symbol("i18next/PATH_KEY");function sR(){const n=[],e=Object.create(null);let o;return e.get=(s,i)=>(o?.revoke?.(),i===yv?n:(n.push(i),o=Proxy.revocable(s,e),o.proxy)),Proxy.revocable(Object.create(null),e).proxy}function Id(n,e){const{[yv]:o}=n(sR());return o.join(e?.keySeparator??".")}const xv={},Td=n=>!Ne(n)&&typeof n!="boolean"&&typeof n!="number";class yl extends vl{constructor(e,o={}){super(),ZP(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Gn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,o={interpolation:{}}){const s={...o};if(e==null)return!1;const i=this.resolve(e,s);if(i?.res===void 0)return!1;const l=Td(i.res);return!(s.returnObjects===!1&&l)}extractFromKey(e,o){let s=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=o.ns||this.options.defaultNS||[];const u=s&&e.indexOf(s)>-1,d=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!rR(e,s,i);if(u&&!d){const h=e.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:e,namespaces:Ne(l)?[l]:l};const m=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(m[0])>-1)&&(l=m.shift()),e=m.join(i)}return{key:e,namespaces:Ne(l)?[l]:l}}translate(e,o,s){let i=typeof o=="object"?{...o}:o;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=Id(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:d,namespaces:h}=this.extractFromKey(e[e.length-1],i),m=h[h.length-1];let y=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const v=i.lng||this.language,x=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v?.toLowerCase()==="cimode")return x?l?{res:`${m}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:m,usedParams:this.getUsedParamsDetails(i)}:`${m}${y}${d}`:l?{res:d,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:m,usedParams:this.getUsedParamsDetails(i)}:d;const b=this.resolve(e,i);let S=b?.res;const C=b?.usedKey||d,k=b?.exactUsedKey||d,N=["[object Number]","[object Function]","[object RegExp]"],D=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,R=i.count!==void 0&&!Ne(i.count),L=yl.hasDefaultValue(i),j=R?this.pluralResolver.getSuffix(v,i.count,i):"",B=i.ordinal&&R?this.pluralResolver.getSuffix(v,i.count,{ordinal:!1}):"",I=R&&!i.ordinal&&i.count===0,K=I&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${j}`]||i[`defaultValue${B}`]||i.defaultValue;let ae=S;O&&!S&&L&&(ae=K);const be=Td(ae),le=Object.prototype.toString.apply(ae);if(O&&ae&&be&&N.indexOf(le)<0&&!(Ne(D)&&Array.isArray(ae))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ce=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,ae,{...i,ns:h}):`key '${d} (${this.language})' returned an object instead of string.`;return l?(b.res=ce,b.usedParams=this.getUsedParamsDetails(i),b):ce}if(u){const ce=Array.isArray(ae),ue=ce?[]:{},Se=ce?k:C;for(const q in ae)if(Object.prototype.hasOwnProperty.call(ae,q)){const ne=`${Se}${u}${q}`;L&&!S?ue[q]=this.translate(ne,{...i,defaultValue:Td(K)?K[q]:void 0,joinArrays:!1,ns:h}):ue[q]=this.translate(ne,{...i,joinArrays:!1,ns:h}),ue[q]===ne&&(ue[q]=ae[q])}S=ue}}else if(O&&Ne(D)&&Array.isArray(S))S=S.join(D),S&&(S=this.extendTranslation(S,e,i,s));else{let ce=!1,ue=!1;!this.isValidLookup(S)&&L&&(ce=!0,S=K),this.isValidLookup(S)||(ue=!0,S=d);const q=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ue?void 0:S,ne=L&&K!==S&&this.options.updateMissing;if(ue||ce||ne){if(this.logger.log(ne?"updateKey":"missingKey",v,m,d,ne?K:S),u){const T=this.resolve(d,{...i,keySeparator:!1});T&&T.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 Q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Q&&Q[0])for(let T=0;T<Q.length;T++)U.push(Q[T]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(i.lng||this.language):U.push(i.lng||this.language);const M=(T,P,W)=>{const Z=L&&W!==S?W:q;this.options.missingKeyHandler?this.options.missingKeyHandler(T,m,P,Z,ne,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(T,m,P,Z,ne,i),this.emit("missingKey",T,m,P,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?U.forEach(T=>{const P=this.pluralResolver.getSuffixes(T,i);I&&i[`defaultValue${this.options.pluralSeparator}zero`]&&P.indexOf(`${this.options.pluralSeparator}zero`)<0&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(W=>{M([T],d+W,i[`defaultValue${W}`]||K)})}):M(U,d,K))}S=this.extendTranslation(S,e,i,b,s),ue&&S===d&&this.options.appendNamespaceToMissingKey&&(S=`${m}${y}${d}`),(ue||ce)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${y}${d}`:d,ce?S:void 0,i))}return l?(b.res=S,b.usedParams=this.getUsedParamsDetails(i),b):S}extendTranslation(e,o,s,i,l){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const h=Ne(e)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(h){const v=e.match(this.interpolator.nestingRegexp);m=v&&v.length}let y=s.replace&&!Ne(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),e=this.interpolator.interpolate(e,y,s.lng||this.language||i.usedLng,s),h){const v=e.match(this.interpolator.nestingRegexp),x=v&&v.length;m<x&&(s.nest=!1)}!s.lng&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,(...v)=>l?.[0]===v[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${o[0]}`),null):this.translate(...v,o),s)),s.interpolation&&this.interpolator.reset()}const u=s.postProcess||this.options.postProcess,d=Ne(u)?[u]:u;return e!=null&&d?.length&&s.applyPostProcessor!==!1&&(e=vv.handle(d,e,o,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,o={}){let s,i,l,u,d;return Ne(e)&&(e=[e]),e.forEach(h=>{if(this.isValidLookup(s))return;const m=this.extractFromKey(h,o),y=m.key;i=y;let v=m.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const x=o.count!==void 0&&!Ne(o.count),b=x&&!o.ordinal&&o.count===0,S=o.context!==void 0&&(Ne(o.context)||typeof o.context=="number")&&o.context!=="",C=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);v.forEach(k=>{this.isValidLookup(s)||(d=k,!xv[`${C[0]}-${k}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(xv[`${C[0]}-${k}`]=!0,this.logger.warn(`key "${i}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" 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!!!")),C.forEach(N=>{if(this.isValidLookup(s))return;u=N;const D=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(D,y,N,k,o);else{let R;x&&(R=this.pluralResolver.getSuffix(N,o.count,o));const L=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(o.ordinal&&R.indexOf(j)===0&&D.push(y+R.replace(j,this.options.pluralSeparator)),D.push(y+R),b&&D.push(y+L)),S){const B=`${y}${this.options.contextSeparator||"_"}${o.context}`;D.push(B),x&&(o.ordinal&&R.indexOf(j)===0&&D.push(B+R.replace(j,this.options.pluralSeparator)),D.push(B+R),b&&D.push(B+L))}}let O;for(;O=D.pop();)this.isValidLookup(s)||(l=O,s=this.getResource(N,k,O,o))}))})}),{res:s,usedKey:i,exactUsedKey:l,usedLng:u,usedNS:d}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,o,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,o,s,i):this.resourceStore.getResource(e,o,s,i)}getUsedParamsDetails(e={}){const o=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!Ne(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const l of o)delete i[l]}return i}static hasDefaultValue(e){const o="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&o===s.substring(0,o.length)&&e[s]!==void 0)return!0;return!1}}class wv{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gn.create("languageUtils")}getScriptPartFromCode(e){if(e=bi(e),!e||e.indexOf("-")<0)return null;const o=e.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(e){if(e=bi(e),!e||e.indexOf("-")<0)return e;const o=e.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(e){if(Ne(e)&&e.indexOf("-")>-1){let o;try{o=Intl.getCanonicalLocales(e)[0]}catch{}return o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let o;return e.forEach(s=>{if(o)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(o=i)}),!o&&this.options.supportedLngs&&e.forEach(s=>{if(o)return;const i=this.getScriptPartFromCode(s);if(this.isSupportedCode(i))return o=i;const l=this.getLanguagePartFromCode(s);if(this.isSupportedCode(l))return o=l;o=this.options.supportedLngs.find(u=>{if(u===l)return u;if(!(u.indexOf("-")<0&&l.indexOf("-")<0)&&(u.indexOf("-")>0&&l.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===l||u.indexOf(l)===0&&l.length>1))return u})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(e,o){if(!e)return[];if(typeof e=="function"&&(e=e(o)),Ne(e)&&(e=[e]),Array.isArray(e))return e;if(!o)return e.default||[];let s=e[o];return s||(s=e[this.getScriptPartFromCode(o)]),s||(s=e[this.formatLanguageCode(o)]),s||(s=e[this.getLanguagePartFromCode(o)]),s||(s=e.default),s||[]}toResolveHierarchy(e,o){const s=this.getFallbackCodes((o===!1?[]:o)||this.options.fallbackLng||[],e),i=[],l=u=>{u&&(this.isSupportedCode(u)?i.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return Ne(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(e))):Ne(e)&&l(this.formatLanguageCode(e)),s.forEach(u=>{i.indexOf(u)<0&&l(this.formatLanguageCode(u))}),i}}const bv={zero:0,one:1,two:2,few:3,many:4,other:5},Sv={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class iR{constructor(e,o={}){this.languageUtils=e,this.options=o,this.logger=Gn.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,o){this.rules[e]=o}clearCache(){this.pluralRulesCache={}}getRule(e,o={}){const s=bi(e==="dev"?"en":e),i=o.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:s,type:i});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let u;try{u=new Intl.PluralRules(s,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Sv;if(!e.match(/-|_/))return Sv;const h=this.languageUtils.getLanguagePartFromCode(e);u=this.getRule(h,o)}return this.pluralRulesCache[l]=u,u}needsPlural(e,o={}){let s=this.getRule(e,o);return s||(s=this.getRule("dev",o)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,o,s={}){return this.getSuffixes(e,s).map(i=>`${o}${i}`)}getSuffixes(e,o={}){let s=this.getRule(e,o);return s||(s=this.getRule("dev",o)),s?s.resolvedOptions().pluralCategories.sort((i,l)=>bv[i]-bv[l]).map(i=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,o,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(o)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",o,s))}}const Cv=(n,e,o,s=".",i=!0)=>{let l=QP(n,e,o);return!l&&i&&Ne(o)&&(l=Rd(n,o,s),l===void 0&&(l=Rd(e,o,s))),l},Dd=n=>n.replace(/\$/g,"$$$$");class aR{constructor(e={}){this.logger=Gn.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(o=>o),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:o,escapeValue:s,useRawValueToEscape:i,prefix:l,prefixEscaped:u,suffix:d,suffixEscaped:h,formatSeparator:m,unescapeSuffix:y,unescapePrefix:v,nestingPrefix:x,nestingPrefixEscaped:b,nestingSuffix:S,nestingSuffixEscaped:C,nestingOptionsSeparator:k,maxReplaces:N,alwaysFormat:D}=e.interpolation;this.escape=o!==void 0?o:JP,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=l?Cs(l):u||"{{",this.suffix=d?Cs(d):h||"}}",this.formatSeparator=m||",",this.unescapePrefix=y?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=x?Cs(x):b||Cs("$t("),this.nestingSuffix=S?Cs(S):C||Cs(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=N||1e3,this.alwaysFormat=D!==void 0?D:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(o,s)=>o?.source===s?(o.lastIndex=0,o):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,o,s,i){let l,u,d;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=b=>{if(b.indexOf(this.formatSeparator)<0){const N=Cv(o,h,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,s,{...i,...o,interpolationkey:b}):N}const S=b.split(this.formatSeparator),C=S.shift().trim(),k=S.join(this.formatSeparator).trim();return this.format(Cv(o,h,C,this.options.keySeparator,this.options.ignoreJSONStructure),k,s,{...i,...o,interpolationkey:C})};this.resetRegExp();const y=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,v=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>Dd(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?Dd(this.escape(b)):Dd(b)}].forEach(b=>{for(d=0;l=b.regex.exec(e);){const S=l[1].trim();if(u=m(S),u===void 0)if(typeof y=="function"){const k=y(e,l,i);u=Ne(k)?k:""}else if(i&&Object.prototype.hasOwnProperty.call(i,S))u="";else if(v){u=l[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),u="";else!Ne(u)&&!this.useRawValueToEscape&&(u=dv(u));const C=b.safeValue(u);if(e=e.replace(l[0],C),v?(b.regex.lastIndex+=u.length,b.regex.lastIndex-=l[0].length):b.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),e}nest(e,o,s={}){let i,l,u;const d=(h,m)=>{const y=this.nestingOptionsSeparator;if(h.indexOf(y)<0)return h;const v=h.split(new RegExp(`${y}[ ]*{`));let x=`{${v[1]}`;h=v[0],x=this.interpolate(x,u);const b=x.match(/'/g),S=x.match(/"/g);((b?.length??0)%2===0&&!S||S.length%2!==0)&&(x=x.replace(/'/g,'"'));try{u=JSON.parse(x),m&&(u={...m,...u})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,C),`${h}${y}${x}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,h};for(;i=this.nestingRegexp.exec(e);){let h=[];u={...s},u=u.replace&&!Ne(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const m=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(m!==-1&&(h=i[1].slice(m).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),i[1]=i[1].slice(0,m)),l=o(d.call(this,i[1].trim(),u),u),l&&i[0]===e&&!Ne(l))return l;Ne(l)||(l=dv(l)),l||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),l=""),h.length&&(l=h.reduce((y,v)=>this.format(y,v,s.lng,{...s,interpolationkey:i[1].trim()}),l.trim())),e=e.replace(i[0],l),this.regexp.lastIndex=0}return e}}const lR=n=>{let e=n.toLowerCase().trim();const o={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);e==="currency"&&i.indexOf(":")<0?o.currency||(o.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?o.range||(o.range=i.trim()):i.split(";").forEach(u=>{if(u){const[d,...h]=u.split(":"),m=h.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();o[y]||(o[y]=m),m==="false"&&(o[y]=!1),m==="true"&&(o[y]=!0),isNaN(m)||(o[y]=parseInt(m,10))}})}return{formatName:e,formatOptions:o}},kv=n=>{const e={};return(o,s,i)=>{let l=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(l={...l,[i.interpolationkey]:void 0});const u=s+JSON.stringify(l);let d=e[u];return d||(d=n(bi(s),i),e[u]=d),d(o)}},cR=n=>(e,o,s)=>n(bi(o),s)(e);class uR{constructor(e={}){this.logger=Gn.create("formatter"),this.options=e,this.init(e)}init(e,o={interpolation:{}}){this.formatSeparator=o.interpolation.formatSeparator||",";const s=o.cacheInBuiltFormats?kv:cR;this.formats={number:s((i,l)=>{const u=new Intl.NumberFormat(i,{...l});return d=>u.format(d)}),currency:s((i,l)=>{const u=new Intl.NumberFormat(i,{...l,style:"currency"});return d=>u.format(d)}),datetime:s((i,l)=>{const u=new Intl.DateTimeFormat(i,{...l});return d=>u.format(d)}),relativetime:s((i,l)=>{const u=new Intl.RelativeTimeFormat(i,{...l});return d=>u.format(d,l.range||"day")}),list:s((i,l)=>{const u=new Intl.ListFormat(i,{...l});return d=>u.format(d)})}}add(e,o){this.formats[e.toLowerCase().trim()]=o}addCached(e,o){this.formats[e.toLowerCase().trim()]=kv(o)}format(e,o,s,i={}){const l=o.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(d=>d.indexOf(")")>-1)){const d=l.findIndex(h=>h.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,d)].join(this.formatSeparator)}return l.reduce((d,h)=>{const{formatName:m,formatOptions:y}=lR(h);if(this.formats[m]){let v=d;try{const x=i?.formatParams?.[i.interpolationkey]||{},b=x.locale||x.lng||i.locale||i.lng||s;v=this.formats[m](d,b,{...y,...i,...x})}catch(x){this.logger.warn(x)}return v}else this.logger.warn(`there was no format function for ${m}`);return d},e)}}const dR=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class fR extends vl{constructor(e,o,s,i={}){super(),this.backend=e,this.store=o,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=Gn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,o,s,i){const l={},u={},d={},h={};return e.forEach(m=>{let y=!0;o.forEach(v=>{const x=`${m}|${v}`;!s.reload&&this.store.hasResourceBundle(m,v)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?u[x]===void 0&&(u[x]=!0):(this.state[x]=1,y=!1,u[x]===void 0&&(u[x]=!0),l[x]===void 0&&(l[x]=!0),h[v]===void 0&&(h[v]=!0)))}),y||(d[m]=!0)}),(Object.keys(l).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(l),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(h)}}loaded(e,o,s){const i=e.split("|"),l=i[0],u=i[1];o&&this.emit("failedLoading",l,u,o),!o&&s&&this.store.addResourceBundle(l,u,s,void 0,void 0,{skipCopy:!0}),this.state[e]=o?-1:2,o&&s&&(this.state[e]=0);const d={};this.queue.forEach(h=>{YP(h.loaded,[l],u),dR(h,e),o&&h.errors.push(o),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(m=>{d[m]||(d[m]={});const y=h.loaded[m];y.length&&y.forEach(v=>{d[m][v]===void 0&&(d[m][v]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(h=>!h.done)}read(e,o,s,i=0,l=this.retryTimeout,u){if(!e.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:o,fcName:s,tried:i,wait:l,callback:u});return}this.readingCalls++;const d=(m,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(m&&y&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,o,s,i+1,l*2,u)},l);return}u(m,y)},h=this.backend[s].bind(this.backend);if(h.length===2){try{const m=h(e,o);m&&typeof m.then=="function"?m.then(y=>d(null,y)).catch(d):d(null,m)}catch(m){d(m)}return}return h(e,o,d)}prepareLoading(e,o,s={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ne(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Ne(o)&&(o=[o]);const l=this.queueLoad(e,o,s,i);if(!l.toLoad.length)return l.pending.length||i(),null;l.toLoad.forEach(u=>{this.loadOne(u)})}load(e,o,s){this.prepareLoading(e,o,{},s)}reload(e,o,s){this.prepareLoading(e,o,{reload:!0},s)}loadOne(e,o=""){const s=e.split("|"),i=s[0],l=s[1];this.read(i,l,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${o}loading namespace ${l} for language ${i} failed`,u),!u&&d&&this.logger.log(`${o}loaded namespace ${l} for language ${i}`,d),this.loaded(e,u,d)})}saveMissing(e,o,s,i,l,u={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${s}" as the namespace "${o}" 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(!(s==null||s==="")){if(this.backend?.create){const h={...u,isUpdate:l},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(e,o,s,i,h):y=m(e,o,s,i),y&&typeof y.then=="function"?y.then(v=>d(null,v)).catch(d):d(null,y)}catch(y){d(y)}else m(e,o,s,i,d,h)}!e||!e[0]||this.store.addResource(e[0],o,s,i)}}}const Ev=()=>({debug:!1,initAsync:!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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),Ne(n[1])&&(e.defaultValue=n[1]),Ne(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const o=n[3]||n[2];Object.keys(o).forEach(s=>{e[s]=o[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_v=n=>(Ne(n.ns)&&(n.ns=[n.ns]),Ne(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Ne(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),xl=()=>{},pR=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(o=>{typeof n[o]=="function"&&(n[o]=n[o].bind(n))})};class Si extends vl{constructor(e={},o){if(super(),this.options=_v(e),this.services={},this.logger=Gn,this.modules={external:[]},pR(this),o&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,o),this;setTimeout(()=>{this.init(e,o)},0)}}init(e={},o){this.isInitializing=!0,typeof e=="function"&&(o=e,e={}),e.defaultNS==null&&e.ns&&(Ne(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=Ev();this.options={...s,...this.options,..._v(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const i=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Gn.init(i(this.modules.logger),this.options):Gn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=uR;const y=new wv(this.options);this.store=new gv(this.options.resources,this.options);const v=this.services;v.logger=Gn,v.resourceStore=this.store,v.languageUtils=y,v.pluralResolver=new iR(y,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(v.formatter=i(m),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new aR(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new fR(i(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.languageDetector&&(v.languageDetector=i(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=i(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new yl(this.services,this.options),this.translator.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,o||(o=xl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=(...y)=>this.store[m](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...y)=>(this.store[m](...y),this)});const d=xi(),h=()=>{const m=(y,v)=>{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),d.resolve(v),o(y,v)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?h():setTimeout(h,0),d}loadResources(e,o=xl){let s=o;const i=Ne(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const l=[],u=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(m=>{m!=="cimode"&&l.indexOf(m)<0&&l.push(m)})};i?u(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>u(h)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(l,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(d)})}else s(null)}reloadResources(e,o,s){const i=xi();return typeof e=="function"&&(s=e,e=void 0),typeof o=="function"&&(s=o,o=void 0),e||(e=this.languages),o||(o=this.options.ns),s||(s=xl),this.services.backendConnector.reload(e,o,l=>{i.resolve(),s(l)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&vv.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let o=0;o<this.languages.length;o++){const s=this.languages[o];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,o){this.isLanguageChangingTo=e;const s=xi();this.emit("languageChanging",e);const i=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,h)=>{h?this.isLanguageChangingTo===e&&(i(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,s.resolve((...m)=>this.t(...m)),o&&o(d,(...m)=>this.t(...m))},u=d=>{!e&&!d&&this.services.languageDetector&&(d=[]);const h=Ne(d)?d:d&&d[0],m=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(Ne(d)?[d]:d);m&&(this.language||i(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,y=>{l(y,m)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),s}getFixedT(e,o,s){const i=(l,u,...d)=>{let h;typeof u!="object"?h=this.options.overloadTranslationOptionHandler([l,u].concat(d)):h={...u},h.lng=h.lng||i.lng,h.lngs=h.lngs||i.lngs,h.ns=h.ns||i.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||s||i.keyPrefix);const m=this.options.keySeparator||".";let y;return h.keyPrefix&&Array.isArray(l)?y=l.map(v=>(typeof v=="function"&&(v=Id(v,{...this.options,...u})),`${h.keyPrefix}${m}${v}`)):(typeof l=="function"&&(l=Id(l,{...this.options,...u})),y=h.keyPrefix?`${h.keyPrefix}${m}${l}`:l),this.t(y,h)};return Ne(e)?i.lng=e:i.lngs=e,i.ns=o,i.keyPrefix=s,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,o={}){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 s=o.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const u=(d,h)=>{const m=this.services.backendConnector.state[`${d}|${h}`];return m===-1||m===0||m===2};if(o.precheck){const d=o.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,e)&&(!i||u(l,e)))}loadNamespaces(e,o){const s=xi();return this.options.ns?(Ne(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),o&&o(i)}),s):(o&&o(),Promise.resolve())}loadLanguages(e,o){const s=xi();Ne(e)&&(e=[e]);const i=this.options.preload||[],l=e.filter(u=>i.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return l.length?(this.options.preload=i.concat(l),this.loadResources(u=>{s.resolve(),o&&o(u)}),s):(o&&o(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const i=new Intl.Locale(e);if(i&&i.getTextInfo){const l=i.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const o=["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"],s=this.services?.languageUtils||new wv(Ev());return e.toLowerCase().indexOf("-latn")>1?"ltr":o.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},o){return new Si(e,o)}cloneInstance(e={},o=xl){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},l=new Si(i);if((e.debug!==void 0||e.prefix!==void 0)&&(l.logger=l.logger.clone(e)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},s){const d=Object.keys(this.store.data).reduce((h,m)=>(h[m]={...this.store.data[m]},h[m]=Object.keys(h[m]).reduce((y,v)=>(y[v]={...h[m][v]},y),h[m]),h),{});l.store=new gv(d,i),l.services.resourceStore=l.store}return l.translator=new yl(l.services,i),l.translator.on("*",(d,...h)=>{l.emit(d,...h)}),l.init(i,o),l.translator.options=i,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const zt=Si.createInstance();zt.createInstance=Si.createInstance;const hR=zt.createInstance;zt.dir,zt.init,zt.loadResources,zt.reloadResources,zt.use,zt.changeLanguage,zt.getFixedT,zt.t,zt.exists,zt.setDefaultNamespace,zt.hasLoadedNamespace,zt.loadNamespaces,zt.loadLanguages;const mR=Symbol("remote-view.message");class gR extends Error{constructor(e,o,s){super(),this.key=e,this.values=o,Object.defineProperty(this,"message",{configurable:!0,get:()=>s(e,o)}),this.name="ViewMessageError"}key;values}const Nd={en:{close:"Close",commandTitle:"Command palette",commandDescription:"Search for a command to run…"},"zh-Hans":{close:"关闭",commandTitle:"命令面板",commandDescription:"搜索要运行的命令…"},"zh-Hant":{close:"關閉",commandTitle:"命令面板",commandDescription:"搜尋要執行的命令…"}};function Pv(n){try{const e=new Intl.Locale((n||"en").replaceAll("_","-"));return e.language==="zh"?e.maximize().script==="Hant"?"zh-Hant":"zh-Hans":"en"}catch{return"en"}}function Rv(n,e=typeof navigator>"u"?"en":navigator.language){const o=d=>{const h=Pv(d);return h==="zh-Hant"&&!n["zh-Hant"]?"zh-Hans":h},s=hR();s.init({lng:o(e),fallbackLng:"en",supportedLngs:["en","zh-Hans","zh-Hant"],load:"currentOnly",initAsync:!1,keySeparator:!1,defaultNS:"view",interpolation:{escapeValue:!1},resources:{en:{view:n.en,ui:Nd.en},"zh-Hans":{view:n["zh-Hans"],ui:Nd["zh-Hans"]},"zh-Hant":{view:n["zh-Hant"]??n["zh-Hans"],ui:Nd["zh-Hant"]}}});const i=()=>o(s.resolvedLanguage??s.language),l=d=>(s.on("languageChanged",d),()=>{s.off("languageChanged",d)}),u=(d,h)=>String(s.t(d,h));return{getLocale:i,subscribe:l,setLocale(d){d!==void 0&&s.changeLanguage(o(d)),typeof document<"u"&&(document.documentElement.lang=i())},t:(d,h)=>u(d,h),message:(d,h)=>({[mR]:!0,key:d,values:h}),error:(d,h)=>new gR(d,h,u),format(d){return typeof d=="string"?d:d instanceof Error?d.message:u(d.key,d.values)},ui:d=>String(s.t(d,{ns:"ui"})),date(d,h={}){const m=new Date(d);return Number.isNaN(m.getTime())?"":new Intl.DateTimeFormat(i(),h).format(m)},number(d,h){return new Intl.NumberFormat(i(),h).format(d)},label(d,h=""){if(typeof d=="string")return d;const m=Object.entries(d),y=i();return m.find(([v])=>Pv(v)===y&&/^(en|zh)([-_]|$)/i.test(v))?.[1]??d.en_US??d.en??d["en-US"]??h}}}const vR=Rv({en:{},"zh-Hans":{}},"en"),Iv=f.createContext(vR);function yR({i18n:n,children:e}){return E.jsx(Iv.Provider,{value:n,children:e})}function xR(n){return f.useSyncExternalStore(n.subscribe,n.getLocale,n.getLocale)}function Tv(){const n=f.useContext(Iv);return xR(n),n.ui}f.createContext(null);function $e(...n){return gb(Bp(n))}const Od=fl("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}}),lt=f.forwardRef(function({className:n,variant:e="default",size:o="default",asChild:s=!1,...i},l){const u=s?xh:"button";return E.jsx(u,{ref:l,"data-slot":"button","data-variant":e,"data-size":o,className:$e(Od({variant:e,size:o,className:n})),...i})});function Dv({...n}){return E.jsx(D1,{"data-slot":"alert-dialog",...n})}function wR({...n}){return E.jsx(N1,{"data-slot":"alert-dialog-portal",...n})}function bR({className:n,...e}){return E.jsx(O1,{"data-slot":"alert-dialog-overlay",className:$e("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),...e})}function Nv({className:n,size:e="default",...o}){return E.jsxs(wR,{children:[E.jsx(bR,{}),E.jsx(A1,{"data-slot":"alert-dialog-content","data-size":e,className:$e("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...o})]})}function Ov({className:n,...e}){return E.jsx("div",{"data-slot":"alert-dialog-footer",className:$e("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",n),...e})}function Av({className:n,...e}){return E.jsx(M1,{"data-slot":"alert-dialog-title",className:$e("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",n),...e})}function $v({className:n,...e}){return E.jsx(j1,{"data-slot":"alert-dialog-description",className:$e("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",n),...e})}function Mv({className:n,variant:e="outline",size:o="default",...s}){return E.jsx(lt,{variant:e,size:o,asChild:!0,children:E.jsx($1,{"data-slot":"alert-dialog-cancel",className:$e(n),...s})})}const SR=fl("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function CR({className:n,variant:e="default",asChild:o=!1,...s}){const i=o?xh:"span";return E.jsx(i,{"data-slot":"badge","data-variant":e,className:$e(SR({variant:e}),n),...s})}function kR({...n}){return E.jsx(Tu,{"data-slot":"dialog",...n})}function ER({...n}){return E.jsx(Du,{"data-slot":"dialog-portal",...n})}function _R({className:n,...e}){return E.jsx(Ou,{"data-slot":"dialog-overlay",className:$e("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),...e})}function PR({className:n,children:e,showCloseButton:o=!0,...s}){const i=Tv();return E.jsxs(ER,{children:[E.jsx(_R,{}),E.jsxs(Au,{"data-slot":"dialog-content",className:$e("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s,children:[e,o&&E.jsx(Va,{"data-slot":"dialog-close",asChild:!0,children:E.jsxs(lt,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[E.jsx(Rb,{}),E.jsx("span",{className:"sr-only",children:i("close")})]})})]})]})}function RR({className:n,...e}){return E.jsx("div",{"data-slot":"dialog-header",className:$e("flex flex-col gap-2",n),...e})}function IR({className:n,showCloseButton:e=!1,children:o,...s}){const i=Tv();return E.jsxs("div",{"data-slot":"dialog-footer",className:$e("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",n),...s,children:[o,e&&E.jsx(Va,{asChild:!0,children:E.jsx(lt,{variant:"outline",children:i("close")})})]})}function TR({className:n,...e}){return E.jsx(Cm,{"data-slot":"dialog-title",className:$e("text-base leading-none font-medium",n),...e})}function DR({className:n,...e}){return E.jsx(km,{"data-slot":"dialog-description",className:$e("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",n),...e})}function jv({className:n,type:e,...o}){return E.jsx("input",{type:e,"data-slot":"input",className:$e("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),...o})}function NR({className:n,...e}){return E.jsx("textarea",{"data-slot":"textarea",className:$e("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),...e})}function OR({className:n,...e}){return E.jsx("div",{"data-slot":"input-group",role:"group",className:$e("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",n),...e})}const AR=fl("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function $R({className:n,align:e="inline-start",...o}){return E.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:$e(AR({align:e}),n),onClick:s=>{s.target.closest("button")||s.currentTarget.parentElement?.querySelector("input")?.focus()},...o})}function Lv({className:n,...e}){return E.jsx(pl,{"data-slot":"command",className:$e("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",n),...e})}function Fv({className:n,...e}){return E.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:E.jsxs(OR,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[E.jsx(pl.Input,{"data-slot":"command-input",className:$e("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),...e}),E.jsx($R,{children:E.jsx(_b,{className:"size-4 shrink-0 opacity-50"})})]})})}function zv({className:n,...e}){return E.jsx(pl.List,{"data-slot":"command-list",className:$e("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",n),...e})}function Vv({className:n,children:e,...o}){return E.jsxs(pl.Item,{"data-slot":"command-item",className:$e("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",n),...o,children:[e,E.jsx(Js,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function MR({...n}){return E.jsx(DE,{"data-slot":"dropdown-menu",...n})}function Uv({...n}){return E.jsx(Pg,{"data-slot":"dropdown-menu-portal",...n})}function jR({...n}){return E.jsx(NE,{"data-slot":"dropdown-menu-trigger",...n})}function LR({className:n,align:e="start",sideOffset:o=4,...s}){return E.jsx(Pg,{children:E.jsx(OE,{"data-slot":"dropdown-menu-content",sideOffset:o,align:e,className:$e("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s})})}function wl({className:n,inset:e,variant:o="default",...s}){return E.jsx($E,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":o,className:$e("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),...s})}function Bv({...n}){return E.jsx(ME,{"data-slot":"dropdown-menu-radio-group",...n})}function Ci({className:n,children:e,inset:o,...s}){return E.jsxs(jE,{"data-slot":"dropdown-menu-radio-item","data-inset":o,className:$e("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...s,children:[E.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:E.jsx(LE,{children:E.jsx(Js,{})})}),e]})}function FR({className:n,inset:e,...o}){return E.jsx(AE,{"data-slot":"dropdown-menu-label","data-inset":e,className:$e("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",n),...o})}function Hv({className:n,...e}){return E.jsx(FE,{"data-slot":"dropdown-menu-separator",className:$e("-mx-1 my-1 h-px bg-border",n),...e})}function Wv({...n}){return E.jsx(zE,{"data-slot":"dropdown-menu-sub",...n})}function Kv({className:n,inset:e,children:o,...s}){return E.jsxs(VE,{"data-slot":"dropdown-menu-sub-trigger","data-inset":e,className:$e("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...s,children:[o,E.jsx(nu,{className:"ml-auto"})]})}function Gv({className:n,...e}){return E.jsx(UE,{"data-slot":"dropdown-menu-sub-content",className:$e("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...e})}function Zv({...n}){return E.jsx(s_,{"data-slot":"popover",...n})}function qv({...n}){return E.jsx(i_,{"data-slot":"popover-trigger",...n})}function Yv({className:n,align:e="center",sideOffset:o=4,...s}){return E.jsx(a_,{children:E.jsx(l_,{"data-slot":"popover-content",align:e,sideOffset:o,className:$e("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s})})}function bl({...n}){return E.jsx(g_,{"data-slot":"select",...n})}function Sl({...n}){return E.jsx(w_,{"data-slot":"select-value",...n})}function Cl({className:n,size:e="default",children:o,...s}){return E.jsxs(y_,{"data-slot":"select-trigger","data-size":e,className:$e("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...s,children:[o,E.jsx(b_,{asChild:!0,children:E.jsx(tu,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function kl({className:n,children:e,position:o="item-aligned",align:s="center",...i}){return E.jsx(E_,{children:E.jsxs(__,{"data-slot":"select-content","data-align-trigger":o==="item-aligned",className:$e("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o==="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",n),position:o,align:s,...i,children:[E.jsx(zR,{}),E.jsx(N_,{"data-position":o,className:$e("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",o==="popper"&&""),children:e}),E.jsx(VR,{})]})})}function ks({className:n,children:e,...o}){return E.jsxs($_,{"data-slot":"select-item",className:$e("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),...o,children:[E.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:E.jsx(L_,{children:E.jsx(Js,{className:"pointer-events-none"})})}),E.jsx(M_,{children:e})]})}function zR({className:n,...e}){return E.jsx(F_,{"data-slot":"select-scroll-up-button",className:$e("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),...e,children:E.jsx(fh,{})})}function VR({className:n,...e}){return E.jsx(z_,{"data-slot":"select-scroll-down-button",className:$e("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),...e,children:E.jsx(tu,{})})}function UR({delayDuration:n=0,...e}){return E.jsx(yP,{"data-slot":"tooltip-provider",delayDuration:n,...e})}function BR({...n}){return E.jsx(xP,{"data-slot":"tooltip",...n})}function HR({...n}){return E.jsx(wP,{"data-slot":"tooltip-trigger",...n})}function WR({className:n,sideOffset:e=0,children:o,...s}){return E.jsx(bP,{children:E.jsxs(SP,{"data-slot":"tooltip-content",sideOffset:e,className:$e("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s,children:[o,E.jsx(CP,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}f.createContext(null);function KR({className:n,orientation:e="horizontal",...o}){return E.jsx(J_,{"data-slot":"tabs","data-orientation":e,className:$e("group/tabs flex gap-2 data-horizontal:flex-col",n),...o})}const GR=fl("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function ZR({className:n,variant:e="default",...o}){return E.jsx(eP,{"data-slot":"tabs-list","data-variant":e,className:$e(GR({variant:e}),n),...o})}function Qv({className:n,...e}){return E.jsx(tP,{"data-slot":"tabs-trigger",className:$e("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",n),...e})}function Xv({className:n,...e}){return E.jsx(nP,{"data-slot":"tabs-content",className:$e("flex-1 text-sm outline-none",n),...e})}f.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});const xr=te().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),Ad=lr([te().max(4e3),tt().finite(),ot(),Ar()]),wr=_0(()=>lr([te().max(32e3),tt().finite(),ot(),Ar(),nt(wr).max(1e3),Mr(wr)])),$d=E0("kind",[me({kind:Je("data-source"),dataSourceId:te().uuid()}).strict(),me({kind:Je("definition"),definitionId:te().uuid(),versionId:te().uuid()}).strict(),me({kind:Je("artifact"),artifactId:te().uuid(),versionId:te().uuid()}).strict()]);Mr(wr);const qR=me({id:xr,sourceField:te().min(1).max(256),label:te().min(1).max(160),logicalType:en(["string","boolean","int64","float64","decimal","date","timestamp"]),nullable:ot(),role:en(["dimension","measure","time","identifier"]),semanticRef:te().max(512).optional(),unit:te().max(80).optional()}).strict(),YR=me({name:xr,controlId:xr,type:en(["string","number","boolean","date"]),required:ot(),defaultValue:Ad.optional(),allowedValues:nt(Ad).max(200).optional()}).strict(),QR=me({id:xr,source:$d,providerId:te().min(1).max(160),operation:xr,contractVersion:tt().int().positive(),payload:wr,parameters:nt(YR).max(24),output:me({datasetId:xr,fields:nt(qR).min(1).max(80),grain:nt(xr).max(20)}).strict()}).strict();function XR(n,e){const o=n.output.fields.map(i=>i.id),s=n.parameters.map(i=>i.name);(new Set(o).size!==o.length||new Set(s).size!==s.length)&&e.addIssue({code:"custom",message:"Duplicate field or parameter identifier"}),(new Set(n.output.grain).size!==n.output.grain.length||n.output.grain.some(i=>!o.includes(i)))&&e.addIssue({code:"custom",message:"Grain references an undeclared field"}),new TextEncoder().encode(JSON.stringify(n.payload)).byteLength>64e3&&e.addIssue({code:"custom",message:"Query payload exceeds limit"})}const Jv=QR.superRefine(XR),JR=Mr(xr,Ad).default({});me({binding:Jv,controls:JR}).strict(),me({source:$d,providerId:te().min(1).max(160),request:wr.default({})}).strict().refine(n=>new TextEncoder().encode(JSON.stringify(n)).byteLength<=16e3,"Discovery request exceeds limit"),me({items:nt(me({id:te().min(1).max(512),name:te().min(1).max(512),kind:en(["collection","dataset"]),description:te().max(4e3).optional(),inspectRequest:wr.optional(),metadata:wr}).strict()).max(50),nextRequest:wr.optional(),queryContract:me({operation:xr,contractVersion:tt().int().positive(),payloadSchema:wr,instructions:te().max(8e3)}).strict()}).strict().refine(n=>new TextEncoder().encode(JSON.stringify(n)).byteLength<=128e3,"Discovery response exceeds limit");function eI(n,e){if(n==null)return{};var o={},s=Object.keys(n),i,l;for(l=0;l<s.length;l++)i=s[l],!(e.indexOf(i)>=0)&&(o[i]=n[i]);return o}const ey="xpert.artifact-document",ty=1,El=te().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),tI=lr([te().max(4e3),tt().finite(),ot(),Ar()]),ny=Mr(El,tI).refine(n=>Object.keys(n).length<=24,"Too many controls"),nI=me({type:Je("query"),requestId:te().min(1).max(80),bindingId:El,controls:ny}).strict(),rI=me({bindingIds:nt(El).max(64).refine(n=>new Set(n).size===n.length,"Duplicate binding IDs"),defaults:ny,theme:en(["light","dark"]),locale:te().min(1).max(80)}).strict(),ry=te().min(1).max(3e5).superRefine((n,e)=>{(new TextEncoder().encode(n).byteLength>3e5||!/<html[\s>]/i.test(n)||!/<body[\s>]/i.test(n))&&e.addIssue({code:"custom",message:"Supply a complete UTF-8 HTML document, at most 300 KB"})}),oI=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Zn=(n,e)=>n>>>e|n<<32-e;function sI(n){const e=new Uint8Array(Math.ceil((n.length+9)/64)*64);e.set(n),e[n.length]=128;const o=new DataView(e.buffer);o.setUint32(e.length-8,Math.floor(n.length/536870912)),o.setUint32(e.length-4,n.length*8>>>0);const s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64);for(let l=0;l<e.length;l+=64){for(let S=0;S<16;S++)i[S]=o.getUint32(l+S*4);for(let S=16;S<64;S++){const C=i[S-15],k=i[S-2],N=Zn(C,7)^Zn(C,18)^C>>>3,D=Zn(k,17)^Zn(k,19)^k>>>10;i[S]=i[S-16]+N+i[S-7]+D>>>0}let[u,d,h,m,y,v,x,b]=s;for(let S=0;S<64;S++){const C=Zn(y,6)^Zn(y,11)^Zn(y,25),k=y&v^~y&x,N=b+C+k+oI[S]+i[S]>>>0,D=Zn(u,2)^Zn(u,13)^Zn(u,22),O=u&d^u&h^d&h,R=D+O>>>0;b=x,x=v,v=y,y=m+N>>>0,m=h,h=d,d=u,u=N+R>>>0}s[0]=s[0]+u>>>0,s[1]=s[1]+d>>>0,s[2]=s[2]+h>>>0,s[3]=s[3]+m>>>0,s[4]=s[4]+y>>>0,s[5]=s[5]+v>>>0,s[6]=s[6]+x>>>0,s[7]=s[7]+b>>>0}return Array.from(s,l=>l.toString(16).padStart(8,"0")).join("")}const oy=me({id:El,version:te().regex(/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/),format:Je("classic-script"),global:te().regex(/^[A-Za-z_$][A-Za-z0-9_$]{0,79}$/).refine(n=>!["window","self","globalThis","document","parent","top","location","xpertLiveArtifact","__proto__","constructor","prototype"].includes(n)),sha256:te().regex(/^[a-f0-9]{64}$/)}).strict(),iI=oy.transform(n=>({id:n.id,version:n.version,format:"classic-script",global:n.global,sha256:n.sha256})),Md=nt(iI).max(8).superRefine((n,e)=>{(new Set(n.map(o=>o.id)).size!==n.length||new Set(n.map(o=>o.global)).size!==n.length)&&e.addIssue({code:"custom",message:"Duplicate dependency ID or global"})}),sy=nt(oy.extend({source:te().min(1).max(4e6)}).strict().transform(n=>({id:n.id,version:n.version,format:"classic-script",global:n.global,sha256:n.sha256,source:n.source}))).max(8);function iy(n,e){const o=sy.parse(n),s=Md.parse(o.map(l=>{var{source:u}=l,d=eI(l,["source"]);return d}));let i=0;for(const l of o){const u=new TextEncoder().encode(l.source);if(i+=u.length,u.length>4e6||i>8e6)throw new Error("DOCUMENT_DEPENDENCY_TOO_LARGE");if(sI(u)!==l.sha256)throw new Error("DOCUMENT_DEPENDENCY_INTEGRITY_FAILED")}if(e&&JSON.stringify(Md.parse(e))!==JSON.stringify(s))throw new Error("DOCUMENT_DEPENDENCY_LOCK_MISMATCH");return o.map(l=>({id:l.id,version:l.version,global:l.global,sha256:l.sha256,source:l.source,format:"classic-script"}))}function aI(n){const e=o=>JSON.stringify(o).replace(/</g,"\\u003c").replace(/>/g,"\\u003e");return iy(n).map(o=>`<script>(()=>{const s=document.createElement('script');s.textContent=${e(o.source)};document.head.appendChild(s);s.remove();if(typeof window[${e(o.global)}]==='undefined')throw new Error('DOCUMENT_DEPENDENCY_GLOBAL_MISSING');})();<\/script>`).join("")}const lI=te().max(250).refine(n=>{try{const e=new URL(n);return e.protocol==="https:"&&e.origin===n&&!e.username&&!e.password&&/^(?:[a-z0-9.-]+|\[[a-f0-9:]+\])$/i.test(e.hostname)}catch{return!1}},"Use an exact HTTPS origin without a path, credentials or wildcard"),_l=nt(lI).max(16),cI=me({mode:en(["restricted","unrestricted"]).optional(),scripts:_l.optional(),styles:_l.optional(),fonts:_l.optional(),images:_l.optional()}).strict();function ay(n){const e=cI.parse(n??{});if(e.mode==="unrestricted")return["default-src * data: blob:","script-src * data: blob: 'unsafe-inline'","style-src * data: blob: 'unsafe-inline'","img-src * data: blob:","font-src * data: blob:","connect-src * data: blob: ws: wss:","media-src * data: blob:","frame-src * data: blob:","worker-src * data: blob:","object-src 'none'","base-uri 'none'","form-action 'none'"].join("; ");const o=s=>s?.length?` ${[...new Set(s)].join(" ")}`:"";return["default-src 'none'",`script-src 'unsafe-inline'${o(e.scripts)}`,`style-src 'unsafe-inline'${o(e.styles)}`,`img-src data: blob:${o(e.images)}`,`font-src data:${o(e.fonts)}`,"connect-src 'none'","frame-src 'none'","worker-src 'none'","object-src 'none'","base-uri 'none'","form-action 'none'"].join("; ")}ay();function uI(n,e,o=[],s){if(ry.parse(n),!/^[a-f0-9]{32}$/.test(e))throw new Error("Invalid Artifact document session ID");return`<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${ay(s)}"><script>${dI.replace("__XPERT_DOCUMENT_SESSION__",e)}<\/script>${aI(o)}${n}`}const dI=String.raw`
|
|
104
104
|
;(() => {
|
|
105
105
|
'use strict'
|
|
106
106
|
const SESSION_ID = '__XPERT_DOCUMENT_SESSION__'
|
|
@@ -248,6 +248,6 @@ Error generating stack: `+g.message+`
|
|
|
248
248
|
})
|
|
249
249
|
parent.postMessage({ channel: CHANNEL, version: VERSION, type: 'ready', sessionId: SESSION_ID }, '*')
|
|
250
250
|
})()
|
|
251
|
-
`,UP=he({channel:Xe(Cv),version:Xe(_v),type:Xe("ready"),sessionId:ne().regex(/^[a-f0-9]{32}$/)}).strict(),BP=he({type:Xe("diagnostic"),code:Xe("DOCUMENT_BINDING_DENIED")}).strict();function HP(n,e){if(!n.ownerDocument.querySelector("meta[data-xpert-document-policy]"))throw new Error("Install the Artifact document frame policy before mounting a document");const o=TP.parse(e.context),s=Array.from(crypto.getRandomValues(new Uint8Array(16)),O=>O.toString(16).padStart(2,"0")).join(""),a=FP(e.html,s,e.dependencies,e.networkPolicy),l=new MessageChannel,u=new Set(o.bindingIds),d=new Set,h=new Set,m=new Map,v=n.ownerDocument.defaultView;let y=!1,w=!1,b=0,S=Date.now();n.setAttribute("sandbox","allow-scripts"),n.referrerPolicy="no-referrer";const C=(O,T)=>{try{O?.(T)}catch{}},k=O=>{w||l.port1.postMessage(O)},A=(O,T)=>{k({type:"result",requestId:O,ok:!1,code:T}),C(e.onError,T)};l.port1.onmessage=async O=>{if(w)return;const T=BP.safeParse(O.data);if(T.success){C(e.onError,T.data.code);return}const z=OP.safeParse(O.data);if(!z.success){C(e.onError,"DOCUMENT_INVALID_REQUEST");return}const R={type:z.data.type,requestId:z.data.requestId,bindingId:z.data.bindingId,controls:z.data.controls};if(!u.has(R.bindingId)){A(R.requestId,"DOCUMENT_BINDING_DENIED");return}if(Date.now()-S>=6e4&&(b=0,S=Date.now(),d.clear()),h.has(R.requestId)||d.has(R.requestId)){A(R.requestId,"DOCUMENT_REQUEST_REPLAY");return}if(h.size>=8||++b>60){A(R.requestId,"DOCUMENT_QUERY_LIMIT");return}d.add(R.requestId),h.add(R.requestId),m.set(R.bindingId,R.requestId),C(e.onBusy,!0);try{const B=await e.query(R);w||(k({type:"result",requestId:R.requestId,ok:!0,dataset:B}),m.get(R.bindingId)===R.requestId&&C(e.onResult,B))}catch{w||(k({type:"result",requestId:R.requestId,ok:!1,code:"DOCUMENT_QUERY_FAILED"}),m.get(R.bindingId)===R.requestId&&C(e.onError,"DOCUMENT_QUERY_FAILED"))}finally{h.delete(R.requestId),w||C(e.onBusy,h.size>0)}};const N=O=>{var T;if(w||y||O.source!==n.contentWindow)return;const z=UP.safeParse(O.data);!z.success||z.data.sessionId!==s||(y=!0,(T=n.contentWindow)==null||T.postMessage({channel:Cv,version:_v,type:"init",sessionId:s,context:o},"*",[l.port2]))};return v.addEventListener("message",N),l.port1.start(),n.srcdoc=a,{refresh(){k({type:"refresh"})},dispose(){w||(w=!0,v.removeEventListener("message",N),l.port1.close(),l.port2.close(),C(e.onBusy,!1))}}}function WP(n){if(n.querySelector("meta[data-xpert-document-policy]"))return;const e=n.createElement("meta");e.httpEquiv="Content-Security-Policy",e.content="frame-src 'none'",e.dataset.xpertDocumentPolicy="1",n.head.prepend(e)}const Wn=ne().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),vl=he({schema:Xe("xpert.live-dashboard"),id:ne().uuid(),title:ne().min(1).max(160),bindings:nt(kv).max(8),presentation:he({type:Xe("html"),html:Pv,dependencies:bd.optional()}).strict().optional(),controls:nt(he({controlId:Wn,type:ln(["string","number","boolean","date"]),defaultValue:rr([ne(),tt(),it(),Ir()]).optional(),allowedValues:nt(rr([ne(),tt(),it(),Ir()])).max(200).optional(),label:ne().min(1).max(160)}).strict()).max(24),charts:nt(he({id:Wn,title:ne().min(1).max(160),type:ln(["bar","line","area","pie","scatter"]),datasetId:Wn,x:Wn,y:Wn,color:Wn.optional()}).strict()).max(20),tables:nt(he({id:Wn,title:ne().min(1).max(160),datasetId:Wn,fields:nt(Wn).min(1).max(30)}).strict()).max(20)}).strict().superRefine((n,e)=>{const o=(s,a)=>{new Set(s).size!==s.length&&e.addIssue({code:"custom",message:`Duplicate ${a}`})};!n.bindings.length&&(n.presentation||n.controls.length||n.charts.length||n.tables.length)&&e.addIssue({code:"custom",message:"An unconfigured draft must contain no views or controls"}),o(n.bindings.map(s=>s.id),"binding"),o(n.bindings.map(s=>s.output.datasetId),"dataset"),o(n.controls.map(s=>s.controlId),"control"),o([...n.charts,...n.tables].map(s=>s.id),"view"),n.bindings.length&&!n.presentation&&!n.charts.length&&!n.tables.length&&e.addIssue({code:"custom",message:"At least one chart or table is required"}),n.presentation&&(n.charts.length||n.tables.length)&&e.addIssue({code:"custom",message:"HTML presentation owns its charts; use empty charts/tables arrays"});for(const s of n.controls){const a=n.bindings.flatMap(u=>u.parameters.filter(d=>d.controlId===s.controlId));a.length||e.addIssue({code:"custom",message:"Control is not bound to a query parameter"});const l=[...s.defaultValue!==void 0?[s.defaultValue]:[],...s.allowedValues??[]];l.some(u=>u!==null&&(s.type==="number"?typeof u!="number"||!Number.isFinite(u):s.type==="boolean"?typeof u!="boolean":typeof u!="string"))&&e.addIssue({code:"custom",message:"Control value has an incompatible type"}),s.allowedValues&&s.defaultValue!==void 0&&!s.allowedValues.includes(s.defaultValue)&&e.addIssue({code:"custom",message:"Default control value is not allowed"});for(const u of a)u.defaultValue!==void 0&&s.defaultValue!==void 0&&u.defaultValue!==s.defaultValue&&e.addIssue({code:"custom",message:"Control and parameter defaults disagree"}),l.some(d=>d===null?u.required:u.allowedValues&&!u.allowedValues.includes(d))&&e.addIssue({code:"custom",message:"Control values conflict with parameter restrictions"})}for(const s of n.bindings)for(const a of s.parameters){const l=n.controls.find(u=>u.controlId===a.controlId);(!l||l.type!==a.type)&&e.addIssue({code:"custom",message:"Control mapping is missing or has an incompatible type"})}for(const s of[...n.charts,...n.tables]){const a=n.bindings.find(u=>u.output.datasetId===s.datasetId)?.output,l="fields"in s?s.fields:[s.x,s.y,...s.color?[s.color]:[]];(!a||l.some(u=>!a.fields.some(d=>d.id===u)))&&e.addIssue({code:"custom",message:"View references an undeclared Dataset field"}),"y"in s&&!a?.fields.some(u=>u.id===s.y&&["float64","int64","decimal"].includes(u.logicalType))&&e.addIssue({code:"custom",message:"Chart measure must be numeric"}),"y"in s&&s.type!=="scatter"&&a?.grain.some(u=>u!==s.x&&u!==s.color)&&e.addIssue({code:"custom",message:"Chart must encode every Dataset grain dimension in x/color; use another aggregated binding for totals"})}});vl.innerType().pick({title:!0,bindings:!0,controls:!0,charts:!0,tables:!0,presentation:!0}).partial().strict();const KP=Nr(rr([ne().max(4e3),tt().finite(),it(),Ir()]));he({manifest:vl,expectedVersionId:ne().uuid().nullable(),expectedRevision:tt().int().nonnegative().default(0)}).strict(),he({artifactId:ne().uuid(),versionId:ne().uuid().optional(),draftRevision:tt().int().positive().optional(),controls:KP.default({})}).strict().extend({bindingId:Wn}).strict(),he({search:ne().trim().max(200).default(""),page:tt().int().positive().default(1)}).strict();const Ov=he({id:ne().uuid(),name:ne()}),ZP=he({items:nt(Ov),page:tt().int().positive(),hasMore:it()}),Tv=he({target:Xe("workbench.view"),viewKey:Xe("live-dashboard__live-dashboard")}).strict(),GP=he({selectionId:ne().uuid().optional(),page:tt().int().positive().optional(),pageSize:tt().int().min(1).max(100).optional(),parameters:he({pipelineInstanceId:ne().uuid().optional(),pipelineRoundId:ne().uuid().optional(),pipelineNodeId:ne().uuid().optional(),contentProvider:ne().optional(),contentId:ne().uuid().optional(),contentTitle:ne().optional(),contentEditor:ne().optional(),artifactId:ne().uuid().optional(),versionId:ne().uuid().optional(),newDashboard:it().optional(),picker:Xe("dashboards").optional(),draftRevision:tt().int().positive().optional(),mode:ln(["published","draft"]).optional()}).strict().optional()}).transform((n,e)=>{const o=n.selectionId??n.parameters?.artifactId,s=n.parameters?.versionId;return(n.parameters?.newDashboard&&o||n.selectionId&&n.parameters?.artifactId&&n.selectionId!==n.parameters.artifactId||s&&!o)&&e.addIssue({code:re.custom,message:"DASHBOARD_NAVIGATION_INVALID: provide one Artifact identity and an optional version"}),{artifactId:o,versionId:s,...n.parameters?.draftRevision?{draftRevision:n.parameters.draftRevision}:{},...n.page?{page:n.page}:{},...n.pageSize?{pageSize:n.pageSize}:{},...n.parameters?.mode?{mode:n.parameters.mode}:{},...n.parameters?.picker?{picker:n.parameters.picker}:{},...n.parameters?.newDashboard?{newDashboard:!0}:{}}}),mi=n=>JSON.stringify([n.artifactId??null,n.versionId??null,n.newDashboard??!1,n.mode??null,n.draftRevision??null,n.picker??null]),ws=he({artifactId:ne(),versionId:ne().nullish(),versionNumber:tt().optional(),title:ne().nullish(),updatedAt:ne().optional(),draftRevision:tt().optional(),canDelete:it().optional(),isDraft:it().optional(),baseVersionId:ne().nullish()}),qP=he({items:nt(ws),page:tt().int().positive(),hasMore:it()}),YP=ws.extend({manifest:vl,dependencies:Iv.optional()}),QP=he({meta:he({currentProject:Ov.nullable().optional(),access:he({project:it(),archived:it(),canReadDraft:it(),canEdit:it(),canManage:it()}).optional(),mode:ln(["published","draft"]).optional(),notice:Xe("not_published").optional(),pagination:he({page:tt(),pageSize:tt(),hasMore:it()}).optional(),navigationTarget:Tv.optional(),dashboards:nt(ws),sources:nt(he({source:wd,name:ne()})),saved:YP.optional(),versions:nt(ws).optional()})}),XP=["dashboard_create","dashboard_create_html","dashboard_update"],JP=he({dashboard:he({artifactId:ne().uuid(),draftRevision:tt().int().positive(),status:Xe("draft")})});function eR(n){let e=n;if(typeof e=="string")try{e=JSON.parse(e)}catch{return null}const o=JP.safeParse(e);return o.success?o.data.dashboard:null}const tR=he({channel:Xe("xpertai.remote_component"),protocolVersion:Xe(1),type:ne(),visible:it().optional(),scopeRevision:tt().optional(),kind:ne().optional(),resourceId:ne().optional(),instanceId:ne().optional(),requestId:ne().optional(),locale:ne().optional(),initialQuery:Dr(),data:Dr(),result:Dr(),message:ne().optional(),event:he({type:ne(),toolName:ne().optional(),data:he({output:Dr(),revision:tt().int().nonnegative().optional()}).optional()}).optional(),theme:he({mode:ne().optional(),density:ln(["default","compact"]).optional(),tokens:Nr(rr([ne(),tt()])).optional()}).optional()});let mr,bs,Av,Sd=!0;const nR=()=>Sd&&!document.hidden,kd=new Set,rR=n=>(kd.add(n),()=>{kd.delete(n)});function $v(){for(const n of Br.values())clearTimeout(n.timer),n.reject(new Error("Context changed"));Br.clear()}let oR=0;const Br=new Map;function Cd(n,e={}){window.parent.postMessage({channel:"xpertai.remote_component",protocolVersion:1,instanceId:mr,scopeRevision:bs,type:n,...e},"*")}function sR(n,e,o=()=>{}){let s;const a=l=>{if(l.source!==window.parent)return;const u=tR.safeParse(l.data);if(!u.success)return;const d=u.data;if(d.type==="init"){if(mr&&d.instanceId!==mr)return;bs!==d.scopeRevision&&($v(),s=void 0,o()),mr=d.instanceId,bs=d.scopeRevision,Av=d.initialQuery,Sd=d.visible??!0,document.documentElement.classList.toggle("dark",d.theme?.mode==="dark");for(const[m,v]of Object.entries(d.theme?.tokens??{})){const y=m.startsWith("--")?m:`--xui-${m.replace(/[._]/g,"-").replace(/[A-Z]/g,w=>`-${w.toLowerCase()}`)}`;document.documentElement.style.setProperty(y,String(v))}U0({density:d.theme?.density}),n(d.locale??"en-US",d.initialQuery);return}if(d.type==="hostEvent"&&mr&&d.instanceId===mr&&d.event?.type==="view.context.changed"){const m=d.event.data?.revision;m!==void 0&&m>(bs??-1)&&($v(),bs=m,s=void 0,o());return}if(!mr||d.instanceId!==mr||d.scopeRevision!==bs&&d.type!=="error")return;if(d.type==="visibility"){Sd=d.visible===!0;return}if(d.type==="editorEvent"&&d.kind==="prepareClose"&&d.resourceId&&d.requestId){Cd("closePrepared",{requestId:d.requestId,ready:[...kd].every(m=>m(d.resourceId))});return}if(d.type==="hostEvent"&&d.event?.type==="assistant.tool.completed"&&XP.includes(d.event.toolName??"")){const m=eR(d.event.data?.output);m&&`${m.artifactId}:${m.draftRevision}`!==s&&(s=`${m.artifactId}:${m.draftRevision}`,e(m.artifactId));return}if(!d.requestId)return;const h=Br.get(d.requestId);h&&(Br.delete(d.requestId),clearTimeout(h.timer),d.type==="error"?h.reject(new Error(d.message??"Request failed")):h.resolve(d.data??d.result))};return window.addEventListener("message",a),Cd("ready"),()=>{window.removeEventListener("message",a);for(const l of Br.values())clearTimeout(l.timer),l.reject(new Error("View closed"));Br.clear()}}function Tt(n,e){if(!mr)return Promise.reject(new Error("View is not connected"));const o=`dashboard-${++oR}`;return new Promise((s,a)=>{const l=window.setTimeout(()=>{Br.delete(o),a(new Error("Request timed out"))},27e4);Br.set(o,{resolve:s,reject:a,timer:l}),Cd(n,{requestId:o,...e})})}function iR(n){return Tt("invokeClientCommand",{commandKey:"assistant.context.set",payload:{key:"live_dashboard",context:n?{schemaVersion:1,...n}:{schemaVersion:1,mode:"new"}}})}async function yl(n,e,o,s){const a=Tv.parse(n),l=he({selectionId:ne().optional(),parameters:he({contentId:ne().uuid().optional(),contentProvider:ne().optional(),contentTitle:ne().optional(),contentEditor:ne().optional()}).optional()}).safeParse(Av);let u={};if(e&&l.success&&l.data.parameters?.contentId)if(l.data.selectionId===e)u={...l.data.parameters};else{const d=await Tt("invokeClientCommand",{commandKey:"workbench.content.resolve",payload:{providerKey:"live-dashboard.content",resourceId:e}});u=he({success:Xe(!0),navigation:he({parameters:Nr(Dr()).optional()})}).parse(d).navigation.parameters??{}}return Tt("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{...a,...e?{selectionId:e}:{},parameters:{...u,...s?{mode:s}:{},...o?{versionId:o}:{},...e?{}:{newDashboard:!0}}}})}const Mv={bindingUnavailable:"Some views could not load. Check your data access or retry. Available views are shown below.",publishShareBlocked:"This draft contains private or unavailable data sources and cannot replace the version used by the active team share. Remove those bindings or revoke the share before publishing. The published version and link are unchanged.",viewerControls:"Dashboard controls",hideViewerControls:"Hide dashboard controls",share:"Team sharing",teamReadOnly:"Team · read only",shareHint:"Share published versions with signed-in members of this organization. Drafts remain private.",sharePermissions:"Each viewer needs their own data source permissions. Sharing does not grant file or source access.",shareVersion:"Version policy",shareLatest:"Follow latest published version",shareFixed:"Pin a published version",shareLink:"Share link",copied:"Copied",openShared:"Open page",enableShare:"Enable sharing",updateShare:"Update sharing",revokeShare:"Revoke link",publishBeforeShare:"Publish a version before sharing.",privateDependencies:"This provider uses private script or file dependencies. Team access must be supported and granted separately before sharing.",sourceUnavailable:"A declared data source or provider is unavailable.",draft:"Working draft",publish:"Publish draft",confirm:"Confirm publication",confirmPublish:"Publish this saved revision as a new immutable version?",title:"Live dashboards",empty:"Create a dashboard with your Assistant, or import a definition.",import:"Import definition",save:"Save",cancel:"Cancel",refresh:"Refresh",apply:"Apply filters",loading:"Loading…",saved:"Saved",refreshed:"Updated",definition:"Dashboard definition",sources:"Available sources",version:"Version",partial:"Partial result — narrow the filters to retrieve all rows.",select:"Choose a dashboard",error:"The operation failed. Check your access and query definition.",all:"All",edit:"Edit working draft",history:"Version history",search:"Search dashboards…",noResults:"No dashboards found.",autoRefresh:"Auto refresh",off:"Off",seconds30:"Every 30 seconds",minute1:"Every minute",deleteDashboard:"Delete dashboard",deleteNamedDashboard:"Delete “{{title}}”",confirmDeleteDashboard:"Delete “{{title}}”? It will be removed from the dashboard list and shared links will stop working. Source data and workspace files will be kept.",deleting:"Deleting…",newDashboard:"New dashboard",privateScriptPublication:"This is a private Workspace script. Ask the Assistant to prepare a reusable dataset, review its pinned code/files in Settings → Analytics, and publish Organization visibility. Then update this dashboard to that dataset and publish a new dashboard version.",publishDefinitionAudience:"This dataset is private. Its owner can publish Organization visibility in Settings → Analytics; each viewer still needs upstream access.",notPublished:"This dashboard has not been published.",draftAccessDenied:"Only project editors can open working drafts.",loadMore:"Load more",published:"Published version",project:"Project",selectProject:"Select project",searchProjects:"Search projects",noProjects:"No available projects. Create a project in ChatKit.",projectsFailed:"Could not load projects. Please retry.",projectSwitchFailed:"Could not switch project. Please retry.",copyLink:"Copy link",selectProjectDashboard:"Select project and dashboard",more:"More actions",draftRevision:"Draft r{{revision}}",publishedVersion:"Published v{{version}}",dashboards:"Dashboards",previousPage:"Previous page",nextPage:"Next page",projectPages:"Project pages",dashboardPages:"Dashboard pages",dashboardsFailed:"Could not load dashboards. Please retry.",starterTitle:"Start with a working example",starterHint:"Examples use labeled synthetic data and save a draft in the current Project.",regionalTitle:"Regional sales · Beginner",regionalDescription:"Standard bar chart, region filter and detail table.",salesTitle:"Sales overview · Beginner",salesDescription:"Sales metrics, daily trend and regional breakdown.",qualityTitle:"Production quality · Beginner",qualityDescription:"Output, weighted yield and defects by production line.",tryExample:"Try demo",realDataHint:"Have your own data? Start by checking access and metric definitions.",realDataTitle:"Use my data",regionalPrompt:"Read the complete regional-sales recipe in the live-dashboard skill. Create a new regional sales dashboard in the current Project using its bundled demo file and standard chart definition. Verify region filters, sales amounts and detail rows; do not substitute another example or unrelated existing project data. Execute real queries and two filter checks, then save a labeled demo draft without publishing.",salesPrompt:"Read the complete sales-overview recipe in the live-dashboard skill. Create a new sales overview in the current Project using its bundled demo file and complete page. Include sales, orders, daily trends, region filters and details; do not substitute another example or unrelated existing project data. Execute real queries and two filter checks, then save a labeled demo draft without publishing.",qualityPrompt:"Read the complete production-quality recipe in the live-dashboard skill. Create a new production quality dashboard in the current Project using its bundled demo file and complete page. Include produced, good, weighted yield, defective units and production-line filters; do not rename a sales dashboard or substitute sales data. Execute real queries and two line-filter checks, then save a labeled demo draft without publishing.",realDataPrompt:"Create a dashboard using my real data. First inspect authorized sources in the current Project and confirm metric definitions. Do not substitute demo data.",superstoreTitle:"Superstore enterprise BI · Advanced",superstoreDescription:"Official retail teaching data: executive overview, product profitability, customers and returns. Requires a Data Xpert model.",superstorePrompt:"Read themes/README.md and the complete superstore recipe (Trend Workspace for overview, Profit Atlas for profitability, Customer Brief for customers and returns) in the live-dashboard skill. Use the authorized published Data Xpert SuperstoreOrders model to create three separate dashboards in the current Project: executive overview, product profitability, and customers and returns. Preserve demo labels; validate all data and region, year and category filters, then save three drafts using the complete HTML and every Binding. Do not publish. If the model is unavailable, explain data preparation; never substitute other examples or invented rows."},Ao=ev({en:Mv,"zh-Hans":{bindingUnavailable:"部分视图未能加载,请检查数据权限或重试。已成功查询的视图仍可查看。",publishShareBlocked:"草稿包含私有或不可用的数据源,无法更新当前团队分享。请移除这些数据绑定,或先撤销分享再发布。已发布版本和共享链接保持不变。",viewerControls:"看板操作",hideViewerControls:"收起看板操作",share:"团队分享",teamReadOnly:"团队 · 只读",shareHint:"向本组织已登录成员分享正式版本,草稿保持私有。",sharePermissions:"每位访问者仍需自己的数据源权限。分享不会授予文件或数据源访问权。",shareVersion:"版本策略",shareLatest:"跟随最新正式版本",shareFixed:"固定正式版本",shareLink:"分享链接",copied:"已复制",openShared:"打开独立页面",enableShare:"开启分享",updateShare:"更新分享",revokeShare:"撤销链接",publishBeforeShare:"请先发布一个正式版本。",privateDependencies:"此数据源使用私有脚本或文件依赖,需要单独支持并授予团队访问权限后才能分享。",sourceUnavailable:"声明的数据源或适配器不可用。",draft:"工作草稿",publish:"发布草稿",confirm:"确认发布",confirmPublish:"将这份已保存草稿发布为新的正式版本?",title:"实时看板",empty:"让 Assistant 创建看板,或导入看板定义。",import:"导入定义",save:"保存",cancel:"取消",refresh:"刷新",apply:"应用筛选",loading:"加载中…",saved:"已保存",refreshed:"已更新",definition:"看板定义",sources:"可用数据源",version:"版本",partial:"结果不完整,请缩小筛选范围以获取全部数据。",select:"选择看板",error:"操作失败,请检查访问权限和查询定义。",all:"全部",edit:"编辑工作草稿",history:"版本历史",search:"搜索看板…",noResults:"未找到匹配的看板。",autoRefresh:"自动刷新",off:"关闭",seconds30:"每 30 秒",minute1:"每分钟",deleteDashboard:"删除看板",deleteNamedDashboard:"删除“{{title}}”",confirmDeleteDashboard:"确定删除“{{title}}”?看板将从列表移除,共享链接将失效。数据源和工作区文件会保留。",deleting:"正在删除…",newDashboard:"新建看板",privateScriptPublication:"这是私有 Workspace 脚本。请让助手准备可复用数据集,在设置 → 分析中审核固定的代码和文件并发布为组织内可见,再将本看板更新为该数据集并发布新版本。",publishDefinitionAudience:"此数据集仍为私有。所有者可在设置 → 分析中发布为组织内可见;查看者仍须具备上游数据权限。",notPublished:"此看板尚未发布。",draftAccessDenied:"只有项目编辑者可以打开工作草稿。",loadMore:"加载更多",published:"正式版本",project:"项目",selectProject:"选择项目",searchProjects:"搜索项目",noProjects:"暂无可用项目,请在 ChatKit 中创建项目。",projectsFailed:"项目加载失败,请重试。",projectSwitchFailed:"项目切换失败,请重试。",copyLink:"复制链接",selectProjectDashboard:"选择项目和看板",more:"更多操作",draftRevision:"草稿 r{{revision}}",publishedVersion:"正式版 v{{version}}",dashboards:"看板",previousPage:"上一页",nextPage:"下一页",projectPages:"项目分页",dashboardPages:"看板分页",dashboardsFailed:"看板加载失败,请重试。",starterTitle:"从可运行样例开始",starterHint:"样例使用明确标注的演示数据,在当前项目内保存草稿。",regionalTitle:"区域销售 · 入门",regionalDescription:"标准柱状图、区域筛选与明细表。",salesTitle:"销售总览 · 入门",salesDescription:"销售指标、每日趋势与区域对比。",qualityTitle:"生产质量 · 入门",qualityDescription:"产量、加权良品率与产线缺陷分析。",tryExample:"体验样例",realDataHint:"已有业务数据?先检查权限与指标口径。",realDataTitle:"使用我的数据",regionalPrompt:"请读取 live-dashboard 技能中 regional-sales 的完整配方,使用该配方随附的演示文件和标准图表定义,在当前项目新建区域销售看板。核对区域筛选、销售额和明细;不要使用其他样例或项目中已有的不同数据替代。完成实际查询与两个筛选验证后保存草稿,保留演示标识,不发布。",salesPrompt:"请读取 live-dashboard 技能中 sales-overview 的完整配方,使用该配方随附的演示文件和完整页面,在当前项目新建销售总览看板。包含销售额、订单数、日趋势、区域筛选和明细;不要使用其他样例或项目中已有的不同数据替代。完成实际查询与两个筛选验证后保存草稿,保留演示标识,不发布。",qualityPrompt:"请读取 live-dashboard 技能中 production-quality 的完整配方,使用该配方随附的演示文件和完整页面,在当前项目新建生产质量看板。必须包含产量、良品数、加权良品率、不良品数和产线筛选;不要将销售数据或其他看板改名替代。完成实际查询与两个产线筛选验证后保存草稿,保留演示标识,不发布。",realDataPrompt:"使用我的真实业务数据制作看板。先检查当前项目有权限的数据源并确认指标口径,不得使用演示数据补齐。",superstoreTitle:"Superstore 企业分析 · 进阶",superstoreDescription:"官方零售教学数据:经营总览、商品盈利、客户与退货;需先连接 Data Xpert 模型。",superstorePrompt:"请读取 live-dashboard 技能中的 themes/README.md 和 superstore 完整配方(总览使用 Trend Workspace、盈利使用 Profit Atlas、客户退货使用 Customer Brief),在当前项目使用已授权的 Data Xpert SuperstoreOrders 发布模型,分别制作经营总览、商品盈利、客户与退货三个看板。必须保留演示标识;先核对全量及区域、年份、品类筛选,再按完整 HTML 和全部 Binding 保存三个草稿,不发布。若模型不可用,请说明数据准备步骤,不得用其他样例或自造数据替代。"},"zh-Hant":{bindingUnavailable:"部分視圖未能載入,請檢查資料權限或重試。成功查詢的視圖仍可查看。",publishShareBlocked:"草稿包含私有或無法使用的資料來源,無法更新目前的團隊分享。請移除這些資料繫結,或先撤銷分享再發佈。已發佈版本與分享連結保持不變。",viewerControls:"看板操作",hideViewerControls:"收起看板操作",share:"團隊分享",teamReadOnly:"團隊 · 唯讀",shareHint:"向本組織已登入成員分享正式版本,草稿保持私有。",sharePermissions:"每位訪問者仍需自己的資料來源權限。分享不會授予檔案或資料來源存取權。",shareVersion:"版本策略",shareLatest:"跟隨最新正式版本",shareFixed:"固定正式版本",shareLink:"分享連結",copied:"已複製",openShared:"開啟獨立頁面",enableShare:"開啟分享",updateShare:"更新分享",revokeShare:"撤銷連結",publishBeforeShare:"請先發佈一個正式版本。",privateDependencies:"此資料來源使用私有腳本或檔案依賴,需要單獨支援並授予團隊存取權後才能分享。",sourceUnavailable:"聲明的資料來源或適配器不可用。",draft:"工作草稿",publish:"發佈草稿",confirm:"確認發佈",confirmPublish:"將這份已儲存草稿發佈為新的正式版本?",title:"即時看板",empty:"讓 Assistant 建立看板,或匯入看板定義。",import:"匯入定義",save:"儲存",cancel:"取消",refresh:"重新整理",apply:"套用篩選",loading:"載入中…",saved:"已儲存",refreshed:"已更新",definition:"看板定義",sources:"可用資料來源",version:"版本",partial:"結果不完整,請縮小篩選範圍以取得全部資料。",select:"選擇看板",error:"操作失敗,請檢查存取權限和查詢定義。",all:"全部",edit:"編輯工作草稿",history:"版本歷史",search:"搜尋看板…",noResults:"找不到符合的看板。",autoRefresh:"自動重新整理",off:"關閉",seconds30:"每 30 秒",minute1:"每分鐘",deleteDashboard:"刪除看板",deleteNamedDashboard:"刪除「{{title}}」",confirmDeleteDashboard:"確定刪除「{{title}}」?看板將從清單移除,共享連結將失效。資料來源和工作區檔案會保留。",deleting:"正在刪除…",newDashboard:"新建看板",privateScriptPublication:"這是私人 Workspace 腳本。請讓助手準備可重用資料集,在設定 → 分析中審核固定的程式碼和檔案並發佈為組織內可見,再將本看板更新為該資料集並發佈新版本。",publishDefinitionAudience:"此資料集仍為私人。擁有者可在設定 → 分析中發佈為組織內可見;檢視者仍須具備上游資料權限。",notPublished:"此看板尚未發佈。",draftAccessDenied:"只有專案編輯者可以開啟工作草稿。",loadMore:"載入更多",published:"正式版本",project:"專案",selectProject:"選擇專案",searchProjects:"搜尋專案",noProjects:"暫無可用專案,請在 ChatKit 中建立專案。",projectsFailed:"專案載入失敗,請重試。",projectSwitchFailed:"專案切換失敗,請重試。",copyLink:"複製連結",selectProjectDashboard:"選擇專案與看板",more:"更多操作",draftRevision:"草稿 r{{revision}}",publishedVersion:"正式版 v{{version}}",dashboards:"看板",previousPage:"上一頁",nextPage:"下一頁",projectPages:"專案分頁",dashboardPages:"看板分頁",dashboardsFailed:"看板載入失敗,請重試。",starterTitle:"從可執行範例開始",starterHint:"範例使用明確標註的示範資料,在目前專案內儲存草稿。",regionalTitle:"區域銷售 · 入門",regionalDescription:"標準長條圖、區域篩選與明細表。",salesTitle:"銷售總覽 · 入門",salesDescription:"銷售指標、每日趨勢與區域比較。",qualityTitle:"生產品質 · 入門",qualityDescription:"產量、加權良率與產線缺陷分析。",tryExample:"體驗範例",realDataHint:"已有業務資料?先檢查權限與指標定義。",realDataTitle:"使用我的資料",regionalPrompt:"請讀取 live-dashboard 技能中 regional-sales 的完整配方,使用該配方隨附的示範檔案和標準圖表定義,在目前專案新建區域銷售看板。核對區域篩選、銷售額和明細;不要使用其他樣例或專案中既有的不同資料替代。完成實際查詢與兩個篩選驗證後儲存草稿,保留示範標示,不發布。",salesPrompt:"請讀取 live-dashboard 技能中 sales-overview 的完整配方,使用該配方隨附的示範檔案和完整頁面,在目前專案新建銷售總覽看板。包含銷售額、訂單數、每日趨勢、區域篩選和明細;不要使用其他樣例或專案中既有的不同資料替代。完成實際查詢與兩個篩選驗證後儲存草稿,保留示範標示,不發布。",qualityPrompt:"請讀取 live-dashboard 技能中 production-quality 的完整配方,使用該配方隨附的示範檔案和完整頁面,在目前專案新建生產品質看板。必須包含產量、良品數、加權良品率、不良品數和產線篩選;不要將銷售資料或其他看板改名替代。完成實際查詢與兩個產線篩選驗證後儲存草稿,保留示範標示,不發布。",realDataPrompt:"使用我的真實業務資料製作儀表板。先檢查目前專案有權限的資料來源並確認指標定義,不得使用示範資料補齊。",superstoreTitle:"Superstore 企業分析 · 進階",superstoreDescription:"官方零售教學資料:經營總覽、商品獲利、客戶與退貨;需先連接 Data Xpert 模型。",superstorePrompt:"請讀取 live-dashboard 技能中的 themes/README.md 與 superstore 完整配方(總覽使用 Trend Workspace、獲利使用 Profit Atlas、客戶退貨使用 Customer Brief),在目前專案使用已授權的 Data Xpert SuperstoreOrders 發佈模型,分別製作經營總覽、商品獲利、客戶與退貨三個看板。保留示範標識;核對全量與區域、年份、品類篩選後,使用完整 HTML 與全部 Binding 儲存三個草稿,不發佈。模型不可用時說明資料準備步驟,不得替換成其他樣例或自造資料。"}},"en");function jv(n){return Ao.setLocale(n),document.documentElement.lang=Ao.getLocale(),Object.fromEntries(Object.keys(Mv).map(e=>[e,Ao.t(e)]))}const aR={mode:"unrestricted"};function lR(n,e){return HP(n,{...e,networkPolicy:aR})}const cR=he({success:Xe(!0),data:he({schema:Xe("xpert.analytics.dataset"),datasetId:ne(),fields:nt(he({id:ne()}).passthrough()),rows:nt(Nr(rr([ne(),tt(),it(),Ir()]))),completeness:he({truncated:it()}).passthrough(),freshness:he({sourceFetchedAt:ne()}).passthrough(),provenance:he({executionId:ne()}).passthrough()}).passthrough()}),uR=f.forwardRef(function(e,o){const s=f.useRef(null),a=f.useRef(null),l=f.useRef(e);return l.current=e,f.useImperativeHandle(o,()=>({refresh(){a.current?.refresh()}}),[]),f.useEffect(()=>{const u=s.current;if(!u||!e.manifest.presentation)return;const d=e.manifest;let h;try{h=Dv(e.dependencies,d.presentation?.dependencies??[])}catch{l.current.onError("DOCUMENT_DEPENDENCY_INTEGRITY_FAILED"),l.current.onBusy(!1);return}const m=lR(u,{html:e.manifest.presentation.html,dependencies:h,context:{bindingIds:d.bindings.map(v=>v.id),defaults:Object.fromEntries(d.controls.filter(v=>v.defaultValue!==void 0).map(v=>[v.controlId,v.defaultValue??null])),locale:document.documentElement.lang||"en-US",theme:document.documentElement.classList.contains("dark")?"dark":"light"},query:async v=>cR.parse(await Tt("executeAction",{actionKey:"query-binding",input:{artifactId:e.artifactId,versionId:e.versionId,draftRevision:e.draftRevision,bindingId:v.bindingId,controls:v.controls}})).data,onBusy:v=>l.current.onBusy(v),onError:v=>l.current.onError(v),onResult:v=>l.current.onResult({partial:v.completeness.truncated,fetchedAt:v.freshness.sourceFetchedAt})});return a.current=m,()=>{m.dispose(),a.current=null}},[e.artifactId,e.versionId,e.draftRevision]),f.createElement("iframe",{ref:s,title:e.manifest.title,sandbox:"allow-scripts",className:"h-full w-full border-0"})});function dR({t:n,disabled:e,canEdit:o,canShare:s,canDelete:a,version:l,versions:u,onVersion:d,onEdit:h,onImport:m,onShare:v,onDelete:y,refreshSeconds:w,onRefreshSeconds:b,hasDashboard:S,updatedAt:C}){return f.createElement(xP,null,f.createElement(wP,{asChild:!0},f.createElement(at,{variant:"ghost",size:"icon",disabled:e,"aria-label":n.more,title:n.more},f.createElement(Jp,null))),f.createElement(bP,{align:"end",className:"w-60"},o&&S&&f.createElement(ul,{onSelect:h},f.createElement(Y0,null),n.edit),s&&f.createElement(ul,{onSelect:v},f.createElement(J0,null),n.share),o&&f.createElement(ul,{onSelect:m},f.createElement(eh,null),n.import),d&&f.createElement(vv,null,f.createElement(yv,null,f.createElement(Q0,null),n.history),f.createElement(hv,null,f.createElement(xv,{className:"max-h-64 w-48 overflow-y-auto"},f.createElement(mv,{value:l,onValueChange:d},f.createElement(hi,{value:"draft"},n.draft),u.filter(k=>k.versionId).map(k=>f.createElement(hi,{key:k.versionId,value:k.versionId},n.version," ",k.versionNumber)))))),f.createElement(vv,null,f.createElement(yv,{disabled:!S},f.createElement(Zc,null),n.autoRefresh),f.createElement(hv,null,f.createElement(xv,{className:"w-48"},f.createElement(mv,{value:w,onValueChange:b},f.createElement(hi,{value:"off"},n.off),f.createElement(hi,{value:"30"},n.seconds30),f.createElement(hi,{value:"60"},n.minute1))))),C&&f.createElement(f.Fragment,null,f.createElement(gv,null),f.createElement(SP,null,n.refreshed,f.createElement("time",{className:"block font-normal",dateTime:C},new Date(C).toLocaleString(document.documentElement.lang)))),a&&f.createElement(f.Fragment,null,f.createElement(gv,null),f.createElement(ul,{variant:"destructive",onSelect:y},f.createElement(eb,null),n.deleteDashboard))))}function Lv(n,e){const[o,s]=f.useState(""),[a,l]=f.useState(1),[u,d]=f.useState(null),[h,m]=f.useState(!0),[v,y]=f.useState(!1),[w,b]=f.useState(0);return f.useEffect(()=>{let S=!0;m(!0),y(!1),d(null);const C=window.setTimeout(()=>{Tt("executeAction",{actionKey:n,input:{search:o,page:a}}).then(k=>{const A=e.parse(he({success:Xe(!0),data:Dr()}).parse(k).data);S&&d(A)}).catch(()=>{S&&y(!0)}).finally(()=>{S&&m(!1)})},o?200:0);return()=>{S=!1,window.clearTimeout(C)}},[n,e,o,a,w]),{data:u,search:o,page:a,loading:h,failed:v,setPage:l,retry:()=>b(S=>S+1),setSearch:S=>{s(S),l(1)}}}function zv({page:n,hasMore:e,disabled:o,onChange:s,label:a,t:l}){return f.createElement("div",{className:"picker-pagination border-t",role:"group","aria-label":a},f.createElement(at,{variant:"ghost",size:"icon","aria-label":l.previousPage,disabled:o||n===1,onClick:()=>s(n-1)},f.createElement(q0,null)),f.createElement("span",{className:"text-sm text-muted-foreground","aria-live":"polite"},n),f.createElement(at,{variant:"ghost",size:"icon","aria-label":l.nextPage,disabled:o||!e,onClick:()=>s(n+1)},f.createElement(ya,null)))}function fR({project:n,disabled:e,onChange:o,t:s}){const a=Lv("projects",ZP),[l,u]=f.useState(n?.id??"");return f.useEffect(()=>{a.data&&u(a.data.items.find(d=>d.id===n?.id)?.id??a.data.items[0]?.id??"")},[a.data,n?.id]),f.createElement("section",{className:"picker-column border-r","aria-label":s.project},f.createElement("div",{className:"picker-column-heading"},f.createElement("h2",{className:"text-sm font-semibold"},s.project)),f.createElement(uv,{shouldFilter:!1,value:l,onValueChange:u,className:"picker-command"},f.createElement(dv,{value:a.search,onValueChange:a.setSearch,"aria-label":s.searchProjects,placeholder:s.searchProjects}),f.createElement(fv,{className:"picker-list","aria-label":s.selectProject,"aria-busy":e||a.loading},a.data?.items.map(d=>f.createElement(pv,{key:d.id,value:d.id,"data-current":d.id===n?.id,className:d.id===n?.id?"bg-secondary font-medium":void 0,"aria-current":d.id===n?.id?!0:void 0,disabled:e||a.loading,onSelect:()=>{d.id!==n?.id&&o(d.id)}},f.createElement("span",{className:"min-w-0 flex-1 truncate",title:d.name},d.name),d.id===n?.id&&f.createElement(Ys,{"aria-hidden":"true"}),f.createElement(ya,{"aria-hidden":"true"}))),a.loading&&f.createElement("p",{role:"status",className:"p-3 text-sm text-muted-foreground"},s.loading),a.failed&&f.createElement("div",{className:"p-3"},f.createElement("p",{role:"alert",className:"text-sm"},s.projectsFailed),f.createElement(at,{variant:"ghost",onClick:a.retry},s.refresh)),!a.loading&&!a.failed&&!a.data?.items.length&&f.createElement("p",{className:"p-3 text-sm text-muted-foreground"},s.noProjects))),f.createElement(zv,{page:a.page,hasMore:a.data?.hasMore??!1,disabled:e||a.loading,onChange:a.setPage,label:s.projectPages,t:s}))}function pR({value:n,disabled:e,onChange:o,onNew:s,t:a}){const l=Lv("dashboards",qP),[u,d]=f.useState(n);return f.useEffect(()=>{l.data&&d(l.data.items.find(h=>h.artifactId===n)?.artifactId??l.data.items[0]?.artifactId??"")},[l.data,n]),f.createElement("section",{className:"picker-column","aria-label":a.dashboards},f.createElement("div",{className:"picker-column-heading"},f.createElement("h2",{className:"text-sm font-semibold"},a.dashboards),s&&f.createElement(at,{variant:"ghost",size:"sm",disabled:e,onClick:s},f.createElement(eh,null),a.newDashboard)),f.createElement(uv,{shouldFilter:!1,value:u,onValueChange:d,className:"picker-command"},f.createElement(dv,{value:l.search,onValueChange:l.setSearch,"aria-label":a.search,placeholder:a.search}),f.createElement(fv,{className:"picker-list","aria-label":a.select,"aria-busy":e||l.loading},l.data?.items.map(h=>f.createElement(pv,{key:h.artifactId,value:h.artifactId,"data-current":h.artifactId===n,className:h.artifactId===n?"bg-secondary font-medium":void 0,"aria-current":h.artifactId===n?!0:void 0,disabled:e||l.loading,onSelect:()=>o(h.artifactId)},f.createElement("span",{className:"min-w-0 flex-1 truncate",title:h.title??h.artifactId},h.title??h.artifactId),h.artifactId===n&&f.createElement(Ys,{"aria-hidden":"true"}))),l.loading&&f.createElement("p",{role:"status",className:"p-3 text-sm text-muted-foreground"},a.loading),l.failed&&f.createElement("div",{className:"p-3"},f.createElement("p",{role:"alert",className:"text-sm"},a.dashboardsFailed),f.createElement(at,{variant:"ghost",onClick:l.retry},a.refresh)),!l.loading&&!l.failed&&!l.data?.items.length&&f.createElement("p",{className:"p-3 text-sm text-muted-foreground"},a.noResults))),f.createElement(zv,{page:l.page,hasMore:l.data?.hasMore??!1,disabled:e||l.loading,onChange:l.setPage,label:a.dashboardPages,t:a}))}function hR({value:n,selectedTitle:e,project:o,disabled:s,open:a,onOpenChange:l,onChange:u,onProjectChange:d,onNew:h,t:m}){const v=f.useId(),y=e??(n||m.select);return f.createElement(wv,{open:a,onOpenChange:l},f.createElement(bv,{role:"combobox","aria-label":m.selectProjectDashboard,"aria-expanded":a,"aria-controls":a?v:void 0,"aria-haspopup":"dialog",disabled:s,className:Le(yd({variant:"outline"}),"dashboard-picker h-10 justify-between rounded-[10px] border-border/70 bg-muted/20 font-normal shadow-none data-[state=open]:border-ring data-[state=open]:ring-2 data-[state=open]:ring-ring/10"),title:`${o?.name??m.selectProject} / ${y}`},f.createElement("span",{className:"picker-project truncate text-muted-foreground"},o?.name??m.selectProject),f.createElement(ya,{className:"shrink-0 opacity-50","aria-hidden":"true"}),f.createElement("span",{className:"picker-dashboard truncate font-medium"},y),f.createElement(Kc,{className:"shrink-0 opacity-50","aria-hidden":"true"})),f.createElement(Sv,{id:v,"aria-label":m.selectProjectDashboard,align:"start",className:"dashboard-picker-menu p-0"},f.createElement(fR,{project:o,disabled:s,onChange:d,t:m}),f.createElement(pR,{key:o?.id??"personal",value:n,disabled:s,onChange:u,onNew:o?h:void 0,t:m})))}const mR=he({published:he({versionId:ne(),versionNumber:tt(),title:ne().nullish()}).nullable(),issues:nt(he({code:ne(),bindingId:ne().optional()})),link:he({status:ne(),versionMode:ln(["latest","version"]),versionId:ne().nullish(),url:ne().url().optional()}).nullable()}),gR=he({success:Xe(!0),data:mR});function vR({artifactId:n,versionId:e,versions:o,t:s,onClose:a}){const[l,u]=f.useState(null),[d,h]=f.useState("latest"),[m,v]=f.useState(e??o[0]?.versionId??""),[y,w]=f.useState(!1),[b,S]=f.useState(""),[C,k]=f.useState(!1),A=f.useRef(null),N=f.useRef(0),O=f.useRef(!1);async function T(L){const Z=++N.current;w(!0),S(""),k(!1);try{const ae=gR.parse(await Tt("executeAction",{actionKey:L,input:{artifactId:n,...L==="share"?{versionMode:d}:{},...L!=="revoke-share"&&d==="version"&&m?{versionId:m}:{}}})).data;Z===N.current&&(u(ae),O.current||(O.current=!0,ae.link?.status==="active"&&(h(ae.link.versionMode),ae.link.versionId&&v(ae.link.versionId))))}catch{Z===N.current&&S(s.error)}finally{Z===N.current&&w(!1)}}f.useEffect(()=>(T("share-status"),()=>{++N.current}),[n,d,m]);const z=l?.link?.status==="active"?l.link:null,R=z&&z.versionMode===d&&(d==="latest"||z.versionId===m),B=L=>L==="DASHBOARD_PUBLISH_BEFORE_SHARING"?s.publishBeforeShare:L==="WORKSPACE_SCRIPT_PRIVATE_DEPENDENCIES"?s.privateScriptPublication:L==="ANALYTICS_DEFINITION_PRIVATE"?s.publishDefinitionAudience:L==="DASHBOARD_PRIVATE_DEPENDENCY"?s.privateDependencies:s.sourceUnavailable;return f.createElement(aP,{open:!0,onOpenChange:L=>{!L&&!y&&a()}},f.createElement(uP,null,f.createElement(dP,null,f.createElement(pP,null,s.share),f.createElement(hP,null,s.shareHint)),f.createElement("div",{className:"grid gap-4 py-2"},f.createElement("label",{className:"grid gap-2 text-sm"},s.shareVersion,f.createElement(dl,{value:d,disabled:y,onValueChange:L=>h(L==="version"?"version":"latest")},f.createElement(pl,{"aria-label":s.shareVersion},f.createElement(fl,null)),f.createElement(hl,null,f.createElement(xs,{value:"latest"},s.shareLatest),f.createElement(xs,{value:"version"},s.shareFixed)))),d==="version"&&f.createElement(dl,{value:m,disabled:y,onValueChange:v},f.createElement(pl,{"aria-label":s.version},f.createElement(fl,{placeholder:s.version})),f.createElement(hl,null,o.filter(L=>L.versionId).map(L=>f.createElement(xs,{key:L.versionId,value:L.versionId},s.version," ",L.versionNumber)))),l?.published&&f.createElement("p",{className:"text-sm text-muted-foreground"},l.published.title," · ",s.version," ",l.published.versionNumber),!!l?.issues.length&&f.createElement("ul",{className:"grid gap-2 text-sm text-destructive",role:"alert"},l.issues.map((L,Z)=>f.createElement("li",{key:Z},B(L.code),L.bindingId?` (${L.bindingId})`:""))),f.createElement("p",{className:"text-xs text-muted-foreground"},s.sharePermissions),z?.url&&f.createElement("div",{className:"grid gap-2"},f.createElement("label",{htmlFor:"dashboard-share-url",className:"text-sm"},s.shareLink),f.createElement(cv,{id:"dashboard-share-url",ref:A,readOnly:!0,value:z.url,onFocus:L=>L.target.select()}),f.createElement("div",{className:"flex gap-2"},f.createElement(at,{variant:"outline",onClick:()=>{A.current?.focus(),A.current?.select(),k(document.execCommand("copy"))}},C?s.copied:s.copyLink),f.createElement(at,{variant:"outline",onClick:async()=>{if(z.url){S("");try{he({success:Xe(!0)}).parse(await Tt("invokeClientCommand",{commandKey:"artifact.presentation.open",payload:{url:z.url}}))}catch{S(s.error)}}}},s.openShared))),b&&f.createElement("p",{role:"alert",className:"text-sm text-destructive"},b)),f.createElement(fP,null,z&&f.createElement(at,{variant:"outline",disabled:y,onClick:()=>{T("revoke-share")}},s.revokeShare),f.createElement(at,{variant:"outline",disabled:y,onClick:a},s.cancel),f.createElement(at,{disabled:y||!l||!!l.issues.length||!!R,onClick:()=>{T("share")}},z?s.updateShare:s.enableShare))))}function yR({children:n,busy:e,t:o}){const[s,a]=f.useState(!1),l=f.useRef(!1),u=f.useRef(null),d=f.useRef(!1),h=f.useRef(),m=()=>{clearTimeout(h.current)},v=b=>{m(),b||(l.current=!1),a(b)},y=b=>{b.pointerType==="mouse"&&(m(),a(!0))},w=b=>{b.pointerType!=="mouse"||l.current||(m(),h.current=setTimeout(()=>{l.current||a(!1)},180))};return f.useEffect(()=>()=>clearTimeout(h.current),[]),f.useEffect(()=>{if(!s)return;let b;const S=()=>{b=setTimeout(()=>{document.activeElement instanceof HTMLIFrameElement&&v(!1)},0)};return window.addEventListener("blur",S),()=>{window.removeEventListener("blur",S),clearTimeout(b)}},[s]),f.createElement(wv,{open:s,onOpenChange:v},f.createElement("div",{className:"viewer-controls-trigger"},f.createElement(bv,{asChild:!0},f.createElement("button",{ref:u,type:"button",className:Le(yd({variant:"outline",size:"icon"}),"viewer-controls-button"),"aria-label":o.viewerControls,title:o.viewerControls,onPointerEnter:y,onPointerLeave:w,onClick:b=>{b.preventDefault(),m(),l.current?v(!1):(l.current=!0,a(!0))}},e?f.createElement(Zc,{className:"motion-safe:animate-spin","aria-hidden":"true"}):f.createElement(Jp,{"aria-hidden":"true"}),e&&f.createElement("span",{role:"status",className:"sr-only"},o.loading)))),f.createElement(Sv,{align:"end",side:"bottom",sideOffset:8,collisionPadding:12,"aria-label":o.viewerControls,className:"viewer-controls-panel w-[min(44rem,calc(100vw-24px))] gap-0 p-0",onPointerEnter:y,onPointerLeave:w,onPointerDownCapture:()=>{l.current=!0},onFocusCapture:()=>{l.current=!0},onOpenAutoFocus:b=>{l.current||b.preventDefault()},onEscapeKeyDown:()=>{d.current=!0},onCloseAutoFocus:b=>{b.preventDefault(),d.current&&u.current?.focus({preventScroll:!0}),d.current=!1}},n,f.createElement(at,{variant:"ghost",size:"icon",className:"viewer-controls-close","aria-label":o.hideViewerControls,title:o.hideViewerControls,onClick:()=>{d.current=!0,v(!1)}},f.createElement(Xp,{"aria-hidden":"true"}))))}function xR({t:n,onStart:e}){return f.createElement("section",{className:"mx-auto grid max-w-2xl gap-5 p-6","aria-label":n.starterTitle},f.createElement("div",null,f.createElement("h2",null,n.starterTitle),f.createElement("p",{className:"text-sm text-muted-foreground"},n.starterHint)),f.createElement("div",{className:"grid gap-3"},[["regionalTitle","regionalDescription","regionalPrompt"],["salesTitle","salesDescription","salesPrompt"],["qualityTitle","qualityDescription","qualityPrompt"],["superstoreTitle","superstoreDescription","superstorePrompt"]].map(([o,s,a])=>f.createElement("div",{key:o,className:"flex flex-wrap items-center justify-between gap-3 border-b pb-3"},f.createElement("div",null,f.createElement("p",null,n[o]),f.createElement("p",{className:"text-sm text-muted-foreground"},n[s])),f.createElement(at,{variant:"outline",onClick:()=>{e(n[a])},"aria-label":`${n.tryExample}: ${n[o]}`},n.tryExample)))),f.createElement("div",{className:"flex flex-wrap items-center justify-between gap-3"},f.createElement("p",{className:"text-sm text-muted-foreground"},n.realDataHint),f.createElement(at,{onClick:()=>{e(n.realDataPrompt)}},n.realDataTitle)))}WP(document);const Ut=window.__DASHBOARD_READ_ONLY__===!0,xl=he({success:Xe(!0),data:Dr()}),wR=he({payload:Dr(),failures:nt(he({bindingId:ne(),datasetId:ne(),reason:Xe("unavailable")})).default([]),datasets:nt(he({completeness:he({truncated:it()}),freshness:he({sourceFetchedAt:ne()})}))});function bR(){const[n,e]=f.useState(()=>jv("en-US")),[o,s]=f.useState(!1),a=f.useRef(!1),[l,u]=f.useState([]),[d,h]=f.useState({project:!1,archived:!1,canReadDraft:!1,canEdit:!1,canManage:!1}),[m,v]=f.useState(null),[y,w]=f.useState("published"),b=f.useRef(),[S,C]=f.useState(""),[k,A]=f.useState({page:1,pageSize:50,hasMore:!1}),N=!Ut&&d.canEdit,O=!Ut&&d.canManage,[T,z]=f.useState([]),[R,B]=f.useState(null),[L,Z]=f.useState([]),[ae,be]=f.useState({}),[ue,ce]=f.useState(""),[Y,xe]=f.useState(!0),[le,te]=f.useState(""),[U,G]=f.useState(""),[$,D]=f.useState("off"),[P,W]=f.useState(null),[J,H]=f.useState(null),[oe,de]=f.useState(""),[K,se]=f.useState(!1),[Ne,$e]=f.useState(null),[We,Ue]=f.useState(!1),[ft,wt]=f.useState([]),[Hr,Cn]=f.useState(!1),ct=f.useRef(0),Wr=f.useRef(0),gr=f.useRef(0),un=f.useRef(),Kr=f.useRef(),_n=f.useRef(),gi=f.useRef(null),Kn=f.useRef({dirty:!1,resourceId:""}),Ss=P!==null&&P!==JSON.stringify(R?.manifest,null,2);Kn.current={dirty:Ss||Y&&P!==null,resourceId:R?.artifactId??""};const ks=Q=>{R&&Tt("invokeClientCommand",{commandKey:"workbench.content.status",payload:{resourceId:R.artifactId,title:R.title,dirty:Q}}).catch(()=>{})};f.useEffect(()=>{ks(Ss||Y&&P!==null)},[Ss,Y,P===null,R?.artifactId,R?.title]),f.useEffect(()=>rR(Q=>Q!==Kn.current.resourceId||!Kn.current.dirty),[]);function En(){un.current=void 0,C(""),ce(""),wt([]),B(null),W(null),Z([]),Cn(!1),$e(null),H(null),de(""),be({}),G(""),Ue(!1)}function Zn(Q){return iR(Q)}async function dn(Q,Re,Be=b.current,Qe=1,Ge){const qr=ct.current,Dt=++gr.current,Je=QP.parse(await Tt("requestData",{query:{page:Qe,pageSize:50,parameters:{...Ge?{draftRevision:Ge}:{},...Q?{artifactId:Q}:{},...Re?{versionId:Re}:{},...Be?{mode:Be}:{}}}})).meta;return qr===ct.current&&Dt===gr.current&&(u(Pn=>Qe===1?Je.dashboards:[...Pn,...Je.dashboards.filter(Yr=>!Pn.some(jo=>jo.artifactId===Yr.artifactId))]),z(Je.sources),Kr.current=Je.navigationTarget,v(Je.currentProject??null),Je.access&&h(Je.access),Je.pagination&&A(Je.pagination),Je.mode&&(b.current=Je.mode,w(Je.mode))),Je}async function vr(Q,Re){const Be=++ct.current;if(!Q.versionId&&!Q.draftRevision)throw new Error("Missing saved definition");if(ce(""),wt([]),G(""),Ue(!1),!Q.manifest.bindings.length)return;const Qe=wR.parse(xl.parse(await Tt("executeAction",{actionKey:"query",input:{artifactId:Q.artifactId,versionId:Q.versionId??void 0,...Q.isDraft?{draftRevision:Q.draftRevision}:{},controls:Re}})).data);Be===ct.current&&(wt(Qe.failures.map(Ge=>Ge.datasetId)),ce(Qe.datasets.length?kR(Qe.payload):""),Ue(Qe.datasets.some(Ge=>Ge.completeness.truncated)),G(Qe.datasets.map(Ge=>Ge.freshness.sourceFetchedAt).sort()[0]??""))}async function Zr(Q,Re,Be=!0,Qe=b.current,Ge){const qr=++ct.current;En(),un.current=Q;const Dt=await dn(Q,Re,Qe,1,Ge),Je=Dt.saved;if(qr!==ct.current)return;if(Dt.notice==="not_published"){C(n.notPublished),Ut||(await Zn(null),Be&&await yl(Dt.navigationTarget,Q,void 0,Dt.mode));return}if(!Je||!Je.versionId&&!Je.draftRevision)throw new Error("Dashboard is unavailable");const Pn=Object.fromEntries(Je.manifest.controls.filter(Yr=>Yr.defaultValue!==void 0).map(Yr=>[Yr.controlId,Yr.defaultValue??null]));B(Je),Z(Dt.versions??[]),be(Pn),G(""),Ue(!1),!(!Ut&&Be&&(_n.current=mi({artifactId:Q,versionId:Re,mode:Dt.mode}),await yl(Dt.navigationTarget,Q,Re,Dt.mode),qr!==ct.current))&&(Ut||await Zn({artifactId:Je.artifactId,...Dt.mode==="published"?{versionId:Je.versionId??void 0}:{draftRevision:Je.draftRevision}}),qr===ct.current&&!Je.manifest.presentation&&Je.manifest.bindings.length&&await vr(Je,Pn))}async function It(Q){const Re=++Wr.current;xe(!0),te("");try{await Q()}catch(Be){Re===Wr.current&&te(Be instanceof Error&&Be.message==="DASHBOARD_DRAFT_ACCESS_DENIED"?n.draftAccessDenied:Be instanceof Error?Be.message:n.error)}finally{Re===Wr.current&&xe(!1)}}const $o=f.useRef({saved:R,controls:ae,busy:Y,editor:P,confirmDelete:J});$o.current={saved:R,controls:ae,busy:Y,editor:P,confirmDelete:J};async function vi(){const Q=$o.current;if(!Q.saved){await Mo();return}if(Kn.current.dirty||Q.editor!==null)return;const Re=Q.saved,Be=++ct.current,Qe=await dn(Re.artifactId,Re.versionId??void 0,Re.isDraft?"draft":"published");if(Be!==ct.current||un.current!==Re.artifactId||Kn.current.dirty)return;const Ge=Qe.saved;if(!Ge)throw En(),new Error("Dashboard is unavailable");B(Ge),Z(Qe.versions??[]),Ut||await Zn({artifactId:Ge.artifactId,...Ge.isDraft?{draftRevision:Ge.draftRevision}:{versionId:Ge.versionId??void 0}}),Be===ct.current&&(Ge.manifest.presentation?Ge.draftRevision===Re.draftRevision&&Ge.versionId===Re.versionId&&gi.current?.refresh():await vr(Ge,Q.controls))}f.useEffect(()=>{if($==="off")return;let Q=!1,Re=!1;const Be=async()=>{const Ge=$o.current;if(!(Q||!nR()||Re||Ge.busy||Ge.confirmDelete||Ge.editor!==null||!Ge.saved?.manifest.bindings.length)){Re=!0;try{await vi()}catch{Q||te(n.error)}finally{Re=!1}}},Qe=window.setInterval(()=>{Be()},Number($)*1e3);return document.addEventListener("visibilitychange",Be),()=>{Q=!0,window.clearInterval(Qe),document.removeEventListener("visibilitychange",Be)}},[$,R?.artifactId,n.error]);async function Mo(Q=!1){const Re=++ct.current;En();const Be=await dn(void 0,void 0,Q?"draft":void 0);if(Re===ct.current){if(Ut&&Be.saved){await Zr(Be.saved.artifactId,Be.saved.versionId??void 0,!1);return}Q&&!Ut&&await Zn(null)}}f.useEffect(()=>sR((Q,Re)=>{e(jv(Q));const Be=GP.safeParse(Re??{});if(!Be.success){++ct.current,_n.current=void 0,En(),It(async()=>{throw new Error("DASHBOARD_NAVIGATION_INVALID")});return}const Qe=Be.data,Ge=mi(Qe);Ge!==_n.current&&(_n.current=Ge,a.current=!!Qe.picker,s(!!Qe.picker),It(()=>Qe.artifactId?Zr(Qe.artifactId,Qe.versionId,!1,Qe.mode,Qe.draftRevision):Mo(Qe.newDashboard)))},Q=>{if(Kn.current.dirty||un.current!==Q||!$o.current.saved?.isDraft){dn().catch(()=>{});return}It(vi)},()=>{++ct.current,++Wr.current,++gr.current,xe(!1),u([]),v(null),b.current=void 0,_n.current=void 0,En()}),[]);async function yi(){const Q=vl.parse(JSON.parse(P??"")),Re=R?.manifest.id===Q.id?R.versionId??null:null,Be=ws.parse(xl.parse(await Tt("executeAction",{actionKey:"save",input:{manifest:Q,expectedVersionId:Re,expectedRevision:R?.manifest.id===Q.id?R.draftRevision??0:0}})).data);await Zr(Be.artifactId,void 0,!0,"draft")}async function xi(){if(!Ne?.draftRevision)return;const Q=ws.parse(xl.parse(await Tt("executeAction",{actionKey:"publish",input:{artifactId:Ne.artifactId,expectedRevision:Ne.draftRevision,expectedCurrentVersionId:Ne.baseVersionId??Ne.versionId??null,confirmed:!0}}).catch(Re=>{throw Re instanceof Error&&Re.message==="DASHBOARD_PUBLISH_SHARE_BLOCKED"?($e(null),new Error(n.publishShareBlocked)):Re})).data);$e(null),await Zr(Q.artifactId,Q.versionId??void 0,!0,"published")}async function wi(){const Q=J;if(!(K||!Q?.canDelete||!Q.draftRevision)){de(""),se(!0);try{const Re=he({artifactId:Xe(Q.artifactId)}).parse(xl.parse(await Tt("executeAction",{actionKey:"delete",input:{artifactId:Q.artifactId,expectedRevision:Q.draftRevision,confirmed:!0}})).data);H(null),u(Be=>Be.filter(Qe=>Qe.artifactId!==Re.artifactId)),un.current===Re.artifactId&&(++ct.current,En(),_n.current=mi({artifactId:void 0,versionId:void 0}),await Promise.all([Zn(null),yl(Kr.current)])),await dn()}catch(Re){throw de(Re instanceof Error?Re.message:n.error),Re}finally{se(!1)}}}async function bi(Q){if(Q===m?.id)return;const Re=await Tt("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{target:"assistant.project",projectId:Q,viewKey:"live-dashboard__live-dashboard",parameters:{picker:"dashboards"}}});if(!he({success:Xe(!0)}).safeParse(Re).success)throw new Error(n.projectSwitchFailed)}function Gr(Q){s(Q),!Q&&a.current&&(a.current=!1,_n.current=mi({artifactId:void 0,versionId:void 0}),Tt("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{...Kr.current,parameters:{}}}).catch(()=>{}))}const yr=f.createElement("header",{className:"dashboard-toolbar border-b"},f.createElement("h1",{className:Ut?"toolbar-title text-base font-semibold":"sr-only"},Ut?R?.title??n.title:n.title),!Ut&&f.createElement(hR,{value:R?.artifactId??"",selectedTitle:R?.title,project:m??null,disabled:Y||K||P!==null,open:o,onOpenChange:Gr,t:n,onProjectChange:Q=>{It(()=>bi(Q))},onChange:Q=>{s(!1),a.current=!1,It(()=>Zr(Q))},onNew:N?()=>{s(!1),a.current=!1,It(async()=>{await Mo(!0),_n.current=mi({artifactId:void 0,versionId:void 0,newDashboard:!0}),await yl(Kr.current)})}:void 0}),R&&f.createElement(iP,{variant:"secondary",className:"toolbar-version",role:"status"},R.isDraft?Ao.t("draftRevision",{revision:R.draftRevision??"—"}):Ao.t("publishedVersion",{version:R.versionNumber??"—"})),f.createElement("div",{className:"toolbar-actions"},O&&R?.isDraft&&f.createElement(at,{disabled:Y||P!==null||!R.manifest.bindings.length,onClick:()=>$e(R),"aria-label":n.publish,title:n.publish},f.createElement(th,null),f.createElement("span",null,n.publish)),f.createElement(at,{variant:"ghost",size:"icon",disabled:Y||P!==null,"aria-label":n.refresh,title:n.refresh,onClick:()=>{It(vi)}},f.createElement(Zc,{className:Y?"motion-safe:animate-spin":void 0})),f.createElement(dR,{t:n,disabled:Y||K||P!==null,canEdit:N,hasDashboard:!!R,canShare:O&&!!R,canDelete:O&&!!R&&!!l.find(Q=>Q.artifactId===R.artifactId)?.canDelete,versions:L,version:R?.isDraft?"draft":R?.versionId??void 0,onVersion:!Ut&&d.canReadDraft&&R?Q=>{It(()=>Zr(R.artifactId,Q==="draft"?void 0:Q,!0,Q==="draft"?"draft":"published"))}:void 0,onEdit:()=>{It(async()=>{if(!R)return;const Q=await dn(R.artifactId,void 0,"draft");if(!Q.saved)throw new Error(n.error);await Zn({artifactId:Q.saved.artifactId,draftRevision:Q.saved.draftRevision}),B(Q.saved),Z(Q.versions??[]),W(JSON.stringify(Q.saved.manifest,null,2))})},onImport:()=>W(""),onShare:()=>Cn(!0),onDelete:()=>{de(""),H(l.find(Q=>Q.artifactId===R?.artifactId)??null)},refreshSeconds:$,onRefreshSeconds:D,updatedAt:U}))),Si=R&&!R.manifest.presentation&&!!R.manifest.controls.length&&f.createElement("section",{className:"flex flex-wrap items-end gap-3 border-b px-4 py-3"},R.manifest.controls.map(Q=>f.createElement(SR,{key:Q.controlId,control:Q,value:ae[Q.controlId]??null,disabled:Y,onChange:Re=>be(Be=>({...Be,[Q.controlId]:Re}))})),f.createElement(at,{type:"button",variant:"outline",disabled:Y,onClick:()=>{It(()=>vr(R,ae))}},n.apply));return f.createElement("main",{className:"dashboard-shell","data-read-only":Ut||void 0},Ut?f.createElement(yR,{busy:Y,t:n},yr,Si):yr,O&&Hr&&R&&f.createElement(vR,{artifactId:R.artifactId,versionId:R.versionId??void 0,versions:L,t:n,onClose:()=>Cn(!1)}),f.createElement(rv,{open:!!J,onOpenChange:Q=>{!Q&&!Y&&!K&&H(null)}},f.createElement(ov,null,f.createElement(iv,null,n.deleteDashboard),f.createElement(av,null,Ao.t("confirmDeleteDashboard",{title:J?.title??J?.artifactId??""})),f.createElement("p",{className:"break-all text-xs text-muted-foreground"},J?.artifactId),oe&&f.createElement("p",{role:"alert",className:"text-destructive"},oe),f.createElement(sv,null,f.createElement(lv,{disabled:Y||K},n.cancel),f.createElement(at,{variant:"destructive",disabled:Y||K,onClick:()=>{It(wi)}},K?n.deleting:n.deleteDashboard)))),f.createElement(rv,{open:!!Ne,onOpenChange:Q=>{!Q&&!Y&&$e(null)}},f.createElement(ov,null,f.createElement(iv,null,n.publish),f.createElement(av,null,n.confirmPublish," ",Ne?.manifest.title," · r",Ne?.draftRevision),f.createElement(sv,null,f.createElement(lv,{disabled:Y},n.cancel),f.createElement(at,{disabled:Y,onClick:()=>{It(xi)}},n.confirm)))),S&&f.createElement("p",{role:"status",className:"border-b px-4 py-3 text-muted-foreground"},S),le&&f.createElement("div",{role:"alert",className:"border-b px-4 py-3 text-destructive"},le),P!==null?f.createElement("section",{className:"editor-panel p-4"},f.createElement("label",{className:"text-sm font-medium",htmlFor:"definition"},n.definition),f.createElement(mP,{id:"definition",className:"min-h-0 flex-1 font-mono text-xs",value:P,onChange:Q=>{Kn.current.dirty=!0,ks(!0),W(Q.target.value)},disabled:Y}),f.createElement("details",{className:"text-xs"},f.createElement("summary",null,n.sources),f.createElement("pre",{className:"max-h-32 overflow-auto"},JSON.stringify(T,null,2))),f.createElement("div",{className:"flex justify-end gap-2"},f.createElement(at,{variant:"outline",onClick:()=>W(null),disabled:Y},n.cancel),f.createElement(at,{onClick:()=>{It(yi)},disabled:Y||!P.trim()},f.createElement(th,null),n.save))):f.createElement(f.Fragment,null,!Ut&&Si,ft.length>0&&f.createElement("div",{role:"alert",className:"px-4 py-2 text-sm"},f.createElement("p",null,n.bindingUnavailable),f.createElement("ul",null,ft.map(Q=>f.createElement("li",{key:Q},[...R?.manifest.charts??[],...R?.manifest.tables??[]].filter(Re=>Re.datasetId===Q).map(Re=>Re.title).join(" · ")||Q)))),We&&f.createElement("p",{role:"status",className:"px-4 py-2 text-sm"},n.partial),f.createElement("section",{className:"canvas-panel","aria-busy":Y},!Y&&!ue&&!R?.manifest.presentation&&!le&&!ft.length&&(!R&&N&&m?f.createElement(xR,{t:n,onStart:Q=>It(async()=>{await Zn(null),await Tt("invokeClientCommand",{commandKey:"assistant.chat.send_message",payload:{text:Q}})})}):f.createElement("p",{className:"p-6 text-muted-foreground"},n.empty)),R?.manifest.presentation&&f.createElement(uR,{ref:gi,artifactId:R.artifactId,versionId:R.versionId??void 0,draftRevision:R.isDraft?R.draftRevision:void 0,manifest:R.manifest,dependencies:R.dependencies??[],onBusy:xe,onError:te,onResult:Q=>{te(""),Ue(Q.partial),G(Q.fetchedAt)}}),ue&&f.createElement("iframe",{title:R?.manifest.title??n.title,sandbox:"allow-scripts",srcDoc:ue,className:"h-full w-full border-0"}))))}function SR({control:n,value:e,onChange:o,disabled:s}){return f.createElement("div",{className:"grid gap-1.5"},f.createElement("label",{htmlFor:n.controlId,className:"text-xs text-muted-foreground"},n.label),n.allowedValues?f.createElement(dl,{value:JSON.stringify(e),onValueChange:a=>o(rr([ne(),tt(),it(),Ir()]).parse(JSON.parse(a))),disabled:s},f.createElement(pl,{id:n.controlId,className:"w-44"},f.createElement(fl,null)),f.createElement(hl,null,n.allowedValues.map(a=>f.createElement(xs,{key:JSON.stringify(a),value:JSON.stringify(a)},String(a??"—"))))):n.type==="boolean"?f.createElement(dl,{value:String(e),onValueChange:a=>o(a==="true"),disabled:s},f.createElement(pl,{id:n.controlId,className:"w-44"},f.createElement(fl,null)),f.createElement(hl,null,f.createElement(xs,{value:"true"},"true"),f.createElement(xs,{value:"false"},"false"))):f.createElement(cv,{id:n.controlId,className:"w-44",disabled:s,type:n.type==="date"?"date":n.type==="number"?"number":"text",value:e===null?"":String(e),onChange:a=>o(a.target.value===""?null:n.type==="number"?Number(a.target.value):a.target.value)}))}function kR(n){const e=s=>JSON.stringify(s).replace(/</g,"\\u003c").replace(/>/g,"\\u003e"),o=`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data: blob:; font-src data:; connect-src 'none'; frame-src 'none'; base-uri 'none'; form-action 'none'"><script>window.__DATASCIENCE_ARTIFACT_HOSTING__={mode:'site_creator',readOnly:true,controls:{edit:false,exportHostedLink:false,hostedLink:false}};window.xpertai={toolOutput:${e(n)},toolResponseMetadata:${e(n)},availableDisplayModes:['inline','fullscreen'],displayMode:'fullscreen',hostContext:{availableDisplayModes:['inline','fullscreen'],displayMode:'fullscreen'}};
|
|
251
|
+
`,fI=me({channel:Je(ey),version:Je(ty),type:Je("ready"),sessionId:te().regex(/^[a-f0-9]{32}$/)}).strict(),pI=me({type:Je("diagnostic"),code:Je("DOCUMENT_BINDING_DENIED")}).strict();function hI(n,e){if(!n.ownerDocument.querySelector("meta[data-xpert-document-policy]"))throw new Error("Install the Artifact document frame policy before mounting a document");const o=rI.parse(e.context),s=Array.from(crypto.getRandomValues(new Uint8Array(16)),O=>O.toString(16).padStart(2,"0")).join(""),i=uI(e.html,s,e.dependencies,e.networkPolicy),l=new MessageChannel,u=new Set(o.bindingIds),d=new Set,h=new Set,m=new Map,y=n.ownerDocument.defaultView;let v=!1,x=!1,b=0,S=Date.now();n.setAttribute("sandbox","allow-scripts"),n.referrerPolicy="no-referrer";const C=(O,R)=>{try{O?.(R)}catch{}},k=O=>{x||l.port1.postMessage(O)},N=(O,R)=>{k({type:"result",requestId:O,ok:!1,code:R}),C(e.onError,R)};l.port1.onmessage=async O=>{if(x)return;const R=pI.safeParse(O.data);if(R.success){C(e.onError,R.data.code);return}const L=nI.safeParse(O.data);if(!L.success){C(e.onError,"DOCUMENT_INVALID_REQUEST");return}const j={type:L.data.type,requestId:L.data.requestId,bindingId:L.data.bindingId,controls:L.data.controls};if(!u.has(j.bindingId)){N(j.requestId,"DOCUMENT_BINDING_DENIED");return}if(Date.now()-S>=6e4&&(b=0,S=Date.now(),d.clear()),h.has(j.requestId)||d.has(j.requestId)){N(j.requestId,"DOCUMENT_REQUEST_REPLAY");return}if(h.size>=8||++b>60){N(j.requestId,"DOCUMENT_QUERY_LIMIT");return}d.add(j.requestId),h.add(j.requestId),m.set(j.bindingId,j.requestId),C(e.onBusy,!0);try{const B=await e.query(j);x||(k({type:"result",requestId:j.requestId,ok:!0,dataset:B}),m.get(j.bindingId)===j.requestId&&C(e.onResult,B))}catch{x||(k({type:"result",requestId:j.requestId,ok:!1,code:"DOCUMENT_QUERY_FAILED"}),m.get(j.bindingId)===j.requestId&&C(e.onError,"DOCUMENT_QUERY_FAILED"))}finally{h.delete(j.requestId),x||C(e.onBusy,h.size>0)}};const D=O=>{var R;if(x||v||O.source!==n.contentWindow)return;const L=fI.safeParse(O.data);!L.success||L.data.sessionId!==s||(v=!0,(R=n.contentWindow)==null||R.postMessage({channel:ey,version:ty,type:"init",sessionId:s,context:o},"*",[l.port2]))};return y.addEventListener("message",D),l.port1.start(),n.srcdoc=i,{refresh(){k({type:"refresh"})},dispose(){x||(x=!0,y.removeEventListener("message",D),l.port1.close(),l.port2.close(),C(e.onBusy,!1))}}}function mI(n){if(n.querySelector("meta[data-xpert-document-policy]"))return;const e=n.createElement("meta");e.httpEquiv="Content-Security-Policy",e.content="frame-src 'none'",e.dataset.xpertDocumentPolicy="1",n.head.prepend(e)}const qn=te().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),Pl=me({schema:Je("xpert.live-dashboard"),id:te().uuid(),title:te().min(1).max(160),bindings:nt(Jv).max(8),presentation:me({type:Je("html"),html:ry,dependencies:Md.optional()}).strict().optional(),controls:nt(me({controlId:qn,type:en(["string","number","boolean","date"]),defaultValue:lr([te(),tt(),ot(),Ar()]).optional(),allowedValues:nt(lr([te(),tt(),ot(),Ar()])).max(200).optional(),label:te().min(1).max(160)}).strict()).max(24),charts:nt(me({id:qn,title:te().min(1).max(160),type:en(["bar","line","area","pie","scatter"]),datasetId:qn,x:qn,y:qn,color:qn.optional()}).strict()).max(20),tables:nt(me({id:qn,title:te().min(1).max(160),datasetId:qn,fields:nt(qn).min(1).max(30)}).strict()).max(20)}).strict().superRefine((n,e)=>{const o=(s,i)=>{new Set(s).size!==s.length&&e.addIssue({code:"custom",message:`Duplicate ${i}`})};!n.bindings.length&&(n.presentation||n.controls.length||n.charts.length||n.tables.length)&&e.addIssue({code:"custom",message:"An unconfigured draft must contain no views or controls"}),o(n.bindings.map(s=>s.id),"binding"),o(n.bindings.map(s=>s.output.datasetId),"dataset"),o(n.controls.map(s=>s.controlId),"control"),o([...n.charts,...n.tables].map(s=>s.id),"view"),n.bindings.length&&!n.presentation&&!n.charts.length&&!n.tables.length&&e.addIssue({code:"custom",message:"At least one chart or table is required"}),n.presentation&&(n.charts.length||n.tables.length)&&e.addIssue({code:"custom",message:"HTML presentation owns its charts; use empty charts/tables arrays"});for(const s of n.controls){const i=n.bindings.flatMap(u=>u.parameters.filter(d=>d.controlId===s.controlId));i.length||e.addIssue({code:"custom",message:"Control is not bound to a query parameter"});const l=[...s.defaultValue!==void 0?[s.defaultValue]:[],...s.allowedValues??[]];l.some(u=>u!==null&&(s.type==="number"?typeof u!="number"||!Number.isFinite(u):s.type==="boolean"?typeof u!="boolean":typeof u!="string"))&&e.addIssue({code:"custom",message:"Control value has an incompatible type"}),s.allowedValues&&s.defaultValue!==void 0&&!s.allowedValues.includes(s.defaultValue)&&e.addIssue({code:"custom",message:"Default control value is not allowed"});for(const u of i)u.defaultValue!==void 0&&s.defaultValue!==void 0&&u.defaultValue!==s.defaultValue&&e.addIssue({code:"custom",message:"Control and parameter defaults disagree"}),l.some(d=>d===null?u.required:u.allowedValues&&!u.allowedValues.includes(d))&&e.addIssue({code:"custom",message:"Control values conflict with parameter restrictions"})}for(const s of n.bindings)for(const i of s.parameters){const l=n.controls.find(u=>u.controlId===i.controlId);(!l||l.type!==i.type)&&e.addIssue({code:"custom",message:"Control mapping is missing or has an incompatible type"})}for(const s of[...n.charts,...n.tables]){const i=n.bindings.find(u=>u.output.datasetId===s.datasetId)?.output,l="fields"in s?s.fields:[s.x,s.y,...s.color?[s.color]:[]];(!i||l.some(u=>!i.fields.some(d=>d.id===u)))&&e.addIssue({code:"custom",message:"View references an undeclared Dataset field"}),"y"in s&&!i?.fields.some(u=>u.id===s.y&&["float64","int64","decimal"].includes(u.logicalType))&&e.addIssue({code:"custom",message:"Chart measure must be numeric"}),"y"in s&&s.type!=="scatter"&&i?.grain.some(u=>u!==s.x&&u!==s.color)&&e.addIssue({code:"custom",message:"Chart must encode every Dataset grain dimension in x/color; use another aggregated binding for totals"})}});Pl.innerType().pick({title:!0,bindings:!0,controls:!0,charts:!0,tables:!0,presentation:!0}).partial().strict();const gI=Mr(lr([te().max(4e3),tt().finite(),ot(),Ar()]));me({manifest:Pl,expectedVersionId:te().uuid().nullable(),expectedRevision:tt().int().nonnegative().default(0)}).strict(),me({artifactId:te().uuid(),versionId:te().uuid().optional(),draftRevision:tt().int().positive().optional(),controls:gI.default({})}).strict().extend({bindingId:qn}).strict(),me({search:te().trim().max(200).default(""),page:tt().int().positive().default(1)}).strict().extend({projectId:te().uuid().optional()});const ly=me({id:te().uuid(),name:te()}),vI=me({items:nt(ly),page:tt().int().positive(),hasMore:ot()}),cy=me({target:Je("workbench.view"),viewKey:Je("live-dashboard__live-dashboard")}).strict(),yI=me({selectionId:te().uuid().optional(),page:tt().int().positive().optional(),pageSize:tt().int().min(1).max(100).optional(),parameters:me({pipelineInstanceId:te().uuid().optional(),pipelineRoundId:te().uuid().optional(),pipelineNodeId:te().uuid().optional(),contentProvider:te().optional(),contentId:te().uuid().optional(),contentTitle:te().optional(),contentEditor:te().optional(),artifactId:te().uuid().optional(),versionId:te().uuid().optional(),newDashboard:ot().optional(),picker:Je("dashboards").optional(),draftRevision:tt().int().positive().optional(),mode:en(["published","draft"]).optional()}).strict().optional()}).transform((n,e)=>{const o=n.selectionId??n.parameters?.artifactId,s=n.parameters?.versionId;return(n.parameters?.newDashboard&&o||n.selectionId&&n.parameters?.artifactId&&n.selectionId!==n.parameters.artifactId||s&&!o)&&e.addIssue({code:oe.custom,message:"DASHBOARD_NAVIGATION_INVALID: provide one Artifact identity and an optional version"}),{artifactId:o,versionId:s,...n.parameters?.draftRevision?{draftRevision:n.parameters.draftRevision}:{},...n.page?{page:n.page}:{},...n.pageSize?{pageSize:n.pageSize}:{},...n.parameters?.mode?{mode:n.parameters.mode}:{},...n.parameters?.picker?{picker:n.parameters.picker}:{},...n.parameters?.newDashboard?{newDashboard:!0}:{}}}),ki=n=>JSON.stringify([n.artifactId??null,n.versionId??null,n.newDashboard??!1,n.mode??null,n.draftRevision??null,n.picker??null]),jo=me({artifactId:te(),versionId:te().nullish(),versionNumber:tt().optional(),title:te().nullish(),updatedAt:te().optional(),draftRevision:tt().optional(),canDelete:ot().optional(),isDraft:ot().optional(),baseVersionId:te().nullish()}),xI=me({items:nt(jo),page:tt().int().positive(),hasMore:ot(),canEdit:ot().default(!1),mode:en(["draft","published"]).optional()}),wI=jo.extend({manifest:Pl,dependencies:sy.optional()}),bI=me({meta:me({currentProject:ly.nullable().optional(),access:me({project:ot(),archived:ot(),canReadDraft:ot(),canEdit:ot(),canManage:ot()}).optional(),mode:en(["published","draft"]).optional(),notice:Je("not_published").optional(),pagination:me({page:tt(),pageSize:tt(),hasMore:ot()}).optional(),navigationTarget:cy.optional(),dashboards:nt(jo),selectedDashboard:jo.optional(),sources:nt(me({source:$d,name:te()})),saved:wI.optional(),versions:nt(jo).optional()})}),SI=["dashboard_create","dashboard_create_html","dashboard_update"],CI=me({dashboard:me({artifactId:te().uuid(),draftRevision:tt().int().positive(),status:Je("draft")})});function kI(n){let e=n;if(typeof e=="string")try{e=JSON.parse(e)}catch{return null}const o=CI.safeParse(e);return o.success?o.data.dashboard:null}const EI=me({channel:Je("xpertai.remote_component"),protocolVersion:Je(1),type:te(),visible:ot().optional(),scopeRevision:tt().optional(),kind:te().optional(),resourceId:te().optional(),instanceId:te().optional(),requestId:te().optional(),locale:te().optional(),initialQuery:$r(),data:$r(),result:$r(),message:te().optional(),event:me({type:te(),toolName:te().optional(),data:me({output:$r(),revision:tt().int().nonnegative().optional()}).optional()}).optional(),theme:me({mode:te().optional(),density:en(["default","compact"]).optional(),tokens:Mr(lr([te(),tt()])).optional()}).optional()});let br,Es,uy,jd=!0;const _I=()=>jd&&!document.hidden,Ld=new Set,PI=n=>(Ld.add(n),()=>{Ld.delete(n)});function dy(){for(const n of Gr.values())clearTimeout(n.timer),n.reject(new Error("Context changed"));Gr.clear()}let RI=0;const Gr=new Map;function Fd(n,e={}){window.parent.postMessage({channel:"xpertai.remote_component",protocolVersion:1,instanceId:br,scopeRevision:Es,type:n,...e},"*")}function II(n,e,o=()=>{}){let s;const i=l=>{if(l.source!==window.parent)return;const u=EI.safeParse(l.data);if(!u.success)return;const d=u.data;if(d.type==="init"){if(br&&d.instanceId!==br)return;Es!==d.scopeRevision&&(dy(),s=void 0,o()),br=d.instanceId,Es=d.scopeRevision,uy=d.initialQuery,jd=d.visible??!0,document.documentElement.classList.toggle("dark",d.theme?.mode==="dark");for(const[m,y]of Object.entries(d.theme?.tokens??{})){const v=m.startsWith("--")?m:`--xui-${m.replace(/[._]/g,"-").replace(/[A-Z]/g,x=>`-${x.toLowerCase()}`)}`;document.documentElement.style.setProperty(v,String(y))}vb({density:d.theme?.density}),n(d.locale??"en-US",d.initialQuery);return}if(d.type==="hostEvent"&&br&&d.instanceId===br&&d.event?.type==="view.context.changed"){const m=d.event.data?.revision;m!==void 0&&m>(Es??-1)&&(dy(),Es=m,s=void 0,o());return}if(!br||d.instanceId!==br||d.scopeRevision!==Es&&d.type!=="error")return;if(d.type==="visibility"){jd=d.visible===!0;return}if(d.type==="editorEvent"&&d.kind==="prepareClose"&&d.resourceId&&d.requestId){Fd("closePrepared",{requestId:d.requestId,ready:[...Ld].every(m=>m(d.resourceId))});return}if(d.type==="hostEvent"&&d.event?.type==="assistant.tool.completed"&&SI.includes(d.event.toolName??"")){const m=kI(d.event.data?.output);m&&`${m.artifactId}:${m.draftRevision}`!==s&&(s=`${m.artifactId}:${m.draftRevision}`,e(m.artifactId));return}if(!d.requestId)return;const h=Gr.get(d.requestId);h&&(Gr.delete(d.requestId),clearTimeout(h.timer),d.type==="error"?h.reject(new Error(d.message??"Request failed")):h.resolve(d.data??d.result))};return window.addEventListener("message",i),Fd("ready"),()=>{window.removeEventListener("message",i);for(const l of Gr.values())clearTimeout(l.timer),l.reject(new Error("View closed"));Gr.clear()}}function Nt(n,e){if(!br)return Promise.reject(new Error("View is not connected"));const o=`dashboard-${++RI}`;return new Promise((s,i)=>{const l=window.setTimeout(()=>{Gr.delete(o),i(new Error("Request timed out"))},27e4);Gr.set(o,{resolve:s,reject:i,timer:l}),Fd(n,{requestId:o,...e})})}function TI(n){return Nt("invokeClientCommand",{commandKey:"assistant.context.set",payload:{key:"live_dashboard",context:n?{schemaVersion:1,...n}:{schemaVersion:1,mode:"new"}}})}async function Rl(n,e,o,s){const i=cy.parse(n),l=me({selectionId:te().optional(),parameters:me({contentId:te().uuid().optional(),contentProvider:te().optional(),contentTitle:te().optional(),contentEditor:te().optional()}).optional()}).safeParse(uy);let u={};if(e&&l.success&&l.data.parameters?.contentId)if(l.data.selectionId===e)u={...l.data.parameters};else{const d=await Nt("invokeClientCommand",{commandKey:"workbench.content.resolve",payload:{providerKey:"live-dashboard.content",resourceId:e}});u=me({success:Je(!0),navigation:me({parameters:Mr($r()).optional()})}).parse(d).navigation.parameters??{}}return Nt("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{...i,...e?{selectionId:e}:{},parameters:{...u,...s?{mode:s}:{},...o?{versionId:o}:{},...e?{}:{newDashboard:!0}}}})}const fy={bindingUnavailable:"Some views could not load. Check your data access or retry. Available views are shown below.",publishShareBlocked:"This draft contains private or unavailable data sources and cannot replace the version used by the active team share. Remove those bindings or revoke the share before publishing. The published version and link are unchanged.",viewerControls:"Dashboard controls",hideViewerControls:"Hide dashboard controls",share:"Team sharing",teamReadOnly:"Team · read only",shareHint:"Share published versions with signed-in members of this organization. Drafts remain private.",sharePermissions:"Each viewer needs their own data source permissions. Sharing does not grant file or source access.",shareVersion:"Version policy",shareLatest:"Follow latest published version",shareFixed:"Pin a published version",shareLink:"Share link",copied:"Copied",openShared:"Open page",enableShare:"Enable sharing",updateShare:"Update sharing",revokeShare:"Revoke link",publishBeforeShare:"Publish a version before sharing.",privateDependencies:"This provider uses private script or file dependencies. Team access must be supported and granted separately before sharing.",sourceUnavailable:"A declared data source or provider is unavailable.",draft:"Working draft",publish:"Publish draft",confirm:"Confirm publication",confirmPublish:"Publish this saved revision as a new immutable version?",title:"Live dashboards",empty:"Create a dashboard with your Assistant, or import a definition.",import:"Import definition",save:"Save",cancel:"Cancel",refresh:"Refresh",apply:"Apply filters",loading:"Loading…",saved:"Saved",refreshed:"Updated",definition:"Dashboard definition",sources:"Available sources",version:"Version",partial:"Partial result — narrow the filters to retrieve all rows.",select:"Choose a dashboard",error:"The operation failed. Check your access and query definition.",all:"All",edit:"Edit working draft",history:"Version history",search:"Search dashboards…",noResults:"No dashboards found.",autoRefresh:"Auto refresh",off:"Off",seconds30:"Every 30 seconds",minute1:"Every minute",deleteDashboard:"Delete dashboard",deleteNamedDashboard:"Delete “{{title}}”",confirmDeleteDashboard:"Delete “{{title}}”? It will be removed from the dashboard list and shared links will stop working. Source data and workspace files will be kept.",deleting:"Deleting…",newDashboard:"New dashboard",privateScriptPublication:"This is a private Workspace script. Ask the Assistant to prepare a reusable dataset, review its pinned code/files in Settings → Analytics, and publish Organization visibility. Then update this dashboard to that dataset and publish a new dashboard version.",publishDefinitionAudience:"This dataset is private. Its owner can publish Organization visibility in Settings → Analytics; each viewer still needs upstream access.",notPublished:"This dashboard has not been published.",draftAccessDenied:"Only project editors can open working drafts.",loadMore:"Load more",published:"Published version",project:"Project",selectProject:"Select project",searchProjects:"Search projects",noProjects:"No available projects. Create a project in ChatKit.",projectsFailed:"Could not load projects. Please retry.",projectSwitchFailed:"Could not switch project. Please retry.",copyLink:"Copy link",selectProjectDashboard:"Select project and dashboard",more:"More actions",draftRevision:"Draft r{{revision}}",publishedVersion:"Published v{{version}}",dashboards:"Dashboards",previousPage:"Previous page",nextPage:"Next page",projectPages:"Project pages",dashboardPages:"Dashboard pages",dashboardsFailed:"Could not load dashboards. Please retry.",starterTitle:"Start with a working example",starterHint:"Examples use labeled synthetic data and save a draft in the current Project.",regionalTitle:"Regional sales · Beginner",regionalDescription:"Standard bar chart, region filter and detail table.",salesTitle:"Sales overview · Beginner",salesDescription:"Sales metrics, daily trend and regional breakdown.",qualityTitle:"Production quality · Beginner",qualityDescription:"Output, weighted yield and defects by production line.",tryExample:"Try demo",realDataHint:"Have your own data? Start by checking access and metric definitions.",realDataTitle:"Use my data",regionalPrompt:"Read the complete regional-sales recipe in the live-dashboard skill. Create a new regional sales dashboard in the current Project using its bundled demo file and standard chart definition. Verify region filters, sales amounts and detail rows; do not substitute another example or unrelated existing project data. Execute real queries and two filter checks, then save a labeled demo draft without publishing.",salesPrompt:"Read the complete sales-overview recipe in the live-dashboard skill. Create a new sales overview in the current Project using its bundled demo file and complete page. Include sales, orders, daily trends, region filters and details; do not substitute another example or unrelated existing project data. Execute real queries and two filter checks, then save a labeled demo draft without publishing.",qualityPrompt:"Read the complete production-quality recipe in the live-dashboard skill. Create a new production quality dashboard in the current Project using its bundled demo file and complete page. Include produced, good, weighted yield, defective units and production-line filters; do not rename a sales dashboard or substitute sales data. Execute real queries and two line-filter checks, then save a labeled demo draft without publishing.",realDataPrompt:"Create a dashboard using my real data. First inspect authorized sources in the current Project and confirm metric definitions. Do not substitute demo data.",superstoreTitle:"Superstore enterprise BI · Advanced",superstoreDescription:"Official retail teaching data: executive overview, product profitability, customers and returns. Requires a Data Xpert model.",superstorePrompt:"Read themes/README.md and the complete superstore recipe (Trend Workspace for overview, Profit Atlas for profitability, Customer Brief for customers and returns) in the live-dashboard skill. Use the authorized published Data Xpert SuperstoreOrders model to create three separate dashboards in the current Project: executive overview, product profitability, and customers and returns. Preserve demo labels; validate all data and region, year and category filters, then save three drafts using the complete HTML and every Binding. Do not publish. If the model is unavailable, explain data preparation; never substitute other examples or invented rows.",deleteDashboardNamed:"Delete dashboard “{{title}}”",loadingMore:"Loading more…",dashboardUpdatedAt:"Updated {{time}}",updateTimeUnavailable:"Update time unavailable"},Yn=Rv({en:fy,"zh-Hans":{bindingUnavailable:"部分视图未能加载,请检查数据权限或重试。已成功查询的视图仍可查看。",publishShareBlocked:"草稿包含私有或不可用的数据源,无法更新当前团队分享。请移除这些数据绑定,或先撤销分享再发布。已发布版本和共享链接保持不变。",viewerControls:"看板操作",hideViewerControls:"收起看板操作",share:"团队分享",teamReadOnly:"团队 · 只读",shareHint:"向本组织已登录成员分享正式版本,草稿保持私有。",sharePermissions:"每位访问者仍需自己的数据源权限。分享不会授予文件或数据源访问权。",shareVersion:"版本策略",shareLatest:"跟随最新正式版本",shareFixed:"固定正式版本",shareLink:"分享链接",copied:"已复制",openShared:"打开独立页面",enableShare:"开启分享",updateShare:"更新分享",revokeShare:"撤销链接",publishBeforeShare:"请先发布一个正式版本。",privateDependencies:"此数据源使用私有脚本或文件依赖,需要单独支持并授予团队访问权限后才能分享。",sourceUnavailable:"声明的数据源或适配器不可用。",draft:"工作草稿",publish:"发布草稿",confirm:"确认发布",confirmPublish:"将这份已保存草稿发布为新的正式版本?",title:"实时看板",empty:"让 Assistant 创建看板,或导入看板定义。",import:"导入定义",save:"保存",cancel:"取消",refresh:"刷新",apply:"应用筛选",loading:"加载中…",saved:"已保存",refreshed:"已更新",definition:"看板定义",sources:"可用数据源",version:"版本",partial:"结果不完整,请缩小筛选范围以获取全部数据。",select:"选择看板",error:"操作失败,请检查访问权限和查询定义。",all:"全部",edit:"编辑工作草稿",history:"版本历史",search:"搜索看板…",noResults:"未找到匹配的看板。",autoRefresh:"自动刷新",off:"关闭",seconds30:"每 30 秒",minute1:"每分钟",deleteDashboard:"删除看板",deleteNamedDashboard:"删除“{{title}}”",confirmDeleteDashboard:"确定删除“{{title}}”?看板将从列表移除,共享链接将失效。数据源和工作区文件会保留。",deleting:"正在删除…",newDashboard:"新建看板",privateScriptPublication:"这是私有 Workspace 脚本。请让助手准备可复用数据集,在设置 → 分析中审核固定的代码和文件并发布为组织内可见,再将本看板更新为该数据集并发布新版本。",publishDefinitionAudience:"此数据集仍为私有。所有者可在设置 → 分析中发布为组织内可见;查看者仍须具备上游数据权限。",notPublished:"此看板尚未发布。",draftAccessDenied:"只有项目编辑者可以打开工作草稿。",loadMore:"加载更多",published:"正式版本",project:"项目",selectProject:"选择项目",searchProjects:"搜索项目",noProjects:"暂无可用项目,请在 ChatKit 中创建项目。",projectsFailed:"项目加载失败,请重试。",projectSwitchFailed:"项目切换失败,请重试。",copyLink:"复制链接",selectProjectDashboard:"选择项目和看板",more:"更多操作",draftRevision:"草稿 r{{revision}}",publishedVersion:"正式版 v{{version}}",dashboards:"看板",previousPage:"上一页",nextPage:"下一页",projectPages:"项目分页",dashboardPages:"看板分页",dashboardsFailed:"看板加载失败,请重试。",starterTitle:"从可运行样例开始",starterHint:"样例使用明确标注的演示数据,在当前项目内保存草稿。",regionalTitle:"区域销售 · 入门",regionalDescription:"标准柱状图、区域筛选与明细表。",salesTitle:"销售总览 · 入门",salesDescription:"销售指标、每日趋势与区域对比。",qualityTitle:"生产质量 · 入门",qualityDescription:"产量、加权良品率与产线缺陷分析。",tryExample:"体验样例",realDataHint:"已有业务数据?先检查权限与指标口径。",realDataTitle:"使用我的数据",regionalPrompt:"请读取 live-dashboard 技能中 regional-sales 的完整配方,使用该配方随附的演示文件和标准图表定义,在当前项目新建区域销售看板。核对区域筛选、销售额和明细;不要使用其他样例或项目中已有的不同数据替代。完成实际查询与两个筛选验证后保存草稿,保留演示标识,不发布。",salesPrompt:"请读取 live-dashboard 技能中 sales-overview 的完整配方,使用该配方随附的演示文件和完整页面,在当前项目新建销售总览看板。包含销售额、订单数、日趋势、区域筛选和明细;不要使用其他样例或项目中已有的不同数据替代。完成实际查询与两个筛选验证后保存草稿,保留演示标识,不发布。",qualityPrompt:"请读取 live-dashboard 技能中 production-quality 的完整配方,使用该配方随附的演示文件和完整页面,在当前项目新建生产质量看板。必须包含产量、良品数、加权良品率、不良品数和产线筛选;不要将销售数据或其他看板改名替代。完成实际查询与两个产线筛选验证后保存草稿,保留演示标识,不发布。",realDataPrompt:"使用我的真实业务数据制作看板。先检查当前项目有权限的数据源并确认指标口径,不得使用演示数据补齐。",superstoreTitle:"Superstore 企业分析 · 进阶",superstoreDescription:"官方零售教学数据:经营总览、商品盈利、客户与退货;需先连接 Data Xpert 模型。",superstorePrompt:"请读取 live-dashboard 技能中的 themes/README.md 和 superstore 完整配方(总览使用 Trend Workspace、盈利使用 Profit Atlas、客户退货使用 Customer Brief),在当前项目使用已授权的 Data Xpert SuperstoreOrders 发布模型,分别制作经营总览、商品盈利、客户与退货三个看板。必须保留演示标识;先核对全量及区域、年份、品类筛选,再按完整 HTML 和全部 Binding 保存三个草稿,不发布。若模型不可用,请说明数据准备步骤,不得用其他样例或自造数据替代。",deleteDashboardNamed:"删除看板“{{title}}”",loadingMore:"正在加载更多…",dashboardUpdatedAt:"更新于 {{time}}",updateTimeUnavailable:"暂无更新时间"},"zh-Hant":{bindingUnavailable:"部分視圖未能載入,請檢查資料權限或重試。成功查詢的視圖仍可查看。",publishShareBlocked:"草稿包含私有或無法使用的資料來源,無法更新目前的團隊分享。請移除這些資料繫結,或先撤銷分享再發佈。已發佈版本與分享連結保持不變。",viewerControls:"看板操作",hideViewerControls:"收起看板操作",share:"團隊分享",teamReadOnly:"團隊 · 唯讀",shareHint:"向本組織已登入成員分享正式版本,草稿保持私有。",sharePermissions:"每位訪問者仍需自己的資料來源權限。分享不會授予檔案或資料來源存取權。",shareVersion:"版本策略",shareLatest:"跟隨最新正式版本",shareFixed:"固定正式版本",shareLink:"分享連結",copied:"已複製",openShared:"開啟獨立頁面",enableShare:"開啟分享",updateShare:"更新分享",revokeShare:"撤銷連結",publishBeforeShare:"請先發佈一個正式版本。",privateDependencies:"此資料來源使用私有腳本或檔案依賴,需要單獨支援並授予團隊存取權後才能分享。",sourceUnavailable:"聲明的資料來源或適配器不可用。",draft:"工作草稿",publish:"發佈草稿",confirm:"確認發佈",confirmPublish:"將這份已儲存草稿發佈為新的正式版本?",title:"即時看板",empty:"讓 Assistant 建立看板,或匯入看板定義。",import:"匯入定義",save:"儲存",cancel:"取消",refresh:"重新整理",apply:"套用篩選",loading:"載入中…",saved:"已儲存",refreshed:"已更新",definition:"看板定義",sources:"可用資料來源",version:"版本",partial:"結果不完整,請縮小篩選範圍以取得全部資料。",select:"選擇看板",error:"操作失敗,請檢查存取權限和查詢定義。",all:"全部",edit:"編輯工作草稿",history:"版本歷史",search:"搜尋看板…",noResults:"找不到符合的看板。",autoRefresh:"自動重新整理",off:"關閉",seconds30:"每 30 秒",minute1:"每分鐘",deleteDashboard:"刪除看板",deleteNamedDashboard:"刪除「{{title}}」",confirmDeleteDashboard:"確定刪除「{{title}}」?看板將從清單移除,共享連結將失效。資料來源和工作區檔案會保留。",deleting:"正在刪除…",newDashboard:"新建看板",privateScriptPublication:"這是私人 Workspace 腳本。請讓助手準備可重用資料集,在設定 → 分析中審核固定的程式碼和檔案並發佈為組織內可見,再將本看板更新為該資料集並發佈新版本。",publishDefinitionAudience:"此資料集仍為私人。擁有者可在設定 → 分析中發佈為組織內可見;檢視者仍須具備上游資料權限。",notPublished:"此看板尚未發佈。",draftAccessDenied:"只有專案編輯者可以開啟工作草稿。",loadMore:"載入更多",published:"正式版本",project:"專案",selectProject:"選擇專案",searchProjects:"搜尋專案",noProjects:"暫無可用專案,請在 ChatKit 中建立專案。",projectsFailed:"專案載入失敗,請重試。",projectSwitchFailed:"專案切換失敗,請重試。",copyLink:"複製連結",selectProjectDashboard:"選擇專案與看板",more:"更多操作",draftRevision:"草稿 r{{revision}}",publishedVersion:"正式版 v{{version}}",dashboards:"看板",previousPage:"上一頁",nextPage:"下一頁",projectPages:"專案分頁",dashboardPages:"看板分頁",dashboardsFailed:"看板載入失敗,請重試。",starterTitle:"從可執行範例開始",starterHint:"範例使用明確標註的示範資料,在目前專案內儲存草稿。",regionalTitle:"區域銷售 · 入門",regionalDescription:"標準長條圖、區域篩選與明細表。",salesTitle:"銷售總覽 · 入門",salesDescription:"銷售指標、每日趨勢與區域比較。",qualityTitle:"生產品質 · 入門",qualityDescription:"產量、加權良率與產線缺陷分析。",tryExample:"體驗範例",realDataHint:"已有業務資料?先檢查權限與指標定義。",realDataTitle:"使用我的資料",regionalPrompt:"請讀取 live-dashboard 技能中 regional-sales 的完整配方,使用該配方隨附的示範檔案和標準圖表定義,在目前專案新建區域銷售看板。核對區域篩選、銷售額和明細;不要使用其他樣例或專案中既有的不同資料替代。完成實際查詢與兩個篩選驗證後儲存草稿,保留示範標示,不發布。",salesPrompt:"請讀取 live-dashboard 技能中 sales-overview 的完整配方,使用該配方隨附的示範檔案和完整頁面,在目前專案新建銷售總覽看板。包含銷售額、訂單數、每日趨勢、區域篩選和明細;不要使用其他樣例或專案中既有的不同資料替代。完成實際查詢與兩個篩選驗證後儲存草稿,保留示範標示,不發布。",qualityPrompt:"請讀取 live-dashboard 技能中 production-quality 的完整配方,使用該配方隨附的示範檔案和完整頁面,在目前專案新建生產品質看板。必須包含產量、良品數、加權良品率、不良品數和產線篩選;不要將銷售資料或其他看板改名替代。完成實際查詢與兩個產線篩選驗證後儲存草稿,保留示範標示,不發布。",realDataPrompt:"使用我的真實業務資料製作儀表板。先檢查目前專案有權限的資料來源並確認指標定義,不得使用示範資料補齊。",superstoreTitle:"Superstore 企業分析 · 進階",superstoreDescription:"官方零售教學資料:經營總覽、商品獲利、客戶與退貨;需先連接 Data Xpert 模型。",superstorePrompt:"請讀取 live-dashboard 技能中的 themes/README.md 與 superstore 完整配方(總覽使用 Trend Workspace、獲利使用 Profit Atlas、客戶退貨使用 Customer Brief),在目前專案使用已授權的 Data Xpert SuperstoreOrders 發佈模型,分別製作經營總覽、商品獲利、客戶與退貨三個看板。保留示範標識;核對全量與區域、年份、品類篩選後,使用完整 HTML 與全部 Binding 儲存三個草稿,不發佈。模型不可用時說明資料準備步驟,不得替換成其他樣例或自造資料。",deleteDashboardNamed:"刪除看板「{{title}}」",loadingMore:"正在載入更多…",dashboardUpdatedAt:"更新於 {{time}}",updateTimeUnavailable:"暫無更新時間"}},"en");function py(n){return Yn.setLocale(n),document.documentElement.lang=Yn.getLocale(),Object.fromEntries(Object.keys(fy).map(e=>[e,Yn.t(e)]))}const DI={mode:"unrestricted"};function NI(n,e){return hI(n,{...e,networkPolicy:DI})}const OI=me({success:Je(!0),data:me({schema:Je("xpert.analytics.dataset"),datasetId:te(),fields:nt(me({id:te()}).passthrough()),rows:nt(Mr(lr([te(),tt(),ot(),Ar()]))),completeness:me({truncated:ot()}).passthrough(),freshness:me({sourceFetchedAt:te()}).passthrough(),provenance:me({executionId:te()}).passthrough()}).passthrough()}),AI=f.forwardRef(function(e,o){const s=f.useRef(null),i=f.useRef(null),l=f.useRef(e);return l.current=e,f.useImperativeHandle(o,()=>({refresh(){i.current?.refresh()}}),[]),f.useEffect(()=>{const u=s.current;if(!u||!e.manifest.presentation)return;const d=e.manifest;let h;try{h=iy(e.dependencies,d.presentation?.dependencies??[])}catch{l.current.onError("DOCUMENT_DEPENDENCY_INTEGRITY_FAILED"),l.current.onBusy(!1);return}const m=NI(u,{html:e.manifest.presentation.html,dependencies:h,context:{bindingIds:d.bindings.map(y=>y.id),defaults:Object.fromEntries(d.controls.filter(y=>y.defaultValue!==void 0).map(y=>[y.controlId,y.defaultValue??null])),locale:document.documentElement.lang||"en-US",theme:document.documentElement.classList.contains("dark")?"dark":"light"},query:async y=>OI.parse(await Nt("executeAction",{actionKey:"query-binding",input:{artifactId:e.artifactId,versionId:e.versionId,draftRevision:e.draftRevision,bindingId:y.bindingId,controls:y.controls}})).data,onBusy:y=>l.current.onBusy(y),onError:y=>l.current.onError(y),onResult:y=>l.current.onResult({partial:y.completeness.truncated,fetchedAt:y.freshness.sourceFetchedAt})});return i.current=m,()=>{m.dispose(),i.current=null}},[e.artifactId,e.versionId,e.draftRevision]),f.createElement("iframe",{ref:s,title:e.manifest.title,sandbox:"allow-scripts",className:"h-full w-full border-0"})});function $I({t:n,disabled:e,canEdit:o,canShare:s,canDelete:i,version:l,versions:u,onVersion:d,onEdit:h,onImport:m,onShare:y,onDelete:v,refreshSeconds:x,onRefreshSeconds:b,hasDashboard:S,updatedAt:C}){return f.createElement(MR,null,f.createElement(jR,{asChild:!0},f.createElement(lt,{variant:"ghost",size:"icon",disabled:e,"aria-label":n.more,title:n.more},f.createElement(ph,null))),f.createElement(LR,{align:"end",className:"w-60"},o&&S&&f.createElement(wl,{onSelect:h},f.createElement(kb,null),n.edit),s&&f.createElement(wl,{onSelect:y},f.createElement(Pb,null),n.share),o&&f.createElement(wl,{onSelect:m},f.createElement(hh,null),n.import),d&&f.createElement(Wv,null,f.createElement(Kv,null,f.createElement(Eb,null),n.history),f.createElement(Uv,null,f.createElement(Gv,{className:"max-h-64 w-48 overflow-y-auto"},f.createElement(Bv,{value:l,onValueChange:d},f.createElement(Ci,{value:"draft"},n.draft),u.filter(k=>k.versionId).map(k=>f.createElement(Ci,{key:k.versionId,value:k.versionId},n.version," ",k.versionNumber)))))),f.createElement(Wv,null,f.createElement(Kv,{disabled:!S},f.createElement(ru,null),n.autoRefresh),f.createElement(Uv,null,f.createElement(Gv,{className:"w-48"},f.createElement(Bv,{value:x,onValueChange:b},f.createElement(Ci,{value:"off"},n.off),f.createElement(Ci,{value:"30"},n.seconds30),f.createElement(Ci,{value:"60"},n.minute1))))),C&&f.createElement(f.Fragment,null,f.createElement(Hv,null),f.createElement(FR,null,n.refreshed,f.createElement("time",{className:"block font-normal",dateTime:C},new Date(C).toLocaleString(document.documentElement.lang)))),i&&f.createElement(f.Fragment,null,f.createElement(Hv,null),f.createElement(wl,{variant:"destructive",onSelect:v},f.createElement(gh,null),n.deleteDashboard))))}function hy(n,e,o,s){const[i,l]=f.useState(""),u=JSON.stringify([n,s,i]),[d,h]=f.useState({key:u,items:[],page:0,hasMore:!0,data:null,loading:!0,failed:!1}),m=f.useRef(0),y=f.useRef(!1),v=f.useRef(null),x=f.useCallback(async(S,C)=>{try{const k=await Nt("executeAction",{actionKey:n,input:{search:i,page:S,...s?{projectId:s}:{}}}),N=e.parse(me({success:Je(!0),data:$r()}).parse(k).data);if(C!==m.current)return;h(D=>{const O=S===1?[]:D.items,R=new Set(O.map(o));return{key:u,items:[...O,...N.items.filter(L=>!R.has(o(L)))],page:N.page,hasMore:N.hasMore,data:N,loading:!1,failed:!1}})}catch{C===m.current&&h(k=>({...k,loading:!1,failed:!0}))}finally{C===m.current&&(y.current=!1)}},[n,e,o,s,i,u]);f.useEffect(()=>{const S=++m.current;y.current=!0,h({key:u,items:[],page:0,hasMore:!0,data:null,loading:!0,failed:!1});const C=window.setTimeout(()=>{x(1,S)},i?200:80);return()=>{++m.current,window.clearTimeout(C)}},[u,x]);const b=f.useCallback((S=!1)=>{d.key!==u||y.current||!d.hasMore||d.failed&&!S||(y.current=!0,h(C=>({...C,loading:!0,failed:!1})),x(d.page+1,m.current))},[d.key,d.page,d.hasMore,d.failed,u,x]);return f.useEffect(()=>{if(!v.current||!d.hasMore||d.loading||d.failed||typeof IntersectionObserver>"u")return;const S=new IntersectionObserver(C=>{C.some(k=>k.isIntersecting)&&b()},{rootMargin:"0px 0px 24px 0px"});return S.observe(v.current),()=>S.disconnect()},[d.hasMore,d.loading,d.failed,b]),{...d,items:d.key===u?d.items:[],search:i,setSearch:l,sentinel:v,retry:()=>b(!0),onScroll:S=>{const C=S.currentTarget;C.scrollHeight-C.scrollTop-C.clientHeight<24&&b()}}}const MI=n=>n.id,jI=n=>n.artifactId;function LI({project:n,preview:e,disabled:o,onPreview:s,onSelect:i,t:l}){const u=hy("projects",vI,MI),[d,h]=f.useState(n?.id??""),m=f.useRef(!1);return f.createElement("section",{className:"picker-column","aria-label":l.project},f.createElement("div",{className:"picker-column-heading"},f.createElement("h2",{className:"text-sm font-semibold"},l.project)),f.createElement(Lv,{shouldFilter:!1,value:d,onValueChange:y=>{h(y);const v=u.items.find(x=>x.id===y);m.current&&v&&!o&&s(v)},onKeyDownCapture:y=>{m.current=["ArrowUp","ArrowDown","Home","End"].includes(y.key)},className:"picker-command"},f.createElement(Fv,{value:u.search,onValueChange:u.setSearch,"aria-label":l.searchProjects,placeholder:l.searchProjects}),f.createElement(zv,{className:"picker-list","aria-label":l.selectProject,"aria-busy":u.loading,onScroll:u.onScroll},u.items.map(y=>f.createElement(Vv,{key:y.id,value:y.id,"data-current":y.id===n?.id,className:y.id===e?.id?"bg-secondary font-medium":void 0,"aria-current":y.id===n?.id?!0:void 0,disabled:o,onPointerEnter:()=>{m.current=!1,o||s(y)},onSelect:()=>i(y)},f.createElement("span",{className:"min-w-0 flex-1 truncate",title:y.name},y.name),y.id===n?.id&&f.createElement(Js,{"aria-hidden":"true"}),f.createElement(nu,{"aria-hidden":"true"}))),u.loading&&f.createElement("p",{role:"status",className:"p-3 text-sm text-muted-foreground"},u.items.length?l.loadingMore:l.loading),u.failed&&f.createElement("div",{className:"p-3"},f.createElement("p",{role:"alert",className:"text-sm"},l.projectsFailed),f.createElement(lt,{variant:"ghost",onClick:u.retry},l.refresh)),!u.loading&&!u.failed&&!u.items.length&&f.createElement("p",{className:"p-3 text-sm text-muted-foreground"},l.noProjects),f.createElement("div",{ref:u.sentinel,className:"h-px","aria-hidden":"true"}))))}function FI({value:n,project:e,disabled:o,onChange:s,onNew:i,onDelete:l,t:u}){const d=hy("dashboards",xI,jI,e?.id),[h,m]=f.useState(n),y=new Intl.DateTimeFormat(Yn.getLocale(),{dateStyle:"medium",timeStyle:"short"});return f.createElement("section",{className:"picker-column","aria-label":u.dashboards},f.createElement("div",{className:"picker-column-heading"},f.createElement("h2",{className:"text-sm font-semibold truncate",title:e?.name},u.dashboards),i&&e&&d.data?.canEdit&&f.createElement(lt,{variant:"ghost",size:"sm",disabled:o,onClick:i},f.createElement(hh,null),u.newDashboard)),f.createElement(Lv,{shouldFilter:!1,value:h,onValueChange:m,className:"picker-command"},f.createElement(Fv,{value:d.search,onValueChange:d.setSearch,"aria-label":u.search,placeholder:u.search}),f.createElement(zv,{className:"picker-list","aria-label":u.select,"aria-busy":d.loading,onScroll:d.onScroll},d.items.map(v=>{const x=v.updatedAt?new Date(v.updatedAt):null;return f.createElement(BR,{key:v.artifactId},f.createElement(HR,{asChild:!0},f.createElement("div",{className:"picker-dashboard-row"},f.createElement(Vv,{value:v.artifactId,"data-current":v.artifactId===n,className:v.artifactId===n?"bg-secondary font-medium":void 0,"aria-current":v.artifactId===n?!0:void 0,disabled:o,onSelect:()=>s(v.artifactId,d.data?.mode)},f.createElement("span",{className:"min-w-0 flex-1 truncate"},v.title??v.artifactId),v.artifactId===n&&f.createElement(Js,{"aria-hidden":"true"})),l&&v.canDelete&&!!v.draftRevision&&f.createElement(lt,{className:"picker-delete",variant:"ghost",size:"icon",disabled:o,"aria-label":Yn.t("deleteDashboardNamed",{title:v.title??v.artifactId}),onKeyDown:b=>{b.key==="Enter"&&b.stopPropagation()},onClick:()=>l(v)},f.createElement(gh,{"aria-hidden":"true"})))),f.createElement(WR,{side:"top",align:"start",collisionPadding:12,className:"max-w-[min(18rem,calc(100vw-24px))] break-words"},f.createElement("div",{className:"space-y-1"},f.createElement("p",null,v.title??v.artifactId),f.createElement("p",null,x&&Number.isFinite(x.getTime())?Yn.t("dashboardUpdatedAt",{time:y.format(x)}):u.updateTimeUnavailable))))}),d.loading&&f.createElement("p",{role:"status",className:"p-3 text-sm text-muted-foreground"},d.items.length?u.loadingMore:u.loading),d.failed&&f.createElement("div",{className:"p-3"},f.createElement("p",{role:"alert",className:"text-sm"},u.dashboardsFailed),f.createElement(lt,{variant:"ghost",onClick:d.retry},u.refresh)),!d.loading&&!d.failed&&!d.items.length&&f.createElement("p",{className:"p-3 text-sm text-muted-foreground"},u.noResults),f.createElement("div",{ref:d.sentinel,className:"h-px","aria-hidden":"true"}))))}function zI({project:n,value:e,disabled:o,onChange:s,onNew:i,onDelete:l,t:u}){const[d,h]=f.useState(n),[m,y]=f.useState(n?"dashboards":"projects");return f.createElement(UR,{delayDuration:250,disableHoverableContent:!0},f.createElement(KR,{value:m,onValueChange:y,className:"picker-panels"},f.createElement(ZR,{className:"picker-mobile-tabs","aria-label":u.selectProjectDashboard},f.createElement(Qv,{value:"projects"},u.project),f.createElement(Qv,{value:"dashboards"},u.dashboards)),f.createElement(Xv,{value:"projects",forceMount:!0,className:"picker-pane picker-project-pane"},f.createElement(LI,{project:n,preview:d,disabled:o,onPreview:h,onSelect:v=>{h(v),y("dashboards")},t:u})),f.createElement(Xv,{value:"dashboards",forceMount:!0,className:"picker-pane"},f.createElement(FI,{key:d?.id??"personal",project:d,value:d?.id===n?.id?e:"",disabled:o,onChange:(v,x)=>s(v,d?.id,x),onNew:i?()=>i(d?.id):void 0,onDelete:l?v=>l(v,d?.id):void 0,t:u}))))}function VI({value:n,selectedTitle:e,project:o,disabled:s,open:i,onOpenChange:l,onChange:u,onNew:d,onDelete:h,t:m}){const y=f.useId(),v=e??(n||m.select);return f.createElement(Zv,{open:i,onOpenChange:l},f.createElement(qv,{role:"combobox","aria-label":m.selectProjectDashboard,"aria-expanded":i,"aria-controls":i?y:void 0,"aria-haspopup":"dialog",disabled:s,className:$e(Od({variant:"outline"}),"dashboard-picker justify-between"),title:`${o?.name??m.selectProject} / ${v}`},f.createElement("span",{className:"picker-project truncate text-muted-foreground"},o?.name??m.selectProject),f.createElement(nu,{className:"shrink-0 opacity-50","aria-hidden":"true"}),f.createElement("span",{className:"picker-dashboard truncate font-medium"},v),f.createElement(tu,{className:"shrink-0 opacity-50","aria-hidden":"true"})),f.createElement(Yv,{id:y,"aria-label":m.selectProjectDashboard,align:"start",collisionPadding:12,className:"dashboard-picker-menu p-0"},f.createElement(zI,{key:o?.id??"personal",project:o,value:n,disabled:s,onChange:u,onNew:d,onDelete:h,t:m})))}const UI=me({published:me({versionId:te(),versionNumber:tt(),title:te().nullish()}).nullable(),issues:nt(me({code:te(),bindingId:te().optional()})),link:me({status:te(),versionMode:en(["latest","version"]),versionId:te().nullish(),url:te().url().optional()}).nullable()}),BI=me({success:Je(!0),data:UI});function HI({artifactId:n,versionId:e,versions:o,t:s,onClose:i}){const[l,u]=f.useState(null),[d,h]=f.useState("latest"),[m,y]=f.useState(e??o[0]?.versionId??""),[v,x]=f.useState(!1),[b,S]=f.useState(""),[C,k]=f.useState(!1),N=f.useRef(null),D=f.useRef(0),O=f.useRef(!1);async function R(I){const K=++D.current;x(!0),S(""),k(!1);try{const ae=BI.parse(await Nt("executeAction",{actionKey:I,input:{artifactId:n,...I==="share"?{versionMode:d}:{},...I!=="revoke-share"&&d==="version"&&m?{versionId:m}:{}}})).data;K===D.current&&(u(ae),O.current||(O.current=!0,ae.link?.status==="active"&&(h(ae.link.versionMode),ae.link.versionId&&y(ae.link.versionId))))}catch{K===D.current&&S(s.error)}finally{K===D.current&&x(!1)}}f.useEffect(()=>(R("share-status"),()=>{++D.current}),[n,d,m]);const L=l?.link?.status==="active"?l.link:null,j=L&&L.versionMode===d&&(d==="latest"||L.versionId===m),B=I=>I==="DASHBOARD_PUBLISH_BEFORE_SHARING"?s.publishBeforeShare:I==="WORKSPACE_SCRIPT_PRIVATE_DEPENDENCIES"?s.privateScriptPublication:I==="ANALYTICS_DEFINITION_PRIVATE"?s.publishDefinitionAudience:I==="DASHBOARD_PRIVATE_DEPENDENCY"?s.privateDependencies:s.sourceUnavailable;return f.createElement(kR,{open:!0,onOpenChange:I=>{!I&&!v&&i()}},f.createElement(PR,null,f.createElement(RR,null,f.createElement(TR,null,s.share),f.createElement(DR,null,s.shareHint)),f.createElement("div",{className:"grid gap-4 py-2"},f.createElement("label",{className:"grid gap-2 text-sm"},s.shareVersion,f.createElement(bl,{value:d,disabled:v,onValueChange:I=>h(I==="version"?"version":"latest")},f.createElement(Cl,{"aria-label":s.shareVersion},f.createElement(Sl,null)),f.createElement(kl,null,f.createElement(ks,{value:"latest"},s.shareLatest),f.createElement(ks,{value:"version"},s.shareFixed)))),d==="version"&&f.createElement(bl,{value:m,disabled:v,onValueChange:y},f.createElement(Cl,{"aria-label":s.version},f.createElement(Sl,{placeholder:s.version})),f.createElement(kl,null,o.filter(I=>I.versionId).map(I=>f.createElement(ks,{key:I.versionId,value:I.versionId},s.version," ",I.versionNumber)))),l?.published&&f.createElement("p",{className:"text-sm text-muted-foreground"},l.published.title," · ",s.version," ",l.published.versionNumber),!!l?.issues.length&&f.createElement("ul",{className:"grid gap-2 text-sm text-destructive",role:"alert"},l.issues.map((I,K)=>f.createElement("li",{key:K},B(I.code),I.bindingId?` (${I.bindingId})`:""))),f.createElement("p",{className:"text-xs text-muted-foreground"},s.sharePermissions),L?.url&&f.createElement("div",{className:"grid gap-2"},f.createElement("label",{htmlFor:"dashboard-share-url",className:"text-sm"},s.shareLink),f.createElement(jv,{id:"dashboard-share-url",ref:N,readOnly:!0,value:L.url,onFocus:I=>I.target.select()}),f.createElement("div",{className:"flex gap-2"},f.createElement(lt,{variant:"outline",onClick:()=>{N.current?.focus(),N.current?.select(),k(document.execCommand("copy"))}},C?s.copied:s.copyLink),f.createElement(lt,{variant:"outline",onClick:async()=>{if(L.url){S("");try{me({success:Je(!0)}).parse(await Nt("invokeClientCommand",{commandKey:"artifact.presentation.open",payload:{url:L.url}}))}catch{S(s.error)}}}},s.openShared))),b&&f.createElement("p",{role:"alert",className:"text-sm text-destructive"},b)),f.createElement(IR,null,L&&f.createElement(lt,{variant:"outline",disabled:v,onClick:()=>{R("revoke-share")}},s.revokeShare),f.createElement(lt,{variant:"outline",disabled:v,onClick:i},s.cancel),f.createElement(lt,{disabled:v||!l||!!l.issues.length||!!j,onClick:()=>{R("share")}},L?s.updateShare:s.enableShare))))}function WI({children:n,busy:e,t:o}){const[s,i]=f.useState(!1),l=f.useRef(!1),u=f.useRef(null),d=f.useRef(!1),h=f.useRef(),m=()=>{clearTimeout(h.current)},y=b=>{m(),b||(l.current=!1),i(b)},v=b=>{b.pointerType==="mouse"&&(m(),i(!0))},x=b=>{b.pointerType!=="mouse"||l.current||(m(),h.current=setTimeout(()=>{l.current||i(!1)},180))};return f.useEffect(()=>()=>clearTimeout(h.current),[]),f.useEffect(()=>{if(!s)return;let b;const S=()=>{b=setTimeout(()=>{document.activeElement instanceof HTMLIFrameElement&&y(!1)},0)};return window.addEventListener("blur",S),()=>{window.removeEventListener("blur",S),clearTimeout(b)}},[s]),f.createElement(Zv,{open:s,onOpenChange:y},f.createElement("div",{className:"viewer-controls-trigger"},f.createElement(qv,{asChild:!0},f.createElement("button",{ref:u,type:"button",className:$e(Od({variant:"outline",size:"icon"}),"viewer-controls-button"),"aria-label":o.viewerControls,title:o.viewerControls,onPointerEnter:v,onPointerLeave:x,onClick:b=>{b.preventDefault(),m(),l.current?y(!1):(l.current=!0,i(!0))}},e?f.createElement(ru,{className:"motion-safe:animate-spin","aria-hidden":"true"}):f.createElement(ph,{"aria-hidden":"true"}),e&&f.createElement("span",{role:"status",className:"sr-only"},o.loading)))),f.createElement(Yv,{align:"end",side:"bottom",sideOffset:8,collisionPadding:12,"aria-label":o.viewerControls,className:"viewer-controls-panel w-[min(44rem,calc(100vw-24px))] gap-0 p-0",onPointerEnter:v,onPointerLeave:x,onPointerDownCapture:()=>{l.current=!0},onFocusCapture:()=>{l.current=!0},onOpenAutoFocus:b=>{l.current||b.preventDefault()},onEscapeKeyDown:()=>{d.current=!0},onCloseAutoFocus:b=>{b.preventDefault(),d.current&&u.current?.focus({preventScroll:!0}),d.current=!1}},n,f.createElement(lt,{variant:"ghost",size:"icon",className:"viewer-controls-close","aria-label":o.hideViewerControls,title:o.hideViewerControls,onClick:()=>{d.current=!0,y(!1)}},f.createElement(fh,{"aria-hidden":"true"}))))}function KI({t:n,onStart:e}){return f.createElement("section",{className:"mx-auto grid max-w-2xl gap-5 p-6","aria-label":n.starterTitle},f.createElement("div",null,f.createElement("h2",null,n.starterTitle),f.createElement("p",{className:"text-sm text-muted-foreground"},n.starterHint)),f.createElement("div",{className:"grid gap-3"},[["regionalTitle","regionalDescription","regionalPrompt"],["salesTitle","salesDescription","salesPrompt"],["qualityTitle","qualityDescription","qualityPrompt"],["superstoreTitle","superstoreDescription","superstorePrompt"]].map(([o,s,i])=>f.createElement("div",{key:o,className:"flex flex-wrap items-center justify-between gap-3 border-b pb-3"},f.createElement("div",null,f.createElement("p",null,n[o]),f.createElement("p",{className:"text-sm text-muted-foreground"},n[s])),f.createElement(lt,{variant:"outline",onClick:()=>{e(n[i])},"aria-label":`${n.tryExample}: ${n[o]}`},n.tryExample)))),f.createElement("div",{className:"flex flex-wrap items-center justify-between gap-3"},f.createElement("p",{className:"text-sm text-muted-foreground"},n.realDataHint),f.createElement(lt,{onClick:()=>{e(n.realDataPrompt)}},n.realDataTitle)))}mI(document);const Ot=window.__DASHBOARD_READ_ONLY__===!0,Il=me({success:Je(!0),data:$r()}),GI=me({payload:$r(),failures:nt(me({bindingId:te(),datasetId:te(),reason:Je("unavailable")})).default([]),datasets:nt(me({completeness:me({truncated:ot()}),freshness:me({sourceFetchedAt:te()})}))});function ZI(){const[n,e]=f.useState(()=>py("en-US")),[o,s]=f.useState(!1),i=f.useRef(!1),[l,u]=f.useState([]),[d,h]=f.useState(null),[m,y]=f.useState({project:!1,archived:!1,canReadDraft:!1,canEdit:!1,canManage:!1}),[v,x]=f.useState(null),[b,S]=f.useState("published"),C=f.useRef(),[k,N]=f.useState(""),[D,O]=f.useState({page:1,pageSize:50,hasMore:!1}),R=!Ot&&m.canEdit,L=!Ot&&m.canManage,[j,B]=f.useState([]),[I,K]=f.useState(null),[ae,be]=f.useState([]),[le,ce]=f.useState({}),[ue,Se]=f.useState(""),[q,ne]=f.useState(!0),[U,Q]=f.useState(""),[M,T]=f.useState(""),[P,W]=f.useState("off"),[Z,H]=f.useState(null),[re,de]=f.useState(null),[Y,se]=f.useState(""),[Oe,Ue]=f.useState(!1),[je,We]=f.useState(null),[xt,ht]=f.useState(!1),[Qn,Rn]=f.useState([]),[Zr,Lo]=f.useState(!1),ft=f.useRef(0),In=f.useRef(0),Fo=f.useRef(0),qr=f.useRef(),zo=f.useRef(),Tn=f.useRef(),Ei=f.useRef(null),Dn=f.useRef({dirty:!1,resourceId:""}),Yr=Z!==null&&Z!==JSON.stringify(I?.manifest,null,2);Dn.current={dirty:Yr||q&&Z!==null,resourceId:I?.artifactId??""};const _i=G=>{I&&Nt("invokeClientCommand",{commandKey:"workbench.content.status",payload:{resourceId:I.artifactId,title:I.title,dirty:G}}).catch(()=>{})};f.useEffect(()=>{_i(Yr||q&&Z!==null)},[Yr,q,Z===null,I?.artifactId,I?.title]),f.useEffect(()=>PI(G=>G!==Dn.current.resourceId||!Dn.current.dirty),[]);function gn(){qr.current=void 0,N(""),Se(""),Rn([]),K(null),h(null),H(null),be([]),Lo(!1),We(null),de(null),se(""),ce({}),T(""),ht(!1)}function an(G){return TI(G)}async function Qr(G,Ee,Le=C.current,Be=1,Ke){const ln=ft.current,Ut=++Fo.current,Xe=bI.parse(await Nt("requestData",{query:{page:Be,pageSize:50,parameters:{...Ke?{draftRevision:Ke}:{},...G?{artifactId:G}:{},...Ee?{versionId:Ee}:{},...Le?{mode:Le}:{}}}})).meta;return ln===ft.current&&Ut===Fo.current&&(u(Xn=>Be===1?Xe.dashboards:[...Xn,...Xe.dashboards.filter(cn=>!Xn.some(Ni=>Ni.artifactId===cn.artifactId))]),B(Xe.sources),zo.current=Xe.navigationTarget,x(Xe.currentProject??null),Xe.access&&y(Xe.access),Xe.pagination&&O(Xe.pagination),Xe.mode&&(C.current=Xe.mode,S(Xe.mode))),Xe}async function _s(G,Ee){const Le=++ft.current;if(!G.versionId&&!G.draftRevision)throw new Error("Missing saved definition");if(Se(""),Rn([]),T(""),ht(!1),!G.manifest.bindings.length)return;const Be=GI.parse(Il.parse(await Nt("executeAction",{actionKey:"query",input:{artifactId:G.artifactId,versionId:G.versionId??void 0,...G.isDraft?{draftRevision:G.draftRevision}:{},controls:Ee}})).data);Le===ft.current&&(Rn(Be.failures.map(Ke=>Ke.datasetId)),Se(Be.datasets.length?YI(Be.payload):""),ht(Be.datasets.some(Ke=>Ke.completeness.truncated)),T(Be.datasets.map(Ke=>Ke.freshness.sourceFetchedAt).sort()[0]??""))}async function Sr(G,Ee,Le=!0,Be=C.current,Ke){const ln=++ft.current;gn(),qr.current=G;const Ut=await Qr(G,Ee,Be,1,Ke),Xe=Ut.saved;if(ln!==ft.current)return;if(h(Ut.selectedDashboard??Ut.dashboards.find(cn=>cn.artifactId===G)??null),Ut.notice==="not_published"){N(n.notPublished),Ot||(await an(null),Le&&await Rl(Ut.navigationTarget,G,void 0,Ut.mode));return}if(!Xe||!Xe.versionId&&!Xe.draftRevision)throw new Error("Dashboard is unavailable");const Xn=Object.fromEntries(Xe.manifest.controls.filter(cn=>cn.defaultValue!==void 0).map(cn=>[cn.controlId,cn.defaultValue??null]));K(Xe),be(Ut.versions??[]),ce(Xn),T(""),ht(!1),!(!Ot&&Le&&(Tn.current=ki({artifactId:G,versionId:Ee,mode:Ut.mode}),await Rl(Ut.navigationTarget,G,Ee,Ut.mode),ln!==ft.current))&&(Ot||await an({artifactId:Xe.artifactId,...Ut.mode==="published"?{versionId:Xe.versionId??void 0}:{draftRevision:Xe.draftRevision}}),ln===ft.current&&!Xe.manifest.presentation&&Xe.manifest.bindings.length&&await _s(Xe,Xn))}async function Vt(G){const Ee=++In.current;ne(!0),Q("");try{await G()}catch(Le){Ee===In.current&&Q(Le instanceof Error&&Le.message==="DASHBOARD_DRAFT_ACCESS_DENIED"?n.draftAccessDenied:Le instanceof Error?Le.message:n.error)}finally{Ee===In.current&&ne(!1)}}const Xr=f.useRef({saved:I,controls:le,busy:q,editor:Z,confirmDelete:re});Xr.current={saved:I,controls:le,busy:q,editor:Z,confirmDelete:re};async function Vo(){const G=Xr.current;if(!G.saved){await Uo();return}if(Dn.current.dirty||G.editor!==null)return;const Ee=G.saved,Le=++ft.current,Be=await Qr(Ee.artifactId,Ee.versionId??void 0,Ee.isDraft?"draft":"published");if(Le!==ft.current||qr.current!==Ee.artifactId||Dn.current.dirty)return;h(Be.selectedDashboard??Be.dashboards.find(ln=>ln.artifactId===Ee.artifactId)??null);const Ke=Be.saved;if(!Ke)throw gn(),new Error("Dashboard is unavailable");K(Ke),be(Be.versions??[]),Ot||await an({artifactId:Ke.artifactId,...Ke.isDraft?{draftRevision:Ke.draftRevision}:{versionId:Ke.versionId??void 0}}),Le===ft.current&&(Ke.manifest.presentation?Ke.draftRevision===Ee.draftRevision&&Ke.versionId===Ee.versionId&&Ei.current?.refresh():await _s(Ke,G.controls))}f.useEffect(()=>{if(P==="off")return;let G=!1,Ee=!1;const Le=async()=>{const Ke=Xr.current;if(!(G||!_I()||Ee||Ke.busy||Ke.confirmDelete||Ke.editor!==null||!Ke.saved?.manifest.bindings.length)){Ee=!0;try{await Vo()}catch{G||Q(n.error)}finally{Ee=!1}}},Be=window.setInterval(()=>{Le()},Number(P)*1e3);return document.addEventListener("visibilitychange",Le),()=>{G=!0,window.clearInterval(Be),document.removeEventListener("visibilitychange",Le)}},[P,I?.artifactId,n.error]);async function Uo(G=!1){const Ee=++ft.current;gn();const Le=await Qr(void 0,void 0,G?"draft":void 0);if(Ee===ft.current){if(Ot&&Le.saved){await Sr(Le.saved.artifactId,Le.saved.versionId??void 0,!1);return}G&&!Ot&&await an(null)}}f.useEffect(()=>II((G,Ee)=>{e(py(G));const Le=yI.safeParse(Ee??{});if(!Le.success){++ft.current,Tn.current=void 0,gn(),Vt(async()=>{throw new Error("DASHBOARD_NAVIGATION_INVALID")});return}const Be=Le.data,Ke=ki(Be);Ke!==Tn.current&&(Tn.current=Ke,i.current=!!Be.picker,s(!!Be.picker),Vt(()=>Be.artifactId?Sr(Be.artifactId,Be.versionId,!1,Be.mode,Be.draftRevision):Uo(Be.newDashboard)))},G=>{if(Dn.current.dirty||qr.current!==G||!Xr.current.saved?.isDraft){Qr().catch(()=>{});return}Vt(Vo)},()=>{++ft.current,++In.current,++Fo.current,ne(!1),u([]),x(null),C.current=void 0,Tn.current=void 0,gn()}),[]);async function Pi(){const G=Pl.parse(JSON.parse(Z??"")),Ee=I?.manifest.id===G.id?I.versionId??null:null,Le=jo.parse(Il.parse(await Nt("executeAction",{actionKey:"save",input:{manifest:G,expectedVersionId:Ee,expectedRevision:I?.manifest.id===G.id?I.draftRevision??0:0}})).data);await Sr(Le.artifactId,void 0,!0,"draft")}async function Ri(){if(!je?.draftRevision)return;const G=jo.parse(Il.parse(await Nt("executeAction",{actionKey:"publish",input:{artifactId:je.artifactId,expectedRevision:je.draftRevision,expectedCurrentVersionId:je.baseVersionId??je.versionId??null,confirmed:!0}}).catch(Ee=>{throw Ee instanceof Error&&Ee.message==="DASHBOARD_PUBLISH_SHARE_BLOCKED"?(We(null),new Error(n.publishShareBlocked)):Ee})).data);We(null),await Sr(G.artifactId,G.versionId??void 0,!0,"published")}async function Jr(){const G=re;if(!(Oe||!G?.canDelete||!G.draftRevision)){se(""),Ue(!0);try{const Ee=me({artifactId:Je(G.artifactId)}).parse(Il.parse(await Nt("executeAction",{actionKey:"delete",input:{artifactId:G.artifactId,expectedRevision:G.draftRevision,confirmed:!0,...G.projectId?{projectId:G.projectId}:{}}})).data);de(null),u(Le=>Le.filter(Be=>Be.artifactId!==Ee.artifactId)),qr.current===Ee.artifactId&&(++ft.current,gn(),Tn.current=ki({artifactId:void 0,versionId:void 0}),await Promise.all([an(null),Rl(zo.current)])),await Qr()}catch(Ee){throw se(Ee instanceof Error?Ee.message:n.error),Ee}finally{Ue(!1)}}}function Cr(G,Ee){Ot||!G.canDelete||!G.draftRevision||(s(!1),se(""),de({...G,...Ee?{projectId:Ee}:{}}))}async function Ii(G,Ee,Le=!1,Be){if(G===v?.id)return;const Ke=await Nt("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{target:"assistant.project",projectId:G,viewKey:"live-dashboard__live-dashboard",...Ee?{selectionId:Ee}:{},parameters:Le?{newDashboard:!0}:{...Be?{mode:Be}:{}}}});if(!me({success:Je(!0)}).safeParse(Ke).success)throw new Error(n.projectSwitchFailed)}function Tl(G){s(G),!G&&i.current&&(i.current=!1,Tn.current=ki({artifactId:void 0,versionId:void 0}),Nt("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{...zo.current,parameters:{}}}).catch(()=>{}))}const Ti=f.createElement("header",{className:"dashboard-toolbar border-b"},f.createElement("h1",{className:Ot?"toolbar-title text-base font-semibold":"sr-only"},Ot?I?.title??n.title:n.title),!Ot&&f.createElement(VI,{value:I?.artifactId??"",selectedTitle:I?.title,project:v??null,disabled:q||Oe||Z!==null,open:o,onOpenChange:Tl,t:n,onDelete:Cr,onChange:(G,Ee,Le)=>{s(!1),i.current=!1,Vt(()=>Ee&&Ee!==v?.id?Ii(Ee,G,!1,Le):Sr(G,void 0,!0,Le))},onNew:G=>{s(!1),i.current=!1,Vt(async()=>{if(G&&G!==v?.id){await Ii(G,void 0,!0);return}await Uo(!0),Tn.current=ki({artifactId:void 0,versionId:void 0,newDashboard:!0}),await Rl(zo.current)})}}),I&&f.createElement(CR,{variant:"secondary",className:"toolbar-version",role:"status"},I.isDraft?Yn.t("draftRevision",{revision:I.draftRevision??"—"}):Yn.t("publishedVersion",{version:I.versionNumber??"—"})),f.createElement("div",{className:"toolbar-actions"},L&&I?.isDraft&&f.createElement(lt,{disabled:q||Z!==null||!I.manifest.bindings.length,onClick:()=>We(I),"aria-label":n.publish,title:n.publish},f.createElement(mh,null),f.createElement("span",null,n.publish)),f.createElement(lt,{variant:"ghost",size:"icon",disabled:q||Z!==null,"aria-label":n.refresh,title:n.refresh,onClick:()=>{Vt(Vo)}},f.createElement(ru,{className:q?"motion-safe:animate-spin":void 0})),f.createElement($I,{t:n,disabled:q||Oe||Z!==null,canEdit:R,hasDashboard:!!I,canShare:L&&!!I,canDelete:L&&!!d?.canDelete&&!!d.draftRevision,versions:ae,version:I?.isDraft?"draft":I?.versionId??void 0,onVersion:!Ot&&m.canReadDraft&&I?G=>{Vt(()=>Sr(I.artifactId,G==="draft"?void 0:G,!0,G==="draft"?"draft":"published"))}:void 0,onEdit:()=>{Vt(async()=>{if(!I)return;const G=await Qr(I.artifactId,void 0,"draft");if(!G.saved)throw new Error(n.error);await an({artifactId:G.saved.artifactId,draftRevision:G.saved.draftRevision}),K(G.saved),be(G.versions??[]),H(JSON.stringify(G.saved.manifest,null,2))})},onImport:()=>H(""),onShare:()=>Lo(!0),onDelete:()=>{d&&Cr(d)},refreshSeconds:P,onRefreshSeconds:W,updatedAt:M}))),Di=I&&!I.manifest.presentation&&!!I.manifest.controls.length&&f.createElement("section",{className:"flex flex-wrap items-end gap-3 border-b px-4 py-3"},I.manifest.controls.map(G=>f.createElement(qI,{key:G.controlId,control:G,value:le[G.controlId]??null,disabled:q,onChange:Ee=>ce(Le=>({...Le,[G.controlId]:Ee}))})),f.createElement(lt,{type:"button",variant:"outline",disabled:q,onClick:()=>{Vt(()=>_s(I,le))}},n.apply));return f.createElement("main",{className:"dashboard-shell","data-read-only":Ot||void 0},Ot?f.createElement(WI,{busy:q,t:n},Ti,Di):Ti,L&&Zr&&I&&f.createElement(HI,{artifactId:I.artifactId,versionId:I.versionId??void 0,versions:ae,t:n,onClose:()=>Lo(!1)}),f.createElement(Dv,{open:!!re,onOpenChange:G=>{!G&&!q&&!Oe&&de(null)}},f.createElement(Nv,null,f.createElement(Av,null,n.deleteDashboard),f.createElement($v,null,Yn.t("confirmDeleteDashboard",{title:re?.title??re?.artifactId??""})),f.createElement("p",{className:"break-all text-xs text-muted-foreground"},re?.artifactId),Y&&f.createElement("p",{role:"alert",className:"text-destructive"},Y),f.createElement(Ov,null,f.createElement(Mv,{disabled:q||Oe},n.cancel),f.createElement(lt,{variant:"destructive",disabled:q||Oe,onClick:()=>{Vt(Jr)}},Oe?n.deleting:n.deleteDashboard)))),f.createElement(Dv,{open:!!je,onOpenChange:G=>{!G&&!q&&We(null)}},f.createElement(Nv,null,f.createElement(Av,null,n.publish),f.createElement($v,null,n.confirmPublish," ",je?.manifest.title," · r",je?.draftRevision),f.createElement(Ov,null,f.createElement(Mv,{disabled:q},n.cancel),f.createElement(lt,{disabled:q,onClick:()=>{Vt(Ri)}},n.confirm)))),k&&f.createElement("p",{role:"status",className:"border-b px-4 py-3 text-muted-foreground"},k),U&&f.createElement("div",{role:"alert",className:"border-b px-4 py-3 text-destructive"},U),Z!==null?f.createElement("section",{className:"editor-panel p-4"},f.createElement("label",{className:"text-sm font-medium",htmlFor:"definition"},n.definition),f.createElement(NR,{id:"definition",className:"min-h-0 flex-1 font-mono text-xs",value:Z,onChange:G=>{Dn.current.dirty=!0,_i(!0),H(G.target.value)},disabled:q}),f.createElement("details",{className:"text-xs"},f.createElement("summary",null,n.sources),f.createElement("pre",{className:"max-h-32 overflow-auto"},JSON.stringify(j,null,2))),f.createElement("div",{className:"flex justify-end gap-2"},f.createElement(lt,{variant:"outline",onClick:()=>H(null),disabled:q},n.cancel),f.createElement(lt,{onClick:()=>{Vt(Pi)},disabled:q||!Z.trim()},f.createElement(mh,null),n.save))):f.createElement(f.Fragment,null,!Ot&&Di,Qn.length>0&&f.createElement("div",{role:"alert",className:"px-4 py-2 text-sm"},f.createElement("p",null,n.bindingUnavailable),f.createElement("ul",null,Qn.map(G=>f.createElement("li",{key:G},[...I?.manifest.charts??[],...I?.manifest.tables??[]].filter(Ee=>Ee.datasetId===G).map(Ee=>Ee.title).join(" · ")||G)))),xt&&f.createElement("p",{role:"status",className:"px-4 py-2 text-sm"},n.partial),f.createElement("section",{className:"canvas-panel","aria-busy":q},!q&&!ue&&!I?.manifest.presentation&&!U&&!Qn.length&&(!I&&R&&v?f.createElement(KI,{t:n,onStart:G=>Vt(async()=>{await an(null),await Nt("invokeClientCommand",{commandKey:"assistant.chat.send_message",payload:{text:G}})})}):f.createElement("p",{className:"p-6 text-muted-foreground"},n.empty)),I?.manifest.presentation&&f.createElement(AI,{ref:Ei,artifactId:I.artifactId,versionId:I.versionId??void 0,draftRevision:I.isDraft?I.draftRevision:void 0,manifest:I.manifest,dependencies:I.dependencies??[],onBusy:ne,onError:Q,onResult:G=>{Q(""),ht(G.partial),T(G.fetchedAt)}}),ue&&f.createElement("iframe",{title:I?.manifest.title??n.title,sandbox:"allow-scripts",srcDoc:ue,className:"h-full w-full border-0"}))))}function qI({control:n,value:e,onChange:o,disabled:s}){return f.createElement("div",{className:"grid gap-1.5"},f.createElement("label",{htmlFor:n.controlId,className:"text-xs text-muted-foreground"},n.label),n.allowedValues?f.createElement(bl,{value:JSON.stringify(e),onValueChange:i=>o(lr([te(),tt(),ot(),Ar()]).parse(JSON.parse(i))),disabled:s},f.createElement(Cl,{id:n.controlId,className:"w-44"},f.createElement(Sl,null)),f.createElement(kl,null,n.allowedValues.map(i=>f.createElement(ks,{key:JSON.stringify(i),value:JSON.stringify(i)},String(i??"—"))))):n.type==="boolean"?f.createElement(bl,{value:String(e),onValueChange:i=>o(i==="true"),disabled:s},f.createElement(Cl,{id:n.controlId,className:"w-44"},f.createElement(Sl,null)),f.createElement(kl,null,f.createElement(ks,{value:"true"},"true"),f.createElement(ks,{value:"false"},"false"))):f.createElement(jv,{id:n.controlId,className:"w-44",disabled:s,type:n.type==="date"?"date":n.type==="number"?"number":"text",value:e===null?"":String(e),onChange:i=>o(i.target.value===""?null:n.type==="number"?Number(i.target.value):i.target.value)}))}function YI(n){const e=s=>JSON.stringify(s).replace(/</g,"\\u003c").replace(/>/g,"\\u003e"),o=`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data: blob:; font-src data:; connect-src 'none'; frame-src 'none'; base-uri 'none'; form-action 'none'"><script>window.__DATASCIENCE_ARTIFACT_HOSTING__={mode:'site_creator',readOnly:true,controls:{edit:false,exportHostedLink:false,hostedLink:false}};window.xpertai={toolOutput:${e(n)},toolResponseMetadata:${e(n)},availableDisplayModes:['inline','fullscreen'],displayMode:'fullscreen',hostContext:{availableDisplayModes:['inline','fullscreen'],displayMode:'fullscreen'}};
|
|
252
252
|
window.__datascienceArtifactFetchShimInstalled=true;
|
|
253
|
-
window.fetch=async function(input,init){const path=new URL(typeof input==='string'?input:input.url,'https://renderer.invalid').pathname;const payload=window.xpertai.toolOutput;const data={'/api/manifest':payload.manifest,'/api/snapshot':payload.snapshot,'/api/package':{manifestPath:'live dashboard',snapshotPath:'live query'}};const ok=(!init||!init.method||init.method==='GET')&&Object.prototype.hasOwnProperty.call(data,path);return new Response(JSON.stringify(ok?data[path]:{error:'Unavailable in live read-only view'}),{status:ok?200:404,headers:{'Content-Type':'application/json'}})};<\/script>`;return window.__ANALYTICS_RENDERER_HTML__.replace(/<head(\s[^>]*)?>/i,s=>`${s}${o}`)}
|
|
253
|
+
window.fetch=async function(input,init){const path=new URL(typeof input==='string'?input:input.url,'https://renderer.invalid').pathname;const payload=window.xpertai.toolOutput;const data={'/api/manifest':payload.manifest,'/api/snapshot':payload.snapshot,'/api/package':{manifestPath:'live dashboard',snapshotPath:'live query'}};const ok=(!init||!init.method||init.method==='GET')&&Object.prototype.hasOwnProperty.call(data,path);return new Response(JSON.stringify(ok?data[path]:{error:'Unavailable in live read-only view'}),{status:ok?200:404,headers:{'Content-Type':'application/json'}})};<\/script>`;return window.__ANALYTICS_RENDERER_HTML__.replace(/<head(\s[^>]*)?>/i,s=>`${s}${o}`)}Jw.createRoot(document.getElementById("root")).render(f.createElement(yR,{i18n:Yn},f.createElement(ZI,null)))})();
|