intlayer-editor 5.5.8 → 5.5.10
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/README.md +42 -9
- package/client/dist/assets/apex-C7Pw0Ztw.js +1 -0
- package/client/dist/assets/{coq-CMdgaOU9.js → coq-DkFqJrB1.js} +1 -1
- package/client/dist/assets/{go-PEFJdsE-.js → go-ByKsyG03.js} +1 -1
- package/client/dist/assets/index-2Y2JmURo.js +315 -0
- package/client/dist/assets/index-DQgPqI2f.css +1 -0
- package/client/dist/assets/{julia-Db79kMu7.js → julia-Dn4fBTUU.js} +1 -1
- package/client/dist/assets/{latex-okZ41ve_.js → latex-DoYF_zFQ.js} +1 -1
- package/client/dist/assets/liquid-DFk8BABL.js +1 -0
- package/client/dist/assets/log-2UxHyX5q.js +1 -0
- package/client/dist/assets/r-DyVeJk2s.js +1 -0
- package/client/dist/assets/{svelte-CXAE1zBs.js → svelte-Dt5jNKfG.js} +1 -1
- package/client/dist/assets/{templ-kZcegUSt.js → templ-DN2Co29m.js} +1 -1
- package/client/dist/assets/{tex-mQPFytnq.js → tex-BTEcxGmc.js} +1 -1
- package/client/dist/assets/{vue-xz9K_ZKN.js → vue-CqZX_ekU.js} +1 -1
- package/client/dist/assets/{vue-html-dOMv_FQ0.js → vue-html-DJL_i-Ck.js} +1 -1
- package/client/dist/index.html +2 -2
- package/package.json +20 -20
- package/client/dist/assets/apex-QX45V2Sx.js +0 -1
- package/client/dist/assets/index-BF7i91m0.css +0 -1
- package/client/dist/assets/index-swLTtnJO.js +0 -315
- package/client/dist/assets/liquid-C1lUkxsO.js +0 -1
- package/client/dist/assets/log-BFvZA1X9.js +0 -1
- package/client/dist/assets/r-C2tOF0e5.js +0 -1
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-Bbf3ZyxA.js","assets/html-B8pBdPMQ.js","assets/javascript-BMMyXqK5.js","assets/css-DPfMkruS.js","assets/angular-ts-C26w9mnW.js","assets/scss-OYdSNvt2.js","assets/apl-e980N3t4.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-DAp1zUbp.js","assets/typescript-DlfHMoPT.js","assets/postcss-CXtECtnM.js","assets/blade-DGJDb2eD.js","assets/html-derivative-ZQ8onl8Z.js","assets/sql-B9xm8XSJ.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-CCPHrsME.js","assets/coffee-JUOWOZUj.js","assets/cpp-ChttZZSa.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-CfkhwHAQ.js","assets/shellscript-Yzrsuije.js","assets/edge-CKszZCnI.js","assets/elixir-Cc7HHYVZ.js","assets/elm-DbKCFpqz.js","assets/erb-D3EuUlpm.js","assets/ruby-C5MNRm7z.js","assets/haml-AZXGPtNI.js","assets/graphql-Caa12_AY.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-DQy8In2x.js","assets/markdown-RrBGtqGR.js","assets/gdresource-BSDf9Pz1.js","assets/gdshader-DkwncUOv.js","assets/gdscript-Bty6elJm.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Dz9X99Cm.js","assets/glimmer-ts-aQ3p29eY.js","assets/hack-C1oSbnf3.js","assets/handlebars-YebKLiTq.js","assets/http-C38VWM-o.js","assets/hxml-B2Z6b3nn.js","assets/haxe-BP3HzMA6.js","assets/jinja-BJmZiE_F.js","assets/jison-BCRtk9Os.js","assets/julia-Db79kMu7.js","assets/r-C2tOF0e5.js","assets/latex-okZ41ve_.js","assets/tex-mQPFytnq.js","assets/liquid-C1lUkxsO.js","assets/marko-C0z8HR23.js","assets/less-B1dDrJ26.js","assets/mdc-02rxpBA4.js","assets/nginx-DknmC5AR.js","assets/nim-ANgMEeb1.js","assets/perl-EWVMYlR0.js","assets/php-9PMsNEzE.js","assets/pug-Ch9lOoSd.js","assets/qml-CHzV51_b.js","assets/razor-CNXmhs1n.js","assets/csharp-CHadp7IV.js","assets/rst-DHpKpUMA.js","assets/cmake-D1j8_8rp.js","assets/sas-Dlf3BogE.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-B_7ge1HE.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-C5TGba-T.js","assets/svelte-CXAE1zBs.js","assets/templ-kZcegUSt.js","assets/go-PEFJdsE-.js","assets/ts-tags-CHnADXob.js","assets/twig-febACT8g.js","assets/vue-xz9K_ZKN.js","assets/vue-html-dOMv_FQ0.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var ij=Object.defineProperty;var aj=(e,t,n)=>t in e?ij(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ce=(e,t,n)=>aj(e,typeof t!="symbol"?t+"":t,n);function oj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();function Hf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mp={exports:{}},Ml={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-runtime.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var PE;function sj(){if(PE)return Ml;PE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var l=null;if(s!==void 0&&(l=""+s),a.key!==void 0&&(l=""+a.key),"key"in a){s={};for(var u in a)u!=="key"&&(s[u]=a[u])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:s}}return Ml.Fragment=t,Ml.jsx=n,Ml.jsxs=n,Ml}var zE;function lj(){return zE||(zE=1,Mp.exports=sj()),Mp.exports}var b=lj(),Pp={exports:{}},Ge={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react.production.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var VE;function cj(){if(VE)return Ge;VE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function g(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function A(P,X,$){this.props=P,this.context=X,this.refs=S,this.updater=$||v}A.prototype.isReactComponent={},A.prototype.setState=function(P,X){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,X,"setState")},A.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function w(){}w.prototype=A.prototype;function T(P,X,$){this.props=P,this.context=X,this.refs=S,this.updater=$||v}var C=T.prototype=new w;C.constructor=T,_(C,A.prototype),C.isPureReactComponent=!0;var k=Array.isArray,N={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function D(P,X,$,Q,re,he){return $=he.ref,{$$typeof:e,type:P,key:X,ref:$!==void 0?$:null,props:he}}function j(P,X){return D(P.type,X,void 0,void 0,void 0,P.props)}function V(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function U(P){var X={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function($){return X[$]})}var ue=/\/+/g;function ie(P,X){return typeof P=="object"&&P!==null&&P.key!=null?U(""+P.key):X.toString(36)}function fe(){}function Y(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(fe,fe):(P.status="pending",P.then(function(X){P.status==="pending"&&(P.status="fulfilled",P.value=X)},function(X){P.status==="pending"&&(P.status="rejected",P.reason=X)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function ee(P,X,$,Q,re){var he=typeof P;(he==="undefined"||he==="boolean")&&(P=null);var xe=!1;if(P===null)xe=!0;else switch(he){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(P.$$typeof){case e:case t:xe=!0;break;case m:return xe=P._init,ee(xe(P._payload),X,$,Q,re)}}if(xe)return re=re(P),xe=Q===""?"."+ie(P,0):Q,k(re)?($="",xe!=null&&($=xe.replace(ue,"$&/")+"/"),ee(re,X,$,"",function(ke){return ke})):re!=null&&(V(re)&&(re=j(re,$+(re.key==null||P&&P.key===re.key?"":(""+re.key).replace(ue,"$&/")+"/")+xe)),X.push(re)),1;xe=0;var le=Q===""?".":Q+":";if(k(P))for(var Ee=0;Ee<P.length;Ee++)Q=P[Ee],he=le+ie(Q,Ee),xe+=ee(Q,X,$,he,re);else if(Ee=g(P),typeof Ee=="function")for(P=Ee.call(P),Ee=0;!(Q=P.next()).done;)Q=Q.value,he=le+ie(Q,Ee++),xe+=ee(Q,X,$,he,re);else if(he==="object"){if(typeof P.then=="function")return ee(Y(P),X,$,Q,re);throw X=String(P),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return xe}function H(P,X,$){if(P==null)return P;var Q=[],re=0;return ee(P,Q,"","",function(he){return X.call($,he,re++)}),Q}function ne(P){if(P._status===-1){var X=P._result;X=X(),X.then(function($){(P._status===0||P._status===-1)&&(P._status=1,P._result=$)},function($){(P._status===0||P._status===-1)&&(P._status=2,P._result=$)}),P._status===-1&&(P._status=0,P._result=X)}if(P._status===1)return P._result.default;throw P._result}var K=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)};function ye(){}return Ge.Children={map:H,forEach:function(P,X,$){H(P,function(){X.apply(this,arguments)},$)},count:function(P){var X=0;return H(P,function(){X++}),X},toArray:function(P){return H(P,function(X){return X})||[]},only:function(P){if(!V(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ge.Component=A,Ge.Fragment=n,Ge.Profiler=a,Ge.PureComponent=T,Ge.StrictMode=r,Ge.Suspense=d,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Ge.act=function(){throw Error("act(...) is not supported in production builds of React.")},Ge.cache=function(P){return function(){return P.apply(null,arguments)}},Ge.cloneElement=function(P,X,$){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var Q=_({},P.props),re=P.key,he=void 0;if(X!=null)for(xe in X.ref!==void 0&&(he=void 0),X.key!==void 0&&(re=""+X.key),X)!L.call(X,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&X.ref===void 0||(Q[xe]=X[xe]);var xe=arguments.length-2;if(xe===1)Q.children=$;else if(1<xe){for(var le=Array(xe),Ee=0;Ee<xe;Ee++)le[Ee]=arguments[Ee+2];Q.children=le}return D(P.type,re,void 0,void 0,he,Q)},Ge.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:s,_context:P},P},Ge.createElement=function(P,X,$){var Q,re={},he=null;if(X!=null)for(Q in X.key!==void 0&&(he=""+X.key),X)L.call(X,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(re[Q]=X[Q]);var xe=arguments.length-2;if(xe===1)re.children=$;else if(1<xe){for(var le=Array(xe),Ee=0;Ee<xe;Ee++)le[Ee]=arguments[Ee+2];re.children=le}if(P&&P.defaultProps)for(Q in xe=P.defaultProps,xe)re[Q]===void 0&&(re[Q]=xe[Q]);return D(P,he,void 0,void 0,null,re)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(P){return{$$typeof:u,render:P}},Ge.isValidElement=V,Ge.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:ne}},Ge.memo=function(P,X){return{$$typeof:h,type:P,compare:X===void 0?null:X}},Ge.startTransition=function(P){var X=N.T,$={};N.T=$;try{var Q=P(),re=N.S;re!==null&&re($,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(ye,K)}catch(he){K(he)}finally{N.T=X}},Ge.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Ge.use=function(P){return N.H.use(P)},Ge.useActionState=function(P,X,$){return N.H.useActionState(P,X,$)},Ge.useCallback=function(P,X){return N.H.useCallback(P,X)},Ge.useContext=function(P){return N.H.useContext(P)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(P,X){return N.H.useDeferredValue(P,X)},Ge.useEffect=function(P,X){return N.H.useEffect(P,X)},Ge.useId=function(){return N.H.useId()},Ge.useImperativeHandle=function(P,X,$){return N.H.useImperativeHandle(P,X,$)},Ge.useInsertionEffect=function(P,X){return N.H.useInsertionEffect(P,X)},Ge.useLayoutEffect=function(P,X){return N.H.useLayoutEffect(P,X)},Ge.useMemo=function(P,X){return N.H.useMemo(P,X)},Ge.useOptimistic=function(P,X){return N.H.useOptimistic(P,X)},Ge.useReducer=function(P,X,$){return N.H.useReducer(P,X,$)},Ge.useRef=function(P){return N.H.useRef(P)},Ge.useState=function(P){return N.H.useState(P)},Ge.useSyncExternalStore=function(P,X,$){return N.H.useSyncExternalStore(P,X,$)},Ge.useTransition=function(){return N.H.useTransition()},Ge.version="19.0.0",Ge}var BE;function Ic(){return BE||(BE=1,Pp.exports=cj()),Pp.exports}var E=Ic();const $e=Hf(E),DT=oj({__proto__:null,default:$e},[E]);var zp={exports:{}},Pl={},Vp={exports:{}},Bp={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var UE;function uj(){return UE||(UE=1,function(e){function t(H,ne){var K=H.length;H.push(ne);e:for(;0<K;){var ye=K-1>>>1,P=H[ye];if(0<a(P,ne))H[ye]=ne,H[K]=P,K=ye;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var ne=H[0],K=H.pop();if(K!==ne){H[0]=K;e:for(var ye=0,P=H.length,X=P>>>1;ye<X;){var $=2*(ye+1)-1,Q=H[$],re=$+1,he=H[re];if(0>a(Q,K))re<P&&0>a(he,Q)?(H[ye]=he,H[re]=K,ye=re):(H[ye]=Q,H[$]=K,ye=$);else if(re<P&&0>a(he,K))H[ye]=he,H[re]=K,ye=re;else break e}}return ne}function a(H,ne){var K=H.sortIndex-ne.sortIndex;return K!==0?K:H.id-ne.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],h=[],m=1,y=null,g=3,v=!1,_=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C(H){for(var ne=n(h);ne!==null;){if(ne.callback===null)r(h);else if(ne.startTime<=H)r(h),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(h)}}function k(H){if(S=!1,C(H),!_)if(n(d)!==null)_=!0,Y();else{var ne=n(h);ne!==null&&ee(k,ne.startTime-H)}}var N=!1,L=-1,D=5,j=-1;function V(){return!(e.unstable_now()-j<D)}function U(){if(N){var H=e.unstable_now();j=H;var ne=!0;try{e:{_=!1,S&&(S=!1,w(L),L=-1),v=!0;var K=g;try{t:{for(C(H),y=n(d);y!==null&&!(y.expirationTime>H&&V());){var ye=y.callback;if(typeof ye=="function"){y.callback=null,g=y.priorityLevel;var P=ye(y.expirationTime<=H);if(H=e.unstable_now(),typeof P=="function"){y.callback=P,C(H),ne=!0;break t}y===n(d)&&r(d),C(H)}else r(d);y=n(d)}if(y!==null)ne=!0;else{var X=n(h);X!==null&&ee(k,X.startTime-H),ne=!1}}break e}finally{y=null,g=K,v=!1}ne=void 0}}finally{ne?ue():N=!1}}}var ue;if(typeof T=="function")ue=function(){T(U)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,fe=ie.port2;ie.port1.onmessage=U,ue=function(){fe.postMessage(null)}}else ue=function(){A(U,0)};function Y(){N||(N=!0,ue())}function ee(H,ne){L=A(function(){H(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){_||v||(_=!0,Y())},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(H){switch(g){case 1:case 2:case 3:var ne=3;break;default:ne=g}var K=g;g=ne;try{return H()}finally{g=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,ne){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var K=g;g=H;try{return ne()}finally{g=K}},e.unstable_scheduleCallback=function(H,ne,K){var ye=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?ye+K:ye):K=ye,H){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=K+P,H={id:m++,callback:ne,priorityLevel:H,startTime:K,expirationTime:P,sortIndex:-1},K>ye?(H.sortIndex=K,t(h,H),n(d)===null&&H===n(h)&&(S?(w(L),L=-1):S=!0,ee(k,K-ye))):(H.sortIndex=P,t(d,H),_||v||(_=!0,Y())),H},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(H){var ne=g;return function(){var K=g;g=ne;try{return H.apply(this,arguments)}finally{g=K}}}}(Bp)),Bp}var $E;function dj(){return $E||($E=1,Vp.exports=uj()),Vp.exports}var Up={exports:{}},dn={};/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var HE;function fj(){if(HE)return dn;HE=1;var e=Ic();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(d,h,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:h,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return dn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,dn.createPortal=function(d,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(d,h,null,m)},dn.flushSync=function(d){var h=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=h,r.p=m,r.d.f()}},dn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},dn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},dn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,y=u(m,h.crossOrigin),g=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:g,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:y,integrity:g,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},dn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=u(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},dn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,y=u(m,h.crossOrigin);r.d.L(d,m,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},dn.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=u(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},dn.requestFormReset=function(d){r.d.r(d)},dn.unstable_batchedUpdates=function(d,h){return d(h)},dn.useFormState=function(d,h,m){return l.H.useFormState(d,h,m)},dn.useFormStatus=function(){return l.H.useHostTransitionStatus()},dn.version="19.0.0",dn}var FE;function IT(){if(FE)return Up.exports;FE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Up.exports=fj(),Up.exports}/**
|
|
35
|
-
* @license React
|
|
36
|
-
* react-dom-client.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var GE;function hj(){if(GE)return Pl;GE=1;var e=dj(),t=Ic(),n=IT();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}var s=Symbol.for("react.element"),l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),g=Symbol.for("react.consumer"),v=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),k=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function L(i){return i===null||typeof i!="object"?null:(i=N&&i[N]||i["@@iterator"],typeof i=="function"?i:null)}var D=Symbol.for("react.client.reference");function j(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===D?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case d:return"Fragment";case u:return"Portal";case m:return"Profiler";case h:return"StrictMode";case S:return"Suspense";case A:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case v:return(i.displayName||"Context")+".Provider";case g:return(i._context.displayName||"Context")+".Consumer";case _:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case w:return o=i.displayName||null,o!==null?o:j(i.type)||"Memo";case T:o=i._payload,i=i._init;try{return j(i(o))}catch{}}return null}var V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.assign,ue,ie;function fe(i){if(ue===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);ue=o&&o[1]||"",ie=-1<c.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+ue+i+ie}var Y=!1;function ee(i,o){if(!i||Y)return"";Y=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(o){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ae){var te=ae}Reflect.construct(i,[],me)}else{try{me.call()}catch(ae){te=ae}i.call(me.prototype)}}else{try{throw Error()}catch(ae){te=ae}(me=i())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ae){if(ae&&te&&typeof ae.stack=="string")return[ae.stack,te.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=f.DetermineComponentFrameRoot(),R=x[0],O=x[1];if(R&&O){var M=R.split(`
|
|
45
|
-
`),G=O.split(`
|
|
46
|
-
`);for(p=f=0;f<M.length&&!M[f].includes("DetermineComponentFrameRoot");)f++;for(;p<G.length&&!G[p].includes("DetermineComponentFrameRoot");)p++;if(f===M.length||p===G.length)for(f=M.length-1,p=G.length-1;1<=f&&0<=p&&M[f]!==G[p];)p--;for(;1<=f&&0<=p;f--,p--)if(M[f]!==G[p]){if(f!==1||p!==1)do if(f--,p--,0>p||M[f]!==G[p]){var oe=`
|
|
47
|
-
`+M[f].replace(" at new "," at ");return i.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",i.displayName)),oe}while(1<=f&&0<=p);break}}}finally{Y=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?fe(c):""}function H(i){switch(i.tag){case 26:case 27:case 5:return fe(i.type);case 16:return fe("Lazy");case 13:return fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return i=ee(i.type,!1),i;case 11:return i=ee(i.type.render,!1),i;case 1:return i=ee(i.type,!0),i;default:return""}}function ne(i){try{var o="";do o+=H(i),i=i.return;while(i);return o}catch(c){return`
|
|
48
|
-
Error generating stack: `+c.message+`
|
|
49
|
-
`+c.stack}}function K(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function ye(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function P(i){if(K(i)!==i)throw Error(r(188))}function X(i){var o=i.alternate;if(!o){if(o=K(i),o===null)throw Error(r(188));return o!==i?null:i}for(var c=i,f=o;;){var p=c.return;if(p===null)break;var x=p.alternate;if(x===null){if(f=p.return,f!==null){c=f;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===c)return P(p),i;if(x===f)return P(p),o;x=x.sibling}throw Error(r(188))}if(c.return!==f.return)c=p,f=x;else{for(var R=!1,O=p.child;O;){if(O===c){R=!0,c=p,f=x;break}if(O===f){R=!0,f=p,c=x;break}O=O.sibling}if(!R){for(O=x.child;O;){if(O===c){R=!0,c=x,f=p;break}if(O===f){R=!0,f=x,c=p;break}O=O.sibling}if(!R)throw Error(r(189))}}if(c.alternate!==f)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:o}function $(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=$(i),o!==null)return o;i=i.sibling}return null}var Q=Array.isArray,re=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},xe=[],le=-1;function Ee(i){return{current:i}}function ke(i){0>le||(i.current=xe[le],xe[le]=null,le--)}function Re(i,o){le++,xe[le]=i.current,i.current=o}var Ue=Ee(null),Fe=Ee(null),pt=Ee(null),Gt=Ee(null);function kn(i,o){switch(Re(pt,o),Re(Fe,i),Re(Ue,null),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)&&(o=o.namespaceURI)?fE(o):0;break;default:if(i=i===8?o.parentNode:o,o=i.tagName,i=i.namespaceURI)i=fE(i),o=hE(i,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}ke(Ue),Re(Ue,o)}function An(){ke(Ue),ke(Fe),ke(pt)}function ur(i){i.memoizedState!==null&&Re(Gt,i);var o=Ue.current,c=hE(o,i.type);o!==c&&(Re(Fe,i),Re(Ue,c))}function va(i){Fe.current===i&&(ke(Ue),ke(Fe)),Gt.current===i&&(ke(Gt),kl._currentValue=he)}var dr=Object.prototype.hasOwnProperty,B=e.unstable_scheduleCallback,J=e.unstable_cancelCallback,se=e.unstable_shouldYield,we=e.unstable_requestPaint,be=e.unstable_now,_e=e.unstable_getCurrentPriorityLevel,Le=e.unstable_ImmediatePriority,rt=e.unstable_UserBlockingPriority,ot=e.unstable_NormalPriority,wn=e.unstable_LowPriority,ba=e.unstable_IdlePriority,Tr=e.log,Nh=e.unstable_setDisableYieldValue,Wr=null,en=null;function Oh(i){if(en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot(Wr,i,void 0,(i.current.flags&128)===128)}catch{}}function fr(i){if(typeof Tr=="function"&&Nh(i),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(Wr,i)}catch{}}var yn=Math.clz32?Math.clz32:GD,nu=Math.log,FD=Math.LN2;function GD(i){return i>>>=0,i===0?32:31-(nu(i)/FD|0)|0}var ru=128,iu=4194304;function _a(i){var o=i&42;if(o!==0)return o;switch(i&-i){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:return 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 i&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function au(i,o){var c=i.pendingLanes;if(c===0)return 0;var f=0,p=i.suspendedLanes,x=i.pingedLanes,R=i.warmLanes;i=i.finishedLanes!==0;var O=c&134217727;return O!==0?(c=O&~p,c!==0?f=_a(c):(x&=O,x!==0?f=_a(x):i||(R=O&~R,R!==0&&(f=_a(R))))):(O=c&~p,O!==0?f=_a(O):x!==0?f=_a(x):i||(R=c&~R,R!==0&&(f=_a(R)))),f===0?0:o!==0&&o!==f&&(o&p)===0&&(p=f&-f,R=o&-o,p>=R||p===32&&(R&4194176)!==0)?o:f}function Us(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function KD(i,o){switch(i){case 1:case 2:case 4:case 8:return o+250;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 o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function i0(){var i=ru;return ru<<=1,(ru&4194176)===0&&(ru=128),i}function a0(){var i=iu;return iu<<=1,(iu&62914560)===0&&(iu=4194304),i}function kh(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function $s(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function ZD(i,o,c,f,p,x){var R=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var O=i.entanglements,M=i.expirationTimes,G=i.hiddenUpdates;for(c=R&~c;0<c;){var oe=31-yn(c),me=1<<oe;O[oe]=0,M[oe]=-1;var te=G[oe];if(te!==null)for(G[oe]=null,oe=0;oe<te.length;oe++){var ae=te[oe];ae!==null&&(ae.lane&=-536870913)}c&=~me}f!==0&&o0(i,f,0),x!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=x&~(R&~o))}function o0(i,o,c){i.pendingLanes|=o,i.suspendedLanes&=~o;var f=31-yn(o);i.entangledLanes|=o,i.entanglements[f]=i.entanglements[f]|1073741824|c&4194218}function s0(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var f=31-yn(c),p=1<<f;p&o|i[f]&o&&(i[f]|=o),c&=~p}}function l0(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function c0(){var i=re.p;return i!==0?i:(i=window.event,i===void 0?32:kE(i.type))}function qD(i,o){var c=re.p;try{return re.p=i,o()}finally{re.p=c}}var Ci=Math.random().toString(36).slice(2),cn="__reactFiber$"+Ci,Tn="__reactProps$"+Ci,po="__reactContainer$"+Ci,Dh="__reactEvents$"+Ci,WD="__reactListeners$"+Ci,YD="__reactHandles$"+Ci,u0="__reactResources$"+Ci,Hs="__reactMarker$"+Ci;function Ih(i){delete i[cn],delete i[Tn],delete i[Dh],delete i[WD],delete i[YD]}function xa(i){var o=i[cn];if(o)return o;for(var c=i.parentNode;c;){if(o=c[po]||c[cn]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=gE(i);i!==null;){if(c=i[cn])return c;i=gE(i)}return o}i=c,c=i.parentNode}return null}function go(i){if(i=i[cn]||i[po]){var o=i.tag;if(o===5||o===6||o===13||o===26||o===27||o===3)return i}return null}function Fs(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function yo(i){var o=i[u0];return o||(o=i[u0]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Kt(i){i[Hs]=!0}var d0=new Set,f0={};function Ea(i,o){vo(i,o),vo(i+"Capture",o)}function vo(i,o){for(f0[i]=o,i=0;i<o.length;i++)d0.add(o[i])}var Yr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),XD=RegExp("^[: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]*$"),h0={},m0={};function QD(i){return dr.call(m0,i)?!0:dr.call(h0,i)?!1:XD.test(i)?m0[i]=!0:(h0[i]=!0,!1)}function ou(i,o,c){if(QD(o))if(c===null)i.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var f=o.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+c)}}function su(i,o,c){if(c===null)i.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+c)}}function Xr(i,o,c,f){if(f===null)i.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(o,c,""+f)}}function Hn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function p0(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function JD(i){var o=p0(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),f=""+i[o];if(!i.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,x=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return p.call(this)},set:function(R){f=""+R,x.call(this,R)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return f},setValue:function(R){f=""+R},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function lu(i){i._valueTracker||(i._valueTracker=JD(i))}function g0(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),f="";return i&&(f=p0(i)?i.checked?"true":"false":i.value),i=f,i!==c?(o.setValue(i),!0):!1}function cu(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var eI=/[\n"\\]/g;function Fn(i){return i.replace(eI,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Lh(i,o,c,f,p,x,R,O){i.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?i.type=R:i.removeAttribute("type"),o!=null?R==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+Hn(o)):i.value!==""+Hn(o)&&(i.value=""+Hn(o)):R!=="submit"&&R!=="reset"||i.removeAttribute("value"),o!=null?jh(i,R,Hn(o)):c!=null?jh(i,R,Hn(c)):f!=null&&i.removeAttribute("value"),p==null&&x!=null&&(i.defaultChecked=!!x),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?i.name=""+Hn(O):i.removeAttribute("name")}function y0(i,o,c,f,p,x,R,O){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.type=x),o!=null||c!=null){if(!(x!=="submit"&&x!=="reset"||o!=null))return;c=c!=null?""+Hn(c):"",o=o!=null?""+Hn(o):c,O||o===i.value||(i.value=o),i.defaultValue=o}f=f??p,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=O?i.checked:!!f,i.defaultChecked=!!f,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.name=R)}function jh(i,o,c){o==="number"&&cu(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function bo(i,o,c,f){if(i=i.options,o){o={};for(var p=0;p<c.length;p++)o["$"+c[p]]=!0;for(c=0;c<i.length;c++)p=o.hasOwnProperty("$"+i[c].value),i[c].selected!==p&&(i[c].selected=p),p&&f&&(i[c].defaultSelected=!0)}else{for(c=""+Hn(c),o=null,p=0;p<i.length;p++){if(i[p].value===c){i[p].selected=!0,f&&(i[p].defaultSelected=!0);return}o!==null||i[p].disabled||(o=i[p])}o!==null&&(o.selected=!0)}}function v0(i,o,c){if(o!=null&&(o=""+Hn(o),o!==i.value&&(i.value=o),c==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=c!=null?""+Hn(c):""}function b0(i,o,c,f){if(o==null){if(f!=null){if(c!=null)throw Error(r(92));if(Q(f)){if(1<f.length)throw Error(r(93));f=f[0]}c=f}c==null&&(c=""),o=c}c=Hn(o),i.defaultValue=c,f=i.textContent,f===c&&f!==""&&f!==null&&(i.value=f)}function _o(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var tI=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function _0(i,o,c){var f=o.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?f?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":f?i.setProperty(o,c):typeof c!="number"||c===0||tI.has(o)?o==="float"?i.cssFloat=c:i[o]=(""+c).trim():i[o]=c+"px"}function x0(i,o,c){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,c!=null){for(var f in c)!c.hasOwnProperty(f)||o!=null&&o.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var p in o)f=o[p],o.hasOwnProperty(p)&&c[p]!==f&&_0(i,p,f)}else for(var x in o)o.hasOwnProperty(x)&&_0(i,x,o[x])}function Mh(i){if(i.indexOf("-")===-1)return!1;switch(i){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 nI=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),rI=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function uu(i){return rI.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var Ph=null;function zh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var xo=null,Eo=null;function E0(i){var o=go(i);if(o&&(i=o.stateNode)){var c=i[Tn]||null;e:switch(i=o.stateNode,o.type){case"input":if(Lh(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Fn(""+o)+'"][type="radio"]'),o=0;o<c.length;o++){var f=c[o];if(f!==i&&f.form===i.form){var p=f[Tn]||null;if(!p)throw Error(r(90));Lh(f,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(o=0;o<c.length;o++)f=c[o],f.form===i.form&&g0(f)}break e;case"textarea":v0(i,c.value,c.defaultValue);break e;case"select":o=c.value,o!=null&&bo(i,!!c.multiple,o,!1)}}}var Vh=!1;function S0(i,o,c){if(Vh)return i(o,c);Vh=!0;try{var f=i(o);return f}finally{if(Vh=!1,(xo!==null||Eo!==null)&&(Zu(),xo&&(o=xo,i=Eo,Eo=xo=null,E0(o),i)))for(o=0;o<i.length;o++)E0(i[o])}}function Gs(i,o){var c=i.stateNode;if(c===null)return null;var f=c[Tn]||null;if(f===null)return null;c=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,o,typeof c));return c}var Bh=!1;if(Yr)try{var Ks={};Object.defineProperty(Ks,"passive",{get:function(){Bh=!0}}),window.addEventListener("test",Ks,Ks),window.removeEventListener("test",Ks,Ks)}catch{Bh=!1}var Ni=null,Uh=null,du=null;function A0(){if(du)return du;var i,o=Uh,c=o.length,f,p="value"in Ni?Ni.value:Ni.textContent,x=p.length;for(i=0;i<c&&o[i]===p[i];i++);var R=c-i;for(f=1;f<=R&&o[c-f]===p[x-f];f++);return du=p.slice(i,1<f?1-f:void 0)}function fu(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function hu(){return!0}function w0(){return!1}function Rn(i){function o(c,f,p,x,R){this._reactName=c,this._targetInst=p,this.type=f,this.nativeEvent=x,this.target=R,this.currentTarget=null;for(var O in i)i.hasOwnProperty(O)&&(c=i[O],this[O]=c?c(x):x[O]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?hu:w0,this.isPropagationStopped=w0,this}return U(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=hu)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=hu)},persist:function(){},isPersistent:hu}),o}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mu=Rn(Sa),Zs=U({},Sa,{view:0,detail:0}),iI=Rn(Zs),$h,Hh,qs,pu=U({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gh,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==qs&&(qs&&i.type==="mousemove"?($h=i.screenX-qs.screenX,Hh=i.screenY-qs.screenY):Hh=$h=0,qs=i),$h)},movementY:function(i){return"movementY"in i?i.movementY:Hh}}),T0=Rn(pu),aI=U({},pu,{dataTransfer:0}),oI=Rn(aI),sI=U({},Zs,{relatedTarget:0}),Fh=Rn(sI),lI=U({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),cI=Rn(lI),uI=U({},Sa,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),dI=Rn(uI),fI=U({},Sa,{data:0}),R0=Rn(fI),hI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mI={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"},pI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gI(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=pI[i])?!!o[i]:!1}function Gh(){return gI}var yI=U({},Zs,{key:function(i){if(i.key){var o=hI[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=fu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?mI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gh,charCode:function(i){return i.type==="keypress"?fu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?fu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vI=Rn(yI),bI=U({},pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),C0=Rn(bI),_I=U({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gh}),xI=Rn(_I),EI=U({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),SI=Rn(EI),AI=U({},pu,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),wI=Rn(AI),TI=U({},Sa,{newState:0,oldState:0}),RI=Rn(TI),CI=[9,13,27,32],Kh=Yr&&"CompositionEvent"in window,Ws=null;Yr&&"documentMode"in document&&(Ws=document.documentMode);var NI=Yr&&"TextEvent"in window&&!Ws,N0=Yr&&(!Kh||Ws&&8<Ws&&11>=Ws),O0=" ",k0=!1;function D0(i,o){switch(i){case"keyup":return CI.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I0(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var So=!1;function OI(i,o){switch(i){case"compositionend":return I0(o);case"keypress":return o.which!==32?null:(k0=!0,O0);case"textInput":return i=o.data,i===O0&&k0?null:i;default:return null}}function kI(i,o){if(So)return i==="compositionend"||!Kh&&D0(i,o)?(i=A0(),du=Uh=Ni=null,So=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return N0&&o.locale!=="ko"?null:o.data;default:return null}}var DI={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 L0(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!DI[i.type]:o==="textarea"}function j0(i,o,c,f){xo?Eo?Eo.push(f):Eo=[f]:xo=f,o=Qu(o,"onChange"),0<o.length&&(c=new mu("onChange","change",null,c,f),i.push({event:c,listeners:o}))}var Ys=null,Xs=null;function II(i){sE(i,0)}function gu(i){var o=Fs(i);if(g0(o))return i}function M0(i,o){if(i==="change")return o}var P0=!1;if(Yr){var Zh;if(Yr){var qh="oninput"in document;if(!qh){var z0=document.createElement("div");z0.setAttribute("oninput","return;"),qh=typeof z0.oninput=="function"}Zh=qh}else Zh=!1;P0=Zh&&(!document.documentMode||9<document.documentMode)}function V0(){Ys&&(Ys.detachEvent("onpropertychange",B0),Xs=Ys=null)}function B0(i){if(i.propertyName==="value"&&gu(Xs)){var o=[];j0(o,Xs,i,zh(i)),S0(II,o)}}function LI(i,o,c){i==="focusin"?(V0(),Ys=o,Xs=c,Ys.attachEvent("onpropertychange",B0)):i==="focusout"&&V0()}function jI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return gu(Xs)}function MI(i,o){if(i==="click")return gu(o)}function PI(i,o){if(i==="input"||i==="change")return gu(o)}function zI(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Dn=typeof Object.is=="function"?Object.is:zI;function Qs(i,o){if(Dn(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),f=Object.keys(o);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var p=c[f];if(!dr.call(o,p)||!Dn(i[p],o[p]))return!1}return!0}function U0(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function $0(i,o){var c=U0(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=o&&f>=o)return{node:c,offset:o-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=U0(c)}}function H0(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?H0(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function F0(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=cu(i.document);o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch{c=!1}if(c)i=o.contentWindow;else break;o=cu(i.document)}return o}function Wh(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function VI(i,o){var c=F0(o);o=i.focusedElem;var f=i.selectionRange;if(c!==o&&o&&o.ownerDocument&&H0(o.ownerDocument.documentElement,o)){if(f!==null&&Wh(o)){if(i=f.start,c=f.end,c===void 0&&(c=i),"selectionStart"in o)o.selectionStart=i,o.selectionEnd=Math.min(c,o.value.length);else if(c=(i=o.ownerDocument||document)&&i.defaultView||window,c.getSelection){c=c.getSelection();var p=o.textContent.length,x=Math.min(f.start,p);f=f.end===void 0?x:Math.min(f.end,p),!c.extend&&x>f&&(p=f,f=x,x=p),p=$0(o,x);var R=$0(o,f);p&&R&&(c.rangeCount!==1||c.anchorNode!==p.node||c.anchorOffset!==p.offset||c.focusNode!==R.node||c.focusOffset!==R.offset)&&(i=i.createRange(),i.setStart(p.node,p.offset),c.removeAllRanges(),x>f?(c.addRange(i),c.extend(R.node,R.offset)):(i.setEnd(R.node,R.offset),c.addRange(i)))}}for(i=[],c=o;c=c.parentNode;)c.nodeType===1&&i.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<i.length;o++)c=i[o],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var BI=Yr&&"documentMode"in document&&11>=document.documentMode,Ao=null,Yh=null,Js=null,Xh=!1;function G0(i,o,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Xh||Ao==null||Ao!==cu(f)||(f=Ao,"selectionStart"in f&&Wh(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Js&&Qs(Js,f)||(Js=f,f=Qu(Yh,"onSelect"),0<f.length&&(o=new mu("onSelect","select",null,o,c),i.push({event:o,listeners:f}),o.target=Ao)))}function Aa(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var wo={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionrun:Aa("Transition","TransitionRun"),transitionstart:Aa("Transition","TransitionStart"),transitioncancel:Aa("Transition","TransitionCancel"),transitionend:Aa("Transition","TransitionEnd")},Qh={},K0={};Yr&&(K0=document.createElement("div").style,"AnimationEvent"in window||(delete wo.animationend.animation,delete wo.animationiteration.animation,delete wo.animationstart.animation),"TransitionEvent"in window||delete wo.transitionend.transition);function wa(i){if(Qh[i])return Qh[i];if(!wo[i])return i;var o=wo[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in K0)return Qh[i]=o[c];return i}var Z0=wa("animationend"),q0=wa("animationiteration"),W0=wa("animationstart"),UI=wa("transitionrun"),$I=wa("transitionstart"),HI=wa("transitioncancel"),Y0=wa("transitionend"),X0=new Map,Q0="abort auxClick beforeToggle 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 scrollEnd toggle touchMove waiting wheel".split(" ");function hr(i,o){X0.set(i,o),Ea(o,[i])}var Gn=[],To=0,Jh=0;function yu(){for(var i=To,o=Jh=To=0;o<i;){var c=Gn[o];Gn[o++]=null;var f=Gn[o];Gn[o++]=null;var p=Gn[o];Gn[o++]=null;var x=Gn[o];if(Gn[o++]=null,f!==null&&p!==null){var R=f.pending;R===null?p.next=p:(p.next=R.next,R.next=p),f.pending=p}x!==0&&J0(c,p,x)}}function vu(i,o,c,f){Gn[To++]=i,Gn[To++]=o,Gn[To++]=c,Gn[To++]=f,Jh|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function em(i,o,c,f){return vu(i,o,c,f),bu(i)}function Oi(i,o){return vu(i,null,null,o),bu(i)}function J0(i,o,c){i.lanes|=c;var f=i.alternate;f!==null&&(f.lanes|=c);for(var p=!1,x=i.return;x!==null;)x.childLanes|=c,f=x.alternate,f!==null&&(f.childLanes|=c),x.tag===22&&(i=x.stateNode,i===null||i._visibility&1||(p=!0)),i=x,x=x.return;p&&o!==null&&i.tag===3&&(x=i.stateNode,p=31-yn(c),x=x.hiddenUpdates,i=x[p],i===null?x[p]=[o]:i.push(o),o.lane=c|536870912)}function bu(i){if(50<Al)throw Al=0,op=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Ro={},e_=new WeakMap;function Kn(i,o){if(typeof i=="object"&&i!==null){var c=e_.get(i);return c!==void 0?c:(o={value:i,source:o,stack:ne(o)},e_.set(i,o),o)}return{value:i,source:o,stack:ne(o)}}var Co=[],No=0,_u=null,xu=0,Zn=[],qn=0,Ta=null,Qr=1,Jr="";function Ra(i,o){Co[No++]=xu,Co[No++]=_u,_u=i,xu=o}function t_(i,o,c){Zn[qn++]=Qr,Zn[qn++]=Jr,Zn[qn++]=Ta,Ta=i;var f=Qr;i=Jr;var p=32-yn(f)-1;f&=~(1<<p),c+=1;var x=32-yn(o)+p;if(30<x){var R=p-p%5;x=(f&(1<<R)-1).toString(32),f>>=R,p-=R,Qr=1<<32-yn(o)+p|c<<p|f,Jr=x+i}else Qr=1<<x|c<<p|f,Jr=i}function tm(i){i.return!==null&&(Ra(i,1),t_(i,1,0))}function nm(i){for(;i===_u;)_u=Co[--No],Co[No]=null,xu=Co[--No],Co[No]=null;for(;i===Ta;)Ta=Zn[--qn],Zn[qn]=null,Jr=Zn[--qn],Zn[qn]=null,Qr=Zn[--qn],Zn[qn]=null}var vn=null,tn=null,it=!1,mr=null,Rr=!1,rm=Error(r(519));function Ca(i){var o=Error(r(418,""));throw nl(Kn(o,i)),rm}function n_(i){var o=i.stateNode,c=i.type,f=i.memoizedProps;switch(o[cn]=i,o[Tn]=f,c){case"dialog":et("cancel",o),et("close",o);break;case"iframe":case"object":case"embed":et("load",o);break;case"video":case"audio":for(c=0;c<Tl.length;c++)et(Tl[c],o);break;case"source":et("error",o);break;case"img":case"image":case"link":et("error",o),et("load",o);break;case"details":et("toggle",o);break;case"input":et("invalid",o),y0(o,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0),lu(o);break;case"select":et("invalid",o);break;case"textarea":et("invalid",o),b0(o,f.value,f.defaultValue,f.children),lu(o)}c=f.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||o.textContent===""+c||f.suppressHydrationWarning===!0||dE(o.textContent,c)?(f.popover!=null&&(et("beforetoggle",o),et("toggle",o)),f.onScroll!=null&&et("scroll",o),f.onScrollEnd!=null&&et("scrollend",o),f.onClick!=null&&(o.onclick=Ju),o=!0):o=!1,o||Ca(i)}function r_(i){for(vn=i.return;vn;)switch(vn.tag){case 3:case 27:Rr=!0;return;case 5:case 13:Rr=!1;return;default:vn=vn.return}}function el(i){if(i!==vn)return!1;if(!it)return r_(i),it=!0,!1;var o=!1,c;if((c=i.tag!==3&&i.tag!==27)&&((c=i.tag===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Sp(i.type,i.memoizedProps)),c=!c),c&&(o=!0),o&&tn&&Ca(i),r_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8)if(c=i.data,c==="/$"){if(o===0){tn=gr(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++;i=i.nextSibling}tn=null}}else tn=vn?gr(i.stateNode.nextSibling):null;return!0}function tl(){tn=vn=null,it=!1}function nl(i){mr===null?mr=[i]:mr.push(i)}var rl=Error(r(460)),i_=Error(r(474)),im={then:function(){}};function a_(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Eu(){}function o_(i,o,c){switch(c=i[c],c===void 0?i.push(o):c!==o&&(o.then(Eu,Eu),o=c),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,i===rl?Error(r(483)):i;default:if(typeof o.status=="string")o.then(Eu,Eu);else{if(i=ft,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(f){if(o.status==="pending"){var p=o;p.status="fulfilled",p.value=f}},function(f){if(o.status==="pending"){var p=o;p.status="rejected",p.reason=f}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,i===rl?Error(r(483)):i}throw il=o,rl}}var il=null;function s_(){if(il===null)throw Error(r(459));var i=il;return il=null,i}var Oo=null,al=0;function Su(i){var o=al;return al+=1,Oo===null&&(Oo=[]),o_(Oo,i,o)}function ol(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Au(i,o){throw o.$$typeof===s?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function l_(i){var o=i._init;return o(i._payload)}function c_(i){function o(q,F){if(i){var W=q.deletions;W===null?(q.deletions=[F],q.flags|=16):W.push(F)}}function c(q,F){if(!i)return null;for(;F!==null;)o(q,F),F=F.sibling;return null}function f(q){for(var F=new Map;q!==null;)q.key!==null?F.set(q.key,q):F.set(q.index,q),q=q.sibling;return F}function p(q,F){return q=$i(q,F),q.index=0,q.sibling=null,q}function x(q,F,W){return q.index=W,i?(W=q.alternate,W!==null?(W=W.index,W<F?(q.flags|=33554434,F):W):(q.flags|=33554434,F)):(q.flags|=1048576,F)}function R(q){return i&&q.alternate===null&&(q.flags|=33554434),q}function O(q,F,W,de){return F===null||F.tag!==6?(F=Qm(W,q.mode,de),F.return=q,F):(F=p(F,W),F.return=q,F)}function M(q,F,W,de){var Ce=W.type;return Ce===d?oe(q,F,W.props.children,de,W.key):F!==null&&(F.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===T&&l_(Ce)===F.type)?(F=p(F,W.props),ol(F,W),F.return=q,F):(F=$u(W.type,W.key,W.props,null,q.mode,de),ol(F,W),F.return=q,F)}function G(q,F,W,de){return F===null||F.tag!==4||F.stateNode.containerInfo!==W.containerInfo||F.stateNode.implementation!==W.implementation?(F=Jm(W,q.mode,de),F.return=q,F):(F=p(F,W.children||[]),F.return=q,F)}function oe(q,F,W,de,Ce){return F===null||F.tag!==7?(F=za(W,q.mode,de,Ce),F.return=q,F):(F=p(F,W),F.return=q,F)}function me(q,F,W){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Qm(""+F,q.mode,W),F.return=q,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case l:return W=$u(F.type,F.key,F.props,null,q.mode,W),ol(W,F),W.return=q,W;case u:return F=Jm(F,q.mode,W),F.return=q,F;case T:var de=F._init;return F=de(F._payload),me(q,F,W)}if(Q(F)||L(F))return F=za(F,q.mode,W,null),F.return=q,F;if(typeof F.then=="function")return me(q,Su(F),W);if(F.$$typeof===v)return me(q,Vu(q,F),W);Au(q,F)}return null}function te(q,F,W,de){var Ce=F!==null?F.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ce!==null?null:O(q,F,""+W,de);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case l:return W.key===Ce?M(q,F,W,de):null;case u:return W.key===Ce?G(q,F,W,de):null;case T:return Ce=W._init,W=Ce(W._payload),te(q,F,W,de)}if(Q(W)||L(W))return Ce!==null?null:oe(q,F,W,de,null);if(typeof W.then=="function")return te(q,F,Su(W),de);if(W.$$typeof===v)return te(q,F,Vu(q,W),de);Au(q,W)}return null}function ae(q,F,W,de,Ce){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return q=q.get(W)||null,O(F,q,""+de,Ce);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case l:return q=q.get(de.key===null?W:de.key)||null,M(F,q,de,Ce);case u:return q=q.get(de.key===null?W:de.key)||null,G(F,q,de,Ce);case T:var Qe=de._init;return de=Qe(de._payload),ae(q,F,W,de,Ce)}if(Q(de)||L(de))return q=q.get(W)||null,oe(F,q,de,Ce,null);if(typeof de.then=="function")return ae(q,F,W,Su(de),Ce);if(de.$$typeof===v)return ae(q,F,W,Vu(F,de),Ce);Au(F,de)}return null}function De(q,F,W,de){for(var Ce=null,Qe=null,je=F,Me=F=0,Wt=null;je!==null&&Me<W.length;Me++){je.index>Me?(Wt=je,je=null):Wt=je.sibling;var at=te(q,je,W[Me],de);if(at===null){je===null&&(je=Wt);break}i&&je&&at.alternate===null&&o(q,je),F=x(at,F,Me),Qe===null?Ce=at:Qe.sibling=at,Qe=at,je=Wt}if(Me===W.length)return c(q,je),it&&Ra(q,Me),Ce;if(je===null){for(;Me<W.length;Me++)je=me(q,W[Me],de),je!==null&&(F=x(je,F,Me),Qe===null?Ce=je:Qe.sibling=je,Qe=je);return it&&Ra(q,Me),Ce}for(je=f(je);Me<W.length;Me++)Wt=ae(je,q,Me,W[Me],de),Wt!==null&&(i&&Wt.alternate!==null&&je.delete(Wt.key===null?Me:Wt.key),F=x(Wt,F,Me),Qe===null?Ce=Wt:Qe.sibling=Wt,Qe=Wt);return i&&je.forEach(function(Wi){return o(q,Wi)}),it&&Ra(q,Me),Ce}function He(q,F,W,de){if(W==null)throw Error(r(151));for(var Ce=null,Qe=null,je=F,Me=F=0,Wt=null,at=W.next();je!==null&&!at.done;Me++,at=W.next()){je.index>Me?(Wt=je,je=null):Wt=je.sibling;var Wi=te(q,je,at.value,de);if(Wi===null){je===null&&(je=Wt);break}i&&je&&Wi.alternate===null&&o(q,je),F=x(Wi,F,Me),Qe===null?Ce=Wi:Qe.sibling=Wi,Qe=Wi,je=Wt}if(at.done)return c(q,je),it&&Ra(q,Me),Ce;if(je===null){for(;!at.done;Me++,at=W.next())at=me(q,at.value,de),at!==null&&(F=x(at,F,Me),Qe===null?Ce=at:Qe.sibling=at,Qe=at);return it&&Ra(q,Me),Ce}for(je=f(je);!at.done;Me++,at=W.next())at=ae(je,q,Me,at.value,de),at!==null&&(i&&at.alternate!==null&&je.delete(at.key===null?Me:at.key),F=x(at,F,Me),Qe===null?Ce=at:Qe.sibling=at,Qe=at);return i&&je.forEach(function(rj){return o(q,rj)}),it&&Ra(q,Me),Ce}function Rt(q,F,W,de){if(typeof W=="object"&&W!==null&&W.type===d&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case l:e:{for(var Ce=W.key;F!==null;){if(F.key===Ce){if(Ce=W.type,Ce===d){if(F.tag===7){c(q,F.sibling),de=p(F,W.props.children),de.return=q,q=de;break e}}else if(F.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===T&&l_(Ce)===F.type){c(q,F.sibling),de=p(F,W.props),ol(de,W),de.return=q,q=de;break e}c(q,F);break}else o(q,F);F=F.sibling}W.type===d?(de=za(W.props.children,q.mode,de,W.key),de.return=q,q=de):(de=$u(W.type,W.key,W.props,null,q.mode,de),ol(de,W),de.return=q,q=de)}return R(q);case u:e:{for(Ce=W.key;F!==null;){if(F.key===Ce)if(F.tag===4&&F.stateNode.containerInfo===W.containerInfo&&F.stateNode.implementation===W.implementation){c(q,F.sibling),de=p(F,W.children||[]),de.return=q,q=de;break e}else{c(q,F);break}else o(q,F);F=F.sibling}de=Jm(W,q.mode,de),de.return=q,q=de}return R(q);case T:return Ce=W._init,W=Ce(W._payload),Rt(q,F,W,de)}if(Q(W))return De(q,F,W,de);if(L(W)){if(Ce=L(W),typeof Ce!="function")throw Error(r(150));return W=Ce.call(W),He(q,F,W,de)}if(typeof W.then=="function")return Rt(q,F,Su(W),de);if(W.$$typeof===v)return Rt(q,F,Vu(q,W),de);Au(q,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,F!==null&&F.tag===6?(c(q,F.sibling),de=p(F,W),de.return=q,q=de):(c(q,F),de=Qm(W,q.mode,de),de.return=q,q=de),R(q)):c(q,F)}return function(q,F,W,de){try{al=0;var Ce=Rt(q,F,W,de);return Oo=null,Ce}catch(je){if(je===rl)throw je;var Qe=Qn(29,je,null,q.mode);return Qe.lanes=de,Qe.return=q,Qe}finally{}}}var Na=c_(!0),u_=c_(!1),ko=Ee(null),wu=Ee(0);function d_(i,o){i=ui,Re(wu,i),Re(ko,o),ui=i|o.baseLanes}function am(){Re(wu,ui),Re(ko,ko.current)}function om(){ui=wu.current,ke(ko),ke(wu)}var Wn=Ee(null),Cr=null;function ki(i){var o=i.alternate;Re(Vt,Vt.current&1),Re(Wn,i),Cr===null&&(o===null||ko.current!==null||o.memoizedState!==null)&&(Cr=i)}function f_(i){if(i.tag===22){if(Re(Vt,Vt.current),Re(Wn,i),Cr===null){var o=i.alternate;o!==null&&o.memoizedState!==null&&(Cr=i)}}else Di()}function Di(){Re(Vt,Vt.current),Re(Wn,Wn.current)}function ei(i){ke(Wn),Cr===i&&(Cr=null),ke(Vt)}var Vt=Ee(0);function Tu(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var FI=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(c,f){i.push(f)}};this.abort=function(){o.aborted=!0,i.forEach(function(c){return c()})}},GI=e.unstable_scheduleCallback,KI=e.unstable_NormalPriority,Bt={$$typeof:v,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sm(){return{controller:new FI,data:new Map,refCount:0}}function sl(i){i.refCount--,i.refCount===0&&GI(KI,function(){i.controller.abort()})}var ll=null,lm=0,Do=0,Io=null;function ZI(i,o){if(ll===null){var c=ll=[];lm=0,Do=mp(),Io={status:"pending",value:void 0,then:function(f){c.push(f)}}}return lm++,o.then(h_,h_),o}function h_(){if(--lm===0&&ll!==null){Io!==null&&(Io.status="fulfilled");var i=ll;ll=null,Do=0,Io=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function qI(i,o){var c=[],f={status:"pending",value:null,reason:null,then:function(p){c.push(p)}};return i.then(function(){f.status="fulfilled",f.value=o;for(var p=0;p<c.length;p++)(0,c[p])(o)},function(p){for(f.status="rejected",f.reason=p,p=0;p<c.length;p++)(0,c[p])(void 0)}),f}var m_=V.S;V.S=function(i,o){typeof o=="object"&&o!==null&&typeof o.then=="function"&&ZI(i,o),m_!==null&&m_(i,o)};var Oa=Ee(null);function cm(){var i=Oa.current;return i!==null?i:ft.pooledCache}function Ru(i,o){o===null?Re(Oa,Oa.current):Re(Oa,o.pool)}function p_(){var i=cm();return i===null?null:{parent:Bt._currentValue,pool:i}}var Ii=0,Ye=null,lt=null,Lt=null,Cu=!1,Lo=!1,ka=!1,Nu=0,cl=0,jo=null,WI=0;function Ot(){throw Error(r(321))}function um(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!Dn(i[c],o[c]))return!1;return!0}function dm(i,o,c,f,p,x){return Ii=x,Ye=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,V.H=i===null||i.memoizedState===null?Da:Li,ka=!1,x=c(f,p),ka=!1,Lo&&(x=y_(o,c,f,p)),g_(i),x}function g_(i){V.H=Nr;var o=lt!==null&<.next!==null;if(Ii=0,Lt=lt=Ye=null,Cu=!1,cl=0,jo=null,o)throw Error(r(300));i===null||Zt||(i=i.dependencies,i!==null&&zu(i)&&(Zt=!0))}function y_(i,o,c,f){Ye=i;var p=0;do{if(Lo&&(jo=null),cl=0,Lo=!1,25<=p)throw Error(r(301));if(p+=1,Lt=lt=null,i.updateQueue!=null){var x=i.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}V.H=Ia,x=o(c,f)}while(Lo);return x}function YI(){var i=V.H,o=i.useState()[0];return o=typeof o.then=="function"?ul(o):o,i=i.useState()[0],(lt!==null?lt.memoizedState:null)!==i&&(Ye.flags|=1024),o}function fm(){var i=Nu!==0;return Nu=0,i}function hm(i,o,c){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~c}function mm(i){if(Cu){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Cu=!1}Ii=0,Lt=lt=Ye=null,Lo=!1,cl=Nu=0,jo=null}function Cn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Ye.memoizedState=Lt=i:Lt=Lt.next=i,Lt}function jt(){if(lt===null){var i=Ye.alternate;i=i!==null?i.memoizedState:null}else i=lt.next;var o=Lt===null?Ye.memoizedState:Lt.next;if(o!==null)Lt=o,lt=i;else{if(i===null)throw Ye.alternate===null?Error(r(467)):Error(r(310));lt=i,i={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},Lt===null?Ye.memoizedState=Lt=i:Lt=Lt.next=i}return Lt}var Ou;Ou=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function ul(i){var o=cl;return cl+=1,jo===null&&(jo=[]),i=o_(jo,i,o),o=Ye,(Lt===null?o.memoizedState:Lt.next)===null&&(o=o.alternate,V.H=o===null||o.memoizedState===null?Da:Li),i}function ku(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return ul(i);if(i.$$typeof===v)return un(i)}throw Error(r(438,String(i)))}function pm(i){var o=null,c=Ye.updateQueue;if(c!==null&&(o=c.memoCache),o==null){var f=Ye.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(o={data:f.data.map(function(p){return p.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),c===null&&(c=Ou(),Ye.updateQueue=c),c.memoCache=o,c=o.data[o.index],c===void 0)for(c=o.data[o.index]=Array(i),f=0;f<i;f++)c[f]=k;return o.index++,c}function ti(i,o){return typeof o=="function"?o(i):o}function Du(i){var o=jt();return gm(o,lt,i)}function gm(i,o,c){var f=i.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=c;var p=i.baseQueue,x=f.pending;if(x!==null){if(p!==null){var R=p.next;p.next=x.next,x.next=R}o.baseQueue=p=x,f.pending=null}if(x=i.baseState,p===null)i.memoizedState=x;else{o=p.next;var O=R=null,M=null,G=o,oe=!1;do{var me=G.lane&-536870913;if(me!==G.lane?(nt&me)===me:(Ii&me)===me){var te=G.revertLane;if(te===0)M!==null&&(M=M.next={lane:0,revertLane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),me===Do&&(oe=!0);else if((Ii&te)===te){G=G.next,te===Do&&(oe=!0);continue}else me={lane:0,revertLane:G.revertLane,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},M===null?(O=M=me,R=x):M=M.next=me,Ye.lanes|=te,Hi|=te;me=G.action,ka&&c(x,me),x=G.hasEagerState?G.eagerState:c(x,me)}else te={lane:me,revertLane:G.revertLane,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},M===null?(O=M=te,R=x):M=M.next=te,Ye.lanes|=me,Hi|=me;G=G.next}while(G!==null&&G!==o);if(M===null?R=x:M.next=O,!Dn(x,i.memoizedState)&&(Zt=!0,oe&&(c=Io,c!==null)))throw c;i.memoizedState=x,i.baseState=R,i.baseQueue=M,f.lastRenderedState=x}return p===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function ym(i){var o=jt(),c=o.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var f=c.dispatch,p=c.pending,x=o.memoizedState;if(p!==null){c.pending=null;var R=p=p.next;do x=i(x,R.action),R=R.next;while(R!==p);Dn(x,o.memoizedState)||(Zt=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),c.lastRenderedState=x}return[x,f]}function v_(i,o,c){var f=Ye,p=jt(),x=it;if(x){if(c===void 0)throw Error(r(407));c=c()}else c=o();var R=!Dn((lt||p).memoizedState,c);if(R&&(p.memoizedState=c,Zt=!0),p=p.queue,_m(x_.bind(null,f,p,i),[i]),p.getSnapshot!==o||R||Lt!==null&&Lt.memoizedState.tag&1){if(f.flags|=2048,Mo(9,__.bind(null,f,p,c,o),{destroy:void 0},null),ft===null)throw Error(r(349));x||(Ii&60)!==0||b_(f,o,c)}return c}function b_(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Ye.updateQueue,o===null?(o=Ou(),Ye.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function __(i,o,c,f){o.value=c,o.getSnapshot=f,E_(o)&&S_(i)}function x_(i,o,c){return c(function(){E_(o)&&S_(i)})}function E_(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!Dn(i,c)}catch{return!0}}function S_(i){var o=Oi(i,2);o!==null&&bn(o,i,2)}function vm(i){var o=Cn();if(typeof i=="function"){var c=i;if(i=c(),ka){fr(!0);try{c()}finally{fr(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:i},o}function A_(i,o,c,f){return i.baseState=c,gm(i,lt,typeof f=="function"?f:ti)}function XI(i,o,c,f,p){if(ju(i))throw Error(r(485));if(i=o.action,i!==null){var x={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){x.listeners.push(R)}};V.T!==null?c(!0):x.isTransition=!1,f(x),c=o.pending,c===null?(x.next=o.pending=x,w_(o,x)):(x.next=c.next,o.pending=c.next=x)}}function w_(i,o){var c=o.action,f=o.payload,p=i.state;if(o.isTransition){var x=V.T,R={};V.T=R;try{var O=c(p,f),M=V.S;M!==null&&M(R,O),T_(i,o,O)}catch(G){bm(i,o,G)}finally{V.T=x}}else try{x=c(p,f),T_(i,o,x)}catch(G){bm(i,o,G)}}function T_(i,o,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(f){R_(i,o,f)},function(f){return bm(i,o,f)}):R_(i,o,c)}function R_(i,o,c){o.status="fulfilled",o.value=c,C_(o),i.state=c,o=i.pending,o!==null&&(c=o.next,c===o?i.pending=null:(c=c.next,o.next=c,w_(i,c)))}function bm(i,o,c){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do o.status="rejected",o.reason=c,C_(o),o=o.next;while(o!==f)}i.action=null}function C_(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function N_(i,o){return o}function O_(i,o){if(it){var c=ft.formState;if(c!==null){e:{var f=Ye;if(it){if(tn){t:{for(var p=tn,x=Rr;p.nodeType!==8;){if(!x){p=null;break t}if(p=gr(p.nextSibling),p===null){p=null;break t}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){tn=gr(p.nextSibling),f=p.data==="F!";break e}}Ca(f)}f=!1}f&&(o=c[0])}}return c=Cn(),c.memoizedState=c.baseState=o,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:N_,lastRenderedState:o},c.queue=f,c=q_.bind(null,Ye,f),f.dispatch=c,f=vm(!1),x=wm.bind(null,Ye,!1,f.queue),f=Cn(),p={state:o,dispatch:null,action:i,pending:null},f.queue=p,c=XI.bind(null,Ye,p,x,c),p.dispatch=c,f.memoizedState=i,[o,c,!1]}function k_(i){var o=jt();return D_(o,lt,i)}function D_(i,o,c){o=gm(i,o,N_)[0],i=Du(ti)[0],o=typeof o=="object"&&o!==null&&typeof o.then=="function"?ul(o):o;var f=jt(),p=f.queue,x=p.dispatch;return c!==f.memoizedState&&(Ye.flags|=2048,Mo(9,QI.bind(null,p,c),{destroy:void 0},null)),[o,x,i]}function QI(i,o){i.action=o}function I_(i){var o=jt(),c=lt;if(c!==null)return D_(o,c,i);jt(),o=o.memoizedState,c=jt();var f=c.queue.dispatch;return c.memoizedState=i,[o,f,!1]}function Mo(i,o,c,f){return i={tag:i,create:o,inst:c,deps:f,next:null},o=Ye.updateQueue,o===null&&(o=Ou(),Ye.updateQueue=o),c=o.lastEffect,c===null?o.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,o.lastEffect=i),i}function L_(){return jt().memoizedState}function Iu(i,o,c,f){var p=Cn();Ye.flags|=i,p.memoizedState=Mo(1|o,c,{destroy:void 0},f===void 0?null:f)}function Lu(i,o,c,f){var p=jt();f=f===void 0?null:f;var x=p.memoizedState.inst;lt!==null&&f!==null&&um(f,lt.memoizedState.deps)?p.memoizedState=Mo(o,c,x,f):(Ye.flags|=i,p.memoizedState=Mo(1|o,c,x,f))}function j_(i,o){Iu(8390656,8,i,o)}function _m(i,o){Lu(2048,8,i,o)}function M_(i,o){return Lu(4,2,i,o)}function P_(i,o){return Lu(4,4,i,o)}function z_(i,o){if(typeof o=="function"){i=i();var c=o(i);return function(){typeof c=="function"?c():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function V_(i,o,c){c=c!=null?c.concat([i]):null,Lu(4,4,z_.bind(null,o,i),c)}function xm(){}function B_(i,o){var c=jt();o=o===void 0?null:o;var f=c.memoizedState;return o!==null&&um(o,f[1])?f[0]:(c.memoizedState=[i,o],i)}function U_(i,o){var c=jt();o=o===void 0?null:o;var f=c.memoizedState;if(o!==null&&um(o,f[1]))return f[0];if(f=i(),ka){fr(!0);try{i()}finally{fr(!1)}}return c.memoizedState=[f,o],f}function Em(i,o,c){return c===void 0||(Ii&1073741824)!==0?i.memoizedState=o:(i.memoizedState=c,i=Hx(),Ye.lanes|=i,Hi|=i,c)}function $_(i,o,c,f){return Dn(c,o)?c:ko.current!==null?(i=Em(i,c,f),Dn(i,o)||(Zt=!0),i):(Ii&42)===0?(Zt=!0,i.memoizedState=c):(i=Hx(),Ye.lanes|=i,Hi|=i,o)}function H_(i,o,c,f,p){var x=re.p;re.p=x!==0&&8>x?x:8;var R=V.T,O={};V.T=O,wm(i,!1,o,c);try{var M=p(),G=V.S;if(G!==null&&G(O,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var oe=qI(M,f);dl(i,o,oe,Mn(i))}else dl(i,o,f,Mn(i))}catch(me){dl(i,o,{then:function(){},status:"rejected",reason:me},Mn())}finally{re.p=x,V.T=R}}function JI(){}function Sm(i,o,c,f){if(i.tag!==5)throw Error(r(476));var p=F_(i).queue;H_(i,p,o,he,c===null?JI:function(){return G_(i),c(f)})}function F_(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:he},next:null};var c={};return o.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:c},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function G_(i){var o=F_(i).next.queue;dl(i,o,{},Mn())}function Am(){return un(kl)}function K_(){return jt().memoizedState}function Z_(){return jt().memoizedState}function eL(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var c=Mn();i=Pi(c);var f=zi(o,i,c);f!==null&&(bn(f,o,c),ml(f,o,c)),o={cache:sm()},i.payload=o;return}o=o.return}}function tL(i,o,c){var f=Mn();c={lane:f,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},ju(i)?W_(o,c):(c=em(i,o,c,f),c!==null&&(bn(c,i,f),Y_(c,o,f)))}function q_(i,o,c){var f=Mn();dl(i,o,c,f)}function dl(i,o,c,f){var p={lane:f,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(ju(i))W_(o,p);else{var x=i.alternate;if(i.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var R=o.lastRenderedState,O=x(R,c);if(p.hasEagerState=!0,p.eagerState=O,Dn(O,R))return vu(i,o,p,0),ft===null&&yu(),!1}catch{}finally{}if(c=em(i,o,p,f),c!==null)return bn(c,i,f),Y_(c,o,f),!0}return!1}function wm(i,o,c,f){if(f={lane:2,revertLane:mp(),action:f,hasEagerState:!1,eagerState:null,next:null},ju(i)){if(o)throw Error(r(479))}else o=em(i,c,f,2),o!==null&&bn(o,i,2)}function ju(i){var o=i.alternate;return i===Ye||o!==null&&o===Ye}function W_(i,o){Lo=Cu=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function Y_(i,o,c){if((c&4194176)!==0){var f=o.lanes;f&=i.pendingLanes,c|=f,o.lanes=c,s0(i,c)}}var Nr={readContext:un,use:ku,useCallback:Ot,useContext:Ot,useEffect:Ot,useImperativeHandle:Ot,useLayoutEffect:Ot,useInsertionEffect:Ot,useMemo:Ot,useReducer:Ot,useRef:Ot,useState:Ot,useDebugValue:Ot,useDeferredValue:Ot,useTransition:Ot,useSyncExternalStore:Ot,useId:Ot};Nr.useCacheRefresh=Ot,Nr.useMemoCache=Ot,Nr.useHostTransitionStatus=Ot,Nr.useFormState=Ot,Nr.useActionState=Ot,Nr.useOptimistic=Ot;var Da={readContext:un,use:ku,useCallback:function(i,o){return Cn().memoizedState=[i,o===void 0?null:o],i},useContext:un,useEffect:j_,useImperativeHandle:function(i,o,c){c=c!=null?c.concat([i]):null,Iu(4194308,4,z_.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Iu(4194308,4,i,o)},useInsertionEffect:function(i,o){Iu(4,2,i,o)},useMemo:function(i,o){var c=Cn();o=o===void 0?null:o;var f=i();if(ka){fr(!0);try{i()}finally{fr(!1)}}return c.memoizedState=[f,o],f},useReducer:function(i,o,c){var f=Cn();if(c!==void 0){var p=c(o);if(ka){fr(!0);try{c(o)}finally{fr(!1)}}}else p=o;return f.memoizedState=f.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},f.queue=i,i=i.dispatch=tL.bind(null,Ye,i),[f.memoizedState,i]},useRef:function(i){var o=Cn();return i={current:i},o.memoizedState=i},useState:function(i){i=vm(i);var o=i.queue,c=q_.bind(null,Ye,o);return o.dispatch=c,[i.memoizedState,c]},useDebugValue:xm,useDeferredValue:function(i,o){var c=Cn();return Em(c,i,o)},useTransition:function(){var i=vm(!1);return i=H_.bind(null,Ye,i.queue,!0,!1),Cn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,c){var f=Ye,p=Cn();if(it){if(c===void 0)throw Error(r(407));c=c()}else{if(c=o(),ft===null)throw Error(r(349));(nt&60)!==0||b_(f,o,c)}p.memoizedState=c;var x={value:c,getSnapshot:o};return p.queue=x,j_(x_.bind(null,f,x,i),[i]),f.flags|=2048,Mo(9,__.bind(null,f,x,c,o),{destroy:void 0},null),c},useId:function(){var i=Cn(),o=ft.identifierPrefix;if(it){var c=Jr,f=Qr;c=(f&~(1<<32-yn(f)-1)).toString(32)+c,o=":"+o+"R"+c,c=Nu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=WI++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},useCacheRefresh:function(){return Cn().memoizedState=eL.bind(null,Ye)}};Da.useMemoCache=pm,Da.useHostTransitionStatus=Am,Da.useFormState=O_,Da.useActionState=O_,Da.useOptimistic=function(i){var o=Cn();o.memoizedState=o.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=c,o=wm.bind(null,Ye,!0,c),c.dispatch=o,[i,o]};var Li={readContext:un,use:ku,useCallback:B_,useContext:un,useEffect:_m,useImperativeHandle:V_,useInsertionEffect:M_,useLayoutEffect:P_,useMemo:U_,useReducer:Du,useRef:L_,useState:function(){return Du(ti)},useDebugValue:xm,useDeferredValue:function(i,o){var c=jt();return $_(c,lt.memoizedState,i,o)},useTransition:function(){var i=Du(ti)[0],o=jt().memoizedState;return[typeof i=="boolean"?i:ul(i),o]},useSyncExternalStore:v_,useId:K_};Li.useCacheRefresh=Z_,Li.useMemoCache=pm,Li.useHostTransitionStatus=Am,Li.useFormState=k_,Li.useActionState=k_,Li.useOptimistic=function(i,o){var c=jt();return A_(c,lt,i,o)};var Ia={readContext:un,use:ku,useCallback:B_,useContext:un,useEffect:_m,useImperativeHandle:V_,useInsertionEffect:M_,useLayoutEffect:P_,useMemo:U_,useReducer:ym,useRef:L_,useState:function(){return ym(ti)},useDebugValue:xm,useDeferredValue:function(i,o){var c=jt();return lt===null?Em(c,i,o):$_(c,lt.memoizedState,i,o)},useTransition:function(){var i=ym(ti)[0],o=jt().memoizedState;return[typeof i=="boolean"?i:ul(i),o]},useSyncExternalStore:v_,useId:K_};Ia.useCacheRefresh=Z_,Ia.useMemoCache=pm,Ia.useHostTransitionStatus=Am,Ia.useFormState=I_,Ia.useActionState=I_,Ia.useOptimistic=function(i,o){var c=jt();return lt!==null?A_(c,lt,i,o):(c.baseState=i,[i,c.queue.dispatch])};function Tm(i,o,c,f){o=i.memoizedState,c=c(f,o),c=c==null?o:U({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Rm={isMounted:function(i){return(i=i._reactInternals)?K(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var f=Mn(),p=Pi(f);p.payload=o,c!=null&&(p.callback=c),o=zi(i,p,f),o!==null&&(bn(o,i,f),ml(o,i,f))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var f=Mn(),p=Pi(f);p.tag=1,p.payload=o,c!=null&&(p.callback=c),o=zi(i,p,f),o!==null&&(bn(o,i,f),ml(o,i,f))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=Mn(),f=Pi(c);f.tag=2,o!=null&&(f.callback=o),o=zi(i,f,c),o!==null&&(bn(o,i,c),ml(o,i,c))}};function X_(i,o,c,f,p,x,R){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,x,R):o.prototype&&o.prototype.isPureReactComponent?!Qs(c,f)||!Qs(p,x):!0}function Q_(i,o,c,f){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,f),o.state!==i&&Rm.enqueueReplaceState(o,o.state,null)}function La(i,o){var c=o;if("ref"in o){c={};for(var f in o)f!=="ref"&&(c[f]=o[f])}if(i=i.defaultProps){c===o&&(c=U({},c));for(var p in i)c[p]===void 0&&(c[p]=i[p])}return c}var Mu=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function J_(i){Mu(i)}function ex(i){console.error(i)}function tx(i){Mu(i)}function Pu(i,o){try{var c=i.onUncaughtError;c(o.value,{componentStack:o.stack})}catch(f){setTimeout(function(){throw f})}}function nx(i,o,c){try{var f=i.onCaughtError;f(c.value,{componentStack:c.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Cm(i,o,c){return c=Pi(c),c.tag=3,c.payload={element:null},c.callback=function(){Pu(i,o)},c}function rx(i){return i=Pi(i),i.tag=3,i}function ix(i,o,c,f){var p=c.type.getDerivedStateFromError;if(typeof p=="function"){var x=f.value;i.payload=function(){return p(x)},i.callback=function(){nx(o,c,f)}}var R=c.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(i.callback=function(){nx(o,c,f),typeof p!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var O=f.stack;this.componentDidCatch(f.value,{componentStack:O!==null?O:""})})}function nL(i,o,c,f,p){if(c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(o=c.alternate,o!==null&&hl(o,c,p,!0),c=Wn.current,c!==null){switch(c.tag){case 13:return Cr===null?cp():c.alternate===null&&Tt===0&&(Tt=3),c.flags&=-257,c.flags|=65536,c.lanes=p,f===im?c.flags|=16384:(o=c.updateQueue,o===null?c.updateQueue=new Set([f]):o.add(f),dp(i,f,p)),!1;case 22:return c.flags|=65536,f===im?c.flags|=16384:(o=c.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([f])},c.updateQueue=o):(c=o.retryQueue,c===null?o.retryQueue=new Set([f]):c.add(f)),dp(i,f,p)),!1}throw Error(r(435,c.tag))}return dp(i,f,p),cp(),!1}if(it)return o=Wn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=p,f!==rm&&(i=Error(r(422),{cause:f}),nl(Kn(i,c)))):(f!==rm&&(o=Error(r(423),{cause:f}),nl(Kn(o,c))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,f=Kn(f,c),p=Cm(i.stateNode,f,p),Hm(i,p),Tt!==4&&(Tt=2)),!1;var x=Error(r(520),{cause:f});if(x=Kn(x,c),El===null?El=[x]:El.push(x),Tt!==4&&(Tt=2),o===null)return!0;f=Kn(f,c),c=o;do{switch(c.tag){case 3:return c.flags|=65536,i=p&-p,c.lanes|=i,i=Cm(c.stateNode,f,i),Hm(c,i),!1;case 1:if(o=c.type,x=c.stateNode,(c.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Fi===null||!Fi.has(x))))return c.flags|=65536,p&=-p,c.lanes|=p,p=rx(p),ix(p,i,c,f),Hm(c,p),!1}c=c.return}while(c!==null);return!1}var ax=Error(r(461)),Zt=!1;function nn(i,o,c,f){o.child=i===null?u_(o,null,c,f):Na(o,i.child,c,f)}function ox(i,o,c,f,p){c=c.render;var x=o.ref;if("ref"in f){var R={};for(var O in f)O!=="ref"&&(R[O]=f[O])}else R=f;return Ma(o),f=dm(i,o,c,R,x,p),O=fm(),i!==null&&!Zt?(hm(i,o,p),ni(i,o,p)):(it&&O&&tm(o),o.flags|=1,nn(i,o,f,p),o.child)}function sx(i,o,c,f,p){if(i===null){var x=c.type;return typeof x=="function"&&!Xm(x)&&x.defaultProps===void 0&&c.compare===null?(o.tag=15,o.type=x,lx(i,o,x,f,p)):(i=$u(c.type,null,f,o,o.mode,p),i.ref=o.ref,i.return=o,o.child=i)}if(x=i.child,!Pm(i,p)){var R=x.memoizedProps;if(c=c.compare,c=c!==null?c:Qs,c(R,f)&&i.ref===o.ref)return ni(i,o,p)}return o.flags|=1,i=$i(x,f),i.ref=o.ref,i.return=o,o.child=i}function lx(i,o,c,f,p){if(i!==null){var x=i.memoizedProps;if(Qs(x,f)&&i.ref===o.ref)if(Zt=!1,o.pendingProps=f=x,Pm(i,p))(i.flags&131072)!==0&&(Zt=!0);else return o.lanes=i.lanes,ni(i,o,p)}return Nm(i,o,c,f,p)}function cx(i,o,c){var f=o.pendingProps,p=f.children,x=(o.stateNode._pendingVisibility&2)!==0,R=i!==null?i.memoizedState:null;if(fl(i,o),f.mode==="hidden"||x){if((o.flags&128)!==0){if(f=R!==null?R.baseLanes|c:c,i!==null){for(p=o.child=i.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;o.childLanes=x&~f}else o.childLanes=0,o.child=null;return ux(i,o,f,c)}if((c&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Ru(o,R!==null?R.cachePool:null),R!==null?d_(o,R):am(),f_(o);else return o.lanes=o.childLanes=536870912,ux(i,o,R!==null?R.baseLanes|c:c,c)}else R!==null?(Ru(o,R.cachePool),d_(o,R),Di(),o.memoizedState=null):(i!==null&&Ru(o,null),am(),Di());return nn(i,o,p,c),o.child}function ux(i,o,c,f){var p=cm();return p=p===null?null:{parent:Bt._currentValue,pool:p},o.memoizedState={baseLanes:c,cachePool:p},i!==null&&Ru(o,null),am(),f_(o),i!==null&&hl(i,o,f,!0),null}function fl(i,o){var c=o.ref;if(c===null)i!==null&&i.ref!==null&&(o.flags|=2097664);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(o.flags|=2097664)}}function Nm(i,o,c,f,p){return Ma(o),c=dm(i,o,c,f,void 0,p),f=fm(),i!==null&&!Zt?(hm(i,o,p),ni(i,o,p)):(it&&f&&tm(o),o.flags|=1,nn(i,o,c,p),o.child)}function dx(i,o,c,f,p,x){return Ma(o),o.updateQueue=null,c=y_(o,f,c,p),g_(i),f=fm(),i!==null&&!Zt?(hm(i,o,x),ni(i,o,x)):(it&&f&&tm(o),o.flags|=1,nn(i,o,c,x),o.child)}function fx(i,o,c,f,p){if(Ma(o),o.stateNode===null){var x=Ro,R=c.contextType;typeof R=="object"&&R!==null&&(x=un(R)),x=new c(f,x),o.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Rm,o.stateNode=x,x._reactInternals=o,x=o.stateNode,x.props=f,x.state=o.memoizedState,x.refs={},Um(o),R=c.contextType,x.context=typeof R=="object"&&R!==null?un(R):Ro,x.state=o.memoizedState,R=c.getDerivedStateFromProps,typeof R=="function"&&(Tm(o,c,R,f),x.state=o.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(R=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),R!==x.state&&Rm.enqueueReplaceState(x,x.state,null),gl(o,f,x,p),pl(),x.state=o.memoizedState),typeof x.componentDidMount=="function"&&(o.flags|=4194308),f=!0}else if(i===null){x=o.stateNode;var O=o.memoizedProps,M=La(c,O);x.props=M;var G=x.context,oe=c.contextType;R=Ro,typeof oe=="object"&&oe!==null&&(R=un(oe));var me=c.getDerivedStateFromProps;oe=typeof me=="function"||typeof x.getSnapshotBeforeUpdate=="function",O=o.pendingProps!==O,oe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O||G!==R)&&Q_(o,x,f,R),Mi=!1;var te=o.memoizedState;x.state=te,gl(o,f,x,p),pl(),G=o.memoizedState,O||te!==G||Mi?(typeof me=="function"&&(Tm(o,c,me,f),G=o.memoizedState),(M=Mi||X_(o,c,M,f,te,G,R))?(oe||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"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=G),x.props=f,x.state=G,x.context=R,f=M):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{x=o.stateNode,$m(i,o),R=o.memoizedProps,oe=La(c,R),x.props=oe,me=o.pendingProps,te=x.context,G=c.contextType,M=Ro,typeof G=="object"&&G!==null&&(M=un(G)),O=c.getDerivedStateFromProps,(G=typeof O=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==me||te!==M)&&Q_(o,x,f,M),Mi=!1,te=o.memoizedState,x.state=te,gl(o,f,x,p),pl();var ae=o.memoizedState;R!==me||te!==ae||Mi||i!==null&&i.dependencies!==null&&zu(i.dependencies)?(typeof O=="function"&&(Tm(o,c,O,f),ae=o.memoizedState),(oe=Mi||X_(o,c,oe,f,te,ae,M)||i!==null&&i.dependencies!==null&&zu(i.dependencies))?(G||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,ae,M),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,ae,M)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&te===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&te===i.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=ae),x.props=f,x.state=ae,x.context=M,f=oe):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&te===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&te===i.memoizedState||(o.flags|=1024),f=!1)}return x=f,fl(i,o),f=(o.flags&128)!==0,x||f?(x=o.stateNode,c=f&&typeof c.getDerivedStateFromError!="function"?null:x.render(),o.flags|=1,i!==null&&f?(o.child=Na(o,i.child,null,p),o.child=Na(o,null,c,p)):nn(i,o,c,p),o.memoizedState=x.state,i=o.child):i=ni(i,o,p),i}function hx(i,o,c,f){return tl(),o.flags|=256,nn(i,o,c,f),o.child}var Om={dehydrated:null,treeContext:null,retryLane:0};function km(i){return{baseLanes:i,cachePool:p_()}}function Dm(i,o,c){return i=i!==null?i.childLanes&~c:0,o&&(i|=Jn),i}function mx(i,o,c){var f=o.pendingProps,p=!1,x=(o.flags&128)!==0,R;if((R=x)||(R=i!==null&&i.memoizedState===null?!1:(Vt.current&2)!==0),R&&(p=!0,o.flags&=-129),R=(o.flags&32)!==0,o.flags&=-33,i===null){if(it){if(p?ki(o):Di(),it){var O=tn,M;if(M=O){e:{for(M=O,O=Rr;M.nodeType!==8;){if(!O){O=null;break e}if(M=gr(M.nextSibling),M===null){O=null;break e}}O=M}O!==null?(o.memoizedState={dehydrated:O,treeContext:Ta!==null?{id:Qr,overflow:Jr}:null,retryLane:536870912},M=Qn(18,null,null,0),M.stateNode=O,M.return=o,o.child=M,vn=o,tn=null,M=!0):M=!1}M||Ca(o)}if(O=o.memoizedState,O!==null&&(O=O.dehydrated,O!==null))return O.data==="$!"?o.lanes=16:o.lanes=536870912,null;ei(o)}return O=f.children,f=f.fallback,p?(Di(),p=o.mode,O=Lm({mode:"hidden",children:O},p),f=za(f,p,c,null),O.return=o,f.return=o,O.sibling=f,o.child=O,p=o.child,p.memoizedState=km(c),p.childLanes=Dm(i,R,c),o.memoizedState=Om,f):(ki(o),Im(o,O))}if(M=i.memoizedState,M!==null&&(O=M.dehydrated,O!==null)){if(x)o.flags&256?(ki(o),o.flags&=-257,o=jm(i,o,c)):o.memoizedState!==null?(Di(),o.child=i.child,o.flags|=128,o=null):(Di(),p=f.fallback,O=o.mode,f=Lm({mode:"visible",children:f.children},O),p=za(p,O,c,null),p.flags|=2,f.return=o,p.return=o,f.sibling=p,o.child=f,Na(o,i.child,null,c),f=o.child,f.memoizedState=km(c),f.childLanes=Dm(i,R,c),o.memoizedState=Om,o=p);else if(ki(o),O.data==="$!"){if(R=O.nextSibling&&O.nextSibling.dataset,R)var G=R.dgst;R=G,f=Error(r(419)),f.stack="",f.digest=R,nl({value:f,source:null,stack:null}),o=jm(i,o,c)}else if(Zt||hl(i,o,c,!1),R=(c&i.childLanes)!==0,Zt||R){if(R=ft,R!==null){if(f=c&-c,(f&42)!==0)f=1;else switch(f){case 2:f=1;break;case 8:f=4;break;case 32:f=16;break;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:f=64;break;case 268435456:f=134217728;break;default:f=0}if(f=(f&(R.suspendedLanes|c))!==0?0:f,f!==0&&f!==M.retryLane)throw M.retryLane=f,Oi(i,f),bn(R,i,f),ax}O.data==="$?"||cp(),o=jm(i,o,c)}else O.data==="$?"?(o.flags|=128,o.child=i.child,o=yL.bind(null,i),O._reactRetry=o,o=null):(i=M.treeContext,tn=gr(O.nextSibling),vn=o,it=!0,mr=null,Rr=!1,i!==null&&(Zn[qn++]=Qr,Zn[qn++]=Jr,Zn[qn++]=Ta,Qr=i.id,Jr=i.overflow,Ta=o),o=Im(o,f.children),o.flags|=4096);return o}return p?(Di(),p=f.fallback,O=o.mode,M=i.child,G=M.sibling,f=$i(M,{mode:"hidden",children:f.children}),f.subtreeFlags=M.subtreeFlags&31457280,G!==null?p=$i(G,p):(p=za(p,O,c,null),p.flags|=2),p.return=o,f.return=o,f.sibling=p,o.child=f,f=p,p=o.child,O=i.child.memoizedState,O===null?O=km(c):(M=O.cachePool,M!==null?(G=Bt._currentValue,M=M.parent!==G?{parent:G,pool:G}:M):M=p_(),O={baseLanes:O.baseLanes|c,cachePool:M}),p.memoizedState=O,p.childLanes=Dm(i,R,c),o.memoizedState=Om,f):(ki(o),c=i.child,i=c.sibling,c=$i(c,{mode:"visible",children:f.children}),c.return=o,c.sibling=null,i!==null&&(R=o.deletions,R===null?(o.deletions=[i],o.flags|=16):R.push(i)),o.child=c,o.memoizedState=null,c)}function Im(i,o){return o=Lm({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Lm(i,o){return Bx(i,o,0,null)}function jm(i,o,c){return Na(o,i.child,null,c),i=Im(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function px(i,o,c){i.lanes|=o;var f=i.alternate;f!==null&&(f.lanes|=o),Vm(i.return,o,c)}function Mm(i,o,c,f,p){var x=i.memoizedState;x===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:p}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=f,x.tail=c,x.tailMode=p)}function gx(i,o,c){var f=o.pendingProps,p=f.revealOrder,x=f.tail;if(nn(i,o,f.children,c),f=Vt.current,(f&2)!==0)f=f&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&px(i,c,o);else if(i.tag===19)px(i,c,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}switch(Re(Vt,f),p){case"forwards":for(c=o.child,p=null;c!==null;)i=c.alternate,i!==null&&Tu(i)===null&&(p=c),c=c.sibling;c=p,c===null?(p=o.child,o.child=null):(p=c.sibling,c.sibling=null),Mm(o,!1,p,c,x);break;case"backwards":for(c=null,p=o.child,o.child=null;p!==null;){if(i=p.alternate,i!==null&&Tu(i)===null){o.child=p;break}i=p.sibling,p.sibling=c,c=p,p=i}Mm(o,!0,c,null,x);break;case"together":Mm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function ni(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),Hi|=o.lanes,(c&o.childLanes)===0)if(i!==null){if(hl(i,o,c,!1),(c&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,c=$i(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=$i(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function Pm(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&zu(i)))}function rL(i,o,c){switch(o.tag){case 3:kn(o,o.stateNode.containerInfo),ji(o,Bt,i.memoizedState.cache),tl();break;case 27:case 5:ur(o);break;case 4:kn(o,o.stateNode.containerInfo);break;case 10:ji(o,o.type,o.memoizedProps.value);break;case 13:var f=o.memoizedState;if(f!==null)return f.dehydrated!==null?(ki(o),o.flags|=128,null):(c&o.child.childLanes)!==0?mx(i,o,c):(ki(o),i=ni(i,o,c),i!==null?i.sibling:null);ki(o);break;case 19:var p=(i.flags&128)!==0;if(f=(c&o.childLanes)!==0,f||(hl(i,o,c,!1),f=(c&o.childLanes)!==0),p){if(f)return gx(i,o,c);o.flags|=128}if(p=o.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Re(Vt,Vt.current),f)break;return null;case 22:case 23:return o.lanes=0,cx(i,o,c);case 24:ji(o,Bt,i.memoizedState.cache)}return ni(i,o,c)}function yx(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps)Zt=!0;else{if(!Pm(i,c)&&(o.flags&128)===0)return Zt=!1,rL(i,o,c);Zt=(i.flags&131072)!==0}else Zt=!1,it&&(o.flags&1048576)!==0&&t_(o,xu,o.index);switch(o.lanes=0,o.tag){case 16:e:{i=o.pendingProps;var f=o.elementType,p=f._init;if(f=p(f._payload),o.type=f,typeof f=="function")Xm(f)?(i=La(f,i),o.tag=1,o=fx(null,o,f,i,c)):(o.tag=0,o=Nm(null,o,f,i,c));else{if(f!=null){if(p=f.$$typeof,p===_){o.tag=11,o=ox(null,o,f,i,c);break e}else if(p===w){o.tag=14,o=sx(null,o,f,i,c);break e}}throw o=j(f)||f,Error(r(306,o,""))}}return o;case 0:return Nm(i,o,o.type,o.pendingProps,c);case 1:return f=o.type,p=La(f,o.pendingProps),fx(i,o,f,p,c);case 3:e:{if(kn(o,o.stateNode.containerInfo),i===null)throw Error(r(387));var x=o.pendingProps;p=o.memoizedState,f=p.element,$m(i,o),gl(o,x,null,c);var R=o.memoizedState;if(x=R.cache,ji(o,Bt,x),x!==p.cache&&Bm(o,[Bt],c,!0),pl(),x=R.element,p.isDehydrated)if(p={element:x,isDehydrated:!1,cache:R.cache},o.updateQueue.baseState=p,o.memoizedState=p,o.flags&256){o=hx(i,o,x,c);break e}else if(x!==f){f=Kn(Error(r(424)),o),nl(f),o=hx(i,o,x,c);break e}else for(tn=gr(o.stateNode.containerInfo.firstChild),vn=o,it=!0,mr=null,Rr=!0,c=u_(o,null,x,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(tl(),x===f){o=ni(i,o,c);break e}nn(i,o,x,c)}o=o.child}return o;case 26:return fl(i,o),i===null?(c=_E(o.type,null,o.pendingProps,null))?o.memoizedState=c:it||(c=o.type,i=o.pendingProps,f=ed(pt.current).createElement(c),f[cn]=o,f[Tn]=i,rn(f,c,i),Kt(f),o.stateNode=f):o.memoizedState=_E(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return ur(o),i===null&&it&&(f=o.stateNode=yE(o.type,o.pendingProps,pt.current),vn=o,Rr=!0,tn=gr(f.firstChild)),f=o.pendingProps.children,i!==null||it?nn(i,o,f,c):o.child=Na(o,null,f,c),fl(i,o),o.child;case 5:return i===null&&it&&((p=f=tn)&&(f=IL(f,o.type,o.pendingProps,Rr),f!==null?(o.stateNode=f,vn=o,tn=gr(f.firstChild),Rr=!1,p=!0):p=!1),p||Ca(o)),ur(o),p=o.type,x=o.pendingProps,R=i!==null?i.memoizedProps:null,f=x.children,Sp(p,x)?f=null:R!==null&&Sp(p,R)&&(o.flags|=32),o.memoizedState!==null&&(p=dm(i,o,YI,null,null,c),kl._currentValue=p),fl(i,o),nn(i,o,f,c),o.child;case 6:return i===null&&it&&((i=c=tn)&&(c=LL(c,o.pendingProps,Rr),c!==null?(o.stateNode=c,vn=o,tn=null,i=!0):i=!1),i||Ca(o)),null;case 13:return mx(i,o,c);case 4:return kn(o,o.stateNode.containerInfo),f=o.pendingProps,i===null?o.child=Na(o,null,f,c):nn(i,o,f,c),o.child;case 11:return ox(i,o,o.type,o.pendingProps,c);case 7:return nn(i,o,o.pendingProps,c),o.child;case 8:return nn(i,o,o.pendingProps.children,c),o.child;case 12:return nn(i,o,o.pendingProps.children,c),o.child;case 10:return f=o.pendingProps,ji(o,o.type,f.value),nn(i,o,f.children,c),o.child;case 9:return p=o.type._context,f=o.pendingProps.children,Ma(o),p=un(p),f=f(p),o.flags|=1,nn(i,o,f,c),o.child;case 14:return sx(i,o,o.type,o.pendingProps,c);case 15:return lx(i,o,o.type,o.pendingProps,c);case 19:return gx(i,o,c);case 22:return cx(i,o,c);case 24:return Ma(o),f=un(Bt),i===null?(p=cm(),p===null&&(p=ft,x=sm(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=c),p=x),o.memoizedState={parent:f,cache:p},Um(o),ji(o,Bt,p)):((i.lanes&c)!==0&&($m(i,o),gl(o,null,null,c),pl()),p=i.memoizedState,x=o.memoizedState,p.parent!==f?(p={parent:f,cache:f},o.memoizedState=p,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=p),ji(o,Bt,f)):(f=x.cache,ji(o,Bt,f),f!==p.cache&&Bm(o,[Bt],c,!0))),nn(i,o,o.pendingProps.children,c),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}var zm=Ee(null),ja=null,ri=null;function ji(i,o,c){Re(zm,o._currentValue),o._currentValue=c}function ii(i){i._currentValue=zm.current,ke(zm)}function Vm(i,o,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),i===c)break;i=i.return}}function Bm(i,o,c,f){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var x=p.dependencies;if(x!==null){var R=p.child;x=x.firstContext;e:for(;x!==null;){var O=x;x=p;for(var M=0;M<o.length;M++)if(O.context===o[M]){x.lanes|=c,O=x.alternate,O!==null&&(O.lanes|=c),Vm(x.return,c,i),f||(R=null);break e}x=O.next}}else if(p.tag===18){if(R=p.return,R===null)throw Error(r(341));R.lanes|=c,x=R.alternate,x!==null&&(x.lanes|=c),Vm(R,c,i),R=null}else R=p.child;if(R!==null)R.return=p;else for(R=p;R!==null;){if(R===i){R=null;break}if(p=R.sibling,p!==null){p.return=R.return,R=p;break}R=R.return}p=R}}function hl(i,o,c,f){i=null;for(var p=o,x=!1;p!==null;){if(!x){if((p.flags&524288)!==0)x=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var R=p.alternate;if(R===null)throw Error(r(387));if(R=R.memoizedProps,R!==null){var O=p.type;Dn(p.pendingProps.value,R.value)||(i!==null?i.push(O):i=[O])}}else if(p===Gt.current){if(R=p.alternate,R===null)throw Error(r(387));R.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(kl):i=[kl])}p=p.return}i!==null&&Bm(o,i,c,f),o.flags|=262144}function zu(i){for(i=i.firstContext;i!==null;){if(!Dn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ma(i){ja=i,ri=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function un(i){return vx(ja,i)}function Vu(i,o){return ja===null&&Ma(i),vx(i,o)}function vx(i,o){var c=o._currentValue;if(o={context:o,memoizedValue:c,next:null},ri===null){if(i===null)throw Error(r(308));ri=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else ri=ri.next=o;return c}var Mi=!1;function Um(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $m(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Pi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function zi(i,o,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(bt&2)!==0){var p=f.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),f.pending=o,o=bu(i),J0(i,null,c),o}return vu(i,f,o,c),bu(i)}function ml(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194176)!==0)){var f=o.lanes;f&=i.pendingLanes,c|=f,o.lanes=c,s0(i,c)}}function Hm(i,o){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var p=null,x=null;if(c=c.firstBaseUpdate,c!==null){do{var R={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};x===null?p=x=R:x=x.next=R,c=c.next}while(c!==null);x===null?p=x=o:x=x.next=o}else p=x=o;c={baseState:f.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:f.shared,callbacks:f.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}var Fm=!1;function pl(){if(Fm){var i=Io;if(i!==null)throw i}}function gl(i,o,c,f){Fm=!1;var p=i.updateQueue;Mi=!1;var x=p.firstBaseUpdate,R=p.lastBaseUpdate,O=p.shared.pending;if(O!==null){p.shared.pending=null;var M=O,G=M.next;M.next=null,R===null?x=G:R.next=G,R=M;var oe=i.alternate;oe!==null&&(oe=oe.updateQueue,O=oe.lastBaseUpdate,O!==R&&(O===null?oe.firstBaseUpdate=G:O.next=G,oe.lastBaseUpdate=M))}if(x!==null){var me=p.baseState;R=0,oe=G=M=null,O=x;do{var te=O.lane&-536870913,ae=te!==O.lane;if(ae?(nt&te)===te:(f&te)===te){te!==0&&te===Do&&(Fm=!0),oe!==null&&(oe=oe.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var De=i,He=O;te=o;var Rt=c;switch(He.tag){case 1:if(De=He.payload,typeof De=="function"){me=De.call(Rt,me,te);break e}me=De;break e;case 3:De.flags=De.flags&-65537|128;case 0:if(De=He.payload,te=typeof De=="function"?De.call(Rt,me,te):De,te==null)break e;me=U({},me,te);break e;case 2:Mi=!0}}te=O.callback,te!==null&&(i.flags|=64,ae&&(i.flags|=8192),ae=p.callbacks,ae===null?p.callbacks=[te]:ae.push(te))}else ae={lane:te,tag:O.tag,payload:O.payload,callback:O.callback,next:null},oe===null?(G=oe=ae,M=me):oe=oe.next=ae,R|=te;if(O=O.next,O===null){if(O=p.shared.pending,O===null)break;ae=O,O=ae.next,ae.next=null,p.lastBaseUpdate=ae,p.shared.pending=null}}while(!0);oe===null&&(M=me),p.baseState=M,p.firstBaseUpdate=G,p.lastBaseUpdate=oe,x===null&&(p.shared.lanes=0),Hi|=R,i.lanes=R,i.memoizedState=me}}function bx(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function _x(i,o){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)bx(c[i],o)}function yl(i,o){try{var c=o.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var p=f.next;c=p;do{if((c.tag&i)===i){f=void 0;var x=c.create,R=c.inst;f=x(),R.destroy=f}c=c.next}while(c!==p)}}catch(O){dt(o,o.return,O)}}function Vi(i,o,c){try{var f=o.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var x=p.next;f=x;do{if((f.tag&i)===i){var R=f.inst,O=R.destroy;if(O!==void 0){R.destroy=void 0,p=o;var M=c;try{O()}catch(G){dt(p,M,G)}}}f=f.next}while(f!==x)}}catch(G){dt(o,o.return,G)}}function xx(i){var o=i.updateQueue;if(o!==null){var c=i.stateNode;try{_x(o,c)}catch(f){dt(i,i.return,f)}}}function Ex(i,o,c){c.props=La(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(f){dt(i,o,f)}}function Pa(i,o){try{var c=i.ref;if(c!==null){var f=i.stateNode;switch(i.tag){case 26:case 27:case 5:var p=f;break;default:p=f}typeof c=="function"?i.refCleanup=c(p):c.current=p}}catch(x){dt(i,o,x)}}function In(i,o){var c=i.ref,f=i.refCleanup;if(c!==null)if(typeof f=="function")try{f()}catch(p){dt(i,o,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(p){dt(i,o,p)}else c.current=null}function Sx(i){var o=i.type,c=i.memoizedProps,f=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":c.autoFocus&&f.focus();break e;case"img":c.src?f.src=c.src:c.srcSet&&(f.srcset=c.srcSet)}}catch(p){dt(i,i.return,p)}}function Ax(i,o,c){try{var f=i.stateNode;CL(f,i.type,c,o),f[Tn]=o}catch(p){dt(i,i.return,p)}}function wx(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27||i.tag===4}function Gm(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||wx(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==27&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Km(i,o,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(i,o):c.insertBefore(i,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(i,c)):(o=c,o.appendChild(i)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=Ju));else if(f!==4&&f!==27&&(i=i.child,i!==null))for(Km(i,o,c),i=i.sibling;i!==null;)Km(i,o,c),i=i.sibling}function Bu(i,o,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(f!==4&&f!==27&&(i=i.child,i!==null))for(Bu(i,o,c),i=i.sibling;i!==null;)Bu(i,o,c),i=i.sibling}var ai=!1,wt=!1,Zm=!1,Tx=typeof WeakSet=="function"?WeakSet:Set,qt=null,Rx=!1;function iL(i,o){if(i=i.containerInfo,xp=od,i=F0(i),Wh(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var p=f.anchorOffset,x=f.focusNode;f=f.focusOffset;try{c.nodeType,x.nodeType}catch{c=null;break e}var R=0,O=-1,M=-1,G=0,oe=0,me=i,te=null;t:for(;;){for(var ae;me!==c||p!==0&&me.nodeType!==3||(O=R+p),me!==x||f!==0&&me.nodeType!==3||(M=R+f),me.nodeType===3&&(R+=me.nodeValue.length),(ae=me.firstChild)!==null;)te=me,me=ae;for(;;){if(me===i)break t;if(te===c&&++G===p&&(O=R),te===x&&++oe===f&&(M=R),(ae=me.nextSibling)!==null)break;me=te,te=me.parentNode}me=ae}c=O===-1||M===-1?null:{start:O,end:M}}else c=null}c=c||{start:0,end:0}}else c=null;for(Ep={focusedElem:i,selectionRange:c},od=!1,qt=o;qt!==null;)if(o=qt,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,qt=i;else for(;qt!==null;){switch(o=qt,x=o.alternate,i=o.flags,o.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&x!==null){i=void 0,c=o,p=x.memoizedProps,x=x.memoizedState,f=c.stateNode;try{var De=La(c.type,p,c.elementType===c.type);i=f.getSnapshotBeforeUpdate(De,x),f.__reactInternalSnapshotBeforeUpdate=i}catch(He){dt(c,c.return,He)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,c=i.nodeType,c===9)Tp(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Tp(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,qt=i;break}qt=o.return}return De=Rx,Rx=!1,De}function Cx(i,o,c){var f=c.flags;switch(c.tag){case 0:case 11:case 15:si(i,c),f&4&&yl(5,c);break;case 1:if(si(i,c),f&4)if(i=c.stateNode,o===null)try{i.componentDidMount()}catch(O){dt(c,c.return,O)}else{var p=La(c.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(p,o,i.__reactInternalSnapshotBeforeUpdate)}catch(O){dt(c,c.return,O)}}f&64&&xx(c),f&512&&Pa(c,c.return);break;case 3:if(si(i,c),f&64&&(f=c.updateQueue,f!==null)){if(i=null,c.child!==null)switch(c.child.tag){case 27:case 5:i=c.child.stateNode;break;case 1:i=c.child.stateNode}try{_x(f,i)}catch(O){dt(c,c.return,O)}}break;case 26:si(i,c),f&512&&Pa(c,c.return);break;case 27:case 5:si(i,c),o===null&&f&4&&Sx(c),f&512&&Pa(c,c.return);break;case 12:si(i,c);break;case 13:si(i,c),f&4&&kx(i,c);break;case 22:if(p=c.memoizedState!==null||ai,!p){o=o!==null&&o.memoizedState!==null||wt;var x=ai,R=wt;ai=p,(wt=o)&&!R?Bi(i,c,(c.subtreeFlags&8772)!==0):si(i,c),ai=x,wt=R}f&512&&(c.memoizedProps.mode==="manual"?Pa(c,c.return):In(c,c.return));break;default:si(i,c)}}function Nx(i){var o=i.alternate;o!==null&&(i.alternate=null,Nx(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Ih(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Mt=null,Ln=!1;function oi(i,o,c){for(c=c.child;c!==null;)Ox(i,o,c),c=c.sibling}function Ox(i,o,c){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(Wr,c)}catch{}switch(c.tag){case 26:wt||In(c,o),oi(i,o,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:wt||In(c,o);var f=Mt,p=Ln;for(Mt=c.stateNode,oi(i,o,c),c=c.stateNode,o=c.attributes;o.length;)c.removeAttributeNode(o[0]);Ih(c),Mt=f,Ln=p;break;case 5:wt||In(c,o);case 6:p=Mt;var x=Ln;if(Mt=null,oi(i,o,c),Mt=p,Ln=x,Mt!==null)if(Ln)try{i=Mt,f=c.stateNode,i.nodeType===8?i.parentNode.removeChild(f):i.removeChild(f)}catch(R){dt(c,o,R)}else try{Mt.removeChild(c.stateNode)}catch(R){dt(c,o,R)}break;case 18:Mt!==null&&(Ln?(o=Mt,c=c.stateNode,o.nodeType===8?wp(o.parentNode,c):o.nodeType===1&&wp(o,c),jl(o)):wp(Mt,c.stateNode));break;case 4:f=Mt,p=Ln,Mt=c.stateNode.containerInfo,Ln=!0,oi(i,o,c),Mt=f,Ln=p;break;case 0:case 11:case 14:case 15:wt||Vi(2,c,o),wt||Vi(4,c,o),oi(i,o,c);break;case 1:wt||(In(c,o),f=c.stateNode,typeof f.componentWillUnmount=="function"&&Ex(c,o,f)),oi(i,o,c);break;case 21:oi(i,o,c);break;case 22:wt||In(c,o),wt=(f=wt)||c.memoizedState!==null,oi(i,o,c),wt=f;break;default:oi(i,o,c)}}function kx(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{jl(i)}catch(c){dt(o,o.return,c)}}function aL(i){switch(i.tag){case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new Tx),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new Tx),o;default:throw Error(r(435,i.tag))}}function qm(i,o){var c=aL(i);o.forEach(function(f){var p=vL.bind(null,i,f);c.has(f)||(c.add(f),f.then(p,p))})}function Yn(i,o){var c=o.deletions;if(c!==null)for(var f=0;f<c.length;f++){var p=c[f],x=i,R=o,O=R;e:for(;O!==null;){switch(O.tag){case 27:case 5:Mt=O.stateNode,Ln=!1;break e;case 3:Mt=O.stateNode.containerInfo,Ln=!0;break e;case 4:Mt=O.stateNode.containerInfo,Ln=!0;break e}O=O.return}if(Mt===null)throw Error(r(160));Ox(x,R,p),Mt=null,Ln=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(o.subtreeFlags&13878)for(o=o.child;o!==null;)Dx(o,i),o=o.sibling}var pr=null;function Dx(i,o){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Yn(o,i),Xn(i),f&4&&(Vi(3,i,i.return),yl(3,i),Vi(5,i,i.return));break;case 1:Yn(o,i),Xn(i),f&512&&(wt||c===null||In(c,c.return)),f&64&&ai&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?f:c.concat(f))));break;case 26:var p=pr;if(Yn(o,i),Xn(i),f&512&&(wt||c===null||In(c,c.return)),f&4){var x=c!==null?c.memoizedState:null;if(f=i.memoizedState,c===null)if(f===null)if(i.stateNode===null){e:{f=i.type,c=i.memoizedProps,p=p.ownerDocument||p;t:switch(f){case"title":x=p.getElementsByTagName("title")[0],(!x||x[Hs]||x[cn]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(f),p.head.insertBefore(x,p.querySelector("head > title"))),rn(x,f,c),x[cn]=i,Kt(x),f=x;break e;case"link":var R=SE("link","href",p).get(f+(c.href||""));if(R){for(var O=0;O<R.length;O++)if(x=R[O],x.getAttribute("href")===(c.href==null?null:c.href)&&x.getAttribute("rel")===(c.rel==null?null:c.rel)&&x.getAttribute("title")===(c.title==null?null:c.title)&&x.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){R.splice(O,1);break t}}x=p.createElement(f),rn(x,f,c),p.head.appendChild(x);break;case"meta":if(R=SE("meta","content",p).get(f+(c.content||""))){for(O=0;O<R.length;O++)if(x=R[O],x.getAttribute("content")===(c.content==null?null:""+c.content)&&x.getAttribute("name")===(c.name==null?null:c.name)&&x.getAttribute("property")===(c.property==null?null:c.property)&&x.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&x.getAttribute("charset")===(c.charSet==null?null:c.charSet)){R.splice(O,1);break t}}x=p.createElement(f),rn(x,f,c),p.head.appendChild(x);break;default:throw Error(r(468,f))}x[cn]=i,Kt(x),f=x}i.stateNode=f}else AE(p,i.type,i.stateNode);else i.stateNode=EE(p,f,i.memoizedProps);else x!==f?(x===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):x.count--,f===null?AE(p,i.type,i.stateNode):EE(p,f,i.memoizedProps)):f===null&&i.stateNode!==null&&Ax(i,i.memoizedProps,c.memoizedProps)}break;case 27:if(f&4&&i.alternate===null){p=i.stateNode,x=i.memoizedProps;try{for(var M=p.firstChild;M;){var G=M.nextSibling,oe=M.nodeName;M[Hs]||oe==="HEAD"||oe==="BODY"||oe==="SCRIPT"||oe==="STYLE"||oe==="LINK"&&M.rel.toLowerCase()==="stylesheet"||p.removeChild(M),M=G}for(var me=i.type,te=p.attributes;te.length;)p.removeAttributeNode(te[0]);rn(p,me,x),p[cn]=i,p[Tn]=x}catch(De){dt(i,i.return,De)}}case 5:if(Yn(o,i),Xn(i),f&512&&(wt||c===null||In(c,c.return)),i.flags&32){p=i.stateNode;try{_o(p,"")}catch(De){dt(i,i.return,De)}}f&4&&i.stateNode!=null&&(p=i.memoizedProps,Ax(i,p,c!==null?c.memoizedProps:p)),f&1024&&(Zm=!0);break;case 6:if(Yn(o,i),Xn(i),f&4){if(i.stateNode===null)throw Error(r(162));f=i.memoizedProps,c=i.stateNode;try{c.nodeValue=f}catch(De){dt(i,i.return,De)}}break;case 3:if(rd=null,p=pr,pr=td(o.containerInfo),Yn(o,i),pr=p,Xn(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{jl(o.containerInfo)}catch(De){dt(i,i.return,De)}Zm&&(Zm=!1,Ix(i));break;case 4:f=pr,pr=td(i.stateNode.containerInfo),Yn(o,i),Xn(i),pr=f;break;case 12:Yn(o,i),Xn(i);break;case 13:Yn(o,i),Xn(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(rp=be()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,qm(i,f)));break;case 22:if(f&512&&(wt||c===null||In(c,c.return)),M=i.memoizedState!==null,G=c!==null&&c.memoizedState!==null,oe=ai,me=wt,ai=oe||M,wt=me||G,Yn(o,i),wt=me,ai=oe,Xn(i),o=i.stateNode,o._current=i,o._visibility&=-3,o._visibility|=o._pendingVisibility&2,f&8192&&(o._visibility=M?o._visibility&-2:o._visibility|1,M&&(o=ai||wt,c===null||G||o||Po(i)),i.memoizedProps===null||i.memoizedProps.mode!=="manual"))e:for(c=null,o=i;;){if(o.tag===5||o.tag===26||o.tag===27){if(c===null){G=c=o;try{if(p=G.stateNode,M)x=p.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{R=G.stateNode,O=G.memoizedProps.style;var ae=O!=null&&O.hasOwnProperty("display")?O.display:null;R.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(De){dt(G,G.return,De)}}}else if(o.tag===6){if(c===null){G=o;try{G.stateNode.nodeValue=M?"":G.memoizedProps}catch(De){dt(G,G.return,De)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;c===o&&(c=null),o=o.return}c===o&&(c=null),o.sibling.return=o.return,o=o.sibling}f&4&&(f=i.updateQueue,f!==null&&(c=f.retryQueue,c!==null&&(f.retryQueue=null,qm(i,c))));break;case 19:Yn(o,i),Xn(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,qm(i,f)));break;case 21:break;default:Yn(o,i),Xn(i)}}function Xn(i){var o=i.flags;if(o&2){try{if(i.tag!==27){e:{for(var c=i.return;c!==null;){if(wx(c)){var f=c;break e}c=c.return}throw Error(r(160))}switch(f.tag){case 27:var p=f.stateNode,x=Gm(i);Bu(i,x,p);break;case 5:var R=f.stateNode;f.flags&32&&(_o(R,""),f.flags&=-33);var O=Gm(i);Bu(i,O,R);break;case 3:case 4:var M=f.stateNode.containerInfo,G=Gm(i);Km(i,G,M);break;default:throw Error(r(161))}}}catch(oe){dt(i,i.return,oe)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function Ix(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;Ix(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function si(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)Cx(i,o.alternate,o),o=o.sibling}function Po(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Vi(4,o,o.return),Po(o);break;case 1:In(o,o.return);var c=o.stateNode;typeof c.componentWillUnmount=="function"&&Ex(o,o.return,c),Po(o);break;case 26:case 27:case 5:In(o,o.return),Po(o);break;case 22:In(o,o.return),o.memoizedState===null&&Po(o);break;default:Po(o)}i=i.sibling}}function Bi(i,o,c){for(c=c&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var f=o.alternate,p=i,x=o,R=x.flags;switch(x.tag){case 0:case 11:case 15:Bi(p,x,c),yl(4,x);break;case 1:if(Bi(p,x,c),f=x,p=f.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(G){dt(f,f.return,G)}if(f=x,p=f.updateQueue,p!==null){var O=f.stateNode;try{var M=p.shared.hiddenCallbacks;if(M!==null)for(p.shared.hiddenCallbacks=null,p=0;p<M.length;p++)bx(M[p],O)}catch(G){dt(f,f.return,G)}}c&&R&64&&xx(x),Pa(x,x.return);break;case 26:case 27:case 5:Bi(p,x,c),c&&f===null&&R&4&&Sx(x),Pa(x,x.return);break;case 12:Bi(p,x,c);break;case 13:Bi(p,x,c),c&&R&4&&kx(p,x);break;case 22:x.memoizedState===null&&Bi(p,x,c),Pa(x,x.return);break;default:Bi(p,x,c)}o=o.sibling}}function Wm(i,o){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&sl(c))}function Ym(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&sl(i))}function Ui(i,o,c,f){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Lx(i,o,c,f),o=o.sibling}function Lx(i,o,c,f){var p=o.flags;switch(o.tag){case 0:case 11:case 15:Ui(i,o,c,f),p&2048&&yl(9,o);break;case 3:Ui(i,o,c,f),p&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&sl(i)));break;case 12:if(p&2048){Ui(i,o,c,f),i=o.stateNode;try{var x=o.memoizedProps,R=x.id,O=x.onPostCommit;typeof O=="function"&&O(R,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(M){dt(o,o.return,M)}}else Ui(i,o,c,f);break;case 23:break;case 22:x=o.stateNode,o.memoizedState!==null?x._visibility&4?Ui(i,o,c,f):vl(i,o):x._visibility&4?Ui(i,o,c,f):(x._visibility|=4,zo(i,o,c,f,(o.subtreeFlags&10256)!==0)),p&2048&&Wm(o.alternate,o);break;case 24:Ui(i,o,c,f),p&2048&&Ym(o.alternate,o);break;default:Ui(i,o,c,f)}}function zo(i,o,c,f,p){for(p=p&&(o.subtreeFlags&10256)!==0,o=o.child;o!==null;){var x=i,R=o,O=c,M=f,G=R.flags;switch(R.tag){case 0:case 11:case 15:zo(x,R,O,M,p),yl(8,R);break;case 23:break;case 22:var oe=R.stateNode;R.memoizedState!==null?oe._visibility&4?zo(x,R,O,M,p):vl(x,R):(oe._visibility|=4,zo(x,R,O,M,p)),p&&G&2048&&Wm(R.alternate,R);break;case 24:zo(x,R,O,M,p),p&&G&2048&&Ym(R.alternate,R);break;default:zo(x,R,O,M,p)}o=o.sibling}}function vl(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var c=i,f=o,p=f.flags;switch(f.tag){case 22:vl(c,f),p&2048&&Wm(f.alternate,f);break;case 24:vl(c,f),p&2048&&Ym(f.alternate,f);break;default:vl(c,f)}o=o.sibling}}var bl=8192;function Vo(i){if(i.subtreeFlags&bl)for(i=i.child;i!==null;)jx(i),i=i.sibling}function jx(i){switch(i.tag){case 26:Vo(i),i.flags&bl&&i.memoizedState!==null&&ZL(pr,i.memoizedState,i.memoizedProps);break;case 5:Vo(i);break;case 3:case 4:var o=pr;pr=td(i.stateNode.containerInfo),Vo(i),pr=o;break;case 22:i.memoizedState===null&&(o=i.alternate,o!==null&&o.memoizedState!==null?(o=bl,bl=16777216,Vo(i),bl=o):Vo(i));break;default:Vo(i)}}function Mx(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function _l(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var f=o[c];qt=f,zx(f,i)}Mx(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Px(i),i=i.sibling}function Px(i){switch(i.tag){case 0:case 11:case 15:_l(i),i.flags&2048&&Vi(9,i,i.return);break;case 3:_l(i);break;case 12:_l(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&4&&(i.return===null||i.return.tag!==13)?(o._visibility&=-5,Uu(i)):_l(i);break;default:_l(i)}}function Uu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var f=o[c];qt=f,zx(f,i)}Mx(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Vi(8,o,o.return),Uu(o);break;case 22:c=o.stateNode,c._visibility&4&&(c._visibility&=-5,Uu(o));break;default:Uu(o)}i=i.sibling}}function zx(i,o){for(;qt!==null;){var c=qt;switch(c.tag){case 0:case 11:case 15:Vi(8,c,o);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var f=c.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:sl(c.memoizedState.cache)}if(f=c.child,f!==null)f.return=c,qt=f;else e:for(c=i;qt!==null;){f=qt;var p=f.sibling,x=f.return;if(Nx(f),f===c){qt=null;break e}if(p!==null){p.return=x,qt=p;break e}qt=x}}}function oL(i,o,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qn(i,o,c,f){return new oL(i,o,c,f)}function Xm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function $i(i,o){var c=i.alternate;return c===null?(c=Qn(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&31457280,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function Vx(i,o){i.flags&=31457282;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,o=c.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function $u(i,o,c,f,p,x){var R=0;if(f=i,typeof i=="function")Xm(i)&&(R=1);else if(typeof i=="string")R=GL(i,c,Ue.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case d:return za(c.children,p,x,o);case h:R=8,p|=24;break;case m:return i=Qn(12,c,o,p|2),i.elementType=m,i.lanes=x,i;case S:return i=Qn(13,c,o,p),i.elementType=S,i.lanes=x,i;case A:return i=Qn(19,c,o,p),i.elementType=A,i.lanes=x,i;case C:return Bx(c,p,x,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case y:case v:R=10;break e;case g:R=9;break e;case _:R=11;break e;case w:R=14;break e;case T:R=16,f=null;break e}R=29,c=Error(r(130,i===null?"null":typeof i,"")),f=null}return o=Qn(R,c,o,p),o.elementType=i,o.type=f,o.lanes=x,o}function za(i,o,c,f){return i=Qn(7,i,f,o),i.lanes=c,i}function Bx(i,o,c,f){i=Qn(22,i,f,o),i.elementType=C,i.lanes=c;var p={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var x=p._current;if(x===null)throw Error(r(456));if((p._pendingVisibility&2)===0){var R=Oi(x,2);R!==null&&(p._pendingVisibility|=2,bn(R,x,2))}},attach:function(){var x=p._current;if(x===null)throw Error(r(456));if((p._pendingVisibility&2)!==0){var R=Oi(x,2);R!==null&&(p._pendingVisibility&=-3,bn(R,x,2))}}};return i.stateNode=p,i}function Qm(i,o,c){return i=Qn(6,i,null,o),i.lanes=c,i}function Jm(i,o,c){return o=Qn(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function li(i){i.flags|=4}function Ux(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!wE(o)){if(o=Wn.current,o!==null&&((nt&4194176)===nt?Cr!==null:(nt&62914560)!==nt&&(nt&536870912)===0||o!==Cr))throw il=im,i_;i.flags|=8192}}function Hu(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?a0():536870912,i.lanes|=o,Uo|=o)}function xl(i,o){if(!it)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function vt(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(o)for(var p=i.child;p!==null;)c|=p.lanes|p.childLanes,f|=p.subtreeFlags&31457280,f|=p.flags&31457280,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)c|=p.lanes|p.childLanes,f|=p.subtreeFlags,f|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=f,i.childLanes=c,o}function sL(i,o,c){var f=o.pendingProps;switch(nm(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(o),null;case 1:return vt(o),null;case 3:return c=o.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),o.memoizedState.cache!==f&&(o.flags|=2048),ii(Bt),An(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(el(o)?li(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,mr!==null&&(sp(mr),mr=null))),vt(o),null;case 26:return c=o.memoizedState,i===null?(li(o),c!==null?(vt(o),Ux(o,c)):(vt(o),o.flags&=-16777217)):c?c!==i.memoizedState?(li(o),vt(o),Ux(o,c)):(vt(o),o.flags&=-16777217):(i.memoizedProps!==f&&li(o),vt(o),o.flags&=-16777217),null;case 27:va(o),c=pt.current;var p=o.type;if(i!==null&&o.stateNode!=null)i.memoizedProps!==f&&li(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return vt(o),null}i=Ue.current,el(o)?n_(o):(i=yE(p,f,c),o.stateNode=i,li(o))}return vt(o),null;case 5:if(va(o),c=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==f&&li(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return vt(o),null}if(i=Ue.current,el(o))n_(o);else{switch(p=ed(pt.current),i){case 1:i=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:i=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":i=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":i=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":i=p.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof f.is=="string"?p.createElement("select",{is:f.is}):p.createElement("select"),f.multiple?i.multiple=!0:f.size&&(i.size=f.size);break;default:i=typeof f.is=="string"?p.createElement(c,{is:f.is}):p.createElement(c)}}i[cn]=o,i[Tn]=f;e:for(p=o.child;p!==null;){if(p.tag===5||p.tag===6)i.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===o)break e;for(;p.sibling===null;){if(p.return===null||p.return===o)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}o.stateNode=i;e:switch(rn(i,c,f),c){case"button":case"input":case"select":case"textarea":i=!!f.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&li(o)}}return vt(o),o.flags&=-16777217,null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==f&&li(o);else{if(typeof f!="string"&&o.stateNode===null)throw Error(r(166));if(i=pt.current,el(o)){if(i=o.stateNode,c=o.memoizedProps,f=null,p=vn,p!==null)switch(p.tag){case 27:case 5:f=p.memoizedProps}i[cn]=o,i=!!(i.nodeValue===c||f!==null&&f.suppressHydrationWarning===!0||dE(i.nodeValue,c)),i||Ca(o)}else i=ed(i).createTextNode(f),i[cn]=o,o.stateNode=i}return vt(o),null;case 13:if(f=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=el(o),f!==null&&f.dehydrated!==null){if(i===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[cn]=o}else tl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;vt(o),p=!1}else mr!==null&&(sp(mr),mr=null),p=!0;if(!p)return o.flags&256?(ei(o),o):(ei(o),null)}if(ei(o),(o.flags&128)!==0)return o.lanes=c,o;if(c=f!==null,i=i!==null&&i.memoizedState!==null,c){f=o.child,p=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(p=f.alternate.memoizedState.cachePool.pool);var x=null;f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(x=f.memoizedState.cachePool.pool),x!==p&&(f.flags|=2048)}return c!==i&&c&&(o.child.flags|=8192),Hu(o,o.updateQueue),vt(o),null;case 4:return An(),i===null&&vp(o.stateNode.containerInfo),vt(o),null;case 10:return ii(o.type),vt(o),null;case 19:if(ke(Vt),p=o.memoizedState,p===null)return vt(o),null;if(f=(o.flags&128)!==0,x=p.rendering,x===null)if(f)xl(p,!1);else{if(Tt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Tu(i),x!==null){for(o.flags|=128,xl(p,!1),i=x.updateQueue,o.updateQueue=i,Hu(o,i),o.subtreeFlags=0,i=c,c=o.child;c!==null;)Vx(c,i),c=c.sibling;return Re(Vt,Vt.current&1|2),o.child}i=i.sibling}p.tail!==null&&be()>Fu&&(o.flags|=128,f=!0,xl(p,!1),o.lanes=4194304)}else{if(!f)if(i=Tu(x),i!==null){if(o.flags|=128,f=!0,i=i.updateQueue,o.updateQueue=i,Hu(o,i),xl(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!it)return vt(o),null}else 2*be()-p.renderingStartTime>Fu&&c!==536870912&&(o.flags|=128,f=!0,xl(p,!1),o.lanes=4194304);p.isBackwards?(x.sibling=o.child,o.child=x):(i=p.last,i!==null?i.sibling=x:o.child=x,p.last=x)}return p.tail!==null?(o=p.tail,p.rendering=o,p.tail=o.sibling,p.renderingStartTime=be(),o.sibling=null,i=Vt.current,Re(Vt,f?i&1|2:i&1),o):(vt(o),null);case 22:case 23:return ei(o),om(),f=o.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(o.flags|=8192):f&&(o.flags|=8192),f?(c&536870912)!==0&&(o.flags&128)===0&&(vt(o),o.subtreeFlags&6&&(o.flags|=8192)):vt(o),c=o.updateQueue,c!==null&&Hu(o,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==c&&(o.flags|=2048),i!==null&&ke(Oa),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),ii(Bt),vt(o),null;case 25:return null}throw Error(r(156,o.tag))}function lL(i,o){switch(nm(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return ii(Bt),An(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return va(o),null;case 13:if(ei(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));tl()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return ke(Vt),null;case 4:return An(),null;case 10:return ii(o.type),null;case 22:case 23:return ei(o),om(),i!==null&&ke(Oa),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return ii(Bt),null;case 25:return null;default:return null}}function $x(i,o){switch(nm(o),o.tag){case 3:ii(Bt),An();break;case 26:case 27:case 5:va(o);break;case 4:An();break;case 13:ei(o);break;case 19:ke(Vt);break;case 10:ii(o.type);break;case 22:case 23:ei(o),om(),i!==null&&ke(Oa);break;case 24:ii(Bt)}}var cL={getCacheForType:function(i){var o=un(Bt),c=o.data.get(i);return c===void 0&&(c=i(),o.data.set(i,c)),c}},uL=typeof WeakMap=="function"?WeakMap:Map,bt=0,ft=null,Je=null,nt=0,ht=0,jn=null,ci=!1,Bo=!1,ep=!1,ui=0,Tt=0,Hi=0,Va=0,tp=0,Jn=0,Uo=0,El=null,Or=null,np=!1,rp=0,Fu=1/0,Gu=null,Fi=null,Ku=!1,Ba=null,Sl=0,ip=0,ap=null,Al=0,op=null;function Mn(){if((bt&2)!==0&&nt!==0)return nt&-nt;if(V.T!==null){var i=Do;return i!==0?i:mp()}return c0()}function Hx(){Jn===0&&(Jn=(nt&536870912)===0||it?i0():536870912);var i=Wn.current;return i!==null&&(i.flags|=32),Jn}function bn(i,o,c){(i===ft&&ht===2||i.cancelPendingCommit!==null)&&($o(i,0),di(i,nt,Jn,!1)),$s(i,c),((bt&2)===0||i!==ft)&&(i===ft&&((bt&2)===0&&(Va|=c),Tt===4&&di(i,nt,Jn,!1)),kr(i))}function Fx(i,o,c){if((bt&6)!==0)throw Error(r(327));var f=!c&&(o&60)===0&&(o&i.expiredLanes)===0||Us(i,o),p=f?hL(i,o):up(i,o,!0),x=f;do{if(p===0){Bo&&!f&&di(i,o,0,!1);break}else if(p===6)di(i,o,0,!ci);else{if(c=i.current.alternate,x&&!dL(c)){p=up(i,o,!1),x=!1;continue}if(p===2){if(x=o,i.errorRecoveryDisabledLanes&x)var R=0;else R=i.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){o=R;e:{var O=i;p=El;var M=O.current.memoizedState.isDehydrated;if(M&&($o(O,R).flags|=256),R=up(O,R,!1),R!==2){if(ep&&!M){O.errorRecoveryDisabledLanes|=x,Va|=x,p=4;break e}x=Or,Or=p,x!==null&&sp(x)}p=R}if(x=!1,p!==2)continue}}if(p===1){$o(i,0),di(i,o,0,!0);break}e:{switch(f=i,p){case 0:case 1:throw Error(r(345));case 4:if((o&4194176)===o){di(f,o,Jn,!ci);break e}break;case 2:Or=null;break;case 3:case 5:break;default:throw Error(r(329))}if(f.finishedWork=c,f.finishedLanes=o,(o&62914560)===o&&(x=rp+300-be(),10<x)){if(di(f,o,Jn,!ci),au(f,0)!==0)break e;f.timeoutHandle=mE(Gx.bind(null,f,c,Or,Gu,np,o,Jn,Va,Uo,ci,2,-0,0),x);break e}Gx(f,c,Or,Gu,np,o,Jn,Va,Uo,ci,0,-0,0)}}break}while(!0);kr(i)}function sp(i){Or===null?Or=i:Or.push.apply(Or,i)}function Gx(i,o,c,f,p,x,R,O,M,G,oe,me,te){var ae=o.subtreeFlags;if((ae&8192||(ae&16785408)===16785408)&&(Ol={stylesheets:null,count:0,unsuspend:KL},jx(o),o=qL(),o!==null)){i.cancelPendingCommit=o(Qx.bind(null,i,c,f,p,R,O,M,1,me,te)),di(i,x,R,!G);return}Qx(i,c,f,p,R,O,M,oe,me,te)}function dL(i){for(var o=i;;){var c=o.tag;if((c===0||c===11||c===15)&&o.flags&16384&&(c=o.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var f=0;f<c.length;f++){var p=c[f],x=p.getSnapshot;p=p.value;try{if(!Dn(x(),p))return!1}catch{return!1}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function di(i,o,c,f){o&=~tp,o&=~Va,i.suspendedLanes|=o,i.pingedLanes&=~o,f&&(i.warmLanes|=o),f=i.expirationTimes;for(var p=o;0<p;){var x=31-yn(p),R=1<<x;f[x]=-1,p&=~R}c!==0&&o0(i,c,o)}function Zu(){return(bt&6)===0?(wl(0),!1):!0}function lp(){if(Je!==null){if(ht===0)var i=Je.return;else i=Je,ri=ja=null,mm(i),Oo=null,al=0,i=Je;for(;i!==null;)$x(i.alternate,i),i=i.return;Je=null}}function $o(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,OL(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),lp(),ft=i,Je=c=$i(i.current,null),nt=o,ht=0,jn=null,ci=!1,Bo=Us(i,o),ep=!1,Uo=Jn=tp=Va=Hi=Tt=0,Or=El=null,np=!1,(o&8)!==0&&(o|=o&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=o;0<f;){var p=31-yn(f),x=1<<p;o|=i[p],f&=~x}return ui=o,yu(),c}function Kx(i,o){Ye=null,V.H=Nr,o===rl?(o=s_(),ht=3):o===i_?(o=s_(),ht=4):ht=o===ax?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,jn=o,Je===null&&(Tt=1,Pu(i,Kn(o,i.current)))}function Zx(){var i=V.H;return V.H=Nr,i===null?Nr:i}function qx(){var i=V.A;return V.A=cL,i}function cp(){Tt=4,ci||(nt&4194176)!==nt&&Wn.current!==null||(Bo=!0),(Hi&134217727)===0&&(Va&134217727)===0||ft===null||di(ft,nt,Jn,!1)}function up(i,o,c){var f=bt;bt|=2;var p=Zx(),x=qx();(ft!==i||nt!==o)&&(Gu=null,$o(i,o)),o=!1;var R=Tt;e:do try{if(ht!==0&&Je!==null){var O=Je,M=jn;switch(ht){case 8:lp(),R=6;break e;case 3:case 2:case 6:Wn.current===null&&(o=!0);var G=ht;if(ht=0,jn=null,Ho(i,O,M,G),c&&Bo){R=0;break e}break;default:G=ht,ht=0,jn=null,Ho(i,O,M,G)}}fL(),R=Tt;break}catch(oe){Kx(i,oe)}while(!0);return o&&i.shellSuspendCounter++,ri=ja=null,bt=f,V.H=p,V.A=x,Je===null&&(ft=null,nt=0,yu()),R}function fL(){for(;Je!==null;)Wx(Je)}function hL(i,o){var c=bt;bt|=2;var f=Zx(),p=qx();ft!==i||nt!==o?(Gu=null,Fu=be()+500,$o(i,o)):Bo=Us(i,o);e:do try{if(ht!==0&&Je!==null){o=Je;var x=jn;t:switch(ht){case 1:ht=0,jn=null,Ho(i,o,x,1);break;case 2:if(a_(x)){ht=0,jn=null,Yx(o);break}o=function(){ht===2&&ft===i&&(ht=7),kr(i)},x.then(o,o);break e;case 3:ht=7;break e;case 4:ht=5;break e;case 7:a_(x)?(ht=0,jn=null,Yx(o)):(ht=0,jn=null,Ho(i,o,x,7));break;case 5:var R=null;switch(Je.tag){case 26:R=Je.memoizedState;case 5:case 27:var O=Je;if(!R||wE(R)){ht=0,jn=null;var M=O.sibling;if(M!==null)Je=M;else{var G=O.return;G!==null?(Je=G,qu(G)):Je=null}break t}}ht=0,jn=null,Ho(i,o,x,5);break;case 6:ht=0,jn=null,Ho(i,o,x,6);break;case 8:lp(),Tt=6;break e;default:throw Error(r(462))}}mL();break}catch(oe){Kx(i,oe)}while(!0);return ri=ja=null,V.H=f,V.A=p,bt=c,Je!==null?0:(ft=null,nt=0,yu(),Tt)}function mL(){for(;Je!==null&&!se();)Wx(Je)}function Wx(i){var o=yx(i.alternate,i,ui);i.memoizedProps=i.pendingProps,o===null?qu(i):Je=o}function Yx(i){var o=i,c=o.alternate;switch(o.tag){case 15:case 0:o=dx(c,o,o.pendingProps,o.type,void 0,nt);break;case 11:o=dx(c,o,o.pendingProps,o.type.render,o.ref,nt);break;case 5:mm(o);default:$x(c,o),o=Je=Vx(o,ui),o=yx(c,o,ui)}i.memoizedProps=i.pendingProps,o===null?qu(i):Je=o}function Ho(i,o,c,f){ri=ja=null,mm(o),Oo=null,al=0;var p=o.return;try{if(nL(i,p,o,c,nt)){Tt=1,Pu(i,Kn(c,i.current)),Je=null;return}}catch(x){if(p!==null)throw Je=p,x;Tt=1,Pu(i,Kn(c,i.current)),Je=null;return}o.flags&32768?(it||f===1?i=!0:Bo||(nt&536870912)!==0?i=!1:(ci=i=!0,(f===2||f===3||f===6)&&(f=Wn.current,f!==null&&f.tag===13&&(f.flags|=16384))),Xx(o,i)):qu(o)}function qu(i){var o=i;do{if((o.flags&32768)!==0){Xx(o,ci);return}i=o.return;var c=sL(o.alternate,o,ui);if(c!==null){Je=c;return}if(o=o.sibling,o!==null){Je=o;return}Je=o=i}while(o!==null);Tt===0&&(Tt=5)}function Xx(i,o){do{var c=lL(i.alternate,i);if(c!==null){c.flags&=32767,Je=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!o&&(i=i.sibling,i!==null)){Je=i;return}Je=i=c}while(i!==null);Tt=6,Je=null}function Qx(i,o,c,f,p,x,R,O,M,G){var oe=V.T,me=re.p;try{re.p=2,V.T=null,pL(i,o,c,f,me,p,x,R,O,M,G)}finally{V.T=oe,re.p=me}}function pL(i,o,c,f,p,x,R,O){do Fo();while(Ba!==null);if((bt&6)!==0)throw Error(r(327));var M=i.finishedWork;if(f=i.finishedLanes,M===null)return null;if(i.finishedWork=null,i.finishedLanes=0,M===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0,i.cancelPendingCommit=null;var G=M.lanes|M.childLanes;if(G|=Jh,ZD(i,f,G,x,R,O),i===ft&&(Je=ft=null,nt=0),(M.subtreeFlags&10256)===0&&(M.flags&10256)===0||Ku||(Ku=!0,ip=G,ap=c,bL(ot,function(){return Fo(),null})),c=(M.flags&15990)!==0,(M.subtreeFlags&15990)!==0||c?(c=V.T,V.T=null,x=re.p,re.p=2,R=bt,bt|=4,iL(i,M),Dx(M,i),VI(Ep,i.containerInfo),od=!!xp,Ep=xp=null,i.current=M,Cx(i,M.alternate,M),we(),bt=R,re.p=x,V.T=c):i.current=M,Ku?(Ku=!1,Ba=i,Sl=f):Jx(i,G),G=i.pendingLanes,G===0&&(Fi=null),Oh(M.stateNode),kr(i),o!==null)for(p=i.onRecoverableError,M=0;M<o.length;M++)G=o[M],p(G.value,{componentStack:G.stack});return(Sl&3)!==0&&Fo(),G=i.pendingLanes,(f&4194218)!==0&&(G&42)!==0?i===op?Al++:(Al=0,op=i):Al=0,wl(0),null}function Jx(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,sl(o)))}function Fo(){if(Ba!==null){var i=Ba,o=ip;ip=0;var c=l0(Sl),f=V.T,p=re.p;try{if(re.p=32>c?32:c,V.T=null,Ba===null)var x=!1;else{c=ap,ap=null;var R=Ba,O=Sl;if(Ba=null,Sl=0,(bt&6)!==0)throw Error(r(331));var M=bt;if(bt|=4,Px(R.current),Lx(R,R.current,O,c),bt=M,wl(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(Wr,R)}catch{}x=!0}return x}finally{re.p=p,V.T=f,Jx(i,o)}}return!1}function eE(i,o,c){o=Kn(c,o),o=Cm(i.stateNode,o,2),i=zi(i,o,2),i!==null&&($s(i,2),kr(i))}function dt(i,o,c){if(i.tag===3)eE(i,i,c);else for(;o!==null;){if(o.tag===3){eE(o,i,c);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Fi===null||!Fi.has(f))){i=Kn(c,i),c=rx(2),f=zi(o,c,2),f!==null&&(ix(c,f,o,i),$s(f,2),kr(f));break}}o=o.return}}function dp(i,o,c){var f=i.pingCache;if(f===null){f=i.pingCache=new uL;var p=new Set;f.set(o,p)}else p=f.get(o),p===void 0&&(p=new Set,f.set(o,p));p.has(c)||(ep=!0,p.add(c),i=gL.bind(null,i,o,c),o.then(i,i))}function gL(i,o,c){var f=i.pingCache;f!==null&&f.delete(o),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,ft===i&&(nt&c)===c&&(Tt===4||Tt===3&&(nt&62914560)===nt&&300>be()-rp?(bt&2)===0&&$o(i,0):tp|=c,Uo===nt&&(Uo=0)),kr(i)}function tE(i,o){o===0&&(o=a0()),i=Oi(i,o),i!==null&&($s(i,o),kr(i))}function yL(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),tE(i,c)}function vL(i,o){var c=0;switch(i.tag){case 13:var f=i.stateNode,p=i.memoizedState;p!==null&&(c=p.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(o),tE(i,c)}function bL(i,o){return B(i,o)}var Wu=null,Go=null,fp=!1,Yu=!1,hp=!1,Ua=0;function kr(i){i!==Go&&i.next===null&&(Go===null?Wu=Go=i:Go=Go.next=i),Yu=!0,fp||(fp=!0,xL(_L))}function wl(i,o){if(!hp&&Yu){hp=!0;do for(var c=!1,f=Wu;f!==null;){if(i!==0){var p=f.pendingLanes;if(p===0)var x=0;else{var R=f.suspendedLanes,O=f.pingedLanes;x=(1<<31-yn(42|i)+1)-1,x&=p&~(R&~O),x=x&201326677?x&201326677|1:x?x|2:0}x!==0&&(c=!0,iE(f,x))}else x=nt,x=au(f,f===ft?x:0),(x&3)===0||Us(f,x)||(c=!0,iE(f,x));f=f.next}while(c);hp=!1}}function _L(){Yu=fp=!1;var i=0;Ua!==0&&(NL()&&(i=Ua),Ua=0);for(var o=be(),c=null,f=Wu;f!==null;){var p=f.next,x=nE(f,o);x===0?(f.next=null,c===null?Wu=p:c.next=p,p===null&&(Go=c)):(c=f,(i!==0||(x&3)!==0)&&(Yu=!0)),f=p}wl(i)}function nE(i,o){for(var c=i.suspendedLanes,f=i.pingedLanes,p=i.expirationTimes,x=i.pendingLanes&-62914561;0<x;){var R=31-yn(x),O=1<<R,M=p[R];M===-1?((O&c)===0||(O&f)!==0)&&(p[R]=KD(O,o)):M<=o&&(i.expiredLanes|=O),x&=~O}if(o=ft,c=nt,c=au(i,i===o?c:0),f=i.callbackNode,c===0||i===o&&ht===2||i.cancelPendingCommit!==null)return f!==null&&f!==null&&J(f),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||Us(i,c)){if(o=c&-c,o===i.callbackPriority)return o;switch(f!==null&&J(f),l0(c)){case 2:case 8:c=rt;break;case 32:c=ot;break;case 268435456:c=ba;break;default:c=ot}return f=rE.bind(null,i),c=B(c,f),i.callbackPriority=o,i.callbackNode=c,o}return f!==null&&f!==null&&J(f),i.callbackPriority=2,i.callbackNode=null,2}function rE(i,o){var c=i.callbackNode;if(Fo()&&i.callbackNode!==c)return null;var f=nt;return f=au(i,i===ft?f:0),f===0?null:(Fx(i,f,o),nE(i,be()),i.callbackNode!=null&&i.callbackNode===c?rE.bind(null,i):null)}function iE(i,o){if(Fo())return null;Fx(i,o,!0)}function xL(i){kL(function(){(bt&6)!==0?B(Le,i):i()})}function mp(){return Ua===0&&(Ua=i0()),Ua}function aE(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:uu(""+i)}function oE(i,o){var c=o.ownerDocument.createElement("input");return c.name=o.name,c.value=o.value,i.id&&c.setAttribute("form",i.id),o.parentNode.insertBefore(c,o),i=new FormData(i),c.parentNode.removeChild(c),i}function EL(i,o,c,f,p){if(o==="submit"&&c&&c.stateNode===p){var x=aE((p[Tn]||null).action),R=f.submitter;R&&(o=(o=R[Tn]||null)?aE(o.formAction):R.getAttribute("formAction"),o!==null&&(x=o,R=null));var O=new mu("action","action",null,f,p);i.push({event:O,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Ua!==0){var M=R?oE(p,R):new FormData(p);Sm(c,{pending:!0,data:M,method:p.method,action:x},null,M)}}else typeof x=="function"&&(O.preventDefault(),M=R?oE(p,R):new FormData(p),Sm(c,{pending:!0,data:M,method:p.method,action:x},x,M))},currentTarget:p}]})}}for(var pp=0;pp<Q0.length;pp++){var gp=Q0[pp],SL=gp.toLowerCase(),AL=gp[0].toUpperCase()+gp.slice(1);hr(SL,"on"+AL)}hr(Z0,"onAnimationEnd"),hr(q0,"onAnimationIteration"),hr(W0,"onAnimationStart"),hr("dblclick","onDoubleClick"),hr("focusin","onFocus"),hr("focusout","onBlur"),hr(UI,"onTransitionRun"),hr($I,"onTransitionStart"),hr(HI,"onTransitionCancel"),hr(Y0,"onTransitionEnd"),vo("onMouseEnter",["mouseout","mouseover"]),vo("onMouseLeave",["mouseout","mouseover"]),vo("onPointerEnter",["pointerout","pointerover"]),vo("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tl="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(" "),wL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Tl));function sE(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],p=f.event;f=f.listeners;e:{var x=void 0;if(o)for(var R=f.length-1;0<=R;R--){var O=f[R],M=O.instance,G=O.currentTarget;if(O=O.listener,M!==x&&p.isPropagationStopped())break e;x=O,p.currentTarget=G;try{x(p)}catch(oe){Mu(oe)}p.currentTarget=null,x=M}else for(R=0;R<f.length;R++){if(O=f[R],M=O.instance,G=O.currentTarget,O=O.listener,M!==x&&p.isPropagationStopped())break e;x=O,p.currentTarget=G;try{x(p)}catch(oe){Mu(oe)}p.currentTarget=null,x=M}}}}function et(i,o){var c=o[Dh];c===void 0&&(c=o[Dh]=new Set);var f=i+"__bubble";c.has(f)||(lE(o,i,2,!1),c.add(f))}function yp(i,o,c){var f=0;o&&(f|=4),lE(c,i,f,o)}var Xu="_reactListening"+Math.random().toString(36).slice(2);function vp(i){if(!i[Xu]){i[Xu]=!0,d0.forEach(function(c){c!=="selectionchange"&&(wL.has(c)||yp(c,!1,i),yp(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Xu]||(o[Xu]=!0,yp("selectionchange",!1,o))}}function lE(i,o,c,f){switch(kE(o)){case 2:var p=XL;break;case 8:p=QL;break;default:p=kp}c=p.bind(null,o,c,i),p=void 0,!Bh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(p=!0),f?p!==void 0?i.addEventListener(o,c,{capture:!0,passive:p}):i.addEventListener(o,c,!0):p!==void 0?i.addEventListener(o,c,{passive:p}):i.addEventListener(o,c,!1)}function bp(i,o,c,f,p){var x=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var R=f.tag;if(R===3||R===4){var O=f.stateNode.containerInfo;if(O===p||O.nodeType===8&&O.parentNode===p)break;if(R===4)for(R=f.return;R!==null;){var M=R.tag;if((M===3||M===4)&&(M=R.stateNode.containerInfo,M===p||M.nodeType===8&&M.parentNode===p))return;R=R.return}for(;O!==null;){if(R=xa(O),R===null)return;if(M=R.tag,M===5||M===6||M===26||M===27){f=x=R;continue e}O=O.parentNode}}f=f.return}S0(function(){var G=x,oe=zh(c),me=[];e:{var te=X0.get(i);if(te!==void 0){var ae=mu,De=i;switch(i){case"keypress":if(fu(c)===0)break e;case"keydown":case"keyup":ae=vI;break;case"focusin":De="focus",ae=Fh;break;case"focusout":De="blur",ae=Fh;break;case"beforeblur":case"afterblur":ae=Fh;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=T0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=oI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=xI;break;case Z0:case q0:case W0:ae=cI;break;case Y0:ae=SI;break;case"scroll":case"scrollend":ae=iI;break;case"wheel":ae=wI;break;case"copy":case"cut":case"paste":ae=dI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=C0;break;case"toggle":case"beforetoggle":ae=RI}var He=(o&4)!==0,Rt=!He&&(i==="scroll"||i==="scrollend"),q=He?te!==null?te+"Capture":null:te;He=[];for(var F=G,W;F!==null;){var de=F;if(W=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||W===null||q===null||(de=Gs(F,q),de!=null&&He.push(Rl(F,de,W))),Rt)break;F=F.return}0<He.length&&(te=new ae(te,De,null,c,oe),me.push({event:te,listeners:He}))}}if((o&7)===0){e:{if(te=i==="mouseover"||i==="pointerover",ae=i==="mouseout"||i==="pointerout",te&&c!==Ph&&(De=c.relatedTarget||c.fromElement)&&(xa(De)||De[po]))break e;if((ae||te)&&(te=oe.window===oe?oe:(te=oe.ownerDocument)?te.defaultView||te.parentWindow:window,ae?(De=c.relatedTarget||c.toElement,ae=G,De=De?xa(De):null,De!==null&&(Rt=K(De),He=De.tag,De!==Rt||He!==5&&He!==27&&He!==6)&&(De=null)):(ae=null,De=G),ae!==De)){if(He=T0,de="onMouseLeave",q="onMouseEnter",F="mouse",(i==="pointerout"||i==="pointerover")&&(He=C0,de="onPointerLeave",q="onPointerEnter",F="pointer"),Rt=ae==null?te:Fs(ae),W=De==null?te:Fs(De),te=new He(de,F+"leave",ae,c,oe),te.target=Rt,te.relatedTarget=W,de=null,xa(oe)===G&&(He=new He(q,F+"enter",De,c,oe),He.target=W,He.relatedTarget=Rt,de=He),Rt=de,ae&&De)t:{for(He=ae,q=De,F=0,W=He;W;W=Ko(W))F++;for(W=0,de=q;de;de=Ko(de))W++;for(;0<F-W;)He=Ko(He),F--;for(;0<W-F;)q=Ko(q),W--;for(;F--;){if(He===q||q!==null&&He===q.alternate)break t;He=Ko(He),q=Ko(q)}He=null}else He=null;ae!==null&&cE(me,te,ae,He,!1),De!==null&&Rt!==null&&cE(me,Rt,De,He,!0)}}e:{if(te=G?Fs(G):window,ae=te.nodeName&&te.nodeName.toLowerCase(),ae==="select"||ae==="input"&&te.type==="file")var Ce=M0;else if(L0(te))if(P0)Ce=PI;else{Ce=jI;var Qe=LI}else ae=te.nodeName,!ae||ae.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?G&&Mh(G.elementType)&&(Ce=M0):Ce=MI;if(Ce&&(Ce=Ce(i,G))){j0(me,Ce,c,oe);break e}Qe&&Qe(i,te,G),i==="focusout"&&G&&te.type==="number"&&G.memoizedProps.value!=null&&jh(te,"number",te.value)}switch(Qe=G?Fs(G):window,i){case"focusin":(L0(Qe)||Qe.contentEditable==="true")&&(Ao=Qe,Yh=G,Js=null);break;case"focusout":Js=Yh=Ao=null;break;case"mousedown":Xh=!0;break;case"contextmenu":case"mouseup":case"dragend":Xh=!1,G0(me,c,oe);break;case"selectionchange":if(BI)break;case"keydown":case"keyup":G0(me,c,oe)}var je;if(Kh)e:{switch(i){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else So?D0(i,c)&&(Me="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Me="onCompositionStart");Me&&(N0&&c.locale!=="ko"&&(So||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&So&&(je=A0()):(Ni=oe,Uh="value"in Ni?Ni.value:Ni.textContent,So=!0)),Qe=Qu(G,Me),0<Qe.length&&(Me=new R0(Me,i,null,c,oe),me.push({event:Me,listeners:Qe}),je?Me.data=je:(je=I0(c),je!==null&&(Me.data=je)))),(je=NI?OI(i,c):kI(i,c))&&(Me=Qu(G,"onBeforeInput"),0<Me.length&&(Qe=new R0("onBeforeInput","beforeinput",null,c,oe),me.push({event:Qe,listeners:Me}),Qe.data=je)),EL(me,i,G,c,oe)}sE(me,o)})}function Rl(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Qu(i,o){for(var c=o+"Capture",f=[];i!==null;){var p=i,x=p.stateNode;p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=Gs(i,c),p!=null&&f.unshift(Rl(i,p,x)),p=Gs(i,o),p!=null&&f.push(Rl(i,p,x))),i=i.return}return f}function Ko(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function cE(i,o,c,f,p){for(var x=o._reactName,R=[];c!==null&&c!==f;){var O=c,M=O.alternate,G=O.stateNode;if(O=O.tag,M!==null&&M===f)break;O!==5&&O!==26&&O!==27||G===null||(M=G,p?(G=Gs(c,x),G!=null&&R.unshift(Rl(c,G,M))):p||(G=Gs(c,x),G!=null&&R.push(Rl(c,G,M)))),c=c.return}R.length!==0&&i.push({event:o,listeners:R})}var TL=/\r\n?/g,RL=/\u0000|\uFFFD/g;function uE(i){return(typeof i=="string"?i:""+i).replace(TL,`
|
|
50
|
-
`).replace(RL,"")}function dE(i,o){return o=uE(o),uE(i)===o}function Ju(){}function ct(i,o,c,f,p,x){switch(c){case"children":typeof f=="string"?o==="body"||o==="textarea"&&f===""||_o(i,f):(typeof f=="number"||typeof f=="bigint")&&o!=="body"&&_o(i,""+f);break;case"className":su(i,"class",f);break;case"tabIndex":su(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":su(i,c,f);break;case"style":x0(i,f,x);break;case"data":if(o!=="object"){su(i,"data",f);break}case"src":case"href":if(f===""&&(o!=="a"||c!=="href")){i.removeAttribute(c);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=uu(""+f),i.setAttribute(c,f);break;case"action":case"formAction":if(typeof f=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(c==="formAction"?(o!=="input"&&ct(i,o,"name",p.name,p,null),ct(i,o,"formEncType",p.formEncType,p,null),ct(i,o,"formMethod",p.formMethod,p,null),ct(i,o,"formTarget",p.formTarget,p,null)):(ct(i,o,"encType",p.encType,p,null),ct(i,o,"method",p.method,p,null),ct(i,o,"target",p.target,p,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=uu(""+f),i.setAttribute(c,f);break;case"onClick":f!=null&&(i.onclick=Ju);break;case"onScroll":f!=null&&et("scroll",i);break;case"onScrollEnd":f!=null&&et("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}c=uu(""+f),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""+f):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":f===!0?i.setAttribute(c,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,f):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(c,f):i.removeAttribute(c);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(c):i.setAttribute(c,f);break;case"popover":et("beforetoggle",i),et("toggle",i),ou(i,"popover",f);break;case"xlinkActuate":Xr(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Xr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Xr(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Xr(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Xr(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Xr(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Xr(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Xr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Xr(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":ou(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=nI.get(c)||c,ou(i,c,f))}}function _p(i,o,c,f,p,x){switch(c){case"style":x0(i,f,x);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof f=="string"?_o(i,f):(typeof f=="number"||typeof f=="bigint")&&_o(i,""+f);break;case"onScroll":f!=null&&et("scroll",i);break;case"onScrollEnd":f!=null&&et("scrollend",i);break;case"onClick":f!=null&&(i.onclick=Ju);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!f0.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(p=c.endsWith("Capture"),o=c.slice(2,p?c.length-7:void 0),x=i[Tn]||null,x=x!=null?x[c]:null,typeof x=="function"&&i.removeEventListener(o,x,p),typeof f=="function")){typeof x!="function"&&x!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(o,f,p);break e}c in i?i[c]=f:f===!0?i.setAttribute(c,""):ou(i,c,f)}}}function rn(i,o,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":et("error",i),et("load",i);var f=!1,p=!1,x;for(x in c)if(c.hasOwnProperty(x)){var R=c[x];if(R!=null)switch(x){case"src":f=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:ct(i,o,x,R,c,null)}}p&&ct(i,o,"srcSet",c.srcSet,c,null),f&&ct(i,o,"src",c.src,c,null);return;case"input":et("invalid",i);var O=x=R=p=null,M=null,G=null;for(f in c)if(c.hasOwnProperty(f)){var oe=c[f];if(oe!=null)switch(f){case"name":p=oe;break;case"type":R=oe;break;case"checked":M=oe;break;case"defaultChecked":G=oe;break;case"value":x=oe;break;case"defaultValue":O=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,o));break;default:ct(i,o,f,oe,c,null)}}y0(i,x,O,M,G,R,p,!1),lu(i);return;case"select":et("invalid",i),f=R=x=null;for(p in c)if(c.hasOwnProperty(p)&&(O=c[p],O!=null))switch(p){case"value":x=O;break;case"defaultValue":R=O;break;case"multiple":f=O;default:ct(i,o,p,O,c,null)}o=x,c=R,i.multiple=!!f,o!=null?bo(i,!!f,o,!1):c!=null&&bo(i,!!f,c,!0);return;case"textarea":et("invalid",i),x=p=f=null;for(R in c)if(c.hasOwnProperty(R)&&(O=c[R],O!=null))switch(R){case"value":f=O;break;case"defaultValue":p=O;break;case"children":x=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(91));break;default:ct(i,o,R,O,c,null)}b0(i,f,p,x),lu(i);return;case"option":for(M in c)if(c.hasOwnProperty(M)&&(f=c[M],f!=null))switch(M){case"selected":i.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:ct(i,o,M,f,c,null)}return;case"dialog":et("cancel",i),et("close",i);break;case"iframe":case"object":et("load",i);break;case"video":case"audio":for(f=0;f<Tl.length;f++)et(Tl[f],i);break;case"image":et("error",i),et("load",i);break;case"details":et("toggle",i);break;case"embed":case"source":case"link":et("error",i),et("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in c)if(c.hasOwnProperty(G)&&(f=c[G],f!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:ct(i,o,G,f,c,null)}return;default:if(Mh(o)){for(oe in c)c.hasOwnProperty(oe)&&(f=c[oe],f!==void 0&&_p(i,o,oe,f,c,void 0));return}}for(O in c)c.hasOwnProperty(O)&&(f=c[O],f!=null&&ct(i,o,O,f,c,null))}function CL(i,o,c,f){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,R=null,O=null,M=null,G=null,oe=null;for(ae in c){var me=c[ae];if(c.hasOwnProperty(ae)&&me!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":M=me;default:f.hasOwnProperty(ae)||ct(i,o,ae,null,f,me)}}for(var te in f){var ae=f[te];if(me=c[te],f.hasOwnProperty(te)&&(ae!=null||me!=null))switch(te){case"type":x=ae;break;case"name":p=ae;break;case"checked":G=ae;break;case"defaultChecked":oe=ae;break;case"value":R=ae;break;case"defaultValue":O=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,o));break;default:ae!==me&&ct(i,o,te,ae,f,me)}}Lh(i,R,O,M,G,oe,x,p);return;case"select":ae=R=O=te=null;for(x in c)if(M=c[x],c.hasOwnProperty(x)&&M!=null)switch(x){case"value":break;case"multiple":ae=M;default:f.hasOwnProperty(x)||ct(i,o,x,null,f,M)}for(p in f)if(x=f[p],M=c[p],f.hasOwnProperty(p)&&(x!=null||M!=null))switch(p){case"value":te=x;break;case"defaultValue":O=x;break;case"multiple":R=x;default:x!==M&&ct(i,o,p,x,f,M)}o=O,c=R,f=ae,te!=null?bo(i,!!c,te,!1):!!f!=!!c&&(o!=null?bo(i,!!c,o,!0):bo(i,!!c,c?[]:"",!1));return;case"textarea":ae=te=null;for(O in c)if(p=c[O],c.hasOwnProperty(O)&&p!=null&&!f.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:ct(i,o,O,null,f,p)}for(R in f)if(p=f[R],x=c[R],f.hasOwnProperty(R)&&(p!=null||x!=null))switch(R){case"value":te=p;break;case"defaultValue":ae=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==x&&ct(i,o,R,p,f,x)}v0(i,te,ae);return;case"option":for(var De in c)if(te=c[De],c.hasOwnProperty(De)&&te!=null&&!f.hasOwnProperty(De))switch(De){case"selected":i.selected=!1;break;default:ct(i,o,De,null,f,te)}for(M in f)if(te=f[M],ae=c[M],f.hasOwnProperty(M)&&te!==ae&&(te!=null||ae!=null))switch(M){case"selected":i.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:ct(i,o,M,te,f,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var He in c)te=c[He],c.hasOwnProperty(He)&&te!=null&&!f.hasOwnProperty(He)&&ct(i,o,He,null,f,te);for(G in f)if(te=f[G],ae=c[G],f.hasOwnProperty(G)&&te!==ae&&(te!=null||ae!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,o));break;default:ct(i,o,G,te,f,ae)}return;default:if(Mh(o)){for(var Rt in c)te=c[Rt],c.hasOwnProperty(Rt)&&te!==void 0&&!f.hasOwnProperty(Rt)&&_p(i,o,Rt,void 0,f,te);for(oe in f)te=f[oe],ae=c[oe],!f.hasOwnProperty(oe)||te===ae||te===void 0&&ae===void 0||_p(i,o,oe,te,f,ae);return}}for(var q in c)te=c[q],c.hasOwnProperty(q)&&te!=null&&!f.hasOwnProperty(q)&&ct(i,o,q,null,f,te);for(me in f)te=f[me],ae=c[me],!f.hasOwnProperty(me)||te===ae||te==null&&ae==null||ct(i,o,me,te,f,ae)}var xp=null,Ep=null;function ed(i){return i.nodeType===9?i:i.ownerDocument}function fE(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hE(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function Sp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Ap=null;function NL(){var i=window.event;return i&&i.type==="popstate"?i===Ap?!1:(Ap=i,!0):(Ap=null,!1)}var mE=typeof setTimeout=="function"?setTimeout:void 0,OL=typeof clearTimeout=="function"?clearTimeout:void 0,pE=typeof Promise=="function"?Promise:void 0,kL=typeof queueMicrotask=="function"?queueMicrotask:typeof pE<"u"?function(i){return pE.resolve(null).then(i).catch(DL)}:mE;function DL(i){setTimeout(function(){throw i})}function wp(i,o){var c=o,f=0;do{var p=c.nextSibling;if(i.removeChild(c),p&&p.nodeType===8)if(c=p.data,c==="/$"){if(f===0){i.removeChild(p),jl(o);return}f--}else c!=="$"&&c!=="$?"&&c!=="$!"||f++;c=p}while(c);jl(o)}function Tp(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var c=o;switch(o=o.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Tp(c),Ih(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function IL(i,o,c,f){for(;i.nodeType===1;){var p=c;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[Hs])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(x=i.getAttribute("rel"),x==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(x!==p.rel||i.getAttribute("href")!==(p.href==null?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(x=i.getAttribute("src"),(x!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&x&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var x=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===x)return i}else return i;if(i=gr(i.nextSibling),i===null)break}return null}function LL(i,o,c){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=gr(i.nextSibling),i===null))return null;return i}function gr(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="F!"||o==="F")break;if(o==="/$")return null}}return i}function gE(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return i;o--}else c==="/$"&&o++}i=i.previousSibling}return null}function yE(i,o,c){switch(o=ed(c),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}var er=new Map,vE=new Set;function td(i){return typeof i.getRootNode=="function"?i.getRootNode():i.ownerDocument}var fi=re.d;re.d={f:jL,r:ML,D:PL,C:zL,L:VL,m:BL,X:$L,S:UL,M:HL};function jL(){var i=fi.f(),o=Zu();return i||o}function ML(i){var o=go(i);o!==null&&o.tag===5&&o.type==="form"?G_(o):fi.r(i)}var Zo=typeof document>"u"?null:document;function bE(i,o,c){var f=Zo;if(f&&typeof o=="string"&&o){var p=Fn(o);p='link[rel="'+i+'"][href="'+p+'"]',typeof c=="string"&&(p+='[crossorigin="'+c+'"]'),vE.has(p)||(vE.add(p),i={rel:i,crossOrigin:c,href:o},f.querySelector(p)===null&&(o=f.createElement("link"),rn(o,"link",i),Kt(o),f.head.appendChild(o)))}}function PL(i){fi.D(i),bE("dns-prefetch",i,null)}function zL(i,o){fi.C(i,o),bE("preconnect",i,o)}function VL(i,o,c){fi.L(i,o,c);var f=Zo;if(f&&i&&o){var p='link[rel="preload"][as="'+Fn(o)+'"]';o==="image"&&c&&c.imageSrcSet?(p+='[imagesrcset="'+Fn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(p+='[imagesizes="'+Fn(c.imageSizes)+'"]')):p+='[href="'+Fn(i)+'"]';var x=p;switch(o){case"style":x=qo(i);break;case"script":x=Wo(i)}er.has(x)||(i=U({rel:"preload",href:o==="image"&&c&&c.imageSrcSet?void 0:i,as:o},c),er.set(x,i),f.querySelector(p)!==null||o==="style"&&f.querySelector(Cl(x))||o==="script"&&f.querySelector(Nl(x))||(o=f.createElement("link"),rn(o,"link",i),Kt(o),f.head.appendChild(o)))}}function BL(i,o){fi.m(i,o);var c=Zo;if(c&&i){var f=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Fn(f)+'"][href="'+Fn(i)+'"]',x=p;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Wo(i)}if(!er.has(x)&&(i=U({rel:"modulepreload",href:i},o),er.set(x,i),c.querySelector(p)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Nl(x)))return}f=c.createElement("link"),rn(f,"link",i),Kt(f),c.head.appendChild(f)}}}function UL(i,o,c){fi.S(i,o,c);var f=Zo;if(f&&i){var p=yo(f).hoistableStyles,x=qo(i);o=o||"default";var R=p.get(x);if(!R){var O={loading:0,preload:null};if(R=f.querySelector(Cl(x)))O.loading=5;else{i=U({rel:"stylesheet",href:i,"data-precedence":o},c),(c=er.get(x))&&Rp(i,c);var M=R=f.createElement("link");Kt(M),rn(M,"link",i),M._p=new Promise(function(G,oe){M.onload=G,M.onerror=oe}),M.addEventListener("load",function(){O.loading|=1}),M.addEventListener("error",function(){O.loading|=2}),O.loading|=4,nd(R,o,f)}R={type:"stylesheet",instance:R,count:1,state:O},p.set(x,R)}}}function $L(i,o){fi.X(i,o);var c=Zo;if(c&&i){var f=yo(c).hoistableScripts,p=Wo(i),x=f.get(p);x||(x=c.querySelector(Nl(p)),x||(i=U({src:i,async:!0},o),(o=er.get(p))&&Cp(i,o),x=c.createElement("script"),Kt(x),rn(x,"link",i),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},f.set(p,x))}}function HL(i,o){fi.M(i,o);var c=Zo;if(c&&i){var f=yo(c).hoistableScripts,p=Wo(i),x=f.get(p);x||(x=c.querySelector(Nl(p)),x||(i=U({src:i,async:!0,type:"module"},o),(o=er.get(p))&&Cp(i,o),x=c.createElement("script"),Kt(x),rn(x,"link",i),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},f.set(p,x))}}function _E(i,o,c,f){var p=(p=pt.current)?td(p):null;if(!p)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(o=qo(c.href),c=yo(p).hoistableStyles,f=c.get(o),f||(f={type:"style",instance:null,count:0,state:null},c.set(o,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=qo(c.href);var x=yo(p).hoistableStyles,R=x.get(i);if(R||(p=p.ownerDocument||p,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(i,R),(x=p.querySelector(Cl(i)))&&!x._p&&(R.instance=x,R.state.loading=5),er.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},er.set(i,c),x||FL(p,i,c,R.state))),o&&f===null)throw Error(r(528,""));return R}if(o&&f!==null)throw Error(r(529,""));return null;case"script":return o=c.async,c=c.src,typeof c=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Wo(c),c=yo(p).hoistableScripts,f=c.get(o),f||(f={type:"script",instance:null,count:0,state:null},c.set(o,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function qo(i){return'href="'+Fn(i)+'"'}function Cl(i){return'link[rel="stylesheet"]['+i+"]"}function xE(i){return U({},i,{"data-precedence":i.precedence,precedence:null})}function FL(i,o,c,f){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?f.loading=1:(o=i.createElement("link"),f.preload=o,o.addEventListener("load",function(){return f.loading|=1}),o.addEventListener("error",function(){return f.loading|=2}),rn(o,"link",c),Kt(o),i.head.appendChild(o))}function Wo(i){return'[src="'+Fn(i)+'"]'}function Nl(i){return"script[async]"+i}function EE(i,o,c){if(o.count++,o.instance===null)switch(o.type){case"style":var f=i.querySelector('style[data-href~="'+Fn(c.href)+'"]');if(f)return o.instance=f,Kt(f),f;var p=U({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),Kt(f),rn(f,"style",p),nd(f,c.precedence,i),o.instance=f;case"stylesheet":p=qo(c.href);var x=i.querySelector(Cl(p));if(x)return o.state.loading|=4,o.instance=x,Kt(x),x;f=xE(c),(p=er.get(p))&&Rp(f,p),x=(i.ownerDocument||i).createElement("link"),Kt(x);var R=x;return R._p=new Promise(function(O,M){R.onload=O,R.onerror=M}),rn(x,"link",f),o.state.loading|=4,nd(x,c.precedence,i),o.instance=x;case"script":return x=Wo(c.src),(p=i.querySelector(Nl(x)))?(o.instance=p,Kt(p),p):(f=c,(p=er.get(x))&&(f=U({},c),Cp(f,p)),i=i.ownerDocument||i,p=i.createElement("script"),Kt(p),rn(p,"link",f),i.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(f=o.instance,o.state.loading|=4,nd(f,c.precedence,i));return o.instance}function nd(i,o,c){for(var f=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=f.length?f[f.length-1]:null,x=p,R=0;R<f.length;R++){var O=f[R];if(O.dataset.precedence===o)x=O;else if(x!==p)break}x?x.parentNode.insertBefore(i,x.nextSibling):(o=c.nodeType===9?c.head:c,o.insertBefore(i,o.firstChild))}function Rp(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Cp(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var rd=null;function SE(i,o,c){if(rd===null){var f=new Map,p=rd=new Map;p.set(c,f)}else p=rd,f=p.get(c),f||(f=new Map,p.set(c,f));if(f.has(i))return f;for(f.set(i,null),c=c.getElementsByTagName(i),p=0;p<c.length;p++){var x=c[p];if(!(x[Hs]||x[cn]||i==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var R=x.getAttribute(o)||"";R=i+R;var O=f.get(R);O?O.push(x):f.set(R,[x])}}return f}function AE(i,o,c){i=i.ownerDocument||i,i.head.insertBefore(c,o==="title"?i.querySelector("head > title"):null)}function GL(i,o,c){if(c===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return i=o.disabled,typeof o.precedence=="string"&&i==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function wE(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var Ol=null;function KL(){}function ZL(i,o,c){if(Ol===null)throw Error(r(475));var f=Ol;if(o.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=qo(c.href),x=i.querySelector(Cl(p));if(x){i=x._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(f.count++,f=id.bind(f),i.then(f,f)),o.state.loading|=4,o.instance=x,Kt(x);return}x=i.ownerDocument||i,c=xE(c),(p=er.get(p))&&Rp(c,p),x=x.createElement("link"),Kt(x);var R=x;R._p=new Promise(function(O,M){R.onload=O,R.onerror=M}),rn(x,"link",c),o.instance=x}f.stylesheets===null&&(f.stylesheets=new Map),f.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(f.count++,o=id.bind(f),i.addEventListener("load",o),i.addEventListener("error",o))}}function qL(){if(Ol===null)throw Error(r(475));var i=Ol;return i.stylesheets&&i.count===0&&Np(i,i.stylesheets),0<i.count?function(o){var c=setTimeout(function(){if(i.stylesheets&&Np(i,i.stylesheets),i.unsuspend){var f=i.unsuspend;i.unsuspend=null,f()}},6e4);return i.unsuspend=o,function(){i.unsuspend=null,clearTimeout(c)}}:null}function id(){if(this.count--,this.count===0){if(this.stylesheets)Np(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var ad=null;function Np(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,ad=new Map,o.forEach(WL,i),ad=null,id.call(i))}function WL(i,o){if(!(o.state.loading&4)){var c=ad.get(i);if(c)var f=c.get(null);else{c=new Map,ad.set(i,c);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var R=p[x];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(c.set(R.dataset.precedence,R),f=R)}f&&c.set(null,f)}p=o.instance,R=p.getAttribute("data-precedence"),x=c.get(R)||f,x===f&&c.set(null,p),c.set(R,p),this.count++,f=id.bind(this),p.addEventListener("load",f),p.addEventListener("error",f),x?x.parentNode.insertBefore(p,x.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),o.state.loading|=4}}var kl={$$typeof:v,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function YL(i,o,c,f,p,x,R,O){this.tag=1,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=kh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kh(0),this.hiddenUpdates=kh(null),this.identifierPrefix=f,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function TE(i,o,c,f,p,x,R,O,M,G,oe,me){return i=new YL(i,o,c,R,O,M,G,me),o=1,x===!0&&(o|=24),x=Qn(3,null,null,o),i.current=x,x.stateNode=i,o=sm(),o.refCount++,i.pooledCache=o,o.refCount++,x.memoizedState={element:f,isDehydrated:c,cache:o},Um(x),i}function RE(i){return i?(i=Ro,i):Ro}function CE(i,o,c,f,p,x){p=RE(p),f.context===null?f.context=p:f.pendingContext=p,f=Pi(o),f.payload={element:c},x=x===void 0?null:x,x!==null&&(f.callback=x),c=zi(i,f,o),c!==null&&(bn(c,i,o),ml(c,i,o))}function NE(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function Op(i,o){NE(i,o),(i=i.alternate)&&NE(i,o)}function OE(i){if(i.tag===13){var o=Oi(i,67108864);o!==null&&bn(o,i,67108864),Op(i,67108864)}}var od=!0;function XL(i,o,c,f){var p=V.T;V.T=null;var x=re.p;try{re.p=2,kp(i,o,c,f)}finally{re.p=x,V.T=p}}function QL(i,o,c,f){var p=V.T;V.T=null;var x=re.p;try{re.p=8,kp(i,o,c,f)}finally{re.p=x,V.T=p}}function kp(i,o,c,f){if(od){var p=Dp(f);if(p===null)bp(i,o,f,sd,c),DE(i,f);else if(ej(p,i,o,c,f))f.stopPropagation();else if(DE(i,f),o&4&&-1<JL.indexOf(i)){for(;p!==null;){var x=go(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var R=_a(x.pendingLanes);if(R!==0){var O=x;for(O.pendingLanes|=2,O.entangledLanes|=2;R;){var M=1<<31-yn(R);O.entanglements[1]|=M,R&=~M}kr(x),(bt&6)===0&&(Fu=be()+500,wl(0))}}break;case 13:O=Oi(x,2),O!==null&&bn(O,x,2),Zu(),Op(x,2)}if(x=Dp(f),x===null&&bp(i,o,f,sd,c),x===p)break;p=x}p!==null&&f.stopPropagation()}else bp(i,o,f,null,c)}}function Dp(i){return i=zh(i),Ip(i)}var sd=null;function Ip(i){if(sd=null,i=xa(i),i!==null){var o=K(i);if(o===null)i=null;else{var c=o.tag;if(c===13){if(i=ye(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return sd=i,null}function kE(i){switch(i){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(_e()){case Le:return 2;case rt:return 8;case ot:case wn:return 32;case ba:return 268435456;default:return 32}default:return 32}}var Lp=!1,Gi=null,Ki=null,Zi=null,Dl=new Map,Il=new Map,qi=[],JL="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".split(" ");function DE(i,o){switch(i){case"focusin":case"focusout":Gi=null;break;case"dragenter":case"dragleave":Ki=null;break;case"mouseover":case"mouseout":Zi=null;break;case"pointerover":case"pointerout":Dl.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Il.delete(o.pointerId)}}function Ll(i,o,c,f,p,x){return i===null||i.nativeEvent!==x?(i={blockedOn:o,domEventName:c,eventSystemFlags:f,nativeEvent:x,targetContainers:[p]},o!==null&&(o=go(o),o!==null&&OE(o)),i):(i.eventSystemFlags|=f,o=i.targetContainers,p!==null&&o.indexOf(p)===-1&&o.push(p),i)}function ej(i,o,c,f,p){switch(o){case"focusin":return Gi=Ll(Gi,i,o,c,f,p),!0;case"dragenter":return Ki=Ll(Ki,i,o,c,f,p),!0;case"mouseover":return Zi=Ll(Zi,i,o,c,f,p),!0;case"pointerover":var x=p.pointerId;return Dl.set(x,Ll(Dl.get(x)||null,i,o,c,f,p)),!0;case"gotpointercapture":return x=p.pointerId,Il.set(x,Ll(Il.get(x)||null,i,o,c,f,p)),!0}return!1}function IE(i){var o=xa(i.target);if(o!==null){var c=K(o);if(c!==null){if(o=c.tag,o===13){if(o=ye(c),o!==null){i.blockedOn=o,qD(i.priority,function(){if(c.tag===13){var f=Mn(),p=Oi(c,f);p!==null&&bn(p,c,f),Op(c,f)}});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function ld(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Dp(i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);Ph=f,c.target.dispatchEvent(f),Ph=null}else return o=go(c),o!==null&&OE(o),i.blockedOn=c,!1;o.shift()}return!0}function LE(i,o,c){ld(i)&&c.delete(o)}function tj(){Lp=!1,Gi!==null&&ld(Gi)&&(Gi=null),Ki!==null&&ld(Ki)&&(Ki=null),Zi!==null&&ld(Zi)&&(Zi=null),Dl.forEach(LE),Il.forEach(LE)}function cd(i,o){i.blockedOn===o&&(i.blockedOn=null,Lp||(Lp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,tj)))}var ud=null;function jE(i){ud!==i&&(ud=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ud===i&&(ud=null);for(var o=0;o<i.length;o+=3){var c=i[o],f=i[o+1],p=i[o+2];if(typeof f!="function"){if(Ip(f||c)===null)continue;break}var x=go(c);x!==null&&(i.splice(o,3),o-=3,Sm(x,{pending:!0,data:p,method:c.method,action:f},f,p))}}))}function jl(i){function o(M){return cd(M,i)}Gi!==null&&cd(Gi,i),Ki!==null&&cd(Ki,i),Zi!==null&&cd(Zi,i),Dl.forEach(o),Il.forEach(o);for(var c=0;c<qi.length;c++){var f=qi[c];f.blockedOn===i&&(f.blockedOn=null)}for(;0<qi.length&&(c=qi[0],c.blockedOn===null);)IE(c),c.blockedOn===null&&qi.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(f=0;f<c.length;f+=3){var p=c[f],x=c[f+1],R=p[Tn]||null;if(typeof x=="function")R||jE(c);else if(R){var O=null;if(x&&x.hasAttribute("formAction")){if(p=x,R=x[Tn]||null)O=R.formAction;else if(Ip(p)!==null)continue}else O=R.action;typeof O=="function"?c[f+1]=O:(c.splice(f,3),f-=3),jE(c)}}}function jp(i){this._internalRoot=i}dd.prototype.render=jp.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var c=o.current,f=Mn();CE(c,f,i,o,null,null)},dd.prototype.unmount=jp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;i.tag===0&&Fo(),CE(i.current,2,null,i,null,null),Zu(),o[po]=null}};function dd(i){this._internalRoot=i}dd.prototype.unstable_scheduleHydration=function(i){if(i){var o=c0();i={blockedOn:null,target:i,priority:o};for(var c=0;c<qi.length&&o!==0&&o<qi[c].priority;c++);qi.splice(c,0,i),c===0&&IE(i)}};var ME=t.version;if(ME!=="19.0.0")throw Error(r(527,ME,"19.0.0"));re.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=X(o),i=i!==null?$(i):null,i=i===null?null:i.stateNode,i};var nj={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:V,findFiberByHostInstance:xa,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fd.isDisabled&&fd.supportsFiber)try{Wr=fd.inject(nj),en=fd}catch{}}return Pl.createRoot=function(i,o){if(!a(i))throw Error(r(299));var c=!1,f="",p=J_,x=ex,R=tx,O=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(p=o.onUncaughtError),o.onCaughtError!==void 0&&(x=o.onCaughtError),o.onRecoverableError!==void 0&&(R=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(O=o.unstable_transitionCallbacks)),o=TE(i,1,!1,null,null,c,f,p,x,R,O,null),i[po]=o.current,vp(i.nodeType===8?i.parentNode:i),new jp(o)},Pl.hydrateRoot=function(i,o,c){if(!a(i))throw Error(r(299));var f=!1,p="",x=J_,R=ex,O=tx,M=null,G=null;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(p=c.identifierPrefix),c.onUncaughtError!==void 0&&(x=c.onUncaughtError),c.onCaughtError!==void 0&&(R=c.onCaughtError),c.onRecoverableError!==void 0&&(O=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(M=c.unstable_transitionCallbacks),c.formState!==void 0&&(G=c.formState)),o=TE(i,1,!0,o,c??null,f,p,x,R,O,M,G),o.context=RE(null),c=o.current,f=Mn(),p=Pi(f),p.callback=null,zi(c,p,f),o.current.lanes=f,$s(o,f),kr(o),i[po]=o.current,vp(i),new dd(o)},Pl.version="19.0.0",Pl}var KE;function mj(){if(KE)return zp.exports;KE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zp.exports=hj(),zp.exports}var pj=mj();const gj={locales:["en","en-GB","fr","es","de","ja","ko","zh","it","pt","hi","ar","ru"],defaultLocale:"en"},yj={cookieName:"INTLAYER_LOCALE",prefixDefault:!1},vj={applicationURL:"http://localhost:5173/",editorURL:"http://localhost:8000",cmsURL:"https://intlayer.org",backendURL:"https://back.intlayer.org",port:8e3,enabled:!0,dictionaryPriorityStrategy:"local_first",hotReload:!1},qe={internationalization:gj,middleware:yj,editor:vj};var z=(e=>(e.AFRIKAANS="af",e.AFRIKAANS_SOUTH_AFRICA="af-ZA",e.ARABIC="ar",e.ARABIC_UNITED_ARAB_EMIRATES="ar-AE",e.ARABIC_BAHRAIN="ar-BH",e.ARABIC_ALGERIA="ar-DZ",e.ARABIC_EGYPT="ar-EG",e.ARABIC_IRAQ="ar-IQ",e.ARABIC_JORDAN="ar-JO",e.ARABIC_KUWAIT="ar-KW",e.ARABIC_LEBANON="ar-LB",e.ARABIC_LIBYA="ar-LY",e.ARABIC_MOROCCO="ar-MA",e.ARABIC_OMAN="ar-OM",e.ARABIC_QATAR="ar-QA",e.ARABIC_SAUDI_ARABIA="ar-SA",e.ARABIC_SYRIA="ar-SY",e.ARABIC_TUNISIA="ar-TN",e.ARABIC_YEMEN="ar-YE",e.AZERI_LATIN="az",e.AZERI_LATIN_AZERBAIJAN="az-AZ",e.BELARUSIAN="be",e.BELARUSIAN_BELARUS="be-BY",e.BULGARIAN="bg",e.BULGARIAN_BULGARIA="bg-BG",e.BOSNIAN="bs",e.BOSNIAN_BOSNIA_AND_HERZEGOVINA="bs-BA",e.CATALAN="ca",e.CATALAN_SPAIN="ca-ES",e.CZECH="cs",e.CZECH_CZECH_REPUBLIC="cs-CZ",e.WELSH="cy",e.WELSH_UNITED_KINGDOM="cy-GB",e.DANISH="da",e.DANISH_DENMARK="da-DK",e.GERMAN="de",e.GERMAN_AUSTRIA="de-AT",e.GERMAN_SWITZERLAND="de-CH",e.GERMAN_GERMANY="de-DE",e.GERMAN_LIECHTENSTEIN="de-LI",e.GERMAN_LUXEMBOURG="de-LU",e.DIVEHI="dv",e.DIVEHI_MALDIVES="dv-MV",e.GREEK="el",e.GREEK_GREECE="el-GR",e.ENGLISH="en",e.ENGLISH_AUSTRALIA="en-AU",e.ENGLISH_BELIZE="en-BZ",e.ENGLISH_CANADA="en-CA",e.ENGLISH_CARIBBEAN="en-CB",e.ENGLISH_UNITED_KINGDOM="en-GB",e.ENGLISH_IRELAND="en-IE",e.ENGLISH_JAMAICA="en-JM",e.ENGLISH_NEW_ZEALAND="en-NZ",e.ENGLISH_PHILIPPINES="en-PH",e.ENGLISH_TRINIDAD_AND_TOBAGO="en-TT",e.ENGLISH_UNITED_STATES="en-US",e.ENGLISH_SOUTH_AFRICA="en-ZA",e.ENGLISH_ZIMBABWE="en-ZW",e.ESPERANTO="eo",e.SPANISH="es",e.SPANISH_ARGENTINA="es-AR",e.SPANISH_BOLIVIA="es-BO",e.SPANISH_CHILE="es-CL",e.SPANISH_COLOMBIA="es-CO",e.SPANISH_COSTA_RICA="es-CR",e.SPANISH_DOMINICAN_REPUBLIC="es-DO",e.SPANISH_ECUADOR="es-EC",e.SPANISH_SPAIN="es-ES",e.SPANISH_GUATEMALA="es-GT",e.SPANISH_HONDURAS="es-HN",e.SPANISH_MEXICO="es-MX",e.SPANISH_NICARAGUA="es-NI",e.SPANISH_PANAMA="es-PA",e.SPANISH_PERU="es-PE",e.SPANISH_PUERTO_RICO="es-PR",e.SPANISH_PARAGUAY="es-PY",e.SPANISH_EL_SALVADOR="es-SV",e.SPANISH_URUGUAY="es-UY",e.SPANISH_VENEZUELA="es-VE",e.ESTONIAN="et",e.ESTONIAN_ESTONIA="et-EE",e.BASQUE="eu",e.BASQUE_SPAIN="eu-ES",e.FARSI="fa",e.FARSI_IRAN="fa-IR",e.FINNISH="fi",e.FINNISH_FINLAND="fi-FI",e.FAROESE="fo",e.FAROESE_FAROE_ISLANDS="fo-FO",e.FRENCH="fr",e.FRENCH_BELGIUM="fr-BE",e.FRENCH_CANADA="fr-CA",e.FRENCH_SWITZERLAND="fr-CH",e.FRENCH_FRANCE="fr-FR",e.FRENCH_LUXEMBOURG="fr-LU",e.FRENCH_PRINCIPALITY_OF_MONACO="fr-MC",e.GALICIAN="gl",e.GALICIAN_SPAIN="gl-ES",e.GUJARATI="gu",e.GUJARATI_INDIA="gu-IN",e.HEBREW="he",e.HEBREW_ISRAEL="he-IL",e.HINDI="hi",e.HINDI_INDIA="hi-IN",e.CROATIAN="hr",e.CROATIAN_BOSNIA_AND_HERZEGOVINA="hr-BA",e.CROATIAN_CROATIA="hr-HR",e.HUNGARIAN="hu",e.HUNGARIAN_HUNGARY="hu-HU",e.ARMENIAN="hy",e.ARMENIAN_ARMENIA="hy-AM",e.INDONESIAN="id",e.INDONESIAN_INDONESIA="id-ID",e.ICELANDIC="is",e.ICELANDIC_ICELAND="is-IS",e.ITALIAN="it",e.ITALIAN_SWITZERLAND="it-CH",e.ITALIAN_ITALY="it-IT",e.JAPANESE="ja",e.JAPANESE_JAPAN="ja-JP",e.GEORGIAN="ka",e.GEORGIAN_GEORGIA="ka-GE",e.KAZAKH="kk",e.KAZAKH_KAZAKHSTAN="kk-KZ",e.KANNADA="kn",e.KANNADA_INDIA="kn-IN",e.KOREAN="ko",e.KOREAN_KOREA="ko-KR",e.KONKANI="kok",e.KONKANI_INDIA="kok-IN",e.KYRGYZ="ky",e.KYRGYZ_KYRGYZSTAN="ky-KG",e.LITHUANIAN="lt",e.LITHUANIAN_LITHUANIA="lt-LT",e.LATVIAN="lv",e.LATVIAN_LATVIA="lv-LV",e.MAORI="mi",e.MAORI_NEW_ZEALAND="mi-NZ",e.FYRO_MACEDONIAN="mk",e.FYRO_MACEDONIAN_MACEDONIA="mk-MK",e.MONGOLIAN="mn",e.MONGOLIAN_MONGOLIA="mn-MN",e.MARATHI="mr",e.MARATHI_INDIA="mr-IN",e.MALAY="ms",e.MALAY_BRUNEI_DARUSSALAM="ms-BN",e.MALAY_MALAYSIA="ms-MY",e.MALTESE="mt",e.MALTESE_MALTA="mt-MT",e.NORWEGIAN_BOKMAL="nb",e.NORWEGIAN_BOKMAL_NORWAY="nb-NO",e.DUTCH="nl",e.DUTCH_BELGIUM="nl-BE",e.DUTCH_NETHERLANDS="nl-NL",e.NORWEGIAN_NYNORSK_NORWAY="nn-NO",e.NORTHERN_SOTHO="ns",e.NORTHERN_SOTHO_SOUTH_AFRICA="ns-ZA",e.PUNJABI="pa",e.PUNJABI_INDIA="pa-IN",e.POLISH="pl",e.POLISH_POLAND="pl-PL",e.PASHTO="ps",e.PASHTO_AFGHANISTAN="ps-AR",e.PORTUGUESE="pt",e.PORTUGUESE_BRAZIL="pt-BR",e.PORTUGUESE_PORTUGAL="pt-PT",e.QUECHUA="qu",e.QUECHUA_BOLIVIA="qu-BO",e.QUECHUA_ECUADOR="qu-EC",e.QUECHUA_PERU="qu-PE",e.ROMANIAN="ro",e.ROMANIAN_ROMANIA="ro-RO",e.RUSSIAN="ru",e.RUSSIAN_RUSSIA="ru-RU",e.SANSKRIT="sa",e.SANSKRIT_INDIA="sa-IN",e.SAMI_NORTHERN="se",e.SAMI_NORTHERN_FINLAND="se-FI",e.SAMI_NORTHERN_NORWAY="se-NO",e.SAMI_NORTHERN_SWEDEN="se-SE",e.SLOVAK="sk",e.SLOVAK_SLOVAKIA="sk-SK",e.SLOVENIAN="sl",e.SLOVENIAN_SLOVENIA="sl-SI",e.ALBANIAN="sq",e.ALBANIAN_ALBANIA="sq-AL",e.SERBIAN_LATIN="sr",e.SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA="sr-BA",e.SERBIAN_LATIN_SERBIA_AND_MONTENEGRO="sr-SP",e.SWEDISH="sv",e.SWEDISH_FINLAND="sv-FI",e.SWEDISH_SWEDEN="sv-SE",e.SWAHILI="sw",e.SWAHILI_KENYA="sw-KE",e.SYRIAC="syr",e.SYRIAC_SYRIA="syr-SY",e.TAMIL="ta",e.TAMIL_INDIA="ta-IN",e.TELUGU="te",e.TELUGU_INDIA="te-IN",e.THAI="th",e.THAI_THAILAND="th-TH",e.TAGALOG="tl",e.TAGALOG_PHILIPPINES="tl-PH",e.TSWANA="tn",e.TSWANA_SOUTH_AFRICA="tn-ZA",e.TURKISH="tr",e.TURKISH_TURKEY="tr-TR",e.TATAR="tt",e.TATAR_RUSSIA="tt-RU",e.TSOGA="ts",e.UKRAINIAN="uk",e.UKRAINIAN_UKRAINE="uk-UA",e.URDU="ur",e.URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN="ur-PK",e.UZBEK_LATIN="uz",e.UZBEK_LATIN_UZBEKISTAN="uz-UZ",e.VIETNAMESE="vi",e.VIETNAMESE_VIET_NAM="vi-VN",e.XHOSA="xh",e.XHOSA_SOUTH_AFRICA="xh-ZA",e.CHINESE="zh",e.CHINESE_SIMPLIFIED="zh-Hans",e.CHINESE_SIMPLIFIED_CHINA="zh-CN",e.CHINESE_HONG_KONG="zh-HK",e.CHINESE_MACAU="zh-MO",e.CHINESE_SINGAPORE="zh-SG",e.CHINESE_TRADITIONAL="zh-Hant",e.ZULU="zu",e.ZULU_SOUTH_AFRICA="zu-ZA",e))(z||{}),Z=(e=>(e.Translation="translation",e.Enumeration="enumeration",e.Condition="condition",e.Insertion="insertion",e.File="file",e.Object="object",e.Array="array",e.Nested="nested",e.ReactNode="reactNode",e.Markdown="markdown",e.Text="text",e.Number="number",e.Boolean="boolean",e.Unknown="unknown",e))(Z||{});const bj=(e,t,n)=>({...n,nodeType:e,[e]:t}),ZE=(e,t,n)=>{let r=e,a=null,s=[];if(t.length===0)return n;for(let l=0;l<t.length;l++){const u=t[l];if(a=r,(u.type===Z.Object||u.type===Z.Array)&&(s=[u.key],(!r[u.key]||typeof r[u.key]!="object")&&(r[u.key]={}),r=r[u.key]),(u.type===Z.Translation||u.type===Z.Enumeration)&&(s=[u.type,u.key],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]={}),(!r[u.type][u.key]||typeof r[u.type][u.key]!="object")&&(r[u.type][u.key]={}),r=r[u.type][u.key]),(u.type===Z.Enumeration||u.type===Z.Condition)&&(s=[u.type,u.key],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]={}),(!r[u.type][u.key]||typeof r[u.type][u.key]!="object")&&(r[u.type][u.key]={}),r=r[u.type][u.key]),(u.type===Z.Markdown||u.type===Z.Insertion)&&(s=[u.type],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]=""),r=r[u.type]),u.type===Z.File&&(s=["content"],r=r.content),u.type&&(r=r),l===t.length-1&&a&&s.length>0){let d=a;for(const h of s.slice(0,-1))d=d[h];typeof n>"u"?delete d[s[s.length-1]]:d[s[s.length-1]]=n}}return e},Pr=(e,t)=>{let n=structuredClone(e);for(const r of t)r.type===Z.Object||r.type===Z.Array?n=n==null?void 0:n[r.key]:r.type===Z.Translation||r.type===Z.Condition||r.type===Z.Enumeration?n=n==null?void 0:n[r.type][r.key]:(r.type===Z.Markdown||r.type===Z.Insertion||r.type===Z.File)&&(n=n==null?void 0:n[r.type]);return n},LT=e=>{if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof(e==null?void 0:e.nodeType)=="string"){const t=e,n=t[t.nodeType];if(t.nodeType===Z.Translation||t.nodeType===Z.Enumeration||t.nodeType===Z.Condition||t.nodeType===Z.Insertion||t.nodeType===Z.File){const r=Object.keys(n)[0];return n[r]}return t.nodeType===Z.Nested?void 0:n}return!e||typeof e!="object"?e:Array.isArray(e)?e[0]:e},_j=(e,t,n)=>{let r=e,a=null,s=null;for(const l of n)a=r,(l.type===Z.Object||l.type===Z.Array)&&(s=l.key,r=r[l.key]),(l.type===Z.Translation||l.type===Z.Enumeration||l.type===Z.Condition)&&(s=l.type,r=r[l.type][l.key]),(l.type===Z.Markdown||l.type===Z.ReactNode||l.type===Z.Insertion||l.type===Z.File)&&(s=l.type,r=r[l.type]);if(a&&s!==null)if(Array.isArray(a))a[s]=r;else{const l={};for(const u of Object.keys(a))u===s&&typeof t<"u"?l[t]=r:l[u]=a[u];Object.keys(a).forEach(u=>delete a[u]),Object.assign(a,l)}return e},xj=e=>typeof e=="object"&&typeof(e==null?void 0:e.key)<"u"&&typeof(e==null?void 0:e.props)<"u",As=e=>typeof e=="string"?Z.Text:typeof(e==null?void 0:e.nodeType)=="string"?e.nodeType:Array.isArray(e)?Z.Array:xj(e)?Z.ReactNode:typeof e=="number"?Z.Number:typeof e=="boolean"?Z.Boolean:e&&typeof e=="object"?Z.Object:Z.Unknown,zl=(e,t,n)=>{const r=structuredClone(n);switch(e){case Z.Translation:return{nodeType:Z.Translation,[Z.Translation]:Object.assign({},...t.map(a=>({[a]:structuredClone(r)??""})))};case Z.Enumeration:return{nodeType:Z.Enumeration,[Z.Enumeration]:{1:r??""}};case Z.Condition:return{nodeType:Z.Condition,[Z.Condition]:{true:r??"",false:r??""}};case Z.Insertion:return{nodeType:Z.Insertion,[Z.Insertion]:{insertion:r??""}};case Z.Nested:return{nodeType:Z.Nested,[Z.Nested]:{dictionaryKey:""}};case Z.Markdown:return{nodeType:Z.Markdown,[Z.Markdown]:r??""};case Z.File:return{nodeType:Z.File,[Z.File]:r??""};case Z.Object:return{newKey:r??""};case Z.Array:return[r??""];case Z.Text:return r??"";case Z.Number:return r??0;case Z.Boolean:return r??!0;default:return r??""}},ar=e=>{if(typeof e=="string")return"";if(typeof e=="number")return 0;if(typeof e=="boolean")return!0;if(typeof(e==null?void 0:e.nodeType)=="string"){const r=e,a=r[r.nodeType];return r.nodeType===Z.Translation||r.nodeType===Z.Enumeration||r.nodeType===Z.Condition||r.nodeType===Z.Insertion?ar(a):r.nodeType===Z.Nested?"dictionary-key":r.nodeType===Z.File?"file/path":r.nodeType===Z.Markdown?ar(r):a}if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(ar);const t=Object.entries(e).map(([r,a])=>[r,ar(a)]);return Object.fromEntries(t)},$d=(e,t)=>{for(const r of t.plugins??[])if(r.canHandle(e))return r.transform(e,t,(a,s)=>$d(a,s));if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map((r,a)=>{const s={...t,children:r,keyPath:[...t.keyPath,{type:Z.Array,key:a}]};return $d(r,s)});const n={};for(const r in e){const a={...t,children:e[r],keyPath:[...t.keyPath,{type:Z.Object,key:r}]};n[r]=$d(e[r],a)}return n},Ej=(e,t)=>{const n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},Sj=(e,t)=>{const n=Object.keys(e);for(const r of n){const a=!r.startsWith(">")&&!r.startsWith("<")&&!r.startsWith("=")&&parseFloat(r)===t||r.startsWith("=")&&parseFloat(r.slice(1))===t,s=r.startsWith(">")&&t>parseFloat(r.slice(1)),l=r.startsWith(">=")&&t>=parseFloat(r.slice(2)),u=r.startsWith("<")&&t<parseFloat(r.slice(1)),d=r.startsWith("<=")&&t<=parseFloat(r.slice(2));if(a||s||l||u||d)return r}},Aj=(e,t)=>{const n=Sj(e,t)??"fallback";return e[n]},wj=(e,t)=>e.replace(/\{\{(.*?)\}\}/g,(n,r)=>(t[r]??"").toString()),qE={},jT=(e,t,n)=>{const r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return uv(e.content,r,t)},Tj=(e,t,n)=>{const r=qE[e];if(!r)throw new Error(`Dictionary ${e} not found`,qE);return jT(r,t,n)},Rj=(e,t,n)=>{const r=Tj(e,n==null?void 0:n.locale,n==null?void 0:n.plugins);if(typeof t=="string"){const a=t.split(".");let s=r;for(const l of a)if(s=s==null?void 0:s[l],s===void 0)return r;return s}return r},Cj=(e,t,n=!0)=>{const{defaultLocale:r}=qe==null?void 0:qe.internationalization;let a=e[t??r];return n&&!a&&(a=e[r]),a},Nj=(e,t=!0)=>({id:"translation-plugin",canHandle:n=>typeof n=="object"&&(n==null?void 0:n.nodeType)===Z.Translation,transform:(n,r,a)=>{const s=structuredClone(n[Z.Translation]);for(const l in s){const u={...r,children:s[l],keyPath:[...r.keyPath,{type:Z.Translation,key:l}]};s[l]=a(s[l],u)}return Cj(s,e,t)}}),Oj={id:"enumeration-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===Z.Enumeration,transform:(e,t,n)=>{const r=structuredClone(e[Z.Enumeration]);for(const a in r){const s=r[a],l={...t,children:s,keyPath:[...t.keyPath,{type:Z.Enumeration,key:a}]};r[a]=n(s,l)}return a=>Aj(r,a)}},kj={id:"condition-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===Z.Condition,transform:(e,t,n)=>{const r=structuredClone(e[Z.Condition]);for(const a in r){const s=r[a],l={...t,children:s,keyPath:[...t.keyPath,{type:Z.Condition,key:a}]};r[a]=n(s,l)}return a=>Ej(r,a)}},Dj={id:"insertion-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===Z.Insertion,transform:(e,t,n)=>{const r=[...t.keyPath,{type:Z.Insertion}],a=e[Z.Insertion];return n(a,{...t,children:a,keyPath:r,plugins:[{id:"insertion-string-plugin",canHandle:l=>typeof l=="string",transform:(l,u,d)=>{const h=d(l,{...u,children:l,plugins:[...(t.plugins??[]).filter(m=>m.id!=="intlayer-node-plugin")]});return m=>{const y=wj(h,m);return d(y,{...u,plugins:t.plugins,children:y})}}},...t.plugins??[]]})}},Ij={id:"nested-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===Z.Nested,transform:(e,t)=>Rj(e.nested.dictionaryKey,e.nested.path,t)},Lj={id:"file-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===Z.File,transform:(e,t,n)=>n(e.content,{...t,children:e.content})},uv=(e,t,n=qe.internationalization.defaultLocale)=>{const r=[Dj,Nj(n),Oj,kj,Ij,Lj,...t.plugins??[]];return $d(e,{...t,plugins:r})},WE={method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"},jj=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),hd=e=>e.reduce((t,n)=>{const r=t??{},a=jj(n??{});return typeof r=="object"&&typeof a=="object"?{...r,...a}:a??r},{}),Te=async(e,...t)=>{const{signal:n}=new AbortController;let r="",a;const s=t.map(({body:v,params:_,headers:S,...A})=>A),l=hd([WE,...s]),u=hd([WE.headers,...t.map(v=>v.headers)]),d=hd(t.map(v=>v.params)),h=l.method;if(h!=="GET"&&h!=="HEAD"){const v=hd(t.map(_=>_.body));(u==null?void 0:u["Content-Type"])==="application/x-www-form-urlencoded"?a=new URLSearchParams(v).toString():a=JSON.stringify(v)}Object.entries(d).length>0&&(r=`?${new URLSearchParams(d).toString()}`);const m={...l,headers:u,body:a,signal:n},y=`${e}${r}`,g=await fetch(y,m);if(!g.ok){const v=await g.json();throw new Error(JSON.stringify(v.error)??"An error occurred")}return await g.json()},Mj=(e={},t)=>{var N,L;const n=((N=t==null?void 0:t.editor)==null?void 0:N.backendURL)??((L=qe.editor)==null?void 0:L.backendURL),{clientId:r,clientSecret:a}=(t==null?void 0:t.editor)??{};if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const s=`${n}/api/auth`;return{login:async(D,j={})=>await Te(`${s}/login`,e,j,{method:"POST",body:D}),getLoginWithGitHubURL:D=>{const j=new URLSearchParams(D);return`${s}/login/github?${j.toString()}`},getLoginWithGoogleURL:D=>{const j=new URLSearchParams(D);return`${s}/login/google?${j.toString()}`},register:async(D,j={},V={})=>await Te(`${s}/register`,e,V,{method:"POST",body:D,params:j}),logout:async(D={})=>await Te(`${s}/logout`,e,D,{method:"POST"}),defineNewPassword:async(D,j={})=>await Te(`${s}/password/define`,e,j,{method:"POST",body:D}),askResetPassword:async(D,j={})=>await Te(`${s}/password/reset`,e,j,{method:"POST",body:{email:D}}),checkIfUserHasPassword:async(D={})=>await Te(`${s}/password/has`,e,D,{method:"GET"}),verifyEmail:async({userId:D,secret:j},V={})=>await Te(`${s}/active/${D}/${j}`,e,V,{method:"PUT"}),getVerifyEmailStatusURL:D=>`${s}/verify-email-status/${String(D)}`,changePassword:async(D,j={})=>await Te(`${s}/password`,e,j,{method:"PUT",body:D}),createSession:async(D,j={})=>await Te(`${s}/session`,e,j,{method:"POST",body:D}),getSession:async(D,j={})=>await Te(`${n}/session`,e,j,{params:{session_token:D}}),getCSRFToken:async(D={})=>await Te(`${n}/csrf-token`,e,D),getOAuth2AccessToken:async(D={})=>await Te(`${n}/oauth2/token`,e,D,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:{grant_type:"client_credentials",client_id:r,client_secret:a}})}},Pj=(e={},t)=>{var y,g;const n=((y=t==null?void 0:t.editor)==null?void 0:y.backendURL)??((g=qe.editor)==null?void 0:g.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/dictionary`;return{getDictionaries:async(v,_={})=>await Te(r,e,_,{params:v}),getDictionariesKeys:async(v={})=>await Te(`${r}/keys`,e,v),getDictionary:async(v,_,S={})=>await Te(`${r}/${v}`,e,S,{params:_?{version:_.toString()}:void 0}),pushDictionaries:async(v,_={})=>await Te(`${r}`,e,_,{method:"PATCH",body:{dictionaries:v}}),addDictionary:async(v,_={})=>await Te(`${r}`,e,_,{method:"POST",body:v}),updateDictionary:async(v,_,S={})=>await Te(`${r}/${v}`,e,S,{method:"PUT",body:_}),deleteDictionary:async(v,_={})=>await Te(`${r}/${v}`,e,_,{method:"DELETE"})}},zj=(e={},t)=>{var y,g;const n=((y=t==null?void 0:t.editor)==null?void 0:y.backendURL)??((g=qe.editor)==null?void 0:g.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/ai`;return{translateJSON:async(v,_={})=>await Te(`${r}/translate/json`,e,_,{method:"POST",body:v}),auditContentDeclaration:async(v,_={})=>await Te(`${r}/audit/dictionary`,e,_,{method:"POST",body:v}),auditContentDeclarationField:async(v,_={})=>await Te(`${r}/audit/dictionary/field`,e,_,{method:"POST",body:v}),auditContentDeclarationMetadata:async(v,_={})=>await Te(`${r}/audit/dictionary/metadata`,e,_,{method:"POST",body:v}),auditTag:async(v,_={})=>await Te(`${r}/audit/tag`,e,_,{method:"POST",body:v}),askDocQuestion:async(v,_={})=>{var C;if(!v)return;const{onMessage:S,onDone:A,...w}=v,T=new AbortController;try{const k=await fetch(`${r}/ask`,{method:"POST",headers:{"Content-Type":"application/json",...e.headers,..._.headers},body:JSON.stringify(w),signal:T.signal});if(!k.ok){const j=await k.json().catch(()=>({}));throw new Error(j.message||"Failed to fetch response")}const N=(C=k.body)==null?void 0:C.getReader();if(!N)throw new Error("No reader available");const L=new TextDecoder;let D="";for(;;){const{done:j,value:V}=await N.read();if(j)break;D+=L.decode(V,{stream:!0});const U=D.split(`
|
|
51
|
-
`);D=U.pop()??"";for(const ue of U)if(ue.startsWith("data: "))try{const ie=JSON.parse(ue.slice(6));ie.chunk&&(S==null||S(ie.chunk)),ie.done&&ie.response&&(A==null||A(ie.response))}catch(ie){console.error("Failed to parse SSE data:",ie)}}}catch(k){throw console.error("Error in askDocQuestion:",k),k}},autocomplete:async(v,_={})=>await Te(`${r}/autocomplete`,e,_,{method:"POST",body:v})}},Vj=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.editorURL)??((d=qe.editor)==null?void 0:d.editorURL);if(!n)throw new Error("Editor URL is not defined in the Intlayer configuration.");const r=`${n}/api`;return{getDictionaries:async(h={})=>(await Te(`${r}/dictionary`,e,h)).data,getConfiguration:async(h={})=>(await Te(`${r}/config`,e,h)).data,writeDictionary:async(h,m={})=>await Te(`${r}/dictionary`,e,m,{method:"POST",body:{dictionary:h}})}},Bj=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.backendURL)??((d=qe.editor)==null?void 0:d.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/newsletter`;return{subscribeToNewsletter:async(h,m={})=>await Te(`${r}/subscribe`,e,m,{method:"POST",body:h}),unsubscribeFromNewsletter:async(h,m={})=>await Te(`${r}/unsubscribe`,e,m,{method:"POST",body:h}),getNewsletterStatus:async(h={})=>await Te(`${r}/status`,e,h,{method:"GET"})}},Uj=(e={},t)=>{var v,_;const n=((v=t==null?void 0:t.editor)==null?void 0:v.backendURL)??((_=qe.editor)==null?void 0:_.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration--.");const r=`${n}/api/organization`;return{getOrganizations:async(S,A={})=>await Te(r,e,A,{params:S}),getOrganization:async(S,A={})=>await Te(`${r}/${String(S)}`,e,A),addOrganization:async(S,A={})=>await Te(r,e,A,{method:"POST",body:S}),addOrganizationMember:async(S,A={})=>Te(`${r}/member`,e,A,{method:"POST",body:S}),updateOrganization:async(S,A={})=>Te(r,e,A,{method:"PUT",body:S}),updateOrganizationMembers:async(S,A={})=>Te(`${r}/members`,e,A,{method:"PUT",body:S}),deleteOrganization:async(S={})=>await Te(r,e,S,{method:"DELETE"}),selectOrganization:async(S,A={})=>await Te(`${r}/${String(S)}`,e,A,{method:"PUT"}),unselectOrganization:async(S={})=>await Te(`${r}/logout`,e,S,{method:"POST"})}},$j=(e={},t)=>{var S,A;const n=((S=t==null?void 0:t.editor)==null?void 0:S.backendURL)??((A=qe.editor)==null?void 0:A.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/project`;return{getProjects:async(w,T={})=>await Te(r,e,T,{params:w}),addProject:async(w,T={})=>await Te(`${r}`,e,T,{method:"POST",body:w}),updateProject:async(w,T={})=>await Te(`${r}`,e,T,{method:"PUT",body:w}),updateProjectMembers:async(w,T={})=>await Te(`${r}/members`,e,T,{method:"PUT",body:w}),pushProjectConfiguration:async(w,T={})=>await Te(`${r}/configuration`,e,T,{method:"PUT",body:w}),deleteProject:async(w={})=>await Te(`${r}`,e,w,{method:"DELETE"}),selectProject:async(w,T={})=>await Te(`${r}/${String(w)}`,e,T,{method:"PUT"}),unselectProject:async(w={})=>await Te(`${r}/logout`,e,w,{method:"POST"}),addNewAccessKey:async(w,T={})=>await Te(`${r}/access_key`,e,T,{method:"POST",body:w}),deleteAccessKey:async(w,T={})=>await Te(`${r}/access_key`,e,T,{method:"DELETE",body:{clientId:w}}),refreshAccessKey:async(w,T={})=>await Te(`${r}/access_key`,e,T,{method:"PATCH",body:{clientId:w}})}},Hj=(e={},t)=>{var s,l;const n=((s=t==null?void 0:t.editor)==null?void 0:s.backendURL)??((l=qe.editor)==null?void 0:l.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/search`;return{searchDoc:async(u,d={})=>await Te(`${r}/doc`,e,d,{method:"GET",params:u})}},Fj=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.backendURL)??((d=qe.editor)==null?void 0:d.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/stripe`;return{getPricing:async(h,m={})=>await Te(`${r}/pricing`,e,m,{method:"POST",body:h}),getSubscription:async(h,m={})=>await Te(`${r}/create-subscription`,e,m,{method:"POST",body:h}),cancelSubscription:async(h={})=>await Te(`${r}/cancel-subscription`,e,h,{method:"POST"})}},Gj=(e={},t)=>{var d,h;const n=((d=t==null?void 0:t.editor)==null?void 0:d.backendURL)??((h=qe.editor)==null?void 0:h.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/tag`;return{getTags:async(m,y={})=>await Te(r,e,y,{params:m}),addTag:async(m,y={})=>await Te(`${r}`,e,y,{method:"POST",body:m}),updateTag:async(m,y,g={})=>await Te(`${r}/${m}`,e,g,{method:"PUT",body:y}),deleteTag:async(m,y={})=>await Te(`${r}/${m}`,e,y,{method:"DELETE"})}},Kj=(e={},t)=>{var y,g;const n=((y=t==null?void 0:t.editor)==null?void 0:y.backendURL)??((g=qe.editor)==null?void 0:g.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/user`;return{createUser:async(v,_={})=>await Te(`${r}/`,e,_,{method:"POST",body:v}),getUsers:async(v,_={})=>await Te(r,e,_,{params:v}),getUserById:async(v,_={})=>await Te(`${r}/${v}`,e,_),getUserByAccount:async(v,_,S={})=>await Te(`${r}/account/${_}/${v}`,e,S),getUserByEmail:async(v,_={})=>await Te(`${r}/email/${v}`,e,_),updateUser:async(v,_={})=>await Te(`${r}`,e,_,{method:"PUT",body:v}),deleteUser:async(v,_={})=>await Te(`${r}/${v}`,e,_,{method:"DELETE"})}},Ff=(e={},t)=>({organization:Uj(e,t),project:$j(e,t),user:Kj(e,t),auth:Mj(e,t),dictionary:Pj(e,t),stripe:Fj(e,t),ai:zj(e,t),tag:Gj(e,t),search:Hj(e,t),editor:Vj(e,t),newsletter:Bj(e,t)}),Zj=e=>{switch(e){case z.ENGLISH:case z.FRENCH:case z.SPANISH:case z.PORTUGUESE:case z.GERMAN:case z.AFRIKAANS:case z.AZERI_LATIN:case z.BELARUSIAN:case z.BULGARIAN:case z.BOSNIAN:case z.CATALAN:case z.CZECH:case z.WELSH:case z.DANISH:case z.ESPERANTO:case z.ESTONIAN:case z.BASQUE:case z.FINNISH:case z.FAROESE:case z.GALICIAN:case z.GREEK:case z.CROATIAN:case z.HUNGARIAN:case z.ARMENIAN:case z.INDONESIAN:case z.ICELANDIC:case z.ITALIAN:case z.JAPANESE:case z.GEORGIAN:case z.KAZAKH:case z.KANNADA:case z.KOREAN:case z.KONKANI:case z.KYRGYZ:case z.LITHUANIAN:case z.LATVIAN:case z.MAORI:case z.FYRO_MACEDONIAN:case z.MONGOLIAN:case z.MARATHI:case z.MALAY:case z.MALTESE:case z.NORWEGIAN_BOKMAL:case z.DUTCH:case z.NORTHERN_SOTHO:case z.PUNJABI:case z.POLISH:case z.QUECHUA:case z.ROMANIAN:case z.RUSSIAN:case z.SANSKRIT:case z.SAMI_NORTHERN:case z.SLOVAK:case z.SLOVENIAN:case z.ALBANIAN:case z.SERBIAN_LATIN:case z.SWEDISH:case z.SWAHILI:case z.TAMIL:case z.TELUGU:case z.THAI:case z.TAGALOG:case z.TSWANA:case z.TURKISH:case z.UKRAINIAN:case z.UZBEK_LATIN:case z.VIETNAMESE:case z.XHOSA:case z.CHINESE_SIMPLIFIED:case z.CHINESE_TRADITIONAL:case z.ZULU:case z.AFRIKAANS_SOUTH_AFRICA:case z.AZERI_LATIN_AZERBAIJAN:case z.BELARUSIAN_BELARUS:case z.BULGARIAN_BULGARIA:case z.BOSNIAN_BOSNIA_AND_HERZEGOVINA:case z.CATALAN_SPAIN:case z.CZECH_CZECH_REPUBLIC:case z.WELSH_UNITED_KINGDOM:case z.DANISH_DENMARK:case z.GERMAN_AUSTRIA:case z.GERMAN_SWITZERLAND:case z.GERMAN_GERMANY:case z.GERMAN_LIECHTENSTEIN:case z.GERMAN_LUXEMBOURG:case z.GREEK_GREECE:case z.ENGLISH_AUSTRALIA:case z.ENGLISH_BELIZE:case z.ENGLISH_CANADA:case z.ENGLISH_CARIBBEAN:case z.ENGLISH_UNITED_KINGDOM:case z.ENGLISH_IRELAND:case z.ENGLISH_JAMAICA:case z.ENGLISH_NEW_ZEALAND:case z.ENGLISH_PHILIPPINES:case z.ENGLISH_TRINIDAD_AND_TOBAGO:case z.ENGLISH_UNITED_STATES:case z.ENGLISH_SOUTH_AFRICA:case z.ENGLISH_ZIMBABWE:case z.SPANISH_ARGENTINA:case z.SPANISH_BOLIVIA:case z.SPANISH_CHILE:case z.SPANISH_COLOMBIA:case z.SPANISH_COSTA_RICA:case z.SPANISH_DOMINICAN_REPUBLIC:case z.SPANISH_ECUADOR:case z.SPANISH_SPAIN:case z.SPANISH_GUATEMALA:case z.SPANISH_HONDURAS:case z.SPANISH_MEXICO:case z.SPANISH_NICARAGUA:case z.SPANISH_PANAMA:case z.SPANISH_PERU:case z.SPANISH_PUERTO_RICO:case z.SPANISH_PARAGUAY:case z.SPANISH_EL_SALVADOR:case z.SPANISH_URUGUAY:case z.SPANISH_VENEZUELA:case z.ESTONIAN_ESTONIA:case z.BASQUE_SPAIN:case z.FINNISH_FINLAND:case z.FAROESE_FAROE_ISLANDS:case z.FRENCH_BELGIUM:case z.FRENCH_CANADA:case z.FRENCH_SWITZERLAND:case z.FRENCH_FRANCE:case z.FRENCH_LUXEMBOURG:case z.FRENCH_PRINCIPALITY_OF_MONACO:case z.GALICIAN_SPAIN:case z.GUJARATI_INDIA:case z.HEBREW_ISRAEL:case z.HINDI_INDIA:case z.CROATIAN_BOSNIA_AND_HERZEGOVINA:case z.CROATIAN_CROATIA:case z.HUNGARIAN_HUNGARY:case z.ARMENIAN_ARMENIA:case z.INDONESIAN_INDONESIA:case z.ICELANDIC_ICELAND:case z.ITALIAN_SWITZERLAND:case z.ITALIAN_ITALY:case z.JAPANESE_JAPAN:case z.GEORGIAN_GEORGIA:case z.KAZAKH_KAZAKHSTAN:case z.KANNADA_INDIA:case z.KOREAN_KOREA:case z.KONKANI_INDIA:case z.KYRGYZ_KYRGYZSTAN:case z.LITHUANIAN_LITHUANIA:case z.LATVIAN_LATVIA:case z.MAORI_NEW_ZEALAND:case z.FYRO_MACEDONIAN_MACEDONIA:case z.MONGOLIAN_MONGOLIA:case z.MARATHI_INDIA:case z.MALAY_BRUNEI_DARUSSALAM:case z.MALAY_MALAYSIA:case z.MALTESE_MALTA:case z.NORWEGIAN_BOKMAL_NORWAY:case z.DUTCH_BELGIUM:case z.DUTCH_NETHERLANDS:case z.NORWEGIAN_NYNORSK_NORWAY:case z.NORTHERN_SOTHO_SOUTH_AFRICA:case z.PUNJABI_INDIA:case z.POLISH_POLAND:case z.PORTUGUESE_BRAZIL:case z.PORTUGUESE_PORTUGAL:case z.QUECHUA_BOLIVIA:case z.QUECHUA_ECUADOR:case z.QUECHUA_PERU:case z.ROMANIAN_ROMANIA:case z.RUSSIAN_RUSSIA:case z.SANSKRIT_INDIA:case z.SAMI_NORTHERN_FINLAND:case z.SAMI_NORTHERN_NORWAY:case z.SAMI_NORTHERN_SWEDEN:case z.SLOVAK_SLOVAKIA:case z.SLOVENIAN_SLOVENIA:case z.ALBANIAN_ALBANIA:case z.SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA:case z.SERBIAN_LATIN_SERBIA_AND_MONTENEGRO:case z.SWAHILI_KENYA:case z.TAMIL_INDIA:case z.TELUGU_INDIA:case z.THAI_THAILAND:case z.TAGALOG_PHILIPPINES:case z.TSWANA_SOUTH_AFRICA:case z.TURKISH_TURKEY:case z.TATAR_RUSSIA:case z.TSOGA:case z.UKRAINIAN_UKRAINE:case z.UZBEK_LATIN_UZBEKISTAN:case z.VIETNAMESE_VIET_NAM:case z.XHOSA_SOUTH_AFRICA:case z.CHINESE_HONG_KONG:case z.CHINESE_MACAU:case z.CHINESE_SINGAPORE:case z.ZULU_SOUTH_AFRICA:return"ltr";case z.ARABIC:case z.FARSI:case z.URDU:case z.PASHTO:case z.SYRIAC:case z.ARABIC_UNITED_ARAB_EMIRATES:case z.ARABIC_BAHRAIN:case z.ARABIC_ALGERIA:case z.ARABIC_EGYPT:case z.ARABIC_IRAQ:case z.ARABIC_JORDAN:case z.ARABIC_KUWAIT:case z.ARABIC_LEBANON:case z.ARABIC_LIBYA:case z.ARABIC_MOROCCO:case z.ARABIC_OMAN:case z.ARABIC_QATAR:case z.ARABIC_SAUDI_ARABIA:case z.ARABIC_SYRIA:case z.ARABIC_TUNISIA:case z.ARABIC_YEMEN:case z.FARSI_IRAN:case z.URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN:case z.PASHTO_AFGHANISTAN:case z.SYRIAC_SYRIA:return"rtl";default:return"auto"}},MT=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),YE=new Map,Hd=(e,t=e)=>{if(typeof(Intl==null?void 0:Intl.DisplayNames)!="function")return e;let n=YE.get(t);return n||(n=new Intl.DisplayNames([t],{type:"language"}),YE.set(t,n)),n.of(e)??"Unknown locale"},qj=(e,t=qe.internationalization.locales)=>{const n=MT(e);let r=e;e.endsWith("/")&&(r=e.slice(0,-1));const a=n?new URL(r):new URL(r,"http://example.com"),s=a.pathname;s.startsWith("/")||(a.pathname=`/${s}`);const l=s.split("/"),u=l[1];if(t.includes(u)){l.splice(1,1);const d=l.join("/")??"/";a.pathname=d}return n?a.toString():a.toString().replace("http://example.com","")},Wj=(e,t=qe.internationalization.locales,n=qe.internationalization.defaultLocale,r=qe.middleware.prefixDefault)=>{const a=qj(e,t),s=MT(a),l=s?new URL(a):new URL(a,"http://example.com");let u=l.pathname;u.startsWith("/")||(u=`/${u}`);const d=s?`${l.protocol}//${l.host}`:"";return t.reduce((m,y)=>{const g=y.toString()===n.toString();let _=r||!g?`/${y}${u}`:u;_.length>1&&_.endsWith("/")&&(_=_.slice(0,-1));const S=s?`${d}${_}${l.search}${l.hash}`:`${_}${l.search}${l.hash}`;return m[y]=S,m},{})},Yj=(e,t,n=qe.internationalization.locales,r=qe.internationalization.defaultLocale,a=qe.middleware.prefixDefault)=>Wj(e,n,r,a)[t],Xj=(e,t=qe.internationalization.locales,n=qe.internationalization.defaultLocale)=>{const r=[e].flat(),a=s=>s.trim().toLowerCase();try{for(const s of r){const l=a(s),u=t.find(m=>a(m)===l);if(u)return u;const[d]=l.split("-"),h=t.find(m=>a(m).split("-")[0]===d);if(h)return h}}catch{}return n},ge=e=>bj(Z.Translation,e),Qj=e=>{let t=e.trim().replace(/^\[/,"[").replace(/^\{/,"{").replace(/\]$/,"]").replace(/\}$/,"}").replace(/([\w\d_]+)\s*:/g,'"$1":').replace(/:\s*([a-zA-Z_][\w\d_]*)/g,': "$1"');return t=t.replace(/\[([^\[\]]+?)\]/g,(n,r)=>`[${r.split(",").map(s=>{const l=s.trim();return l.startsWith('"')&&l.endsWith('"')||!isNaN(Number(l))?l:`"${l}"`}).join(", ")}]`),JSON.parse(t)},PT=e=>{try{const t=e.split(/\r?\n/),n=t.find(s=>s.trim()!=="");if(!n||n.trim()!=="---")return{};const r={};let a=!1;for(const s of t){if(s.trim()==="---"){if(a)break;a=!0;continue}if(a){const u=s.match(/^([^:]+)\s*:\s*(.*)$/);if(u){const d=u[1].trim(),h=u[2].trim();try{r[d]=Qj(h)}catch{r[d]=h}}}}return r}catch{return}},Lc=(e,t)=>e.every((n,r)=>t[r]&&t[r].key===n.key&&t[r].type===n.type),Jj=(e,t)=>{try{const n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;const a=n.pathname.replace(/\/$/,""),s=r.pathname.replace(/\/$/,"");return!(a!==""&&s!==""&&a!==s)}catch(n){return console.error("Invalid URL(s)",n),!1}},eM=e=>{const t=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window}),n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});Object.assign(n,{iframeData:e}),Object.assign(t,{iframeData:e}),window.dispatchEvent(n),window.dispatchEvent(t)};var lr=(e=>(e.INTLAYER_CONFIGURATION="INTLAYER_CONFIGURATION",e.INTLAYER_CURRENT_LOCALE="INTLAYER_CURRENT_LOCALE",e.INTLAYER_EDITOR_ENABLED="INTLAYER_EDITOR_ENABLED",e.INTLAYER_URL_CHANGE="INTLAYER_URL_CHANGE",e.INTLAYER_FOCUSED_CONTENT_CHANGED="INTLAYER_FOCUSED_CONTENT_CHANGED",e.INTLAYER_LOCALE_DICTIONARIES_CHANGED="INTLAYER_LOCALE_DICTIONARIES_CHANGED",e.INTLAYER_DISTANT_DICTIONARIES_CHANGED="INTLAYER_DISTANT_DICTIONARIES_CHANGED",e.INTLAYER_EDITED_CONTENT_CHANGED="INTLAYER_EDITED_CONTENT_CHANGED",e.INTLAYER_IFRAME_CLICKED="INTLAYER_IFRAME_CLICKED",e))(lr||{});const zT=E.createContext(void 0),VT=E.createContext(void 0),tM=({children:e})=>{const[t,n]=E.useState({}),r=(a,s)=>{n(l=>({...l,[a]:{...l==null?void 0:l[a],content:s}}))};return b.jsx(zT.Provider,{value:{changedContent:t},children:b.jsx(VT.Provider,{value:{setChangedContent:r},children:e})})},nM=()=>E.useContext(VT),rM=()=>{const e=E.useContext(zT),t=nM();return{...e,...t}},an=[];for(let e=0;e<256;++e)an.push((e+256).toString(16).slice(1));function iM(e,t=0){return(an[e[t+0]]+an[e[t+1]]+an[e[t+2]]+an[e[t+3]]+"-"+an[e[t+4]]+an[e[t+5]]+"-"+an[e[t+6]]+an[e[t+7]]+"-"+an[e[t+8]]+an[e[t+9]]+"-"+an[e[t+10]]+an[e[t+11]]+an[e[t+12]]+an[e[t+13]]+an[e[t+14]]+an[e[t+15]]).toLowerCase()}let $p;const aM=new Uint8Array(16);function oM(){if(!$p){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");$p=crypto.getRandomValues.bind(crypto)}return $p(aM)}const sM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),XE={randomUUID:sM};function lM(e,t,n){var a;if(XE.randomUUID&&!e)return XE.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??oM();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,iM(r)}const{editor:hi}=qe,BT=E.createContext({postMessage:()=>null,allowedOrigins:[hi==null?void 0:hi.applicationURL,hi==null?void 0:hi.editorURL,hi==null?void 0:hi.cmsURL],senderId:""}),QE=({children:e,allowedOrigins:t,postMessage:n})=>{const r=E.useRef(lM()),a=E.useMemo(()=>({postMessage:n,allowedOrigins:t,senderId:r.current}),[n,t,r.current]);return b.jsx(BT.Provider,{value:a,children:e})},UT=()=>E.useContext(BT),gs=(e,t,n)=>{const{allowedOrigins:r,postMessage:a,senderId:s}=UT();return E.useEffect(()=>{if(t){const u=d=>{const{type:h,data:m,senderId:y}=d.data;h===e&&y!==s&&(typeof r>"u"||r!=null&&r.some(g=>Jj(g,d.origin))||r!=null&&r.includes("*"))&&t(m)};return window.addEventListener("message",u),()=>window.removeEventListener("message",u)}},[r,a,s,n]),u=>{a({type:e,data:u,senderId:s})}},cM=(e,t)=>typeof e=="function"?e(t):e,lo=(e,t,n)=>{const{postMessage:r,senderId:a}=UT(),{emit:s,receive:l}=n??{emit:!0,receive:!0},u=(v,_)=>{const S=cM(v,_);return s&&typeof r=="function"&&typeof S<"u"&&r({type:`${e}/post`,data:S,senderId:a}),S},d=()=>{typeof r=="function"&&r({type:`${e}/post`,data:h,senderId:a})},[h,m]=E.useState(()=>u(t)),y=v=>m(_=>u(v,_));gs(`${e}/post`,l?v=>{m(v)}:void 0);const g=(v,_)=>{s&&typeof r=="function"&&_!==a&&(typeof h>"u"||r({type:`${e}/post`,data:h,senderId:a}))};return gs(`${e}/get`,s?g:void 0,h),E.useEffect(()=>{l&&typeof r=="function"&&typeof h>"u"&&r({type:`${e}/get`,senderId:a})},[]),[h,y,d]},$T=E.createContext(void 0),uM=({children:e,configuration:t})=>b.jsx($T.Provider,{value:t,children:e}),Fr=()=>E.useContext($T),HT=E.createContext(void 0),FT=E.createContext(void 0),dM=({children:e})=>{const[t,n]=lo(lr.INTLAYER_LOCALE_DICTIONARIES_CHANGED,void 0),r=E.useMemo(()=>({localeDictionaries:t??{}}),[t]),a=E.useMemo(()=>({setLocaleDictionaries:n,setLocaleDictionary:s=>{n(l=>({...l,[s.key]:s}))}}),[n]);return b.jsx(HT.Provider,{value:r,children:b.jsx(FT.Provider,{value:a,children:e})})},Gf=()=>E.useContext(FT),GT=()=>{const e=Gf(),t=E.useContext(HT);if(!t)throw new Error("useDictionariesRecordStates must be used within a DictionariesRecordProvider");return{...t,...e}},KT=E.createContext(void 0),fM=e=>gs(`${lr.INTLAYER_EDITED_CONTENT_CHANGED}/get`,e),ZT=E.createContext(void 0),JE=(e,t)=>typeof e=="function"?e(t):e,hM=({children:e})=>{const{localeDictionaries:t}=GT(),[n,r]=lo(lr.INTLAYER_EDITED_CONTENT_CHANGED),a=v=>{let _=JE(v);return r(S=>(_=JE(v,S==null?void 0:S[_.key]),{...S,[_.key]:_})),_},s=(v,_)=>{r(S=>({...S,[v]:{...S==null?void 0:S[v],content:_}}))},l=(v,_,S=[],A=!0)=>{r(w=>{var L,D;const T=(L=t[v])==null?void 0:L.content,C=structuredClone(((D=w==null?void 0:w[v])==null?void 0:D.content)??T);let k=S;if(!A){let j=0;const V=S.slice(0,-1),U=S[S.length-1];let ue=U.key;for(;typeof Pr(C,k)<"u";)j++,ue=j===0?U.key:`${U.key} (${j})`,k=[...V,{...U,key:ue}]}const N=ZE(C,k,_);return{...w,[v]:{...w==null?void 0:w[v],content:N}}})},u=(v,_,S=[])=>{r(A=>{var k,N;const w=(k=t[v])==null?void 0:k.content,T=structuredClone(((N=A==null?void 0:A[v])==null?void 0:N.content)??w),C=_j(T,_,S);return{...A,[v]:{...A==null?void 0:A[v],content:C}}})},d=(v,_)=>{r(S=>{var k,N;const A=(k=t[v])==null?void 0:k.content,w=structuredClone(((N=S==null?void 0:S[v])==null?void 0:N.content)??A),T=Pr(A,_),C=ZE(w,_,T);return{...S,[v]:{...S==null?void 0:S[v],content:C}}})},h=v=>{r(_=>{const S={..._};return delete S[v],S})},m=v=>{r(_=>Object.entries(_).reduce((A,[w,T])=>w===v?A:{...A,[w]:T},{}))},y=()=>{r({})},g=(v,_)=>{var A;const S=((A=n==null?void 0:n[v])==null?void 0:A.content)??{};return Pr(S,_)};return b.jsx(KT.Provider,{value:{editedContent:n},children:b.jsx(ZT.Provider,{value:{setEditedContentState:r,setEditedDictionary:a,setEditedContent:s,addEditedContent:l,renameEditedContent:u,removeEditedContent:d,restoreEditedContent:h,clearEditedDictionaryContent:m,clearEditedContent:y,getEditedContentValue:g},children:e})})},ws=()=>E.useContext(ZT),Sn=()=>{const e=E.useContext(KT),t=ws();return{...e,...t}},qT=E.createContext({enabled:!1}),mM=e=>lo(lr.INTLAYER_EDITOR_ENABLED,!1,e),pM=e=>gs(`${lr.INTLAYER_EDITOR_ENABLED}/post`,e),WT=e=>gs(`${lr.INTLAYER_EDITOR_ENABLED}/get`,e),gM=({children:e})=>{const[t]=mM({emit:!1,receive:!0});return b.jsx(qT.Provider,{value:{enabled:t},children:e})},YT=()=>E.useContext(qT),XT=E.createContext(void 0),QT=E.createContext(void 0),yM=({children:e})=>{const[t,n]=lo(lr.INTLAYER_FOCUSED_CONTENT_CHANGED,null),r=a=>{n(s=>s&&{...s,keyPath:a})};return b.jsx(XT.Provider,{value:{focusedContent:t},children:b.jsx(QT.Provider,{value:{setFocusedContent:n,setFocusedContentKeyPath:r},children:e})})},dv=()=>{const e=E.useContext(QT);if(e===void 0)throw new Error("useFocusDictionaryActions must be used within a FocusDictionaryProvider");return e},la=()=>{const e=dv(),t=E.useContext(XT);if(t===void 0)throw new Error("useFocusDictionaryState must be used within a FocusDictionaryProvider");return{...t,...e}},eS=({children:e})=>{const t=fM();return E.useEffect(()=>{t()},[]),b.jsx(dM,{children:b.jsx(hM,{children:b.jsx(yM,{children:e})})})},vM=({children:e,fallback:t})=>{const n=WT(),{enabled:r}=YT();return E.useEffect(()=>{r||n()},[r]),r?e:t},bM=({children:e,fallback:t})=>{const[n,r]=E.useState(!1);return E.useEffect(()=>{r(window.self!==window.top)},[]),n?e:t},_M=({children:e,configuration:t,...n})=>b.jsx(tM,{children:b.jsx(gM,{children:b.jsx(uM,{configuration:t,children:n.mode==="editor"?b.jsx(QE,{...n,children:b.jsx(eS,{children:e})}):b.jsx(bM,{fallback:e,children:b.jsx(QE,{...n,children:b.jsx(vM,{fallback:e,children:b.jsx(eS,{children:e})})})})})})}),xM=(e,t)=>lo(lr.INTLAYER_URL_CHANGE,e,t),EM=()=>gs(lr.INTLAYER_IFRAME_CLICKED,eM);/*! js-cookie v3.0.5 | MIT */function md(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var SM={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Zg(e,t){function n(a,s,l){if(!(typeof document>"u")){l=md({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var d in l)l[d]&&(u+="; "+d,l[d]!==!0&&(u+="="+l[d].split(";")[0]));return document.cookie=a+"="+e.write(s,a)+u}}function r(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var s=document.cookie?document.cookie.split("; "):[],l={},u=0;u<s.length;u++){var d=s[u].split("="),h=d.slice(1).join("=");try{var m=decodeURIComponent(d[0]);if(l[m]=e.read(h,m),a===m)break}catch{}}return a?l[a]:l}}return Object.create({set:n,get:r,remove:function(a,s){n(a,"",md({},s,{expires:-1}))},withAttributes:function(a){return Zg(this.converter,md({},this.attributes,a))},withConverter:function(a){return Zg(md({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var JT=Zg(SM,{path:"/"});const{cookieName:e1}=qe.middleware,AM={path:"/",expires:void 0,domain:void 0,secure:!1,sameSite:"strict"},fv=JT.get(e1),t1=e=>{JT.set(e1,e,AM)},wM=()=>({localeCookie:fv,setLocaleCookie:t1});var kT;const Kf=E.createContext({locale:fv??((kT=qe==null?void 0:qe.internationalization)==null?void 0:kT.defaultLocale),setLocale:()=>null,disableEditor:!1}),TM=()=>E.useContext(Kf),RM=({locale:e,defaultLocale:t,children:n,setLocale:r,disableEditor:a})=>{const{internationalization:s}=qe??{},{defaultLocale:l,locales:u}=s??{},d=e??fv??t??l,[h,m]=lo(lr.INTLAYER_CURRENT_LOCALE,d),g=r??(_=>{if(h.toString()!==_.toString()){if(!(u!=null&&u.map(String).includes(_))){console.error(`Locale ${_} is not available`);return}m(_),t1(_)}}),v=Xj(e??h);return b.jsx(Kf.Provider,{value:{locale:v,setLocale:g,disableEditor:a},children:n})},sf=({children:e,value:t,additionalProps:n})=>{const r=E.isValidElement(e)?e:b.jsx(b.Fragment,{children:e});return new Proxy(r,{get(a,s,l){return s==="value"?t:n&&Object.keys(n).includes(s)?n[s]:Reflect.get(a,s,l)}})},CM=250,NM=({children:e,onPress:t,onClickOutside:n,pressDuration:r=CM,isSelecting:a,...s})=>{const l=E.useRef(null),[u,d]=E.useState(!1),[h,m]=E.useState(a),y=E.useRef(null),g=typeof e=="string",v=()=>{m(!0),t()},_=()=>{y.current=setTimeout(()=>{v()},r)},S=()=>{y.current&&(clearTimeout(y.current),y.current=null)},A=()=>{S(),_()},w=()=>{d(!0)},T=()=>{d(!1),S()},C=E.useCallback(L=>{l.current&&!l.current.contains(L.target)&&(m(!1),n==null||n())},[n]);E.useEffect(()=>(document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}),[C]);const k=L=>{h&&(L.preventDefault(),L.stopPropagation())},N=()=>{m(!1)};return b.jsx("span",{style:{display:g?"inline":"inline-block",cursor:"pointer",userSelect:"none",borderRadius:"0.375rem",outlineWidth:"2px",outlineOffset:"4px",outlineStyle:"solid",outlineColor:a||h||u?"inherit":"transparent",transition:"all 100ms 50ms ease-in-out"},role:"button",tabIndex:0,onKeyUp:()=>null,onClick:k,onMouseDown:A,onMouseUp:T,onMouseLeave:T,onTouchStart:A,onTouchEnd:T,onTouchCancel:T,onBlur:N,onMouseEnter:w,ref:l,...s,children:e})},OM=({children:e,dictionaryKey:t,keyPath:n})=>{const{focusedContent:r,setFocusedContent:a}=la(),s=E.useCallback(()=>a({dictionaryKey:t,keyPath:n}),[t,n]),l=E.useMemo(()=>{var u;return((r==null?void 0:r.dictionaryKey)===t&&(((u=r==null?void 0:r.keyPath)==null?void 0:u.length)??0)>0&&Lc((r==null?void 0:r.keyPath)??[],n))??!1},[r,n,t]);return b.jsx(NM,{onPress:s,isSelecting:l,children:e})},lf=({children:e,...t})=>{const{enabled:n}=YT(),{disableEditor:r}=TM();return n&&!r?b.jsx(OM,{...t,children:e}):e},hv=({dictionaryKey:e,keyPath:t,children:n})=>{const r=ws();return r?r.getEditedContentValue(e,t)??n:n},kM=e=>{const t=hv(e);if(typeof t=="object"){const n=uv(t,e,e.locale);return typeof n!="string"?(console.error(`Incorrect edited content format. Content type: ${typeof n}. Expected string. Value ${JSON.stringify(n)}`),e.children):n}return t},DM=E.createContext({renderMarkdown:e=>e}),IM=()=>E.useContext(DM),LM=({dictionaryKey:e,keyPath:t,children:n,locale:r})=>{const{renderMarkdown:a}=IM(),s=hv({dictionaryKey:e,keyPath:t,children:n});if(typeof s!="string"){const l=uv(s,{dictionaryKey:e,keyPath:t},r);return typeof l!="string"?(console.error(`Incorrect Markdown content. Edited Markdown content type: ${typeof l}. Expected string. Value ${JSON.stringify(l)}`),a(n)):a(l)}return a(s)},jM=({dictionaryKey:e,keyPath:t,children:n,metadataKeyPath:r})=>{const a=hv({dictionaryKey:e,keyPath:t,children:n}),s=PT(a);return Pr(s,r)},n1=e=>{if(typeof e=="string")return e;const n=(s=>{var l;if(s!=null&&s.props&&typeof s.props.children=="object"){const u=[],{children:d}=s.props;return Object.keys(d??{}).forEach(h=>{u.push(n1((d??{})[h]))}),{...s,props:{...s.props,children:u}}}return{...s,props:{...s.props,children:((l=s.props)==null?void 0:l.children)??[]}}})(e),{type:r,props:a}=n;return E.createElement(r??"span",a,...a.children)},MM={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{plugins:t,...n})=>sf({...n,value:n.children,children:E.createElement(lf,{...n,key:n.children},b.jsx(kM,{...n,children:n.children}))})},PM={id:"react-node-plugin",canHandle:e=>typeof e=="object"&&typeof e.props<"u"&&typeof e.key<"u",transform:(e,{plugins:t,...n})=>sf({...n,value:"[[react-element]]",children:b.jsx(lf,{...n,children:n1(e)})})},zM={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,t,n)=>{const{plugins:r,...a}=t,s=PT(e),u=n(s,{plugins:[{id:"markdown-metadata-plugin",canHandle:d=>typeof d=="string"||typeof d=="number"||typeof d=="boolean"||!d,transform:(d,h)=>sf({...h,value:d,children:b.jsx(lf,{...a,children:b.jsx(jM,{...a,metadataKeyPath:h.keyPath,children:e})})})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return sf({...t,value:e,children:b.jsx(lf,{...a,children:b.jsx(LM,{...a,children:e})}),additionalProps:{metadata:u}})}},VM={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===Z.Markdown,transform:(e,t,n)=>{const r=[...t.keyPath,{type:Z.Markdown}],a=e[Z.Markdown];return n(a,{...t,children:a,keyPath:r,plugins:[zM,...t.plugins??[]]})}},tS=(e,t,n)=>jT(e,t,[MM,PM,VM]),Qt=(e,t)=>{const{locale:n}=E.useContext(Kf),r=n,{changedContent:a}=rM();return a!=null&&a[e.key]?tS(a==null?void 0:a[e.key],r):tS(e,r)},mv=({onLocaleChange:e}={})=>{const{defaultLocale:t,locales:n}=(qe==null?void 0:qe.internationalization)??{},{locale:r,setLocale:a}=E.useContext(Kf),{setLocaleCookie:s}=wM();return{locale:r,defaultLocale:t,availableLocales:n,setLocale:u=>{if(!(n!=null&&n.map(String).includes(u))){console.error(`Locale ${u} is not available`);return}a(u),s(u),e==null||e(u)}}};var Vl={},nS;function BM(){if(nS)return Vl;nS=1,Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.parse=l,Vl.serialize=h;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,s=(()=>{const g=function(){};return g.prototype=Object.create(null),g})();function l(g,v){const _=new s,S=g.length;if(S<2)return _;const A=(v==null?void 0:v.decode)||m;let w=0;do{const T=g.indexOf("=",w);if(T===-1)break;const C=g.indexOf(";",w),k=C===-1?S:C;if(T>k){w=g.lastIndexOf(";",T-1)+1;continue}const N=u(g,w,T),L=d(g,T,N),D=g.slice(N,L);if(_[D]===void 0){let j=u(g,T+1,k),V=d(g,k,j);const U=A(g.slice(j,V));_[D]=U}w=k+1}while(w<S);return _}function u(g,v,_){do{const S=g.charCodeAt(v);if(S!==32&&S!==9)return v}while(++v<_);return _}function d(g,v,_){for(;v>_;){const S=g.charCodeAt(--v);if(S!==32&&S!==9)return v+1}return _}function h(g,v,_){const S=(_==null?void 0:_.encode)||encodeURIComponent;if(!e.test(g))throw new TypeError(`argument name is invalid: ${g}`);const A=S(v);if(!t.test(A))throw new TypeError(`argument val is invalid: ${v}`);let w=g+"="+A;if(!_)return w;if(_.maxAge!==void 0){if(!Number.isInteger(_.maxAge))throw new TypeError(`option maxAge is invalid: ${_.maxAge}`);w+="; Max-Age="+_.maxAge}if(_.domain){if(!n.test(_.domain))throw new TypeError(`option domain is invalid: ${_.domain}`);w+="; Domain="+_.domain}if(_.path){if(!r.test(_.path))throw new TypeError(`option path is invalid: ${_.path}`);w+="; Path="+_.path}if(_.expires){if(!y(_.expires)||!Number.isFinite(_.expires.valueOf()))throw new TypeError(`option expires is invalid: ${_.expires}`);w+="; Expires="+_.expires.toUTCString()}if(_.httpOnly&&(w+="; HttpOnly"),_.secure&&(w+="; Secure"),_.partitioned&&(w+="; Partitioned"),_.priority)switch(typeof _.priority=="string"?_.priority.toLowerCase():void 0){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${_.priority}`)}if(_.sameSite)switch(typeof _.sameSite=="string"?_.sameSite.toLowerCase():_.sameSite){case!0:case"strict":w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"none":w+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${_.sameSite}`)}return w}function m(g){if(g.indexOf("%")===-1)return g;try{return decodeURIComponent(g)}catch{return g}}function y(g){return a.call(g)==="[object Date]"}return Vl}BM();var rS="popstate";function UM(e={}){function t(r,a){let{pathname:s,search:l,hash:u}=r.location;return qg("",{pathname:s,search:l,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:mc(a)}return HM(t,n,null,e)}function xt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $r(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $M(){return Math.random().toString(36).substring(2,10)}function iS(e,t){return{usr:e.state,key:e.key,idx:t}}function qg(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ts(t):t,state:n,key:t&&t.key||r||$M()}}function mc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ts(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function HM(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,l=a.history,u="POP",d=null,h=m();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function m(){return(l.state||{idx:null}).idx}function y(){u="POP";let A=m(),w=A==null?null:A-h;h=A,d&&d({action:u,location:S.location,delta:w})}function g(A,w){u="PUSH";let T=qg(S.location,A,w);h=m()+1;let C=iS(T,h),k=S.createHref(T);try{l.pushState(C,"",k)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(k)}s&&d&&d({action:u,location:S.location,delta:1})}function v(A,w){u="REPLACE";let T=qg(S.location,A,w);h=m();let C=iS(T,h),k=S.createHref(T);l.replaceState(C,"",k),s&&d&&d({action:u,location:S.location,delta:0})}function _(A){return FM(A)}let S={get action(){return u},get location(){return e(a,l)},listen(A){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(rS,y),d=A,()=>{a.removeEventListener(rS,y),d=null}},createHref(A){return t(a,A)},createURL:_,encodeLocation(A){let w=_(A);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:v,go(A){return l.go(A)}};return S}function FM(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),xt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:mc(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function r1(e,t,n="/"){return GM(e,t,n,!1)}function GM(e,t,n,r){let a=typeof t=="string"?Ts(t):t,s=_i(a.pathname||"/",n);if(s==null)return null;let l=i1(e);KM(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let h=rP(s);u=tP(l[d],h,r)}return u}function i1(e,t=[],n=[],r=""){let a=(s,l,u)=>{let d={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};d.relativePath.startsWith("/")&&(xt(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length));let h=vi([r,d.relativePath]),m=n.concat(d);s.children&&s.children.length>0&&(xt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),i1(s.children,t,m,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:JM(h,s.index),routesMeta:m})};return e.forEach((s,l)=>{var u;if(s.path===""||!((u=s.path)!=null&&u.includes("?")))a(s,l);else for(let d of a1(s.path))a(s,l,d)}),t}function a1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let l=a1(r.join("/")),u=[];return u.push(...l.map(d=>d===""?s:[s,d].join("/"))),a&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function KM(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var ZM=/^:[\w-]+$/,qM=3,WM=2,YM=1,XM=10,QM=-2,aS=e=>e==="*";function JM(e,t){let n=e.split("/"),r=n.length;return n.some(aS)&&(r+=QM),t&&(r+=WM),n.filter(a=>!aS(a)).reduce((a,s)=>a+(ZM.test(s)?qM:s===""?YM:XM),r)}function eP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function tP(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],h=u===r.length-1,m=s==="/"?t:t.slice(s.length)||"/",y=cf({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},m),g=d.route;if(!y&&h&&n&&!r[r.length-1].route.index&&(y=cf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!y)return null;Object.assign(a,y.params),l.push({params:a,pathname:vi([s,y.pathname]),pathnameBase:sP(vi([s,y.pathnameBase])),route:g}),y.pathnameBase!=="/"&&(s=vi([s,y.pathnameBase]))}return l}function cf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=nP(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let s=a[0],l=s.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((h,{paramName:m,isOptional:y},g)=>{if(m==="*"){let _=u[g]||"";l=s.slice(0,s.length-_.length).replace(/(.)\/+$/,"$1")}const v=u[g];return y&&!v?h[m]=void 0:h[m]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:l,pattern:e}}function nP(e,t=!1,n=!0){$r(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function rP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return $r(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function _i(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function iP(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Ts(e):e;return{pathname:n?n.startsWith("/")?n:aP(n,t):t,search:lP(r),hash:cP(a)}}function aP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Hp(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function oP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function o1(e){let t=oP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function s1(e,t,n,r=!1){let a;typeof e=="string"?a=Ts(e):(a={...e},xt(!a.pathname||!a.pathname.includes("?"),Hp("?","pathname","search",a)),xt(!a.pathname||!a.pathname.includes("#"),Hp("#","pathname","hash",a)),xt(!a.search||!a.search.includes("#"),Hp("#","search","hash",a)));let s=e===""||a.pathname==="",l=s?"/":a.pathname,u;if(l==null)u=n;else{let y=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),y-=1;a.pathname=g.join("/")}u=y>=0?t[y]:"/"}let d=iP(a,u),h=l&&l!=="/"&&l.endsWith("/"),m=(s||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var vi=e=>e.join("/").replace(/\/\/+/g,"/"),sP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function uP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var l1=["POST","PUT","PATCH","DELETE"];new Set(l1);var dP=["GET",...l1];new Set(dP);var Rs=E.createContext(null);Rs.displayName="DataRouter";var Zf=E.createContext(null);Zf.displayName="DataRouterState";var c1=E.createContext({isTransitioning:!1});c1.displayName="ViewTransition";var fP=E.createContext(new Map);fP.displayName="Fetchers";var hP=E.createContext(null);hP.displayName="Await";var Gr=E.createContext(null);Gr.displayName="Navigation";var jc=E.createContext(null);jc.displayName="Location";var Ti=E.createContext({outlet:null,matches:[],isDataRoute:!1});Ti.displayName="Route";var pv=E.createContext(null);pv.displayName="RouteError";function mP(e,{relative:t}={}){xt(Mc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=E.useContext(Gr),{hash:a,pathname:s,search:l}=Pc(e,{relative:t}),u=s;return n!=="/"&&(u=s==="/"?n:vi([n,s])),r.createHref({pathname:u,search:l,hash:a})}function Mc(){return E.useContext(jc)!=null}function ca(){return xt(Mc(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(jc).location}var u1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function d1(e){E.useContext(Gr).static||E.useLayoutEffect(e)}function pP(){let{isDataRoute:e}=E.useContext(Ti);return e?CP():gP()}function gP(){xt(Mc(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(Rs),{basename:t,navigator:n}=E.useContext(Gr),{matches:r}=E.useContext(Ti),{pathname:a}=ca(),s=JSON.stringify(o1(r)),l=E.useRef(!1);return d1(()=>{l.current=!0}),E.useCallback((d,h={})=>{if($r(l.current,u1),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=s1(d,JSON.parse(s),a,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:vi([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,s,a,e])}E.createContext(null);function Pc(e,{relative:t}={}){let{matches:n}=E.useContext(Ti),{pathname:r}=ca(),a=JSON.stringify(o1(n));return E.useMemo(()=>s1(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function yP(e,t){return f1(e,t)}function f1(e,t,n,r){var T;xt(Mc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a,static:s}=E.useContext(Gr),{matches:l}=E.useContext(Ti),u=l[l.length-1],d=u?u.params:{},h=u?u.pathname:"/",m=u?u.pathnameBase:"/",y=u&&u.route;{let C=y&&y.path||"";h1(h,!y||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
52
|
-
|
|
53
|
-
Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let g=ca(),v;if(t){let C=typeof t=="string"?Ts(t):t;xt(m==="/"||((T=C.pathname)==null?void 0:T.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${C.pathname}" was given in the \`location\` prop.`),v=C}else v=g;let _=v.pathname||"/",S=_;if(m!=="/"){let C=m.replace(/^\//,"").split("/");S="/"+_.replace(/^\//,"").split("/").slice(C.length).join("/")}let A=!s&&n&&n.matches&&n.matches.length>0?n.matches:r1(e,{pathname:S});$r(y||A!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),$r(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=EP(A&&A.map(C=>Object.assign({},C,{params:Object.assign({},d,C.params),pathname:vi([m,a.encodeLocation?a.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?m:vi([m,a.encodeLocation?a.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),l,n,r);return t&&w?E.createElement(jc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},w):w}function vP(){let e=RP(),t=uP(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:s},"ErrorBoundary")," or"," ",E.createElement("code",{style:s},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:a},n):null,l)}var bP=E.createElement(vP,null),_P=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?E.createElement(Ti.Provider,{value:this.props.routeContext},E.createElement(pv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function xP({routeContext:e,match:t,children:n}){let r=E.useContext(Rs);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Ti.Provider,{value:e},n)}function EP(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=n==null?void 0:n.errors;if(s!=null){let d=a.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);xt(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,u=-1;if(n)for(let d=0;d<a.length;d++){let h=a[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:m,errors:y}=n,g=h.route.loader&&!m.hasOwnProperty(h.route.id)&&(!y||y[h.route.id]===void 0);if(h.route.lazy||g){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,h,m)=>{let y,g=!1,v=null,_=null;n&&(y=s&&h.route.id?s[h.route.id]:void 0,v=h.route.errorElement||bP,l&&(u<0&&m===0?(h1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,_=null):u===m&&(g=!0,_=h.route.hydrateFallbackElement||null)));let S=t.concat(a.slice(0,m+1)),A=()=>{let w;return y?w=v:g?w=_:h.route.Component?w=E.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,E.createElement(xP,{match:h,routeContext:{outlet:d,matches:S,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?E.createElement(_P,{location:n.location,revalidation:n.revalidation,component:v,error:y,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):A()},null)}function gv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function SP(e){let t=E.useContext(Rs);return xt(t,gv(e)),t}function AP(e){let t=E.useContext(Zf);return xt(t,gv(e)),t}function wP(e){let t=E.useContext(Ti);return xt(t,gv(e)),t}function yv(e){let t=wP(e),n=t.matches[t.matches.length-1];return xt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function TP(){return yv("useRouteId")}function RP(){var r;let e=E.useContext(pv),t=AP("useRouteError"),n=yv("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function CP(){let{router:e}=SP("useNavigate"),t=yv("useNavigate"),n=E.useRef(!1);return d1(()=>{n.current=!0}),E.useCallback(async(a,s={})=>{$r(n.current,u1),n.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var oS={};function h1(e,t,n){!t&&!oS[e]&&(oS[e]=!0,$r(!1,n))}E.memo(NP);function NP({routes:e,future:t,state:n}){return f1(e,void 0,n,t)}function m1(e){xt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function OP({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:s=!1}){xt(!Mc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:l,navigator:a,static:s,future:{}}),[l,a,s]);typeof n=="string"&&(n=Ts(n));let{pathname:d="/",search:h="",hash:m="",state:y=null,key:g="default"}=n,v=E.useMemo(()=>{let _=_i(d,l);return _==null?null:{location:{pathname:_,search:h,hash:m,state:y,key:g},navigationType:r}},[l,d,h,m,y,g,r]);return $r(v!=null,`<Router basename="${l}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:E.createElement(Gr.Provider,{value:u},E.createElement(jc.Provider,{children:t,value:v}))}function kP({children:e,location:t}){return yP(Wg(e),t)}function Wg(e,t=[]){let n=[];return E.Children.forEach(e,(r,a)=>{if(!E.isValidElement(r))return;let s=[...t,a];if(r.type===E.Fragment){n.push.apply(n,Wg(r.props.children,s));return}xt(r.type===m1,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),xt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Wg(r.props.children,s)),n.push(l)}),n}var Fd="get",Gd="application/x-www-form-urlencoded";function qf(e){return e!=null&&typeof e.tagName=="string"}function DP(e){return qf(e)&&e.tagName.toLowerCase()==="button"}function IP(e){return qf(e)&&e.tagName.toLowerCase()==="form"}function LP(e){return qf(e)&&e.tagName.toLowerCase()==="input"}function jP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function MP(e,t){return e.button===0&&(!t||t==="_self")&&!jP(e)}var pd=null;function PP(){if(pd===null)try{new FormData(document.createElement("form"),0),pd=!1}catch{pd=!0}return pd}var zP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fp(e){return e!=null&&!zP.has(e)?($r(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gd}"`),null):e}function VP(e,t){let n,r,a,s,l;if(IP(e)){let u=e.getAttribute("action");r=u?_i(u,t):null,n=e.getAttribute("method")||Fd,a=Fp(e.getAttribute("enctype"))||Gd,s=new FormData(e)}else if(DP(e)||LP(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?_i(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Fd,a=Fp(e.getAttribute("formenctype"))||Fp(u.getAttribute("enctype"))||Gd,s=new FormData(u,e),!PP()){let{name:h,type:m,value:y}=e;if(m==="image"){let g=h?`${h}.`:"";s.append(`${g}x`,"0"),s.append(`${g}y`,"0")}else h&&s.append(h,y)}}else{if(qf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Fd,r=null,a=Gd,l=e}return s&&a==="text/plain"&&(l=s,s=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:s,body:l}}function vv(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function BP(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function UP(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function $P(e,t,n){let r=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let l=await BP(s,n);return l.links?l.links():[]}return[]}));return KP(r.flat(1).filter(UP).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function sS(e,t,n,r,a,s){let l=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,u=(d,h)=>{var m;return n[h].pathname!==d.pathname||((m=n[h].route.path)==null?void 0:m.endsWith("*"))&&n[h].params["*"]!==d.params["*"]};return s==="assets"?t.filter((d,h)=>l(d,h)||u(d,h)):s==="data"?t.filter((d,h)=>{var y;let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,h)||u(d,h))return!0;if(d.route.shouldRevalidate){let g=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((y=n[0])==null?void 0:y.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function HP(e,t,{includeHydrateFallback:n}={}){return FP(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function FP(e){return[...new Set(e)]}function GP(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function KP(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let s=JSON.stringify(GP(a));return n.has(s)||(n.add(s),r.push({key:s,link:a})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ZP=new Set([100,101,204,205]);function qP(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&_i(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function p1(){let e=E.useContext(Rs);return vv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function WP(){let e=E.useContext(Zf);return vv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bv=E.createContext(void 0);bv.displayName="FrameworkContext";function g1(){let e=E.useContext(bv);return vv(e,"You must render this element inside a <HydratedRouter> element"),e}function YP(e,t){let n=E.useContext(bv),[r,a]=E.useState(!1),[s,l]=E.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:h,onMouseLeave:m,onTouchStart:y}=t,g=E.useRef(null);E.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=w=>{w.forEach(T=>{l(T.isIntersecting)})},A=new IntersectionObserver(S,{threshold:.5});return g.current&&A.observe(g.current),()=>{A.disconnect()}}},[e]),E.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let v=()=>{a(!0)},_=()=>{a(!1),l(!1)};return n?e!=="intent"?[s,g,{}]:[s,g,{onFocus:Bl(u,v),onBlur:Bl(d,_),onMouseEnter:Bl(h,v),onMouseLeave:Bl(m,_),onTouchStart:Bl(y,v)}]:[!1,g,{}]}function Bl(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function XP({page:e,...t}){let{router:n}=p1(),r=E.useMemo(()=>r1(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?E.createElement(JP,{page:e,matches:r,...t}):null}function QP(e){let{manifest:t,routeModules:n}=g1(),[r,a]=E.useState([]);return E.useEffect(()=>{let s=!1;return $P(e,t,n).then(l=>{s||a(l)}),()=>{s=!0}},[e,t,n]),r}function JP({page:e,matches:t,...n}){let r=ca(),{manifest:a,routeModules:s}=g1(),{basename:l}=p1(),{loaderData:u,matches:d}=WP(),h=E.useMemo(()=>sS(e,t,d,a,r,"data"),[e,t,d,a,r]),m=E.useMemo(()=>sS(e,t,d,a,r,"assets"),[e,t,d,a,r]),y=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let _=new Set,S=!1;if(t.forEach(w=>{var C;let T=a.routes[w.route.id];!T||!T.hasLoader||(!h.some(k=>k.route.id===w.route.id)&&w.route.id in u&&((C=s[w.route.id])!=null&&C.shouldRevalidate)||T.hasClientLoader?S=!0:_.add(w.route.id))}),_.size===0)return[];let A=qP(e,l);return S&&_.size>0&&A.searchParams.set("_routes",t.filter(w=>_.has(w.route.id)).map(w=>w.route.id).join(",")),[A.pathname+A.search]},[l,u,r,a,h,t,e,s]),g=E.useMemo(()=>HP(m,a),[m,a]),v=QP(m);return E.createElement(E.Fragment,null,y.map(_=>E.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),g.map(_=>E.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),v.map(({key:_,link:S})=>E.createElement("link",{key:_,...S})))}function ez(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var y1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{y1&&(window.__reactRouterVersion="7.6.0")}catch{}function tz({basename:e,children:t,window:n}){let r=E.useRef();r.current==null&&(r.current=UM({window:n,v5Compat:!0}));let a=r.current,[s,l]=E.useState({action:a.action,location:a.location}),u=E.useCallback(d=>{E.startTransition(()=>l(d))},[l]);return E.useLayoutEffect(()=>a.listen(u),[a,u]),E.createElement(OP,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a})}var v1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,b1=E.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:s,replace:l,state:u,target:d,to:h,preventScrollReset:m,viewTransition:y,...g},v){let{basename:_}=E.useContext(Gr),S=typeof h=="string"&&v1.test(h),A,w=!1;if(typeof h=="string"&&S&&(A=h,y1))try{let V=new URL(window.location.href),U=h.startsWith("//")?new URL(V.protocol+h):new URL(h),ue=_i(U.pathname,_);U.origin===V.origin&&ue!=null?h=ue+U.search+U.hash:w=!0}catch{$r(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let T=mP(h,{relative:a}),[C,k,N]=YP(r,g),L=az(h,{replace:l,state:u,target:d,preventScrollReset:m,relative:a,viewTransition:y});function D(V){t&&t(V),V.defaultPrevented||L(V)}let j=E.createElement("a",{...g,...N,href:A||T,onClick:w||s?t:D,ref:ez(v,k),target:d,"data-discover":!S&&n==="render"?"true":void 0});return C&&!S?E.createElement(E.Fragment,null,j,E.createElement(XP,{page:T})):j});b1.displayName="Link";var nz=E.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:s,to:l,viewTransition:u,children:d,...h},m){let y=Pc(l,{relative:h.relative}),g=ca(),v=E.useContext(Zf),{navigator:_,basename:S}=E.useContext(Gr),A=v!=null&&uz(y)&&u===!0,w=_.encodeLocation?_.encodeLocation(y).pathname:y.pathname,T=g.pathname,C=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(T=T.toLowerCase(),C=C?C.toLowerCase():null,w=w.toLowerCase()),C&&S&&(C=_i(C,S)||C);const k=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let N=T===w||!a&&T.startsWith(w)&&T.charAt(k)==="/",L=C!=null&&(C===w||!a&&C.startsWith(w)&&C.charAt(w.length)==="/"),D={isActive:N,isPending:L,isTransitioning:A},j=N?t:void 0,V;typeof r=="function"?V=r(D):V=[r,N?"active":null,L?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let U=typeof s=="function"?s(D):s;return E.createElement(b1,{...h,"aria-current":j,className:V,ref:m,style:U,to:l,viewTransition:u},typeof d=="function"?d(D):d)});nz.displayName="NavLink";var rz=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:s,method:l=Fd,action:u,onSubmit:d,relative:h,preventScrollReset:m,viewTransition:y,...g},v)=>{let _=lz(),S=cz(u,{relative:h}),A=l.toLowerCase()==="get"?"get":"post",w=typeof u=="string"&&v1.test(u),T=C=>{if(d&&d(C),C.defaultPrevented)return;C.preventDefault();let k=C.nativeEvent.submitter,N=(k==null?void 0:k.getAttribute("formmethod"))||l;_(k||C.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:s,relative:h,preventScrollReset:m,viewTransition:y})};return E.createElement("form",{ref:v,method:A,action:S,onSubmit:r?d:T,...g,"data-discover":!w&&e==="render"?"true":void 0})});rz.displayName="Form";function iz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _1(e){let t=E.useContext(Rs);return xt(t,iz(e)),t}function az(e,{target:t,replace:n,state:r,preventScrollReset:a,relative:s,viewTransition:l}={}){let u=pP(),d=ca(),h=Pc(e,{relative:s});return E.useCallback(m=>{if(MP(m,t)){m.preventDefault();let y=n!==void 0?n:mc(d)===mc(h);u(e,{replace:y,state:r,preventScrollReset:a,relative:s,viewTransition:l})}},[d,u,h,n,r,t,e,a,s,l])}var oz=0,sz=()=>`__${String(++oz)}__`;function lz(){let{router:e}=_1("useSubmit"),{basename:t}=E.useContext(Gr),n=TP();return E.useCallback(async(r,a={})=>{let{action:s,method:l,encType:u,formData:d,body:h}=VP(r,t);if(a.navigate===!1){let m=a.fetcherKey||sz();await e.fetch(m,n,a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:h,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await e.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:h,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,n])}function cz(e,{relative:t}={}){let{basename:n}=E.useContext(Gr),r=E.useContext(Ti);xt(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),s={...Pc(e||".",{relative:t})},l=ca();if(e==null){s.search=l.search;let u=new URLSearchParams(s.search),d=u.getAll("index");if(d.some(m=>m==="")){u.delete("index"),d.filter(y=>y).forEach(y=>u.append("index",y));let m=u.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:vi([n,s.pathname])),mc(s)}function uz(e,t={}){let n=E.useContext(c1);xt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=_1("useViewTransitionState"),a=Pc(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=_i(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=_i(n.nextLocation.pathname,r)||n.nextLocation.pathname;return cf(a.pathname,l)!=null||cf(a.pathname,s)!=null}[...ZP];var co=IT();const dz=Hf(co);/**
|
|
54
|
-
* @license lucide-react v0.513.0 - ISC
|
|
55
|
-
*
|
|
56
|
-
* This source code is licensed under the ISC license.
|
|
57
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/const fz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hz=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),lS=e=>{const t=hz(e);return t.charAt(0).toUpperCase()+t.slice(1)},x1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),mz=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
59
|
-
* @license lucide-react v0.513.0 - ISC
|
|
60
|
-
*
|
|
61
|
-
* This source code is licensed under the ISC license.
|
|
62
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/var pz={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"};/**
|
|
64
|
-
* @license lucide-react v0.513.0 - ISC
|
|
65
|
-
*
|
|
66
|
-
* This source code is licensed under the ISC license.
|
|
67
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const gz=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:l,...u},d)=>E.createElement("svg",{ref:d,...pz,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:x1("lucide",a),...!s&&!mz(u)&&{"aria-hidden":"true"},...u},[...l.map(([h,m])=>E.createElement(h,m)),...Array.isArray(s)?s:[s]]));/**
|
|
69
|
-
* @license lucide-react v0.513.0 - ISC
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the ISC license.
|
|
72
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const gt=(e,t)=>{const n=E.forwardRef(({className:r,...a},s)=>E.createElement(gz,{ref:s,iconNode:t,className:x1(`lucide-${fz(lS(e))}`,`lucide-${e}`,r),...a}));return n.displayName=lS(e),n};/**
|
|
74
|
-
* @license lucide-react v0.513.0 - ISC
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the ISC license.
|
|
77
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const yz=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],vz=gt("arrow-left",yz);/**
|
|
79
|
-
* @license lucide-react v0.513.0 - ISC
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the ISC license.
|
|
82
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const bz=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],_z=gt("arrow-up-from-line",bz);/**
|
|
84
|
-
* @license lucide-react v0.513.0 - ISC
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the ISC license.
|
|
87
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const xz=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Cs=gt("check",xz);/**
|
|
89
|
-
* @license lucide-react v0.513.0 - ISC
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the ISC license.
|
|
92
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const Ez=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],E1=gt("chevron-down",Ez);/**
|
|
94
|
-
* @license lucide-react v0.513.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const Sz=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Az=gt("chevron-left",Sz);/**
|
|
99
|
-
* @license lucide-react v0.513.0 - ISC
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the ISC license.
|
|
102
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const wz=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],uf=gt("chevron-right",wz);/**
|
|
104
|
-
* @license lucide-react v0.513.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const Tz=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Rz=gt("chevron-up",Tz);/**
|
|
109
|
-
* @license lucide-react v0.513.0 - ISC
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the ISC license.
|
|
112
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const Cz=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Nz=gt("chevrons-up-down",Cz);/**
|
|
114
|
-
* @license lucide-react v0.513.0 - ISC
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the ISC license.
|
|
117
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const Oz=[["path",{d:"m12 15 2 2 4-4",key:"2c609p"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],kz=gt("copy-check",Oz);/**
|
|
119
|
-
* @license lucide-react v0.513.0 - ISC
|
|
120
|
-
*
|
|
121
|
-
* This source code is licensed under the ISC license.
|
|
122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const Dz=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Iz=gt("copy",Dz);/**
|
|
124
|
-
* @license lucide-react v0.513.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const Lz=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],jz=gt("download",Lz);/**
|
|
129
|
-
* @license lucide-react v0.513.0 - ISC
|
|
130
|
-
*
|
|
131
|
-
* This source code is licensed under the ISC license.
|
|
132
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const Mz=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Pz=gt("external-link",Mz);/**
|
|
134
|
-
* @license lucide-react v0.513.0 - ISC
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the ISC license.
|
|
137
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const zz=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Vz=gt("eye-off",zz);/**
|
|
139
|
-
* @license lucide-react v0.513.0 - ISC
|
|
140
|
-
*
|
|
141
|
-
* This source code is licensed under the ISC license.
|
|
142
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const Bz=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Uz=gt("eye",Bz);/**
|
|
144
|
-
* @license lucide-react v0.513.0 - ISC
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the ISC license.
|
|
147
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const $z=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Hz=gt("globe",$z);/**
|
|
149
|
-
* @license lucide-react v0.513.0 - ISC
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the ISC license.
|
|
152
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const Fz=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]],Gz=gt("move-vertical",Fz);/**
|
|
154
|
-
* @license lucide-react v0.513.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const Kz=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],S1=gt("pencil",Kz);/**
|
|
159
|
-
* @license lucide-react v0.513.0 - ISC
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the ISC license.
|
|
162
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const Zz=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Wf=gt("plus",Zz);/**
|
|
164
|
-
* @license lucide-react v0.513.0 - ISC
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the ISC license.
|
|
167
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const qz=[["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"}]],Wz=gt("rotate-ccw",qz);/**
|
|
169
|
-
* @license lucide-react v0.513.0 - ISC
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the ISC license.
|
|
172
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const Yz=[["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"}]],cS=gt("save",Yz);/**
|
|
174
|
-
* @license lucide-react v0.513.0 - ISC
|
|
175
|
-
*
|
|
176
|
-
* This source code is licensed under the ISC license.
|
|
177
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const Xz=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Qz=gt("search",Xz);/**
|
|
179
|
-
* @license lucide-react v0.513.0 - ISC
|
|
180
|
-
*
|
|
181
|
-
* This source code is licensed under the ISC license.
|
|
182
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const Jz=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],Yf=gt("trash",Jz);/**
|
|
184
|
-
* @license lucide-react v0.513.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const eV=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],A1=gt("wand-sparkles",eV);/**
|
|
189
|
-
* @license lucide-react v0.513.0 - ISC
|
|
190
|
-
*
|
|
191
|
-
* This source code is licensed under the ISC license.
|
|
192
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const tV=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],uo=gt("x",tV);function w1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=w1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xf(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=w1(e))&&(r&&(r+=" "),r+=t);return r}const _v="-",nV=e=>{const t=iV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(_v);return u[0]===""&&u.length!==1&&u.shift(),T1(u,t)||rV(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},T1=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?T1(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(_v);return(l=t.validators.find(({validator:u})=>u(s)))==null?void 0:l.classGroupId},uS=/^\[(.+)\]$/,rV=e=>{if(uS.test(e)){const t=uS.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},iV=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)Yg(n[a],r,a,t);return r},Yg=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:dS(t,a);s.classGroupId=n;return}if(typeof a=="function"){if(aV(a)){Yg(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([s,l])=>{Yg(l,dS(t,s),n,r)})})},dS=(e,t)=>{let n=e;return t.split(_v).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},aV=e=>e.isThemeGetter,oV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(s,l)=>{n.set(s,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return a(s,l),l},set(s,l){n.has(s)?n.set(s,l):a(s,l)}}},Xg="!",Qg=":",sV=Qg.length,lV=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const s=[];let l=0,u=0,d=0,h;for(let _=0;_<a.length;_++){let S=a[_];if(l===0&&u===0){if(S===Qg){s.push(a.slice(d,_)),d=_+sV;continue}if(S==="/"){h=_;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const m=s.length===0?a:a.substring(d),y=cV(m),g=y!==m,v=h&&h>d?h-d:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:v}};if(t){const a=t+Qg,s=r;r=l=>l.startsWith(a)?s(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},cV=e=>e.endsWith(Xg)?e.substring(0,e.length-1):e.startsWith(Xg)?e.substring(1):e,uV=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const a=[];let s=[];return r.forEach(l=>{l[0]==="["||t[l]?(a.push(...s.sort(),l),s=[]):s.push(l)}),a.push(...s.sort()),a}},dV=e=>({cache:oV(e.cacheSize),parseClassName:lV(e),sortModifiers:uV(e),...nV(e)}),fV=/\s+/,hV=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s}=t,l=[],u=e.trim().split(fV);let d="";for(let h=u.length-1;h>=0;h-=1){const m=u[h],{isExternal:y,modifiers:g,hasImportantModifier:v,baseClassName:_,maybePostfixModifierPosition:S}=n(m);if(y){d=m+(d.length>0?" "+d:d);continue}let A=!!S,w=r(A?_.substring(0,S):_);if(!w){if(!A){d=m+(d.length>0?" "+d:d);continue}if(w=r(_),!w){d=m+(d.length>0?" "+d:d);continue}A=!1}const T=s(g).join(":"),C=v?T+Xg:T,k=C+w;if(l.includes(k))continue;l.push(k);const N=a(w,A);for(let L=0;L<N.length;++L){const D=N[L];l.push(C+D)}d=m+(d.length>0?" "+d:d)}return d};function mV(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=R1(t))&&(r&&(r+=" "),r+=n);return r}const R1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=R1(e[r]))&&(n&&(n+=" "),n+=t);return n};function pV(e,...t){let n,r,a,s=l;function l(d){const h=t.reduce((m,y)=>y(m),e());return n=dV(h),r=n.cache.get,a=n.cache.set,s=u,u(d)}function u(d){const h=r(d);if(h)return h;const m=hV(d,n);return a(d,m),m}return function(){return s(mV.apply(null,arguments))}}const Ut=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},C1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,N1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,gV=/^\d+\/\d+$/,yV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vV=/\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$/,bV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_V=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yo=e=>gV.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Yi=e=>!!e&&Number.isInteger(Number(e)),Gp=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),mi=e=>yV.test(e),EV=()=>!0,SV=e=>vV.test(e)&&!bV.test(e),O1=()=>!1,AV=e=>_V.test(e),wV=e=>xV.test(e),TV=e=>!Ne(e)&&!Oe(e),RV=e=>Ns(e,I1,O1),Ne=e=>C1.test(e),$a=e=>Ns(e,L1,SV),Kp=e=>Ns(e,DV,Xe),fS=e=>Ns(e,k1,O1),CV=e=>Ns(e,D1,wV),gd=e=>Ns(e,j1,AV),Oe=e=>N1.test(e),Ul=e=>Os(e,L1),NV=e=>Os(e,IV),hS=e=>Os(e,k1),OV=e=>Os(e,I1),kV=e=>Os(e,D1),yd=e=>Os(e,j1,!0),Ns=(e,t,n)=>{const r=C1.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Os=(e,t,n=!1)=>{const r=N1.exec(e);return r?r[1]?t(r[1]):n:!1},k1=e=>e==="position"||e==="percentage",D1=e=>e==="image"||e==="url",I1=e=>e==="length"||e==="size"||e==="bg-size",L1=e=>e==="length",DV=e=>e==="number",IV=e=>e==="family-name",j1=e=>e==="shadow",LV=()=>{const e=Ut("color"),t=Ut("font"),n=Ut("text"),r=Ut("font-weight"),a=Ut("tracking"),s=Ut("leading"),l=Ut("breakpoint"),u=Ut("container"),d=Ut("spacing"),h=Ut("radius"),m=Ut("shadow"),y=Ut("inset-shadow"),g=Ut("text-shadow"),v=Ut("drop-shadow"),_=Ut("blur"),S=Ut("perspective"),A=Ut("aspect"),w=Ut("ease"),T=Ut("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...k(),Oe,Ne],L=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],j=()=>[Oe,Ne,d],V=()=>[Yo,"full","auto",...j()],U=()=>[Yi,"none","subgrid",Oe,Ne],ue=()=>["auto",{span:["full",Yi,Oe,Ne]},Yi,Oe,Ne],ie=()=>[Yi,"auto",Oe,Ne],fe=()=>["auto","min","max","fr",Oe,Ne],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...j()],ne=()=>[Yo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],K=()=>[e,Oe,Ne],ye=()=>[...k(),hS,fS,{position:[Oe,Ne]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",OV,RV,{size:[Oe,Ne]}],$=()=>[Gp,Ul,$a],Q=()=>["","none","full",h,Oe,Ne],re=()=>["",Xe,Ul,$a],he=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[Xe,Gp,hS,fS],Ee=()=>["","none",_,Oe,Ne],ke=()=>["none",Xe,Oe,Ne],Re=()=>["none",Xe,Oe,Ne],Ue=()=>[Xe,Oe,Ne],Fe=()=>[Yo,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mi],breakpoint:[mi],color:[EV],container:[mi],"drop-shadow":[mi],ease:["in","out","in-out"],font:[TV],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mi],shadow:[mi],spacing:["px",Xe],text:[mi],"text-shadow":[mi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yo,Ne,Oe,A]}],container:["container"],columns:[{columns:[Xe,Ne,Oe,u]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:N()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Yi,"auto",Oe,Ne]}],basis:[{basis:[Yo,"full","auto",u,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Yo,"auto","initial","none",Ne]}],grow:[{grow:["",Xe,Oe,Ne]}],shrink:[{shrink:["",Xe,Oe,Ne]}],order:[{order:[Yi,"first","last","none",Oe,Ne]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":fe()}],"auto-rows":[{"auto-rows":fe()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],w:[{w:[u,"screen",...ne()]}],"min-w":[{"min-w":[u,"screen","none",...ne()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...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",n,Ul,$a]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Oe,Kp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gp,Ne]}],"font-family":[{font:[NV,Ne,t]}],"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,Oe,Ne]}],"line-clamp":[{"line-clamp":[Xe,"none",Oe,Kp]}],leading:[{leading:[s,...j()]}],"list-image":[{"list-image":["none",Oe,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Oe,$a]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Xe,"auto",Oe,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,Ne]}],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",Oe,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ye()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Yi,Oe,Ne],radial:["",Oe,Ne],conic:[Yi,Oe,Ne]},kV,CV]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"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-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:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Oe,Ne]}],"outline-w":[{outline:["",Xe,Ul,$a]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",m,yd,gd]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",y,yd,gd]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Xe,$a]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",g,yd,gd]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Xe,Oe,Ne]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"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":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Oe,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ye()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,Ne]}],filter:[{filter:["","none",Oe,Ne]}],blur:[{blur:Ee()}],brightness:[{brightness:[Xe,Oe,Ne]}],contrast:[{contrast:[Xe,Oe,Ne]}],"drop-shadow":[{"drop-shadow":["","none",v,yd,gd]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Xe,Oe,Ne]}],"hue-rotate":[{"hue-rotate":[Xe,Oe,Ne]}],invert:[{invert:["",Xe,Oe,Ne]}],saturate:[{saturate:[Xe,Oe,Ne]}],sepia:[{sepia:["",Xe,Oe,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Ne]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Oe,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Oe,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Oe,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Oe,Ne]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Oe,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Oe,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Oe,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Oe,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Oe,Ne]}],ease:[{ease:["linear","initial",w,Oe,Ne]}],delay:[{delay:[Xe,Oe,Ne]}],animate:[{animate:["none",T,Oe,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Oe,Ne]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ke()}],"rotate-x":[{"rotate-x":ke()}],"rotate-y":[{"rotate-y":ke()}],"rotate-z":[{"rotate-z":ke()}],scale:[{scale:Re()}],"scale-x":[{"scale-x":Re()}],"scale-y":[{"scale-y":Re()}],"scale-z":[{"scale-z":Re()}],"scale-3d":["scale-3d"],skew:[{skew:Ue()}],"skew-x":[{"skew-x":Ue()}],"skew-y":[{"skew-y":Ue()}],transform:[{transform:[Oe,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",Oe,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",Oe,Ne]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Xe,Ul,$a,Kp]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","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-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},M1=pV(LV),Ae=(...e)=>M1(Xf(e)),mS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,pS=Xf,cr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pS(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:s}=t,l=Object.keys(a).map(h=>{const m=n==null?void 0:n[h],y=s==null?void 0:s[h];if(m===null)return null;const g=mS(m)||mS(y);return a[h][g]}),u=n&&Object.entries(n).reduce((h,m)=>{let[y,g]=m;return g===void 0||(h[y]=g),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,m)=>{let{class:y,className:g,...v}=m;return Object.entries(v).every(_=>{let[S,A]=_;return Array.isArray(A)?A.includes({...s,...u}[S]):{...s,...u}[S]===A})?[...h,y,g]:h},[]);return pS(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},jV=({className:e,strokeWidth:t=4})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"44",viewBox:"0 0 44 44",stroke:"currentColor",className:Ae("size-full",e),children:b.jsxs("g",{fill:"none",fillRule:"evenodd",strokeWidth:t,children:[b.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[b.jsx("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),b.jsx("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]}),b.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[b.jsx("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),b.jsx("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]})]})}),ys=({children:e,isLoading:t=!0,className:n,...r})=>b.jsx(b.Fragment,{children:t?b.jsx("div",{className:Ae("flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center",n),role:"status","aria-label":"Animated icon, meaning that the website is processing",...r,children:b.jsx(jV,{className:"size-10 max-h-full max-w-full"})}):e??b.jsx(b.Fragment,{})}),Zp=cr("",{variants:{size:{sm:"size-3 absolute top-1/2 -translate-y-1/2",md:"size-4 absolute top-1/2 -translate-y-1/2",lg:"size-5 absolute top-1/2 -translate-y-1/2",xl:"size-6 absolute top-1/2 -translate-y-1/2","icon-sm":"size-3","icon-md":"size-4","icon-lg":"size-5","icon-xl":"size-6"},position:{left:"left-3",right:"right-3"}},defaultVariants:{size:"md"}}),MV=cr("relative cursor-pointer truncate whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"min-h-7 px-3 max-md:py-1 text-xs",md:"min-h-8 px-6 max-md:py-2 text-sm",lg:"min-h-10 px-8 max-md:py-3 text-lg",xl:"min-h-11 px-10 max-md:py-4 text-xl","icon-sm":"p-1.5","icon-md":"p-1.5","icon-lg":"p-2","icon-xl":"p-3"},color:{primary:"text-primary *:text-text-light",secondary:"text-secondary *:text-text-light",destructive:"text-destructive *:text-text-light",neutral:"text-neutral *:text-text-light",light:"text-white *:text-text-light",dark:"text-neutral-800 *:text-text-light",text:"text-text *:text-text-opposite","text-inverse":"text-text-opposite *:text-text",error:"text-error *:text-text-light",success:"text-success *:text-text-light",custom:""},variant:{default:"rounded-lg bg-current",none:"border-none bg-current/0 text-inherit hover:bg-current/0",outline:"*:!text-current rounded-lg border-[1.5px] bg-current/0 hover:bg-current/30",link:"*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline","invisible-link":"*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent",hoverable:"*:!text-current rounded-lg border-none bg-current/0 transition hover:bg-current/10 aria-[current]:bg-current/5",input:["*:!text-current w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error","disabled:opacity-50"]},textAlign:{left:"text-left",center:"text-center",right:"text-right"},isFullWidth:{true:"w-full",false:""},hasIconLeft:{true:"px-12",false:""},hasIconRight:{true:"pr-8",false:""}},defaultVariants:{variant:"default",size:"md",color:"primary",textAlign:"center",isFullWidth:!1,hasIconRight:!1,hasIconLeft:!1}}),ut=({variant:e,size:t,color:n,children:r,Icon:a,IconRight:s,iconClassName:l,isLoading:u,isActive:d,isFullWidth:h=!1,textAlign:m,disabled:y,label:g,className:v,type:_="button",...S})=>{const A=e==="link"||e==="invisible-link";return b.jsxs("button",{disabled:u||y,"aria-current":d?"page":void 0,"aria-label":g,"aria-busy":u,role:A?"link":void 0,type:_,className:MV({variant:e,size:t,color:n,isFullWidth:h,textAlign:m??(s?"left":"center"),hasIconLeft:typeof r<"u"&&(typeof a<"u"||typeof u<"u"),hasIconRight:typeof r<"u"&&typeof s<"u",className:v}),...S,children:[a&&!u&&b.jsx(a,{className:Zp({size:t,className:l,position:"left"})}),b.jsx(ys,{className:Zp({size:t,className:l,position:"left"}),isLoading:u??!1}),b.jsx("span",{children:r}),s&&b.jsx(s,{className:Zp({size:t,className:l,position:"right"})})]})},P1=({children:e,isHidden:t,className:n="",isOverable:r=!1,isFocusable:a=!1,minHeight:s=0,...l})=>b.jsx("div",{"aria-hidden":a?t:void 0,tabIndex:a?0:void 0,role:a?"button":"none",className:Ae("group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-all duration-700 ease-in-out",typeof t<"u"&&!t&&"grid-rows-[1fr] overflow-x-auto",r&&"hover:grid-rows-[1fr] hover:overflow-x-auto",a&&"focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto",n),...l,children:b.jsx("div",{style:{minHeight:`${s}px`},className:Ae(r&&"group-hover/height-smoother:visible",a&&"group-focus/height-smoother:visible",n),children:e})}),z1=({children:e,header:t,isOpen:n=!1,onClick:r,...a})=>{const[s,l]=E.useState(n),u=s==null?void 0:!s;return E.useEffect(()=>{n!=null&&l(n)},[n]),b.jsxs("div",{className:"w-full",children:[b.jsx(ut,{variant:"hoverable",color:"text",onClick:d=>{l(h=>!h),r==null||r(d)},isFullWidth:!0,className:"flex items-center justify-between gap-2",IconRight:E1,iconClassName:Ae("transform transition-transform duration-500 ease-in-out",s?"rotate-0":"-rotate-180"),...a,children:t}),b.jsx(P1,{tabIndex:u!==!1?void 0:-1,isHidden:u,children:e})]})},PV={},gS=e=>{let t;const n=new Set,r=(m,y)=>{const g=typeof m=="function"?m(t):m;if(!Object.is(g,t)){const v=t;t=y??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(_=>_(t,v))}},a=()=>t,d={setState:r,getState:a,getInitialState:()=>h,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(PV?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},h=t=e(r,a,d);return d},zV=e=>e?gS(e):gS;var qp={exports:{}},Wp={},Yp={exports:{}},Xp={};/**
|
|
194
|
-
* @license React
|
|
195
|
-
* use-sync-external-store-shim.production.js
|
|
196
|
-
*
|
|
197
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the MIT license found in the
|
|
200
|
-
* LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/var yS;function VV(){if(yS)return Xp;yS=1;var e=Ic();function t(y,g){return y===g&&(y!==0||1/y===1/g)||y!==y&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function u(y,g){var v=g(),_=r({inst:{value:v,getSnapshot:g}}),S=_[0].inst,A=_[1];return s(function(){S.value=v,S.getSnapshot=g,d(S)&&A({inst:S})},[y,v,g]),a(function(){return d(S)&&A({inst:S}),y(function(){d(S)&&A({inst:S})})},[y]),l(v),v}function d(y){var g=y.getSnapshot;y=y.value;try{var v=g();return!n(y,v)}catch{return!0}}function h(y,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return Xp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Xp}var vS;function BV(){return vS||(vS=1,Yp.exports=VV()),Yp.exports}/**
|
|
202
|
-
* @license React
|
|
203
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
204
|
-
*
|
|
205
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
206
|
-
*
|
|
207
|
-
* This source code is licensed under the MIT license found in the
|
|
208
|
-
* LICENSE file in the root directory of this source tree.
|
|
209
|
-
*/var bS;function UV(){if(bS)return Wp;bS=1;var e=Ic(),t=BV();function n(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Wp.useSyncExternalStoreWithSelector=function(h,m,y,g,v){var _=s(null);if(_.current===null){var S={hasValue:!1,value:null};_.current=S}else S=_.current;_=u(function(){function w(L){if(!T){if(T=!0,C=L,L=g(L),v!==void 0&&S.hasValue){var D=S.value;if(v(D,L))return k=D}return k=L}if(D=k,r(C,L))return D;var j=g(L);return v!==void 0&&v(D,j)?(C=L,D):(C=L,k=j)}var T=!1,C,k,N=y===void 0?null:y;return[function(){return w(m())},N===null?void 0:function(){return w(N())}]},[m,y,g,v]);var A=a(h,_[0],_[1]);return l(function(){S.hasValue=!0,S.value=A},[A]),d(A),A},Wp}var _S;function $V(){return _S||(_S=1,qp.exports=UV()),qp.exports}var HV=$V();const FV=Hf(HV),V1={},{useDebugValue:GV}=$e,{useSyncExternalStoreWithSelector:KV}=FV;let xS=!1;const ZV=e=>e;function qV(e,t=ZV,n){(V1?"production":void 0)!=="production"&&n&&!xS&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),xS=!0);const r=KV(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return GV(r),r}const ES=e=>{(V1?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?zV(e):e,n=(r,a)=>qV(t,r,a);return Object.assign(n,t),n},B1=e=>e?ES(e):ES,WV=B1((e,t)=>({scrollBlockers:[],addBlockage:(n,r)=>e(a=>{const s=a.scrollBlockers,l=s.find(u=>u.element===r);if(l){const d=l.blockers.includes(n)?l.blockers:[...l.blockers,n];return{scrollBlockers:s.map(h=>h.element===r?{...h,blockers:d}:h)}}return r.style.overflowY="hidden",r.style.overflowX="hidden",{scrollBlockers:[...s,{element:r,blockers:[n]}]}}),removeBlockage:(n,r)=>e(a=>{const s=a.scrollBlockers,l=s.find(u=>u.element===r);return l?l.blockers.length>1?{scrollBlockers:s.map(u=>u.element===r?{...u,blockers:u.blockers.filter(d=>d!==n)}:u)}:(r.style.overflowY="auto",{scrollBlockers:s.filter(u=>u.element!==r)}):{scrollBlockers:s}}),isElementScrollBlocked:n=>t().scrollBlockers.some(r=>r.element===n)})),ts=()=>({isFetched:!1,fetchedDateTime:null,isLoading:!1,isInvalidated:!1,error:null,isSuccess:!1,data:null,errorCount:0,isEnabled:!0}),Qp=(e,t)=>t.filter(n=>e.includes(n.split("/")[0])),YV=(e,t)=>{var n;switch(t.type){case"SET_QUERY_STATE":{const{key:r,value:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??ts(),...a}}}}case"MAKE_QUERY_IN_ERROR":{const{key:r,error:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??ts(),error:a,isFetched:!0,isSuccess:!1,errorCount:(((n=e.states[r])==null?void 0:n.errorCount)??0)+1,isLoading:!1,isInvalidated:!1}}}}case"SET_QUERIES_STATE":{const{keys:r,value:a}=t,s=[r].flat(),l=Object.keys(e.states),u=Qp(s,l);if(u.length===0)return e;const d=structuredClone(e.states);return u.forEach(h=>{d[h]={...e.states[h]??ts(),...a}}),{...e,states:d}}case"RESET_KEY_STATE":{const{keys:r}=t,a=[r].flat();if(a.length===0)return e;const s=Object.keys(e.states),l=Qp(a,s);if(l.length===0)return e;const u={...e.states};return l.forEach(d=>{u[d]=ts()}),{...e,states:u}}case"RESET_STATE":{const r=[t.excludeKeys].flat(),a=Object.keys(e.states),s=Qp(r,a),l={};return a.forEach(u=>{l[u]=s.includes(u)?e.states[u]:ts()}),{...e,states:l}}default:return e}},U1=E.createContext(null),XV=({children:e})=>{const[t,n]=E.useReducer(YV,{states:{}}),r=h=>t.states[h]??ts(),a=(h,m)=>{n({type:"SET_QUERY_STATE",key:h,value:m})},s=(h,m)=>{n({type:"SET_QUERIES_STATE",keys:h,value:m})},l=(h,m)=>{n({type:"MAKE_QUERY_IN_ERROR",key:h,error:m})},u=h=>{n({type:"RESET_KEY_STATE",keys:h})},d=h=>{n({type:"RESET_STATE",excludeKeys:h})};return b.jsx(U1.Provider,{value:{getStates:r,setQueryState:a,setQueriesState:s,makeQueryInError:l,resetKeyState:u,resetState:d},children:e})},QV=()=>{const e=E.useContext(U1);if(!e)throw new Error("useAsyncState must be used within an AsyncStateProvider");return e},vd=new Map,JV=!1,eB=!1,tB=!0,nB=!1,rB=1,iB=!1,aB=5*60*1e3,oB=5*60*1e3,Jg=e=>e?Array.isArray(e)?e:[e]:[],SS=(e,t)=>Jg(t).length>0?`${e}/${JSON.stringify(t)}`:e,zc=(e,t,n)=>{const r=(n==null?void 0:n.retryLimit)??rB,a=(n==null?void 0:n.autoFetch)??nB,s=(n==null?void 0:n.retryTime)??oB,l=(n==null?void 0:n.cache)??JV,u=(n==null?void 0:n.store)??eB,d=(n==null?void 0:n.enable)??tB,h=(n==null?void 0:n.revalidation)??iB,m=(n==null?void 0:n.revalidateTime)??aB,y=(n==null?void 0:n.updateQueries)??[],g=(n==null?void 0:n.invalidateQueries)??[],v=n==null?void 0:n.onSuccess,_=n==null?void 0:n.onError,S=Jg((n==null?void 0:n.args)??[]),{getStates:A,setQueryState:w,setQueriesState:T,makeQueryInError:C}=QV(),k=E.useRef(S),N=E.useRef(null),L=SS(e,k.current),{isFetched:D,fetchedDateTime:j,isLoading:V,isEnabled:U,error:ue,isSuccess:ie,isInvalidated:fe,data:Y,errorCount:ee}=A(L),H=async(...$)=>{const Q=SS(e,$);N.current&&N.current.abort();const re=new AbortController;if(N.current=re,vd.has(Q))return vd.get(Q);const he=(async()=>{w(Q,{isLoading:!0});let xe=null;return await t(...$).then(le=>{xe=le,w(Q,{data:le,errorCount:0,isLoading:!1,isFetched:!0,fetchedDateTime:new Date,isSuccess:!0,isInvalidated:!1,error:null}),v==null||v(le),g.length>0&&T(g,{isInvalidated:!0}),y.length>0&&T(y,{data:le}),u&&localStorage.setItem(Q,JSON.stringify(le))}).catch(le=>{console.error({error:le});const Ee=le instanceof Error?le.message:String(le);C(Q,Ee),_==null||_(le.message)}).finally(()=>{vd.delete(Q)}),xe})();return vd.set(Q,he),await he},ne=async(...$)=>{if(!(!U||!d))return $&&(k.current=Jg($)),await H(...k.current)},K=async(...$)=>!U||!d||V?void 0:!fe&&ie&&l&&Y?Y:await ne(...$);E.useEffect(()=>{d!==U&&w(L,{isEnabled:U})},[d,U,L]),E.useEffect(()=>{if(!U||!d||!u||fe||D||Y)return;const $=localStorage.getItem(L);try{$&&w(L,{data:JSON.parse($)})}catch(Q){console.error(Q)}},[u,L,D,fe,U,d,Y]),E.useEffect(()=>{a&&(!U||!d||D&&!fe||V||H(...k.current))},[a,U,d,D,fe,V,H]),E.useEffect(()=>{const $=ee>0&&r>0,Q=ee>r;if(!U||!d||!$||Q||!(l||u)||V||ie)return;const re=setTimeout(()=>{H(...k.current)},s);return()=>clearTimeout(re)},[U,ee,r,d,s,l,u,ie,V,H]),E.useEffect(()=>{if(!h||m<=0||!U||!d||V||!ie||!j||!(l||u))return;const $=setTimeout(()=>{H(...k.current)},m);return()=>clearTimeout($)},[h,m,l,u,ie,j,V,U,d,H]);const ye=$=>{w(L,{data:$})},P=()=>{N.current&&N.current.abort()},X={isFetched:D,isInvalidated:fe,error:ue,data:Y,errorCount:ee,isSuccess:ie,isEnabled:U,isDisabled:!U,isLoading:V,isWaitingData:V&&!D&&!Y,isRevalidating:V&&D,[e]:K,revalidate:ne,setData:ye,abort:P};return E.useEffect(()=>()=>{N.current&&N.current.abort()},[]),X},sB=e=>{var u;const t=Fr(),r=Ff(void 0,e??t??qe),{data:a,isFetched:s}=zc("getCSRFToken",r.auth.getCSRFToken,{cache:!0,autoFetch:!0});return{csrfToken:(u=a==null?void 0:a.data)==null?void 0:u.csrf_token,csrfTokenFetched:s}},lB=e=>{const t=Fr(),n=e??t??qe,r=Ff(void 0,n),{data:a}=zc("getOAuth2AccessToken",r.auth.getOAuth2AccessToken,{cache:!0,autoFetch:!0,enable:!!(n.editor.clientId&&n.editor.clientSecret)});return{oAuth2AccessToken:a==null?void 0:a.data}},cB=(e,t)=>{const n=Fr(),a=Ff(void 0,t??n??qe),{getSession:s,revalidate:l,data:u,setData:d,isFetched:h}=zc("getSession",async()=>{try{const y=await a.auth.getSession();if(y.data){const{user:g,organization:v,project:_}=y.data;return{user:g,organization:v,isOrganizationAdmin:(g&&((v==null?void 0:v.adminsIds)??[]).includes(g._id))??!1,project:_,isProjectAdmin:(g&&((_==null?void 0:_.adminsIds)??[]).includes(g._id))??!1}}}catch(y){console.error(y)}return null},{cache:!0,store:!0,autoFetch:!0,enable:!e,invalidateQueries:["getOrganizations","getProjects","getUsers","getDictionaries"]});return{session:E.useMemo(()=>u??(h?null:void 0),[u,h]),fetchSession:s,revalidateSession:l,setSession:d}},Vc=({session:e,intlayerConfiguration:t}={})=>{const{csrfToken:n,csrfTokenFetched:r}=sB(t),{session:a,fetchSession:s,revalidateSession:l,setSession:u}=cB(e,t),{oAuth2AccessToken:d}=lB(t);return{session:a,fetchSession:s,setSession:u,revalidateSession:l,csrfToken:n,csrfTokenFetched:r,oAuth2AccessToken:d,isAuthenticated:!!(a!=null&&a.user||d),isProjectAdmin:a==null?void 0:a.isProjectAdmin,isOrganizationAdmin:a==null?void 0:a.isOrganizationAdmin}};function tt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function AS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eo(...e){return t=>{let n=!1;const r=e.map(a=>{const s=AS(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():AS(e[a],null)}}}}function St(...e){return E.useCallback(eo(...e),e)}function uB(e,t){const n=E.createContext(t),r=s=>{const{children:l,...u}=s,d=E.useMemo(()=>u,Object.values(u));return b.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function a(s){const l=E.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,a]}function Bc(e,t=[]){let n=[];function r(s,l){const u=E.createContext(l),d=n.length;n=[...n,l];const h=y=>{var w;const{scope:g,children:v,..._}=y,S=((w=g==null?void 0:g[e])==null?void 0:w[d])||u,A=E.useMemo(()=>_,Object.values(_));return b.jsx(S.Provider,{value:A,children:v})};h.displayName=s+"Provider";function m(y,g){var S;const v=((S=g==null?void 0:g[e])==null?void 0:S[d])||u,_=E.useContext(v);if(_)return _;if(l!==void 0)return l;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[h,m]}const a=()=>{const s=n.map(l=>E.createContext(l));return function(u){const d=(u==null?void 0:u[e])||s;return E.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,dB(a,...t)]}function dB(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=r.reduce((u,{useScope:d,scopeName:h})=>{const y=d(s)[`__scope${h}`];return{...u,...y}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function vs(e){const t=hB(e),n=E.forwardRef((r,a)=>{const{children:s,...l}=r,u=E.Children.toArray(s),d=u.find(pB);if(d){const h=d.props.children,m=u.map(y=>y===d?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:y);return b.jsx(t,{...l,ref:a,children:E.isValidElement(h)?E.cloneElement(h,void 0,m):null})}return b.jsx(t,{...l,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}var fB=vs("Slot");function hB(e){const t=E.forwardRef((n,r)=>{const{children:a,...s}=n;if(E.isValidElement(a)){const l=yB(a),u=gB(s,a.props);return a.type!==E.Fragment&&(u.ref=r?eo(r,l):l),E.cloneElement(a,u)}return E.Children.count(a)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mB=Symbol("radix.slottable");function pB(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mB}function gB(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...u)=>{const d=s(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function yB(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $1(e){const t=e+"CollectionProvider",[n,r]=Bc(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:A,children:w}=S,T=$e.useRef(null),C=$e.useRef(new Map).current;return b.jsx(a,{scope:A,itemMap:C,collectionRef:T,children:w})};l.displayName=t;const u=e+"CollectionSlot",d=vs(u),h=$e.forwardRef((S,A)=>{const{scope:w,children:T}=S,C=s(u,w),k=St(A,C.collectionRef);return b.jsx(d,{ref:k,children:T})});h.displayName=u;const m=e+"CollectionItemSlot",y="data-radix-collection-item",g=vs(m),v=$e.forwardRef((S,A)=>{const{scope:w,children:T,...C}=S,k=$e.useRef(null),N=St(A,k),L=s(m,w);return $e.useEffect(()=>(L.itemMap.set(k,{ref:k,...C}),()=>void L.itemMap.delete(k))),b.jsx(g,{[y]:"",ref:N,children:T})});v.displayName=m;function _(S){const A=s(e+"CollectionConsumer",S);return $e.useCallback(()=>{const T=A.collectionRef.current;if(!T)return[];const C=Array.from(T.querySelectorAll(`[${y}]`));return Array.from(A.itemMap.values()).sort((L,D)=>C.indexOf(L.ref.current)-C.indexOf(D.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:l,Slot:h,ItemSlot:v},_,r]}var vB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=vB.reduce((e,t)=>{const n=vs(`Primitive.${t}`),r=E.forwardRef((a,s)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(d,{...u,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function H1(e,t){e&&co.flushSync(()=>e.dispatchEvent(t))}function xr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function bB(e,t=globalThis==null?void 0:globalThis.document){const n=xr(e);E.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _B="DismissableLayer",ey="dismissableLayer.update",xB="dismissableLayer.pointerDownOutside",EB="dismissableLayer.focusOutside",wS,F1=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qf=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...d}=e,h=E.useContext(F1),[m,y]=E.useState(null),g=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=E.useState({}),_=St(t,D=>y(D)),S=Array.from(h.layers),[A]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),w=S.indexOf(A),T=m?S.indexOf(m):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,k=T>=w,N=AB(D=>{const j=D.target,V=[...h.branches].some(U=>U.contains(j));!k||V||(a==null||a(D),l==null||l(D),D.defaultPrevented||u==null||u())},g),L=wB(D=>{const j=D.target;[...h.branches].some(U=>U.contains(j))||(s==null||s(D),l==null||l(D),D.defaultPrevented||u==null||u())},g);return bB(D=>{T===h.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&u&&(D.preventDefault(),u()))},g),E.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(wS=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),TS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=wS)}},[m,g,n,h]),E.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),TS())},[m,h]),E.useEffect(()=>{const D=()=>v({});return document.addEventListener(ey,D),()=>document.removeEventListener(ey,D)},[]),b.jsx(We.div,{...d,ref:_,style:{pointerEvents:C?k?"auto":"none":void 0,...e.style},onFocusCapture:tt(e.onFocusCapture,L.onFocusCapture),onBlurCapture:tt(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:tt(e.onPointerDownCapture,N.onPointerDownCapture)})});Qf.displayName=_B;var SB="DismissableLayerBranch",G1=E.forwardRef((e,t)=>{const n=E.useContext(F1),r=E.useRef(null),a=St(t,r);return E.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),b.jsx(We.div,{...e,ref:a})});G1.displayName=SB;function AB(e,t=globalThis==null?void 0:globalThis.document){const n=xr(e),r=E.useRef(!1),a=E.useRef(()=>{});return E.useEffect(()=>{const s=u=>{if(u.target&&!r.current){let d=function(){K1(xB,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function wB(e,t=globalThis==null?void 0:globalThis.document){const n=xr(e),r=E.useRef(!1);return E.useEffect(()=>{const a=s=>{s.target&&!r.current&&K1(EB,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function TS(){const e=new CustomEvent(ey);document.dispatchEvent(e)}function K1(e,t,n,{discrete:r}){const a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?H1(a,s):a.dispatchEvent(s)}var TB=Qf,RB=G1,ln=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},CB="Portal",Jf=E.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[a,s]=E.useState(!1);ln(()=>s(!0),[]);const l=n||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?dz.createPortal(b.jsx(We.div,{...r,ref:t}),l):null});Jf.displayName=CB;function NB(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var Uc=e=>{const{present:t,children:n}=e,r=OB(t),a=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),s=St(r.ref,kB(a));return typeof n=="function"||r.isPresent?E.cloneElement(a,{ref:s}):null};Uc.displayName="Presence";function OB(e){const[t,n]=E.useState(),r=E.useRef(null),a=E.useRef(e),s=E.useRef("none"),l=e?"mounted":"unmounted",[u,d]=NB(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const h=bd(r.current);s.current=u==="mounted"?h:"none"},[u]),ln(()=>{const h=r.current,m=a.current;if(m!==e){const g=s.current,v=bd(h);e?d("MOUNT"):v==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),ln(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,y=v=>{const S=bd(r.current).includes(v.animationName);if(v.target===t&&S&&(d("ANIMATION_END"),!a.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},g=v=>{v.target===t&&(s.current=bd(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:E.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function bd(e){return(e==null?void 0:e.animationName)||"none"}function kB(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var DB=DT[" useInsertionEffect ".trim().toString()]||ln;function df({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,s,l]=IB({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:a;{const m=E.useRef(e!==void 0);E.useEffect(()=>{const y=m.current;y!==u&&console.warn(`${r} is changing from ${y?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const h=E.useCallback(m=>{var y;if(u){const g=LB(m)?m(e):m;g!==e&&((y=l.current)==null||y.call(l,g))}else s(m)},[u,e,s,l]);return[d,h]}function IB({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),a=E.useRef(n),s=E.useRef(t);return DB(()=>{s.current=t},[t]),E.useEffect(()=>{var l;a.current!==n&&((l=s.current)==null||l.call(s,n),a.current=n)},[n,a]),[n,r,s]}function LB(e){return typeof e=="function"}var Z1=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"}),jB="VisuallyHidden",xv=E.forwardRef((e,t)=>b.jsx(We.span,{...e,ref:t,style:{...Z1,...e.style}}));xv.displayName=jB;var Ev="ToastProvider",[Sv,MB,PB]=$1("Toast"),[q1,zB]=Bc("Toast",[PB]),[VB,eh]=q1(Ev),Av=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:l}=e,[u,d]=E.useState(null),[h,m]=E.useState(0),y=E.useRef(!1),g=E.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ev}\`. Expected non-empty \`string\`.`),b.jsx(Sv.Provider,{scope:t,children:b.jsx(VB,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:s,toastCount:h,viewport:u,onViewportChange:d,onToastAdd:E.useCallback(()=>m(v=>v+1),[]),onToastRemove:E.useCallback(()=>m(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:g,children:l})})};Av.displayName=Ev;var W1="ToastViewport",BB=["F8"],ty="toast.viewportPause",ny="toast.viewportResume",wv=E.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=BB,label:a="Notifications ({hotkey})",...s}=e,l=eh(W1,n),u=MB(n),d=E.useRef(null),h=E.useRef(null),m=E.useRef(null),y=E.useRef(null),g=St(t,y,l.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=l.toastCount>0;E.useEffect(()=>{const A=w=>{var C;r.length!==0&&r.every(k=>w[k]||w.code===k)&&((C=y.current)==null||C.focus())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[r]),E.useEffect(()=>{const A=d.current,w=y.current;if(_&&A&&w){const T=()=>{if(!l.isClosePausedRef.current){const L=new CustomEvent(ty);w.dispatchEvent(L),l.isClosePausedRef.current=!0}},C=()=>{if(l.isClosePausedRef.current){const L=new CustomEvent(ny);w.dispatchEvent(L),l.isClosePausedRef.current=!1}},k=L=>{!A.contains(L.relatedTarget)&&C()},N=()=>{A.contains(document.activeElement)||C()};return A.addEventListener("focusin",T),A.addEventListener("focusout",k),A.addEventListener("pointermove",T),A.addEventListener("pointerleave",N),window.addEventListener("blur",T),window.addEventListener("focus",C),()=>{A.removeEventListener("focusin",T),A.removeEventListener("focusout",k),A.removeEventListener("pointermove",T),A.removeEventListener("pointerleave",N),window.removeEventListener("blur",T),window.removeEventListener("focus",C)}}},[_,l.isClosePausedRef]);const S=E.useCallback(({tabbingDirection:A})=>{const T=u().map(C=>{const k=C.ref.current,N=[k,...JB(k)];return A==="forwards"?N:N.reverse()});return(A==="forwards"?T.reverse():T).flat()},[u]);return E.useEffect(()=>{const A=y.current;if(A){const w=T=>{var N,L,D;const C=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!C){const j=document.activeElement,V=T.shiftKey;if(T.target===A&&V){(N=h.current)==null||N.focus();return}const ie=S({tabbingDirection:V?"backwards":"forwards"}),fe=ie.findIndex(Y=>Y===j);Jp(ie.slice(fe+1))?T.preventDefault():V?(L=h.current)==null||L.focus():(D=m.current)==null||D.focus()}};return A.addEventListener("keydown",w),()=>A.removeEventListener("keydown",w)}},[u,S]),b.jsxs(RB,{ref:d,role:"region","aria-label":a.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&b.jsx(ry,{ref:h,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"forwards"});Jp(A)}}),b.jsx(Sv.Slot,{scope:n,children:b.jsx(We.ol,{tabIndex:-1,...s,ref:g})}),_&&b.jsx(ry,{ref:m,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"backwards"});Jp(A)}})]})});wv.displayName=W1;var Y1="ToastFocusProxy",ry=E.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,s=eh(Y1,n);return b.jsx(xv,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{var h;const u=l.relatedTarget;!((h=s.viewport)!=null&&h.contains(u))&&r()}})});ry.displayName=Y1;var $c="Toast",UB="toast.swipeStart",$B="toast.swipeMove",HB="toast.swipeCancel",FB="toast.swipeEnd",Tv=E.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:s,...l}=e,[u,d]=df({prop:r,defaultProp:a??!0,onChange:s,caller:$c});return b.jsx(Uc,{present:n||u,children:b.jsx(ZB,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:xr(e.onPause),onResume:xr(e.onResume),onSwipeStart:tt(e.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:tt(e.onSwipeMove,h=>{const{x:m,y}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:tt(e.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:tt(e.onSwipeEnd,h=>{const{x:m,y}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),d(!1)})})})});Tv.displayName=$c;var[GB,KB]=q1($c,{onClose(){}}),ZB=E.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:s,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:h,onSwipeStart:m,onSwipeMove:y,onSwipeCancel:g,onSwipeEnd:v,..._}=e,S=eh($c,n),[A,w]=E.useState(null),T=St(t,Y=>w(Y)),C=E.useRef(null),k=E.useRef(null),N=a||S.duration,L=E.useRef(0),D=E.useRef(N),j=E.useRef(0),{onToastAdd:V,onToastRemove:U}=S,ue=xr(()=>{var ee;(A==null?void 0:A.contains(document.activeElement))&&((ee=S.viewport)==null||ee.focus()),l()}),ie=E.useCallback(Y=>{!Y||Y===1/0||(window.clearTimeout(j.current),L.current=new Date().getTime(),j.current=window.setTimeout(ue,Y))},[ue]);E.useEffect(()=>{const Y=S.viewport;if(Y){const ee=()=>{ie(D.current),h==null||h()},H=()=>{const ne=new Date().getTime()-L.current;D.current=D.current-ne,window.clearTimeout(j.current),d==null||d()};return Y.addEventListener(ty,H),Y.addEventListener(ny,ee),()=>{Y.removeEventListener(ty,H),Y.removeEventListener(ny,ee)}}},[S.viewport,N,d,h,ie]),E.useEffect(()=>{s&&!S.isClosePausedRef.current&&ie(N)},[s,N,S.isClosePausedRef,ie]),E.useEffect(()=>(V(),()=>U()),[V,U]);const fe=E.useMemo(()=>A?eR(A):null,[A]);return S.viewport?b.jsxs(b.Fragment,{children:[fe&&b.jsx(qB,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:fe}),b.jsx(GB,{scope:n,onClose:ue,children:co.createPortal(b.jsx(Sv.ItemSlot,{scope:n,children:b.jsx(TB,{asChild:!0,onEscapeKeyDown:tt(u,()=>{S.isFocusedToastEscapeKeyDownRef.current||ue(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(We.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":S.swipeDirection,..._,ref:T,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:tt(e.onKeyDown,Y=>{Y.key==="Escape"&&(u==null||u(Y.nativeEvent),Y.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,ue()))}),onPointerDown:tt(e.onPointerDown,Y=>{Y.button===0&&(C.current={x:Y.clientX,y:Y.clientY})}),onPointerMove:tt(e.onPointerMove,Y=>{if(!C.current)return;const ee=Y.clientX-C.current.x,H=Y.clientY-C.current.y,ne=!!k.current,K=["left","right"].includes(S.swipeDirection),ye=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,P=K?ye(0,ee):0,X=K?0:ye(0,H),$=Y.pointerType==="touch"?10:2,Q={x:P,y:X},re={originalEvent:Y,delta:Q};ne?(k.current=Q,_d($B,y,re,{discrete:!1})):RS(Q,S.swipeDirection,$)?(k.current=Q,_d(UB,m,re,{discrete:!1}),Y.target.setPointerCapture(Y.pointerId)):(Math.abs(ee)>$||Math.abs(H)>$)&&(C.current=null)}),onPointerUp:tt(e.onPointerUp,Y=>{const ee=k.current,H=Y.target;if(H.hasPointerCapture(Y.pointerId)&&H.releasePointerCapture(Y.pointerId),k.current=null,C.current=null,ee){const ne=Y.currentTarget,K={originalEvent:Y,delta:ee};RS(ee,S.swipeDirection,S.swipeThreshold)?_d(FB,v,K,{discrete:!0}):_d(HB,g,K,{discrete:!0}),ne.addEventListener("click",ye=>ye.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),qB=e=>{const{__scopeToast:t,children:n,...r}=e,a=eh($c,t),[s,l]=E.useState(!1),[u,d]=E.useState(!1);return XB(()=>l(!0)),E.useEffect(()=>{const h=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(h)},[]),u?null:b.jsx(Jf,{asChild:!0,children:b.jsx(xv,{...r,children:s&&b.jsxs(b.Fragment,{children:[a.label," ",n]})})})},WB="ToastTitle",Rv=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(We.div,{...r,ref:t})});Rv.displayName=WB;var YB="ToastDescription",Cv=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(We.div,{...r,ref:t})});Cv.displayName=YB;var X1="ToastAction",Nv=E.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(J1,{altText:n,asChild:!0,children:b.jsx(th,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${X1}\`. Expected non-empty \`string\`.`),null)});Nv.displayName=X1;var Q1="ToastClose",th=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=KB(Q1,n);return b.jsx(J1,{asChild:!0,children:b.jsx(We.button,{type:"button",...r,ref:t,onClick:tt(e.onClick,a.onClose)})})});th.displayName=Q1;var J1=E.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return b.jsx(We.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function eR(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),QB(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!a)if(s){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...eR(r))}}),t}function _d(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?H1(a,s):a.dispatchEvent(s)}var RS=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),s=r>a;return t==="left"||t==="right"?s&&r>n:!s&&a>n};function XB(e=()=>{}){const t=xr(e);ln(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function QB(e){return e.nodeType===e.ELEMENT_NODE}function JB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Jp(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var eU=Av,tR=wv,nR=Tv,rR=Rv,iR=Cv,tU=Nv,aR=th;const nU=Object.freeze(Object.defineProperty({__proto__:null,Action:tU,Close:aR,Description:iR,Provider:eU,Root:nR,Title:rR,Toast:Tv,ToastAction:Nv,ToastClose:th,ToastDescription:Cv,ToastProvider:Av,ToastTitle:Rv,ToastViewport:wv,Viewport:tR,createToastScope:zB},Symbol.toStringTag,{value:"Module"})),rU=nU,iU=({className:e,...t})=>b.jsx(tR,{className:Ae("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}),aU=cr("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md p-4 pr-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{error:"bg-error/40 text-text",success:"bg-success/30 text-text",default:"bg-card/80 text-text"}},defaultVariants:{variant:"default"}}),oU=({className:e,variant:t,...n})=>b.jsx(nR,{className:Ae(aU({variant:t}),e),...n}),sU=({className:e,...t})=>b.jsx(aR,{className:Ae("text-text/50 hover:text-text/80 focus:outline-hidden absolute right-1 top-1 rounded-md p-1 opacity-0 transition-opacity focus:opacity-100 focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:b.jsx(uo,{className:"size-5"})}),lU=({className:e,...t})=>b.jsx(rR,{className:Ae("text-sm font-semibold [&+div]:text-xs",e),...t}),cU=({className:e,...t})=>b.jsx(iR,{className:Ae("text-sm opacity-90",e),...t}),uU=1,dU=15*60*1e3;let eg=0;const fU=()=>(eg=(eg+1)%Number.MAX_SAFE_INTEGER,eg.toString()),tg=new Map,CS=e=>{if(tg.has(e))return;const t=setTimeout(()=>{tg.delete(e),tc({type:"REMOVE_TOAST",toastId:e})},dU);tg.set(e,t)},hU=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,uU)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?CS(n):e.toasts.forEach(r=>{CS(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Kd=[];let Zd={toasts:[]};const tc=e=>{Zd=hU(Zd,e),Kd.forEach(t=>{t(Zd)})},mU=({...e})=>{const t=fU(),n=a=>tc({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>tc({type:"DISMISS_TOAST",toastId:t});return tc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}},oR=()=>{const[e,t]=E.useState(Zd);return E.useEffect(()=>(Kd.push(t),()=>{const n=Kd.indexOf(t);n>-1&&Kd.splice(n,1)}),[e]),{...e,toast:mU,dismiss:n=>tc({type:"DISMISS_TOAST",toastId:n})}},Ar=e=>{const t=Fr(),{csrfToken:n,oAuth2AccessToken:r}=Vc(),a=r!=null&&r.accessToken?{Authorization:`Bearer ${r.accessToken}`}:void 0;return Ff({headers:a,body:n?{csrf_token:n}:void 0},t)};var pU={};const gU=e=>e.split("_").join(" "),sR=e=>{const{toast:t}=oR();return{...e,onError:n=>{var a;let r;try{if(typeof n>"u")return;r=JSON.parse(n)}catch{r=n}[r].flatMap(s=>s).forEach(s=>t({title:gU((pU.NODE_ENV==="production"?s.title:s.code)??"Error"),description:s.message??n??"An error occurred",variant:"error"})),(a=e.onError)==null||a.call(e,n)},onSuccess:n=>{var r;n!=null&&n.message&&t({title:n.message,description:n.description,variant:"success"}),(r=e.onSuccess)==null||r.call(e,n)}}},yU=(e,{requireUser:t,requireProject:n,requireOrganization:r}={})=>{const a=Fr(),{csrfToken:s,oAuth2AccessToken:l,session:u}=Vc({intlayerConfiguration:a}),d=(e==null?void 0:e.enable)??!0,h=u?u.user:l==null?void 0:l.user,m=u?u.organization:l==null?void 0:l.organization,y=u?u.project:l==null?void 0:l.project;return{...e,enable:d&&(t?!!h:!0)&&(n?!!y:!0)&&(r?!!m:!0)&&(!!s||!u&&!!l)}},Ri=(e,t,n,r)=>{const a=yU(n??{},r),s=sR(a);return zc(e,t,s)},lR=(e,t,n)=>{const r=sR(n??{});return zc(e,t,r)},vU=e=>Ri("logout",Ar().auth.logout,{invalidateQueries:["getSession"],...e}),bU=e=>Ri("getProjects",Ar().project.getProjects,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),_U=e=>Ri("getDictionaries",Ar().dictionary.getDictionaries,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0,requireProject:!0}),xU=e=>Ri("pushDictionaries",Ar().dictionary.pushDictionaries,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),EU=e=>Ri("deleteDictionary",Ar().dictionary.deleteDictionary,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),SU=e=>Ri("getTags",Ar().tag.getTags,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),AU=e=>Ri("auditContentDeclaration",Ar().ai.auditContentDeclarationMetadata,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),wU=e=>Ri("auditContentDeclarationField",Ar().ai.auditContentDeclarationField,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),TU=e=>Ri("autocomplete",Ar().ai.autocomplete,e),RU=e=>lR("writeDictionary",Ar().editor.writeDictionary,e),CU=e=>lR("getDictionaries",Ar().editor.getDictionaries,{store:!0,cache:!0,...e});var ng,NS;function NU(){if(NS)return ng;NS=1;var e=function(T){return t(T)&&!n(T)};function t(w){return!!w&&typeof w=="object"}function n(w){var T=Object.prototype.toString.call(w);return T==="[object RegExp]"||T==="[object Date]"||s(w)}var r=typeof Symbol=="function"&&Symbol.for,a=r?Symbol.for("react.element"):60103;function s(w){return w.$$typeof===a}function l(w){return Array.isArray(w)?[]:{}}function u(w,T){return T.clone!==!1&&T.isMergeableObject(w)?S(l(w),w,T):w}function d(w,T,C){return w.concat(T).map(function(k){return u(k,C)})}function h(w,T){if(!T.customMerge)return S;var C=T.customMerge(w);return typeof C=="function"?C:S}function m(w){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(w).filter(function(T){return Object.propertyIsEnumerable.call(w,T)}):[]}function y(w){return Object.keys(w).concat(m(w))}function g(w,T){try{return T in w}catch{return!1}}function v(w,T){return g(w,T)&&!(Object.hasOwnProperty.call(w,T)&&Object.propertyIsEnumerable.call(w,T))}function _(w,T,C){var k={};return C.isMergeableObject(w)&&y(w).forEach(function(N){k[N]=u(w[N],C)}),y(T).forEach(function(N){v(w,N)||(g(w,N)&&C.isMergeableObject(T[N])?k[N]=h(N,C)(w[N],T[N],C):k[N]=u(T[N],C))}),k}function S(w,T,C){C=C||{},C.arrayMerge=C.arrayMerge||d,C.isMergeableObject=C.isMergeableObject||e,C.cloneUnlessOtherwiseSpecified=u;var k=Array.isArray(T),N=Array.isArray(w),L=k===N;return L?k?C.arrayMerge(w,T,C):_(w,T,C):u(T,C)}S.all=function(T,C){if(!Array.isArray(T))throw new Error("first argument should be an array");return T.reduce(function(k,N){return S(k,N,C)},{})};var A=S;return ng=A,ng}var OU=NU();const kU=Hf(OU),DU=()=>{const{session:e,revalidateSession:t,setSession:n}=Vc(),{logout:r}=vU(),a=e!=null&&e.user?"authenticated":"unauthenticated",s=a==="authenticated",l=a==="unauthenticated",u=e==null?void 0:e.user;return{isAuthenticated:s,isUnauthenticated:l,user:u,revalidateSession:t,logout:async()=>{n(null),await r()}}};var Hc=e=>e.type==="checkbox",Za=e=>e instanceof Date,xn=e=>e==null;const cR=e=>typeof e=="object";var It=e=>!xn(e)&&!Array.isArray(e)&&cR(e)&&!Za(e),uR=e=>It(e)&&e.target?Hc(e.target)?e.target.checked:e.target.value:e,IU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dR=(e,t)=>e.has(IU(t)),LU=e=>{const t=e.constructor&&e.constructor.prototype;return It(t)&&t.hasOwnProperty("isPrototypeOf")},Ov=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function on(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ov&&(e instanceof Blob||r))&&(n||It(e)))if(t=n?[]:{},!n&&!LU(e))t=e;else for(const a in e)e.hasOwnProperty(a)&&(t[a]=on(e[a]));else return e;return t}var nh=e=>Array.isArray(e)?e.filter(Boolean):[],Dt=e=>e===void 0,Se=(e,t,n)=>{if(!t||!It(e))return n;const r=nh(t.split(/[,[\].]+?/)).reduce((a,s)=>xn(a)?a:a[s],e);return Dt(r)||r===e?Dt(e[t])?n:e[t]:r},zn=e=>typeof e=="boolean",kv=e=>/^\w*$/.test(e),fR=e=>nh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),st=(e,t,n)=>{let r=-1;const a=kv(t)?[t]:fR(t),s=a.length,l=s-1;for(;++r<s;){const u=a[r];let d=n;if(r!==l){const h=e[u];d=It(h)||Array.isArray(h)?h:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const ff={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},br={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},pi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},hR=$e.createContext(null),ua=()=>$e.useContext(hR),jU=e=>{const{children:t,...n}=e;return $e.createElement(hR.Provider,{value:n},t)};var mR=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(a,s,{get:()=>{const l=s;return t._proxyFormState[l]!==br.all&&(t._proxyFormState[l]=!r||br.all),n&&(n[l]=!0),e[l]}});return a};const Dv=typeof window<"u"?E.useLayoutEffect:E.useEffect;function MU(e){const t=ua(),{control:n=t.control,disabled:r,name:a,exact:s}=e||{},[l,u]=$e.useState(n._formState),d=$e.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Dv(()=>n._subscribe({name:a,formState:d.current,exact:s,callback:h=>{!r&&u({...n._formState,...h})}}),[a,r,s]),$e.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),$e.useMemo(()=>mR(l,n,d.current,!1),[l,n])}var jr=e=>typeof e=="string",pR=(e,t,n,r,a)=>jr(e)?(r&&t.watch.add(e),Se(n,e,a)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Se(n,s))):(r&&(t.watchAll=!0),n);function PU(e){const t=ua(),{control:n=t.control,name:r,defaultValue:a,disabled:s,exact:l}=e||{},u=$e.useRef(a),[d,h]=$e.useState(n._getWatch(r,u.current));return Dv(()=>n._subscribe({name:r,formState:{values:!0},exact:l,callback:m=>!s&&h(pR(r,n._names,m.values||n._formValues,!1,u.current))}),[r,n,s,l]),$e.useEffect(()=>n._removeUnmounted()),d}function zU(e){const t=ua(),{name:n,disabled:r,control:a=t.control,shouldUnregister:s}=e,l=dR(a._names.array,n),u=PU({control:a,name:n,defaultValue:Se(a._formValues,n,Se(a._defaultValues,n,e.defaultValue)),exact:!0}),d=MU({control:a,name:n,exact:!0}),h=$e.useRef(e),m=$e.useRef(a.register(n,{...e.rules,value:u,...zn(e.disabled)?{disabled:e.disabled}:{}})),y=$e.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Se(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Se(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Se(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Se(d.validatingFields,n)},error:{enumerable:!0,get:()=>Se(d.errors,n)}}),[d,n]),g=$e.useCallback(A=>m.current.onChange({target:{value:uR(A),name:n},type:ff.CHANGE}),[n]),v=$e.useCallback(()=>m.current.onBlur({target:{value:Se(a._formValues,n),name:n},type:ff.BLUR}),[n,a._formValues]),_=$e.useCallback(A=>{const w=Se(a._fields,n);w&&A&&(w._f.ref={focus:()=>A.focus(),select:()=>A.select(),setCustomValidity:T=>A.setCustomValidity(T),reportValidity:()=>A.reportValidity()})},[a._fields,n]),S=$e.useMemo(()=>({name:n,value:u,...zn(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:g,onBlur:v,ref:_}),[n,r,d.disabled,g,v,_,u]);return $e.useEffect(()=>{const A=a._options.shouldUnregister||s;a.register(n,{...h.current.rules,...zn(h.current.disabled)?{disabled:h.current.disabled}:{}});const w=(T,C)=>{const k=Se(a._fields,T);k&&k._f&&(k._f.mount=C)};if(w(n,!0),A){const T=on(Se(a._options.defaultValues,n));st(a._defaultValues,n,T),Dt(Se(a._formValues,n))&&st(a._formValues,n,T)}return!l&&a.register(n),()=>{(l?A&&!a._state.action:A)?a.unregister(n):w(n,!1)}},[n,a,l,s]),$e.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),$e.useMemo(()=>({field:S,formState:d,fieldState:y}),[S,d,y])}const VU=e=>e.render(zU(e));var gR=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},nc=e=>Array.isArray(e)?e:[e],OS=()=>{let e=[];return{get observers(){return e},next:a=>{for(const s of e)s.next&&s.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(s=>s!==a)}}),unsubscribe:()=>{e=[]}}},iy=e=>xn(e)||!cR(e);function ta(e,t){if(iy(e)||iy(t))return e===t;if(Za(e)&&Za(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const s=e[a];if(!r.includes(a))return!1;if(a!=="ref"){const l=t[a];if(Za(s)&&Za(l)||It(s)&&It(l)||Array.isArray(s)&&Array.isArray(l)?!ta(s,l):s!==l)return!1}}return!0}var _n=e=>It(e)&&!Object.keys(e).length,Iv=e=>e.type==="file",_r=e=>typeof e=="function",hf=e=>{if(!Ov)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},yR=e=>e.type==="select-multiple",Lv=e=>e.type==="radio",BU=e=>Lv(e)||Hc(e),rg=e=>hf(e)&&e.isConnected;function UU(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Dt(e)?r++:e[t[r++]];return e}function $U(e){for(const t in e)if(e.hasOwnProperty(t)&&!Dt(e[t]))return!1;return!0}function $t(e,t){const n=Array.isArray(t)?t:kv(t)?[t]:fR(t),r=n.length===1?e:UU(e,n),a=n.length-1,s=n[a];return r&&delete r[s],a!==0&&(It(r)&&_n(r)||Array.isArray(r)&&$U(r))&&$t(e,n.slice(0,-1)),e}var vR=e=>{for(const t in e)if(_r(e[t]))return!0;return!1};function mf(e,t={}){const n=Array.isArray(e);if(It(e)||n)for(const r in e)Array.isArray(e[r])||It(e[r])&&!vR(e[r])?(t[r]=Array.isArray(e[r])?[]:{},mf(e[r],t[r])):xn(e[r])||(t[r]=!0);return t}function bR(e,t,n){const r=Array.isArray(e);if(It(e)||r)for(const a in e)Array.isArray(e[a])||It(e[a])&&!vR(e[a])?Dt(t)||iy(n[a])?n[a]=Array.isArray(e[a])?mf(e[a],[]):{...mf(e[a])}:bR(e[a],xn(t)?{}:t[a],n[a]):n[a]=!ta(e[a],t[a]);return n}var $l=(e,t)=>bR(e,t,mf(t));const kS={value:!1,isValid:!1},DS={value:!0,isValid:!0};var _R=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Dt(e[0].attributes.value)?Dt(e[0].value)||e[0].value===""?DS:{value:e[0].value,isValid:!0}:DS:kS}return kS},xR=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Dt(e)?e:t?e===""?NaN:e&&+e:n&&jr(e)?new Date(e):r?r(e):e;const IS={isValid:!1,value:null};var ER=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,IS):IS;function LS(e){const t=e.ref;return Iv(t)?t.files:Lv(t)?ER(e.refs).value:yR(t)?[...t.selectedOptions].map(({value:n})=>n):Hc(t)?_R(e.refs).value:xR(Dt(t.value)?e.ref.value:t.value,e)}var HU=(e,t,n,r)=>{const a={};for(const s of e){const l=Se(t,s);l&&st(a,s,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},pf=e=>e instanceof RegExp,Hl=e=>Dt(e)?e:pf(e)?e.source:It(e)?pf(e.value)?e.value.source:e.value:e,jS=e=>({isOnSubmit:!e||e===br.onSubmit,isOnBlur:e===br.onBlur,isOnChange:e===br.onChange,isOnAll:e===br.all,isOnTouch:e===br.onTouched});const MS="AsyncFunction";var FU=e=>!!e&&!!e.validate&&!!(_r(e.validate)&&e.validate.constructor.name===MS||It(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===MS)),GU=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),PS=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const rc=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const s=Se(e,a);if(s){const{_f:l,...u}=s;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],a)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(rc(u,t))break}else if(It(u)&&rc(u,t))break}}};function zS(e,t,n){const r=Se(e,n);if(r||kv(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const s=a.join("."),l=Se(t,s),u=Se(e,s);if(l&&!Array.isArray(l)&&n!==s)return{name:n};if(u&&u.type)return{name:s,error:u};a.pop()}return{name:n}}var KU=(e,t,n,r)=>{n(e);const{name:a,...s}=e;return _n(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(l=>t[l]===(!r||br.all))},ZU=(e,t,n)=>!e||!t||e===t||nc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),qU=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,WU=(e,t)=>!nh(Se(e,t)).length&&$t(e,t),YU=(e,t,n)=>{const r=nc(Se(e,n));return st(r,"root",t[n]),st(e,n,r),e},qd=e=>jr(e);function VS(e,t,n="validate"){if(qd(e)||Array.isArray(e)&&e.every(qd)||zn(e)&&!e)return{type:n,message:qd(e)?e:"",ref:t}}var Xo=e=>It(e)&&!pf(e)?e:{value:e,message:""},BS=async(e,t,n,r,a,s)=>{const{ref:l,refs:u,required:d,maxLength:h,minLength:m,min:y,max:g,pattern:v,validate:_,name:S,valueAsNumber:A,mount:w}=e._f,T=Se(n,S);if(!w||t.has(S))return{};const C=u?u[0]:l,k=ie=>{a&&C.reportValidity&&(C.setCustomValidity(zn(ie)?"":ie||""),C.reportValidity())},N={},L=Lv(l),D=Hc(l),j=L||D,V=(A||Iv(l))&&Dt(l.value)&&Dt(T)||hf(l)&&l.value===""||T===""||Array.isArray(T)&&!T.length,U=gR.bind(null,S,r,N),ue=(ie,fe,Y,ee=pi.maxLength,H=pi.minLength)=>{const ne=ie?fe:Y;N[S]={type:ie?ee:H,message:ne,ref:l,...U(ie?ee:H,ne)}};if(s?!Array.isArray(T)||!T.length:d&&(!j&&(V||xn(T))||zn(T)&&!T||D&&!_R(u).isValid||L&&!ER(u).isValid)){const{value:ie,message:fe}=qd(d)?{value:!!d,message:d}:Xo(d);if(ie&&(N[S]={type:pi.required,message:fe,ref:C,...U(pi.required,fe)},!r))return k(fe),N}if(!V&&(!xn(y)||!xn(g))){let ie,fe;const Y=Xo(g),ee=Xo(y);if(!xn(T)&&!isNaN(T)){const H=l.valueAsNumber||T&&+T;xn(Y.value)||(ie=H>Y.value),xn(ee.value)||(fe=H<ee.value)}else{const H=l.valueAsDate||new Date(T),ne=P=>new Date(new Date().toDateString()+" "+P),K=l.type=="time",ye=l.type=="week";jr(Y.value)&&T&&(ie=K?ne(T)>ne(Y.value):ye?T>Y.value:H>new Date(Y.value)),jr(ee.value)&&T&&(fe=K?ne(T)<ne(ee.value):ye?T<ee.value:H<new Date(ee.value))}if((ie||fe)&&(ue(!!ie,Y.message,ee.message,pi.max,pi.min),!r))return k(N[S].message),N}if((h||m)&&!V&&(jr(T)||s&&Array.isArray(T))){const ie=Xo(h),fe=Xo(m),Y=!xn(ie.value)&&T.length>+ie.value,ee=!xn(fe.value)&&T.length<+fe.value;if((Y||ee)&&(ue(Y,ie.message,fe.message),!r))return k(N[S].message),N}if(v&&!V&&jr(T)){const{value:ie,message:fe}=Xo(v);if(pf(ie)&&!T.match(ie)&&(N[S]={type:pi.pattern,message:fe,ref:l,...U(pi.pattern,fe)},!r))return k(fe),N}if(_){if(_r(_)){const ie=await _(T,n),fe=VS(ie,C);if(fe&&(N[S]={...fe,...U(pi.validate,fe.message)},!r))return k(fe.message),N}else if(It(_)){let ie={};for(const fe in _){if(!_n(ie)&&!r)break;const Y=VS(await _[fe](T,n),C,fe);Y&&(ie={...Y,...U(fe,Y.message)},k(Y.message),r&&(N[S]=ie))}if(!_n(ie)&&(N[S]={ref:C,...ie},!r))return N}}return k(!0),N};const XU={mode:br.onSubmit,reValidateMode:br.onChange,shouldFocusError:!0};function QU(e={}){let t={...XU,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:_r(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let a=It(t.defaultValues)||It(t.values)?on(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:on(a),l={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,h=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let y={...m};const g={array:OS(),state:OS()},v=t.criteriaMode===br.all,_=B=>J=>{clearTimeout(h),h=setTimeout(B,J)},S=async B=>{if(!t.disabled&&(m.isValid||y.isValid||B)){const J=t.resolver?_n((await D()).errors):await V(r,!0);J!==n.isValid&&g.state.next({isValid:J})}},A=(B,J)=>{!t.disabled&&(m.isValidating||m.validatingFields||y.isValidating||y.validatingFields)&&((B||Array.from(u.mount)).forEach(se=>{se&&(J?st(n.validatingFields,se,J):$t(n.validatingFields,se))}),g.state.next({validatingFields:n.validatingFields,isValidating:!_n(n.validatingFields)}))},w=(B,J=[],se,we,be=!0,_e=!0)=>{if(we&&se&&!t.disabled){if(l.action=!0,_e&&Array.isArray(Se(r,B))){const Le=se(Se(r,B),we.argA,we.argB);be&&st(r,B,Le)}if(_e&&Array.isArray(Se(n.errors,B))){const Le=se(Se(n.errors,B),we.argA,we.argB);be&&st(n.errors,B,Le),WU(n.errors,B)}if((m.touchedFields||y.touchedFields)&&_e&&Array.isArray(Se(n.touchedFields,B))){const Le=se(Se(n.touchedFields,B),we.argA,we.argB);be&&st(n.touchedFields,B,Le)}(m.dirtyFields||y.dirtyFields)&&(n.dirtyFields=$l(a,s)),g.state.next({name:B,isDirty:ue(B,J),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else st(s,B,J)},T=(B,J)=>{st(n.errors,B,J),g.state.next({errors:n.errors})},C=B=>{n.errors=B,g.state.next({errors:n.errors,isValid:!1})},k=(B,J,se,we)=>{const be=Se(r,B);if(be){const _e=Se(s,B,Dt(se)?Se(a,B):se);Dt(_e)||we&&we.defaultChecked||J?st(s,B,J?_e:LS(be._f)):Y(B,_e),l.mount&&S()}},N=(B,J,se,we,be)=>{let _e=!1,Le=!1;const rt={name:B};if(!t.disabled){if(!se||we){(m.isDirty||y.isDirty)&&(Le=n.isDirty,n.isDirty=rt.isDirty=ue(),_e=Le!==rt.isDirty);const ot=ta(Se(a,B),J);Le=!!Se(n.dirtyFields,B),ot?$t(n.dirtyFields,B):st(n.dirtyFields,B,!0),rt.dirtyFields=n.dirtyFields,_e=_e||(m.dirtyFields||y.dirtyFields)&&Le!==!ot}if(se){const ot=Se(n.touchedFields,B);ot||(st(n.touchedFields,B,se),rt.touchedFields=n.touchedFields,_e=_e||(m.touchedFields||y.touchedFields)&&ot!==se)}_e&&be&&g.state.next(rt)}return _e?rt:{}},L=(B,J,se,we)=>{const be=Se(n.errors,B),_e=(m.isValid||y.isValid)&&zn(J)&&n.isValid!==J;if(t.delayError&&se?(d=_(()=>T(B,se)),d(t.delayError)):(clearTimeout(h),d=null,se?st(n.errors,B,se):$t(n.errors,B)),(se?!ta(be,se):be)||!_n(we)||_e){const Le={...we,..._e&&zn(J)?{isValid:J}:{},errors:n.errors,name:B};n={...n,...Le},g.state.next(Le)}},D=async B=>{A(B,!0);const J=await t.resolver(s,t.context,HU(B||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return A(B),J},j=async B=>{const{errors:J}=await D(B);if(B)for(const se of B){const we=Se(J,se);we?st(n.errors,se,we):$t(n.errors,se)}else n.errors=J;return J},V=async(B,J,se={valid:!0})=>{for(const we in B){const be=B[we];if(be){const{_f:_e,...Le}=be;if(_e){const rt=u.array.has(_e.name),ot=be._f&&FU(be._f);ot&&m.validatingFields&&A([we],!0);const wn=await BS(be,u.disabled,s,v,t.shouldUseNativeValidation&&!J,rt);if(ot&&m.validatingFields&&A([we]),wn[_e.name]&&(se.valid=!1,J))break;!J&&(Se(wn,_e.name)?rt?YU(n.errors,wn,_e.name):st(n.errors,_e.name,wn[_e.name]):$t(n.errors,_e.name))}!_n(Le)&&await V(Le,J,se)}}return se.valid},U=()=>{for(const B of u.unMount){const J=Se(r,B);J&&(J._f.refs?J._f.refs.every(se=>!rg(se)):!rg(J._f.ref))&&le(B)}u.unMount=new Set},ue=(B,J)=>!t.disabled&&(B&&J&&st(s,B,J),!ta(P(),a)),ie=(B,J,se)=>pR(B,u,{...l.mount?s:Dt(J)?a:jr(B)?{[B]:J}:J},se,J),fe=B=>nh(Se(l.mount?s:a,B,t.shouldUnregister?Se(a,B,[]):[])),Y=(B,J,se={})=>{const we=Se(r,B);let be=J;if(we){const _e=we._f;_e&&(!_e.disabled&&st(s,B,xR(J,_e)),be=hf(_e.ref)&&xn(J)?"":J,yR(_e.ref)?[..._e.ref.options].forEach(Le=>Le.selected=be.includes(Le.value)):_e.refs?Hc(_e.ref)?_e.refs.forEach(Le=>{(!Le.defaultChecked||!Le.disabled)&&(Array.isArray(be)?Le.checked=!!be.find(rt=>rt===Le.value):Le.checked=be===Le.value||!!be)}):_e.refs.forEach(Le=>Le.checked=Le.value===be):Iv(_e.ref)?_e.ref.value="":(_e.ref.value=be,_e.ref.type||g.state.next({name:B,values:on(s)})))}(se.shouldDirty||se.shouldTouch)&&N(B,be,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&ye(B)},ee=(B,J,se)=>{for(const we in J){if(!J.hasOwnProperty(we))return;const be=J[we],_e=`${B}.${we}`,Le=Se(r,_e);(u.array.has(B)||It(be)||Le&&!Le._f)&&!Za(be)?ee(_e,be,se):Y(_e,be,se)}},H=(B,J,se={})=>{const we=Se(r,B),be=u.array.has(B),_e=on(J);st(s,B,_e),be?(g.array.next({name:B,values:on(s)}),(m.isDirty||m.dirtyFields||y.isDirty||y.dirtyFields)&&se.shouldDirty&&g.state.next({name:B,dirtyFields:$l(a,s),isDirty:ue(B,_e)})):we&&!we._f&&!xn(_e)?ee(B,_e,se):Y(B,_e,se),PS(B,u)&&g.state.next({...n}),g.state.next({name:l.mount?B:void 0,values:on(s)})},ne=async B=>{l.mount=!0;const J=B.target;let se=J.name,we=!0;const be=Se(r,se),_e=ot=>{we=Number.isNaN(ot)||Za(ot)&&isNaN(ot.getTime())||ta(ot,Se(s,se,ot))},Le=jS(t.mode),rt=jS(t.reValidateMode);if(be){let ot,wn;const ba=J.type?LS(be._f):uR(B),Tr=B.type===ff.BLUR||B.type===ff.FOCUS_OUT,Nh=!GU(be._f)&&!t.resolver&&!Se(n.errors,se)&&!be._f.deps||qU(Tr,Se(n.touchedFields,se),n.isSubmitted,rt,Le),Wr=PS(se,u,Tr);st(s,se,ba),Tr?(be._f.onBlur&&be._f.onBlur(B),d&&d(0)):be._f.onChange&&be._f.onChange(B);const en=N(se,ba,Tr),Oh=!_n(en)||Wr;if(!Tr&&g.state.next({name:se,type:B.type,values:on(s)}),Nh)return(m.isValid||y.isValid)&&(t.mode==="onBlur"?Tr&&S():Tr||S()),Oh&&g.state.next({name:se,...Wr?{}:en});if(!Tr&&Wr&&g.state.next({...n}),t.resolver){const{errors:fr}=await D([se]);if(_e(ba),we){const yn=zS(n.errors,r,se),nu=zS(fr,r,yn.name||se);ot=nu.error,se=nu.name,wn=_n(fr)}}else A([se],!0),ot=(await BS(be,u.disabled,s,v,t.shouldUseNativeValidation))[se],A([se]),_e(ba),we&&(ot?wn=!1:(m.isValid||y.isValid)&&(wn=await V(r,!0)));we&&(be._f.deps&&ye(be._f.deps),L(se,wn,ot,en))}},K=(B,J)=>{if(Se(n.errors,J)&&B.focus)return B.focus(),1},ye=async(B,J={})=>{let se,we;const be=nc(B);if(t.resolver){const _e=await j(Dt(B)?B:be);se=_n(_e),we=B?!be.some(Le=>Se(_e,Le)):se}else B?(we=(await Promise.all(be.map(async _e=>{const Le=Se(r,_e);return await V(Le&&Le._f?{[_e]:Le}:Le)}))).every(Boolean),!(!we&&!n.isValid)&&S()):we=se=await V(r);return g.state.next({...!jr(B)||(m.isValid||y.isValid)&&se!==n.isValid?{}:{name:B},...t.resolver||!B?{isValid:se}:{},errors:n.errors}),J.shouldFocus&&!we&&rc(r,K,B?be:u.mount),we},P=B=>{const J={...l.mount?s:a};return Dt(B)?J:jr(B)?Se(J,B):B.map(se=>Se(J,se))},X=(B,J)=>({invalid:!!Se((J||n).errors,B),isDirty:!!Se((J||n).dirtyFields,B),error:Se((J||n).errors,B),isValidating:!!Se(n.validatingFields,B),isTouched:!!Se((J||n).touchedFields,B)}),$=B=>{B&&nc(B).forEach(J=>$t(n.errors,J)),g.state.next({errors:B?n.errors:{}})},Q=(B,J,se)=>{const we=(Se(r,B,{_f:{}})._f||{}).ref,be=Se(n.errors,B)||{},{ref:_e,message:Le,type:rt,...ot}=be;st(n.errors,B,{...ot,...J,ref:we}),g.state.next({name:B,errors:n.errors,isValid:!1}),se&&se.shouldFocus&&we&&we.focus&&we.focus()},re=(B,J)=>_r(B)?g.state.subscribe({next:se=>B(ie(void 0,J),se)}):ie(B,J,!0),he=B=>g.state.subscribe({next:J=>{ZU(B.name,J.name,B.exact)&&KU(J,B.formState||m,ur,B.reRenderRoot)&&B.callback({values:{...s},...n,...J})}}).unsubscribe,xe=B=>(l.mount=!0,y={...y,...B.formState},he({...B,formState:y})),le=(B,J={})=>{for(const se of B?nc(B):u.mount)u.mount.delete(se),u.array.delete(se),J.keepValue||($t(r,se),$t(s,se)),!J.keepError&&$t(n.errors,se),!J.keepDirty&&$t(n.dirtyFields,se),!J.keepTouched&&$t(n.touchedFields,se),!J.keepIsValidating&&$t(n.validatingFields,se),!t.shouldUnregister&&!J.keepDefaultValue&&$t(a,se);g.state.next({values:on(s)}),g.state.next({...n,...J.keepDirty?{isDirty:ue()}:{}}),!J.keepIsValid&&S()},Ee=({disabled:B,name:J})=>{(zn(B)&&l.mount||B||u.disabled.has(J))&&(B?u.disabled.add(J):u.disabled.delete(J))},ke=(B,J={})=>{let se=Se(r,B);const we=zn(J.disabled)||zn(t.disabled);return st(r,B,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:B}},name:B,mount:!0,...J}}),u.mount.add(B),se?Ee({disabled:zn(J.disabled)?J.disabled:t.disabled,name:B}):k(B,!0,J.value),{...we?{disabled:J.disabled||t.disabled}:{},...t.progressive?{required:!!J.required,min:Hl(J.min),max:Hl(J.max),minLength:Hl(J.minLength),maxLength:Hl(J.maxLength),pattern:Hl(J.pattern)}:{},name:B,onChange:ne,onBlur:ne,ref:be=>{if(be){ke(B,J),se=Se(r,B);const _e=Dt(be.value)&&be.querySelectorAll&&be.querySelectorAll("input,select,textarea")[0]||be,Le=BU(_e),rt=se._f.refs||[];if(Le?rt.find(ot=>ot===_e):_e===se._f.ref)return;st(r,B,{_f:{...se._f,...Le?{refs:[...rt.filter(rg),_e,...Array.isArray(Se(a,B))?[{}]:[]],ref:{type:_e.type,name:B}}:{ref:_e}}}),k(B,!1,void 0,_e)}else se=Se(r,B,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||J.shouldUnregister)&&!(dR(u.array,B)&&l.action)&&u.unMount.add(B)}}},Re=()=>t.shouldFocusError&&rc(r,K,u.mount),Ue=B=>{zn(B)&&(g.state.next({disabled:B}),rc(r,(J,se)=>{const we=Se(r,se);we&&(J.disabled=we._f.disabled||B,Array.isArray(we._f.refs)&&we._f.refs.forEach(be=>{be.disabled=we._f.disabled||B}))},0,!1))},Fe=(B,J)=>async se=>{let we;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let be=on(s);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:_e,values:Le}=await D();n.errors=_e,be=Le}else await V(r);if(u.disabled.size)for(const _e of u.disabled)st(be,_e,void 0);if($t(n.errors,"root"),_n(n.errors)){g.state.next({errors:{}});try{await B(be,se)}catch(_e){we=_e}}else J&&await J({...n.errors},se),Re(),setTimeout(Re);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_n(n.errors)&&!we,submitCount:n.submitCount+1,errors:n.errors}),we)throw we},pt=(B,J={})=>{Se(r,B)&&(Dt(J.defaultValue)?H(B,on(Se(a,B))):(H(B,J.defaultValue),st(a,B,on(J.defaultValue))),J.keepTouched||$t(n.touchedFields,B),J.keepDirty||($t(n.dirtyFields,B),n.isDirty=J.defaultValue?ue(B,on(Se(a,B))):ue()),J.keepError||($t(n.errors,B),m.isValid&&S()),g.state.next({...n}))},Gt=(B,J={})=>{const se=B?on(B):a,we=on(se),be=_n(B),_e=be?a:we;if(J.keepDefaultValues||(a=se),!J.keepValues){if(J.keepDirtyValues){const Le=new Set([...u.mount,...Object.keys($l(a,s))]);for(const rt of Array.from(Le))Se(n.dirtyFields,rt)?st(_e,rt,Se(s,rt)):H(rt,Se(_e,rt))}else{if(Ov&&Dt(B))for(const Le of u.mount){const rt=Se(r,Le);if(rt&&rt._f){const ot=Array.isArray(rt._f.refs)?rt._f.refs[0]:rt._f.ref;if(hf(ot)){const wn=ot.closest("form");if(wn){wn.reset();break}}}}for(const Le of u.mount)H(Le,Se(_e,Le))}s=on(_e),g.array.next({values:{..._e}}),g.state.next({values:{..._e}})}u={mount:J.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!m.isValid||!!J.keepIsValid||!!J.keepDirtyValues,l.watch=!!t.shouldUnregister,g.state.next({submitCount:J.keepSubmitCount?n.submitCount:0,isDirty:be?!1:J.keepDirty?n.isDirty:!!(J.keepDefaultValues&&!ta(B,a)),isSubmitted:J.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:be?{}:J.keepDirtyValues?J.keepDefaultValues&&s?$l(a,s):n.dirtyFields:J.keepDefaultValues&&B?$l(a,B):J.keepDirty?n.dirtyFields:{},touchedFields:J.keepTouched?n.touchedFields:{},errors:J.keepErrors?n.errors:{},isSubmitSuccessful:J.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},kn=(B,J)=>Gt(_r(B)?B(s):B,J),An=(B,J={})=>{const se=Se(r,B),we=se&&se._f;if(we){const be=we.refs?we.refs[0]:we.ref;be.focus&&(be.focus(),J.shouldSelect&&_r(be.select)&&be.select())}},ur=B=>{n={...n,...B}},dr={control:{register:ke,unregister:le,getFieldState:X,handleSubmit:Fe,setError:Q,_subscribe:he,_runSchema:D,_getWatch:ie,_getDirty:ue,_setValid:S,_setFieldArray:w,_setDisabledField:Ee,_setErrors:C,_getFieldArray:fe,_reset:Gt,_resetDefaultValues:()=>_r(t.defaultValues)&&t.defaultValues().then(B=>{kn(B,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:Ue,_subjects:g,_proxyFormState:m,get _fields(){return r},get _formValues(){return s},get _state(){return l},set _state(B){l=B},get _defaultValues(){return a},get _names(){return u},set _names(B){u=B},get _formState(){return n},get _options(){return t},set _options(B){t={...t,...B}}},subscribe:xe,trigger:ye,register:ke,handleSubmit:Fe,watch:re,setValue:H,getValues:P,reset:kn,resetField:pt,clearErrors:$,unregister:le,setError:Q,setFocus:An,getFieldState:X};return{...dr,formControl:dr}}function JU(e={}){const t=$e.useRef(void 0),n=$e.useRef(void 0),[r,a]=$e.useState({isDirty:!1,isValidating:!1,isLoading:_r(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:_r(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e.formControl?e.formControl:QU(e),formState:r},e.formControl&&e.defaultValues&&!_r(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const s=t.current.control;return s._options=e,Dv(()=>{const l=s._subscribe({formState:s._proxyFormState,callback:()=>a({...s._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),s._formState.isReady=!0,l},[s]),$e.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),$e.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode),e.errors&&!_n(e.errors)&&s._setErrors(e.errors)},[s,e.errors,e.mode,e.reValidateMode]),$e.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),$e.useEffect(()=>{if(s._proxyFormState.isDirty){const l=s._getDirty();l!==r.isDirty&&s._subjects.state.next({isDirty:l})}},[s,r.isDirty]),$e.useEffect(()=>{e.values&&!ta(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,a(l=>({...l}))):s._resetDefaultValues()},[s,e.values]),$e.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=mR(r,s),t.current}const US=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Se(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},SR=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?US(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>US(a,n,e))}},e2=(e,t)=>{t.shouldUseNativeValidation&&SR(e,t);const n={};for(const r in e){const a=Se(t.fields,r),s=Object.assign(e[r]||{},{ref:a&&a.ref});if(t2(t.names||Object.keys(e),r)){const l=Object.assign({},Se(n,r));st(l,"root",s),st(n,r,l)}else st(n,r,s)}return n},t2=(e,t)=>{const n=$S(t);return e.some(r=>$S(r).match(`^${n}\\.\\d+`))};function $S(e){return e.replace(/\]|\[/g,"")}function n2(e,t){for(var n={};e.length;){var r=e[0],a=r.code,s=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[l]={message:u.message,type:u.code}}else n[l]={message:s,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(y){return e.push(y)})}),t){var d=n[l].types,h=d&&d[r.code];n[l]=gR(l,t,n,a,h?[].concat(h,r.message):r.message)}e.shift()}return n}function r2(e,t,n){return n===void 0&&(n={}),function(r,a,s){try{return Promise.resolve(function(l,u){try{var d=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(h){return s.shouldUseNativeValidation&&SR({},s),{errors:{},values:n.raw?Object.assign({},r):h}})}catch(h){return u(h)}return d&&d.then?d.then(void 0,u):d}(0,function(l){if(function(u){return Array.isArray(u==null?void 0:u.errors)}(l))return{values:{},errors:e2(n2(l.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}}}const ig=async e=>e&&typeof e.then=="function"?await e:e,i2=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:a,children:s,autoComplete:l,...u})=>{const d=async h=>{const m=(e==null?void 0:e.safeParse(h))??{success:!0,data:void 0};await ig(t==null?void 0:t(h)),m.success?await ig(n==null?void 0:n(m.data)):await ig(r==null?void 0:r(new Error(m.error.issues.map(y=>y.message).join(", "))))};return b.jsx(jU,{...u,children:b.jsx("form",{className:Ae("flex size-full flex-col gap-y-6",a),onSubmit:u.handleSubmit(d),autoComplete:l?"on":"off",noValidate:!0,children:s})})},a2=(e,t)=>{const n=JU({resolver:r2(e),...t}),r=n.formState.isSubmitting,a=n.formState.isSubmitted,s=n.formState.isLoading,l=n.formState.isValid;return{form:n,isSubmitting:r,isSubmitted:a,isLoading:s,isValid:l}},o2=e=>{const t=E.useId(),n=E.useMemo(()=>({id:t}),[t]);return b.jsx(AR,{value:n,children:b.jsx("div",{className:"flex flex-col gap-2 p-2",...e})})},AR=E.createContext({}),wR=E.createContext({}),s2=({...e})=>{const t=E.useMemo(()=>({name:e.name}),[e.name]);return b.jsx(wR,{value:t,children:b.jsx(VU,{...e})})},da=()=>{const e=E.useContext(wR),t=E.useContext(AR),{getFieldState:n,formState:r}=ua(),a=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}},TR=cr("",{variants:{variant:{default:["w-full select-text resize-none rounded-xl border-2 bg-input-background text-base md:text-sm text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error","disabled:opacity-50"],invisible:["w-full border-none bg-inherit text-inherit outline-hidden ring-0"]},size:{md:"px-2 md:py-1 py-3",lg:"p-4 md:py-2"},validationStyleEnabled:{disabled:"",enabled:"valid:border-success invalid:border-error"}},defaultVariants:{variant:"default",size:"md",validationStyleEnabled:"disabled"}}),ks=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...a})=>b.jsx("input",{className:TR({variant:t,size:n,validationStyleEnabled:e?"enabled":"disabled",className:r}),...a}),l2=cr("",{variants:{variant:{default:["pointer rounded border-2 bg-input-background text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","checked:bg-checkbox-checked checked:border-checkbox-checked-border","disabled:opacity-50"]},size:{sm:"size-4",md:"size-5",lg:"size-6"},color:{primary:"accent-primary",secondary:"accent-secondary",destructive:"accent-destructive",neutral:"accent-neutral",light:"accent-light",text:"accent-text",dark:"accent-dark",error:"accent-error",success:"accent-success",custom:"accent-custom"},validationStyleEnabled:{disabled:"",enabled:"valid:border-success invalid:border-error"}},defaultVariants:{variant:"default",color:"primary",validationStyleEnabled:"disabled",size:"md"}}),c2=({validationStyleEnabled:e=!1,label:t,size:n,color:r,variant:a,className:s,...l})=>{const u=E.useId();return b.jsxs(b.Fragment,{children:[b.jsx("input",{type:"checkbox",className:l2({variant:a,size:n,color:r,validationStyleEnabled:e?"enabled":"disabled",className:s}),id:u,...l}),b.jsx("label",{htmlFor:u,children:t})]})},u2=e=>{const[t,n]=E.useState(!1),r=s=>{s.preventDefault(),s.stopPropagation(),n(l=>!l)},a=t?Uz:Vz;return b.jsxs("div",{className:"relative",children:[b.jsx(ks,{...e,"aria-label":"password",type:t?"text":"password"}),b.jsx("button",{"data-testid":"eye-icon",className:"absolute right-2 h-full flex-row items-center",onClick:r,"aria-label":t?"Hide password":"Show password",children:b.jsx(a,{className:"text-neutral mr-2 inline-block",size:20})})]})},RR=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>b.jsx("textarea",{className:Ae("resize-none",TR({variant:t,validationStyleEnabled:n?"enabled":"disabled",className:e})),...r}),CR=({value:e="",onCancel:t,onSave:n,onClick:r,children:a,isDisabled:s,...l})=>{const[u,d]=E.useState(!1),h=E.useRef(null),m=_=>{_.stopPropagation(),d(!1),n()},y=_=>{_.stopPropagation(),d(!1),t()},g=!e||e===""?"-":e,v=E.useCallback(_=>{const S=window.getSelection();S&&S.toString().trim()!==""||h.current&&!h.current.contains(_.target)&&(d(!1),n())},[n]);return E.useEffect(()=>(u?document.addEventListener("click",v):document.removeEventListener("click",v),()=>document.removeEventListener("click",v)),[v,u]),b.jsxs("span",{className:"group/editable-field flex gap-2",role:"button",tabIndex:0,onClick:_=>{d(!0),r==null||r(_)},ref:h,...l,children:[b.jsxs("div",{className:Ae("flex flex-1 gap-2",u?"display":"hidden"),children:[a,b.jsx(ut,{label:"Save",variant:"hoverable",size:"icon-sm",color:"text",Icon:Cs,onClick:m,disabled:s,className:"!text-current"}),b.jsx(ut,{label:"Cancel",color:"text",variant:"hoverable",className:"!text-current",size:"icon-sm",Icon:uo,onClick:y,disabled:s})]},String(u)),b.jsxs("div",{className:Ae("flex flex-1 gap-2",u?"hidden":"display"),children:[b.jsx("span",{className:"ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6",children:g}),b.jsx(ut,{label:"Edit",Icon:S1,color:"text",variant:"hoverable",size:"icon-sm",className:"invisible !text-current group-hover/editable-field:visible",disabled:s,onClick:_=>{_.stopPropagation(),d(!0)}})]})]})},NR=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=E.useRef(null),s=()=>{var h;e==null||e(((h=a.current)==null?void 0:h.value)??"")},l=()=>{a.current&&(a.current.value=a.current.defaultValue??""),t==null||t()};E.useImperativeHandle(n,()=>a.current);const u=E.useMemo(()=>{var h;return r.value??((h=a.current)==null?void 0:h.value)??r.defaultValue},[r.value,r.defaultValue,(d=a.current)==null?void 0:d.value]);return b.jsx(CR,{value:u,onCancel:l,onSave:s,children:b.jsx(ks,{ref:a,...r})})},HS=24,FS=12,jv=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:a,...s})=>{const l=E.useRef(null);E.useImperativeHandle(a,()=>l.current);const u=()=>{const m=l.current;if(!m||!t)return;const y=m.style;y.height="auto";const g=m.scrollHeight,v=HS*r+FS,_=HS+FS;y.height=Math.max(Math.min(g,v),_)+"px"};E.useEffect(()=>{u()},[s.value,s.defaultValue,u]);const d=m=>{n==null||n(m),u()},h=m=>{l.current=m,m&&u()};return b.jsx(RR,{ref:h,onChange:d,className:Ae("overflow-y-scroll",t?"resize-none":"",e),...s})},OR=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=E.useRef(null);E.useImperativeHandle(n,()=>a.current);const s=()=>{var h;e==null||e(((h=a.current)==null?void 0:h.value)??"")},l=()=>{a.current&&(a.current.value=a.current.defaultValue??""),t==null||t()},u=r.value??((d=a.current)==null?void 0:d.value)??r.defaultValue??"";return b.jsx(CR,{value:u,onCancel:l,onSave:s,onClick:h=>{h.preventDefault(),h.stopPropagation()},children:b.jsx(jv,{className:"leading-6",ref:a,onClick:h=>{h.preventDefault(),h.stopPropagation()},...r})})},d2=cr("focus:ring-ring inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-offset-2",{variants:{color:{primary:"border-primary bg-primary text-primary hover:bg-primary-500",secondary:"border-secondary bg-secondary text-secondary hover:bg-secondary-300",destructive:"border-destructive bg-destructive text-destructive hover:bg-destructive-500",neutral:"border-neutral bg-neutral text-neutral hover:bg-neutral-600",light:"border-white bg-white text-white hover:bg-neutral-500",dark:"border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900",text:"border-text bg-text text-text hover:opacity-80",custom:""},variant:{default:"rounded-lg text-text-opposite",none:"border-none bg-opacity-0 text-inherit hover:bg-opacity-0",outline:"rounded-lg border-[1.5px] bg-opacity-0 hover:bg-opacity-30",hoverable:"rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10"}},defaultVariants:{variant:"default",color:"primary"}}),f2=({className:e,variant:t,color:n,...r})=>b.jsx("div",{className:Ae(d2({variant:t,color:n}),e),...r});var h2=DT[" useId ".trim().toString()]||(()=>{}),m2=0;function or(e){const[t,n]=E.useState(h2());return ln(()=>{n(r=>r??String(m2++))},[e]),t?`radix-${t}`:""}var ag="focusScope.autoFocusOnMount",og="focusScope.autoFocusOnUnmount",GS={bubbles:!1,cancelable:!0},p2="FocusScope",Mv=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[u,d]=E.useState(null),h=xr(a),m=xr(s),y=E.useRef(null),g=St(t,S=>d(S)),v=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let S=function(C){if(v.paused||!u)return;const k=C.target;u.contains(k)?y.current=k:Ji(y.current,{select:!0})},A=function(C){if(v.paused||!u)return;const k=C.relatedTarget;k!==null&&(u.contains(k)||Ji(y.current,{select:!0}))},w=function(C){if(document.activeElement===document.body)for(const N of C)N.removedNodes.length>0&&Ji(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",A);const T=new MutationObserver(w);return u&&T.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",A),T.disconnect()}}},[r,u,v.paused]),E.useEffect(()=>{if(u){ZS.add(v);const S=document.activeElement;if(!u.contains(S)){const w=new CustomEvent(ag,GS);u.addEventListener(ag,h),u.dispatchEvent(w),w.defaultPrevented||(g2(x2(kR(u)),{select:!0}),document.activeElement===S&&Ji(u))}return()=>{u.removeEventListener(ag,h),setTimeout(()=>{const w=new CustomEvent(og,GS);u.addEventListener(og,m),u.dispatchEvent(w),w.defaultPrevented||Ji(S??document.body,{select:!0}),u.removeEventListener(og,m),ZS.remove(v)},0)}}},[u,h,m,v]);const _=E.useCallback(S=>{if(!n&&!r||v.paused)return;const A=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,w=document.activeElement;if(A&&w){const T=S.currentTarget,[C,k]=y2(T);C&&k?!S.shiftKey&&w===k?(S.preventDefault(),n&&Ji(C,{select:!0})):S.shiftKey&&w===C&&(S.preventDefault(),n&&Ji(k,{select:!0})):w===T&&S.preventDefault()}},[n,r,v.paused]);return b.jsx(We.div,{tabIndex:-1,...l,ref:g,onKeyDown:_})});Mv.displayName=p2;function g2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ji(r,{select:t}),document.activeElement!==n)return}function y2(e){const t=kR(e),n=KS(t,e),r=KS(t.reverse(),e);return[n,r]}function kR(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function KS(e,t){for(const n of e)if(!v2(n,{upTo:t}))return n}function v2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function b2(e){return e instanceof HTMLInputElement&&"select"in e}function Ji(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&b2(e)&&t&&e.select()}}var ZS=_2();function _2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=qS(e,t),e.unshift(t)},remove(t){var n;e=qS(e,t),(n=e[0])==null||n.resume()}}}function qS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function x2(e){return e.filter(t=>t.tagName!=="A")}var sg=0;function DR(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??WS()),document.body.insertAdjacentElement("beforeend",e[1]??WS()),sg++,()=>{sg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sg--}},[])}function WS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Lr=function(){return Lr=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Lr.apply(this,arguments)};function IR(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function E2(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Wd="right-scroll-bar-position",Yd="width-before-scroll-bar",S2="with-scroll-bars-hidden",A2="--removed-body-scroll-bar-size";function lg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function w2(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var T2=typeof window<"u"?E.useLayoutEffect:E.useEffect,YS=new WeakMap;function R2(e,t){var n=w2(null,function(r){return e.forEach(function(a){return lg(a,r)})});return T2(function(){var r=YS.get(n);if(r){var a=new Set(r),s=new Set(e),l=n.current;a.forEach(function(u){s.has(u)||lg(u,null)}),s.forEach(function(u){a.has(u)||lg(u,l)})}YS.set(n,e)},[e]),n}function C2(e){return e}function N2(e,t){t===void 0&&(t=C2);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(u){return s(u)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(s),l=n}var d=function(){var m=l;l=[],m.forEach(s)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(m){l.push(m),h()},filter:function(m){return l=l.filter(m),n}}}};return a}function O2(e){e===void 0&&(e={});var t=N2(null);return t.options=Lr({async:!0,ssr:!1},e),t}var LR=function(e){var t=e.sideCar,n=IR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,Lr({},n))};LR.isSideCarExport=!0;function k2(e,t){return e.useMedium(t),LR}var jR=O2(),cg=function(){},rh=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:cg,onWheelCapture:cg,onTouchMoveCapture:cg}),a=r[0],s=r[1],l=e.forwardProps,u=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,y=e.shards,g=e.sideCar,v=e.noRelative,_=e.noIsolation,S=e.inert,A=e.allowPinchZoom,w=e.as,T=w===void 0?"div":w,C=e.gapMode,k=IR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,L=R2([n,t]),D=Lr(Lr({},k),a);return E.createElement(E.Fragment,null,m&&E.createElement(N,{sideCar:jR,removeScrollBar:h,shards:y,noRelative:v,noIsolation:_,inert:S,setCallbacks:s,allowPinchZoom:!!A,lockRef:n,gapMode:C}),l?E.cloneElement(E.Children.only(u),Lr(Lr({},D),{ref:L})):E.createElement(T,Lr({},D,{className:d,ref:L}),u))});rh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rh.classNames={fullWidth:Yd,zeroRight:Wd};var D2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function I2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=D2();return t&&e.setAttribute("nonce",t),e}function L2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function j2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var M2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=I2())&&(L2(t,n),j2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},P2=function(){var e=M2();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},MR=function(){var e=P2(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},z2={left:0,top:0,right:0,gap:0},ug=function(e){return parseInt(e||"",10)||0},V2=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[ug(n),ug(r),ug(a)]},B2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return z2;var t=V2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},U2=MR(),fs="data-scroll-locked",$2=function(e,t,n,r){var a=e.left,s=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
210
|
-
.`.concat(S2,` {
|
|
211
|
-
overflow: hidden `).concat(r,`;
|
|
212
|
-
padding-right: `).concat(u,"px ").concat(r,`;
|
|
213
|
-
}
|
|
214
|
-
body[`).concat(fs,`] {
|
|
215
|
-
overflow: hidden `).concat(r,`;
|
|
216
|
-
overscroll-behavior: contain;
|
|
217
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
218
|
-
padding-left: `.concat(a,`px;
|
|
219
|
-
padding-top: `).concat(s,`px;
|
|
220
|
-
padding-right: `).concat(l,`px;
|
|
221
|
-
margin-left:0;
|
|
222
|
-
margin-top:0;
|
|
223
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
224
|
-
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.`).concat(Wd,` {
|
|
228
|
-
right: `).concat(u,"px ").concat(r,`;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.`).concat(Yd,` {
|
|
232
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.`).concat(Wd," .").concat(Wd,` {
|
|
236
|
-
right: 0 `).concat(r,`;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.`).concat(Yd," .").concat(Yd,` {
|
|
240
|
-
margin-right: 0 `).concat(r,`;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
body[`).concat(fs,`] {
|
|
244
|
-
`).concat(A2,": ").concat(u,`px;
|
|
245
|
-
}
|
|
246
|
-
`)},XS=function(){var e=parseInt(document.body.getAttribute(fs)||"0",10);return isFinite(e)?e:0},H2=function(){E.useEffect(function(){return document.body.setAttribute(fs,(XS()+1).toString()),function(){var e=XS()-1;e<=0?document.body.removeAttribute(fs):document.body.setAttribute(fs,e.toString())}},[])},F2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;H2();var s=E.useMemo(function(){return B2(a)},[a]);return E.createElement(U2,{styles:$2(s,!t,a,n?"":"!important")})},ay=!1;if(typeof window<"u")try{var xd=Object.defineProperty({},"passive",{get:function(){return ay=!0,!0}});window.addEventListener("test",xd,xd),window.removeEventListener("test",xd,xd)}catch{ay=!1}var Qo=ay?{passive:!1}:!1,G2=function(e){return e.tagName==="TEXTAREA"},PR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G2(e)&&n[t]==="visible")},K2=function(e){return PR(e,"overflowY")},Z2=function(e){return PR(e,"overflowX")},QS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=zR(e,r);if(a){var s=VR(e,r),l=s[1],u=s[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},q2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},W2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zR=function(e,t){return e==="v"?K2(t):Z2(t)},VR=function(e,t){return e==="v"?q2(t):W2(t)},Y2=function(e,t){return e==="h"&&t==="rtl"?-1:1},X2=function(e,t,n,r,a){var s=Y2(e,window.getComputedStyle(t).direction),l=s*r,u=n.target,d=t.contains(u),h=!1,m=l>0,y=0,g=0;do{var v=VR(e,u),_=v[0],S=v[1],A=v[2],w=S-A-s*_;(_||w)&&zR(e,u)&&(y+=w,g+=_),u=u.parentNode.host||u.parentNode}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(y)<1||!m&&Math.abs(g)<1)&&(h=!0),h},Ed=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},JS=function(e){return[e.deltaX,e.deltaY]},eA=function(e){return e&&"current"in e?e.current:e},Q2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},J2=function(e){return`
|
|
247
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
248
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
249
|
-
`)},e$=0,Jo=[];function t$(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),a=E.useState(e$++)[0],s=E.useState(MR)[0],l=E.useRef(e);E.useEffect(function(){l.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=E2([e.lockRef.current],(e.shards||[]).map(eA),!0).filter(Boolean);return S.forEach(function(A){return A.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=E.useCallback(function(S,A){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var w=Ed(S),T=n.current,C="deltaX"in S?S.deltaX:T[0]-w[0],k="deltaY"in S?S.deltaY:T[1]-w[1],N,L=S.target,D=Math.abs(C)>Math.abs(k)?"h":"v";if("touches"in S&&D==="h"&&L.type==="range")return!1;var j=QS(D,L);if(!j)return!0;if(j?N=D:(N=D==="v"?"h":"v",j=QS(D,L)),!j)return!1;if(!r.current&&"changedTouches"in S&&(C||k)&&(r.current=N),!N)return!0;var V=r.current||N;return X2(V,A,S,V==="h"?C:k)},[]),d=E.useCallback(function(S){var A=S;if(!(!Jo.length||Jo[Jo.length-1]!==s)){var w="deltaY"in A?JS(A):Ed(A),T=t.current.filter(function(N){return N.name===A.type&&(N.target===A.target||A.target===N.shadowParent)&&Q2(N.delta,w)})[0];if(T&&T.should){A.cancelable&&A.preventDefault();return}if(!T){var C=(l.current.shards||[]).map(eA).filter(Boolean).filter(function(N){return N.contains(A.target)}),k=C.length>0?u(A,C[0]):!l.current.noIsolation;k&&A.cancelable&&A.preventDefault()}}},[]),h=E.useCallback(function(S,A,w,T){var C={name:S,delta:A,target:w,should:T,shadowParent:n$(w)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(k){return k!==C})},1)},[]),m=E.useCallback(function(S){n.current=Ed(S),r.current=void 0},[]),y=E.useCallback(function(S){h(S.type,JS(S),S.target,u(S,e.lockRef.current))},[]),g=E.useCallback(function(S){h(S.type,Ed(S),S.target,u(S,e.lockRef.current))},[]);E.useEffect(function(){return Jo.push(s),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Qo),document.addEventListener("touchmove",d,Qo),document.addEventListener("touchstart",m,Qo),function(){Jo=Jo.filter(function(S){return S!==s}),document.removeEventListener("wheel",d,Qo),document.removeEventListener("touchmove",d,Qo),document.removeEventListener("touchstart",m,Qo)}},[]);var v=e.removeScrollBar,_=e.inert;return E.createElement(E.Fragment,null,_?E.createElement(s,{styles:J2(a)}):null,v?E.createElement(F2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function n$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const r$=k2(jR,t$);var Pv=E.forwardRef(function(e,t){return E.createElement(rh,Lr({},e,{ref:t,sideCar:r$}))});Pv.classNames=rh.classNames;var i$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},es=new WeakMap,Sd=new WeakMap,Ad={},dg=0,BR=function(e){return e&&(e.host||BR(e.parentNode))},a$=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=BR(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},o$=function(e,t,n,r){var a=a$(t,Array.isArray(e)?e:[e]);Ad[n]||(Ad[n]=new WeakMap);var s=Ad[n],l=[],u=new Set,d=new Set(a),h=function(y){!y||u.has(y)||(u.add(y),h(y.parentNode))};a.forEach(h);var m=function(y){!y||d.has(y)||Array.prototype.forEach.call(y.children,function(g){if(u.has(g))m(g);else try{var v=g.getAttribute(r),_=v!==null&&v!=="false",S=(es.get(g)||0)+1,A=(s.get(g)||0)+1;es.set(g,S),s.set(g,A),l.push(g),S===1&&_&&Sd.set(g,!0),A===1&&g.setAttribute(n,"true"),_||g.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return m(t),u.clear(),dg++,function(){l.forEach(function(y){var g=es.get(y)-1,v=s.get(y)-1;es.set(y,g),s.set(y,v),g||(Sd.has(y)||y.removeAttribute(r),Sd.delete(y)),v||y.removeAttribute(n)}),dg--,dg||(es=new WeakMap,es=new WeakMap,Sd=new WeakMap,Ad={})}},UR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=i$(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),o$(r,a,n,"aria-hidden")):function(){return null}},ih="Dialog",[$R,xte]=Bc(ih),[s$,wr]=$R(ih),HR=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,u=E.useRef(null),d=E.useRef(null),[h,m]=df({prop:r,defaultProp:a??!1,onChange:s,caller:ih});return b.jsx(s$,{scope:t,triggerRef:u,contentRef:d,contentId:or(),titleId:or(),descriptionId:or(),open:h,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(y=>!y),[m]),modal:l,children:n})};HR.displayName=ih;var FR="DialogTrigger",l$=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(FR,n),s=St(t,a.triggerRef);return b.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Bv(a.open),...r,ref:s,onClick:tt(e.onClick,a.onOpenToggle)})});l$.displayName=FR;var zv="DialogPortal",[c$,GR]=$R(zv,{forceMount:void 0}),KR=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,s=wr(zv,t);return b.jsx(c$,{scope:t,forceMount:n,children:E.Children.map(r,l=>b.jsx(Uc,{present:n||s.open,children:b.jsx(Jf,{asChild:!0,container:a,children:l})}))})};KR.displayName=zv;var gf="DialogOverlay",ZR=E.forwardRef((e,t)=>{const n=GR(gf,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,s=wr(gf,e.__scopeDialog);return s.modal?b.jsx(Uc,{present:r||s.open,children:b.jsx(d$,{...a,ref:t})}):null});ZR.displayName=gf;var u$=vs("DialogOverlay.RemoveScroll"),d$=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(gf,n);return b.jsx(Pv,{as:u$,allowPinchZoom:!0,shards:[a.contentRef],children:b.jsx(We.div,{"data-state":Bv(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),to="DialogContent",qR=E.forwardRef((e,t)=>{const n=GR(to,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,s=wr(to,e.__scopeDialog);return b.jsx(Uc,{present:r||s.open,children:s.modal?b.jsx(f$,{...a,ref:t}):b.jsx(h$,{...a,ref:t})})});qR.displayName=to;var f$=E.forwardRef((e,t)=>{const n=wr(to,e.__scopeDialog),r=E.useRef(null),a=St(t,n.contentRef,r);return E.useEffect(()=>{const s=r.current;if(s)return UR(s)},[]),b.jsx(WR,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:tt(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:tt(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&s.preventDefault()}),onFocusOutside:tt(e.onFocusOutside,s=>s.preventDefault())})}),h$=E.forwardRef((e,t)=>{const n=wr(to,e.__scopeDialog),r=E.useRef(!1),a=E.useRef(!1);return b.jsx(WR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),s.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:s=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=s.target;((h=n.triggerRef.current)==null?void 0:h.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),WR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,u=wr(to,n),d=E.useRef(null),h=St(t,d);return DR(),b.jsxs(b.Fragment,{children:[b.jsx(Mv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:b.jsx(Qf,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Bv(u.open),...l,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(y$,{titleId:u.titleId}),b.jsx(b$,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Vv="DialogTitle",m$=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(Vv,n);return b.jsx(We.h2,{id:a.titleId,...r,ref:t})});m$.displayName=Vv;var YR="DialogDescription",p$=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(YR,n);return b.jsx(We.p,{id:a.descriptionId,...r,ref:t})});p$.displayName=YR;var XR="DialogClose",g$=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(XR,n);return b.jsx(We.button,{type:"button",...r,ref:t,onClick:tt(e.onClick,()=>a.onOpenChange(!1))})});g$.displayName=XR;function Bv(e){return e?"open":"closed"}var QR="DialogTitleWarning",[Ete,JR]=uB(QR,{contentName:to,titleName:Vv,docsSlug:"dialog"}),y$=({titleId:e})=>{const t=JR(QR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
250
|
-
|
|
251
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
252
|
-
|
|
253
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},v$="DialogDescriptionWarning",b$=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${JR(v$).contentName}}.`;return E.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},_$=HR,x$=KR,E$=ZR,S$=qR,tA=1,A$=.9,w$=.8,T$=.17,fg=.1,hg=.999,R$=.9999,C$=.99,N$=/[\\\/_+.#"@\[\(\{&]/,O$=/[\\\/_+.#"@\[\(\{&]/g,k$=/[\s-]/,eC=/[\s-]/g;function oy(e,t,n,r,a,s,l){if(s===t.length)return a===e.length?tA:C$;var u=`${a},${s}`;if(l[u]!==void 0)return l[u];for(var d=r.charAt(s),h=n.indexOf(d,a),m=0,y,g,v,_;h>=0;)y=oy(e,t,n,r,h+1,s+1,l),y>m&&(h===a?y*=tA:N$.test(e.charAt(h-1))?(y*=w$,v=e.slice(a,h-1).match(O$),v&&a>0&&(y*=Math.pow(hg,v.length))):k$.test(e.charAt(h-1))?(y*=A$,_=e.slice(a,h-1).match(eC),_&&a>0&&(y*=Math.pow(hg,_.length))):(y*=T$,a>0&&(y*=Math.pow(hg,h-a))),e.charAt(h)!==t.charAt(s)&&(y*=R$)),(y<fg&&n.charAt(h-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(h-1)!==r.charAt(s))&&(g=oy(e,t,n,r,h+1,s+2,l),g*fg>y&&(y=g*fg)),y>m&&(m=y),h=n.indexOf(d,h+1);return l[u]=m,m}function nA(e){return e.toLowerCase().replace(eC," ")}function D$(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,oy(e,t,nA(e),nA(t),0,0,{})}var Fl='[cmdk-group=""]',mg='[cmdk-group-items=""]',I$='[cmdk-group-heading=""]',tC='[cmdk-item=""]',rA=`${tC}:not([aria-disabled="true"])`,sy="cmdk-item-select",ns="data-value",L$=(e,t,n)=>D$(e,t,n),nC=E.createContext(void 0),Fc=()=>E.useContext(nC),rC=E.createContext(void 0),Uv=()=>E.useContext(rC),iC=E.createContext(void 0),aC=E.forwardRef((e,t)=>{let n=rs(()=>{var $,Q;return{search:"",value:(Q=($=e.value)!=null?$:e.defaultValue)!=null?Q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=rs(()=>new Set),a=rs(()=>new Map),s=rs(()=>new Map),l=rs(()=>new Set),u=oC(e),{label:d,children:h,value:m,onValueChange:y,filter:g,shouldFilter:v,loop:_,disablePointerSelection:S=!1,vimBindings:A=!0,...w}=e,T=or(),C=or(),k=or(),N=E.useRef(null),L=G$();no(()=>{if(m!==void 0){let $=m.trim();n.current.value=$,D.emit()}},[m]),no(()=>{L(6,fe)},[]);let D=E.useMemo(()=>({subscribe:$=>(l.current.add($),()=>l.current.delete($)),snapshot:()=>n.current,setState:($,Q,re)=>{var he,xe,le,Ee;if(!Object.is(n.current[$],Q)){if(n.current[$]=Q,$==="search")ie(),U(),L(1,ue);else if($==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ke=document.getElementById(k);ke?ke.focus():(he=document.getElementById(T))==null||he.focus()}if(L(7,()=>{var ke;n.current.selectedItemId=(ke=Y())==null?void 0:ke.id,D.emit()}),re||L(5,fe),((xe=u.current)==null?void 0:xe.value)!==void 0){let ke=Q??"";(Ee=(le=u.current).onValueChange)==null||Ee.call(le,ke);return}}D.emit()}},emit:()=>{l.current.forEach($=>$())}}),[]),j=E.useMemo(()=>({value:($,Q,re)=>{var he;Q!==((he=s.current.get($))==null?void 0:he.value)&&(s.current.set($,{value:Q,keywords:re}),n.current.filtered.items.set($,V(Q,re)),L(2,()=>{U(),D.emit()}))},item:($,Q)=>(r.current.add($),Q&&(a.current.has(Q)?a.current.get(Q).add($):a.current.set(Q,new Set([$]))),L(3,()=>{ie(),U(),n.current.value||ue(),D.emit()}),()=>{s.current.delete($),r.current.delete($),n.current.filtered.items.delete($);let re=Y();L(4,()=>{ie(),(re==null?void 0:re.getAttribute("id"))===$&&ue(),D.emit()})}),group:$=>(a.current.has($)||a.current.set($,new Set),()=>{s.current.delete($),a.current.delete($)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:T,inputId:k,labelId:C,listInnerRef:N}),[]);function V($,Q){var re,he;let xe=(he=(re=u.current)==null?void 0:re.filter)!=null?he:L$;return $?xe($,n.current.search,Q):0}function U(){if(!n.current.search||u.current.shouldFilter===!1)return;let $=n.current.filtered.items,Q=[];n.current.filtered.groups.forEach(he=>{let xe=a.current.get(he),le=0;xe.forEach(Ee=>{let ke=$.get(Ee);le=Math.max(ke,le)}),Q.push([he,le])});let re=N.current;ee().sort((he,xe)=>{var le,Ee;let ke=he.getAttribute("id"),Re=xe.getAttribute("id");return((le=$.get(Re))!=null?le:0)-((Ee=$.get(ke))!=null?Ee:0)}).forEach(he=>{let xe=he.closest(mg);xe?xe.appendChild(he.parentElement===xe?he:he.closest(`${mg} > *`)):re.appendChild(he.parentElement===re?he:he.closest(`${mg} > *`))}),Q.sort((he,xe)=>xe[1]-he[1]).forEach(he=>{var xe;let le=(xe=N.current)==null?void 0:xe.querySelector(`${Fl}[${ns}="${encodeURIComponent(he[0])}"]`);le==null||le.parentElement.appendChild(le)})}function ue(){let $=ee().find(re=>re.getAttribute("aria-disabled")!=="true"),Q=$==null?void 0:$.getAttribute(ns);D.setState("value",Q||void 0)}function ie(){var $,Q,re,he;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let xe=0;for(let le of r.current){let Ee=(Q=($=s.current.get(le))==null?void 0:$.value)!=null?Q:"",ke=(he=(re=s.current.get(le))==null?void 0:re.keywords)!=null?he:[],Re=V(Ee,ke);n.current.filtered.items.set(le,Re),Re>0&&xe++}for(let[le,Ee]of a.current)for(let ke of Ee)if(n.current.filtered.items.get(ke)>0){n.current.filtered.groups.add(le);break}n.current.filtered.count=xe}function fe(){var $,Q,re;let he=Y();he&&((($=he.parentElement)==null?void 0:$.firstChild)===he&&((re=(Q=he.closest(Fl))==null?void 0:Q.querySelector(I$))==null||re.scrollIntoView({block:"nearest"})),he.scrollIntoView({block:"nearest"}))}function Y(){var $;return($=N.current)==null?void 0:$.querySelector(`${tC}[aria-selected="true"]`)}function ee(){var $;return Array.from((($=N.current)==null?void 0:$.querySelectorAll(rA))||[])}function H($){let Q=ee()[$];Q&&D.setState("value",Q.getAttribute(ns))}function ne($){var Q;let re=Y(),he=ee(),xe=he.findIndex(Ee=>Ee===re),le=he[xe+$];(Q=u.current)!=null&&Q.loop&&(le=xe+$<0?he[he.length-1]:xe+$===he.length?he[0]:he[xe+$]),le&&D.setState("value",le.getAttribute(ns))}function K($){let Q=Y(),re=Q==null?void 0:Q.closest(Fl),he;for(;re&&!he;)re=$>0?H$(re,Fl):F$(re,Fl),he=re==null?void 0:re.querySelector(rA);he?D.setState("value",he.getAttribute(ns)):ne($)}let ye=()=>H(ee().length-1),P=$=>{$.preventDefault(),$.metaKey?ye():$.altKey?K(1):ne(1)},X=$=>{$.preventDefault(),$.metaKey?H(0):$.altKey?K(-1):ne(-1)};return E.createElement(We.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:$=>{var Q;(Q=w.onKeyDown)==null||Q.call(w,$);let re=$.nativeEvent.isComposing||$.keyCode===229;if(!($.defaultPrevented||re))switch($.key){case"n":case"j":{A&&$.ctrlKey&&P($);break}case"ArrowDown":{P($);break}case"p":case"k":{A&&$.ctrlKey&&X($);break}case"ArrowUp":{X($);break}case"Home":{$.preventDefault(),H(0);break}case"End":{$.preventDefault(),ye();break}case"Enter":{$.preventDefault();let he=Y();if(he){let xe=new Event(sy);he.dispatchEvent(xe)}}}}},E.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:Z$},d),ah(e,$=>E.createElement(rC.Provider,{value:D},E.createElement(nC.Provider,{value:j},$))))}),j$=E.forwardRef((e,t)=>{var n,r;let a=or(),s=E.useRef(null),l=E.useContext(iC),u=Fc(),d=oC(e),h=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;no(()=>{if(!h)return u.item(a,l==null?void 0:l.id)},[h]);let m=sC(a,s,[e.value,e.children,s],e.keywords),y=Uv(),g=ra(L=>L.value&&L.value===m.current),v=ra(L=>h||u.filter()===!1?!0:L.search?L.filtered.items.get(a)>0:!0);E.useEffect(()=>{let L=s.current;if(!(!L||e.disabled))return L.addEventListener(sy,_),()=>L.removeEventListener(sy,_)},[v,e.onSelect,e.disabled]);function _(){var L,D;S(),(D=(L=d.current).onSelect)==null||D.call(L,m.current)}function S(){y.setState("value",m.current,!0)}if(!v)return null;let{disabled:A,value:w,onSelect:T,forceMount:C,keywords:k,...N}=e;return E.createElement(We.div,{ref:eo(s,t),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!g,"data-disabled":!!A,"data-selected":!!g,onPointerMove:A||u.getDisablePointerSelection()?void 0:S,onClick:A?void 0:_},e.children)}),M$=E.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...s}=e,l=or(),u=E.useRef(null),d=E.useRef(null),h=or(),m=Fc(),y=ra(v=>a||m.filter()===!1?!0:v.search?v.filtered.groups.has(l):!0);no(()=>m.group(l),[]),sC(l,u,[e.value,e.heading,d]);let g=E.useMemo(()=>({id:l,forceMount:a}),[a]);return E.createElement(We.div,{ref:eo(u,t),...s,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},n&&E.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:h},n),ah(e,v=>E.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?h:void 0},E.createElement(iC.Provider,{value:g},v))))}),P$=E.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=E.useRef(null),s=ra(l=>!l.search);return!n&&!s?null:E.createElement(We.div,{ref:eo(a,t),...r,"cmdk-separator":"",role:"separator"})}),z$=E.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,s=Uv(),l=ra(h=>h.search),u=ra(h=>h.selectedItemId),d=Fc();return E.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),E.createElement(We.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":u,id:d.inputId,type:"text",value:a?e.value:l,onChange:h=>{a||s.setState("search",h.target.value),n==null||n(h.target.value)}})}),V$=E.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,s=E.useRef(null),l=E.useRef(null),u=ra(h=>h.selectedItemId),d=Fc();return E.useEffect(()=>{if(l.current&&s.current){let h=l.current,m=s.current,y,g=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let v=h.offsetHeight;m.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return g.observe(h),()=>{cancelAnimationFrame(y),g.unobserve(h)}}},[]),E.createElement(We.div,{ref:eo(s,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:d.listId},ah(e,h=>E.createElement("div",{ref:eo(l,d.listInnerRef),"cmdk-list-sizer":""},h)))}),B$=E.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:s,container:l,...u}=e;return E.createElement(_$,{open:n,onOpenChange:r},E.createElement(x$,{container:l},E.createElement(E$,{"cmdk-overlay":"",className:a}),E.createElement(S$,{"aria-label":e.label,"cmdk-dialog":"",className:s},E.createElement(aC,{ref:t,...u}))))}),U$=E.forwardRef((e,t)=>ra(n=>n.filtered.count===0)?E.createElement(We.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),$$=E.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...s}=e;return E.createElement(We.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ah(e,l=>E.createElement("div",{"aria-hidden":!0},l)))}),Gc=Object.assign(aC,{List:V$,Item:j$,Input:z$,Group:M$,Separator:P$,Dialog:B$,Empty:U$,Loading:$$});function H$(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function F$(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function oC(e){let t=E.useRef(e);return no(()=>{t.current=e}),t}var no=typeof window>"u"?E.useEffect:E.useLayoutEffect;function rs(e){let t=E.useRef();return t.current===void 0&&(t.current=e()),t}function ra(e){let t=Uv(),n=()=>e(t.snapshot());return E.useSyncExternalStore(t.subscribe,n,n)}function sC(e,t,n,r=[]){let a=E.useRef(),s=Fc();return no(()=>{var l;let u=(()=>{var h;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():a.current}})(),d=r.map(h=>h.trim());s.value(e,u,d),(l=t.current)==null||l.setAttribute(ns,u),a.current=u}),a}var G$=()=>{let[e,t]=E.useState(),n=rs(()=>new Map);return no(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function K$(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ah({asChild:e,children:t},n){return e&&E.isValidElement(t)?E.cloneElement(K$(t),{ref:t.ref},n(t.props.children)):n(t)}var Z$={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const lC=({className:e,...t})=>b.jsx(Gc,{className:Ae("flex size-full flex-col overflow-hidden rounded-md",e),...t}),q$=({className:e,...t})=>b.jsxs("div",{className:"flex w-full items-center","cmdk-input-wrapper":"",children:[b.jsx(Qz,{className:"mr-2 size-4 shrink-0 opacity-50"}),b.jsx(Gc.Input,{className:Ae("placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}),W$=({className:e,...t})=>b.jsx(Gc.List,{className:Ae("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}),Y$=e=>b.jsx(Gc.Empty,{className:"py-6 text-center text-sm",...e}),X$=({className:e,...t})=>b.jsx(Gc.Item,{className:Ae("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}),yf={...lC,Input:q$,List:W$,Empty:Y$,Item:X$},cC=E.createContext(null),oh=()=>{const e=E.useContext(cC);if(!e)throw new Error("useMultiSelect must be used within MultiSelectProvider");return e},Q$=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,className:a,children:s,dir:l,...u})=>{const[d,h]=E.useState(t??[]),[m,y]=E.useState(""),[g,v]=E.useState(!1),[_,S]=E.useState(-1),A=E.useRef(null),[w,T]=E.useState(!1),[C,k]=E.useState("");E.useEffect(()=>{e&&h(e)},[e]);const N=E.useCallback(V=>{if(d.includes(V)){const U=d.filter(ue=>ue!==V);h(U),n==null||n(U)}else{const U=[...d,V];h(U),n==null||n(U)}},[d]),L=E.useCallback(V=>{V.preventDefault();const U=V.currentTarget,ue=U.value.substring(U.selectionStart??0,U.selectionEnd??0);k(ue),T(ue===m)},[m]),D=E.useCallback(V=>{V.stopPropagation();const U=A.current;if(!U)return;const ue=()=>{const Y=_+1;S(Y>d.length-1?r?0:-1:Y)},ie=()=>{const Y=_-1;S(Y<0?d.length-1:Y)},fe=()=>{const Y=_-1<=0?d.length-1===0?-1:0:_-1;S(Y)};switch(V.key){case"ArrowLeft":l==="rtl"?d.length>0&&(_!==-1||r)&&ue():d.length>0&&U.selectionStart===0&&ie();break;case"ArrowRight":l==="rtl"?d.length>0&&U.selectionStart===0&&ie():d.length>0&&(_!==-1||r)&&ue();break;case"Backspace":case"Delete":d.length>0&&(_!==-1&&_<d.length?(N(d[_]),fe()):(U.selectionStart===0&&C===m||w)&&N(d[d.length-1]));break;case"Enter":v(!0);break;case"Escape":_!==-1?S(-1):g&&v(!1);break}},[d,m,_,r]),j=E.useMemo(()=>({value:d,onValueChange:N,open:g,setOpen:v,inputValue:m,setInputValue:y,activeIndex:_,setActiveIndex:S,ref:A,handleSelect:L}),[d,N,g,v,m,y,_,S,A,L]);return b.jsx(cC,{value:j,children:b.jsx(lC,{onKeyDown:D,className:Ae("flex w-full flex-col gap-2 overflow-visible bg-transparent",a),dir:l,...u,children:s})})},J$=({className:e,getBadgeValue:t=s=>s,validationStyleEnabled:n=!1,children:r,...a})=>{const{value:s,onValueChange:l,activeIndex:u}=oh(),d=E.useCallback(h=>{h.preventDefault(),h.stopPropagation()},[]);return b.jsxs("div",{className:Ae("flex w-full flex-col gap-3 rounded-lg p-1 py-2","border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",n&&"valid:border-success invalid:border-error",e),...a,children:[s.length>0&&b.jsx("div",{className:"flex w-full flex-wrap gap-1",children:s.map((h,m)=>b.jsxs(f2,{className:Ae("flex items-center gap-1 rounded-xl px-1",u===m&&"ring-muted-foreground ring-2"),color:"text",children:[b.jsx("span",{className:"text-xs",children:t(h)}),b.jsxs("button",{"aria-label":`Remove ${h} option`,"aria-roledescription":"button to remove option",onMouseDown:d,onClick:()=>l(h),children:[b.jsxs("span",{className:"sr-only",children:["Remove ",h," option"]}),b.jsx(uo,{className:"size-4 cursor-pointer"})]})]},h))}),r]})},eH=({className:e,...t})=>{const{setOpen:n,inputValue:r,setInputValue:a,activeIndex:s,setActiveIndex:l,handleSelect:u,ref:d}=oh();return b.jsx(yf.Input,{...t,tabIndex:0,ref:d,value:r,onValueChange:s===-1?a:void 0,onSelect:u,onBlur:()=>n(!1),onFocus:()=>n(!0),onClick:()=>l(-1),className:Ae("outline-hidden ml-2 flex-1 cursor-pointer",e,s!==-1&&"caret-transparent")})},tH=({children:e})=>{const{open:t}=oh();return b.jsx("div",{className:"relative",children:t&&e})},nH=({className:e,children:t})=>b.jsxs(yf.List,{className:Ae("border-muted bg-input-background absolute top-0 z-10 flex w-full flex-col gap-2 rounded-lg border p-2 shadow-md transition-colors",e),children:[t,b.jsx(yf.Empty,{children:b.jsx("span",{className:"text-muted-foreground",children:"No results found"})})]}),rH=({className:e,value:t,children:n,...r})=>{const{value:a,onValueChange:s,setInputValue:l}=oh(),u=E.useCallback(h=>{h.preventDefault(),h.stopPropagation()},[]),d=a.includes(t);return b.jsxs(yf.Item,{...r,onSelect:()=>{s(t),l("")},className:Ae("flex cursor-pointer justify-between rounded-lg px-2 py-1 transition-colors","hover:bg-neutral/10",e,d&&"opacity-50",r.disabled&&"cursor-not-allowed opacity-50"),onMouseDown:u,children:[n,d&&b.jsx(Cs,{className:"size-4"})]})},hn=Q$;hn.Trigger=J$;hn.Input=eH;hn.Content=tH;hn.List=nH;hn.Item=rH;const iH=({className:e,children:t,...n})=>b.jsxs("i",{className:Ae("text-xs text-neutral-400",e),...n,children:["ⓘ ",t]}),ly=({htmlFor:e,...t})=>b.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",htmlFor:e,...t}),aH=({className:e,...t})=>{const{error:n,formItemId:r}=da();return b.jsx(ly,{className:Ae("mb-2",n&&"text-error",e),htmlFor:r,...t})},oH=({isRequired:e})=>e?b.jsx("span",{"aria-label":"Asterisk meaning the field is required",children:"*"}):b.jsx(b.Fragment,{}),uC=({children:e,isRequired:t,info:n,htmlFor:r,className:a})=>b.jsxs("div",{className:"ml-1 flex gap-1 align-middle text-base leading-none",children:[e&&b.jsxs(aH,{htmlFor:r,id:`${r}-label`,className:Xf("font-bold",a),children:[e,b.jsx(oH,{isRequired:t})]}),n&&b.jsx(iH,{content:n})]});function iA(e,[t,n]){return Math.min(n,Math.max(t,e))}var sH=E.createContext(void 0);function lH(e){const t=E.useContext(sH);return e||t||"ltr"}const cH=["top","right","bottom","left"],ia=Math.min,Bn=Math.max,vf=Math.round,wd=Math.floor,zr=e=>({x:e,y:e}),uH={left:"right",right:"left",bottom:"top",top:"bottom"},dH={start:"end",end:"start"};function cy(e,t,n){return Bn(e,ia(t,n))}function xi(e,t){return typeof e=="function"?e(t):e}function Ei(e){return e.split("-")[0]}function Ds(e){return e.split("-")[1]}function $v(e){return e==="x"?"y":"x"}function Hv(e){return e==="y"?"height":"width"}function bi(e){return["top","bottom"].includes(Ei(e))?"y":"x"}function Fv(e){return $v(bi(e))}function fH(e,t,n){n===void 0&&(n=!1);const r=Ds(e),a=Fv(e),s=Hv(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=bf(l)),[l,bf(l)]}function hH(e){const t=bf(e);return[uy(e),t,uy(t)]}function uy(e){return e.replace(/start|end/g,t=>dH[t])}function mH(e,t,n){const r=["left","right"],a=["right","left"],s=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?s:l;default:return[]}}function pH(e,t,n,r){const a=Ds(e);let s=mH(Ei(e),n==="start",r);return a&&(s=s.map(l=>l+"-"+a),t&&(s=s.concat(s.map(uy)))),s}function bf(e){return e.replace(/left|right|bottom|top/g,t=>uH[t])}function gH(e){return{top:0,right:0,bottom:0,left:0,...e}}function dC(e){return typeof e!="number"?gH(e):{top:e,right:e,bottom:e,left:e}}function _f(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function aA(e,t,n){let{reference:r,floating:a}=e;const s=bi(t),l=Fv(t),u=Hv(l),d=Ei(t),h=s==="y",m=r.x+r.width/2-a.width/2,y=r.y+r.height/2-a.height/2,g=r[u]/2-a[u]/2;let v;switch(d){case"top":v={x:m,y:r.y-a.height};break;case"bottom":v={x:m,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y};break;case"left":v={x:r.x-a.width,y};break;default:v={x:r.x,y:r.y}}switch(Ds(t)){case"start":v[l]-=g*(n&&h?-1:1);break;case"end":v[l]+=g*(n&&h?-1:1);break}return v}const yH=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:l}=n,u=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y}=aA(h,r,d),g=r,v={},_=0;for(let S=0;S<u.length;S++){const{name:A,fn:w}=u[S],{x:T,y:C,data:k,reset:N}=await w({x:m,y,initialPlacement:r,placement:g,strategy:a,middlewareData:v,rects:h,platform:l,elements:{reference:e,floating:t}});m=T??m,y=C??y,v={...v,[A]:{...v[A],...k}},N&&_<=50&&(_++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(h=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:m,y}=aA(h,g,d)),S=-1)}return{x:m,y,placement:g,strategy:a,middlewareData:v}};async function pc(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:s,rects:l,elements:u,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:g=!1,padding:v=0}=xi(t,e),_=dC(v),A=u[g?y==="floating"?"reference":"floating":y],w=_f(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(A)))==null||n?A:A.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:h,rootBoundary:m,strategy:d})),T=y==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),k=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},N=_f(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:T,offsetParent:C,strategy:d}):T);return{top:(w.top-N.top+_.top)/k.y,bottom:(N.bottom-w.bottom+_.bottom)/k.y,left:(w.left-N.left+_.left)/k.x,right:(N.right-w.right+_.right)/k.x}}const vH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:s,platform:l,elements:u,middlewareData:d}=t,{element:h,padding:m=0}=xi(e,t)||{};if(h==null)return{};const y=dC(m),g={x:n,y:r},v=Fv(a),_=Hv(v),S=await l.getDimensions(h),A=v==="y",w=A?"top":"left",T=A?"bottom":"right",C=A?"clientHeight":"clientWidth",k=s.reference[_]+s.reference[v]-g[v]-s.floating[_],N=g[v]-s.reference[v],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let D=L?L[C]:0;(!D||!await(l.isElement==null?void 0:l.isElement(L)))&&(D=u.floating[C]||s.floating[_]);const j=k/2-N/2,V=D/2-S[_]/2-1,U=ia(y[w],V),ue=ia(y[T],V),ie=U,fe=D-S[_]-ue,Y=D/2-S[_]/2+j,ee=cy(ie,Y,fe),H=!d.arrow&&Ds(a)!=null&&Y!==ee&&s.reference[_]/2-(Y<ie?U:ue)-S[_]/2<0,ne=H?Y<ie?Y-ie:Y-fe:0;return{[v]:g[v]+ne,data:{[v]:ee,centerOffset:Y-ee-ne,...H&&{alignmentOffset:ne}},reset:H}}}),bH=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:s,rects:l,initialPlacement:u,platform:d,elements:h}=t,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:S=!0,...A}=xi(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=Ei(a),T=bi(u),C=Ei(u)===u,k=await(d.isRTL==null?void 0:d.isRTL(h.floating)),N=g||(C||!S?[bf(u)]:hH(u)),L=_!=="none";!g&&L&&N.push(...pH(u,S,_,k));const D=[u,...N],j=await pc(t,A),V=[];let U=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&V.push(j[w]),y){const ee=fH(a,l,k);V.push(j[ee[0]],j[ee[1]])}if(U=[...U,{placement:a,overflows:V}],!V.every(ee=>ee<=0)){var ue,ie;const ee=(((ue=s.flip)==null?void 0:ue.index)||0)+1,H=D[ee];if(H){var fe;const K=y==="alignment"?T!==bi(H):!1,ye=((fe=U[0])==null?void 0:fe.overflows[0])>0;if(!K||ye)return{data:{index:ee,overflows:U},reset:{placement:H}}}let ne=(ie=U.filter(K=>K.overflows[0]<=0).sort((K,ye)=>K.overflows[1]-ye.overflows[1])[0])==null?void 0:ie.placement;if(!ne)switch(v){case"bestFit":{var Y;const K=(Y=U.filter(ye=>{if(L){const P=bi(ye.placement);return P===T||P==="y"}return!0}).map(ye=>[ye.placement,ye.overflows.filter(P=>P>0).reduce((P,X)=>P+X,0)]).sort((ye,P)=>ye[1]-P[1])[0])==null?void 0:Y[0];K&&(ne=K);break}case"initialPlacement":ne=u;break}if(a!==ne)return{reset:{placement:ne}}}return{}}}};function oA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sA(e){return cH.some(t=>e[t]>=0)}const _H=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=xi(e,t);switch(r){case"referenceHidden":{const s=await pc(t,{...a,elementContext:"reference"}),l=oA(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:sA(l)}}}case"escaped":{const s=await pc(t,{...a,altBoundary:!0}),l=oA(s,n.floating);return{data:{escapedOffsets:l,escaped:sA(l)}}}default:return{}}}}};async function xH(e,t){const{placement:n,platform:r,elements:a}=e,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ei(n),u=Ds(n),d=bi(n)==="y",h=["left","top"].includes(l)?-1:1,m=s&&d?-1:1,y=xi(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:_}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return u&&typeof _=="number"&&(v=u==="end"?_*-1:_),d?{x:v*m,y:g*h}:{x:g*h,y:v*m}}const EH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:s,placement:l,middlewareData:u}=t,d=await xH(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:s+d.y,data:{...d,placement:l}}}}},SH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:w,y:T}=A;return{x:w,y:T}}},...d}=xi(e,t),h={x:n,y:r},m=await pc(t,d),y=bi(Ei(a)),g=$v(y);let v=h[g],_=h[y];if(s){const A=g==="y"?"top":"left",w=g==="y"?"bottom":"right",T=v+m[A],C=v-m[w];v=cy(T,v,C)}if(l){const A=y==="y"?"top":"left",w=y==="y"?"bottom":"right",T=_+m[A],C=_-m[w];_=cy(T,_,C)}const S=u.fn({...t,[g]:v,[y]:_});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[g]:s,[y]:l}}}}}},AH=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:s,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:h=!0}=xi(e,t),m={x:n,y:r},y=bi(a),g=$v(y);let v=m[g],_=m[y];const S=xi(u,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const C=g==="y"?"height":"width",k=s.reference[g]-s.floating[C]+A.mainAxis,N=s.reference[g]+s.reference[C]-A.mainAxis;v<k?v=k:v>N&&(v=N)}if(h){var w,T;const C=g==="y"?"width":"height",k=["top","left"].includes(Ei(a)),N=s.reference[y]-s.floating[C]+(k&&((w=l.offset)==null?void 0:w[y])||0)+(k?0:A.crossAxis),L=s.reference[y]+s.reference[C]+(k?0:((T=l.offset)==null?void 0:T[y])||0)-(k?A.crossAxis:0);_<N?_=N:_>L&&(_=L)}return{[g]:v,[y]:_}}}},wH=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:s,platform:l,elements:u}=t,{apply:d=()=>{},...h}=xi(e,t),m=await pc(t,h),y=Ei(a),g=Ds(a),v=bi(a)==="y",{width:_,height:S}=s.floating;let A,w;y==="top"||y==="bottom"?(A=y,w=g===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(w=y,A=g==="end"?"top":"bottom");const T=S-m.top-m.bottom,C=_-m.left-m.right,k=ia(S-m[A],T),N=ia(_-m[w],C),L=!t.middlewareData.shift;let D=k,j=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=T),L&&!g){const U=Bn(m.left,0),ue=Bn(m.right,0),ie=Bn(m.top,0),fe=Bn(m.bottom,0);v?j=_-2*(U!==0||ue!==0?U+ue:Bn(m.left,m.right)):D=S-2*(ie!==0||fe!==0?ie+fe:Bn(m.top,m.bottom))}await d({...t,availableWidth:j,availableHeight:D});const V=await l.getDimensions(u.floating);return _!==V.width||S!==V.height?{reset:{rects:!0}}:{}}}};function sh(){return typeof window<"u"}function Is(e){return fC(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kr(e){var t;return(t=(fC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fC(e){return sh()?e instanceof Node||e instanceof $n(e).Node:!1}function Er(e){return sh()?e instanceof Element||e instanceof $n(e).Element:!1}function Hr(e){return sh()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function lA(e){return!sh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function Kc(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function TH(e){return["table","td","th"].includes(Is(e))}function lh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Gv(e){const t=Kv(),n=Er(e)?Sr(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function RH(e){let t=aa(e);for(;Hr(t)&&!bs(t);){if(Gv(t))return t;if(lh(t))return null;t=aa(t)}return null}function Kv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bs(e){return["html","body","#document"].includes(Is(e))}function Sr(e){return $n(e).getComputedStyle(e)}function ch(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function aa(e){if(Is(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lA(e)&&e.host||Kr(e);return lA(t)?t.host:t}function hC(e){const t=aa(e);return bs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Kc(t)?t:hC(t)}function gc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=hC(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),l=$n(a);if(s){const u=dy(l);return t.concat(l,l.visualViewport||[],Kc(a)?a:[],u&&n?gc(u):[])}return t.concat(a,gc(a,[],n))}function dy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mC(e){const t=Sr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Hr(e),s=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=vf(n)!==s||vf(r)!==l;return u&&(n=s,r=l),{width:n,height:r,$:u}}function Zv(e){return Er(e)?e:e.contextElement}function hs(e){const t=Zv(e);if(!Hr(t))return zr(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:s}=mC(t);let l=(s?vf(n.width):n.width)/r,u=(s?vf(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const CH=zr(0);function pC(e){const t=$n(e);return!Kv()||!t.visualViewport?CH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function NH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function ro(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=Zv(e);let l=zr(1);t&&(r?Er(r)&&(l=hs(r)):l=hs(e));const u=NH(s,n,r)?pC(s):zr(0);let d=(a.left+u.x)/l.x,h=(a.top+u.y)/l.y,m=a.width/l.x,y=a.height/l.y;if(s){const g=$n(s),v=r&&Er(r)?$n(r):r;let _=g,S=dy(_);for(;S&&r&&v!==_;){const A=hs(S),w=S.getBoundingClientRect(),T=Sr(S),C=w.left+(S.clientLeft+parseFloat(T.paddingLeft))*A.x,k=w.top+(S.clientTop+parseFloat(T.paddingTop))*A.y;d*=A.x,h*=A.y,m*=A.x,y*=A.y,d+=C,h+=k,_=$n(S),S=dy(_)}}return _f({width:m,height:y,x:d,y:h})}function qv(e,t){const n=ch(e).scrollLeft;return t?t.left+n:ro(Kr(e)).left+n}function gC(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:qv(e,r)),s=r.top+t.scrollTop;return{x:a,y:s}}function OH(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const s=a==="fixed",l=Kr(r),u=t?lh(t.floating):!1;if(r===l||u&&s)return n;let d={scrollLeft:0,scrollTop:0},h=zr(1);const m=zr(0),y=Hr(r);if((y||!y&&!s)&&((Is(r)!=="body"||Kc(l))&&(d=ch(r)),Hr(r))){const v=ro(r);h=hs(r),m.x=v.x+r.clientLeft,m.y=v.y+r.clientTop}const g=l&&!y&&!s?gC(l,d,!0):zr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+m.x+g.x,y:n.y*h.y-d.scrollTop*h.y+m.y+g.y}}function kH(e){return Array.from(e.getClientRects())}function DH(e){const t=Kr(e),n=ch(e),r=e.ownerDocument.body,a=Bn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Bn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+qv(e);const u=-n.scrollTop;return Sr(r).direction==="rtl"&&(l+=Bn(t.clientWidth,r.clientWidth)-a),{width:a,height:s,x:l,y:u}}function IH(e,t){const n=$n(e),r=Kr(e),a=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){s=a.width,l=a.height;const h=Kv();(!h||h&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}return{width:s,height:l,x:u,y:d}}function LH(e,t){const n=ro(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,s=Hr(e)?hs(e):zr(1),l=e.clientWidth*s.x,u=e.clientHeight*s.y,d=a*s.x,h=r*s.y;return{width:l,height:u,x:d,y:h}}function cA(e,t,n){let r;if(t==="viewport")r=IH(e,n);else if(t==="document")r=DH(Kr(e));else if(Er(t))r=LH(t,n);else{const a=pC(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return _f(r)}function yC(e,t){const n=aa(e);return n===t||!Er(n)||bs(n)?!1:Sr(n).position==="fixed"||yC(n,t)}function jH(e,t){const n=t.get(e);if(n)return n;let r=gc(e,[],!1).filter(u=>Er(u)&&Is(u)!=="body"),a=null;const s=Sr(e).position==="fixed";let l=s?aa(e):e;for(;Er(l)&&!bs(l);){const u=Sr(l),d=Gv(l);!d&&u.position==="fixed"&&(a=null),(s?!d&&!a:!d&&u.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Kc(l)&&!d&&yC(e,l))?r=r.filter(m=>m!==l):a=u,l=aa(l)}return t.set(e,r),r}function MH(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?lh(t)?[]:jH(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((h,m)=>{const y=cA(t,m,a);return h.top=Bn(y.top,h.top),h.right=ia(y.right,h.right),h.bottom=ia(y.bottom,h.bottom),h.left=Bn(y.left,h.left),h},cA(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function PH(e){const{width:t,height:n}=mC(e);return{width:t,height:n}}function zH(e,t,n){const r=Hr(t),a=Kr(t),s=n==="fixed",l=ro(e,!0,s,t);let u={scrollLeft:0,scrollTop:0};const d=zr(0);function h(){d.x=qv(a)}if(r||!r&&!s)if((Is(t)!=="body"||Kc(a))&&(u=ch(t)),r){const v=ro(t,!0,s,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else a&&h();s&&!r&&a&&h();const m=a&&!r&&!s?gC(a,u):zr(0),y=l.left+u.scrollLeft-d.x-m.x,g=l.top+u.scrollTop-d.y-m.y;return{x:y,y:g,width:l.width,height:l.height}}function pg(e){return Sr(e).position==="static"}function uA(e,t){if(!Hr(e)||Sr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Kr(e)===n&&(n=n.ownerDocument.body),n}function vC(e,t){const n=$n(e);if(lh(e))return n;if(!Hr(e)){let a=aa(e);for(;a&&!bs(a);){if(Er(a)&&!pg(a))return a;a=aa(a)}return n}let r=uA(e,t);for(;r&&TH(r)&&pg(r);)r=uA(r,t);return r&&bs(r)&&pg(r)&&!Gv(r)?n:r||RH(e)||n}const VH=async function(e){const t=this.getOffsetParent||vC,n=this.getDimensions,r=await n(e.floating);return{reference:zH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function BH(e){return Sr(e).direction==="rtl"}const UH={convertOffsetParentRelativeRectToViewportRelativeRect:OH,getDocumentElement:Kr,getClippingRect:MH,getOffsetParent:vC,getElementRects:VH,getClientRects:kH,getDimensions:PH,getScale:hs,isElement:Er,isRTL:BH};function bC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $H(e,t){let n=null,r;const a=Kr(e);function s(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),s();const h=e.getBoundingClientRect(),{left:m,top:y,width:g,height:v}=h;if(u||t(),!g||!v)return;const _=wd(y),S=wd(a.clientWidth-(m+g)),A=wd(a.clientHeight-(y+v)),w=wd(m),C={rootMargin:-_+"px "+-S+"px "+-A+"px "+-w+"px",threshold:Bn(0,ia(1,d))||1};let k=!0;function N(L){const D=L[0].intersectionRatio;if(D!==d){if(!k)return l();D?l(!1,D):r=setTimeout(()=>{l(!1,1e-7)},1e3)}D===1&&!bC(h,e.getBoundingClientRect())&&l(),k=!1}try{n=new IntersectionObserver(N,{...C,root:a.ownerDocument})}catch{n=new IntersectionObserver(N,C)}n.observe(e)}return l(!0),s}function HH(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Zv(e),m=a||s?[...h?gc(h):[],...gc(t)]:[];m.forEach(w=>{a&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const y=h&&u?$H(h,n):null;let g=-1,v=null;l&&(v=new ResizeObserver(w=>{let[T]=w;T&&T.target===h&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),n()}),h&&!d&&v.observe(h),v.observe(t));let _,S=d?ro(e):null;d&&A();function A(){const w=ro(e);S&&!bC(S,w)&&n(),S=w,_=requestAnimationFrame(A)}return n(),()=>{var w;m.forEach(T=>{a&&T.removeEventListener("scroll",n),s&&T.removeEventListener("resize",n)}),y==null||y(),(w=v)==null||w.disconnect(),v=null,d&&cancelAnimationFrame(_)}}const FH=EH,GH=SH,KH=bH,ZH=wH,qH=_H,dA=vH,WH=AH,YH=(e,t,n)=>{const r=new Map,a={platform:UH,...n},s={...a.platform,_c:r};return yH(e,t,{...a,platform:s})};var Xd=typeof document<"u"?E.useLayoutEffect:E.useEffect;function xf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xf(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const s=a[r];if(!(s==="_owner"&&e.$$typeof)&&!xf(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function _C(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fA(e,t){const n=_C(e);return Math.round(t*n)/n}function gg(e){const t=E.useRef(e);return Xd(()=>{t.current=e}),t}function XH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:s,floating:l}={},transform:u=!0,whileElementsMounted:d,open:h}=e,[m,y]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=E.useState(r);xf(g,r)||v(r);const[_,S]=E.useState(null),[A,w]=E.useState(null),T=E.useCallback(K=>{K!==L.current&&(L.current=K,S(K))},[]),C=E.useCallback(K=>{K!==D.current&&(D.current=K,w(K))},[]),k=s||_,N=l||A,L=E.useRef(null),D=E.useRef(null),j=E.useRef(m),V=d!=null,U=gg(d),ue=gg(a),ie=gg(h),fe=E.useCallback(()=>{if(!L.current||!D.current)return;const K={placement:t,strategy:n,middleware:g};ue.current&&(K.platform=ue.current),YH(L.current,D.current,K).then(ye=>{const P={...ye,isPositioned:ie.current!==!1};Y.current&&!xf(j.current,P)&&(j.current=P,co.flushSync(()=>{y(P)}))})},[g,t,n,ue,ie]);Xd(()=>{h===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,y(K=>({...K,isPositioned:!1})))},[h]);const Y=E.useRef(!1);Xd(()=>(Y.current=!0,()=>{Y.current=!1}),[]),Xd(()=>{if(k&&(L.current=k),N&&(D.current=N),k&&N){if(U.current)return U.current(k,N,fe);fe()}},[k,N,fe,U,V]);const ee=E.useMemo(()=>({reference:L,floating:D,setReference:T,setFloating:C}),[T,C]),H=E.useMemo(()=>({reference:k,floating:N}),[k,N]),ne=E.useMemo(()=>{const K={position:n,left:0,top:0};if(!H.floating)return K;const ye=fA(H.floating,m.x),P=fA(H.floating,m.y);return u?{...K,transform:"translate("+ye+"px, "+P+"px)",..._C(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ye,top:P}},[n,u,H.floating,m.x,m.y]);return E.useMemo(()=>({...m,update:fe,refs:ee,elements:H,floatingStyles:ne}),[m,fe,ee,H,ne])}const QH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?dA({element:r.current,padding:a}).fn(n):{}:r?dA({element:r,padding:a}).fn(n):{}}}},JH=(e,t)=>({...FH(e),options:[e,t]}),eF=(e,t)=>({...GH(e),options:[e,t]}),tF=(e,t)=>({...WH(e),options:[e,t]}),nF=(e,t)=>({...KH(e),options:[e,t]}),rF=(e,t)=>({...ZH(e),options:[e,t]}),iF=(e,t)=>({...qH(e),options:[e,t]}),aF=(e,t)=>({...QH(e),options:[e,t]});var oF="Arrow",xC=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...s}=e;return b.jsx(We.svg,{...s,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});xC.displayName=oF;var sF=xC;function lF(e){const[t,n]=E.useState(void 0);return ln(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let l,u;if("borderBoxSize"in s){const d=s.borderBoxSize,h=Array.isArray(d)?d[0]:d;l=h.inlineSize,u=h.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Wv="Popper",[EC,SC]=Bc(Wv),[cF,AC]=EC(Wv),wC=e=>{const{__scopePopper:t,children:n}=e,[r,a]=E.useState(null);return b.jsx(cF,{scope:t,anchor:r,onAnchorChange:a,children:n})};wC.displayName=Wv;var TC="PopperAnchor",RC=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,s=AC(TC,n),l=E.useRef(null),u=St(t,l);return E.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:b.jsx(We.div,{...a,ref:u})});RC.displayName=TC;var Yv="PopperContent",[uF,dF]=EC(Yv),CC=E.forwardRef((e,t)=>{var le,Ee,ke,Re,Ue,Fe;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:_,...S}=e,A=AC(Yv,n),[w,T]=E.useState(null),C=St(t,pt=>T(pt)),[k,N]=E.useState(null),L=lF(k),D=(L==null?void 0:L.width)??0,j=(L==null?void 0:L.height)??0,V=r+(s!=="center"?"-"+s:""),U=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},ue=Array.isArray(h)?h:[h],ie=ue.length>0,fe={padding:U,boundary:ue.filter(hF),altBoundary:ie},{refs:Y,floatingStyles:ee,placement:H,isPositioned:ne,middlewareData:K}=XH({strategy:"fixed",placement:V,whileElementsMounted:(...pt)=>HH(...pt,{animationFrame:v==="always"}),elements:{reference:A.anchor},middleware:[JH({mainAxis:a+j,alignmentAxis:l}),d&&eF({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?tF():void 0,...fe}),d&&nF({...fe}),rF({...fe,apply:({elements:pt,rects:Gt,availableWidth:kn,availableHeight:An})=>{const{width:ur,height:va}=Gt.reference,dr=pt.floating.style;dr.setProperty("--radix-popper-available-width",`${kn}px`),dr.setProperty("--radix-popper-available-height",`${An}px`),dr.setProperty("--radix-popper-anchor-width",`${ur}px`),dr.setProperty("--radix-popper-anchor-height",`${va}px`)}}),k&&aF({element:k,padding:u}),mF({arrowWidth:D,arrowHeight:j}),g&&iF({strategy:"referenceHidden",...fe})]}),[ye,P]=kC(H),X=xr(_);ln(()=>{ne&&(X==null||X())},[ne,X]);const $=(le=K.arrow)==null?void 0:le.x,Q=(Ee=K.arrow)==null?void 0:Ee.y,re=((ke=K.arrow)==null?void 0:ke.centerOffset)!==0,[he,xe]=E.useState();return ln(()=>{w&&xe(window.getComputedStyle(w).zIndex)},[w]),b.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:ne?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[(Re=K.transformOrigin)==null?void 0:Re.x,(Ue=K.transformOrigin)==null?void 0:Ue.y].join(" "),...((Fe=K.hide)==null?void 0:Fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(uF,{scope:n,placedSide:ye,onArrowChange:N,arrowX:$,arrowY:Q,shouldHideArrow:re,children:b.jsx(We.div,{"data-side":ye,"data-align":P,...S,ref:C,style:{...S.style,animation:ne?void 0:"none"}})})})});CC.displayName=Yv;var NC="PopperArrow",fF={top:"bottom",right:"left",bottom:"top",left:"right"},OC=E.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,s=dF(NC,r),l=fF[s.placedSide];return b.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:b.jsx(sF,{...a,ref:n,style:{...a.style,display:"block"}})})});OC.displayName=NC;function hF(e){return e!==null}var mF=e=>({name:"transformOrigin",options:e,fn(t){var A,w,T;const{placement:n,rects:r,middlewareData:a}=t,l=((A=a.arrow)==null?void 0:A.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[h,m]=kC(n),y={start:"0%",center:"50%",end:"100%"}[m],g=(((w=a.arrow)==null?void 0:w.x)??0)+u/2,v=(((T=a.arrow)==null?void 0:T.y)??0)+d/2;let _="",S="";return h==="bottom"?(_=l?y:`${g}px`,S=`${-d}px`):h==="top"?(_=l?y:`${g}px`,S=`${r.floating.height+d}px`):h==="right"?(_=`${-d}px`,S=l?y:`${v}px`):h==="left"&&(_=`${r.floating.width+d}px`,S=l?y:`${v}px`),{data:{x:_,y:S}}}});function kC(e){const[t,n="center"]=e.split("-");return[t,n]}var pF=wC,gF=RC,yF=CC,vF=OC;function bF(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var _F=[" ","Enter","ArrowUp","ArrowDown"],xF=[" ","Enter"],io="Select",[uh,dh,EF]=$1(io),[Ls,Ste]=Bc(io,[EF,SC]),fh=SC(),[SF,fa]=Ls(io),[AF,wF]=Ls(io),DC=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:s,value:l,defaultValue:u,onValueChange:d,dir:h,name:m,autoComplete:y,disabled:g,required:v,form:_}=e,S=fh(t),[A,w]=E.useState(null),[T,C]=E.useState(null),[k,N]=E.useState(!1),L=lH(h),[D,j]=df({prop:r,defaultProp:a??!1,onChange:s,caller:io}),[V,U]=df({prop:l,defaultProp:u,onChange:d,caller:io}),ue=E.useRef(null),ie=A?_||!!A.closest("form"):!0,[fe,Y]=E.useState(new Set),ee=Array.from(fe).map(H=>H.props.value).join(";");return b.jsx(pF,{...S,children:b.jsxs(SF,{required:v,scope:t,trigger:A,onTriggerChange:w,valueNode:T,onValueNodeChange:C,valueNodeHasChildren:k,onValueNodeHasChildrenChange:N,contentId:or(),value:V,onValueChange:U,open:D,onOpenChange:j,dir:L,triggerPointerDownPosRef:ue,disabled:g,children:[b.jsx(uh.Provider,{scope:t,children:b.jsx(AF,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(H=>{Y(ne=>new Set(ne).add(H))},[]),onNativeOptionRemove:E.useCallback(H=>{Y(ne=>{const K=new Set(ne);return K.delete(H),K})},[]),children:n})}),ie?b.jsxs(rN,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:y,value:V,onChange:H=>U(H.target.value),disabled:g,form:_,children:[V===void 0?b.jsx("option",{value:""}):null,Array.from(fe)]},ee):null]})})};DC.displayName=io;var IC="SelectTrigger",LC=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,s=fh(n),l=fa(IC,n),u=l.disabled||r,d=St(t,l.onTriggerChange),h=dh(n),m=E.useRef("touch"),[y,g,v]=aN(S=>{const A=h().filter(C=>!C.disabled),w=A.find(C=>C.value===l.value),T=oN(A,S,w);T!==void 0&&l.onValueChange(T.value)}),_=S=>{u||(l.onOpenChange(!0),v()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return b.jsx(gF,{asChild:!0,...s,children:b.jsx(We.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":iN(l.value)?"":void 0,...a,ref:d,onClick:tt(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&_(S)}),onPointerDown:tt(a.onPointerDown,S=>{m.current=S.pointerType;const A=S.target;A.hasPointerCapture(S.pointerId)&&A.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(_(S),S.preventDefault())}),onKeyDown:tt(a.onKeyDown,S=>{const A=y.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(A&&S.key===" ")&&_F.includes(S.key)&&(_(),S.preventDefault())})})})});LC.displayName=IC;var jC="SelectValue",MC=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:s,placeholder:l="",...u}=e,d=fa(jC,n),{onValueNodeHasChildrenChange:h}=d,m=s!==void 0,y=St(t,d.onValueNodeChange);return ln(()=>{h(m)},[h,m]),b.jsx(We.span,{...u,ref:y,style:{pointerEvents:"none"},children:iN(d.value)?b.jsx(b.Fragment,{children:l}):s})});MC.displayName=jC;var TF="SelectIcon",PC=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return b.jsx(We.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});PC.displayName=TF;var RF="SelectPortal",zC=e=>b.jsx(Jf,{asChild:!0,...e});zC.displayName=RF;var ao="SelectContent",VC=E.forwardRef((e,t)=>{const n=fa(ao,e.__scopeSelect),[r,a]=E.useState();if(ln(()=>{a(new DocumentFragment)},[]),!n.open){const s=r;return s?co.createPortal(b.jsx(BC,{scope:e.__scopeSelect,children:b.jsx(uh.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),s):null}return b.jsx(UC,{...e,ref:t})});VC.displayName=ao;var yr=10,[BC,ha]=Ls(ao),CF="SelectContentImpl",NF=vs("SelectContent.RemoveScroll"),UC=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:u,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:g,collisionPadding:v,sticky:_,hideWhenDetached:S,avoidCollisions:A,...w}=e,T=fa(ao,n),[C,k]=E.useState(null),[N,L]=E.useState(null),D=St(t,le=>k(le)),[j,V]=E.useState(null),[U,ue]=E.useState(null),ie=dh(n),[fe,Y]=E.useState(!1),ee=E.useRef(!1);E.useEffect(()=>{if(C)return UR(C)},[C]),DR();const H=E.useCallback(le=>{const[Ee,...ke]=ie().map(Fe=>Fe.ref.current),[Re]=ke.slice(-1),Ue=document.activeElement;for(const Fe of le)if(Fe===Ue||(Fe==null||Fe.scrollIntoView({block:"nearest"}),Fe===Ee&&N&&(N.scrollTop=0),Fe===Re&&N&&(N.scrollTop=N.scrollHeight),Fe==null||Fe.focus(),document.activeElement!==Ue))return},[ie,N]),ne=E.useCallback(()=>H([j,C]),[H,j,C]);E.useEffect(()=>{fe&&ne()},[fe,ne]);const{onOpenChange:K,triggerPointerDownPosRef:ye}=T;E.useEffect(()=>{if(C){let le={x:0,y:0};const Ee=Re=>{var Ue,Fe;le={x:Math.abs(Math.round(Re.pageX)-(((Ue=ye.current)==null?void 0:Ue.x)??0)),y:Math.abs(Math.round(Re.pageY)-(((Fe=ye.current)==null?void 0:Fe.y)??0))}},ke=Re=>{le.x<=10&&le.y<=10?Re.preventDefault():C.contains(Re.target)||K(!1),document.removeEventListener("pointermove",Ee),ye.current=null};return ye.current!==null&&(document.addEventListener("pointermove",Ee),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ee),document.removeEventListener("pointerup",ke,{capture:!0})}}},[C,K,ye]),E.useEffect(()=>{const le=()=>K(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[K]);const[P,X]=aN(le=>{const Ee=ie().filter(Ue=>!Ue.disabled),ke=Ee.find(Ue=>Ue.ref.current===document.activeElement),Re=oN(Ee,le,ke);Re&&setTimeout(()=>Re.ref.current.focus())}),$=E.useCallback((le,Ee,ke)=>{const Re=!ee.current&&!ke;(T.value!==void 0&&T.value===Ee||Re)&&(V(le),Re&&(ee.current=!0))},[T.value]),Q=E.useCallback(()=>C==null?void 0:C.focus(),[C]),re=E.useCallback((le,Ee,ke)=>{const Re=!ee.current&&!ke;(T.value!==void 0&&T.value===Ee||Re)&&ue(le)},[T.value]),he=r==="popper"?fy:$C,xe=he===fy?{side:u,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:g,collisionPadding:v,sticky:_,hideWhenDetached:S,avoidCollisions:A}:{};return b.jsx(BC,{scope:n,content:C,viewport:N,onViewportChange:L,itemRefCallback:$,selectedItem:j,onItemLeave:Q,itemTextRefCallback:re,focusSelectedItem:ne,selectedItemText:U,position:r,isPositioned:fe,searchRef:P,children:b.jsx(Pv,{as:NF,allowPinchZoom:!0,children:b.jsx(Mv,{asChild:!0,trapped:T.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:tt(a,le=>{var Ee;(Ee=T.trigger)==null||Ee.focus({preventScroll:!0}),le.preventDefault()}),children:b.jsx(Qf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:b.jsx(he,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:le=>le.preventDefault(),...w,...xe,onPlaced:()=>Y(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:tt(w.onKeyDown,le=>{const Ee=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!Ee&&le.key.length===1&&X(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let Re=ie().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);if(["ArrowUp","End"].includes(le.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Ue=le.target,Fe=Re.indexOf(Ue);Re=Re.slice(Fe+1)}setTimeout(()=>H(Re)),le.preventDefault()}})})})})})})});UC.displayName=CF;var OF="SelectItemAlignedPosition",$C=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,s=fa(ao,n),l=ha(ao,n),[u,d]=E.useState(null),[h,m]=E.useState(null),y=St(t,D=>m(D)),g=dh(n),v=E.useRef(!1),_=E.useRef(!0),{viewport:S,selectedItem:A,selectedItemText:w,focusSelectedItem:T}=l,C=E.useCallback(()=>{if(s.trigger&&s.valueNode&&u&&h&&S&&A&&w){const D=s.trigger.getBoundingClientRect(),j=h.getBoundingClientRect(),V=s.valueNode.getBoundingClientRect(),U=w.getBoundingClientRect();if(s.dir!=="rtl"){const Ue=U.left-j.left,Fe=V.left-Ue,pt=D.left-Fe,Gt=D.width+pt,kn=Math.max(Gt,j.width),An=window.innerWidth-yr,ur=iA(Fe,[yr,Math.max(yr,An-kn)]);u.style.minWidth=Gt+"px",u.style.left=ur+"px"}else{const Ue=j.right-U.right,Fe=window.innerWidth-V.right-Ue,pt=window.innerWidth-D.right-Fe,Gt=D.width+pt,kn=Math.max(Gt,j.width),An=window.innerWidth-yr,ur=iA(Fe,[yr,Math.max(yr,An-kn)]);u.style.minWidth=Gt+"px",u.style.right=ur+"px"}const ue=g(),ie=window.innerHeight-yr*2,fe=S.scrollHeight,Y=window.getComputedStyle(h),ee=parseInt(Y.borderTopWidth,10),H=parseInt(Y.paddingTop,10),ne=parseInt(Y.borderBottomWidth,10),K=parseInt(Y.paddingBottom,10),ye=ee+H+fe+K+ne,P=Math.min(A.offsetHeight*5,ye),X=window.getComputedStyle(S),$=parseInt(X.paddingTop,10),Q=parseInt(X.paddingBottom,10),re=D.top+D.height/2-yr,he=ie-re,xe=A.offsetHeight/2,le=A.offsetTop+xe,Ee=ee+H+le,ke=ye-Ee;if(Ee<=re){const Ue=ue.length>0&&A===ue[ue.length-1].ref.current;u.style.bottom="0px";const Fe=h.clientHeight-S.offsetTop-S.offsetHeight,pt=Math.max(he,xe+(Ue?Q:0)+Fe+ne),Gt=Ee+pt;u.style.height=Gt+"px"}else{const Ue=ue.length>0&&A===ue[0].ref.current;u.style.top="0px";const pt=Math.max(re,ee+S.offsetTop+(Ue?$:0)+xe)+ke;u.style.height=pt+"px",S.scrollTop=Ee-re+S.offsetTop}u.style.margin=`${yr}px 0`,u.style.minHeight=P+"px",u.style.maxHeight=ie+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[g,s.trigger,s.valueNode,u,h,S,A,w,s.dir,r]);ln(()=>C(),[C]);const[k,N]=E.useState();ln(()=>{h&&N(window.getComputedStyle(h).zIndex)},[h]);const L=E.useCallback(D=>{D&&_.current===!0&&(C(),T==null||T(),_.current=!1)},[C,T]);return b.jsx(DF,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:L,children:b.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:b.jsx(We.div,{...a,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});$C.displayName=OF;var kF="SelectPopperPosition",fy=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=yr,...s}=e,l=fh(n);return b.jsx(yF,{...l,...s,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...s.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)"}})});fy.displayName=kF;var[DF,Xv]=Ls(ao,{}),hy="SelectViewport",HC=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,s=ha(hy,n),l=Xv(hy,n),u=St(t,s.onViewportChange),d=E.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),b.jsx(uh.Slot,{scope:n,children:b.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:tt(a.onScroll,h=>{const m=h.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&y){const v=Math.abs(d.current-m.scrollTop);if(v>0){const _=window.innerHeight-yr*2,S=parseFloat(y.style.minHeight),A=parseFloat(y.style.height),w=Math.max(S,A);if(w<_){const T=w+v,C=Math.min(_,T),k=T-C;y.style.height=C+"px",y.style.bottom==="0px"&&(m.scrollTop=k>0?k:0,y.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});HC.displayName=hy;var FC="SelectGroup",[IF,LF]=Ls(FC),GC=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=or();return b.jsx(IF,{scope:n,id:a,children:b.jsx(We.div,{role:"group","aria-labelledby":a,...r,ref:t})})});GC.displayName=FC;var KC="SelectLabel",ZC=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=LF(KC,n);return b.jsx(We.div,{id:a.id,...r,ref:t})});ZC.displayName=KC;var Ef="SelectItem",[jF,qC]=Ls(Ef),WC=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:s,...l}=e,u=fa(Ef,n),d=ha(Ef,n),h=u.value===r,[m,y]=E.useState(s??""),[g,v]=E.useState(!1),_=St(t,T=>{var C;return(C=d.itemRefCallback)==null?void 0:C.call(d,T,r,a)}),S=or(),A=E.useRef("touch"),w=()=>{a||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return b.jsx(jF,{scope:n,value:r,disabled:a,textId:S,isSelected:h,onItemTextChange:E.useCallback(T=>{y(C=>C||((T==null?void 0:T.textContent)??"").trim())},[]),children:b.jsx(uh.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:b.jsx(We.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":h&&g,"data-state":h?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:_,onFocus:tt(l.onFocus,()=>v(!0)),onBlur:tt(l.onBlur,()=>v(!1)),onClick:tt(l.onClick,()=>{A.current!=="mouse"&&w()}),onPointerUp:tt(l.onPointerUp,()=>{A.current==="mouse"&&w()}),onPointerDown:tt(l.onPointerDown,T=>{A.current=T.pointerType}),onPointerMove:tt(l.onPointerMove,T=>{var C;A.current=T.pointerType,a?(C=d.onItemLeave)==null||C.call(d):A.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:tt(l.onPointerLeave,T=>{var C;T.currentTarget===document.activeElement&&((C=d.onItemLeave)==null||C.call(d))}),onKeyDown:tt(l.onKeyDown,T=>{var k;((k=d.searchRef)==null?void 0:k.current)!==""&&T.key===" "||(xF.includes(T.key)&&w(),T.key===" "&&T.preventDefault())})})})})});WC.displayName=Ef;var Xl="SelectItemText",YC=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...s}=e,l=fa(Xl,n),u=ha(Xl,n),d=qC(Xl,n),h=wF(Xl,n),[m,y]=E.useState(null),g=St(t,w=>y(w),d.onItemTextChange,w=>{var T;return(T=u.itemTextRefCallback)==null?void 0:T.call(u,w,d.value,d.disabled)}),v=m==null?void 0:m.textContent,_=E.useMemo(()=>b.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:S,onNativeOptionRemove:A}=h;return ln(()=>(S(_),()=>A(_)),[S,A,_]),b.jsxs(b.Fragment,{children:[b.jsx(We.span,{id:d.textId,...s,ref:g}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?co.createPortal(s.children,l.valueNode):null]})});YC.displayName=Xl;var XC="SelectItemIndicator",QC=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return qC(XC,n).isSelected?b.jsx(We.span,{"aria-hidden":!0,...r,ref:t}):null});QC.displayName=XC;var my="SelectScrollUpButton",JC=E.forwardRef((e,t)=>{const n=ha(my,e.__scopeSelect),r=Xv(my,e.__scopeSelect),[a,s]=E.useState(!1),l=St(t,r.onScrollButtonChange);return ln(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollTop>0;s(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?b.jsx(tN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});JC.displayName=my;var py="SelectScrollDownButton",eN=E.forwardRef((e,t)=>{const n=ha(py,e.__scopeSelect),r=Xv(py,e.__scopeSelect),[a,s]=E.useState(!1),l=St(t,r.onScrollButtonChange);return ln(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<h;s(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?b.jsx(tN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});eN.displayName=py;var tN=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,s=ha("SelectScrollButton",n),l=E.useRef(null),u=dh(n),d=E.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return E.useEffect(()=>()=>d(),[d]),ln(()=>{var m;const h=u().find(y=>y.ref.current===document.activeElement);(m=h==null?void 0:h.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),b.jsx(We.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:tt(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:tt(a.onPointerMove,()=>{var h;(h=s.onItemLeave)==null||h.call(s),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:tt(a.onPointerLeave,()=>{d()})})}),MF="SelectSeparator",nN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(We.div,{"aria-hidden":!0,...r,ref:t})});nN.displayName=MF;var gy="SelectArrow",PF=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=fh(n),s=fa(gy,n),l=ha(gy,n);return s.open&&l.position==="popper"?b.jsx(vF,{...a,...r,ref:t}):null});PF.displayName=gy;var zF="SelectBubbleInput",rN=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=E.useRef(null),s=St(r,a),l=bF(t);return E.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&m){const y=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(y)}},[l,t]),b.jsx(We.select,{...n,style:{...Z1,...n.style},ref:s,defaultValue:t})});rN.displayName=zF;function iN(e){return e===""||e===void 0}function aN(e){const t=xr(e),n=E.useRef(""),r=E.useRef(0),a=E.useCallback(l=>{const u=n.current+l;t(u),function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(u)},[t]),s=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,s]}function oN(e,t,n){const a=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=VF(e,Math.max(s,0));a.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function VF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var BF=DC,UF=LC,$F=MC,HF=PC,FF=zC,GF=VC,KF=HC,ZF=GC,qF=ZC,WF=WC,YF=YC,XF=QC,QF=JC,JF=eN,e4=nN;const t4=BF,n4=ZF,r4=$F,i4=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>b.jsxs(UF,{className:Ae("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap rounded-md border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",e&&"valid:border-success invalid:border-error",t),...r,children:[n,b.jsx(HF,{asChild:!0,children:b.jsx(Nz,{className:"size-4 opacity-50"})})]}),sN=({className:e,...t})=>b.jsx(QF,{className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(Rz,{})}),lN=({className:e,...t})=>b.jsx(JF,{className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(E1,{})}),a4=({className:e,children:t,position:n="popper",...r})=>b.jsx(FF,{children:b.jsxs(GF,{className:Ae("bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 p-1 text-sm shadow-none outline-0 transition-all","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[b.jsx(sN,{}),b.jsx(KF,{className:Ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(lN,{})]})}),o4=({className:e,...t})=>b.jsx(qF,{className:Ae("px-1 py-0.5 text-sm font-semibold",e),...t}),s4=({className:e,children:t,...n})=>b.jsxs(WF,{className:Ae("focus:bg-neutral/10 outline-hidden relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:b.jsx(XF,{children:b.jsx(Cs,{className:"size-4"})})}),b.jsx(YF,{children:t})]}),l4=({className:e,...t})=>b.jsx(e4,{className:Ae("-mx-1 my-1 h-px bg-red-300",e),...t}),Ie=t4;Ie.Group=n4;Ie.Value=r4;Ie.Trigger=i4;Ie.ScrollUpButton=sN;Ie.ScrollDownButton=lN;Ie.Content=a4;Ie.Label=o4;Ie.Item=s4;Ie.Separator=l4;const c4=e=>(e==null?void 0:e.getAttribute("aria-selected"))==="true",u4=(e,t=c4,n=!1)=>{const[r,a]=E.useState(null),[s,l]=E.useState(null),u=e.current.length;return E.useEffect(()=>{const d=()=>{let S=null;if(s?S=s:S=e.current.find(t)??null,!S){a(T=>({left:0,width:0,...T,opacity:0}));return}const A=S.offsetLeft,w=S.offsetWidth;a({left:A,width:w,opacity:1})};d(),window.addEventListener("resize",d),window.addEventListener("DOMContentLoaded",d);const h=[];e.current.forEach(S=>{if(S){const A=new MutationObserver(w=>{for(const T of w)if(T.type==="attributes"&&T.attributeName==="aria-selected"){d();break}});A.observe(S,{attributes:!0,attributeFilter:["aria-selected"]}),h.push(A)}});const m=[],y=S=>{if(!S)return;const A=new ResizeObserver(()=>{d()});A.observe(S),m.push(A)},g=e.current.find(t)??null;g&&y(g),s&&y(s);const v=S=>{l(S.currentTarget)},_=()=>{l(null)};return n&&e.current.forEach(S=>{S==null||S.addEventListener("mouseenter",v,{passive:!0}),S==null||S.addEventListener("mouseleave",_,{passive:!0})}),()=>{window.removeEventListener("resize",d),window.removeEventListener("DOMContentLoaded",d),h.forEach(S=>S.disconnect()),m.forEach(S=>S.disconnect()),e.current.forEach(S=>{S==null||S.removeEventListener("mouseenter",v),S==null||S.removeEventListener("mouseleave",_)})}},[e,t,s,u]),{choiceIndicatorPosition:r}},d4=[{content:"Off",value:!1},{content:"On",value:!0}],f4=cr("flex flex-row gap-2 rounded-full w-fit border-[1.5px] p-[1.5px]",{variants:{color:{primary:"border-primary text-primary",secondary:"border-secondary text-secondary",destructive:"border-destructive bg-destructive text-destructive",neutral:"border-neutral text-neutral ",light:"border-white text-white",dark:"border-neutral-800 text-neutral-800",text:"border-text text-text"}},defaultVariants:{color:"primary"}}),h4=cr("z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out cursor-pointer aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none",{variants:{size:{sm:"py-1 px-2 text-xs",md:"p-2 text-sm",lg:"p-4 text-base"}},defaultVariants:{size:"md"}}),m4=cr("absolute top-0 z-[-1] h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none",{variants:{color:{primary:"bg-primary aria-selected:text-text",secondary:"bg-secondary aria-selected:text-text",destructive:"bg-destructive aria-selected:text-text",neutral:"bg-neutral aria-selected:text-white ",light:"bg-white aria-selected:text-black",dark:"bg-neutral-800 aria-selected:text-white",text:"bg-text aria-selected:text-text-opposite"}}}),Zc=({choices:e=d4,value:t,defaultValue:n,onChange:r,color:a="primary",size:s="md",className:l})=>{const[u,d]=E.useState(t??n??e[0].value),h=E.useRef([]),m=E.useRef(null),{choiceIndicatorPosition:y}=u4(h),g=v=>{d(v),r==null||r(v)};return E.useEffect(()=>{t!==void 0&&d(t)},[t]),b.jsx("div",{className:f4({color:a,className:l}),role:"tablist",children:b.jsxs("div",{className:"relative flex size-full flex-row items-center justify-center",children:[e.map((v,_)=>{const{content:S,value:A,...w}=v,T=typeof A=="string"||typeof A=="number",C=A===u;return E.createElement("button",{...w,className:Ae(h4({size:s})),key:T?A:_,role:"tab",onClick:()=>g(A),"aria-selected":C,disabled:C,ref:k=>{h.current[_]=k}},S)}),y&&b.jsx("div",{className:Ae(m4({color:a})),style:y,ref:m})]})})},p4=e=>{const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=da();return b.jsx(fB,{id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})},g4=e=>{const{formDescriptionId:t}=da();return b.jsx("p",{className:"text-neutral text-sm",id:t,...e})},y4=({children:e,...t})=>{const{error:n,formMessageId:r}=da(),a=n?String((n==null?void 0:n.message)??""):e;return a?b.jsx("p",{className:"text-error text-xs font-medium",role:"alert",id:r,...t,children:a}):null},hh=({label:e,description:t,isRequired:n,info:r,children:a,showErrorMessage:s=!0,htmlFor:l})=>b.jsxs(Ze.Item,{className:"flex w-full flex-col gap-2 p-2",children:[(t||e)&&b.jsxs("div",{className:"flex flex-col gap-1 p-1 leading-none",children:[e&&b.jsx(uC,{isRequired:n,info:r,htmlFor:l,children:e}),t&&b.jsx(Ze.Description,{children:t})]}),b.jsx(Ze.Control,{children:a}),s&&b.jsx(Ze.Message,{"data-testid":"error-message"})]}),v4=({field:e,name:t,label:n,Element:r,isRequired:a=!1,info:s,description:l,showErrorMessage:u=!0,...d})=>{const{error:h}=da();return b.jsx(hh,{htmlFor:t,label:n,description:l,isRequired:a,info:s,showErrorMessage:u,"aria-invalid":!!h,children:b.jsx(r,{"data-testid":"element",id:t,...e,...d,children:d.children})})},ma=e=>{const{control:t}=ua();return b.jsx(Ze.Field,{control:t,name:e.name,render:({field:n})=>b.jsx(v4,{...e,field:n})})},b4=e=>b.jsx(ma,{id:e.name,"data-testid":e.name,Element:ks,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),_4=({autoComplete:e,...t})=>b.jsx(ma,{Element:u2,id:t.name,"data-testid":t.name,"aria-labelledby":t.label?`${t.name}-label`:void 0,"aria-label":t.label?void 0:t.name,autoComplete:e,minLength:6,maxLength:255,...t}),x4=e=>b.jsx(ma,{Element:RR,id:e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,"data-testid":e.name,...e}),E4=e=>b.jsx(ma,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:NR,...e}),S4=e=>b.jsx(ma,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:OR,...e}),A4=e=>b.jsx(ma,{Element:jv,id:e.name,"data-testid":e.name,...e}),w4=({inputLabel:e,...t})=>b.jsx(c2,{...t,label:e}),T4=({autoComplete:e,...t})=>b.jsx(ma,{Element:w4,id:t.name,"data-testid":t.name,autoComplete:e,minLength:6,maxLength:255,...t}),R4=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:s,children:l,...u})=>{const{control:d}=ua();return b.jsx(Ze.Field,{control:d,name:e,render:({field:h})=>{const{error:m}=da();return b.jsx(hh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:s,"aria-invalid":!!m,children:b.jsx(hn,{onValueChange:h.onChange,values:h.value,...u,children:l})})}})},C4=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:s,children:l,...u})=>{const{control:d}=ua();return b.jsx(Ze.Field,{control:d,name:e,render:({field:h})=>{const{error:m}=da();return b.jsx(hh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:s,"aria-invalid":!!m,children:b.jsx(Ie,{onValueChange:h.onChange,defaultValue:h.value,...u,children:l})})}})},N4=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:s,children:l,...u})=>{const{control:d}=ua();return b.jsx(Ze.Field,{control:d,name:e,render:({field:h})=>{const{error:m}=da();return b.jsx(hh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:s,"aria-invalid":!!m,children:b.jsx(Zc,{...h,...u,children:l})})}})},Ze=i2;Ze.Description=g4;Ze.Control=p4;Ze.Field=s2;Ze.Item=o2;Ze.Label=uC;Ze.Message=y4;Ze.Element=ma;Ze.Input=b4;Ze.InputPassword=_4;Ze.Checkbox=T4;Ze.TextArea=x4;Ze.AutoSizedTextArea=A4;Ze.Button=ut;Ze.Select=C4;Ze.MultiSelect=R4;Ze.EditableFieldInput=E4;Ze.EditableFieldTextArea=S4;Ze.SwitchSelector=N4;function pe(e,t,n){function r(u,d){var h;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(h=u._zod).traits??(h.traits=new Set),u._zod.traits.add(e),t(u,d);for(const m in l.prototype)m in u||Object.defineProperty(u,m,{value:l.prototype[m].bind(u)});u._zod.constr=l,u._zod.def=d}const a=(n==null?void 0:n.Parent)??Object;class s extends a{}Object.defineProperty(s,"name",{value:e});function l(u){var d;const h=n!=null&&n.Parent?new s:this;r(h,u),(d=h._zod).deferred??(d.deferred=[]);for(const m of h._zod.deferred)m();return h}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>{var d,h;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(h=(d=u==null?void 0:u._zod)==null?void 0:d.traits)==null?void 0:h.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class yc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const cN={};function oo(e){return cN}function O4(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function k4(e,t){return typeof t=="bigint"?t.toString():t}function uN(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Qv(e){return e==null}function Jv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Nt(e,t,n){Object.defineProperty(e,t,{get(){{const r=n();return e[t]=r,r}},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function eb(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function dN(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function Gl(e){return JSON.stringify(e)}function yy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const D4=uN(()=>{try{const e=Function;return new e(""),!0}catch{return!1}});function hA(e){if(yy(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(yy(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}const I4=new Set(["string","number","symbol"]);function mh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Be(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function L4(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function j4(e,t){const n={},r=e._zod.def;for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(n[a]=r.shape[a])}return fo(e,{...e._zod.def,shape:n,checks:[]})}function M4(e,t){const n={...e._zod.def.shape},r=e._zod.def;for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete n[a]}return fo(e,{...e._zod.def,shape:n,checks:[]})}function P4(e,t){const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return eb(this,"shape",r),r},checks:[]};return fo(e,n)}function z4(e,t){return fo(e,{...e._zod.def,get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return eb(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function V4(e,t,n){const r=t._zod.def.shape,a={...r};if(n)for(const s in n){if(!(s in r))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(a[s]=e?new e({type:"optional",innerType:r[s]}):r[s])}else for(const s in r)a[s]=e?new e({type:"optional",innerType:r[s]}):r[s];return fo(t,{...t._zod.def,shape:a,checks:[]})}function B4(e,t,n){const r=t._zod.def.shape,a={...r};if(n)for(const s in n){if(!(s in a))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(a[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(const s in r)a[s]=new e({type:"nonoptional",innerType:r[s]});return fo(t,{...t._zod.def,shape:a,checks:[]})}function ic(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n].continue!==!0)return!0;return!1}function tb(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Td(e){return typeof e=="string"?e:e==null?void 0:e.message}function so(e,t,n){var a,s,l,u,d,h;const r={...e,path:e.path??[]};if(!e.message){const m=Td((l=(s=(a=e.inst)==null?void 0:a._zod.def)==null?void 0:s.error)==null?void 0:l.call(s,e))??Td((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??Td((d=n.customError)==null?void 0:d.call(n,e))??Td((h=n.localeError)==null?void 0:h.call(n,e))??"Invalid input";r.message=m}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function nb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function vc(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const fN=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,k4,2)},enumerable:!0})},hN=pe("$ZodError",fN),mN=pe("$ZodError",fN,{Parent:Error});function U4(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function $4(e,t){const n=t||function(s){return s.message},r={_errors:[]},a=s=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>a({issues:u}));else if(l.code==="invalid_key")a({issues:l.issues});else if(l.code==="invalid_element")a({issues:l.issues});else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const h=l.path[d];d===l.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(n(l))):u[h]=u[h]||{_errors:[]},u=u[h],d++}}};return a(e),r}const H4=e=>(t,n,r,a)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new yc;if(l.issues.length){const u=new((a==null?void 0:a.Err)??e)(l.issues.map(d=>so(d,s,oo())));throw Error.captureStackTrace(u,a==null?void 0:a.callee),u}return l.value},F4=e=>async(t,n,r,a)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new((a==null?void 0:a.Err)??e)(l.issues.map(d=>so(d,s,oo())));throw Error.captureStackTrace(u,a==null?void 0:a.callee),u}return l.value},pN=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new yc;return s.issues.length?{success:!1,error:new(e??hN)(s.issues.map(l=>so(l,a,oo())))}:{success:!0,data:s.value}},G4=pN(mN),gN=e=>async(t,n,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},a);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>so(l,a,oo())))}:{success:!0,data:s.value}},K4=gN(mN),Z4=/^[cC][^\s-]{8,}$/,q4=/^[0-9a-z]+$/,W4=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Y4=/^[0-9a-vA-V]{20}$/,X4=/^[A-Za-z0-9]{27}$/,Q4=/^[a-zA-Z0-9_-]{21}$/,J4=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,e3=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,mA=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,t3=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,n3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function r3(){return new RegExp(n3,"u")}const i3=/^(?:(?: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])$/,a3=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,o3=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,s3=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,l3=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,yN=/^[A-Za-z0-9_-]*$/,c3=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,u3=/^\+(?:[0-9]){6,14}[0-9]$/,vN="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",d3=new RegExp(`^${vN}$`);function bN(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function f3(e){return new RegExp(`^${bN(e)}$`)}function h3(e){let t=`${vN}T${bN(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}const m3=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},p3=/^[^A-Z]*$/,g3=/^[^a-z]*$/,Zr=pe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),y3=pe("$ZodCheckMaxLength",(e,t)=>{Zr.init(e,t),e._zod.when=n=>{const r=n.value;return!Qv(r)&&r.length!==void 0},e._zod.onattach.push(n=>{const r=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=nb(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),v3=pe("$ZodCheckMinLength",(e,t)=>{Zr.init(e,t),e._zod.when=n=>{const r=n.value;return!Qv(r)&&r.length!==void 0},e._zod.onattach.push(n=>{const r=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=nb(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),b3=pe("$ZodCheckLengthEquals",(e,t)=>{Zr.init(e,t),e._zod.when=n=>{const r=n.value;return!Qv(r)&&r.length!==void 0},e._zod.onattach.push(n=>{const r=n._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=n=>{const r=n.value,a=r.length;if(a===t.length)return;const s=nb(r),l=a>t.length;n.issues.push({origin:s,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},input:n.value,inst:e,continue:!t.abort})}}),ph=pe("$ZodCheckStringFormat",(e,t)=>{var n;Zr.init(e,t),e._zod.onattach.push(r=>{const a=r._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),(n=e._zod).check??(n.check=r=>{if(!t.pattern)throw new Error("Not implemented.");t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})})}),_3=pe("$ZodCheckRegex",(e,t)=>{ph.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),x3=pe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=p3),ph.init(e,t)}),E3=pe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=g3),ph.init(e,t)}),S3=pe("$ZodCheckIncludes",(e,t)=>{Zr.init(e,t);const n=mh(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const s=a._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),A3=pe("$ZodCheckStartsWith",(e,t)=>{Zr.init(e,t);const n=new RegExp(`^${mh(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),w3=pe("$ZodCheckEndsWith",(e,t)=>{Zr.init(e,t);const n=new RegExp(`.*${mh(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),T3=pe("$ZodCheckOverwrite",(e,t)=>{Zr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class R3{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
254
|
-
`).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),s=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of s)this.content.push(l)}compile(){const t=Function,n=this==null?void 0:this.args,a=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new t(...n,a.join(`
|
|
255
|
-
`))}}const C3={major:4,minor:0,patch:0},zt=pe("$ZodType",(e,t)=>{var a;var n;e??(e={}),e._zod.id=t.type+"_"+dN(10),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=C3;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const l of s._zod.onattach)l(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,u,d)=>{let h=ic(l),m;for(const y of u){if(y._zod.when){if(!y._zod.when(l))continue}else if(h)continue;const g=l.issues.length,v=y._zod.check(l);if(v instanceof Promise&&(d==null?void 0:d.async)===!1)throw new yc;if(m||v instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await v,l.issues.length!==g&&(h||(h=ic(l,g)))});else{if(l.issues.length===g)continue;h||(h=ic(l,g))}}return m?m.then(()=>l):l};e._zod.run=(l,u)=>{const d=e._zod.parse(l,u);if(d instanceof Promise){if(u.async===!1)throw new yc;return d.then(h=>s(h,r,u))}return s(d,r,u)}}e["~standard"]={validate:s=>{var l;try{const u=G4(e,s);return u.success?{value:u.data}:{issues:(l=u.error)==null?void 0:l.issues}}catch{return K4(e,s).then(d=>{var h;return d.success?{value:d.data}:{issues:(h=d.error)==null?void 0:h.issues}})}},vendor:"zod",version:1}}),rb=pe("$ZodString",(e,t)=>{var n;zt.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??m3(e._zod.bag),e._zod.parse=(r,a)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),yt=pe("$ZodStringFormat",(e,t)=>{ph.init(e,t),rb.init(e,t)}),N3=pe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=e3),yt.init(e,t)}),O3=pe("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=mA(r))}else t.pattern??(t.pattern=mA());yt.init(e,t)}),k3=pe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=t3),yt.init(e,t)}),D3=pe("$ZodURL",(e,t)=>{yt.init(e,t),e._zod.check=n=>{try{const r=new URL(n.value);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:c3.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}));return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),I3=pe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=r3()),yt.init(e,t)}),L3=pe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Q4),yt.init(e,t)}),j3=pe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Z4),yt.init(e,t)}),M3=pe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=q4),yt.init(e,t)}),P3=pe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=W4),yt.init(e,t)}),z3=pe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Y4),yt.init(e,t)}),V3=pe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=X4),yt.init(e,t)}),B3=pe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=h3(t)),yt.init(e,t)}),U3=pe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=d3),yt.init(e,t)}),$3=pe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=f3(t)),yt.init(e,t)}),H3=pe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=J4),yt.init(e,t)}),F3=pe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=i3),yt.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),G3=pe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=a3),yt.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),K3=pe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=o3),yt.init(e,t)}),Z3=pe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=s3),yt.init(e,t),e._zod.check=n=>{const[r,a]=n.value.split("/");try{if(!a)throw new Error;const s=Number(a);if(`${s}`!==a)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function _N(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const q3=pe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=l3),yt.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{_N(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function W3(e){if(!yN.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return _N(n)}const Y3=pe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=yN),yt.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{W3(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),X3=pe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=u3),yt.init(e,t)});function Q3(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n,a=JSON.parse(atob(r));return!("typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const J3=pe("$ZodJWT",(e,t)=>{yt.init(e,t),e._zod.check=n=>{Q3(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),e5=pe("$ZodUnknown",(e,t)=>{zt.init(e,t),e._zod.parse=n=>n}),t5=pe("$ZodNever",(e,t)=>{zt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function pA(e,t,n){e.issues.length&&t.issues.push(...tb(n,e.issues)),t.value[n]=e.value}const n5=pe("$ZodArray",(e,t)=>{zt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const s=[];for(let l=0;l<a.length;l++){const u=a[l],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?s.push(d.then(h=>pA(h,n,l))):pA(d,n,l)}return s.length?Promise.all(s).then(()=>n):n}});function Rd(e,t,n){e.issues.length&&t.issues.push(...tb(n,e.issues)),t.value[n]=e.value}function gA(e,t,n,r){e.issues.length?r[n]===void 0?n in r?t.value[n]=void 0:t.value[n]=e.value:t.issues.push(...tb(n,e.issues)):e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}const r5=pe("$ZodObject",(e,t)=>{zt.init(e,t);const n=uN(()=>{const y=Object.keys(t.shape);for(const v of y)if(!(t.shape[v]instanceof zt))throw new Error(`Invalid element at key "${v}": expected a Zod schema`);const g=L4(t.shape);return{shape:t.shape,keys:y,keySet:new Set(y),numKeys:y.length,optionalKeys:new Set(g)}});Nt(e._zod,"propValues",()=>{const y=t.shape,g={};for(const v in y){const _=y[v]._zod;if(_.values){g[v]??(g[v]=new Set);for(const S of _.values)g[v].add(S)}}return g});const r=y=>{const g=new R3(["shape","payload","ctx"]),{keys:v,optionalKeys:_}=n.value,S=T=>{const C=Gl(T);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};g.write("const input = payload.value;");const A=Object.create(null);for(const T of v)A[T]=dN(15);g.write("const newResult = {}");for(const T of v)if(_.has(T)){const C=A[T];g.write(`const ${C} = ${S(T)};`);const k=Gl(T);g.write(`
|
|
256
|
-
if (${C}.issues.length) {
|
|
257
|
-
if (input[${k}] === undefined) {
|
|
258
|
-
if (${k} in input) {
|
|
259
|
-
newResult[${k}] = undefined;
|
|
260
|
-
}
|
|
261
|
-
} else {
|
|
262
|
-
payload.issues = payload.issues.concat(
|
|
263
|
-
${C}.issues.map((iss) => ({
|
|
264
|
-
...iss,
|
|
265
|
-
path: iss.path ? [${k}, ...iss.path] : [${k}],
|
|
266
|
-
}))
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
} else if (${C}.value === undefined) {
|
|
270
|
-
if (${k} in input) newResult[${k}] = undefined;
|
|
271
|
-
} else {
|
|
272
|
-
newResult[${k}] = ${C}.value;
|
|
273
|
-
}
|
|
274
|
-
`)}else{const C=A[T];g.write(`const ${C} = ${S(T)};`),g.write(`
|
|
275
|
-
if (${C}.issues.length) payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
276
|
-
...iss,
|
|
277
|
-
path: iss.path ? [${Gl(T)}, ...iss.path] : [${Gl(T)}]
|
|
278
|
-
})));`),g.write(`newResult[${Gl(T)}] = ${C}.value`)}g.write("payload.value = newResult;"),g.write("return payload;");const w=g.compile();return(T,C)=>w(y,T,C)};let a;const s=yy,l=!cN.jitless,d=l&&D4.value,{catchall:h}=t;let m;e._zod.parse=(y,g)=>{m??(m=n.value);const v=y.value;if(!s(v))return y.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),y;const _=[];if(l&&d&&(g==null?void 0:g.async)===!1&&g.jitless!==!0)a||(a=r(t.shape)),y=a(y,g);else{y.value={};const C=m.shape;for(const k of m.keys){const N=C[k],L=N._zod.run({value:v[k],issues:[]},g),D=N._zod.optin==="optional"&&N._zod.optout==="optional";L instanceof Promise?_.push(L.then(j=>D?gA(j,y,k,v):Rd(j,y,k))):D?gA(L,y,k,v):Rd(L,y,k)}}if(!h)return _.length?Promise.all(_).then(()=>y):y;const S=[],A=m.keySet,w=h._zod,T=w.def.type;for(const C of Object.keys(v)){if(A.has(C))continue;if(T==="never"){S.push(C);continue}const k=w.run({value:v[C],issues:[]},g);k instanceof Promise?_.push(k.then(N=>Rd(N,y,C))):Rd(k,y,C)}return S.length&&y.issues.push({code:"unrecognized_keys",keys:S,input:v,inst:e}),_.length?Promise.all(_).then(()=>y):y}});function yA(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(s=>so(s,r,oo())))}),t}const i5=pe("$ZodUnion",(e,t)=>{zt.init(e,t),Nt(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Nt(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${n.map(r=>Jv(r.source)).join("|")})$`)}}),e._zod.parse=(n,r)=>{let a=!1;const s=[];for(const l of t.options){const u=l._zod.run({value:n.value,issues:[]},r);if(u instanceof Promise)s.push(u),a=!0;else{if(u.issues.length===0)return u;s.push(u)}}return a?Promise.all(s).then(l=>yA(l,n,e,r)):yA(s,n,e,r)}}),a5=pe("$ZodIntersection",(e,t)=>{zt.init(e,t),e._zod.parse=(n,r)=>{const{value:a}=n,s=t.left._zod.run({value:a,issues:[]},r),l=t.right._zod.run({value:a,issues:[]},r);return s instanceof Promise||l instanceof Promise?Promise.all([s,l]).then(([d,h])=>vA(n,d,h)):vA(n,s,l)}});function vy(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(hA(e)&&hA(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),a={...e,...t};for(const s of r){const l=vy(e[s],t[s]);if(!l.valid)return{valid:!1,mergeErrorPath:[s,...l.mergeErrorPath]};a[s]=l.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=e[r],s=t[r],l=vy(a,s);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function vA(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),ic(e))return e;const r=vy(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const o5=pe("$ZodEnum",(e,t)=>{zt.init(e,t);const n=O4(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(r=>I4.has(typeof r)).map(r=>typeof r=="string"?mh(r):r.toString()).join("|")})$`),e._zod.parse=(r,a)=>{const s=r.value;return e._zod.values.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),s5=pe("$ZodTransform",(e,t)=>{zt.init(e,t),e._zod.parse=(n,r)=>{const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(l=>(n.value=l,n));if(a instanceof Promise)throw new yc;return n.value=a,n}}),l5=pe("$ZodOptional",(e,t)=>{zt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Nt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Nt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Jv(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>n.value===void 0?n:t.innerType._zod.run(n,r)}),c5=pe("$ZodNullable",(e,t)=>{zt.init(e,t),Nt(e._zod,"optin",()=>t.innerType._zod.optin),Nt(e._zod,"optout",()=>t.innerType._zod.optout),Nt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Jv(n.source)}|null)$`):void 0}),Nt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),u5=pe("$ZodDefault",(e,t)=>{zt.init(e,t),e._zod.optin="optional",Nt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(s=>bA(s,t)):bA(a,t)}});function bA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const d5=pe("$ZodPrefault",(e,t)=>{zt.init(e,t),e._zod.optin="optional",Nt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),f5=pe("$ZodNonOptional",(e,t)=>{zt.init(e,t),Nt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(s=>_A(s,e)):_A(a,e)}});function _A(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const h5=pe("$ZodCatch",(e,t)=>{zt.init(e,t),Nt(e._zod,"optin",()=>t.innerType._zod.optin),Nt(e._zod,"optout",()=>t.innerType._zod.optout),Nt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(l=>so(l,r,oo()))},input:n.value}),n.issues=[]),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(s=>so(s,r,oo()))},input:n.value}),n.issues=[]),n)}}),m5=pe("$ZodPipe",(e,t)=>{zt.init(e,t),Nt(e._zod,"values",()=>t.in._zod.values),Nt(e._zod,"optin",()=>t.in._zod.optin),Nt(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(n,r)=>{const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(s=>xA(s,t,r)):xA(a,t,r)}});function xA(e,t,n){return ic(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const p5=pe("$ZodReadonly",(e,t)=>{zt.init(e,t),Nt(e._zod,"propValues",()=>t.innerType._zod.propValues),Nt(e._zod,"optin",()=>t.innerType._zod.optin),Nt(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(EA):EA(a)}});function EA(e){return e.value=Object.freeze(e.value),e}const g5=pe("$ZodCustom",(e,t)=>{Zr.init(e,t),zt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(s=>SA(s,n,r,e));SA(a,n,r,e)}});function SA(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(vc(a))}}class y5{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}remove(t){return this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};return delete r.id,{...r,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}function v5(){return new y5}const Cd=v5();function b5(e,t){return new e({type:"string",...Be(t)})}function _5(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Be(t)})}function AA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Be(t)})}function x5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Be(t)})}function E5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Be(t)})}function S5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Be(t)})}function A5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Be(t)})}function w5(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Be(t)})}function T5(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Be(t)})}function R5(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Be(t)})}function C5(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Be(t)})}function N5(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Be(t)})}function O5(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Be(t)})}function k5(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Be(t)})}function D5(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Be(t)})}function I5(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Be(t)})}function L5(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Be(t)})}function j5(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Be(t)})}function M5(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Be(t)})}function P5(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Be(t)})}function z5(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Be(t)})}function V5(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Be(t)})}function B5(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Be(t)})}function U5(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Be(t)})}function $5(e,t){return new e({type:"string",format:"date",check:"string_format",...Be(t)})}function H5(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Be(t)})}function F5(e,t){return new e({type:"string",format:"duration",check:"string_format",...Be(t)})}function G5(e){return new e({type:"unknown"})}function K5(e,t){return new e({type:"never",...Be(t)})}function xN(e,t){return new y3({check:"max_length",...Be(t),maximum:e})}function Sf(e,t){return new v3({check:"min_length",...Be(t),minimum:e})}function EN(e,t){return new b3({check:"length_equals",...Be(t),length:e})}function Z5(e,t){return new _3({check:"string_format",format:"regex",...Be(t),pattern:e})}function q5(e){return new x3({check:"string_format",format:"lowercase",...Be(e)})}function W5(e){return new E3({check:"string_format",format:"uppercase",...Be(e)})}function Y5(e,t){return new S3({check:"string_format",format:"includes",...Be(t),includes:e})}function X5(e,t){return new A3({check:"string_format",format:"starts_with",...Be(t),prefix:e})}function Q5(e,t){return new w3({check:"string_format",format:"ends_with",...Be(t),suffix:e})}function qc(e){return new T3({check:"overwrite",tx:e})}function J5(e){return qc(t=>t.normalize(e))}function eG(){return qc(e=>e.trim())}function tG(){return qc(e=>e.toLowerCase())}function nG(){return qc(e=>e.toUpperCase())}function rG(e,t,n){return new e({type:"array",element:t,...Be(n)})}function iG(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Be(n)})}const aG=pe("ZodISODateTime",(e,t)=>{B3.init(e,t),At.init(e,t)});function oG(e){return U5(aG,e)}const sG=pe("ZodISODate",(e,t)=>{U3.init(e,t),At.init(e,t)});function lG(e){return $5(sG,e)}const cG=pe("ZodISOTime",(e,t)=>{$3.init(e,t),At.init(e,t)});function uG(e){return H5(cG,e)}const dG=pe("ZodISODuration",(e,t)=>{H3.init(e,t),At.init(e,t)});function fG(e){return F5(dG,e)}const hG=(e,t)=>{hN.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>$4(e,n)},flatten:{value:n=>U4(e,n)},addIssue:{value:n=>e.issues.push(n)},addIssues:{value:n=>e.issues.push(...n)},isEmpty:{get(){return e.issues.length===0}}})},gh=pe("ZodError",hG,{Parent:Error}),mG=H4(gh),pG=F4(gh),gG=pN(gh),yG=gN(gh),Jt=pe("ZodType",(e,t)=>(zt.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(n,r)=>fo(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>mG(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>gG(e,n,r),e.parseAsync=async(n,r)=>pG(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>yG(e,n,r),e.spa=e.safeParseAsync,e.refine=(n,r)=>e.check(l6(n,r)),e.superRefine=n=>e.check(c6(n)),e.overwrite=n=>e.check(qc(n)),e.optional=()=>RA(e),e.nullable=()=>CA(e),e.nullish=()=>RA(CA(e)),e.nonoptional=n=>e6(e,n),e.array=()=>by(e),e.or=n=>HG([e,n]),e.and=n=>GG(e,n),e.transform=n=>NA(e,qG(n)),e.default=n=>XG(e,n),e.prefault=n=>JG(e,n),e.catch=n=>n6(e,n),e.pipe=n=>NA(e,n),e.readonly=()=>a6(e),e.describe=n=>{const r=e.clone();return Cd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=Cd.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Cd.get(e);const r=e.clone();return Cd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),SN=pe("_ZodString",(e,t)=>{rb.init(e,t),Jt.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Z5(...r)),e.includes=(...r)=>e.check(Y5(...r)),e.startsWith=(...r)=>e.check(X5(...r)),e.endsWith=(...r)=>e.check(Q5(...r)),e.min=(...r)=>e.check(Sf(...r)),e.max=(...r)=>e.check(xN(...r)),e.length=(...r)=>e.check(EN(...r)),e.nonempty=(...r)=>e.check(Sf(1,...r)),e.lowercase=r=>e.check(q5(r)),e.uppercase=r=>e.check(W5(r)),e.trim=()=>e.check(eG()),e.normalize=(...r)=>e.check(J5(...r)),e.toLowerCase=()=>e.check(tG()),e.toUpperCase=()=>e.check(nG())}),vG=pe("ZodString",(e,t)=>{rb.init(e,t),SN.init(e,t),e.email=n=>e.check(_5(bG,n)),e.url=n=>e.check(w5(_G,n)),e.jwt=n=>e.check(B5(jG,n)),e.emoji=n=>e.check(T5(xG,n)),e.guid=n=>e.check(AA(wA,n)),e.uuid=n=>e.check(x5(Nd,n)),e.uuidv4=n=>e.check(E5(Nd,n)),e.uuidv6=n=>e.check(S5(Nd,n)),e.uuidv7=n=>e.check(A5(Nd,n)),e.nanoid=n=>e.check(R5(EG,n)),e.guid=n=>e.check(AA(wA,n)),e.cuid=n=>e.check(C5(SG,n)),e.cuid2=n=>e.check(N5(AG,n)),e.ulid=n=>e.check(O5(wG,n)),e.base64=n=>e.check(P5(DG,n)),e.base64url=n=>e.check(z5(IG,n)),e.xid=n=>e.check(k5(TG,n)),e.ksuid=n=>e.check(D5(RG,n)),e.ipv4=n=>e.check(I5(CG,n)),e.ipv6=n=>e.check(L5(NG,n)),e.cidrv4=n=>e.check(j5(OG,n)),e.cidrv6=n=>e.check(M5(kG,n)),e.e164=n=>e.check(V5(LG,n)),e.datetime=n=>e.check(oG(n)),e.date=n=>e.check(lG(n)),e.time=n=>e.check(uG(n)),e.duration=n=>e.check(fG(n))});function Kl(e){return b5(vG,e)}const At=pe("ZodStringFormat",(e,t)=>{yt.init(e,t),SN.init(e,t)}),bG=pe("ZodEmail",(e,t)=>{k3.init(e,t),At.init(e,t)}),wA=pe("ZodGUID",(e,t)=>{N3.init(e,t),At.init(e,t)}),Nd=pe("ZodUUID",(e,t)=>{O3.init(e,t),At.init(e,t)}),_G=pe("ZodURL",(e,t)=>{D3.init(e,t),At.init(e,t)}),xG=pe("ZodEmoji",(e,t)=>{I3.init(e,t),At.init(e,t)}),EG=pe("ZodNanoID",(e,t)=>{L3.init(e,t),At.init(e,t)}),SG=pe("ZodCUID",(e,t)=>{j3.init(e,t),At.init(e,t)}),AG=pe("ZodCUID2",(e,t)=>{M3.init(e,t),At.init(e,t)}),wG=pe("ZodULID",(e,t)=>{P3.init(e,t),At.init(e,t)}),TG=pe("ZodXID",(e,t)=>{z3.init(e,t),At.init(e,t)}),RG=pe("ZodKSUID",(e,t)=>{V3.init(e,t),At.init(e,t)}),CG=pe("ZodIPv4",(e,t)=>{F3.init(e,t),At.init(e,t)}),NG=pe("ZodIPv6",(e,t)=>{G3.init(e,t),At.init(e,t)}),OG=pe("ZodCIDRv4",(e,t)=>{K3.init(e,t),At.init(e,t)}),kG=pe("ZodCIDRv6",(e,t)=>{Z3.init(e,t),At.init(e,t)}),DG=pe("ZodBase64",(e,t)=>{q3.init(e,t),At.init(e,t)}),IG=pe("ZodBase64URL",(e,t)=>{Y3.init(e,t),At.init(e,t)}),LG=pe("ZodE164",(e,t)=>{X3.init(e,t),At.init(e,t)}),jG=pe("ZodJWT",(e,t)=>{J3.init(e,t),At.init(e,t)}),MG=pe("ZodUnknown",(e,t)=>{e5.init(e,t),Jt.init(e,t)});function TA(){return G5(MG)}const PG=pe("ZodNever",(e,t)=>{t5.init(e,t),Jt.init(e,t)});function zG(e){return K5(PG,e)}const VG=pe("ZodArray",(e,t)=>{n5.init(e,t),Jt.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(Sf(n,r)),e.nonempty=n=>e.check(Sf(1,n)),e.max=(n,r)=>e.check(xN(n,r)),e.length=(n,r)=>e.check(EN(n,r)),e.unwrap=()=>e.element});function by(e,t){return rG(VG,e,t)}const BG=pe("ZodObject",(e,t)=>{r5.init(e,t),Jt.init(e,t),Nt(e,"shape",()=>Object.fromEntries(Object.entries(e._zod.def.shape))),e.keyof=()=>KG(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:TA()}),e.loose=()=>e.clone({...e._zod.def,catchall:TA()}),e.strict=()=>e.clone({...e._zod.def,catchall:zG()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>P4(e,n),e.merge=n=>z4(e,n),e.pick=n=>j4(e,n),e.omit=n=>M4(e,n),e.partial=(...n)=>V4(AN,e,n[0]),e.required=(...n)=>B4(wN,e,n[0])});function UG(e,t){const n={type:"object",get shape(){return eb(this,"shape",{...e}),this.shape},...Be(t)};return new BG(n)}const $G=pe("ZodUnion",(e,t)=>{i5.init(e,t),Jt.init(e,t),e.options=t.options});function HG(e,t){return new $G({type:"union",options:e,...Be(t)})}const FG=pe("ZodIntersection",(e,t)=>{a5.init(e,t),Jt.init(e,t)});function GG(e,t){return new FG({type:"intersection",left:e,right:t})}const _y=pe("ZodEnum",(e,t)=>{o5.init(e,t),Jt.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const s={};for(const l of r)if(n.has(l))s[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new _y({...t,checks:[],...Be(a),entries:s})},e.exclude=(r,a)=>{const s={...t.entries};for(const l of r)if(n.has(l))delete s[l];else throw new Error(`Key ${l} not found in enum`);return new _y({...t,checks:[],...Be(a),entries:s})}});function KG(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new _y({type:"enum",entries:n,...Be(t)})}const ZG=pe("ZodTransform",(e,t)=>{s5.init(e,t),Jt.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=s=>{if(typeof s=="string")n.issues.push(vc(s,n.value,t));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),l.continue??(l.continue=!0),n.issues.push(vc(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(s=>(n.value=s,n)):(n.value=a,n)}});function qG(e){return new ZG({type:"transform",transform:e})}const AN=pe("ZodOptional",(e,t)=>{l5.init(e,t),Jt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function RA(e){return new AN({type:"optional",innerType:e})}const WG=pe("ZodNullable",(e,t)=>{c5.init(e,t),Jt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function CA(e){return new WG({type:"nullable",innerType:e})}const YG=pe("ZodDefault",(e,t)=>{u5.init(e,t),Jt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function XG(e,t){return new YG({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const QG=pe("ZodPrefault",(e,t)=>{d5.init(e,t),Jt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function JG(e,t){return new QG({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const wN=pe("ZodNonOptional",(e,t)=>{f5.init(e,t),Jt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function e6(e,t){return new wN({type:"nonoptional",innerType:e,...Be(t)})}const t6=pe("ZodCatch",(e,t)=>{h5.init(e,t),Jt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function n6(e,t){return new t6({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const r6=pe("ZodPipe",(e,t)=>{m5.init(e,t),Jt.init(e,t),e.in=t.in,e.out=t.out});function NA(e,t){return new r6({type:"pipe",in:e,out:t})}const i6=pe("ZodReadonly",(e,t)=>{p5.init(e,t),Jt.init(e,t)});function a6(e){return new i6({type:"readonly",innerType:e})}const o6=pe("ZodCustom",(e,t)=>{g5.init(e,t),Jt.init(e,t)});function s6(e,t){const n=new Zr({check:"custom",...Be(t)});return n._zod.check=e,n}function l6(e,t={}){return iG(o6,e,t)}function c6(e,t){const n=s6(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(vc(a,r.value,n._zod.def));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(vc(s))}},e(r.value,r)),t);return n}const TN=E.createContext({});function u6(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const ib=typeof window<"u",d6=ib?E.useLayoutEffect:E.useEffect,ab=E.createContext(null);function ob(e,t){e.indexOf(t)===-1&&e.push(t)}function sb(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Si=(e,t,n)=>n>t?t:n<e?e:n;let lb=()=>{};const Ai={},RN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function CN(e){return typeof e=="object"&&e!==null}const NN=e=>/^0[^.\s]+$/u.test(e);function cb(e){let t;return()=>(t===void 0&&(t=e()),t)}const sr=e=>e,f6=(e,t)=>n=>t(e(n)),Wc=(...e)=>e.reduce(f6),bc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ub{constructor(){this.subscriptions=[]}add(t){return ob(this.subscriptions,t),()=>sb(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let s=0;s<a;s++){const l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Vr=e=>e*1e3,Br=e=>e/1e3;function ON(e,t){return t?e*(1e3/t):0}const kN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,h6=1e-7,m6=12;function p6(e,t,n,r,a){let s,l,u=0;do l=t+(n-t)/2,s=kN(l,r,a)-e,s>0?n=l:t=l;while(Math.abs(s)>h6&&++u<m6);return l}function Yc(e,t,n,r){if(e===t&&n===r)return sr;const a=s=>p6(s,0,1,e,n);return s=>s===0||s===1?s:kN(a(s),t,r)}const DN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,IN=e=>t=>1-e(1-t),LN=Yc(.33,1.53,.69,.99),db=IN(LN),jN=DN(db),MN=e=>(e*=2)<1?.5*db(e):.5*(2-Math.pow(2,-10*(e-1))),fb=e=>1-Math.sin(Math.acos(e)),PN=IN(fb),zN=DN(fb),g6=Yc(.42,0,1,1),y6=Yc(0,0,.58,1),VN=Yc(.42,0,.58,1),v6=e=>Array.isArray(e)&&typeof e[0]!="number",BN=e=>Array.isArray(e)&&typeof e[0]=="number",b6={linear:sr,easeIn:g6,easeInOut:VN,easeOut:y6,circIn:fb,circInOut:zN,circOut:PN,backIn:db,backInOut:jN,backOut:LN,anticipate:MN},_6=e=>typeof e=="string",OA=e=>{if(BN(e)){lb(e.length===4);const[t,n,r,a]=e;return Yc(t,n,r,a)}else if(_6(e))return b6[e];return e},Od=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function x6(e,t){let n=new Set,r=new Set,a=!1,s=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(h.schedule(m),e()),m(u)}const h={schedule:(m,y=!1,g=!1)=>{const _=g&&a?n:r;return y&&l.add(m),_.has(m)||_.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(u=m,a){s=!0;return}a=!0,[n,r]=[r,n],n.forEach(d),n.clear(),a=!1,s&&(s=!1,h.process(m))}};return h}const E6=40;function UN(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,l=Od.reduce((C,k)=>(C[k]=x6(s),C),{}),{setup:u,read:d,resolveKeyframes:h,preUpdate:m,update:y,preRender:g,render:v,postRender:_}=l,S=()=>{const C=Ai.useManualTiming?a.timestamp:performance.now();n=!1,Ai.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(C-a.timestamp,E6),1)),a.timestamp=C,a.isProcessing=!0,u.process(a),d.process(a),h.process(a),m.process(a),y.process(a),g.process(a),v.process(a),_.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(S))},A=()=>{n=!0,r=!0,a.isProcessing||e(S)};return{schedule:Od.reduce((C,k)=>{const N=l[k];return C[k]=(L,D=!1,j=!1)=>(n||A(),N.schedule(L,D,j)),C},{}),cancel:C=>{for(let k=0;k<Od.length;k++)l[Od[k]].cancel(C)},state:a,steps:l}}const{schedule:Et,cancel:oa,state:sn,steps:yg}=UN(typeof requestAnimationFrame<"u"?requestAnimationFrame:sr,!0);let Qd;function S6(){Qd=void 0}const Nn={now:()=>(Qd===void 0&&Nn.set(sn.isProcessing||Ai.useManualTiming?sn.timestamp:performance.now()),Qd),set:e=>{Qd=e,queueMicrotask(S6)}},$N=e=>t=>typeof t=="string"&&t.startsWith(e),hb=$N("--"),A6=$N("var(--"),mb=e=>A6(e)?w6.test(e.split("/*")[0].trim()):!1,w6=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,js={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},_c={...js,transform:e=>Si(0,1,e)},kd={...js,default:1},ac=e=>Math.round(e*1e5)/1e5,pb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function T6(e){return e==null}const R6=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,gb=(e,t)=>n=>!!(typeof n=="string"&&R6.test(n)&&n.startsWith(e)||t&&!T6(n)&&Object.prototype.hasOwnProperty.call(n,t)),HN=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,s,l,u]=r.match(pb);return{[e]:parseFloat(a),[t]:parseFloat(s),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},C6=e=>Si(0,255,e),vg={...js,transform:e=>Math.round(C6(e))},qa={test:gb("rgb","red"),parse:HN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vg.transform(e)+", "+vg.transform(t)+", "+vg.transform(n)+", "+ac(_c.transform(r))+")"};function N6(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const xy={test:gb("#"),parse:N6,transform:qa.transform},Xc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ea=Xc("deg"),Ur=Xc("%"),ze=Xc("px"),O6=Xc("vh"),k6=Xc("vw"),kA={...Ur,parse:e=>Ur.parse(e)/100,transform:e=>Ur.transform(e*100)},as={test:gb("hsl","hue"),parse:HN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ur.transform(ac(t))+", "+Ur.transform(ac(n))+", "+ac(_c.transform(r))+")"},mn={test:e=>qa.test(e)||xy.test(e)||as.test(e),parse:e=>qa.test(e)?qa.parse(e):as.test(e)?as.parse(e):xy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qa.transform(e):as.transform(e)},D6=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function I6(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pb))==null?void 0:t.length)||0)+(((n=e.match(D6))==null?void 0:n.length)||0)>0}const FN="number",GN="color",L6="var",j6="var(",DA="${}",M6=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function xc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let s=0;const u=t.replace(M6,d=>(mn.test(d)?(r.color.push(s),a.push(GN),n.push(mn.parse(d))):d.startsWith(j6)?(r.var.push(s),a.push(L6),n.push(d)):(r.number.push(s),a.push(FN),n.push(parseFloat(d))),++s,DA)).split(DA);return{values:n,split:u,indexes:r,types:a}}function KN(e){return xc(e).values}function ZN(e){const{split:t,types:n}=xc(e),r=t.length;return a=>{let s="";for(let l=0;l<r;l++)if(s+=t[l],a[l]!==void 0){const u=n[l];u===FN?s+=ac(a[l]):u===GN?s+=mn.transform(a[l]):s+=a[l]}return s}}const P6=e=>typeof e=="number"?0:e;function z6(e){const t=KN(e);return ZN(e)(t.map(P6))}const sa={test:I6,parse:KN,createTransformer:ZN,getAnimatableNone:z6};function bg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function V6({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,s=0,l=0;if(!t)a=s=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;a=bg(d,u,e+1/3),s=bg(d,u,e),l=bg(d,u,e-1/3)}return{red:Math.round(a*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}function Af(e,t){return n=>n>0?t:e}const _t=(e,t,n)=>e+(t-e)*n,_g=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},B6=[xy,qa,as],U6=e=>B6.find(t=>t.test(e));function IA(e){const t=U6(e);if(!t)return!1;let n=t.parse(e);return t===as&&(n=V6(n)),n}const LA=(e,t)=>{const n=IA(e),r=IA(t);if(!n||!r)return Af(e,t);const a={...n};return s=>(a.red=_g(n.red,r.red,s),a.green=_g(n.green,r.green,s),a.blue=_g(n.blue,r.blue,s),a.alpha=_t(n.alpha,r.alpha,s),qa.transform(a))},Ey=new Set(["none","hidden"]);function $6(e,t){return Ey.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function H6(e,t){return n=>_t(e,t,n)}function yb(e){return typeof e=="number"?H6:typeof e=="string"?mb(e)?Af:mn.test(e)?LA:K6:Array.isArray(e)?qN:typeof e=="object"?mn.test(e)?LA:F6:Af}function qN(e,t){const n=[...e],r=n.length,a=e.map((s,l)=>yb(s)(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=a[l](s);return n}}function F6(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=yb(e[a])(e[a],t[a]));return a=>{for(const s in r)n[s]=r[s](a);return n}}function G6(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const s=t.types[a],l=e.indexes[s][r[s]],u=e.values[l]??0;n[a]=u,r[s]++}return n}const K6=(e,t)=>{const n=sa.createTransformer(t),r=xc(e),a=xc(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?Ey.has(e)&&!a.values.length||Ey.has(t)&&!r.values.length?$6(e,t):Wc(qN(G6(r,a),a.values),n):Af(e,t)};function WN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?_t(e,t,n):yb(e)(e,t)}const Z6=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Et.update(t,n),stop:()=>oa(t),now:()=>sn.isProcessing?sn.timestamp:Nn.now()}},YN=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let s=0;s<a;s++)r+=e(s/(a-1))+", ";return`linear(${r.substring(0,r.length-2)})`},wf=2e4;function vb(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<wf;)t+=n,r=e.next(t);return t>=wf?1/0:t}function q6(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(vb(r),wf);return{type:"keyframes",ease:s=>r.next(a*s).value/t,duration:Br(a)}}const W6=5;function XN(e,t,n){const r=Math.max(t-W6,0);return ON(n-e(r),t-r)}const Ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},jA=.001;function Y6({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let a,s,l=1-t;l=Si(Ct.minDamping,Ct.maxDamping,l),e=Si(Ct.minDuration,Ct.maxDuration,Br(e)),l<1?(a=h=>{const m=h*l,y=m*e,g=m-n,v=Sy(h,l),_=Math.exp(-y);return jA-g/v*_},s=h=>{const y=h*l*e,g=y*n+n,v=Math.pow(l,2)*Math.pow(h,2)*e,_=Math.exp(-y),S=Sy(Math.pow(h,2),l);return(-a(h)+jA>0?-1:1)*((g-v)*_)/S}):(a=h=>{const m=Math.exp(-h*e),y=(h-n)*e+1;return-.001+m*y},s=h=>{const m=Math.exp(-h*e),y=(n-h)*(e*e);return m*y});const u=5/e,d=Q6(a,s,u);if(e=Vr(e),isNaN(d))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:l*2*Math.sqrt(r*h),duration:e}}}const X6=12;function Q6(e,t,n){let r=n;for(let a=1;a<X6;a++)r=r-e(r)/t(r);return r}function Sy(e,t){return e*Math.sqrt(1-t*t)}const J6=["duration","bounce"],e8=["stiffness","damping","mass"];function MA(e,t){return t.some(n=>e[n]!==void 0)}function t8(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!MA(e,e8)&&MA(e,J6))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,s=2*Si(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:Ct.mass,stiffness:a,damping:s}}else{const n=Y6(e);t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function Tf(e=Ct.visualDuration,t=Ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const s=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:s},{stiffness:d,damping:h,mass:m,duration:y,velocity:g,isResolvedFromDuration:v}=t8({...n,velocity:-Br(n.velocity||0)}),_=g||0,S=h/(2*Math.sqrt(d*m)),A=l-s,w=Br(Math.sqrt(d/m)),T=Math.abs(A)<5;r||(r=T?Ct.restSpeed.granular:Ct.restSpeed.default),a||(a=T?Ct.restDelta.granular:Ct.restDelta.default);let C;if(S<1){const N=Sy(w,S);C=L=>{const D=Math.exp(-S*w*L);return l-D*((_+S*w*A)/N*Math.sin(N*L)+A*Math.cos(N*L))}}else if(S===1)C=N=>l-Math.exp(-w*N)*(A+(_+w*A)*N);else{const N=w*Math.sqrt(S*S-1);C=L=>{const D=Math.exp(-S*w*L),j=Math.min(N*L,300);return l-D*((_+S*w*A)*Math.sinh(j)+N*A*Math.cosh(j))/N}}const k={calculatedDuration:v&&y||null,next:N=>{const L=C(N);if(v)u.done=N>=y;else{let D=N===0?_:0;S<1&&(D=N===0?Vr(_):XN(C,N,L));const j=Math.abs(D)<=r,V=Math.abs(l-L)<=a;u.done=j&&V}return u.value=u.done?l:L,u},toString:()=>{const N=Math.min(vb(k),wf),L=YN(D=>k.next(N*D).value,N,30);return N+"ms "+L},toTransition:()=>{}};return k}Tf.applyToOptions=e=>{const t=q6(e,100,Tf);return e.ease=t.ease,e.duration=Vr(t.duration),e.type="keyframes",e};function Ay({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:s=500,modifyTarget:l,min:u,max:d,restDelta:h=.5,restSpeed:m}){const y=e[0],g={done:!1,value:y},v=j=>u!==void 0&&j<u||d!==void 0&&j>d,_=j=>u===void 0?d:d===void 0||Math.abs(u-j)<Math.abs(d-j)?u:d;let S=n*t;const A=y+S,w=l===void 0?A:l(A);w!==A&&(S=w-y);const T=j=>-S*Math.exp(-j/r),C=j=>w+T(j),k=j=>{const V=T(j),U=C(j);g.done=Math.abs(V)<=h,g.value=g.done?w:U};let N,L;const D=j=>{v(g.value)&&(N=j,L=Tf({keyframes:[g.value,_(g.value)],velocity:XN(C,j,g.value),damping:a,stiffness:s,restDelta:h,restSpeed:m}))};return D(0),{calculatedDuration:null,next:j=>{let V=!1;return!L&&N===void 0&&(V=!0,k(j),D(j)),N!==void 0&&j>=N?L.next(j-N):(!V&&k(j),g)}}}function n8(e,t,n){const r=[],a=n||Ai.mix||WN,s=e.length-1;for(let l=0;l<s;l++){let u=a(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||sr:t;u=Wc(d,u)}r.push(u)}return r}function r8(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const s=e.length;if(lb(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=n8(t,r,a),d=u.length,h=m=>{if(l&&m<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const g=bc(e[y],e[y+1],m);return u[y](g)};return n?m=>h(Si(e[0],e[s-1],m)):h}function i8(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=bc(0,t,r);e.push(_t(n,1,a))}}function a8(e){const t=[0];return i8(t,e.length-1),t}function o8(e,t){return e.map(n=>n*t)}function s8(e,t){return e.map(()=>t||VN).splice(0,e.length-1)}function oc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=v6(r)?r.map(OA):OA(r),s={done:!1,value:t[0]},l=o8(n&&n.length===t.length?n:a8(t),e),u=r8(l,t,{ease:Array.isArray(a)?a:s8(t,a)});return{calculatedDuration:e,next:d=>(s.value=u(d),s.done=d>=e,s)}}const l8=e=>e!==null;function bb(e,{repeat:t,repeatType:n="loop"},r,a=1){const s=e.filter(l8),u=a<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!u||r===void 0?s[u]:r}const c8={decay:Ay,inertia:Ay,tween:oc,keyframes:oc,spring:Tf};function QN(e){typeof e.type=="string"&&(e.type=c8[e.type])}class _b{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const u8=e=>e/100;class xb extends _b{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,a;const{motionValue:n}=this.options;n&&n.updatedAt!==Nn.now()&&this.tick(Nn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(r=this.options).onStop)==null||a.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;QN(t);const{type:n=oc,repeat:r=0,repeatDelay:a=0,repeatType:s,velocity:l=0}=t;let{keyframes:u}=t;const d=n||oc;d!==oc&&typeof u[0]!="number"&&(this.mixKeyframes=Wc(u8,WN(u[0],u[1])),u=[0,100]);const h=d({...t,keyframes:u});s==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...u].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=vb(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:a,mixKeyframes:s,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:m,repeat:y,repeatType:g,repeatDelay:v,type:_,onUpdate:S,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-h*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?w<0:w>a;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let C=this.currentTime,k=r;if(y){const j=Math.min(this.currentTime,a)/u;let V=Math.floor(j),U=j%1;!U&&j>=1&&(U=1),U===1&&V--,V=Math.min(V,y+1),!!(V%2)&&(g==="reverse"?(U=1-U,v&&(U-=v/u)):g==="mirror"&&(k=l)),C=Si(0,1,U)*u}const N=T?{done:!1,value:m[0]}:k.next(C);s&&(N.value=s(N.value));let{done:L}=N;!T&&d!==null&&(L=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return D&&_!==Ay&&(N.value=bb(m,this.options,A,this.speed)),S&&S(N.value),D&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return Br(this.calculatedDuration)}get time(){return Br(this.currentTime)}set time(t){var n;t=Vr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Nn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Br(this.currentTime))}play(){var a,s;if(this.isStopped)return;const{driver:t=Z6,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(s=(a=this.options).onPlay)==null||s.call(a);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Nn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function d8(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Wa=e=>e*180/Math.PI,wy=e=>{const t=Wa(Math.atan2(e[1],e[0]));return Ty(t)},f8={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:wy,rotateZ:wy,skewX:e=>Wa(Math.atan(e[1])),skewY:e=>Wa(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ty=e=>(e=e%360,e<0&&(e+=360),e),PA=wy,zA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),VA=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),h8={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:zA,scaleY:VA,scale:e=>(zA(e)+VA(e))/2,rotateX:e=>Ty(Wa(Math.atan2(e[6],e[5]))),rotateY:e=>Ty(Wa(Math.atan2(-e[2],e[0]))),rotateZ:PA,rotate:PA,skewX:e=>Wa(Math.atan(e[4])),skewY:e=>Wa(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ry(e){return e.includes("scale")?1:0}function Cy(e,t){if(!e||e==="none")return Ry(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=h8,a=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=f8,a=u}if(!a)return Ry(t);const s=r[t],l=a[1].split(",").map(p8);return typeof s=="function"?s(l):l[s]}const m8=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Cy(n,t)};function p8(e){return parseFloat(e.trim())}const Ms=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ps=new Set(Ms),BA=e=>e===js||e===ze,g8=new Set(["x","y","z"]),y8=Ms.filter(e=>!g8.has(e));function v8(e){const t=[];return y8.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Qa={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Cy(t,"x"),y:(e,{transform:t})=>Cy(t,"y")};Qa.translateX=Qa.x;Qa.translateY=Qa.y;const Ja=new Set;let Ny=!1,Oy=!1,ky=!1;function JN(){if(Oy){const e=Array.from(Ja).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=v8(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([s,l])=>{var u;(u=r.getValue(s))==null||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Oy=!1,Ny=!1,Ja.forEach(e=>e.complete(ky)),Ja.clear()}function eO(){Ja.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Oy=!0)})}function b8(){ky=!0,eO(),JN(),ky=!1}class Eb{constructor(t,n,r,a,s,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=s,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Ja.add(this),Ny||(Ny=!0,Et.read(eO),Et.resolveKeyframes(JN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;if(t[0]===null){const s=a==null?void 0:a.get(),l=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),a&&s===void 0&&a.set(t[0])}d8(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ja.delete(this)}cancel(){this.state==="scheduled"&&(Ja.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const _8=e=>e.startsWith("--");function x8(e,t,n){_8(t)?e.style.setProperty(t,n):e.style[t]=n}const E8=cb(()=>window.ScrollTimeline!==void 0),S8={};function A8(e,t){const n=cb(e);return()=>S8[t]??n()}const tO=A8(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ql=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,UA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ql([0,.65,.55,1]),circOut:Ql([.55,0,1,.45]),backIn:Ql([.31,.01,.66,-.59]),backOut:Ql([.33,1.53,.69,.99])};function nO(e,t){if(e)return typeof e=="function"?tO()?YN(e,t):"ease-out":BN(e)?Ql(e):Array.isArray(e)?e.map(n=>nO(n,t)||UA.easeOut):UA[e]}function w8(e,t,n,{delay:r=0,duration:a=300,repeat:s=0,repeatType:l="loop",ease:u="easeOut",times:d}={},h=void 0){const m={[t]:n};d&&(m.offset=d);const y=nO(u,a);Array.isArray(y)&&(m.easing=y);const g={delay:r,duration:a,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"};return h&&(g.pseudoElement=h),e.animate(m,g)}function rO(e){return typeof e=="function"&&"applyToOptions"in e}function T8({type:e,...t}){return rO(e)&&tO()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class R8 extends _b{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:a,pseudoElement:s,allowFlatten:l=!1,finalKeyframe:u,onComplete:d}=t;this.isPseudoElement=!!s,this.allowFlatten=l,this.options=t,lb(typeof t.type!="string");const h=T8(t);this.animation=w8(n,r,a,h,s),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const m=bb(a,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(m):x8(n,r,m),this.animation.cancel()}d==null||d(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Br(Number(t))}get time(){return Br(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Vr(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&E8()?(this.animation.timeline=t,sr):n(this)}}const iO={anticipate:MN,backInOut:jN,circInOut:zN};function C8(e){return e in iO}function N8(e){typeof e.ease=="string"&&C8(e.ease)&&(e.ease=iO[e.ease])}const $A=10;class O8 extends R8{constructor(t){N8(t),QN(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:a,element:s,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new xb({...l,autoplay:!1}),d=Vr(this.finishedTime??this.time);n.setWithVelocity(u.sample(d-$A).value,u.sample(d).value,$A),u.stop()}}const HA=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sa.test(e)||e==="0")&&!e.startsWith("url("));function k8(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function D8(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],l=HA(a,t),u=HA(s,t);return!l||!u?!1:k8(e)||(n==="spring"||rO(n))&&r}function aO(e){return CN(e)&&"offsetHeight"in e}const I8=new Set(["opacity","clipPath","filter","transform"]),L8=cb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function j8(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:s,type:l}=e;if(!aO((h=t==null?void 0:t.owner)==null?void 0:h.current))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return L8()&&n&&I8.has(n)&&(n!=="transform"||!d)&&!u&&!r&&a!=="mirror"&&s!==0&&l!=="inertia"}const M8=40;class P8 extends _b{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:l="loop",keyframes:u,name:d,motionValue:h,element:m,...y}){var _;super(),this.stop=()=>{var S,A;this._animation&&(this._animation.stop(),(S=this.stopTimeline)==null||S.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=Nn.now();const g={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:s,repeatType:l,name:d,motionValue:h,element:m,...y},v=(m==null?void 0:m.KeyframeResolver)||Eb;this.keyframeResolver=new v(u,(S,A,w)=>this.onKeyframesResolved(S,A,g,!w),d,h,m),(_=this.keyframeResolver)==null||_.scheduleResolve()}onKeyframesResolved(t,n,r,a){this.keyframeResolver=void 0;const{name:s,type:l,velocity:u,delay:d,isHandoff:h,onUpdate:m}=r;this.resolvedAt=Nn.now(),D8(t,s,l,u)||((Ai.instantAnimations||!d)&&(m==null||m(bb(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const g={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>M8?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=!h&&j8(g)?new O8({...g,element:g.motionValue.owner.current}):new xb(g);v.finished.then(()=>this.notifyFinished()).catch(sr),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),b8()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const z8=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function V8(e){const t=z8.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function oO(e,t,n=1){const[r,a]=V8(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return RN(l)?parseFloat(l):l}return mb(a)?oO(a,t,n+1):a}function Sb(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const sO=new Set(["width","height","top","left","right","bottom",...Ms]),B8={test:e=>e==="auto",parse:e=>e},lO=e=>t=>t.test(e),cO=[js,ze,Ur,ea,k6,O6,B8],FA=e=>cO.find(lO(e));function U8(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||NN(e):!0}const $8=new Set(["brightness","contrast","saturate","opacity"]);function H8(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(pb)||[];if(!r)return e;const a=n.replace(r,"");let s=$8.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+a+")"}const F8=/\b([a-z-]*)\(.*?\)/gu,Dy={...sa,getAnimatableNone:e=>{const t=e.match(F8);return t?t.map(H8).join(" "):e}},GA={...js,transform:Math.round},G8={rotate:ea,rotateX:ea,rotateY:ea,rotateZ:ea,scale:kd,scaleX:kd,scaleY:kd,scaleZ:kd,skew:ea,skewX:ea,skewY:ea,distance:ze,translateX:ze,translateY:ze,translateZ:ze,x:ze,y:ze,z:ze,perspective:ze,transformPerspective:ze,opacity:_c,originX:kA,originY:kA,originZ:ze},Ab={borderWidth:ze,borderTopWidth:ze,borderRightWidth:ze,borderBottomWidth:ze,borderLeftWidth:ze,borderRadius:ze,radius:ze,borderTopLeftRadius:ze,borderTopRightRadius:ze,borderBottomRightRadius:ze,borderBottomLeftRadius:ze,width:ze,maxWidth:ze,height:ze,maxHeight:ze,top:ze,right:ze,bottom:ze,left:ze,padding:ze,paddingTop:ze,paddingRight:ze,paddingBottom:ze,paddingLeft:ze,margin:ze,marginTop:ze,marginRight:ze,marginBottom:ze,marginLeft:ze,backgroundPositionX:ze,backgroundPositionY:ze,...G8,zIndex:GA,fillOpacity:_c,strokeOpacity:_c,numOctaves:GA},K8={...Ab,color:mn,backgroundColor:mn,outlineColor:mn,fill:mn,stroke:mn,borderColor:mn,borderTopColor:mn,borderRightColor:mn,borderBottomColor:mn,borderLeftColor:mn,filter:Dy,WebkitFilter:Dy},uO=e=>K8[e];function dO(e,t){let n=uO(e);return n!==Dy&&(n=sa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Z8=new Set(["auto","none","0"]);function q8(e,t,n){let r=0,a;for(;r<e.length&&!a;){const s=e[r];typeof s=="string"&&!Z8.has(s)&&xc(s).values.length&&(a=e[r]),r++}if(a&&n)for(const s of t)e[s]=dO(n,a)}class W8 extends Eb{constructor(t,n,r,a,s){super(t,n,r,a,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),mb(h))){const m=oO(h,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!sO.has(r)||t.length!==2)return;const[a,s]=t,l=FA(a),u=FA(s);if(l!==u)if(BA(l)&&BA(u))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Qa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||U8(t[a]))&&r.push(a);r.length&&q8(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Qa[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const s=r.length-1,l=r[s];r[s]=Qa[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([d,h])=>{t.getValue(d).set(h)}),this.resolveNoneKeyframes()}}function Y8(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const a=(n==null?void 0:n[e])??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}const fO=(e,t)=>t&&typeof e=="number"?t.transform(e):e,KA=30,X8=e=>!isNaN(parseFloat(e));class Q8{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{var l,u;const s=Nn.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty();a&&((u=this.events.renderRequest)==null||u.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Nn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=X8(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ub);const r=this.events[t].add(n);return t==="change"?()=>{r(),Et.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Nn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>KA)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,KA);return ON(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _s(e,t){return new Q8(e,t)}const{schedule:wb}=UN(queueMicrotask,!1),vr={x:!1,y:!1};function hO(){return vr.x||vr.y}function J8(e){return e==="x"||e==="y"?vr[e]?null:(vr[e]=!0,()=>{vr[e]=!1}):vr.x||vr.y?null:(vr.x=vr.y=!0,()=>{vr.x=vr.y=!1})}function mO(e,t){const n=Y8(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function ZA(e){return!(e.pointerType==="touch"||hO())}function e9(e,t,n={}){const[r,a,s]=mO(e,n),l=u=>{if(!ZA(u))return;const{target:d}=u,h=t(d,u);if(typeof h!="function"||!d)return;const m=y=>{ZA(y)&&(h(y),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,a)};return r.forEach(u=>{u.addEventListener("pointerenter",l,a)}),s}const pO=(e,t)=>t?e===t?!0:pO(e,t.parentElement):!1,Tb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,t9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function n9(e){return t9.has(e.tagName)||e.tabIndex!==-1}const Jd=new WeakSet;function qA(e){return t=>{t.key==="Enter"&&e(t)}}function xg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const r9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=qA(()=>{if(Jd.has(n))return;xg(n,"down");const a=qA(()=>{xg(n,"up")}),s=()=>xg(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function WA(e){return Tb(e)&&!hO()}function i9(e,t,n={}){const[r,a,s]=mO(e,n),l=u=>{const d=u.currentTarget;if(!WA(u))return;Jd.add(d);const h=t(d,u),m=(v,_)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",g),Jd.has(d)&&Jd.delete(d),WA(v)&&typeof h=="function"&&h(v,{success:_})},y=v=>{m(v,d===window||d===document||n.useGlobalTarget||pO(d,v.target))},g=v=>{m(v,!1)};window.addEventListener("pointerup",y,a),window.addEventListener("pointercancel",g,a)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,a),aO(u)&&(u.addEventListener("focus",h=>r9(h,a)),!n9(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),s}function gO(e){return CN(e)&&"ownerSVGElement"in e}function a9(e){return gO(e)&&e.tagName==="svg"}const gn=e=>!!(e&&e.getVelocity),o9=[...cO,mn,sa],s9=e=>o9.find(lO(e)),yO=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function l9(e=!0){const t=E.useContext(ab);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,s=E.useId();E.useEffect(()=>{if(e)return a(s)},[e]);const l=E.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,l]:[!0]}const Rb=E.createContext({strict:!1}),YA={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},xs={};for(const e in YA)xs[e]={isEnabled:t=>YA[e].some(n=>!!t[n])};function Iy(e){for(const t in e)xs[t]={...xs[t],...e[t]}}function c9({children:e,features:t,strict:n=!1}){const[,r]=E.useState(!Eg(t)),a=E.useRef(void 0);if(!Eg(t)){const{renderer:s,...l}=t;a.current=s,Iy(l)}return E.useEffect(()=>{Eg(t)&&t().then(({renderer:s,...l})=>{Iy(l),a.current=s,r(!0)})},[]),b.jsx(Rb.Provider,{value:{renderer:a.current,strict:n},children:e})}function Eg(e){return typeof e=="function"}const u9=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Rf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||u9.has(e)}let vO=e=>!Rf(e);function d9(e){e&&(vO=t=>t.startsWith("on")?!Rf(t):e(t))}try{d9(require("@emotion/is-prop-valid").default)}catch{}function f9(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(vO(a)||n===!0&&Rf(a)||!t&&!Rf(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function h9(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const yh=E.createContext({});function vh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ec(e){return typeof e=="string"||Array.isArray(e)}const Cb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Nb=["initial",...Cb];function bh(e){return vh(e.animate)||Nb.some(t=>Ec(e[t]))}function bO(e){return!!(bh(e)||e.variants)}function m9(e,t){if(bh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ec(n)?n:void 0,animate:Ec(r)?r:void 0}}return e.inherit!==!1?t:{}}function p9(e){const{initial:t,animate:n}=m9(e,E.useContext(yh));return E.useMemo(()=>({initial:t,animate:n}),[XA(t),XA(n)])}function XA(e){return Array.isArray(e)?e.join(" "):e}const g9=Symbol.for("motionComponentSymbol");function os(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function y9(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):os(n)&&(n.current=r))},[t])}const Ob=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),v9="framerAppearId",_O="data-"+Ob(v9),xO=E.createContext({});function b9(e,t,n,r,a){var S,A;const{visualElement:s}=E.useContext(yh),l=E.useContext(Rb),u=E.useContext(ab),d=E.useContext(yO).reducedMotion,h=E.useRef(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const m=h.current,y=E.useContext(xO);m&&!m.projection&&a&&(m.type==="html"||m.type==="svg")&&_9(h.current,n,a,y);const g=E.useRef(!1);E.useInsertionEffect(()=>{m&&g.current&&m.update(n,u)});const v=n[_O],_=E.useRef(!!v&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,v))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,v)));return d6(()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),wb.render(m.render),_.current&&m.animationState&&m.animationState.animateChanges())}),E.useEffect(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,v)}),_.current=!1))}),m}function _9(e,t,n,r){const{layoutId:a,layout:s,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:EO(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!l||u&&os(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:h})}function EO(e){if(e)return e.options.allowProjection!==!1?e.projection:EO(e.parent)}function x9({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){e&&Iy(e);function s(u,d){let h;const m={...E.useContext(yO),...u,layoutId:E9(u)},{isStatic:y}=m,g=p9(u),v=r(u,y);if(!y&&ib){S9();const _=A9(m);h=_.MeasureLayout,g.visualElement=b9(a,v,m,t,_.ProjectionNode)}return b.jsxs(yh.Provider,{value:g,children:[h&&g.visualElement?b.jsx(h,{visualElement:g.visualElement,...m}):null,n(a,u,y9(v,g.visualElement,d),v,y,g.visualElement)]})}s.displayName=`motion.${typeof a=="string"?a:`create(${a.displayName??a.name??""})`}`;const l=E.forwardRef(s);return l[g9]=a,l}function E9({layoutId:e}){const t=E.useContext(TN).id;return t&&e!==void 0?t+"-"+e:e}function S9(e,t){E.useContext(Rb).strict}function A9(e){const{drag:t,layout:n}=xs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Sc={};function w9(e){for(const t in e)Sc[t]=e[t],hb(t)&&(Sc[t].isCSSVariable=!0)}function SO(e,{layout:t,layoutId:n}){return Ps.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Sc[e]||e==="opacity")}const T9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},R9=Ms.length;function C9(e,t,n){let r="",a=!0;for(let s=0;s<R9;s++){const l=Ms[s],u=e[l];if(u===void 0)continue;let d=!0;if(typeof u=="number"?d=u===(l.startsWith("scale")?1:0):d=parseFloat(u)===0,!d||n){const h=fO(u,Ab[l]);if(!d){a=!1;const m=T9[l]||l;r+=`${m}(${h}) `}n&&(t[l]=h)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function kb(e,t,n){const{style:r,vars:a,transformOrigin:s}=e;let l=!1,u=!1;for(const d in t){const h=t[d];if(Ps.has(d)){l=!0;continue}else if(hb(d)){a[d]=h;continue}else{const m=fO(h,Ab[d]);d.startsWith("origin")?(u=!0,s[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=C9(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:m=0}=s;r.transformOrigin=`${d} ${h} ${m}`}}const Db=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function AO(e,t,n){for(const r in t)!gn(t[r])&&!SO(r,n)&&(e[r]=t[r])}function N9({transformTemplate:e},t){return E.useMemo(()=>{const n=Db();return kb(n,t,e),Object.assign({},n.vars,n.style)},[t])}function O9(e,t){const n=e.style||{},r={};return AO(r,n,e),Object.assign(r,N9(e,t)),r}function k9(e,t){const n={},r=O9(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const D9={offset:"stroke-dashoffset",array:"stroke-dasharray"},I9={offset:"strokeDashoffset",array:"strokeDasharray"};function L9(e,t,n=1,r=0,a=!0){e.pathLength=1;const s=a?D9:I9;e[s.offset]=ze.transform(-r);const l=ze.transform(t),u=ze.transform(n);e[s.array]=`${l} ${u}`}function wO(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...u},d,h,m){if(kb(e,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:g}=e;y.transform&&(g.transform=y.transform,delete y.transform),(g.transform||y.transformOrigin)&&(g.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),g.transform&&(g.transformBox=(m==null?void 0:m.transformBox)??"fill-box",delete y.transformBox),t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),r!==void 0&&(y.scale=r),a!==void 0&&L9(y,a,s,l,!1)}const TO=()=>({...Db(),attrs:{}}),RO=e=>typeof e=="string"&&e.toLowerCase()==="svg";function j9(e,t,n,r){const a=E.useMemo(()=>{const s=TO();return wO(s,t,RO(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};AO(s,e.style,e),a.style={...s,...a.style}}return a}const M9=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ib(e){return typeof e!="string"||e.includes("-")?!1:!!(M9.indexOf(e)>-1||/[A-Z]/u.test(e))}function P9(e=!1){return(n,r,a,{latestValues:s},l)=>{const d=(Ib(n)?j9:k9)(r,s,l,n),h=f9(r,typeof n=="string",e),m=n!==E.Fragment?{...h,...d,ref:a}:{},{children:y}=r,g=E.useMemo(()=>gn(y)?y.get():y,[y]);return E.createElement(n,{...m,children:g})}}function QA(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Lb(e,t,n,r){if(typeof t=="function"){const[a,s]=QA(r);t=t(n!==void 0?n:e.custom,a,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,s]=QA(r);t=t(n!==void 0?n:e.custom,a,s)}return t}function ef(e){return gn(e)?e.get():e}function z9({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:V9(n,r,a,e),renderState:t()}}const CO=e=>(t,n)=>{const r=E.useContext(yh),a=E.useContext(ab),s=()=>z9(e,t,r,a);return n?s():u6(s)};function V9(e,t,n,r){const a={},s=r(e,{});for(const g in s)a[g]=ef(s[g]);let{initial:l,animate:u}=e;const d=bh(e),h=bO(e);t&&h&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const y=m?u:l;if(y&&typeof y!="boolean"&&!vh(y)){const g=Array.isArray(y)?y:[y];for(let v=0;v<g.length;v++){const _=Lb(e,g[v]);if(_){const{transitionEnd:S,transition:A,...w}=_;for(const T in w){let C=w[T];if(Array.isArray(C)){const k=m?C.length-1:0;C=C[k]}C!==null&&(a[T]=C)}for(const T in S)a[T]=S[T]}}}return a}function jb(e,t,n){var s;const{style:r}=e,a={};for(const l in r)(gn(r[l])||t.style&&gn(t.style[l])||SO(l,e)||((s=n==null?void 0:n.getValue(l))==null?void 0:s.liveStyle)!==void 0)&&(a[l]=r[l]);return a}const B9={useVisualState:CO({scrapeMotionValuesFromProps:jb,createRenderState:Db})};function NO(e,t,n){const r=jb(e,t,n);for(const a in e)if(gn(e[a])||gn(t[a])){const s=Ms.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[s]=e[a]}return r}const U9={useVisualState:CO({scrapeMotionValuesFromProps:NO,createRenderState:TO})};function $9(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const l={...Ib(r)?U9:B9,preloadedFeatures:e,useRender:P9(a),createVisualElement:t,Component:r};return x9(l)}}function Ac(e,t,n){const r=e.getProps();return Lb(r,t,n!==void 0?n:r.custom,e)}const Ly=e=>Array.isArray(e);function H9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_s(n))}function F9(e){return Ly(e)?e[e.length-1]||0:e}function G9(e,t){const n=Ac(e,t);let{transitionEnd:r={},transition:a={},...s}=n||{};s={...s,...r};for(const l in s){const u=F9(s[l]);H9(e,l,u)}}function K9(e){return!!(gn(e)&&e.add)}function jy(e,t){const n=e.getValue("willChange");if(K9(n))return n.add(t);if(!n&&Ai.WillChange){const r=new Ai.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function OO(e){return e.props[_O]}const Z9=e=>e!==null;function q9(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(Z9),s=t&&n!=="loop"&&t%2===1?0:a.length-1;return a[s]}const W9={type:"spring",stiffness:500,damping:25,restSpeed:10},Y9=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),X9={type:"keyframes",duration:.8},Q9={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},J9=(e,{keyframes:t})=>t.length>2?X9:Ps.has(e)?e.startsWith("scale")?Y9(t[1]):W9:Q9;function e7({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:s,repeatType:l,repeatDelay:u,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const Mb=(e,t,n,r={},a,s)=>l=>{const u=Sb(r,e)||{},d=u.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Vr(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-h,onUpdate:g=>{t.set(g),u.onUpdate&&u.onUpdate(g)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:s?void 0:a};e7(u)||Object.assign(m,J9(e,m)),m.duration&&(m.duration=Vr(m.duration)),m.repeatDelay&&(m.repeatDelay=Vr(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(y=!0)),(Ai.instantAnimations||Ai.skipAnimations)&&(y=!0,m.duration=0,m.delay=0),m.allowFlatten=!u.type&&!u.ease,y&&!s&&t.get()!==void 0){const g=q9(m.keyframes,u);if(g!==void 0){Et.update(()=>{m.onUpdate(g),m.onComplete()});return}}return u.isSync?new xb(m):new P8(m)};function t7({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function kO(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...u}=t;r&&(s=r);const d=[],h=a&&e.animationState&&e.animationState.getState()[a];for(const m in u){const y=e.getValue(m,e.latestValues[m]??null),g=u[m];if(g===void 0||h&&t7(h,m))continue;const v={delay:n,...Sb(s||{},m)},_=y.get();if(_!==void 0&&!y.isAnimating&&!Array.isArray(g)&&g===_&&!v.velocity)continue;let S=!1;if(window.MotionHandoffAnimation){const w=OO(e);if(w){const T=window.MotionHandoffAnimation(w,m,Et);T!==null&&(v.startTime=T,S=!0)}}jy(e,m),y.start(Mb(m,y,g,e.shouldReduceMotion&&sO.has(m)?{type:!1}:v,e,S));const A=y.animation;A&&d.push(A)}return l&&Promise.all(d).then(()=>{Et.update(()=>{l&&G9(e,l)})}),d}function My(e,t,n={}){var d;const r=Ac(e,t,n.type==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const s=r?()=>Promise.all(kO(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:m=0,staggerChildren:y,staggerDirection:g}=a;return n7(e,t,m+h,y,g,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[h,m]=u==="beforeChildren"?[s,l]:[l,s];return h().then(()=>m())}else return Promise.all([s(),l(n.delay)])}function n7(e,t,n=0,r=0,a=1,s){const l=[],u=(e.variantChildren.size-1)*r,d=a===1?(h=0)=>h*r:(h=0)=>u-h*r;return Array.from(e.variantChildren).sort(r7).forEach((h,m)=>{h.notify("AnimationStart",t),l.push(My(h,t,{...s,delay:n+d(m)}).then(()=>h.notify("AnimationComplete",t)))}),Promise.all(l)}function r7(e,t){return e.sortNodePosition(t)}function i7(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(s=>My(e,s,n));r=Promise.all(a)}else if(typeof t=="string")r=My(e,t,n);else{const a=typeof t=="function"?Ac(e,t,n.custom):t;r=Promise.all(kO(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function DO(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const a7=Nb.length;function IO(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?IO(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<a7;n++){const r=Nb[n],a=e.props[r];(Ec(a)||a===!1)&&(t[r]=a)}return t}const o7=[...Cb].reverse(),s7=Cb.length;function l7(e){return t=>Promise.all(t.map(({animation:n,options:r})=>i7(e,n,r)))}function c7(e){let t=l7(e),n=JA(),r=!0;const a=d=>(h,m)=>{var g;const y=Ac(e,m,d==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(y){const{transition:v,transitionEnd:_,...S}=y;h={...h,...S,..._}}return h};function s(d){t=d(e)}function l(d){const{props:h}=e,m=IO(e.parent)||{},y=[],g=new Set;let v={},_=1/0;for(let A=0;A<s7;A++){const w=o7[A],T=n[w],C=h[w]!==void 0?h[w]:m[w],k=Ec(C),N=w===d?T.isActive:null;N===!1&&(_=A);let L=C===m[w]&&C!==h[w]&&k;if(L&&r&&e.manuallyAnimateOnMount&&(L=!1),T.protectedKeys={...v},!T.isActive&&N===null||!C&&!T.prevProp||vh(C)||typeof C=="boolean")continue;const D=u7(T.prevProp,C);let j=D||w===d&&T.isActive&&!L&&k||A>_&&k,V=!1;const U=Array.isArray(C)?C:[C];let ue=U.reduce(a(w),{});N===!1&&(ue={});const{prevResolvedValues:ie={}}=T,fe={...ie,...ue},Y=ne=>{j=!0,g.has(ne)&&(V=!0,g.delete(ne)),T.needsAnimating[ne]=!0;const K=e.getValue(ne);K&&(K.liveStyle=!1)};for(const ne in fe){const K=ue[ne],ye=ie[ne];if(v.hasOwnProperty(ne))continue;let P=!1;Ly(K)&&Ly(ye)?P=!DO(K,ye):P=K!==ye,P?K!=null?Y(ne):g.add(ne):K!==void 0&&g.has(ne)?Y(ne):T.protectedKeys[ne]=!0}T.prevProp=C,T.prevResolvedValues=ue,T.isActive&&(v={...v,...ue}),r&&e.blockInitialAnimation&&(j=!1),j&&(!(L&&D)||V)&&y.push(...U.map(ne=>({animation:ne,options:{type:w}})))}if(g.size){const A={};if(typeof h.initial!="boolean"){const w=Ac(e,Array.isArray(h.initial)?h.initial[0]:h.initial);w&&w.transition&&(A.transition=w.transition)}g.forEach(w=>{const T=e.getBaseTarget(w),C=e.getValue(w);C&&(C.liveStyle=!0),A[w]=T??null}),y.push({animation:A})}let S=!!y.length;return r&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(y):Promise.resolve()}function u(d,h){var y;if(n[d].isActive===h)return Promise.resolve();(y=e.variantChildren)==null||y.forEach(g=>{var v;return(v=g.animationState)==null?void 0:v.setActive(d,h)}),n[d].isActive=h;const m=l(d);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:s,getState:()=>n,reset:()=>{n=JA(),r=!0}}}function u7(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!DO(t,e):!1}function Ha(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function JA(){return{animate:Ha(!0),whileInView:Ha(),whileHover:Ha(),whileTap:Ha(),whileDrag:Ha(),whileFocus:Ha(),exit:Ha()}}class pa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class d7 extends pa{constructor(t){super(t),t.animationState||(t.animationState=c7(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let f7=0;class h7 extends pa{constructor(){super(...arguments),this.id=f7++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const LO={animation:{Feature:d7},exit:{Feature:h7}};function wc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Qc(e){return{point:{x:e.pageX,y:e.pageY}}}const m7=e=>t=>Tb(t)&&e(t,Qc(t));function sc(e,t,n,r){return wc(e,t,m7(n),r)}function jO({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function p7({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function g7(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const MO=1e-4,y7=1-MO,v7=1+MO,PO=.01,b7=0-PO,_7=0+PO;function En(e){return e.max-e.min}function x7(e,t,n){return Math.abs(e-t)<=n}function ew(e,t,n,r=.5){e.origin=r,e.originPoint=_t(t.min,t.max,e.origin),e.scale=En(n)/En(t),e.translate=_t(n.min,n.max,e.origin)-e.originPoint,(e.scale>=y7&&e.scale<=v7||isNaN(e.scale))&&(e.scale=1),(e.translate>=b7&&e.translate<=_7||isNaN(e.translate))&&(e.translate=0)}function lc(e,t,n,r){ew(e.x,t.x,n.x,r?r.originX:void 0),ew(e.y,t.y,n.y,r?r.originY:void 0)}function tw(e,t,n){e.min=n.min+t.min,e.max=e.min+En(t)}function E7(e,t,n){tw(e.x,t.x,n.x),tw(e.y,t.y,n.y)}function nw(e,t,n){e.min=t.min-n.min,e.max=e.min+En(t)}function cc(e,t,n){nw(e.x,t.x,n.x),nw(e.y,t.y,n.y)}const rw=()=>({translate:0,scale:1,origin:0,originPoint:0}),ss=()=>({x:rw(),y:rw()}),iw=()=>({min:0,max:0}),kt=()=>({x:iw(),y:iw()});function rr(e){return[e("x"),e("y")]}function Sg(e){return e===void 0||e===1}function Py({scale:e,scaleX:t,scaleY:n}){return!Sg(e)||!Sg(t)||!Sg(n)}function Fa(e){return Py(e)||zO(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zO(e){return aw(e.x)||aw(e.y)}function aw(e){return e&&e!=="0%"}function Cf(e,t,n){const r=e-n,a=t*r;return n+a}function ow(e,t,n,r,a){return a!==void 0&&(e=Cf(e,a,r)),Cf(e,n,r)+t}function zy(e,t=0,n=1,r,a){e.min=ow(e.min,t,n,r,a),e.max=ow(e.max,t,n,r,a)}function VO(e,{x:t,y:n}){zy(e.x,t.translate,t.scale,t.originPoint),zy(e.y,n.translate,n.scale,n.originPoint)}const sw=.999999999999,lw=1.0000000000001;function S7(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u<a;u++){s=n[u],l=s.projectionDelta;const{visualElement:d}=s.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&cs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,VO(e,l)),r&&Fa(s.latestValues)&&cs(e,s.latestValues))}t.x<lw&&t.x>sw&&(t.x=1),t.y<lw&&t.y>sw&&(t.y=1)}function ls(e,t){e.min=e.min+t,e.max=e.max+t}function cw(e,t,n,r,a=.5){const s=_t(e.min,e.max,a);zy(e,t,n,s,r)}function cs(e,t){cw(e.x,t.x,t.scaleX,t.scale,t.originX),cw(e.y,t.y,t.scaleY,t.scale,t.originY)}function BO(e,t){return jO(g7(e.getBoundingClientRect(),t))}function A7(e,t,n){const r=BO(e,n),{scroll:a}=t;return a&&(ls(r.x,a.offset.x),ls(r.y,a.offset.y)),r}const UO=({current:e})=>e?e.ownerDocument.defaultView:null,uw=(e,t)=>Math.abs(e-t);function w7(e,t){const n=uw(e.x,t.x),r=uw(e.y,t.y);return Math.sqrt(n**2+r**2)}class $O{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=wg(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=w7(y.offset,{x:0,y:0})>=3;if(!g&&!v)return;const{point:_}=y,{timestamp:S}=sn;this.history.push({..._,timestamp:S});const{onStart:A,onMove:w}=this.handlers;g||(A&&A(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,y)},this.handlePointerMove=(y,g)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Ag(g,this.transformPagePoint),Et.update(this.updatePoint,!0)},this.handlePointerUp=(y,g)=>{this.end();const{onEnd:v,onSessionEnd:_,resumeAnimation:S}=this.handlers;if(this.dragSnapToOrigin&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=wg(y.type==="pointercancel"?this.lastMoveEventInfo:Ag(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(y,A),_&&_(y,A)},!Tb(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const l=Qc(t),u=Ag(l,this.transformPagePoint),{point:d}=u,{timestamp:h}=sn;this.history=[{...d,timestamp:h}];const{onSessionStart:m}=n;m&&m(t,wg(u,this.history)),this.removeListeners=Wc(sc(this.contextWindow,"pointermove",this.handlePointerMove),sc(this.contextWindow,"pointerup",this.handlePointerUp),sc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),oa(this.updatePoint)}}function Ag(e,t){return t?{point:t(e.point)}:e}function dw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wg({point:e},t){return{point:e,delta:dw(e,HO(t)),offset:dw(e,T7(t)),velocity:R7(t,.1)}}function T7(e){return e[0]}function HO(e){return e[e.length-1]}function R7(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=HO(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Vr(t)));)n--;if(!r)return{x:0,y:0};const s=Br(a.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(a.x-r.x)/s,y:(a.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function C7(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?_t(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?_t(n,e,r.max):Math.min(e,n)),e}function fw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function N7(e,{top:t,left:n,bottom:r,right:a}){return{x:fw(e.x,n,a),y:fw(e.y,t,r)}}function hw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function O7(e,t){return{x:hw(e.x,t.x),y:hw(e.y,t.y)}}function k7(e,t){let n=.5;const r=En(e),a=En(t);return a>r?n=bc(t.min,t.max-r,e.min):r>a&&(n=bc(e.min,e.max-a,t.min)),Si(0,1,n)}function D7(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Vy=.35;function I7(e=Vy){return e===!1?e=0:e===!0&&(e=Vy),{x:mw(e,"left","right"),y:mw(e,"top","bottom")}}function mw(e,t,n){return{min:pw(e,t),max:pw(e,n)}}function pw(e,t){return typeof e=="number"?e:e[t]||0}const L7=new WeakMap;class j7{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=kt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=m=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Qc(m).point)},s=(m,y)=>{const{drag:g,dragPropagation:v,onDragStart:_}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J8(g),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rr(A=>{let w=this.getAxisMotionValue(A).get()||0;if(Ur.test(w)){const{projection:T}=this.visualElement;if(T&&T.layout){const C=T.layout.layoutBox[A];C&&(w=En(C)*(parseFloat(w)/100))}}this.originPoint[A]=w}),_&&Et.postRender(()=>_(m,y)),jy(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},l=(m,y)=>{const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:_,onDrag:S}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:A}=y;if(v&&this.currentDirection===null){this.currentDirection=M7(A),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",y.point,A),this.updateAxis("y",y.point,A),this.visualElement.render(),S&&S(m,y)},u=(m,y)=>this.stop(m,y),d=()=>rr(m=>{var y;return this.getAnimationState(m)==="paused"&&((y=this.getAxisMotionValue(m).animation)==null?void 0:y.play())}),{dragSnapToOrigin:h}=this.getProps();this.panSession=new $O(t,{onSessionStart:a,onStart:s,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,contextWindow:UO(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&Et.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Dd(t,a,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=C7(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,a=this.constraints;t&&os(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=N7(r.layoutBox,t):this.constraints=!1,this.elastic=I7(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&rr(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=D7(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!os(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const s=A7(r,a.root,this.visualElement.getTransformPagePoint());let l=O7(a.layout.layoutBox,s);if(n){const u=n(p7(l));this.hasMutatedConstraints=!!u,u&&(l=jO(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},h=rr(m=>{if(!Dd(m,n,this.currentDirection))return;let y=d&&d[m]||{};l&&(y={min:0,max:0});const g=a?200:1e6,v=a?40:1e7,_={type:"inertia",velocity:r?t[m]:0,bounceStiffness:g,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...y};return this.startAxisValueAnimation(m,_)});return Promise.all(h).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return jy(this.visualElement,t),r.start(Mb(t,r,0,n,this.visualElement,!1))}stopAnimation(){rr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rr(n=>{const{drag:r}=this.getProps();if(!Dd(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,s=this.getAxisMotionValue(n);if(a&&a.layout){const{min:l,max:u}=a.layout.layoutBox[n];s.set(t[n]-_t(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!os(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};rr(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();a[l]=k7({min:d,max:d},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rr(l=>{if(!Dd(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];u.set(_t(d,h,a[l]))})}addListeners(){if(!this.visualElement.current)return;L7.set(this.visualElement,this);const t=this.visualElement.current,n=sc(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps();h&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();os(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,s=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Et.read(r);const l=wc(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(rr(m=>{const y=this.getAxisMotionValue(m);y&&(this.originPoint[m]+=d[m].translate,y.set(y.get()+d[m].translate))}),this.visualElement.render())});return()=>{l(),n(),s(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:s=!1,dragElastic:l=Vy,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function Dd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function M7(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class P7 extends pa{constructor(t){super(t),this.removeGroupControls=sr,this.removeListeners=sr,this.controls=new j7(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||sr}unmount(){this.removeGroupControls(),this.removeListeners()}}const gw=e=>(t,n)=>{e&&Et.postRender(()=>e(t,n))};class z7 extends pa{constructor(){super(...arguments),this.removePointerDownListener=sr}onPointerDown(t){this.session=new $O(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:UO(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:gw(t),onStart:gw(n),onMove:r,onEnd:(s,l)=>{delete this.session,a&&Et.postRender(()=>a(s,l))}}}mount(){this.removePointerDownListener=sc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const tf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function yw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Zl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ze.test(e))e=parseFloat(e);else return e;const n=yw(e,t.target.x),r=yw(e,t.target.y);return`${n}% ${r}%`}},V7={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=sa.parse(e);if(a.length>5)return r;const s=sa.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=d;const h=_t(u,d,.5);return typeof a[2+l]=="number"&&(a[2+l]/=h),typeof a[3+l]=="number"&&(a[3+l]/=h),s(a)}};class B7 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:s}=t;w9(U7),s&&(n.group&&n.group.add(s),r&&r.register&&a&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),tf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:s}=this.props,{projection:l}=r;return l&&(l.isPresent=s,a||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Et.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),wb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function FO(e){const[t,n]=l9(),r=E.useContext(TN);return b.jsx(B7,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(xO),isPresent:t,safeToRemove:n})}const U7={borderRadius:{...Zl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zl,borderTopRightRadius:Zl,borderBottomLeftRadius:Zl,borderBottomRightRadius:Zl,boxShadow:V7};function $7(e,t,n){const r=gn(e)?e:_s(e);return r.start(Mb("",r,t,n)),r.animation}const H7=(e,t)=>e.depth-t.depth;class F7{constructor(){this.children=[],this.isDirty=!1}add(t){ob(this.children,t),this.isDirty=!0}remove(t){sb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(H7),this.isDirty=!1,this.children.forEach(t)}}function G7(e,t){const n=Nn.now(),r=({timestamp:a})=>{const s=a-n;s>=t&&(oa(r),e(s-t))};return Et.setup(r,!0),()=>oa(r)}const GO=["TopLeft","TopRight","BottomLeft","BottomRight"],K7=GO.length,vw=e=>typeof e=="string"?parseFloat(e):e,bw=e=>typeof e=="number"||ze.test(e);function Z7(e,t,n,r,a,s){a?(e.opacity=_t(0,n.opacity??1,q7(r)),e.opacityExit=_t(t.opacity??1,0,W7(r))):s&&(e.opacity=_t(t.opacity??1,n.opacity??1,r));for(let l=0;l<K7;l++){const u=`border${GO[l]}Radius`;let d=_w(t,u),h=_w(n,u);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||bw(d)===bw(h)?(e[u]=Math.max(_t(vw(d),vw(h),r),0),(Ur.test(h)||Ur.test(d))&&(e[u]+="%")):e[u]=h}(t.rotate||n.rotate)&&(e.rotate=_t(t.rotate||0,n.rotate||0,r))}function _w(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const q7=KO(0,.5,PN),W7=KO(.5,.95,sr);function KO(e,t,n){return r=>r<e?0:r>t?1:n(bc(e,t,r))}function xw(e,t){e.min=t.min,e.max=t.max}function tr(e,t){xw(e.x,t.x),xw(e.y,t.y)}function Ew(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Sw(e,t,n,r,a){return e-=t,e=Cf(e,1/n,r),a!==void 0&&(e=Cf(e,1/a,r)),e}function Y7(e,t=0,n=1,r=.5,a,s=e,l=e){if(Ur.test(t)&&(t=parseFloat(t),t=_t(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=_t(s.min,s.max,r);e===s&&(u-=t),e.min=Sw(e.min,t,n,u,a),e.max=Sw(e.max,t,n,u,a)}function Aw(e,t,[n,r,a],s,l){Y7(e,t[n],t[r],t[a],t.scale,s,l)}const X7=["x","scaleX","originX"],Q7=["y","scaleY","originY"];function ww(e,t,n,r){Aw(e.x,t,X7,n?n.x:void 0,r?r.x:void 0),Aw(e.y,t,Q7,n?n.y:void 0,r?r.y:void 0)}function Tw(e){return e.translate===0&&e.scale===1}function ZO(e){return Tw(e.x)&&Tw(e.y)}function Rw(e,t){return e.min===t.min&&e.max===t.max}function J7(e,t){return Rw(e.x,t.x)&&Rw(e.y,t.y)}function Cw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qO(e,t){return Cw(e.x,t.x)&&Cw(e.y,t.y)}function Nw(e){return En(e.x)/En(e.y)}function Ow(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class eK{constructor(){this.members=[]}add(t){ob(this.members,t),t.scheduleRender()}remove(t){if(sb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const s=this.members[a];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function tK(e,t,n){let r="";const a=e.x.translate/t.x,s=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((a||s||l)&&(r=`translate3d(${a}px, ${s}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,rotateX:y,rotateY:g,skewX:v,skewY:_}=n;h&&(r=`perspective(${h}px) ${r}`),m&&(r+=`rotate(${m}deg) `),y&&(r+=`rotateX(${y}deg) `),g&&(r+=`rotateY(${g}deg) `),v&&(r+=`skewX(${v}deg) `),_&&(r+=`skewY(${_}deg) `)}const u=e.x.scale*t.x,d=e.y.scale*t.y;return(u!==1||d!==1)&&(r+=`scale(${u}, ${d})`),r||"none"}const Tg=["","X","Y","Z"],nK={visibility:"hidden"},rK=1e3;let iK=0;function Rg(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function WO(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=OO(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Et,!(a||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&WO(r)}function YO({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(l={},u=t==null?void 0:t()){this.id=iK++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(sK),this.nodes.forEach(fK),this.nodes.forEach(hK),this.nodes.forEach(lK)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new F7)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new ub),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const d=this.eventHandlers.get(l);d&&d.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=gO(l)&&!a9(l),this.instance=l;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||u)&&(this.isLayoutDirty=!0),e){let m;const y=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=G7(y,250),tf.hasAnimatedSinceResize&&(tf.hasAnimatedSinceResize=!1,this.nodes.forEach(Dw))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||vK,{onLayoutAnimationStart:S,onLayoutAnimationComplete:A}=h.getProps(),w=!this.targetLayout||!qO(this.targetLayout,v),T=!y&&g;if(this.options.layoutRoot||this.resumeFrom||T||y&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...Sb(_,"layout"),onPlay:S,onComplete:A};(h.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(m,T)}else y||Dw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),oa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(mK),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&WO(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(kw);return}this.isUpdating||this.nodes.forEach(uK),this.isUpdating=!1,this.nodes.forEach(dK),this.nodes.forEach(aK),this.nodes.forEach(oK),this.clearAllSnapshots();const u=Nn.now();sn.delta=Si(0,1e3/60,u-sn.timestamp),sn.timestamp=u,sn.isProcessing=!0,yg.update.process(sn),yg.preRender.process(sn),yg.render.process(sn),sn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cK),this.sharedNodes.forEach(pK)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Et.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Et.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!En(this.snapshot.measuredBox.x)&&!En(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=kt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!a)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!ZO(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;l&&this.instance&&(u||Fa(this.latestValues)||m)&&(a(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),bK(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:l}=this.options;if(!l)return kt();const u=l.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(_K))){const{scroll:m}=this.root;m&&(ls(u.x,m.offset.x),ls(u.y,m.offset.y))}return u}removeElementScroll(l){var d;const u=kt();if(tr(u,l),(d=this.scroll)!=null&&d.wasRoot)return u;for(let h=0;h<this.path.length;h++){const m=this.path[h],{scroll:y,options:g}=m;m!==this.root&&y&&g.layoutScroll&&(y.wasRoot&&tr(u,l),ls(u.x,y.offset.x),ls(u.y,y.offset.y))}return u}applyTransform(l,u=!1){const d=kt();tr(d,l);for(let h=0;h<this.path.length;h++){const m=this.path[h];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&cs(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Fa(m.latestValues)&&cs(d,m.latestValues)}return Fa(this.latestValues)&&cs(d,this.latestValues),d}removeTransform(l){const u=kt();tr(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!Fa(h.latestValues))continue;Py(h.latestValues)&&h.updateSnapshot();const m=kt(),y=h.measurePageBox();tr(m,y),ww(u,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return Fa(this.latestValues)&&ww(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==sn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var g;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(l||d&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!(!this.layout||!(m||y))){if(this.resolvedRelativeTargetAt=sn.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kt(),this.relativeTargetOrigin=kt(),cc(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=kt(),this.targetWithTransforms=kt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),E7(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tr(this.target,this.layout.layoutBox),VO(this.target,this.targetDelta)):tr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const v=this.getClosestProjectingParent();v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kt(),this.relativeTargetOrigin=kt(),cc(this.relativeTargetOrigin,this.target,v.target),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Py(this.parent.latestValues)||zO(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var _;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||(_=this.parent)!=null&&_.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===sn.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;tr(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,g=this.treeScale.y;S7(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=kt());const{target:v}=l;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ew(this.prevProjectionDelta.x,this.projectionDelta.x),Ew(this.prevProjectionDelta.y,this.projectionDelta.y)),lc(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==g||!Ow(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ow(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ss(),this.projectionDelta=ss(),this.projectionDeltaWithTransform=ss()}setAnimationOrigin(l,u=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},y=ss();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const g=kt(),v=d?d.source:void 0,_=this.layout?this.layout.source:void 0,S=v!==_,A=this.getStack(),w=!A||A.members.length<=1,T=!!(S&&!w&&this.options.crossfade===!0&&!this.path.some(yK));this.animationProgress=0;let C;this.mixTargetDelta=k=>{const N=k/1e3;Iw(y.x,l.x,N),Iw(y.y,l.y,N),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cc(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),gK(this.relativeTarget,this.relativeTargetOrigin,g,N),C&&J7(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=kt()),tr(C,this.relativeTarget)),S&&(this.animationValues=m,Z7(m,h,this.latestValues,N,T,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var u,d,h;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(h=(d=this.resumingFrom)==null?void 0:d.currentAnimation)==null||h.stop(),this.pendingAnimation&&(oa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Et.update(()=>{tf.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=_s(0)),this.currentAnimation=$7(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),l.onUpdate&&l.onUpdate(m)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(rK),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:h,latestValues:m}=l;if(!(!u||!d||!h)){if(this!==l&&this.layout&&h&&XO(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||kt();const y=En(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+y;const g=En(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+g}tr(u,d),cs(u,m),lc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new eK),this.sharedNodes.get(l).add(u);const h=u.options.initialPromotionConfig;u.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var u;const{layoutId:l}=this.options;return l?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:l}=this.options;return l?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(u=!0),!u)return;const h={};d.z&&Rg("z",l,h,this.animationValues);for(let m=0;m<Tg.length;m++)Rg(`rotate${Tg[m]}`,l,h,this.animationValues),Rg(`skew${Tg[m]}`,l,h,this.animationValues);l.render();for(const m in h)l.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);l.scheduleRender()}getProjectionStyles(l){if(!this.instance||this.isSVG)return;if(!this.isVisible)return nK;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ef(l==null?void 0:l.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=ef(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Fa(this.latestValues)&&(v.transform=d?d({},""):"none",this.hasProjected=!1),v}const m=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=tK(this.projectionDeltaWithTransform,this.treeScale,m),d&&(u.transform=d(m,u.transform));const{x:y,y:g}=this.projectionDelta;u.transformOrigin=`${y.origin*100}% ${g.origin*100}% 0`,h.animationValues?u.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:u.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const v in Sc){if(m[v]===void 0)continue;const{correct:_,applyTo:S,isCSSVariable:A}=Sc[v],w=u.transform==="none"?m[v]:_(m[v],h);if(S){const T=S.length;for(let C=0;C<T;C++)u[S[C]]=w}else A?this.options.visualElement.renderState.vars[v]=w:u[v]=w}return this.options.layoutId&&(u.pointerEvents=h===this?ef(l==null?void 0:l.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(kw),this.root.sharedNodes.clear()}}}function aK(e){e.updateLayout()}function oK(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;s==="size"?rr(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=En(g);g.min=r[y].min,g.max=g.min+v}):XO(s,t.layoutBox,r)&&rr(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=En(r[y]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+v)});const u=ss();lc(u,r,t.layoutBox);const d=ss();l?lc(d,e.applyTransform(a,!0),t.measuredBox):lc(d,r,t.layoutBox);const h=!ZO(u);let m=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:v}=y;if(g&&v){const _=kt();cc(_,t.layoutBox,g.layoutBox);const S=kt();cc(S,r,v.layoutBox),qO(_,S)||(m=!0),y.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=_,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:d,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function sK(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function lK(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cK(e){e.clearSnapshot()}function kw(e){e.clearMeasurements()}function uK(e){e.isLayoutDirty=!1}function dK(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fK(e){e.resolveTargetDelta()}function hK(e){e.calcProjection()}function mK(e){e.resetSkewAndRotation()}function pK(e){e.removeLeadSnapshot()}function Iw(e,t,n){e.translate=_t(t.translate,0,n),e.scale=_t(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lw(e,t,n,r){e.min=_t(t.min,n.min,r),e.max=_t(t.max,n.max,r)}function gK(e,t,n,r){Lw(e.x,t.x,n.x,r),Lw(e.y,t.y,n.y,r)}function yK(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const vK={duration:.45,ease:[.4,0,.1,1]},jw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Mw=jw("applewebkit/")&&!jw("chrome/")?Math.round:sr;function Pw(e){e.min=Mw(e.min),e.max=Mw(e.max)}function bK(e){Pw(e.x),Pw(e.y)}function XO(e,t,n){return e==="position"||e==="preserve-aspect"&&!x7(Nw(t),Nw(n),.2)}function _K(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const xK=YO({attachResizeListener:(e,t)=>wc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Cg={current:void 0},QO=YO({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cg.current){const e=new xK({});e.mount(window),e.setOptions({layoutScroll:!0}),Cg.current=e}return Cg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),EK={pan:{Feature:z7},drag:{Feature:P7,ProjectionNode:QO,MeasureLayout:FO}};function zw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,s=r[a];s&&Et.postRender(()=>s(t,Qc(t)))}class SK extends pa{mount(){const{current:t}=this.node;t&&(this.unmount=e9(t,(n,r)=>(zw(this.node,r,"Start"),a=>zw(this.node,a,"End"))))}unmount(){}}class AK extends pa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Wc(wc(this.node.current,"focus",()=>this.onFocus()),wc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Vw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),s=r[a];s&&Et.postRender(()=>s(t,Qc(t)))}class wK extends pa{mount(){const{current:t}=this.node;t&&(this.unmount=i9(t,(n,r)=>(Vw(this.node,r,"Start"),(a,{success:s})=>Vw(this.node,a,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const By=new WeakMap,Ng=new WeakMap,TK=e=>{const t=By.get(e.target);t&&t(e)},RK=e=>{e.forEach(TK)};function CK({root:e,...t}){const n=e||document;Ng.has(n)||Ng.set(n,{});const r=Ng.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(RK,{root:e,...t})),r[a]}function NK(e,t,n){const r=CK(t);return By.set(e,n),r.observe(e),()=>{By.delete(e),r.unobserve(e)}}const OK={some:0,all:1};class kK extends pa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:OK[a]},u=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),g=h?m:y;g&&g(d)};return NK(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(DK(t,n))&&this.startObserver()}unmount(){}}function DK({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const JO={inView:{Feature:kK},tap:{Feature:wK},focus:{Feature:AK},hover:{Feature:SK}},IK={layout:{ProjectionNode:QO,MeasureLayout:FO}},Uy={current:null},ek={current:!1};function LK(){if(ek.current=!0,!!ib)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Uy.current=e.matches;e.addListener(t),t()}else Uy.current=!1}const jK=new WeakMap;function MK(e,t,n){for(const r in t){const a=t[r],s=n[r];if(gn(a))e.addValue(r,a);else if(gn(s))e.addValue(r,_s(a,{owner:e}));else if(s!==a)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(a):l.hasAnimated||l.set(a)}else{const l=e.getStaticValue(r);e.addValue(r,_s(l!==void 0?l:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Bw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class PK{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:s,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Eb,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=Nn.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Et.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=bh(n),this.isVariantNode=bO(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in y){const v=y[g];d[g]!==void 0&&gn(v)&&v.set(d[g],!1)}}mount(t){this.current=t,jK.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),ek.current||LK(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Uy.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),oa(this.notifyUpdate),oa(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ps.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Et.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),s(),l&&l(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in xs){const n=xs[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):kt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Bw.length;r++){const a=Bw[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const s="on"+a,l=t[s];l&&(this.propEventSubscriptions[a]=this.on(a,l))}this.prevMotionValues=MK(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=_s(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(RN(r)||NN(r))?r=parseFloat(r):!s9(r)&&sa.test(n)&&(r=dO(t,n)),this.setBaseTarget(t,gn(r)?r.get():r)),gn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=Lb(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!gn(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ub),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class tk extends PK{constructor(){super(...arguments),this.KeyframeResolver=W8}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;gn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function nk(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}function zK(e){return window.getComputedStyle(e)}class VK extends tk{constructor(){super(...arguments),this.type="html",this.renderInstance=nk}readValueFromInstance(t,n){var r;if(Ps.has(n))return(r=this.projection)!=null&&r.isProjecting?Ry(n):m8(t,n);{const a=zK(t),s=(hb(n)?a.getPropertyValue(n):a[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return BO(t,n)}build(t,n,r){kb(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return jb(t,n,r)}}const rk=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function BK(e,t,n,r){nk(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(rk.has(a)?a:Ob(a),t.attrs[a])}class UK extends tk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ps.has(n)){const r=uO(n);return r&&r.default||0}return n=rk.has(n)?n:Ob(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return NO(t,n,r)}build(t,n,r){wO(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){BK(t,n,r,a)}mount(t){this.isSVGTag=RO(t.tagName),super.mount(t)}}const ik=(e,t)=>Ib(e)?new UK(t):new VK(t,{allowProjection:e!==E.Fragment}),$K=$9({...LO,...JO,...EK,...IK},ik),ak=h9($K),HK={renderer:ik,...LO,...JO},ok=e=>{const[t,n]=E.useState(e);return E.useEffect(()=>{n(e??window.document.body)},[e]),t};function FK(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const{useRef:GK}=$e;function sk(e){const t=GK();return n=>{const r=e(n);return FK(t.current,r)?t.current:t.current=r}}const lk=e=>{const{disableScroll:t=!1,element:n,key:r="unnamed_blocker"}=e??{},{isElementScrollBlocked:a,addBlockage:s,removeBlockage:l}=WV(sk(h=>({isElementScrollBlocked:h.isElementScrollBlocked,addBlockage:h.addBlockage,removeBlockage:h.removeBlockage}))),u=ok(n);return E.useEffect(()=>{const h=n??window.document.body;t?s(r,h):l(r,h)},[s,t,n,r,l]),{isScrollBlocked:u?a(u):!1}},KK=cr("flex text-text flex-col backdrop-blur",{variants:{roundedSize:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},transparency:{none:"bg-card",sm:"bg-card/90",md:"bg-card/70",lg:"bg-card/40",xl:"bg-card/20",full:""},padding:{none:"p-0",sm:"p-1",md:"p-2",lg:"p-3",xl:"p-4"},separator:{without:"",x:"divide-x divide-dashed divide-text/20",y:"divide-y divide-dashed divide-text/20",both:"divide-x divide-y divide-dashed divide-text/20"},border:{none:"",with:"border-[1.5px]"},borderColor:{primary:"border-primary",secondary:"border-secondary",neutral:"border-neutral",text:"border-text ",error:"border-error",warning:"border-warning",success:"border-success"},background:{none:"bg-inherit",hoverable:"!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur",with:""},gap:{none:"gap-0",sm:"gap-1",md:"gap-3",lg:"gap-5",xl:"gap-8","2xl":"gap-10"}},defaultVariants:{roundedSize:"md",border:"none",borderColor:"text",transparency:"md",padding:"none",separator:"without",gap:"none"}}),qr=({children:e,roundedSize:t,padding:n,transparency:r,separator:a,className:s,border:l,borderColor:u,background:d,...h})=>b.jsx("div",{className:Ae(KK({roundedSize:t,transparency:r,padding:n,separator:a,border:typeof l=="boolean"?l?"with":"none":void 0,background:d,borderColor:u,className:s})),...h,children:e}),Pb="relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8",ZK="after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:hover:cursor-pointer after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100",qK=({className:e,...t})=>b.jsx("h1",{className:Ae("mt-5 text-2xl font-bold",e),...t}),WK=({className:e,...t})=>b.jsx("h2",{className:Ae("mt-16 mb-2 text-2xl font-bold",Pb,e),...t}),YK=({className:e,...t})=>b.jsx("h3",{className:Ae("mt-5 mb-2 text-xl font-bold",Pb,e),...t}),XK=({className:e,...t})=>b.jsx("h4",{className:Ae("mt-3 text-lg font-bold",Pb,e),...t}),QK=e=>String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase(),JK=e=>{var a;const t=document.getElementById(e),r=(((a=t==null?void 0:t.getBoundingClientRect())==null?void 0:a.top)??0)+window.scrollY-150;window.scrollTo({top:r,behavior:"smooth"})},eZ=(e,t)=>{const n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,a=window.getComputedStyle(e,":after"),s=n+parseInt(a.getPropertyValue("left"),10),l=s+parseInt(a.width,10),u=r+parseInt(a.getPropertyValue("top"),10),d=u+parseInt(a.height,10),h=t.clientX,m=t.clientY;return h>=s&&h<=l&&m>=u&&m<=d},zb=({H:e,children:t,className:n,isClickable:r,...a})=>{const s=typeof t=="string"?QK(t):void 0,l=u=>{const{id:d}=u.currentTarget;if(eZ(u.currentTarget,u)&&typeof d=="string"){const y=`${window.location.href.split("#")[0]}#${d}`;navigator.clipboard.writeText(y),JK(d)}};return b.jsx(e,{id:s,onClick:r?l:void 0,"aria-label":r?`Click to scroll to section ${s} and copy the link to the clipboard`:void 0,className:Ae(r&&ZK,n),...a,children:t})},tZ=({isClickable:e,...t})=>b.jsx(qK,{...t}),nZ=({isClickable:e=!1,...t})=>b.jsx(zb,{H:WK,isClickable:e,...t}),Vb=({isClickable:e=!1,...t})=>b.jsx(zb,{H:YK,isClickable:e,...t}),rZ=({isClickable:e=!1,...t})=>b.jsx(zb,{H:XK,isClickable:e,...t}),iZ=cr("cursor-default overflow-auto py-3 shadow-sm justify-center",{variants:{size:{sm:"h-auto max-h-[30vh] w-[95vw] max-w-xl",md:"h-auto max-h-[50vh] w-[95vw] max-w-xl",lg:"h-auto max-h-[70vh] w-[95vw] max-w-2xl",xl:"h-auto max-h-[95vh] w-[95vw] max-w-6xl",unset:"h-auto max-h-[95vh] w-[95vw]"}},defaultVariants:{size:"unset"}}),aZ=ak.create(qr),ck=({children:e,isOpen:t,container:n,disableScroll:r=!1,onClose:a,hasCloseButton:s=!1,title:l,size:u="md",className:d,...h})=>{const m=ok(n);if(lk({key:"modal",disableScroll:t&&r}),!m)return b.jsx(b.Fragment,{});const y=typeof l=="string";return co.createPortal(b.jsx(ak.div,{className:"bg-background/40 /40 invisible fixed left-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto backdrop-blur",animate:t?"visible":"invisible",variants:{visible:{opacity:1,visibility:"visible",transition:{duration:.1,when:"beforeChildren"}},invisible:{opacity:0,visibility:"hidden",transition:{duration:.1,when:"afterChildren"}}},onClick:g=>{g.stopPropagation(),a==null||a()},"aria-hidden":!t,children:b.jsx("div",{className:"flex justify-center p-4",children:b.jsxs(aZ,{onClick:g=>g.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:iZ({size:u,className:d}),role:"dialog","aria-modal":!0,roundedSize:"2xl",...h,children:[b.jsxs("div",{className:Ae("cursor-default px-4",s&&y?"flex items-center justify-center":s?"flex items-center justify-end":y?"items-center":"hidden"),children:[y&&b.jsx(Vb,{className:"ml-4 flex items-center justify-center text-lg font-bold",children:l}),s&&b.jsx(ut,{variant:"hoverable",color:"text",label:"Close modal",className:"ml-auto",onClick:g=>{g.stopPropagation(),a==null||a()},Icon:uo,size:"icon-md"})]}),b.jsx("div",{className:"flex flex-1 flex-col items-center overflow-auto",children:e})]})})}),m)},oZ=cr("gap-3 transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline","invisible-link":"h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0",button:"rounded-lg bg-current *:text-text-opposite min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50","button-outlined":"rounded-lg border-[1.5px] hover:bg-current/30 min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",hoverable:"block rounded-lg border-none bg-current/0 transition hover:bg-current/20 aria-[current]:bg-current/5"},color:{primary:"text-primary",secondary:"text-secondary",destructive:"text-destructive",neutral:"text-neutral",light:"text-white",dark:"text-neutral-800",text:"text-text","text-inverse":"text-text-opposite",error:"text-error",success:"text-success",custom:""},underlined:{default:"",true:"underline",false:"no-underline"}},defaultVariants:{variant:"default",color:"primary",underlined:"default"}}),sZ=({href:e,isExternalLink:t})=>{const n=typeof e=="string"&&e.trim()!=="";return t===!0||typeof t>"u"&&n&&/^https?:\/\//.test(e)},Bb=e=>{const{variant:t="default",color:n="primary",children:r,label:a,className:s,isActive:l,underlined:u,locale:d,isExternalLink:h,href:m,...y}=e,{internationalization:g}=qe,v=sZ(e),_=typeof r=="string",S=v?"noopener noreferrer nofollow":void 0,A=v?"_blank":"_self",w=d?d===g.defaultLocale?"x-default":d:void 0,T=d&&m&&!v?Yj(m,d):m;return b.jsxs("a",{href:T,hrefLang:w,"aria-label":a,rel:S,target:A,"aria-current":l?"page":void 0,className:Ae(oZ({variant:t,color:n,underlined:u,className:s})),...y,children:[t==="button"?b.jsx("span",{children:r}):r,v&&_&&b.jsx(Pz,{className:"ml-2 inline-block size-4"})]})},uk={key:"breadcrumb",content:{linkLabel:ge({en:"Go to",fr:"Aller à",es:"Ir a","en-GB":"Go to",de:"Gehe zu",ja:"に移動",ko:"로 이동",zh:"转到",it:"Vai a",pt:"Ir para",hi:"कर जाएं",ar:"اذهب إلى",ru:"Перейти на"})}},lZ=({href:e,lang:t,children:n,onClick:r,color:a,position:s,locale:l,...u})=>{const{linkLabel:d}=Qt(uk);return b.jsxs(b.Fragment,{children:[b.jsx(Bb,{href:e,locale:l,color:a,onClick:r,itemProp:"item",itemScope:!0,itemType:"https://schema.org/WebPage",...u,label:`${d} ${n}`,itemID:e,children:b.jsx("span",{itemProp:"name",children:n})}),b.jsx("meta",{itemProp:"position",content:s.toString()})]})},cZ=({children:e,onClick:t,color:n,position:r,...a})=>{const{linkLabel:s}=Qt(uk);return b.jsxs(b.Fragment,{children:[b.jsx(ut,{onClick:t,variant:"link",label:`${s} ${e}`,color:n,itemProp:"item",...a,children:b.jsx("span",{itemProp:"name",children:e})}),b.jsx("meta",{itemProp:"position",content:r.toString()})]})},uZ=({children:e,position:t,...n})=>b.jsxs("span",{itemProp:"item",children:[b.jsx("span",{itemProp:"name",...n,children:e}),b.jsx("meta",{itemProp:"position",content:t.toString()})]}),dZ=({links:e,className:t,color:n="text",locale:r,elementType:a="page",...s})=>b.jsx("nav",{"aria-label":"breadcrumb",children:b.jsx("ol",{className:Ae("flex flex-row flex-wrap items-center gap-2 text-sm",t),itemScope:!0,itemType:"http://schema.org/BreadcrumbList",...s,children:e.map((l,u)=>{const d=u===e.length-1,h=typeof l=="object"&&typeof l.href=="string",m=typeof l=="object"&&typeof l.onClick=="function",g=u===e.length-1?a:void 0,v=l.text??l;let _=b.jsx(uZ,{position:u+1,"aria-current":g,children:v},v);h?_=b.jsx(lZ,{href:l.href,color:n,position:u+1,locale:r,"aria-current":g,children:v},v):m&&(_=b.jsx(cZ,{onClick:l.onClick,color:n,position:u+1,"aria-current":g,children:v},v));const S=b.jsx("li",{itemProp:"itemListElement",itemScope:!0,itemType:"https://schema.org/ListItem",children:_},v);return d?S:b.jsxs(E.Fragment,{children:[S,b.jsx(uf,{size:10})]},v)})})}),fZ={key:"save-dictionary-details",content:{deleteButton:{text:ge({en:"Delete dictionary","en-GB":"Delete dictionary",fr:"Supprimer le dictionnaire",es:"Eliminar diccionario",de:"Wörterbuch löschen",ja:"辞書を削除",ko:"사전 삭제",zh:"删除字典",it:"Elimina dizionario",pt:"Excluir dicionário",hi:"शब्दकोश हटाएं",ar:"حذف القاموس",ru:"Удалить словарь"}),label:ge({en:"Click to delete dictionary","en-GB":"Click to delete dictionary",fr:"Cliquez pour supprimer le dictionnaire",es:"Haga clic para eliminar el diccionario",de:"Klicken Sie, um das Wörterbuch zu löschen",ja:"辞書を削除するにはクリックしてください",ko:"사전을 삭제하려면 클릭하세요",zh:"单击以删除字典",it:"Fai clic per eliminare il dizionario",pt:"Clique para excluir o dicionário",hi:"शब्दकोश हटाने के लिए क्लिक करें",ar:"انقر لحذف القاموس",ru:"Нажмите, чтобы удалить словарь"})},resetButton:{text:ge({en:"Reset all changes","en-GB":"Reset all changes",fr:"Réinitialiser toutes les modifications",es:"Restablecer todas las modificaciones",de:"Alle Änderungen zurücksetzen",ja:"すべての変更をリセット",ko:"모든 변경 사항 초기화",zh:"重置所有更改",it:"Reimposta tutte le modifiche",pt:"Redefinir todas as alterações",hi:"सभी परिवर्तनों को रीसेट करें",ar:"إعادة تعيين جميع التغييرات",ru:"Сбросить все изменения"}),label:ge({en:"Click to reset all the changes","en-GB":"Click to reset all the changes",fr:"Cliquez pour réinitialiser toutes les modifications",es:"Haga clic para restablecer todas las modificaciones",de:"Klicken Sie, um alle Änderungen zurückzusetzen",ja:"すべての変更をリセットするにはクリックしてください",ko:"모든 변경 사항을 초기화하려면 클릭하세요",zh:"单击以重置所有更改",it:"Fai clic per ripristinare tutte le modifiche",pt:"Clique para redefinir todas as alterações",hi:"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें",ar:"انقر لإعادة تعيين جميع التغييرات",ru:"Нажмите, чтобы сбросить все изменения"})},saveButton:{text:ge({en:"Save changes","en-GB":"Save changes",fr:"Enregistrer les modifications",es:"Guardar cambios",de:"Änderungen speichern",ja:"変更を保存",ko:"변경 사항 저장",zh:"保存更改",it:"Salva le modifiche",pt:"Salvar alterações",hi:"परिवर्तनों को सहेजें",ar:"احفظ التغييرات",ru:"Сохранить изменения"}),label:ge({en:"Click to save changes","en-GB":"Click to save changes",fr:"Cliquez pour enregistrer les modifications",es:"Haga clic para guardar cambios",de:"Klicken Sie, um Änderungen zu speichern",ja:"変更を保存するにはクリックしてください",ko:"변경 사항을 저장하려면 클릭하세요",zh:"单击保存更改",it:"Fai clic per salvare le modifiche",pt:"Clique para salvar alterações",hi:"परिवर्तनों को सहेजने के लिए क्लिक करें",ar:"انقر لحفظ التغييرات",ru:"Нажмите, чтобы сохранить изменения"})},publishButton:{text:ge({en:"Publish dictionary","en-GB":"Publish dictionary",fr:"Publier dictionnaire",es:"Publicar diccionario",de:"Wörterbuch veröffentlichen",ja:"辞書を公開",ko:"사전을 게시합니다",zh:"发布字典",it:"Pubblica dizionario",pt:"Publicar dicionário",hi:"शब्दकोश प्रकाशित करें",ar:"نشر القاموس",ru:"Опубликовать словарь"}),label:ge({en:"Click to publish dictionary","en-GB":"Click to publish dictionary",fr:"Cliquez pour publier dictionnaire",es:"Haga clic para publicar diccionario",de:"Klicken Sie, um das Wörterbuch zu veröffentlichen",ja:"辞書を公開するにはクリックしてください",ko:"사전을 게시하려면 클릭하세요",zh:"单击以发布字典",it:"Fai clic per pubblicare il dizionario",pt:"Clique para publicar dicionário",hi:"शब्दकोश प्रकाशित करने के लिए क्लिक करें",ar:"انقر لنشر القاموس",ru:"Нажмите, чтобы опубликовать словарь"})},downloadButton:{text:ge({en:"Download","en-GB":"Download",fr:"Télécharger",es:"Descargar",de:"Herunterladen",ja:"ダウンロード",ko:"다운로드",zh:"下载",it:"Scarica",pt:"Baixar",hi:"डाउनलोड",ar:"تنزيل",ru:"Скачать"}),label:ge({en:"Click to download","en-GB":"Click to download",fr:"Cliquez pour télécharger",es:"Haga clic para descargar",de:"Klicken Sie, um herunterzuladen",ja:"ダウンロードするにはクリックしてください",ko:"다운로드를 클릭하세요",zh:"单击下载",it:"Fai clic per scaricare",pt:"Clique para baixar",hi:"डाउनलोड करने के लिए क्लिक करें",ar:"انقر لتنزيل",ru:"Нажмите, чтобы скачать"})},confirmation:{title:ge({en:"Confirmation","en-GB":"Confirmation",fr:"Confirmation",es:"Confirmation",de:"Confirmation",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmação",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтверждение"}),message:ge({en:"This will overwrite the existing dictionary. Are you sure you want to continue?","en-GB":"This will overwrite the existing dictionary. Are you sure you want to continue?",fr:"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?",es:"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?",de:"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?",ja:"既存の辞書を上書きします。続行しますか?",ko:"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?",zh:"这将覆盖现有的字典。你确定要继续吗?",it:"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?",pt:"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?",hi:"यह मौजूदा शब्दकोश को ओवरराइट करने जारी है। आप क्या आप जारी रखना चाहते हैं?",ar:"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟",ru:"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?"}),differentFormatMessage:ge({en:"The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.","en-GB":"The dictionary is in a different format, it will be transformed into a JSON file. Are you sure you want to continue? This will overwrite the existing dictionary.",fr:"Le dictionnaire est dans un format différent, il sera transformé en un fichier JSON. Êtes-vous sûr de vouloir continuer ? Cela remplacera le dictionnaire existant.",es:"El diccionario está en un formato diferente, se transformará en un archivo JSON. ¿Estás seguro de que quieres continuar? Esto sobrescribirá el diccionario existente.",de:"Das Wörterbuch ist in einem anderen Format, es wird in eine JSON-Datei umgewandelt. Sind Sie sicher, dass Sie fortfahren möchten? Dies wird das existierende Wörterbuch überschreiben.",ja:"辞書は異なる形式です。JSONファイルに変換されます。続行しますか?既存の辞書を上書きします。",ko:"사전은 다른 형식입니다. JSON 파일로 변환됩니다. 계속하시겠습니까? 이는 기존 사전을 덮어 쓸 것입니다.",zh:"字典是在不同格式中,它将转换为JSON文件。你确定要继续吗?这将覆盖现有的字典。",it:"Il dizionario è in un formato diverso, verrà trasformato in un file JSON. Sei sicuro di voler continuare? Questo sovrascriverà il dizionario esistente.",pt:"O dicionário está em um formato diferente, ele será transformado em um arquivo JSON. Você tem certeza de que deseja continuar? Isso sobrescreverá o dicionário existente."}),confirmButton:{text:ge({en:"Confirm","en-GB":"Confirm",fr:"Confirmer",es:"Confirmar",de:"Bestätigen",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmar",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтвердить"}),label:ge({en:"Click to confirm","en-GB":"Click to confirm",fr:"Cliquez pour confirmer",es:"Haga clic para confirmar",de:"Klicken Sie, um zu bestätigen",ja:"確認するにはクリックしてください",ko:"확인을 클릭하세요",zh:"单击确认",it:"Fai clic per confermare",pt:"Clique para confirmar",hi:"पुष्टि करने के लिए क्लिक करें",ar:"انقر لتأكيد",ru:"Нажмите, чтобы подтвердить"})},cancelButton:{text:ge({en:"Cancel","en-GB":"Cancel",fr:"Annuler",es:"Cancelar",de:"Abbrechen",ja:"キャンセル",ko:"취소",zh:"取消",it:"Annulla",pt:"Cancelar",hi:"रद्द करें",ar:"إلغاء",ru:"Отмена"}),label:ge({en:"Click to cancel","en-GB":"Click to cancel",fr:"Cliquez pour annuler",es:"Haga clic para cancelar",de:"Klicken Sie, um abzubrechen",ja:"キャンセルするにはクリックしてください",ko:"취소를 클릭하세요",zh:"单击取消",it:"Fai clic per annullare",pt:"Clique para cancelar",hi:"रद्द करने के लिए क्लिक करें",ar:"انقر لإلغاء",ru:"Нажмите, чтобы отменить"})}}}},dk=({dictionary:e,mode:t,className:n,onDelete:r,...a})=>{var ee;const[s,l]=E.useState(!1),{setLocaleDictionary:u}=Gf(),{deleteDictionary:d,isLoading:h}=EU(),{writeDictionary:m,isLoading:y}=RU(),{pushDictionaries:g,isLoading:v}=xU(),_=y||v,S=t.includes("local")&&((ee=e.filePath)==null?void 0:ee.endsWith(".json")),{editedContent:A,restoreEditedContent:w}=Sn(),{deleteButton:T,resetButton:C,saveButton:k,publishButton:N,downloadButton:L,confirmation:D}=Qt(fZ),{isAuthenticated:j}=Vc(),V=A==null?void 0:A[e.key],U=V&&JSON.stringify(V)!==JSON.stringify(e),ue=typeof(e==null?void 0:e._id)<"u",ie=async()=>{if(!(A!=null&&A[e.key]))return;const H={...e,...A==null?void 0:A[e.key]};await m(H).then(()=>{u(A==null?void 0:A[e.key]),w(e.key)})},fe=async()=>{if(!(A!=null&&A[e.key]))return;const H={...e,...A==null?void 0:A[e.key]};await g([H]).then(ne=>{ne&&(u(A==null?void 0:A[e.key]),w(e.key))})},Y=async()=>{e._id&&await d(e._id.toString()).then(H=>{H&&(r==null||r())})};return b.jsxs(b.Fragment,{children:[b.jsx(ck,{isOpen:s,title:D.title.value,size:"md",children:b.jsxs("form",{className:"size-full px-3",children:[S?b.jsx("p",{className:"text-neutral py-4 text-sm",children:D.message}):b.jsx("p",{className:"text-neutral py-4 text-sm",children:D.differentFormatMessage}),b.jsxs("div",{className:"mt-12 flex justify-end gap-2 max-md:flex-col",children:[b.jsx(Ze.Button,{label:D.cancelButton.label.value,disabled:!U||_,color:"text",className:"max-md:w-full",variant:"outline",onClick:()=>l(!1),children:D.cancelButton.text}),b.jsx(Ze.Button,{label:D.confirmButton.label.value,disabled:!U||_,Icon:cS,color:"text",className:"max-md:w-full",isLoading:v,onClick:ie,children:D.confirmButton.text})]})]})}),b.jsxs("form",{className:Ae("flex justify-end gap-2 max-md:flex-col",n),...a,children:[t.includes("remote")&&ue&&r&&j&&b.jsx(Ze.Button,{label:T.label.value,Icon:Yf,color:"error",variant:"outline",className:"max-md:w-full",isLoading:h,onClick:Y,children:T.text}),U&&b.jsx(Ze.Button,{label:C.label.value,disabled:!U,Icon:Wz,variant:"outline",color:"text",className:"max-md:w-full",onClick:()=>w(e.key),children:C.text}),t.includes("local")&&b.jsx(Ze.Button,{label:L.label.value,disabled:!U||_,Icon:jz,color:"text",variant:j?"outline":"default",className:"max-md:w-full",isLoading:y,onClick:()=>l(!0),children:L.text}),t.includes("remote")&&j&&!ue&&b.jsx(Ze.Button,{label:N.label.value,disabled:_,Icon:_z,color:"text",className:"max-md:w-full",isLoading:v,onClick:fe,children:N.text}),t.includes("remote")&&j&&ue&&U&&b.jsx(Ze.Button,{label:k.label.value,disabled:!U||_,Icon:cS,color:"text",className:"max-md:w-full",isLoading:v,onClick:fe,children:k.text})]})]})},fk=({level:e,title:t,description:n,children:r,rightParam:a,isSelected:s,...l})=>b.jsx("div",{className:Ae("rounded-md p-2 transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",e===2&&"hover:bg-card/30",e>=3&&"",s===!0&&"bg-card/40"),...l,children:b.jsx(z1,{isOpen:s,label:t,header:b.jsxs("div",{className:"flex w-full",children:[b.jsxs("div",{className:"flex w-full items-center justify-between",children:[b.jsx("span",{className:Ae(e===0&&"text-2xl",e===1&&"text-xl",e===2&&"text-lg",e>=3&&"text-base"),children:t}),a&&b.jsx("div",{className:"flex w-auto items-center justify-between p-3",children:a})]}),n&&b.jsx("p",{className:"text-card pl-3 text-sm",children:n})]}),children:r})}),hk=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:a,onFocusKeyPath:s,renderSection:l})=>{const u=r??Pr(n,e);if(u&&typeof u!="string")return b.jsx(b.Fragment,{children:"Error loading section - Edited content Incoherence with the original content format"});const d=e.length,h=String(u??t);return b.jsx("span",{role:"button",tabIndex:0,className:Ae("w-full rounded-md p-2 text-left transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",d===2&&"hover:bg-card/30",d>=3&&""),onClick:m=>{m.stopPropagation(),s(e)},children:typeof l=="function"?l(h):b.jsx(OR,{"aria-label":"Editable field",defaultValue:h,onSave:m=>a({keyPath:e,newValue:m}),onCancel:()=>null})})},hZ=e=>{const{keyPath:t,section:n}=e,{addEditedContent:r}=Sn(),a=Pr(e.editedContent,t),s=n[Z.File],{content:l}=n,u=[...t,{type:Z.File}];return b.jsxs("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:[b.jsxs("span",{className:"text-neutral text-sm",children:[s," "]}),b.jsx(hk,{...e,keyPath:u,section:l,editedContentValue:a==null?void 0:a.content,onContentChange:d=>{console.log("lll",{subSection:s,file:{...n,content:d.newValue},keyPath:t,newKeyPath:u}),r(e.dictionary.key,{...n,content:d.newValue},t)}})]})},mZ=e=>{const{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:a=[]}=e;return n.map((s,l)=>{const u={key:l,type:Z.Array},d=[...t,u];return b.jsx(fk,{level:t.length,title:`${l}`,description:"",isSelected:Lc(d,a),onClick:h=>{h.stopPropagation(),r(d)},children:b.jsx(ga,{...e,keyPath:d,section:s})},JSON.stringify(s))})},pZ=e=>{const{keyPath:t,section:n}=e;return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!Ub.includes(r)).map(r=>{const a={type:Z.Condition,key:r},s=[...t,a],l=n[Z.Condition][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(ga,{...e,key:r,keyPath:s,section:l})]})})})},gZ=e=>{const{keyPath:t,section:n}=e;return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!Ub.includes(r)).map(r=>{const a={type:Z.Enumeration,key:r},s=[...t,a],l=n[Z.Enumeration][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(ga,{...e,key:r,keyPath:s,section:l})]})})})},yZ=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:Z.Insertion}],a=n[Z.Insertion];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(ga,{...e,keyPath:r,section:a})})},vZ=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:Z.Markdown}],a=n[Z.Markdown];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(ga,{...e,keyPath:r,section:a})})},bZ=e=>{const{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:a}=e;return Object.keys(n).filter(s=>!Ub.includes(s)).map(s=>{const l={key:s,type:Z.Object},u=[...t,l];return b.jsx(fk,{level:t.length,title:s,description:"",isSelected:Lc(u,r),onClick:d=>{d.stopPropagation(),a(u)},children:b.jsx(ga,{...e,keyPath:u,section:n[s]})},s)})},_Z=e=>{const{keyPath:t,section:n,locale:r}=e,a={type:Z.Translation,key:r},s=[...t,a],l=n.translation[r];return b.jsx(ga,{...e,keyPath:s,section:l})},Ub=["filePath","id","nodeType"],ga=e=>{const n=Pr(e.editedContent,e.keyPath)??e.section,r=As(n);if(typeof n=="object")return r===Z.ReactNode?b.jsx("span",{className:"text-neutral text-xs",children:"React node not editable"}):r===Z.Nested?b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:"[Nested] Dictionary"}):r===Z.Markdown?b.jsx(vZ,{...e,section:n}):r===Z.Translation?b.jsx(_Z,{...e,section:n}):r===Z.Enumeration?b.jsx(gZ,{...e,section:n}):r===Z.Condition?b.jsx(pZ,{...e,section:n}):r===Z.Insertion?b.jsx(yZ,{...e,section:n}):r===Z.Array?b.jsx(mZ,{...e,section:n}):r===Z.File?b.jsx(hZ,{...e,section:n}):b.jsx(bZ,{...e,section:n});if(typeof n=="string")return b.jsx(hk,{...e,section:n})},xZ=({dictionary:e,mode:t,onDelete:n,...r})=>{var m;const{editedContent:a,addEditedContent:s}=Sn(),{focusedContent:l,setFocusedContentKeyPath:u,setFocusedContent:d}=la(),h=l==null?void 0:l.keyPath;return b.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2",children:[b.jsx("div",{children:E.createElement(ga,{...r,keyPath:[],dictionary:e,key:JSON.stringify(((a==null?void 0:a[e.key])??e).content),editedContent:(m=a==null?void 0:a[e.key])==null?void 0:m.content,focusedKeyPath:h,section:e.content,onContentChange:y=>{s(e.key,y.newValue,y.keyPath)},onFocusKeyPath:u})}),b.jsx(dk,{dictionary:e,mode:t,className:"mb-4 flex-col",onDelete:()=>{d(null),n==null||n()}})]})};function wi(e){return Array.isArray?Array.isArray(e):gk(e)==="[object Array]"}function EZ(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function SZ(e){return e==null?"":EZ(e)}function Mr(e){return typeof e=="string"}function mk(e){return typeof e=="number"}function AZ(e){return e===!0||e===!1||wZ(e)&&gk(e)=="[object Boolean]"}function pk(e){return typeof e=="object"}function wZ(e){return pk(e)&&e!==null}function Un(e){return e!=null}function Og(e){return!e.trim().length}function gk(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const TZ="Incorrect 'index' type",RZ=e=>`Invalid value for key ${e}`,CZ=e=>`Pattern length exceeds max of ${e}.`,NZ=e=>`Missing ${e} property in key`,OZ=e=>`Property 'weight' in key '${e}' must be a positive integer`,Uw=Object.prototype.hasOwnProperty;class kZ{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let a=yk(r);this._keys.push(a),this._keyMap[a.id]=a,n+=a.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function yk(e){let t=null,n=null,r=null,a=1,s=null;if(Mr(e)||wi(e))r=e,t=$w(e),n=$y(e);else{if(!Uw.call(e,"name"))throw new Error(NZ("name"));const l=e.name;if(r=l,Uw.call(e,"weight")&&(a=e.weight,a<=0))throw new Error(OZ(l));t=$w(l),n=$y(l),s=e.getFn}return{path:t,id:n,weight:a,src:r,getFn:s}}function $w(e){return wi(e)?e:e.split(".")}function $y(e){return wi(e)?e.join("."):e}function DZ(e,t){let n=[],r=!1;const a=(s,l,u)=>{if(Un(s))if(!l[u])n.push(s);else{let d=l[u];const h=s[d];if(!Un(h))return;if(u===l.length-1&&(Mr(h)||mk(h)||AZ(h)))n.push(SZ(h));else if(wi(h)){r=!0;for(let m=0,y=h.length;m<y;m+=1)a(h[m],l,u+1)}else l.length&&a(h,l,u+1)}};return a(e,Mr(t)?t.split("."):t,0),r?n:n[0]}const IZ={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},LZ={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},jZ={location:0,threshold:.6,distance:100},MZ={useExtendedSearch:!1,getFn:DZ,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Ve={...LZ,...IZ,...jZ,...MZ};const PZ=/[^ ]+/g;function zZ(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(a){const s=a.match(PZ).length;if(n.has(s))return n.get(s);const l=1/Math.pow(s,.5*e),u=parseFloat(Math.round(l*r)/r);return n.set(s,u),u},clear(){n.clear()}}}class $b{constructor({getFn:t=Ve.getFn,fieldNormWeight:n=Ve.fieldNormWeight}={}){this.norm=zZ(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Mr(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();Mr(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Un(t)||Og(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((a,s)=>{let l=a.getFn?a.getFn(t):this.getFn(t,a.path);if(Un(l)){if(wi(l)){let u=[];const d=[{nestedArrIndex:-1,value:l}];for(;d.length;){const{nestedArrIndex:h,value:m}=d.pop();if(Un(m))if(Mr(m)&&!Og(m)){let y={v:m,i:h,n:this.norm.get(m)};u.push(y)}else wi(m)&&m.forEach((y,g)=>{d.push({nestedArrIndex:g,value:y})})}r.$[s]=u}else if(Mr(l)&&!Og(l)){let u={v:l,n:this.norm.get(l)};r.$[s]=u}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function vk(e,t,{getFn:n=Ve.getFn,fieldNormWeight:r=Ve.fieldNormWeight}={}){const a=new $b({getFn:n,fieldNormWeight:r});return a.setKeys(e.map(yk)),a.setSources(t),a.create(),a}function VZ(e,{getFn:t=Ve.getFn,fieldNormWeight:n=Ve.fieldNormWeight}={}){const{keys:r,records:a}=e,s=new $b({getFn:t,fieldNormWeight:n});return s.setKeys(r),s.setIndexRecords(a),s}function Id(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:a=Ve.distance,ignoreLocation:s=Ve.ignoreLocation}={}){const l=t/e.length;if(s)return l;const u=Math.abs(r-n);return a?l+u/a:u?1:l}function BZ(e=[],t=Ve.minMatchCharLength){let n=[],r=-1,a=-1,s=0;for(let l=e.length;s<l;s+=1){let u=e[s];u&&r===-1?r=s:!u&&r!==-1&&(a=s-1,a-r+1>=t&&n.push([r,a]),r=-1)}return e[s-1]&&s-r>=t&&n.push([r,s-1]),n}const Ga=32;function UZ(e,t,n,{location:r=Ve.location,distance:a=Ve.distance,threshold:s=Ve.threshold,findAllMatches:l=Ve.findAllMatches,minMatchCharLength:u=Ve.minMatchCharLength,includeMatches:d=Ve.includeMatches,ignoreLocation:h=Ve.ignoreLocation}={}){if(t.length>Ga)throw new Error(CZ(Ga));const m=t.length,y=e.length,g=Math.max(0,Math.min(r,y));let v=s,_=g;const S=u>1||d,A=S?Array(y):[];let w;for(;(w=e.indexOf(t,_))>-1;){let D=Id(t,{currentLocation:w,expectedLocation:g,distance:a,ignoreLocation:h});if(v=Math.min(D,v),_=w+m,S){let j=0;for(;j<m;)A[w+j]=1,j+=1}}_=-1;let T=[],C=1,k=m+y;const N=1<<m-1;for(let D=0;D<m;D+=1){let j=0,V=k;for(;j<V;)Id(t,{errors:D,currentLocation:g+V,expectedLocation:g,distance:a,ignoreLocation:h})<=v?j=V:k=V,V=Math.floor((k-j)/2+j);k=V;let U=Math.max(1,g-V+1),ue=l?y:Math.min(g+V,y)+m,ie=Array(ue+2);ie[ue+1]=(1<<D)-1;for(let Y=ue;Y>=U;Y-=1){let ee=Y-1,H=n[e.charAt(ee)];if(S&&(A[ee]=+!!H),ie[Y]=(ie[Y+1]<<1|1)&H,D&&(ie[Y]|=(T[Y+1]|T[Y])<<1|1|T[Y+1]),ie[Y]&N&&(C=Id(t,{errors:D,currentLocation:ee,expectedLocation:g,distance:a,ignoreLocation:h}),C<=v)){if(v=C,_=ee,_<=g)break;U=Math.max(1,2*g-_)}}if(Id(t,{errors:D+1,currentLocation:g,expectedLocation:g,distance:a,ignoreLocation:h})>v)break;T=ie}const L={isMatch:_>=0,score:Math.max(.001,C)};if(S){const D=BZ(A,u);D.length?d&&(L.indices=D):L.isMatch=!1}return L}function $Z(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const a=e.charAt(n);t[a]=(t[a]||0)|1<<r-n-1}return t}const Nf=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class bk{constructor(t,{location:n=Ve.location,threshold:r=Ve.threshold,distance:a=Ve.distance,includeMatches:s=Ve.includeMatches,findAllMatches:l=Ve.findAllMatches,minMatchCharLength:u=Ve.minMatchCharLength,isCaseSensitive:d=Ve.isCaseSensitive,ignoreDiacritics:h=Ve.ignoreDiacritics,ignoreLocation:m=Ve.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:a,includeMatches:s,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:m},t=d?t:t.toLowerCase(),t=h?Nf(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const y=(v,_)=>{this.chunks.push({pattern:v,alphabet:$Z(v),startIndex:_})},g=this.pattern.length;if(g>Ga){let v=0;const _=g%Ga,S=g-_;for(;v<S;)y(this.pattern.substr(v,Ga),v),v+=Ga;if(_){const A=g-Ga;y(this.pattern.substr(A),A)}}else y(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a}=this.options;if(t=n?t:t.toLowerCase(),t=r?Nf(t):t,this.pattern===t){let S={isMatch:!0,score:0};return a&&(S.indices=[[0,t.length-1]]),S}const{location:s,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:h,ignoreLocation:m}=this.options;let y=[],g=0,v=!1;this.chunks.forEach(({pattern:S,alphabet:A,startIndex:w})=>{const{isMatch:T,score:C,indices:k}=UZ(t,S,A,{location:s+w,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:h,includeMatches:a,ignoreLocation:m});T&&(v=!0),g+=C,T&&k&&(y=[...y,...k])});let _={isMatch:v,score:v?g/this.chunks.length:1};return v&&a&&(_.indices=y),_}}class ya{constructor(t){this.pattern=t}static isMultiMatch(t){return Hw(t,this.multiRegex)}static isSingleMatch(t){return Hw(t,this.singleRegex)}search(){}}function Hw(e,t){const n=e.match(t);return n?n[1]:null}class HZ extends ya{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class FZ extends ya{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class GZ extends ya{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class KZ extends ya{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class ZZ extends ya{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class qZ extends ya{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class _k extends ya{constructor(t,{location:n=Ve.location,threshold:r=Ve.threshold,distance:a=Ve.distance,includeMatches:s=Ve.includeMatches,findAllMatches:l=Ve.findAllMatches,minMatchCharLength:u=Ve.minMatchCharLength,isCaseSensitive:d=Ve.isCaseSensitive,ignoreDiacritics:h=Ve.ignoreDiacritics,ignoreLocation:m=Ve.ignoreLocation}={}){super(t),this._bitapSearch=new bk(t,{location:n,threshold:r,distance:a,includeMatches:s,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:m})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class xk extends ya{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const a=[],s=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+s,a.push([r,n-1]);const l=!!a.length;return{isMatch:l,score:l?0:1,indices:a}}}const Hy=[HZ,xk,GZ,KZ,qZ,ZZ,FZ,_k],Fw=Hy.length,WZ=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,YZ="|";function XZ(e,t={}){return e.split(YZ).map(n=>{let r=n.trim().split(WZ).filter(s=>s&&!!s.trim()),a=[];for(let s=0,l=r.length;s<l;s+=1){const u=r[s];let d=!1,h=-1;for(;!d&&++h<Fw;){const m=Hy[h];let y=m.isMultiMatch(u);y&&(a.push(new m(y,t)),d=!0)}if(!d)for(h=-1;++h<Fw;){const m=Hy[h];let y=m.isSingleMatch(u);if(y){a.push(new m(y,t));break}}}return a})}const QZ=new Set([_k.type,xk.type]);class JZ{constructor(t,{isCaseSensitive:n=Ve.isCaseSensitive,ignoreDiacritics:r=Ve.ignoreDiacritics,includeMatches:a=Ve.includeMatches,minMatchCharLength:s=Ve.minMatchCharLength,ignoreLocation:l=Ve.ignoreLocation,findAllMatches:u=Ve.findAllMatches,location:d=Ve.location,threshold:h=Ve.threshold,distance:m=Ve.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a,minMatchCharLength:s,findAllMatches:u,ignoreLocation:l,location:d,threshold:h,distance:m},t=n?t:t.toLowerCase(),t=r?Nf(t):t,this.pattern=t,this.query=XZ(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:a,ignoreDiacritics:s}=this.options;t=a?t:t.toLowerCase(),t=s?Nf(t):t;let l=0,u=[],d=0;for(let h=0,m=n.length;h<m;h+=1){const y=n[h];u.length=0,l=0;for(let g=0,v=y.length;g<v;g+=1){const _=y[g],{isMatch:S,indices:A,score:w}=_.search(t);if(S){if(l+=1,d+=w,r){const T=_.constructor.type;QZ.has(T)?u=[...u,...A]:u.push(A)}}else{d=0,l=0,u.length=0;break}}if(l){let g={isMatch:!0,score:d/l};return r&&(g.indices=u),g}}return{isMatch:!1,score:1}}}const Fy=[];function eq(...e){Fy.push(...e)}function Gy(e,t){for(let n=0,r=Fy.length;n<r;n+=1){let a=Fy[n];if(a.condition(e,t))return new a(e,t)}return new bk(e,t)}const Of={AND:"$and",OR:"$or"},Ky={PATH:"$path",PATTERN:"$val"},Zy=e=>!!(e[Of.AND]||e[Of.OR]),tq=e=>!!e[Ky.PATH],nq=e=>!wi(e)&&pk(e)&&!Zy(e),Gw=e=>({[Of.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Ek(e,t,{auto:n=!0}={}){const r=a=>{let s=Object.keys(a);const l=tq(a);if(!l&&s.length>1&&!Zy(a))return r(Gw(a));if(nq(a)){const d=l?a[Ky.PATH]:s[0],h=l?a[Ky.PATTERN]:a[d];if(!Mr(h))throw new Error(RZ(d));const m={keyId:$y(d),pattern:h};return n&&(m.searcher=Gy(h,t)),m}let u={children:[],operator:s[0]};return s.forEach(d=>{const h=a[d];wi(h)&&h.forEach(m=>{u.children.push(r(m))})}),u};return Zy(e)||(e=Gw(e)),r(e)}function rq(e,{ignoreFieldNorm:t=Ve.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:a,norm:s,score:l})=>{const u=a?a.weight:null;r*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(t?1:s))}),n.score=r})}function iq(e,t){const n=e.matches;t.matches=[],Un(n)&&n.forEach(r=>{if(!Un(r.indices)||!r.indices.length)return;const{indices:a,value:s}=r;let l={indices:a,value:s};r.key&&(l.key=r.key.src),r.idx>-1&&(l.refIndex=r.idx),t.matches.push(l)})}function aq(e,t){t.score=e.score}function oq(e,t,{includeMatches:n=Ve.includeMatches,includeScore:r=Ve.includeScore}={}){const a=[];return n&&a.push(iq),r&&a.push(aq),e.map(s=>{const{idx:l}=s,u={item:t[l],refIndex:l};return a.length&&a.forEach(d=>{d(s,u)}),u})}class zs{constructor(t,n={},r){this.options={...Ve,...n},this.options.useExtendedSearch,this._keyStore=new kZ(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof $b))throw new Error(TZ);this._myIndex=n||vk(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Un(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,a=this._docs.length;r<a;r+=1){const s=this._docs[r];t(s,r)&&(this.removeAt(r),r-=1,a-=1,n.push(s))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:r,includeScore:a,shouldSort:s,sortFn:l,ignoreFieldNorm:u}=this.options;let d=Mr(t)?Mr(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return rq(d,{ignoreFieldNorm:u}),s&&d.sort(l),mk(n)&&n>-1&&(d=d.slice(0,n)),oq(d,this._docs,{includeMatches:r,includeScore:a})}_searchStringList(t){const n=Gy(t,this.options),{records:r}=this._myIndex,a=[];return r.forEach(({v:s,i:l,n:u})=>{if(!Un(s))return;const{isMatch:d,score:h,indices:m}=n.searchIn(s);d&&a.push({item:s,idx:l,matches:[{score:h,value:s,norm:u,indices:m}]})}),a}_searchLogical(t){const n=Ek(t,this.options),r=(u,d,h)=>{if(!u.children){const{keyId:y,searcher:g}=u,v=this._findMatches({key:this._keyStore.get(y),value:this._myIndex.getValueForItemAtKeyId(d,y),searcher:g});return v&&v.length?[{idx:h,item:d,matches:v}]:[]}const m=[];for(let y=0,g=u.children.length;y<g;y+=1){const v=u.children[y],_=r(v,d,h);if(_.length)m.push(..._);else if(u.operator===Of.AND)return[]}return m},a=this._myIndex.records,s={},l=[];return a.forEach(({$:u,i:d})=>{if(Un(u)){let h=r(n,u,d);h.length&&(s[d]||(s[d]={idx:d,item:u,matches:[]},l.push(s[d])),h.forEach(({matches:m})=>{s[d].matches.push(...m)}))}}),l}_searchObjectList(t){const n=Gy(t,this.options),{keys:r,records:a}=this._myIndex,s=[];return a.forEach(({$:l,i:u})=>{if(!Un(l))return;let d=[];r.forEach((h,m)=>{d.push(...this._findMatches({key:h,value:l[m],searcher:n}))}),d.length&&s.push({idx:u,item:l,matches:d})}),s}_findMatches({key:t,value:n,searcher:r}){if(!Un(n))return[];let a=[];if(wi(n))n.forEach(({v:s,i:l,n:u})=>{if(!Un(s))return;const{isMatch:d,score:h,indices:m}=r.searchIn(s);d&&a.push({score:h,key:t,value:s,idx:l,norm:u,indices:m})});else{const{v:s,n:l}=n,{isMatch:u,score:d,indices:h}=r.searchIn(s);u&&a.push({score:d,key:t,value:s,norm:l,indices:h})}return a}}zs.version="7.1.0";zs.createIndex=vk;zs.parseIndex=VZ;zs.config=Ve;zs.parseQuery=Ek;eq(JZ);const sq=e=>{switch(e){case"sm":return 640;case"md":return 768;case"lg":return 1024;case"xl":return 1280;case"2xl":return 1536;default:return e}},lq=()=>{var t;if(typeof window>"u")return;const e=(t=window.navigator)==null?void 0:t.userAgent;if(!(typeof e>"u"))return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},cq=()=>{var r;if(typeof window>"u")return;const e=(r=window.navigator)==null?void 0:r.userAgent,t=/Safari\/\d/i.test(e)&&!/Chrome|CriOS|FxiOS|Edg|OPR/i.test(e),n=/Macintosh|iP(?:hone|ad|od)/.test(e);return t&&n},uq=e=>{if(!(typeof window>"u"))return((window==null?void 0:window.innerWidth)??0)<=e},Kw=(e="md")=>{const t=sq(e),n=lq(),r=uq(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n}},dq=(e="md")=>{const[t,n]=E.useState(Kw(e));return E.useEffect(()=>{const r=()=>{n(Kw(e))};return window.addEventListener("resize",r,{passive:!0}),()=>window.removeEventListener("resize",r)},[e]),t},uc=({children:e,className:t,identifier:n,...r})=>b.jsx("div",{className:Ae("group/dropdown relative flex",t),"aria-label":`DropDown ${n}`,id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),fq=({children:e,identifier:t,className:n,...r})=>b.jsx("button",{className:Ae("w-full cursor-pointer",n),"aria-label":`Open panel ${t}`,onClick:a=>{cq()&&a.currentTarget.focus({preventScroll:!0})},onBlur:a=>a.currentTarget.blur(),...r,children:e}),hq=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:a="start",identifier:s,className:l,...u})=>b.jsx("div",{className:Ae("absolute top-[calc(100%+0.5rem)] z-[1000] min-w-full",a==="start"&&"left-0",a==="end"&&"right-0",l),"aria-hidden":t,role:"region","aria-labelledby":`unrollable-panel-button-${s}`,id:`unrollable-panel-${s}`,children:b.jsx(P1,{isHidden:t,className:Ae("overflow-x-visible",t!==!1?"invisible":"visible",n&&"group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]",r&&"group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]"),...u,children:e})});uc.Trigger=fq;uc.Panel=hq;const mq={key:"locale-switcher-content",content:{localeSwitcherLabel:ge({en:"Language switcher","en-GB":"Language switcher",fr:"Changer de langue",es:"Cambiar idioma",de:"Sprachwechsler",ja:"言語スイッチャー",ko:"언어 스위치",zh:"语言切换器",it:"Cambia lingua",pt:"Mudar idioma",hi:"भाषा स्विचर",ar:"مبدل اللغة",ru:"Переключатель языка"}),languageListLabel:ge({en:"Language list","en-GB":"Language list",fr:"Liste des langues",es:"Lista de idiomas",de:"Sprachliste",ja:"言語リスト",ko:"언어 목록",zh:"语言列表",it:"Elenco lingue",pt:"Lista de idiomas",hi:"भाषा सूची",ar:"قائمة اللغات",ru:"Список языков"}),switchTo:ge({en:"Switch to",fr:"Passer à",es:"Cambiar a","en-GB":"Switch to",de:"Wechseln Sie zu",ja:"に切り替える",ko:"전환",zh:"切换到",it:"Passa a",pt:"Mudar para",hi:"स्विच करें",ar:"التبديل إلى",ru:"Переключиться на"}),searchInput:{text:ge({en:"Search Locale","en-GB":"Search Locale",fr:"Rechercher la locale",es:"Buscar idioma",de:"Sprache durchsuchen",ja:"ロケールを検索",ko:"언어 검색",zh:"搜索语言",it:"Cerca lingua",pt:"Pesquisar idioma",hi:"भाषा खोजें",ar:"بحث اللغة",ru:"Поиск языка"}),placeholder:ge({en:"Search a locale","en-GB":"Search a locale",fr:"Rechercher une locale",es:"Buscar un idioma",de:"Sprache suchen",ja:"ロケールを検索",ko:"언어 검색",zh:"搜索语言",it:"Cerca una lingua",pt:"Pesquisar um idioma",hi:"भाषा खोजें",ar:"بحث اللغة",ru:"Поиск языка"}),ariaLabel:ge({en:"Language search","en-GB":"Language search",fr:"Recherche de langue",es:"Búsqueda de idioma",de:"Sprachsuche",ja:"言語検索",ko:"언어 검색",zh:"语言搜索",it:"Ricerca lingua",pt:"Pesquisa de idioma",hi:"भाषा खोजें",ar:"بحث اللغة",ru:"Поиск языка"})},seeAllLocalesSwitch:{true:ge({en:"See all locales","en-GB":"See all locales",fr:"Voir toutes les langues",es:"Ver todos los idiomas",de:"Alle Sprachen anzeigen",ja:"すべての言語を表示",ko:"모든 언어 보기",zh:"查看所有语言",it:"Vedi tutte le lingue",pt:"Ver todos os idiomas",hi:"सभी भाषाओं को देखें",ar:"عرض جميع اللغات",ru:"Показать все языки"}),false:ge({en:"See only selected locales","en-GB":"See only selected locales",fr:"Voir seulement les langues sélectionnées",es:"Ver solo los idiomas seleccionados",de:"Nur ausgewählte Sprachen anzeigen",ja:"選択された言語のみを表示",ko:"선택한 언어만 보기",zh:"仅查看选定的语言",it:"Vedi solo le lingue selezionate",pt:"Ver apenas os idiomas selecionados",hi:"केवल चुने गए भाषाओं को देखें",ar:"عرض اللغات المحددة فقط",ru:"Показать только выбранные языки"})}}},dc=(e,t)=>{const[n,r]=E.useState(()=>{if(t!==void 0){const l=typeof t=="function"?t():t;if(typeof window>"u")return l;const u=localStorage==null?void 0:localStorage.getItem(e);if(u)try{return JSON.parse(u)}catch(d){console.error(d)}return l}});E.useEffect(()=>{const l=localStorage==null?void 0:localStorage.getItem(e);if(l&&n===void 0)try{r(JSON.parse(l))}catch(u){console.error(u)}else t!==void 0&&n===void 0&&r(t)},[e,n]);const a=E.useCallback(l=>{r(u=>{const d=typeof l=="function"?l(u):l;return localStorage==null||localStorage.setItem(e,JSON.stringify(d)),d})},[e,r]),s=E.useCallback(()=>{const l=localStorage==null?void 0:localStorage.getItem(e);l&&r(JSON.parse(l))},[e,r]);return E.useMemo(()=>[n,a,s],[n,a,s])},Sk=E.createContext({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),Ak=()=>E.useContext(Sk),pq=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{const{locale:r}=mv(),[a,s]=dc("locale-content-selector-selected-locales",t??[r]);return b.jsx(Sk,{value:{availableLocales:e,selectedLocales:a,setSelectedLocales:s},children:n})},kg="locale-switcher-content",gq=({panelProps:e,isMultilingual:t=!0})=>{const{switchTo:n,searchInput:r,localeSwitcherLabel:a,languageListLabel:s,seeAllLocalesSwitch:l}=Qt(mq),u=E.useRef(null),{locale:d}=mv(),{availableLocales:h,selectedLocales:m,setSelectedLocales:y}=Ak(),g=E.useMemo(()=>h.map(N=>{const L=Hd(N,z.ENGLISH),D=Hd(N,d),j=Hd(N);return{locale:N,englishName:L,currentLocaleName:D,ownLocaleName:j}}),[h,d]),[v,_]=E.useState(g),[S,A]=dc("locale-content-selector-see-all-locales",!1),w=E.useMemo(()=>{const N={keys:[{name:"ownLocaleName",weight:.4},{name:"englishName",weight:.2},{name:"currentLocaleName",weight:.2},{name:"locale",weight:.2}],threshold:.02};return new zs(g,N)},[g]),T=E.useCallback(N=>{if(N){const L=w.search(N).map(D=>D.item);_(L)}else _(g)},[w,g]),C=N=>{t?m.includes(N)?m.length>1&&y(L=>L.filter(D=>D!==N)):y(L=>[...L,N]):y([N])},k=N=>{A(N),y(N?h:[d])};return b.jsx("div",{className:"border-text text-text rounded-xl border transition-colors","aria-label":a.value,children:b.jsxs(uc,{identifier:kg,children:[b.jsx(uc.Trigger,{identifier:kg,children:b.jsxs("div",{className:"flex w-full items-center justify-between",children:[b.jsx("div",{className:"px-2 py-1",children:b.jsx(Hz,{size:18})}),b.jsx(Gz,{className:"self-center",size:18})]})}),b.jsx(uc.Panel,{identifier:kg,isOverable:!0,isFocusable:!0,className:"left-auto right-0",...e,children:b.jsxs(qr,{className:"max-h-[80vh] min-w-28",separator:"y",role:"listbox",transparency:"sm",border:!0,roundedSize:"2xl",borderColor:"text","aria-label":s.value,children:[t&&b.jsx("div",{className:"m-auto p-2",children:b.jsx(Zc,{defaultValue:!1,onChange:k,color:"text",size:"sm",className:"!w-60",choices:[{content:l.true.value,value:!0},{content:l.false.value,value:!1}]})}),!(t&&S)&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"p-3",children:b.jsx(ks,{type:"search","aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:N=>T(N.target.value),ref:u})}),b.jsx("ol",{className:"divide-text/20 divide-y divide-dashed overflow-y-auto p-1",children:v.map(({locale:N,currentLocaleName:L,ownLocaleName:D})=>b.jsx("li",{className:"px-1.5 py-1",children:b.jsx(ut,{onClick:()=>C(N),label:`${n} ${L}`,disabled:!(h??h).includes(N),isActive:m.includes(N),variant:"hoverable",color:"text",isFullWidth:!0,textAlign:"left",size:"sm",children:b.jsxs("div",{className:"flex flex-row items-center justify-between gap-3 px-2 py-1",children:[t&&b.jsx("div",{className:"w-4",children:m.includes(N)&&b.jsx(Cs,{className:"size-full"})}),b.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1",children:[b.jsxs("div",{className:"flex flex-col text-nowrap",children:[b.jsx("span",{dir:Zj(N),lang:N,children:D}),b.jsx("span",{className:"text-neutral text-xs",children:L})]}),b.jsx("span",{className:"text-neutral text-sm",children:N.toUpperCase()})]})]})})},N))})]})]})})]})})},yq=(e,t,n)=>{const r={...e};for(const a of Object.keys(e))a===t?(r[n]=e[t],delete r[t]):r[a]=e[a];return r},qy=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...s})=>{const[l,u]=E.useState(e),[d,h]=E.useState(0),m=l!==e,y=()=>{u(e),h(S=>S+1)},g=()=>{t(l)},v=S=>{u(S.currentTarget.value)};E.useEffect(()=>{u(e)},[e]);const _=(r==null?void 0:r(l))??!0;return b.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[b.jsx(ks,{onChange:v,"aria-label":"value",variant:"invisible",className:"size-full",defaultValue:e,...s},d),(m||a)&&b.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[m&&b.jsxs(b.Fragment,{children:[b.jsx(ut,{Icon:Cs,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!_,onClick:g}),b.jsx(ut,{Icon:uo,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:y})]}),a]})]},String(e))},vq=(e,t)=>{const[n,r]=E.useState(e);return E.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>clearTimeout(a)},[e,t]),n},bq=({isActive:e=!0,suggestion:t,...n})=>{const r=String(n.value??n.defaultValue??""),{autocomplete:a}=TU(),s=Fr(),[l,u]=E.useState(!1),[d,h]=E.useState(r),[m,y]=E.useState(""),g=vq(d,200);E.useEffect(()=>{typeof n.value>"u"||h(r)},[n.value,n.defaultValue]),E.useEffect(()=>{if(!e||!l)return;const _=async()=>{var S;try{const A=await a({text:g,openAiApiKey:s.editor.openAiApiKey,model:s.editor.openAiApiModel,temperature:s.editor.openAiApiTemperature}),w=((S=A==null?void 0:A.data)==null?void 0:S.autocompletion)??"";if(w.startsWith(g)){const T=w.slice(g.length);return y(T)}return y(w)}catch(A){console.error("Autocomplete error:",A)}};g.length>3?(y(""),_()):y("")},[g,e]);const v=()=>{h(_=>_+m),y("")};return b.jsxs("div",{className:"relative w-full",children:[b.jsxs("div",{className:"pointer-events-none absolute inset-0 whitespace-pre-wrap break-words px-1 py-3 text-base leading-[1.45rem] md:py-1 md:text-sm md:leading-[1.23rem]","aria-hidden":"true",children:[b.jsx("span",{className:"align-text-top text-transparent",children:d}),(m||t)&&b.jsx("span",{className:"text-neutral ml-3 align-text-top",children:t??m})]}),b.jsx(jv,{...n,value:d,onChange:_=>{var S;u(!0),h(_.target.value),(S=n.onChange)==null||S.call(n,_)},onKeyDown:_=>{var S;_.key==="Tab"&&m&&(_.preventDefault(),v()),(S=n.onKeyDown)==null||S.call(n,_)}})]})},_q=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...s})=>{const{isAuthenticated:l}=DU(),[u,d]=E.useState(e),[h,m]=E.useState(0),y=u!==e,g=()=>{d(e),m(A=>A+1)},v=()=>{t(u)},_=A=>d(A.currentTarget.value??"");E.useEffect(()=>{d(e)},[e]);const S=(r==null?void 0:r(u))??!0;return b.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[b.jsx(bq,{onChange:_,variant:"invisible",className:"size-full",defaultValue:e,isActive:l,...s},h),(y||a)&&b.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[y&&b.jsxs(b.Fragment,{children:[b.jsx(ut,{Icon:Cs,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!S,onClick:v}),b.jsx(ut,{Icon:uo,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:g})]}),a]})]},e)};function Ka(){return Ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ka.apply(this,arguments)}const xq=["children","options"],Pe={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};var Zw;(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(Zw||(Zw={}));const qw=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),Ww={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Eq=["style","script"],Sq=["src","href","data","formAction","srcDoc","action"],Aq=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,wq=/mailto:/i,Tq=/\n{2,}$/,wk=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Rq=/^ *> ?/gm,Cq=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Nq=/^ {2,}\n/,Oq=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Tk=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Rk=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,kq=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Dq=/^(?:\n *)*\n/,Iq=/\r\n?/g,Lq=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,jq=/^\[\^([^\]]+)]/,Mq=/\f/g,Pq=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,zq=/^\s*?\[(x|\s)\]/,Ck=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Nk=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ok=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Wy=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,Vq=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,kk=/^<!--[\s\S]*?(?:-->)/,Bq=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Yy=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Uq=/^\{.*\}$/,$q=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Hq=/^<([^ >]+@[^ >]+)>/,Fq=/^<([^ >]+:\/[^ >]+)>/,Gq=/-([a-z])?/gi,Dk=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Kq=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Zq=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,qq=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Wq=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Yq=/\t/g,Xq=/(^ *\||\| *$)/g,Qq=/^ *:-+: *$/,Jq=/^ *:-+ *$/,eW=/^ *-+: *$/,_h="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",tW=new RegExp(`^([*_])\\1${_h}\\1\\1(?!\\1)`),nW=new RegExp(`^([*_])${_h}\\1(?!\\1)`),rW=new RegExp(`^(==)${_h}\\1`),iW=new RegExp(`^(~~)${_h}\\1`),aW=/^\\([^0-9A-Za-z\s])/,Yw=/\\([^0-9A-Za-z\s])/g,oW=/^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/,sW=/^\n+/,lW=/^([ \t]*)/,cW=/\\([^\\])/g,uW=/(?:^|\n)( *)$/,Hb="(?:\\d+\\.)",Fb="(?:[*+-])";function Ik(e){return"( *)("+(e===1?Hb:Fb)+") +"}const Lk=Ik(1),jk=Ik(2);function Mk(e){return new RegExp("^"+(e===1?Lk:jk))}const dW=Mk(1),fW=Mk(2);function Pk(e){return new RegExp("^"+(e===1?Lk:jk)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Hb:Fb)+" )[^\\n]*)*(\\n|$)","gm")}const hW=Pk(1),mW=Pk(2);function zk(e){const t=e===1?Hb:Fb;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Vk=zk(1),Bk=zk(2);function Xw(e,t){const n=t===1,r=n?Vk:Bk,a=n?hW:mW,s=n?dW:fW;return{match:Es(function(l,u){const d=uW.exec(u.prevCapture);return d&&(u.list||!u.inline&&!u.simple)?r.exec(l=d[1]+l):null}),order:1,parse(l,u,d){const h=n?+l[2]:void 0,m=l[0].replace(Tq,`
|
|
279
|
-
`).match(a);let y=!1;return{items:m.map(function(g,v){const _=s.exec(g)[0].length,S=new RegExp("^ {1,"+_+"}","gm"),A=g.replace(S,"").replace(s,""),w=v===m.length-1,T=A.indexOf(`
|
|
280
|
-
|
|
281
|
-
`)!==-1||w&&y;y=T;const C=d.inline,k=d.list;let N;d.list=!0,T?(d.inline=!1,N=Tc(A)+`
|
|
282
|
-
|
|
283
|
-
`):(d.inline=!0,N=Tc(A));const L=u(N,d);return d.inline=C,d.list=k,L}),ordered:n,start:h}},render:(l,u,d)=>e(l.ordered?"ol":"ul",{key:d.key,start:l.type===Pe.orderedList?l.start:void 0},l.items.map(function(h,m){return e("li",{key:m},u(h,d))}))}}const pW=new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),gW=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Uk=[wk,Tk,Rk,Ck,Ok,Nk,Dk,Vk,Bk],yW=[...Uk,/^[^\n]+(?: \n|\n{2,})/,Wy,kk,Yy];function Tc(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function ql(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function vW(e){return eW.test(e)?"right":Qq.test(e)?"center":Jq.test(e)?"left":null}function Qw(e,t,n,r){const a=n.inTable;n.inTable=!0;let s=[[]],l="";function u(){if(!l)return;const d=s[s.length-1];d.push.apply(d,t(l,n)),l=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,h,m)=>{d.trim()==="|"&&(u(),r)?h!==0&&h!==m.length-1&&s.push([]):l+=d}),u(),n.inTable=a,s}function bW(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(Xq,"").split("|").map(vW):[],a=e[3]?function(l,u,d){return l.trim().split(`
|
|
284
|
-
`).map(function(h){return Qw(h,u,d,!0)})}(e[3],t,n):[],s=Qw(e[1],t,n,!!a.length);return n.inline=!1,a.length?{align:r,cells:a,header:s,type:Pe.table}:{children:s,type:Pe.paragraph}}function Jw(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Es(e){return e.inline=1,e}function Xi(e){return Es(function(t,n){return n.inline?e.exec(t):null})}function Qi(e){return Es(function(t,n){return n.inline||n.simple?e.exec(t):null})}function gi(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Wl(e){return Es(function(t){return e.exec(t)})}function _W(e,t){if(t.inline||t.simple)return null;let n="";e.split(`
|
|
285
|
-
`).every(a=>(a+=`
|
|
286
|
-
`,!Uk.some(s=>s.test(a))&&(n+=a,!!a.trim())));const r=Tc(n);return r==""?null:[n,,r]}const xW=/(javascript|vbscript|data(?!:image)):/i;function EW(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(xW.test(t))return null}catch{return null}return e}function eT(e){return e.replace(cW,"$1")}function nf(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!0,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=a,s}function SW(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!1,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=a,s}function AW(e,t,n){const r=n.inline||!1;n.inline=!1;const a=e(t,n);return n.inline=r,a}const Dg=(e,t,n)=>({children:nf(t,e[2],n)});function Ig(){return{}}function Lg(){return null}function wW(...e){return e.filter(Boolean).join(" ")}function jg(e,t,n){let r=e;const a=t.split(".");for(;a.length&&(r=r[a[0]],r!==void 0);)a.shift();return r||n}function TW(e="",t={}){function n(g,v,..._){const S=jg(t.overrides,`${g}.props`,{});return t.createElement(function(A,w){const T=jg(w,A);return T?typeof T=="function"||typeof T=="object"&&"render"in T?T:jg(w,`${A}.component`,A):A}(g,t.overrides),Ka({},v,S,{className:wW(v==null?void 0:v.className,S.className)||void 0}),..._)}function r(g){g=g.replace(Pq,"");let v=!1;t.forceInline?v=!0:t.forceBlock||(v=Wq.test(g)===!1);const _=h(d(v?g:`${Tc(g).replace(sW,"")}
|
|
287
|
-
|
|
288
|
-
`,{inline:v}));for(;typeof _[_.length-1]=="string"&&!_[_.length-1].trim();)_.pop();if(t.wrapper===null)return _;const S=t.wrapper||(v?"span":"div");let A;if(_.length>1||t.forceWrapper)A=_;else{if(_.length===1)return A=_[0],typeof A=="string"?n("span",{key:"outer"},A):A;A=null}return t.createElement(S,{key:"outer"},A)}function a(g,v){const _=v.match(Aq);return _?_.reduce(function(S,A){const w=A.indexOf("=");if(w!==-1){const T=function(L){return L.indexOf("-")!==-1&&L.match(Bq)===null&&(L=L.replace(Gq,function(D,j){return j.toUpperCase()})),L}(A.slice(0,w)).trim(),C=function(L){const D=L[0];return(D==='"'||D==="'")&&L.length>=2&&L[L.length-1]===D?L.slice(1,-1):L}(A.slice(w+1).trim()),k=qw[T]||T;if(k==="ref")return S;const N=S[k]=function(L,D,j,V){return D==="style"?function(U){const ue=[];let ie="",fe=!1,Y=!1,ee="";if(!U)return ue;for(let ne=0;ne<U.length;ne++){const K=U[ne];if(K!=='"'&&K!=="'"||fe||(Y?K===ee&&(Y=!1,ee=""):(Y=!0,ee=K)),K==="("&&ie.endsWith("url")?fe=!0:K===")"&&fe&&(fe=!1),K!==";"||Y||fe)ie+=K;else{const ye=ie.trim();if(ye){const P=ye.indexOf(":");if(P>0){const X=ye.slice(0,P).trim(),$=ye.slice(P+1).trim();ue.push([X,$])}}ie=""}}const H=ie.trim();if(H){const ne=H.indexOf(":");if(ne>0){const K=H.slice(0,ne).trim(),ye=H.slice(ne+1).trim();ue.push([K,ye])}}return ue}(j).reduce(function(U,[ue,ie]){return U[ue.replace(/(-[a-z])/g,fe=>fe[1].toUpperCase())]=V(ie,L,ue),U},{}):Sq.indexOf(D)!==-1?V(j,L,D):(j.match(Uq)&&(j=j.slice(1,j.length-1)),j==="true"||j!=="false"&&j)}(g,T,C,t.sanitizer);typeof N=="string"&&(Wy.test(N)||Yy.test(N))&&(S[k]=r(N.trim()))}else A!=="style"&&(S[qw[A]||A]=!0);return S},{}):null}t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||EW,t.slugify=t.slugify||ql,t.namedCodesToUnicode=t.namedCodesToUnicode?Ka({},Ww,t.namedCodesToUnicode):Ww,t.createElement=t.createElement||E.createElement;const s=[],l={},u={[Pe.blockQuote]:{match:gi(wk),order:1,parse(g,v,_){const[,S,A]=g[0].replace(Rq,"").match(Cq);return{alert:S,children:v(A,_)}},render(g,v,_){const S={key:_.key};return g.alert&&(S.className="markdown-alert-"+t.slugify(g.alert.toLowerCase(),ql),g.children.unshift({attrs:{},children:[{type:Pe.text,text:g.alert}],noInnerParse:!0,type:Pe.htmlBlock,tag:"header"})),n("blockquote",S,v(g.children,_))}},[Pe.breakLine]:{match:Wl(Nq),order:1,parse:Ig,render:(g,v,_)=>n("br",{key:_.key})},[Pe.breakThematic]:{match:gi(Oq),order:1,parse:Ig,render:(g,v,_)=>n("hr",{key:_.key})},[Pe.codeBlock]:{match:gi(Rk),order:0,parse:g=>({lang:void 0,text:Tc(g[0].replace(/^ {4}/gm,"")).replace(Yw,"$1")}),render:(g,v,_)=>n("pre",{key:_.key},n("code",Ka({},g.attrs,{className:g.lang?`lang-${g.lang}`:""}),g.text))},[Pe.codeFenced]:{match:gi(Tk),order:0,parse:g=>({attrs:a("code",g[3]||""),lang:g[2]||void 0,text:g[4],type:Pe.codeBlock})},[Pe.codeInline]:{match:Qi(kq),order:3,parse:g=>({text:g[2].replace(Yw,"$1")}),render:(g,v,_)=>n("code",{key:_.key},g.text)},[Pe.footnote]:{match:gi(Lq),order:0,parse:g=>(s.push({footnote:g[2],identifier:g[1]}),{}),render:Lg},[Pe.footnoteReference]:{match:Xi(jq),order:1,parse:g=>({target:`#${t.slugify(g[1],ql)}`,text:g[1]}),render:(g,v,_)=>n("a",{key:_.key,href:t.sanitizer(g.target,"a","href")},n("sup",{key:_.key},g.text))},[Pe.gfmTask]:{match:Xi(zq),order:1,parse:g=>({completed:g[1].toLowerCase()==="x"}),render:(g,v,_)=>n("input",{checked:g.completed,key:_.key,readOnly:!0,type:"checkbox"})},[Pe.heading]:{match:gi(t.enforceAtxHeadings?Nk:Ck),order:1,parse:(g,v,_)=>({children:nf(v,g[2],_),id:t.slugify(g[2],ql),level:g[1].length}),render:(g,v,_)=>n(`h${g.level}`,{id:g.id,key:_.key},v(g.children,_))},[Pe.headingSetext]:{match:gi(Ok),order:0,parse:(g,v,_)=>({children:nf(v,g[1],_),level:g[2]==="="?1:2,type:Pe.heading})},[Pe.htmlBlock]:{match:Wl(Wy),order:1,parse(g,v,_){const[,S]=g[3].match(lW),A=new RegExp(`^${S}`,"gm"),w=g[3].replace(A,""),T=(C=w,yW.some(j=>j.test(C))?AW:nf);var C;const k=g[1].toLowerCase(),N=Eq.indexOf(k)!==-1,L=(N?k:g[1]).trim(),D={attrs:a(L,g[2]),noInnerParse:N,tag:L};return _.inAnchor=_.inAnchor||k==="a",N?D.text=g[3]:D.children=T(v,w,_),_.inAnchor=!1,D},render:(g,v,_)=>n(g.tag,Ka({key:_.key},g.attrs),g.text||(g.children?v(g.children,_):""))},[Pe.htmlSelfClosing]:{match:Wl(Yy),order:1,parse(g){const v=g[1].trim();return{attrs:a(v,g[2]||""),tag:v}},render:(g,v,_)=>n(g.tag,Ka({},g.attrs,{key:_.key}))},[Pe.htmlComment]:{match:Wl(kk),order:1,parse:()=>({}),render:Lg},[Pe.image]:{match:Qi(gW),order:1,parse:g=>({alt:g[1],target:eT(g[2]),title:g[3]}),render:(g,v,_)=>n("img",{key:_.key,alt:g.alt||void 0,title:g.title||void 0,src:t.sanitizer(g.target,"img","src")})},[Pe.link]:{match:Xi(pW),order:3,parse:(g,v,_)=>({children:SW(v,g[1],_),target:eT(g[2]),title:g[3]}),render:(g,v,_)=>n("a",{key:_.key,href:t.sanitizer(g.target,"a","href"),title:g.title},v(g.children,_))},[Pe.linkAngleBraceStyleDetector]:{match:Xi(Fq),order:0,parse:g=>({children:[{text:g[1],type:Pe.text}],target:g[1],type:Pe.link})},[Pe.linkBareUrlDetector]:{match:Es((g,v)=>v.inAnchor||t.disableAutoLink?null:Xi($q)(g,v)),order:0,parse:g=>({children:[{text:g[1],type:Pe.text}],target:g[1],title:void 0,type:Pe.link})},[Pe.linkMailtoDetector]:{match:Xi(Hq),order:0,parse(g){let v=g[1],_=g[1];return wq.test(_)||(_="mailto:"+_),{children:[{text:v.replace("mailto:",""),type:Pe.text}],target:_,type:Pe.link}}},[Pe.orderedList]:Xw(n,1),[Pe.unorderedList]:Xw(n,2),[Pe.newlineCoalescer]:{match:gi(Dq),order:3,parse:Ig,render:()=>`
|
|
289
|
-
`},[Pe.paragraph]:{match:Es(_W),order:3,parse:Dg,render:(g,v,_)=>n("p",{key:_.key},v(g.children,_))},[Pe.ref]:{match:Xi(Kq),order:0,parse:g=>(l[g[1]]={target:g[2],title:g[4]},{}),render:Lg},[Pe.refImage]:{match:Qi(Zq),order:0,parse:g=>({alt:g[1]||void 0,ref:g[2]}),render:(g,v,_)=>l[g.ref]?n("img",{key:_.key,alt:g.alt,src:t.sanitizer(l[g.ref].target,"img","src"),title:l[g.ref].title}):null},[Pe.refLink]:{match:Xi(qq),order:0,parse:(g,v,_)=>({children:v(g[1],_),fallbackChildren:g[0],ref:g[2]}),render:(g,v,_)=>l[g.ref]?n("a",{key:_.key,href:t.sanitizer(l[g.ref].target,"a","href"),title:l[g.ref].title},v(g.children,_)):n("span",{key:_.key},g.fallbackChildren)},[Pe.table]:{match:gi(Dk),order:1,parse:bW,render(g,v,_){const S=g;return n("table",{key:_.key},n("thead",null,n("tr",null,S.header.map(function(A,w){return n("th",{key:w,style:Jw(S,w)},v(A,_))}))),n("tbody",null,S.cells.map(function(A,w){return n("tr",{key:w},A.map(function(T,C){return n("td",{key:C,style:Jw(S,C)},v(T,_))}))})))}},[Pe.text]:{match:Wl(oW),order:4,parse:g=>({text:g[0].replace(Vq,(v,_)=>t.namedCodesToUnicode[_]?t.namedCodesToUnicode[_]:v)}),render:g=>g.text},[Pe.textBolded]:{match:Qi(tW),order:2,parse:(g,v,_)=>({children:v(g[2],_)}),render:(g,v,_)=>n("strong",{key:_.key},v(g.children,_))},[Pe.textEmphasized]:{match:Qi(nW),order:3,parse:(g,v,_)=>({children:v(g[2],_)}),render:(g,v,_)=>n("em",{key:_.key},v(g.children,_))},[Pe.textEscaped]:{match:Qi(aW),order:1,parse:g=>({text:g[1],type:Pe.text})},[Pe.textMarked]:{match:Qi(rW),order:3,parse:Dg,render:(g,v,_)=>n("mark",{key:_.key},v(g.children,_))},[Pe.textStrikethroughed]:{match:Qi(iW),order:3,parse:Dg,render:(g,v,_)=>n("del",{key:_.key},v(g.children,_))}};t.disableParsingRawHTML===!0&&(delete u[Pe.htmlBlock],delete u[Pe.htmlSelfClosing]);const d=function(g){let v=Object.keys(g);function _(S,A){let w,T,C=[],k="",N="";for(A.prevCapture=A.prevCapture||"";S;){let L=0;for(;L<v.length;){if(k=v[L],w=g[k],A.inline&&!w.match.inline){L++;continue}const D=w.match(S,A);if(D){N=D[0],A.prevCapture+=N,S=S.substring(N.length),T=w.parse(D,_,A),T.type==null&&(T.type=k),C.push(T);break}L++}}return A.prevCapture="",C}return v.sort(function(S,A){let w=g[S].order,T=g[A].order;return w!==T?w-T:S<A?-1:1}),function(S,A){return _(function(w){return w.replace(Iq,`
|
|
290
|
-
`).replace(Mq,"").replace(Yq," ")}(S),A)}}(u),h=(m=function(g,v){return function(_,S,A){const w=g[_.type].render;return v?v(()=>w(_,S,A),_,S,A):w(_,S,A)}}(u,t.renderRule),function g(v,_={}){if(Array.isArray(v)){const S=_.key,A=[];let w=!1;for(let T=0;T<v.length;T++){_.key=T;const C=g(v[T],_),k=typeof C=="string";k&&w?A[A.length-1]+=C:C!==null&&A.push(C),w=k}return _.key=S,A}return m(v,g,_)});var m;const y=r(e);return s.length?n("div",null,y,n("footer",{key:"footer"},s.map(function(g){return n("div",{id:t.slugify(g.identifier,ql),key:g.identifier},g.identifier,h(d(g.footnote,{inline:!0})))}))):y}const RW=e=>{let{children:t="",options:n}=e,r=function(a,s){if(a==null)return{};var l,u,d={},h=Object.keys(a);for(u=0;u<h.length;u++)s.indexOf(l=h[u])>=0||(d[l]=a[l]);return d}(e,xq);return E.cloneElement(TW(t,n),r)},CW=e=>{var a;const t=document.getElementById(e),r=(((a=t==null?void 0:t.getBoundingClientRect())==null?void 0:a.top)??0)+window.scrollY-150;window.scrollTo({top:r,behavior:"smooth"})},NW=()=>{const[e,t]=E.useState(),n=()=>{t(window.location.hash.slice(1))};return E.useEffect(()=>(t(window.location.hash.slice(1)),window.addEventListener("hashchange",n,{passive:!0}),()=>window.removeEventListener("hashchange",n)),[]),E.useEffect(()=>{e&&CW(e)},[e]),null},OW=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function kW(e,t,n){const r=[];for(const a of e){if(n==="v3"){const u=a.children.flatMap((d,h)=>{if(d.type!=="element")return d;const m=d.children[0];if(m.type!=="text")return d;const y=h===a.children.length-1;if(!nT(m.value,y))return d;const v=m.value.split(/(\s+\/\/)/);if(v.length<=1)return d;let _=[v[0]];for(let S=1;S<v.length;S+=2)_.push(v[S]+(v[S+1]||""));return _=_.filter(Boolean),_.length<=1?d:_.map(S=>({...d,children:[{type:"text",value:S}]}))});u.length!==a.children.length&&(a.children=u)}const s=a.children;let l=s.length-1;n==="v1"?l=0:t&&(l=s.length-2);for(let u=Math.max(l,0);u<s.length;u++){const d=s[u];if(d.type!=="element")continue;const h=d.children.at(0);if((h==null?void 0:h.type)!=="text")continue;const m=u===s.length-1,y=nT(h.value,m);if(y)if(t&&!m&&u!==0){const g=tT(s[u-1],"{")&&tT(s[u+1],"}");r.push({info:y,line:a,token:d,isLineCommentOnly:s.length===3&&d.children.length===1,isJsxStyle:g})}else r.push({info:y,line:a,token:d,isLineCommentOnly:s.length===1&&d.children.length===1,isJsxStyle:!1})}}return r}function tT(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function nT(e,t){let n=e.trimStart();const r=e.length-n.length;n=n.trimEnd();const a=e.length-n.length-r;for(const[s,l]of OW){if(l&&!t)continue;const u=s.exec(n);if(u)return[" ".repeat(r)+u[1],u[2],u[3]?u[3]+" ".repeat(a):void 0]}}function DW(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function $k(e,t,n,r){return r==null&&(r="v3"),{name:e,code(a){const s=a.children.filter(h=>h.type==="element"),l=[];a.data??(a.data={});const u=a.data;u._shiki_notation??(u._shiki_notation=kW(s,["jsx","tsx"].includes(this.options.lang),r));const d=u._shiki_notation;for(const h of d){if(h.info[1].length===0)continue;let m=s.indexOf(h.line);h.isLineCommentOnly&&r!=="v1"&&m++;let y=!1;if(h.info[1]=h.info[1].replace(t,(...v)=>n.call(this,v,h.line,h.token,s,m)?(y=!0,""):v[0]),!y)continue;r==="v1"&&(h.info[1]=DW(h.info[1]));const g=h.info[1].trim().length===0;if(g&&(h.info[1]=""),g&&h.isLineCommentOnly)l.push(h.line);else if(g&&h.isJsxStyle)h.line.children.splice(h.line.children.indexOf(h.token)-1,3);else if(g)h.line.children.splice(h.line.children.indexOf(h.token),1);else{const v=h.token.children[0];v.type==="text"&&(v.value=h.info.join(""))}}for(const h of l){const m=a.children.indexOf(h),y=a.children[m+1];let g=1;(y==null?void 0:y.type)==="text"&&(y==null?void 0:y.value)===`
|
|
291
|
-
`&&(g=2),a.children.splice(m,g)}}}}function IW(e){if(!e)return null;const t=e.match(/\{([\d,-]+)\}/);return t?t[1].split(",").flatMap(r=>{const a=r.split("-").map(s=>Number.parseInt(s,10));return a.length===1?[a[0]]:Array.from({length:a[1]-a[0]+1},(s,l)=>l+a[0])}):null}const Ld=Symbol("highlighted-lines");function LW(e={}){const{className:t="highlighted"}=e;return{name:"@shikijs/transformers:meta-highlight",line(n,r){var l;if(!((l=this.options.meta)!=null&&l.__raw))return;const a=this.meta;return a[Ld]??(a[Ld]=IW(this.options.meta.__raw)),(a[Ld]??[]).includes(r)&&this.addClassToHast(n,t),n}}}function jW(e){return e?Array.from(e.matchAll(/\/((?:\\.|[^/])+)\//g)).map(n=>n[1].replace(/\\(.)/g,"$1")):[]}function MW(e={}){const{className:t="highlighted-word"}=e;return{name:"@shikijs/transformers:meta-word-highlight",preprocess(n,r){var s;if(!((s=this.options.meta)!=null&&s.__raw))return;const a=jW(this.options.meta.__raw);r.decorations||(r.decorations=[]);for(const l of a){const u=PW(n,l);for(const d of u)r.decorations.push({start:d,end:d+l.length,properties:{class:t}})}}}}function PW(e,t){const n=[];let r=0;for(;;){const a=e.indexOf(t,r);if(a===-1||a>=e.length||a<r)break;n.push(a),r=a+t.length}return n}function zW(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Gb(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0}=e;return $k(t,new RegExp(`\\s*\\[!code (${Object.keys(n).map(zW).join("|")})(:\\d+)?\\]`),function([a,s,l=":1"],u,d,h,m){const y=Number.parseInt(l.slice(1),10);for(let g=m;g<Math.min(m+y,h.length);g++)this.addClassToHast(h[g],n[s]);return r&&this.addClassToHast(this.pre,r),!0},e.matchAlgorithm)}function VW(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff"}=e;return Gb({classMap:{"++":t,"--":n},classActivePre:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function BW(e={}){const{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:n="has-highlighted"}=e;return Gb({classMap:t,classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function UW(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted"}=e;return Gb({classMap:{highlight:t,hl:t},classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}function $W(e,t,n,r){const a=Hk(e);let s=a.indexOf(n);for(;s!==-1;)HW.call(this,e.children,t,s,n.length,r),s=a.indexOf(n,s+1)}function Hk(e){return e.type==="text"?e.value:e.type==="element"&&e.tagName==="span"?e.children.map(Hk).join(""):""}function HW(e,t,n,r,a){let s=0;for(let l=0;l<e.length;l++){const u=e[l];if(u.type!=="element"||u.tagName!=="span"||u===t)continue;const d=u.children[0];if(d.type==="text"){if(FW([s,s+d.value.length-1],[n,n+r])){const h=Math.max(0,n-s),m=r-Math.max(0,s-n);if(m===0)continue;const y=GW(u,d,h,m);this.addClassToHast(y[1],a);const g=y.filter(Boolean);e.splice(l,1,...g),l+=g.length-1}s+=d.value.length}}}function FW(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function GW(e,t,n,r){const a=t.value,s=l=>KW(e,{children:[{type:"text",value:l}]});return[n>0?s(a.slice(0,n)):void 0,s(a.slice(n,n+r)),n+r<a.length?s(a.slice(n+r)):void 0]}function KW(e,t){return{...e,properties:{...e.properties},...t}}function ZW(e={}){const{classActiveWord:t="highlighted-word",classActivePre:n=void 0}=e;return $k("@shikijs/transformers:notation-highlight-word",/\s*\[!code word:((?:\\.|[^:\]])+)(:\d+)?\]/,function([r,a,s],l,u,d,h){const m=s?Number.parseInt(s.slice(1),10):d.length;a=a.replace(/\\(.)/g,"$1");for(let y=h;y<Math.min(h+m,d.length);y++)$W.call(this,d[y],u,a,t);return n&&this.addClassToHast(this.pre,n),!0},e.matchAlgorithm)}const qW="modulepreload",WW=function(e){return"/"+e},rT={},I=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));a=l(n.map(h=>{if(h=WW(h),h in rT)return;rT[h]=!0;const m=h.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":qW,m||(g.as="script"),g.crossOrigin="",g.href=h,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,_)=>{g.addEventListener("load",v),g.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return a.then(l=>{for(const u of l||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})};let Xt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function YW(e){return Kb(e)}function Kb(e){return Array.isArray(e)?XW(e):e instanceof RegExp?e:typeof e=="object"?QW(e):e}function XW(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Kb(e[n]);return t}function QW(e){let t={};for(let n in e)t[n]=Kb(e[n]);return t}function Fk(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Gk(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Gk(e.substring(0,e.length-1)):e.substr(~t+1)}var Mg=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,jd=class{static hasCaptures(e){return e===null?!1:(Mg.lastIndex=0,Mg.test(e))}static replaceCaptures(e,t,n){return e.replace(Mg,(r,a,s,l)=>{let u=n[parseInt(a||s,10)];if(u){let d=t.substring(u.start,u.end);for(;d[0]===".";)d=d.substring(1);switch(l){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return r})}};function Kk(e,t){return e<t?-1:e>t?1:0}function Zk(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let s=Kk(e[a],t[a]);if(s!==0)return s}return 0}return n-r}function iT(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function qk(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Wk=class{constructor(e){ce(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},kf=class{constructor(e,t,n){ce(this,"_cachedMatchRoot",new Wk(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(tY(e),t)}static createFromParsedTheme(e,t){return rY(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>JW(e.parent,a.parentScopes));return r?new Yk(r.fontStyle,r.foreground,r.background):null}},Pg=class rf{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new rf(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new rf(n,t[r]);return n}push(t){return new rf(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function JW(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!eY(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function eY(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Yk=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function tY(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,s=t.length;a<s;a++){let l=t[a];if(!l.settings)continue;let u;if(typeof l.scope=="string"){let y=l.scope;y=y.replace(/^[,]+/,""),y=y.replace(/[,]+$/,""),u=y.split(",")}else Array.isArray(l.scope)?u=l.scope:u=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let y=l.settings.fontStyle.split(" ");for(let g=0,v=y.length;g<v;g++)switch(y[g]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let h=null;typeof l.settings.foreground=="string"&&iT(l.settings.foreground)&&(h=l.settings.foreground);let m=null;typeof l.settings.background=="string"&&iT(l.settings.background)&&(m=l.settings.background);for(let y=0,g=u.length;y<g;y++){let _=u[y].trim().split(" "),S=_[_.length-1],A=null;_.length>1&&(A=_.slice(0,_.length-1),A.reverse()),n[r++]=new nY(S,A,a,d,h,m)}}return n}var nY=class{constructor(e,t,n,r,a,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=s}},pn=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(pn||{});function rY(e,t){e.sort((d,h)=>{let m=Kk(d.scope,h.scope);return m!==0||(m=Zk(d.parentScopes,h.parentScopes),m!==0)?m:d.index-h.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(n=d.fontStyle),d.foreground!==null&&(r=d.foreground),d.background!==null&&(a=d.background)}let s=new iY(t),l=new Yk(n,s.getId(r),s.getId(a)),u=new oY(new Xy(0,null,-1,0,0),[]);for(let d=0,h=e.length;d<h;d++){let m=e[d];u.insert(0,m.scope,m.parentScopes,m.fontStyle,s.getId(m.foreground),s.getId(m.background))}return new kf(s,l,u)}var iY=class{constructor(e){ce(this,"_isFrozen");ce(this,"_lastColorId");ce(this,"_id2color");ce(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},aY=Object.freeze([]),Xy=class Xk{constructor(t,n,r,a,s){ce(this,"scopeDepth");ce(this,"parentScopes");ce(this,"fontStyle");ce(this,"foreground");ce(this,"background");this.scopeDepth=t,this.parentScopes=n||aY,this.fontStyle=r,this.foreground=a,this.background=s}clone(){return new Xk(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},oY=class Qy{constructor(t,n=[],r={}){ce(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){const s=n.parentScopes[a].length-t.parentScopes[r].length;if(s!==0)return s;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,s;if(r===-1?(a=t,s=""):(a=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Qy._cmpBySpecificity),n}insert(t,n,r,a,s,l){if(n===""){this._doInsertHere(t,r,a,s,l);return}let u=n.indexOf("."),d,h;u===-1?(d=n,h=""):(d=n.substring(0,u),h=n.substring(u+1));let m;this._children.hasOwnProperty(d)?m=this._children[d]:(m=new Qy(this._mainRule.clone(),Xy.cloneArr(this._rulesWithParentScopes)),this._children[d]=m),m.insert(t+1,h,r,a,s,l)}_doInsertHere(t,n,r,a,s){if(n===null){this._mainRule.acceptOverwrite(t,r,a,s);return}for(let l=0,u=this._rulesWithParentScopes.length;l<u;l++){let d=this._rulesWithParentScopes[l];if(Zk(d.parentScopes,n)===0){d.acceptOverwrite(t,r,a,s);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Xy(t,n,r,a,s))}},Ss=class nr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=nr.getLanguageId(t),r=nr.getTokenType(t),a=nr.getFontStyle(t),s=nr.getForeground(t),l=nr.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:s,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,s,l,u){let d=nr.getLanguageId(t),h=nr.getTokenType(t),m=nr.containsBalancedBrackets(t)?1:0,y=nr.getFontStyle(t),g=nr.getForeground(t),v=nr.getBackground(t);return n!==0&&(d=n),r!==8&&(h=r),a!==null&&(m=a?1:0),s!==-1&&(y=s),l!==0&&(g=l),u!==0&&(v=u),(d<<0|h<<8|m<<10|y<<11|g<<15|v<<24)>>>0}};function Df(e,t){const n=[],r=sY(e);let a=r.next();for(;a!==null;){let d=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let h=l();if(n.push({matcher:h,priority:d}),a!==",")break;a=r.next()}return n;function s(){if(a==="-"){a=r.next();const d=s();return h=>!!d&&!d(h)}if(a==="("){a=r.next();const d=u();return a===")"&&(a=r.next()),d}if(aT(a)){const d=[];do d.push(a),a=r.next();while(aT(a));return h=>t(d,h)}return null}function l(){const d=[];let h=s();for(;h;)d.push(h),h=s();return m=>d.every(y=>y(m))}function u(){const d=[];let h=l();for(;h&&(d.push(h),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");h=l()}return m=>d.some(y=>y(m))}}function aT(e){return!!e&&!!e.match(/[\w\.:]+/)}function sY(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Qk(e){typeof e.dispose=="function"&&e.dispose()}var Rc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},lY=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},cY=class{constructor(){ce(this,"_references",[]);ce(this,"_seenReferenceKeys",new Set);ce(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},uY=class{constructor(e,t){ce(this,"seenFullScopeRequests",new Set);ce(this,"seenPartialScopeRequests",new Set);ce(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Rc(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new cY;for(const n of e)dY(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Rc){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function dY(e,t,n,r){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof Rc?af({baseGrammar:s,selfGrammar:a},r):Jy(e.ruleName,{baseGrammar:s,selfGrammar:a,repository:a.repository},r);const l=n.injections(e.scopeName);if(l)for(const u of l)r.add(new Rc(u))}function Jy(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];If([r],t,n)}}function af(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&If(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&If(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function If(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const a=r.repository?Fk({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&If(r.patterns,{...t,repository:a},n);const s=r.include;if(!s)continue;const l=Jk(s);switch(l.kind){case 0:af({...t,selfGrammar:t.baseGrammar},n);break;case 1:af(t,n);break;case 2:Jy(l.ruleName,{...t,repository:a},n);break;case 3:case 4:const u=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(u){const d={baseGrammar:t.baseGrammar,selfGrammar:u,repository:a};l.kind===4?Jy(l.ruleName,d,n):af(d,n)}else l.kind===4?n.add(new lY(l.scopeName,l.ruleName)):n.add(new Rc(l.scopeName));break}}}var fY=class{constructor(){ce(this,"kind",0)}},hY=class{constructor(){ce(this,"kind",1)}},mY=class{constructor(e){ce(this,"kind",2);this.ruleName=e}},pY=class{constructor(e){ce(this,"kind",3);this.scopeName=e}},gY=class{constructor(e,t){ce(this,"kind",4);this.scopeName=e,this.ruleName=t}};function Jk(e){if(e==="$base")return new fY;if(e==="$self")return new hY;const t=e.indexOf("#");if(t===-1)return new pY(e);if(t===0)return new mY(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new gY(n,r)}}var yY=/\\(\d+)/,oT=/\\(\d+)/g,vY=-1,eD=-2;var Jc=class{constructor(e,t,n,r){ce(this,"$location");ce(this,"id");ce(this,"_nameIsCapturing");ce(this,"_name");ce(this,"_contentNameIsCapturing");ce(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=jd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=jd.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Gk(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:jd.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:jd.replaceCaptures(this._contentName,e,t)}},bY=class extends Jc{constructor(t,n,r,a,s){super(t,n,r,a);ce(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,a){throw new Error("Not supported!")}},_Y=class extends Jc{constructor(t,n,r,a,s){super(t,n,r,null);ce(this,"_match");ce(this,"captures");ce(this,"_cachedCompiledPatterns");this._match=new Cc(a,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Nc,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},sT=class extends Jc{constructor(t,n,r,a,s){super(t,n,r,a);ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Nc,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ev=class extends Jc{constructor(t,n,r,a,s,l,u,d,h,m){super(t,n,r,a);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"_end");ce(this,"endHasBackReferences");ce(this,"endCaptures");ce(this,"applyEndPatternLast");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");this._begin=new Cc(s,this.id),this.beginCaptures=l,this._end=new Cc(u||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=d,this.applyEndPatternLast=h||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,a)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Nc;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Lf=class extends Jc{constructor(t,n,r,a,s,l,u,d,h){super(t,n,r,a);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"whileCaptures");ce(this,"_while");ce(this,"whileHasBackReferences");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");ce(this,"_cachedCompiledWhilePatterns");this._begin=new Cc(s,this.id),this.beginCaptures=l,this.whileCaptures=d,this._while=new Cc(u,eD),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Nc;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,a){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,a)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Nc,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},tD=class fn{static createCaptureRule(t,n,r,a,s){return t.registerRule(l=>new bY(n,l,r,a,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new _Y(t.$vscodeTextmateLocation,t.id,t.name,t.match,fn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Fk({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new sT(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,fn._compilePatterns(s,n,r))}return t.while?new Lf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,fn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,fn._compileCaptures(t.whileCaptures||t.captures,n,r),fn._compilePatterns(t.patterns,n,r)):new ev(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,fn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,fn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,fn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let s=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);u>s&&(s=u)}for(let l=0;l<=s;l++)a[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);let d=0;t[l].patterns&&(d=fn.getCompiledRuleId(t[l],n,r)),a[u]=fn.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,d)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let s=0,l=t.length;s<l;s++){const u=t[s];let d=-1;if(u.include){const h=Jk(u.include);switch(h.kind){case 0:case 1:d=fn.getCompiledRuleId(r[u.include],n,r);break;case 2:let m=r[h.ruleName];m&&(d=fn.getCompiledRuleId(m,n,r));break;case 3:case 4:const y=h.scopeName,g=h.kind===4?h.ruleName:null,v=n.getExternalGrammar(y,r);if(v)if(g){let _=v.repository[g];_&&(d=fn.getCompiledRuleId(_,n,v.repository))}else d=fn.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else d=fn.getCompiledRuleId(u,n,r);if(d!==-1){const h=n.getRule(d);let m=!1;if((h instanceof sT||h instanceof ev||h instanceof Lf)&&h.hasMissingPatterns&&h.patterns.length===0&&(m=!0),m)continue;a.push(d)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Cc=class nD{constructor(t,n){ce(this,"source");ce(this,"ruleId");ce(this,"hasAnchor");ce(this,"hasBackReferences");ce(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let a=0,s=[],l=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const h=t.charAt(u+1);h==="z"?(s.push(t.substring(a,u)),s.push("$(?!\\n)(?<!\\n)"),a=u+2):(h==="A"||h==="G")&&(l=!0),u++}this.hasAnchor=l,a===0?this.source=t:(s.push(t.substring(a,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=yY.test(this.source):this.hasBackReferences=!1}clone(){return new nD(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return oT.lastIndex=0,this.source.replace(oT,(a,s)=>qk(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],s,l,u,d;for(s=0,l=this.source.length;s<l;s++)u=this.source.charAt(s),t[s]=u,n[s]=u,r[s]=u,a[s]=u,u==="\\"&&s+1<l&&(d=this.source.charAt(s+1),d==="A"?(t[s+1]="",n[s+1]="",r[s+1]="A",a[s+1]="A"):d==="G"?(t[s+1]="",n[s+1]="G",r[s+1]="",a[s+1]="G"):(t[s+1]=d,n[s+1]=d,r[s+1]=d,a[s+1]=d),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Nc=class{constructor(){ce(this,"_items");ce(this,"_hasAnchors");ce(this,"_cached");ce(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new lT(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new lT(e,r,this._items.map(a=>a.ruleId))}},lT=class{constructor(e,t,n){ce(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
292
|
-
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},zg=class{constructor(e,t){this.languageId=e,this.tokenType=t}},yi,xY=(yi=class{constructor(t,n){ce(this,"_defaultAttributes");ce(this,"_embeddedLanguagesMatcher");ce(this,"_getBasicScopeAttributes",new Wk(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new zg(n,r)}));this._defaultAttributes=new zg(t,8),this._embeddedLanguagesMatcher=new EY(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?yi._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(yi.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},ce(yi,"_NULL_SCOPE_METADATA",new zg(0,0)),ce(yi,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),yi),EY=class{constructor(e){ce(this,"values");ce(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>qk(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},cT=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function rD(e,t,n,r,a,s,l,u){const d=t.content.length;let h=!1,m=-1;if(l){const v=SY(e,t,n,r,a,s);a=v.stack,r=v.linePos,n=v.isFirstLine,m=v.anchorPosition}const y=Date.now();for(;!h;){if(u!==0&&Date.now()-y>u)return new cT(a,!0);g()}return new cT(a,!1);function g(){const v=AY(e,t,n,r,a,m);if(!v){s.produce(a,d),h=!0;return}const _=v.captureIndices,S=v.matchedRuleId,A=_&&_.length>0?_[0].end>r:!1;if(S===vY){const w=a.getRule(e);s.produce(a,_[0].start),a=a.withContentNameScopesList(a.nameScopesList),Jl(e,t,n,a,s,w.endCaptures,_),s.produce(a,_[0].end);const T=a;if(a=a.parent,m=T.getAnchorPos(),!A&&T.getEnterPos()===r){a=T,s.produce(a,d),h=!0;return}}else{const w=e.getRule(S);s.produce(a,_[0].start);const T=a,C=w.getName(t.content,_),k=a.contentNameScopesList.pushAttributed(C,e);if(a=a.push(S,r,m,_[0].end===d,null,k,k),w instanceof ev){const N=w;Jl(e,t,n,a,s,N.beginCaptures,_),s.produce(a,_[0].end),m=_[0].end;const L=N.getContentName(t.content,_),D=k.pushAttributed(L,e);if(a=a.withContentNameScopesList(D),N.endHasBackReferences&&(a=a.withEndRule(N.getEndWithResolvedBackReferences(t.content,_))),!A&&T.hasSameRuleAs(a)){a=a.pop(),s.produce(a,d),h=!0;return}}else if(w instanceof Lf){const N=w;Jl(e,t,n,a,s,N.beginCaptures,_),s.produce(a,_[0].end),m=_[0].end;const L=N.getContentName(t.content,_),D=k.pushAttributed(L,e);if(a=a.withContentNameScopesList(D),N.whileHasBackReferences&&(a=a.withEndRule(N.getWhileWithResolvedBackReferences(t.content,_))),!A&&T.hasSameRuleAs(a)){a=a.pop(),s.produce(a,d),h=!0;return}}else if(Jl(e,t,n,a,s,w.captures,_),s.produce(a,_[0].end),a=a.pop(),!A){a=a.safePop(),s.produce(a,d),h=!0;return}}_[0].end>r&&(r=_[0].end,n=!1)}}function SY(e,t,n,r,a,s){let l=a.beginRuleCapturedEOL?0:-1;const u=[];for(let d=a;d;d=d.pop()){const h=d.getRule(e);h instanceof Lf&&u.push({rule:h,stack:d})}for(let d=u.pop();d;d=u.pop()){const{ruleScanner:h,findOptions:m}=RY(d.rule,e,d.stack.endRule,n,r===l),y=h.findNextMatchSync(t,r,m);if(y){if(y.ruleId!==eD){a=d.stack.pop();break}y.captureIndices&&y.captureIndices.length&&(s.produce(d.stack,y.captureIndices[0].start),Jl(e,t,n,d.stack,s,d.rule.whileCaptures,y.captureIndices),s.produce(d.stack,y.captureIndices[0].end),l=y.captureIndices[0].end,y.captureIndices[0].end>r&&(r=y.captureIndices[0].end,n=!1))}else{a=d.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:l,isFirstLine:n}}function AY(e,t,n,r,a,s){const l=wY(e,t,n,r,a,s),u=e.getInjections();if(u.length===0)return l;const d=TY(u,e,t,n,r,a,s);if(!d)return l;if(!l)return d;const h=l.captureIndices[0].start,m=d.captureIndices[0].start;return m<h||d.priorityMatch&&m===h?d:l}function wY(e,t,n,r,a,s){const l=a.getRule(e),{ruleScanner:u,findOptions:d}=iD(l,e,a.endRule,n,r===s),h=u.findNextMatchSync(t,r,d);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function TY(e,t,n,r,a,s,l){let u=Number.MAX_VALUE,d=null,h,m=0;const y=s.contentNameScopesList.getScopeNames();for(let g=0,v=e.length;g<v;g++){const _=e[g];if(!_.matcher(y))continue;const S=t.getRule(_.ruleId),{ruleScanner:A,findOptions:w}=iD(S,t,null,r,a===l),T=A.findNextMatchSync(n,a,w);if(!T)continue;const C=T.captureIndices[0].start;if(!(C>=u)&&(u=C,d=T.captureIndices,h=T.ruleId,m=_.priority,u===a))break}return d?{priorityMatch:m===-1,captureIndices:d,matchedRuleId:h}:null}function iD(e,t,n,r,a){return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function RY(e,t,n,r,a){return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function Jl(e,t,n,r,a,s,l){if(s.length===0)return;const u=t.content,d=Math.min(s.length,l.length),h=[],m=l[0].end;for(let y=0;y<d;y++){const g=s[y];if(g===null)continue;const v=l[y];if(v.length===0)continue;if(v.start>m)break;for(;h.length>0&&h[h.length-1].endPos<=v.start;)a.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?a.produceFromScopes(h[h.length-1].scopes,v.start):a.produce(r,v.start),g.retokenizeCapturedWithRuleId){const S=g.getName(u,l),A=r.contentNameScopesList.pushAttributed(S,e),w=g.getContentName(u,l),T=A.pushAttributed(w,e),C=r.push(g.retokenizeCapturedWithRuleId,v.start,-1,!1,null,A,T),k=e.createOnigString(u.substring(0,v.end));rD(e,k,n&&v.start===0,v.start,C,a,!1,0),Qk(k);continue}const _=g.getName(u,l);if(_!==null){const A=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(_,e);h.push(new CY(A,v.end))}}for(;h.length>0;)a.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var CY=class{constructor(e,t){ce(this,"scopes");ce(this,"endPos");this.scopes=e,this.endPos=t}};function NY(e,t,n,r,a,s,l,u){return new kY(e,t,n,r,a,s,l,u)}function uT(e,t,n,r,a){const s=Df(t,jf),l=tD.getCompiledRuleId(n,r,a.repository);for(const u of s)e.push({debugSelector:t,matcher:u.matcher,ruleId:l,grammar:a,priority:u.priority})}function jf(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let a=n;a<t.length;a++)if(OY(t[a],r))return n=a+1,!0;return!1})}function OY(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var kY=class{constructor(e,t,n,r,a,s,l,u){ce(this,"_rootId");ce(this,"_lastRuleId");ce(this,"_ruleId2desc");ce(this,"_includedGrammars");ce(this,"_grammarRepository");ce(this,"_grammar");ce(this,"_injections");ce(this,"_basicScopeAttributesProvider");ce(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=u,this._basicScopeAttributesProvider=new xY(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=dT(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const d of Object.keys(a)){const h=Df(d,jf);for(const m of h)this._tokenTypeMatchers.push({matcher:m.matcher,type:a[d]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const a=r.injections;if(a)for(let l in a)uT(t,l,a[l],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(l=>{const u=this.getExternalGrammar(l);if(u){const d=u.injectionSelector;d&&uT(t,d,u,this,u)}})}return t.sort((a,s)=>a.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=dT(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=tD.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===tv.NULL){a=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),y=Ss.set(0,h.languageId,h.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),g=this.getRule(this._rootId).getName(null,null);let v;g?v=fc.createRootAndLookUpScopeName(g,y,this):v=fc.createRoot("unknown",y),t=new tv(null,this._rootId,-1,-1,!1,null,v,v)}else a=!1,t.reset();e=e+`
|
|
293
|
-
`;const s=this.createOnigString(e),l=s.content.length,u=new IY(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=rD(this,s,a,0,t,u,!0,r);return Qk(s),{lineLength:l,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function dT(e,t){return e=YW(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var fc=class Dr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,a=(t==null?void 0:t.scopePath)??null;for(const s of n)a=Pg.push(a,s.scopeNames),r=new Dr(r,a,s.encodedTokenAttributes);return r}static createRoot(t,n){return new Dr(null,new Pg(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const a=r.getMetadataForScope(t),s=new Pg(null,t),l=r.themeProvider.themeMatch(s),u=Dr.mergeAttributes(n,a,l);return new Dr(null,s,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Dr.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let a=-1,s=0,l=0;return r!==null&&(a=r.fontStyle,s=r.foregroundId,l=r.backgroundId),Ss.set(t,n.languageId,n.tokenType,null,a,s,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Dr._pushAttributed(this,t,n);const r=t.split(/ /g);let a=this;for(const s of r)a=Dr._pushAttributed(a,s,n);return a}static _pushAttributed(t,n,r){const a=r.getMetadataForScope(n),s=t.scopePath.push(n),l=r.themeProvider.themeMatch(s),u=Dr.mergeAttributes(t.tokenAttributes,a,l);return new Dr(t,s,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var a;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((a=r.parent)==null?void 0:a.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},ir,tv=(ir=class{constructor(t,n,r,a,s,l,u,d){ce(this,"_stackElementBrand");ce(this,"_enterPos");ce(this,"_anchorPos");ce(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=l,this.nameScopesList=u,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=a}equals(t){return t===null?!1:ir._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?fc.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ir._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,s,l,u){return new ir(this,t,n,r,a,s,l,u)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var r,a;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(a=this.contentNameScopesList)==null?void 0:a.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ir(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=fc.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new ir(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,fc.fromExtension(r,n.contentNameScopesList))}},ce(ir,"NULL",new ir(null,0,0,0,!1,null,null,null)),ir),DY=class{constructor(e,t){ce(this,"balancedBracketScopes");ce(this,"unbalancedBracketScopes");ce(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Df(n,jf).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Df(n,jf).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},IY=class{constructor(e,t,n,r){ce(this,"_emitBinaryTokens");ce(this,"_lineText");ce(this,"_tokens");ce(this,"_binaryTokens");ce(this,"_lastTokenEndIndex");ce(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let a=(e==null?void 0:e.tokenAttributes)??0,s=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=(e==null?void 0:e.getScopeNames())??[];for(const u of this._tokenTypeOverrides)u.matcher(l)&&(a=Ss.set(a,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(l))}if(s&&(a=Ss.set(a,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n}},LY=class{constructor(e,t){ce(this,"_grammars",new Map);ce(this,"_rawGrammars",new Map);ce(this,"_injectionGrammars",new Map);ce(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,NY(e,s,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},jY=class{constructor(t){ce(this,"_options");ce(this,"_syncRegistry");ce(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new LY(kf.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(kf.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new DY(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,a,s){const l=new uY(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(u=>this._loadSingleGrammar(u.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,a,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,a=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,a)}_grammarForScopeName(t,n=0,r=null,a=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,a,s)}},nv=tv.NULL;const MY=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class eu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}eu.prototype.normal={};eu.prototype.property={};eu.prototype.space=void 0;function aD(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new eu(n,r,t)}function rv(e){return e.toLowerCase()}class On{constructor(t,n){this.attribute=n,this.property=t}}On.prototype.attribute="";On.prototype.booleanish=!1;On.prototype.boolean=!1;On.prototype.commaOrSpaceSeparated=!1;On.prototype.commaSeparated=!1;On.prototype.defined=!1;On.prototype.mustUseProperty=!1;On.prototype.number=!1;On.prototype.overloadedBoolean=!1;On.prototype.property="";On.prototype.spaceSeparated=!1;On.prototype.space=void 0;let PY=0;const Ke=ho(),Pt=ho(),iv=ho(),ve=ho(),mt=ho(),ms=ho(),Pn=ho();function ho(){return 2**++PY}const av=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:Pt,commaOrSpaceSeparated:Pn,commaSeparated:ms,number:ve,overloadedBoolean:iv,spaceSeparated:mt},Symbol.toStringTag,{value:"Module"})),Vg=Object.keys(av);class Zb extends On{constructor(t,n,r,a){let s=-1;if(super(t,n),fT(this,"space",a),typeof r=="number")for(;++s<Vg.length;){const l=Vg[s];fT(this,Vg[s],(r&av[l])===av[l])}}}Zb.prototype.defined=!0;function fT(e,t,n){n&&(e[t]=n)}function Vs(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const s=new Zb(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[rv(r)]=r,n[rv(s.attribute)]=r}return new eu(t,n,e.space)}const oD=Vs({properties:{ariaActiveDescendant:null,ariaAtomic:Pt,ariaAutoComplete:null,ariaBusy:Pt,ariaChecked:Pt,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:mt,ariaCurrent:null,ariaDescribedBy:mt,ariaDetails:null,ariaDisabled:Pt,ariaDropEffect:mt,ariaErrorMessage:null,ariaExpanded:Pt,ariaFlowTo:mt,ariaGrabbed:Pt,ariaHasPopup:null,ariaHidden:Pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mt,ariaLevel:ve,ariaLive:null,ariaModal:Pt,ariaMultiLine:Pt,ariaMultiSelectable:Pt,ariaOrientation:null,ariaOwns:mt,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:Pt,ariaReadOnly:Pt,ariaRelevant:null,ariaRequired:Pt,ariaRoleDescription:mt,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:Pt,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function sD(e,t){return t in e?e[t]:t}function lD(e,t){return sD(e,t.toLowerCase())}const zY=Vs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ms,acceptCharset:mt,accessKey:mt,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:mt,autoFocus:Ke,autoPlay:Ke,blocking:mt,capture:null,charSet:null,checked:Ke,cite:null,className:mt,cols:ve,colSpan:null,content:null,contentEditable:Pt,controls:Ke,controlsList:mt,coords:ve|ms,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:iv,draggable:Pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:mt,height:ve,hidden:iv,high:ve,href:null,hrefLang:null,htmlFor:mt,httpEquiv:mt,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:mt,itemRef:mt,itemScope:Ke,itemType:mt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ke,optimum:ve,pattern:null,ping:mt,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:mt,required:Ke,reversed:Ke,rows:ve,rowSpan:ve,sandbox:mt,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:Pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:Pt,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mt,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:Pt,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ke,disableRemotePlayback:Ke,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:lD}),VY=Vs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pn,accentHeight:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,className:mt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ms,g2:ms,glyphName:ms,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ve,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:sD}),cD=Vs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),uD=Vs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lD}),dD=Vs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),BY=/[A-Z]/g,hT=/-[a-z]/g,UY=/^data[-\w.:]+$/i;function $Y(e,t){const n=rv(t);let r=t,a=On;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&UY.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(hT,FY);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!hT.test(s)){let l=s.replace(BY,HY);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=Zb}return new a(r,t)}function HY(e){return"-"+e.toLowerCase()}function FY(e){return e.charAt(1).toUpperCase()}const GY=aD([oD,zY,cD,uD,dD],"html"),fD=aD([oD,VY,cD,uD,dD],"svg"),mT={}.hasOwnProperty;function KY(e,t){const n=t||{};function r(a,...s){let l=r.invalid;const u=r.handlers;if(a&&mT.call(a,e)){const d=String(a[e]);l=mT.call(u,d)?u[d]:r.unknown}if(l)return l.call(this,a,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const ZY=/["&'<>`]/g,qY=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,WY=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,YY=/[|\\{}()[\]^$+*?.]/g,pT=new WeakMap;function XY(e,t){if(e=e.replace(t.subset?QY(t.subset):ZY,r),t.subset||t.escapeOnly)return e;return e.replace(qY,n).replace(WY,r);function n(a,s,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function r(a,s,l){return t.format(a.charCodeAt(0),l.charCodeAt(s+1),t)}}function QY(e){let t=pT.get(e);return t||(t=JY(e),pT.set(e,t)),t}function JY(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(YY,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const eX=/[\dA-Fa-f]/;function tX(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!eX.test(String.fromCharCode(t))?r:r+";"}const nX=/\d/;function rX(e,t,n){const r="&#"+String(e);return n&&t&&!nX.test(String.fromCharCode(t))?r:r+";"}const iX=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Bg={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},aX=["cent","copy","divide","gt","lt","not","para","times"],hD={}.hasOwnProperty,ov={};let Md;for(Md in Bg)hD.call(Bg,Md)&&(ov[Bg[Md]]=Md);const oX=/[^\dA-Za-z]/;function sX(e,t,n,r){const a=String.fromCharCode(e);if(hD.call(ov,a)){const s=ov[a],l="&"+s;return n&&iX.includes(s)&&!aX.includes(s)&&(!r||t&&t!==61&&oX.test(String.fromCharCode(t)))?l:l+";"}return""}function lX(e,t,n){let r=tX(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=sX(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const s=rX(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function ps(e,t){return XY(e,Object.assign({format:lX},t))}const cX=/^>|^->|<!--|-->|--!>|<!-$/g,uX=[">"],dX=["<",">"];function fX(e,t,n,r){return r.settings.bogusComments?"<?"+ps(e.value,Object.assign({},r.settings.characterReferences,{subset:uX}))+">":"<!--"+e.value.replace(cX,a)+"-->";function a(s){return ps(s,Object.assign({},r.settings.characterReferences,{subset:dX}))}}function hX(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function gT(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function mX(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function pX(e){return e.join(" ").trim()}const gX=/[ \t\n\f\r]/g;function qb(e){return typeof e=="object"?e.type==="text"?yT(e.value):!1:yT(e)}function yT(e){return e.replace(gX,"")===""}const Ft=pD(1),mD=pD(-1),yX=[];function pD(e){return t;function t(n,r,a){const s=n?n.children:yX;let l=(r||0)+e,u=s[l];if(!a)for(;u&&qb(u);)l+=e,u=s[l];return u}}const vX={}.hasOwnProperty;function gD(e){return t;function t(n,r,a){return vX.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const Wb=gD({body:_X,caption:Ug,colgroup:Ug,dd:AX,dt:SX,head:Ug,html:bX,li:EX,optgroup:wX,option:TX,p:xX,rp:vT,rt:vT,tbody:CX,td:bT,tfoot:NX,th:bT,thead:RX,tr:OX});function Ug(e,t,n){const r=Ft(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&qb(r.value.charAt(0)))}function bX(e,t,n){const r=Ft(n,t);return!r||r.type!=="comment"}function _X(e,t,n){const r=Ft(n,t);return!r||r.type!=="comment"}function xX(e,t,n){const r=Ft(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function EX(e,t,n){const r=Ft(n,t);return!r||r.type==="element"&&r.tagName==="li"}function SX(e,t,n){const r=Ft(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function AX(e,t,n){const r=Ft(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function vT(e,t,n){const r=Ft(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function wX(e,t,n){const r=Ft(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function TX(e,t,n){const r=Ft(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function RX(e,t,n){const r=Ft(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function CX(e,t,n){const r=Ft(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function NX(e,t,n){return!Ft(n,t)}function OX(e,t,n){const r=Ft(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function bT(e,t,n){const r=Ft(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const kX=gD({body:LX,colgroup:jX,head:IX,html:DX,tbody:MX});function DX(e){const t=Ft(e,-1);return!t||t.type!=="comment"}function IX(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function LX(e){const t=Ft(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&qb(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function jX(e,t,n){const r=mD(n,t),a=Ft(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Wb(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function MX(e,t,n){const r=mD(n,t),a=Ft(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Wb(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const Pd={name:[[`
|
|
294
|
-
\f\r &/=>`.split(""),`
|
|
295
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
296
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
297
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
298
|
-
\f\r &>`.split(""),`\0
|
|
299
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
300
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
301
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function PX(e,t,n,r){const a=r.schema,s=a.space==="svg"?!1:r.settings.omitOptionalTags;let l=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const u=[];let d;a.space==="html"&&e.tagName==="svg"&&(r.schema=fD);const h=zX(r,e.properties),m=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,m&&(l=!1),(h||!s||!kX(e,t,n))&&(u.push("<",e.tagName,h?" "+h:""),l&&(a.space==="svg"||r.settings.closeSelfClosing)&&(d=h.charAt(h.length-1),(!r.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(m),!l&&(!s||!Wb(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function zX(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const s=VX(e,a,t[a]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function VX(e,t,n){const r=$Y(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let l=e.quote,u;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const d=ps(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Pd.name[a][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?mX:pX)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(u=ps(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Pd.unquoted[a][s]}))),u!==n&&(e.settings.quoteSmart&&gT(n,l)>gT(n,e.alternative)&&(l=e.alternative),u=l+ps(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?Pd.single:Pd.double)[a][s],attribute:!0}))+l),d+(u&&"="+u))}const BX=["<","&"];function yD(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:ps(e.value,Object.assign({},r.settings.characterReferences,{subset:BX}))}function UX(e,t,n,r){return r.settings.allowDangerousHtml?e.value:yD(e,t,n,r)}function $X(e,t,n,r){return r.all(e)}const HX=KY("type",{invalid:FX,unknown:GX,handlers:{comment:fX,doctype:hX,element:PX,raw:UX,root:$X,text:yD}});function FX(e){throw new Error("Expected node, not `"+e+"`")}function GX(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const KX={},ZX={},qX=[];function WX(e,t){const n=t||KX,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:YX,all:XX,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||MY,characterReferences:n.characterReferences||ZX,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?fD:GY,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function YX(e,t,n){return HX(e,t,n,this)}function XX(e){const t=[],n=e&&e.children||qX;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Mf(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[a,s]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof s=="string"?n[a]=s:a===r&&Object.assign(n,s);return n}function Ya(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function QX(e){return Array.isArray(e)?e:[e]}async function vD(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Yb(e){return!e||["plaintext","txt","text","plain"].includes(e)}function bD(e){return e==="ansi"||Yb(e)}function Xb(e){return e==="none"}function _D(e){return Xb(e)}function xD(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const a of n)a&&!e.properties.class.includes(a)&&e.properties.class.push(a);return e}function xh(e,t=!1){var s;const n=e.split(/(\r?\n)/g);let r=0;const a=[];for(let l=0;l<n.length;l+=2){const u=t?n[l]+(n[l+1]||""):n[l];a.push([u,r]),r+=n[l].length,r+=((s=n[l+1])==null?void 0:s.length)||0}return a}function JX(e){const t=xh(e,!0).map(([a])=>a);function n(a){if(a===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=a,l=0;for(const u of t){if(s<u.length)break;s-=u.length,l++}return{line:l,character:s}}function r(a,s){let l=0;for(let u=0;u<a;u++)l+=t[u].length;return l+=s,l}return{lines:t,indexToPos:n,posToIndex:r}}function eQ(e,t,n){const r=new Set;for(const s of e.matchAll(/lang=["']([\w-]+)["']/g))r.add(s[1]);for(const s of e.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(s[1]);for(const s of e.matchAll(/\\begin\{([\w-]+)\}/g))r.add(s[1]);if(!n)return Array.from(r);const a=n.getBundledLanguages();return Array.from(r).filter(s=>s&&a[s])}function tQ(e,t){let n=0;const r=[];for(const a of t)a>n&&r.push({...e,content:e.content.slice(n,a),offset:e.offset+n}),n=a;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function nQ(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,a)=>r-a);return n.length?e.map(r=>r.flatMap(a=>{const s=n.filter(l=>a.offset<l&&l<a.offset+a.content.length).map(l=>l-a.offset).sort((l,u)=>l-u);return s.length?tQ(a,s):a})):e}function rQ(e,t,n,r){const a={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(d=>Pf(e.variants[d])),l=new Set(s.flatMap(d=>Object.keys(d))),u={};return s.forEach((d,h)=>{for(const m of l){const y=d[m]||"inherit";if(h===0&&r)u[m]=y;else{const g=m==="color"?"":m==="background-color"?"-bg":`-${m}`,v=n+t[h]+(m==="color"?"":g);u[v]=y}}}),a.htmlStyle=u,a}function Pf(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&pn.Italic&&(t["font-style"]="italic"),e.fontStyle&pn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&pn.Underline&&n.push("underline"),e.fontStyle&pn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function sv(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const ED=new WeakMap;function Eh(e,t){ED.set(e,t)}function Oc(e){return ED.get(e)}class Bs{constructor(...t){ce(this,"_stacks",{});ce(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,a]=t;this.lang=r,this._stacks={[a]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Bs(Object.fromEntries(QX(n).map(r=>[r,nv])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return iQ(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function iQ(e){const t=[],n=new Set;function r(a){var l;if(n.has(a))return;n.add(a);const s=(l=a==null?void 0:a.nameScopesList)==null?void 0:l.scopeName;s&&t.push(s),a.parent&&r(a.parent)}return r(e),t}function aQ(e,t){if(!(e instanceof Bs))throw new Xt("Invalid grammar state");return e.getInternalStack(t)}function oQ(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new Xt(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...a.indexToPos(l),offset:l}}else{const u=a.lines[l.line];if(u===void 0)throw new Xt(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${a.lines.length}`);if(l.character<0||l.character>u.length)throw new Xt(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${u.length}`);return{...l,offset:a.posToIndex(l.line,l.character)}}};const a=JX(n.source),s=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));sQ(s),e.set(n.meta,{decorations:s,converter:a,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var l;if(!((l=this.options.decorations)!=null&&l.length))return;const a=t(this).decorations.flatMap(u=>[u.start.offset,u.end.offset]);return nQ(n,a)},code(n){var m;if(!((m=this.options.decorations)!=null&&m.length))return;const r=t(this),a=Array.from(n.children).filter(y=>y.type==="element"&&y.tagName==="span");if(a.length!==r.converter.lines.length)throw new Xt(`Number of lines in code element (${a.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(y,g,v,_){const S=a[y];let A="",w=-1,T=-1;if(g===0&&(w=0),v===0&&(T=0),v===Number.POSITIVE_INFINITY&&(T=S.children.length),w===-1||T===-1)for(let k=0;k<S.children.length;k++)A+=SD(S.children[k]),w===-1&&A.length===g&&(w=k+1),T===-1&&A.length===v&&(T=k+1);if(w===-1)throw new Xt(`Failed to find start index for decoration ${JSON.stringify(_.start)}`);if(T===-1)throw new Xt(`Failed to find end index for decoration ${JSON.stringify(_.end)}`);const C=S.children.slice(w,T);if(!_.alwaysWrap&&C.length===S.children.length)u(S,_,"line");else if(!_.alwaysWrap&&C.length===1&&C[0].type==="element")u(C[0],_,"token");else{const k={type:"element",tagName:"span",properties:{},children:C};u(k,_,"wrapper"),S.children.splice(w,C.length,k)}}function l(y,g){a[y]=u(a[y],g,"line")}function u(y,g,v){var A;const _=g.properties||{},S=g.transform||(w=>w);return y.tagName=g.tagName||"span",y.properties={...y.properties,..._,class:y.properties.class},(A=g.properties)!=null&&A.class&&xD(y,g.properties.class),y=S(y,v)||y,y}const d=[],h=r.decorations.sort((y,g)=>g.start.offset-y.start.offset||y.end.offset-g.end.offset);for(const y of h){const{start:g,end:v}=y;if(g.line===v.line)s(g.line,g.character,v.character,y);else if(g.line<v.line){s(g.line,g.character,Number.POSITIVE_INFINITY,y);for(let _=g.line+1;_<v.line;_++)d.unshift(()=>l(_,y));s(v.line,0,v.character,y)}}d.forEach(y=>y())}}}function sQ(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Xt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const a=e[r],s=n.start.offset<=a.start.offset&&a.start.offset<n.end.offset,l=n.start.offset<a.end.offset&&a.end.offset<=n.end.offset,u=a.start.offset<=n.start.offset&&n.start.offset<a.end.offset,d=a.start.offset<n.end.offset&&n.end.offset<=a.end.offset;if(s||l||u||d){if(s&&l||u&&d)continue;throw new Xt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function SD(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(SD).join(""):""}const lQ=[oQ()];function zf(e){return[...e.transformers||[],...lQ]}var Xa=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],$g={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function cQ(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function _T(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function uQ(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)$g[r]&&t.push({type:"setDecoration",value:$g[r]});else if(r<=29){const a=$g[r-20];a&&(t.push({type:"resetDecoration",value:a}),a==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Xa[r-30]}});else if(r===38){const a=_T(e);a&&t.push({type:"setForegroundColor",value:a})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Xa[r-40]}});else if(r===48){const a=_T(e);a&&t.push({type:"setBackgroundColor",value:a})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Xa[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Xa[r-100+8]}})}return t}function dQ(){let e=null,t=null,n=new Set;return{parse(r){const a=[];let s=0;do{const l=cQ(r,s),u=l.sequence?r.substring(s,l.startPosition):r.substring(s);if(u.length>0&&a.push({value:u,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=uQ(l.sequence);for(const h of d)h.type==="resetAll"?(e=null,t=null,n.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of d)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&n.add(h.value)}s=l.position}while(s<r.length);return a}}}var fQ={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function hQ(e=fQ){function t(u){return e[u]}function n(u){return`#${u.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let r;function a(){if(r)return r;r=[];for(let h=0;h<Xa.length;h++)r.push(t(Xa[h]));let u=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let m=0;m<6;m++)for(let y=0;y<6;y++)r.push(n([u[h],u[m],u[y]]));let d=8;for(let h=0;h<24;h++,d+=10)r.push(n([d,d,d]));return r}function s(u){return a()[u]}function l(u){switch(u.type){case"named":return t(u.name);case"rgb":return n(u.rgb);case"table":return s(u.index)}}return{value:l}}function mQ(e,t,n){const r=Mf(e,n),a=xh(t),s=hQ(Object.fromEntries(Xa.map(u=>{var d;return[u,(d=e.colors)==null?void 0:d[`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`]]}))),l=dQ();return a.map(u=>l.parse(u[0]).map(d=>{let h,m;d.decorations.has("reverse")?(h=d.background?s.value(d.background):e.bg,m=d.foreground?s.value(d.foreground):e.fg):(h=d.foreground?s.value(d.foreground):e.fg,m=d.background?s.value(d.background):void 0),h=Ya(h,r),m=Ya(m,r),d.decorations.has("dim")&&(h=pQ(h));let y=pn.None;return d.decorations.has("bold")&&(y|=pn.Bold),d.decorations.has("italic")&&(y|=pn.Italic),d.decorations.has("underline")&&(y|=pn.Underline),d.decorations.has("strikethrough")&&(y|=pn.Strikethrough),{content:d.value,offset:u[1],color:h,bgColor:m,fontStyle:y}}))}function pQ(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){const r=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${r}`}else return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(r=>`${r}${r}`).join("")}80`;const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Qb(e,t,n={}){const{lang:r="text",theme:a=e.getLoadedThemes()[0]}=n;if(Yb(r)||Xb(a))return xh(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:s,colorMap:l}=e.setTheme(a);if(r==="ansi")return mQ(s,t,n);const u=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==u.name)throw new Xt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(s.name))throw new Xt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return yQ(t,u,s,l,n)}function gQ(...e){if(e.length===2)return Oc(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:s=t.getLoadedThemes()[0]}=r;if(Yb(a)||Xb(s))throw new Xt("Plain language does not have grammar state");if(a==="ansi")throw new Xt("ANSI language does not have grammar state");const{theme:l,colorMap:u}=t.setTheme(s),d=t.getLanguage(a);return new Bs(Vf(n,d,l,u,r).stateStack,d.name,l.name)}function yQ(e,t,n,r,a){const s=Vf(e,t,n,r,a),l=new Bs(Vf(e,t,n,r,a).stateStack,t.name,n.name);return Eh(s.tokens,l),s.tokens}function Vf(e,t,n,r,a){const s=Mf(n,a),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:u=500}=a,d=xh(e);let h=a.grammarState?aQ(a.grammarState,n.name)??nv:a.grammarContextCode!=null?Vf(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:nv,m=[];const y=[];for(let g=0,v=d.length;g<v;g++){const[_,S]=d[g];if(_===""){m=[],y.push([]);continue}if(l>0&&_.length>=l){m=[],y.push([{content:_,offset:S,color:"",fontStyle:0}]);continue}let A,w,T;a.includeExplanation&&(A=t.tokenizeLine(_,h,u),w=A.tokens,T=0);const C=t.tokenizeLine2(_,h,u),k=C.tokens.length/2;for(let N=0;N<k;N++){const L=C.tokens[2*N],D=N+1<k?C.tokens[2*N+2]:_.length;if(L===D)continue;const j=C.tokens[2*N+1],V=Ya(r[Ss.getForeground(j)],s),U=Ss.getFontStyle(j),ue={content:_.substring(L,D),offset:S+L,color:V,fontStyle:U};if(a.includeExplanation){const ie=[];if(a.includeExplanation!=="scopeName")for(const Y of n.settings){let ee;switch(typeof Y.scope){case"string":ee=Y.scope.split(/,/).map(H=>H.trim());break;case"object":ee=Y.scope;break;default:continue}ie.push({settings:Y,selectors:ee.map(H=>H.split(/ /))})}ue.explanation=[];let fe=0;for(;L+fe<D;){const Y=w[T],ee=_.substring(Y.startIndex,Y.endIndex);fe+=ee.length,ue.explanation.push({content:ee,scopes:a.includeExplanation==="scopeName"?vQ(Y.scopes):bQ(ie,Y.scopes)}),T+=1}}m.push(ue)}y.push(m),m=[],h=C.ruleStack}return{tokens:y,stateStack:h}}function vQ(e){return e.map(t=>({scopeName:t}))}function bQ(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const s=t[r];n[r]={scopeName:s,themeMatches:xQ(e,s,t.slice(0,r))}}return n}function xT(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function _Q(e,t,n){if(!xT(e[e.length-1],t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)xT(e[r],n[a])&&(r-=1),a-=1;return r===-1}function xQ(e,t,n){const r=[];for(const{selectors:a,settings:s}of e)for(const l of a)if(_Q(l,t,n)){r.push(s);break}return r}function AD(e,t,n){const r=Object.entries(n.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),a=r.map(d=>{const h=Qb(e,t,{...n,theme:d.theme}),m=Oc(h),y=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:h,state:m,theme:y}}),s=EQ(...a.map(d=>d.tokens)),l=s[0].map((d,h)=>d.map((m,y)=>{const g={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=m.explanation),s.forEach((v,_)=>{const{content:S,explanation:A,offset:w,...T}=v[h][y];g.variants[r[_].color]=T}),g})),u=a[0].state?new Bs(Object.fromEntries(a.map(d=>{var h;return[d.theme,(h=d.state)==null?void 0:h.getInternalStack(d.theme)]})),a[0].state.lang):void 0;return u&&Eh(l,u),l}function EQ(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const a=e.map(d=>d[r]),s=t.map(()=>[]);t.forEach((d,h)=>d.push(s[h]));const l=a.map(()=>0),u=a.map(d=>d[0]);for(;u.every(d=>d);){const d=Math.min(...u.map(h=>h.content.length));for(let h=0;h<n;h++){const m=u[h];m.content.length===d?(s[h].push(m),l[h]+=1,u[h]=a[h][l[h]]):(s[h].push({...m,content:m.content.slice(0,d)}),u[h]={...m,content:m.content.slice(d),offset:m.offset+d})}}}return t}function Bf(e,t,n){let r,a,s,l,u,d;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:m="--shiki-"}=n,y=Object.entries(n.themes).filter(A=>A[1]).map(A=>({color:A[0],theme:A[1]})).sort((A,w)=>A.color===h?-1:w.color===h?1:0);if(y.length===0)throw new Xt("`themes` option must not be empty");const g=AD(e,t,n);if(d=Oc(g),h&&!y.find(A=>A.color===h))throw new Xt(`\`themes\` option must contain the defaultColor key \`${h}\``);const v=y.map(A=>e.getTheme(A.theme)),_=y.map(A=>A.color);s=g.map(A=>A.map(w=>rQ(w,_,m,h))),d&&Eh(s,d);const S=y.map(A=>Mf(A.theme,n));a=y.map((A,w)=>(w===0&&h?"":`${m+A.color}:`)+(Ya(v[w].fg,S[w])||"inherit")).join(";"),r=y.map((A,w)=>(w===0&&h?"":`${m+A.color}-bg:`)+(Ya(v[w].bg,S[w])||"inherit")).join(";"),l=`shiki-themes ${v.map(A=>A.name).join(" ")}`,u=h?void 0:[a,r].join(";")}else if("theme"in n){const h=Mf(n.theme,n);s=Qb(e,t,n);const m=e.getTheme(n.theme);r=Ya(m.bg,h),a=Ya(m.fg,h),l=m.name,d=Oc(s)}else throw new Xt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:a,bg:r,themeName:l,rootStyle:u,grammarState:d}}function Uf(e,t,n,r={meta:{},options:n,codeToHast:(a,s)=>Uf(e,a,s),codeToTokens:(a,s)=>Bf(e,a,s)}){var _,S;let a=t;for(const A of zf(n))a=((_=A.preprocess)==null?void 0:_.call(r,a,n))||a;let{tokens:s,fg:l,bg:u,themeName:d,rootStyle:h,grammarState:m}=Bf(e,a,n);const{mergeWhitespaces:y=!0,mergeSameStyleTokens:g=!1}=n;y===!0?s=AQ(s):y==="never"&&(s=wQ(s)),g&&(s=TQ(s));const v={...r,get source(){return a}};for(const A of zf(n))s=((S=A.tokens)==null?void 0:S.call(v,s))||s;return SQ(s,{...n,fg:l,bg:u,themeName:d,rootStyle:h},v,m)}function SQ(e,t,n,r=Oc(e)){var _,S,A;const a=zf(t),s=[],l={type:"root",children:[]},{structure:u="classic",tabindex:d="0"}=t;let h={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...d!==!1&&d!=null?{tabindex:d.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([w])=>!w.startsWith("_")))},children:[]},m={type:"element",tagName:"code",properties:{},children:s};const y=[],g={...n,structure:u,addClassToHast:xD,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return h},get code(){return m},get lines(){return y}};if(e.forEach((w,T)=>{var N,L;T&&(u==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&s.push({type:"text",value:`
|
|
302
|
-
`}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},k=0;for(const D of w){let j={type:"element",tagName:"span",properties:{...D.htmlAttrs},children:[{type:"text",value:D.content}]};const V=sv(D.htmlStyle||Pf(D));V&&(j.properties.style=V);for(const U of a)j=((N=U==null?void 0:U.span)==null?void 0:N.call(g,j,T+1,k,C,D))||j;u==="inline"?l.children.push(j):u==="classic"&&C.children.push(j),k+=D.content.length}if(u==="classic"){for(const D of a)C=((L=D==null?void 0:D.line)==null?void 0:L.call(g,C,T+1))||C;y.push(C),s.push(C)}}),u==="classic"){for(const w of a)m=((_=w==null?void 0:w.code)==null?void 0:_.call(g,m))||m;h.children.push(m);for(const w of a)h=((S=w==null?void 0:w.pre)==null?void 0:S.call(g,h))||h;l.children.push(h)}let v=l;for(const w of a)v=((A=w==null?void 0:w.root)==null?void 0:A.call(g,v))||v;return r&&Eh(v,r),v}function AQ(e){return e.map(t=>{const n=[];let r="",a=0;return t.forEach((s,l)=>{const d=!(s.fontStyle&&(s.fontStyle&pn.Underline||s.fontStyle&pn.Strikethrough));d&&s.content.match(/^\s+$/)&&t[l+1]?(a||(a=s.offset),r+=s.content):r?(d?n.push({...s,offset:a,content:r+s.content}):n.push({content:r,offset:a},s),a=0,r=""):n.push(s)}),n})}function wQ(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,a,s,l]=r;if(!a&&!l)return n;const u=[{...n,offset:n.offset+a.length,content:s}];return a&&u.unshift({content:a,offset:n.offset}),l&&u.push({content:l,offset:n.offset+a.length+s.length}),u}))}function TQ(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const a=n[n.length-1],s=a.htmlStyle||sv(Pf(a)),l=r.htmlStyle||sv(Pf(r)),u=a.fontStyle&&(a.fontStyle&pn.Underline||a.fontStyle&pn.Strikethrough),d=r.fontStyle&&(r.fontStyle&pn.Underline||r.fontStyle&pn.Strikethrough);!u&&!d&&s===l?a.content+=r.content:n.push({...r})}return n})}const RQ=WX;function CQ(e,t,n){var s;const r={meta:{},options:n,codeToHast:(l,u)=>Uf(e,l,u),codeToTokens:(l,u)=>Bf(e,l,u)};let a=RQ(Uf(e,t,n,r));for(const l of zf(n))a=((s=l.postprocess)==null?void 0:s.call(r,a,n))||a;return a}const ET={light:"#333333",dark:"#bbbbbb"},ST={light:"#fffffe",dark:"#1e1e1e"},AT="__shiki_resolved";function Jb(e){var u,d,h,m,y;if(e!=null&&e[AT])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const g=t.settings?t.settings.find(v=>!v.name&&!v.scope):void 0;(u=g==null?void 0:g.settings)!=null&&u.foreground&&(r=g.settings.foreground),(d=g==null?void 0:g.settings)!=null&&d.background&&(n=g.settings.background),!r&&((h=t==null?void 0:t.colors)!=null&&h["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((m=t==null?void 0:t.colors)!=null&&m["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?ET.light:ET.dark),n||(n=t.type==="light"?ST.light:ST.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0;const s=new Map;function l(g){var _;if(s.has(g))return s.get(g);a+=1;const v=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return(_=t.colorReplacements)!=null&&_[`#${v}`]?l(g):(s.set(g,v),v)}t.settings=t.settings.map(g=>{var A,w;const v=((A=g.settings)==null?void 0:A.foreground)&&!g.settings.foreground.startsWith("#"),_=((w=g.settings)==null?void 0:w.background)&&!g.settings.background.startsWith("#");if(!v&&!_)return g;const S={...g,settings:{...g.settings}};if(v){const T=l(g.settings.foreground);t.colorReplacements[T]=g.settings.foreground,S.settings.foreground=T}if(_){const T=l(g.settings.background);t.colorReplacements[T]=g.settings.background,S.settings.background=T}return S});for(const g of Object.keys(t.colors||{}))if((g==="editor.foreground"||g==="editor.background"||g.startsWith("terminal.ansi"))&&!((y=t.colors[g])!=null&&y.startsWith("#"))){const v=l(t.colors[g]);t.colorReplacements[v]=t.colors[g],t.colors[g]=v}return Object.defineProperty(t,AT,{enumerable:!1,writable:!1,value:!0}),t}async function wD(e){return Array.from(new Set((await Promise.all(e.filter(t=>!bD(t)).map(async t=>await vD(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function TD(e){return(await Promise.all(e.map(async n=>_D(n)?null:Jb(await vD(n))))).filter(n=>!!n)}let NQ=3;function OQ(e,t=3){t>NQ||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let us=class extends Error{constructor(t){super(t),this.name="ShikiError"}};class kQ extends jY{constructor(n,r,a,s={}){super(n);ce(this,"_resolvedThemes",new Map);ce(this,"_resolvedGrammars",new Map);ce(this,"_langMap",new Map);ce(this,"_langGraph",new Map);ce(this,"_textmateThemeCache",new WeakMap);ce(this,"_loadedThemesCache",null);ce(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=a,this._alias=s,this._themes.map(l=>this.loadTheme(l)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=Jb(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=kf.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){if(this._alias[n]){const r=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],r.has(n))throw new us(`Circular alias \`${Array.from(r).join(" -> ")} -> ${n}\``);r.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){var l,u,d,h;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(m=>{var y;return(y=m.embeddedLangsLazy)==null?void 0:y.includes(n.name)}));this._resolver.addLanguage(n);const a={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const s=this.loadGrammarWithConfiguration(n.scopeName,1,a);if(s.name=n.name,this._resolvedGrammars.set(n.name,s),n.aliases&&n.aliases.forEach(m=>{this._alias[m]=n.name}),this._loadedLanguagesCache=null,r.size)for(const m of r)this._resolvedGrammars.delete(m.name),this._loadedLanguagesCache=null,(u=(l=this._syncRegistry)==null?void 0:l._injectionGrammars)==null||u.delete(m.scopeName),(h=(d=this._syncRegistry)==null?void 0:d._grammars)==null||h.delete(m.scopeName),this.loadLanguage(this._langMap.get(m.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const s of n)this.resolveEmbeddedLanguages(s);const r=Array.from(this._langGraph.entries()),a=r.filter(([s,l])=>!l);if(a.length){const s=r.filter(([l,u])=>{var d;return u&&((d=u.embeddedLangs)==null?void 0:d.some(h=>a.map(([m])=>m).includes(h)))}).filter(l=>!a.includes(l));throw new us(`Missing languages ${a.map(([l])=>`\`${l}\``).join(", ")}, required by ${s.map(([l])=>`\`${l}\``).join(", ")}`)}for(const[s,l]of r)this._resolver.addLanguage(l);for(const[s,l]of r)this.loadLanguage(l)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){if(this._langMap.set(n.name,n),this._langGraph.set(n.name,n),n.embeddedLangs)for(const r of n.embeddedLangs)this._langGraph.set(r,this._langMap.get(r))}}class DQ{constructor(t,n){ce(this,"_langs",new Map);ce(this,"_scopeToLang",new Map);ce(this,"_injections",new Map);ce(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let a=1;a<=n.length;a++){const s=n.slice(0,a).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let Yl=0;function IQ(e){Yl+=1,e.warnings!==!1&&Yl>=10&&Yl%10===0&&console.warn(`[Shiki] ${Yl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new us("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Jb),a=new DQ(e.engine,n),s=new kQ(a,r,n,e.langAlias);let l;function u(T){A();const C=s.getGrammar(typeof T=="string"?T:T.name);if(!C)throw new us(`Language \`${T}\` not found, you may need to load it first`);return C}function d(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};A();const C=s.getTheme(T);if(!C)throw new us(`Theme \`${T}\` not found, you may need to load it first`);return C}function h(T){A();const C=d(T);l!==T&&(s.setTheme(C),l=T);const k=s.getColorMap();return{theme:C,colorMap:k}}function m(){return A(),s.getLoadedThemes()}function y(){return A(),s.getLoadedLanguages()}function g(...T){A(),s.loadLanguages(T.flat(1))}async function v(...T){return g(await wD(T))}function _(...T){A();for(const C of T.flat(1))s.loadTheme(C)}async function S(...T){return A(),_(await TD(T))}function A(){if(t)throw new us("Shiki instance has been disposed")}function w(){t||(t=!0,s.dispose(),Yl-=1)}return{setTheme:h,getTheme:d,getLanguage:u,getLoadedThemes:m,getLoadedLanguages:y,loadLanguage:v,loadLanguageSync:g,loadTheme:S,loadThemeSync:_,dispose:w,[Symbol.dispose]:w}}async function LQ(e){e.engine||OQ("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([TD(e.themes||[]),wD(e.langs||[]),e.engine]);return IQ({...e,themes:t,langs:n,engine:r})}async function jQ(e){const t=await LQ(e);return{getLastGrammarState:(...n)=>gQ(t,...n),codeToTokensBase:(n,r)=>Qb(t,n,r),codeToTokensWithThemes:(n,r)=>AD(t,n,r),codeToTokens:(n,r)=>Bf(t,n,r),codeToHast:(n,r)=>Uf(t,n,r),codeToHtml:(n,r)=>CQ(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function MQ(e){const t=e.langs,n=e.themes,r=e.engine;async function a(s){function l(y){if(typeof y=="string"){if(bD(y))return[];const g=t[y];if(!g)throw new Xt(`Language \`${y}\` is not included in this bundle. You may want to load it from external source.`);return g}return y}function u(y){if(_D(y))return"none";if(typeof y=="string"){const g=n[y];if(!g)throw new Xt(`Theme \`${y}\` is not included in this bundle. You may want to load it from external source.`);return g}return y}const d=(s.themes??[]).map(y=>u(y)),h=(s.langs??[]).map(y=>l(y)),m=await jQ({engine:s.engine??r(),...s,themes:d,langs:h});return{...m,loadLanguage(...y){return m.loadLanguage(...y.map(l))},loadTheme(...y){return m.loadTheme(...y.map(u))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return a}function PQ(e){let t;async function n(r={}){if(t){const a=await t;return await Promise.all([a.loadTheme(...r.themes||[]),a.loadLanguage(...r.langs||[])]),a}else return t=e({...r,themes:r.themes||[],langs:r.langs||[]}),t}return n}function zQ(e,t){const n=PQ(e);async function r(a,s){var d;const l=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),u=await((d=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:d.call(t,a,s.lang,l));return u&&await l.loadLanguage(...u),l}return{getSingletonHighlighter(a){return n(a)},async codeToHtml(a,s){return(await r(a,s)).codeToHtml(a,s)},async codeToHast(a,s){return(await r(a,s)).codeToHast(a,s)},async codeToTokens(a,s){return(await r(a,s)).codeToTokens(a,s)},async codeToTokensBase(a,s){return(await r(a,s)).codeToTokensBase(a,s)},async codeToTokensWithThemes(a,s){return(await r(a,s)).codeToTokensWithThemes(a,s)},async getLastGrammarState(a,s){return(await n({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(a,s)}}}const RD=[{id:"abap",name:"ABAP",import:()=>I(()=>import("./abap-BdImnpbu.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>I(()=>import("./actionscript-3-CfeIJUat.js"),[])},{id:"ada",name:"Ada",import:()=>I(()=>import("./ada-bCR0ucgS.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>I(()=>import("./angular-html-Bbf3ZyxA.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>I(()=>import("./angular-ts-C26w9mnW.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>I(()=>import("./apache-Pmp26Uib.js"),[])},{id:"apex",name:"Apex",import:()=>I(()=>import("./apex-QX45V2Sx.js"),[])},{id:"apl",name:"APL",import:()=>I(()=>import("./apl-e980N3t4.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>I(()=>import("./applescript-Co6uUVPk.js"),[])},{id:"ara",name:"Ara",import:()=>I(()=>import("./ara-BRHolxvo.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>I(()=>import("./asciidoc-CdggvHu8.js"),[])},{id:"asm",name:"Assembly",import:()=>I(()=>import("./asm-D_Q5rh1f.js"),[])},{id:"astro",name:"Astro",import:()=>I(()=>import("./astro-DAp1zUbp.js"),__vite__mapDeps([10,9,2,11,3,12]))},{id:"awk",name:"AWK",import:()=>I(()=>import("./awk-DMzUqQB5.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>I(()=>import("./ballerina-BFfxhgS-.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>I(()=>import("./bat-BkioyH1T.js"),[])},{id:"beancount",name:"Beancount",import:()=>I(()=>import("./beancount-BoKiGodi.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>I(()=>import("./berry-D08WgyRC.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>I(()=>import("./bibtex-CHM0blh-.js"),[])},{id:"bicep",name:"Bicep",import:()=>I(()=>import("./bicep-6nHXG8SA.js"),[])},{id:"blade",name:"Blade",import:()=>I(()=>import("./blade-DGJDb2eD.js"),__vite__mapDeps([13,14,1,2,3,7,8,15,9]))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>I(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([16,17]))},{id:"c",name:"C",import:()=>I(()=>import("./c-BIGW1oBm.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>I(()=>import("./cadence-D2CYqzqI.js"),[])},{id:"cairo",name:"Cairo",import:()=>I(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([18,19]))},{id:"clarity",name:"Clarity",import:()=>I(()=>import("./clarity-CHh-QcGE.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>I(()=>import("./clojure-P80f7IUj.js"),[])},{id:"cmake",name:"CMake",import:()=>I(()=>import("./cmake-D1j8_8rp.js"),[])},{id:"cobol",name:"COBOL",import:()=>I(()=>import("./cobol-CCPHrsME.js"),__vite__mapDeps([20,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>I(()=>import("./codeowners-Bp6g37R7.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>I(()=>import("./codeql-DsOJ9woJ.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>I(()=>import("./coffee-JUOWOZUj.js"),__vite__mapDeps([21,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>I(()=>import("./common-lisp-Cg-RD9OK.js"),[])},{id:"coq",name:"Coq",import:()=>I(()=>import("./coq-CMdgaOU9.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>I(()=>import("./cpp-ChttZZSa.js"),__vite__mapDeps([22,23,24,25,15]))},{id:"crystal",name:"Crystal",import:()=>I(()=>import("./crystal-CfkhwHAQ.js"),__vite__mapDeps([26,1,2,3,15,25,27]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>I(()=>import("./csharp-CHadp7IV.js"),[])},{id:"css",name:"CSS",import:()=>I(()=>import("./css-DPfMkruS.js"),[])},{id:"csv",name:"CSV",import:()=>I(()=>import("./csv-fuZLfV_i.js"),[])},{id:"cue",name:"CUE",import:()=>I(()=>import("./cue-D82EKSYY.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>I(()=>import("./cypher-COkxafJQ.js"),[])},{id:"d",name:"D",import:()=>I(()=>import("./d-85-TOEBH.js"),[])},{id:"dart",name:"Dart",import:()=>I(()=>import("./dart-CF10PKvl.js"),[])},{id:"dax",name:"DAX",import:()=>I(()=>import("./dax-CEL-wOlO.js"),[])},{id:"desktop",name:"Desktop",import:()=>I(()=>import("./desktop-BmXAJ9_W.js"),[])},{id:"diff",name:"Diff",import:()=>I(()=>import("./diff-D97Zzqfu.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>I(()=>import("./docker-BcOcwvcX.js"),[])},{id:"dotenv",name:"dotEnv",import:()=>I(()=>import("./dotenv-Da5cRb03.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>I(()=>import("./dream-maker-BtqSS_iP.js"),[])},{id:"edge",name:"Edge",import:()=>I(()=>import("./edge-CKszZCnI.js"),__vite__mapDeps([28,11,1,2,3,14]))},{id:"elixir",name:"Elixir",import:()=>I(()=>import("./elixir-Cc7HHYVZ.js"),__vite__mapDeps([29,1,2,3]))},{id:"elm",name:"Elm",import:()=>I(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([30,24,25]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>I(()=>import("./emacs-lisp-C9XAeP06.js"),[])},{id:"erb",name:"ERB",import:()=>I(()=>import("./erb-D3EuUlpm.js"),__vite__mapDeps([31,1,2,3,32,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>I(()=>import("./erlang-DpOm0zC4.js"),[])},{id:"fennel",name:"Fennel",import:()=>I(()=>import("./fennel-BYunw83y.js"),[])},{id:"fish",name:"Fish",import:()=>I(()=>import("./fish-Bl2oy6fF.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>I(()=>import("./fluent-C4IJs8-o.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>I(()=>import("./fortran-fixed-form-BZjJHVRy.js"),__vite__mapDeps([39,40]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>I(()=>import("./fortran-free-form-D22FLkUw.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>I(()=>import("./fsharp-DQy8In2x.js"),__vite__mapDeps([41,42]))},{id:"gdresource",name:"GDResource",import:()=>I(()=>import("./gdresource-BSDf9Pz1.js"),__vite__mapDeps([43,44,45]))},{id:"gdscript",name:"GDScript",import:()=>I(()=>import("./gdscript-Bty6elJm.js"),[])},{id:"gdshader",name:"GDShader",import:()=>I(()=>import("./gdshader-DkwncUOv.js"),[])},{id:"genie",name:"Genie",import:()=>I(()=>import("./genie-D0YGMca9.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>I(()=>import("./gherkin-DyxjwDmM.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>I(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([46,47]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>I(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([48,27]))},{id:"gleam",name:"Gleam",import:()=>I(()=>import("./gleam-BspZqrRM.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>I(()=>import("./glimmer-js-Dz9X99Cm.js"),__vite__mapDeps([49,2,11,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>I(()=>import("./glimmer-ts-aQ3p29eY.js"),__vite__mapDeps([50,11,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>I(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([24,25]))},{id:"gnuplot",name:"Gnuplot",import:()=>I(()=>import("./gnuplot-DdkO51Og.js"),[])},{id:"go",name:"Go",import:()=>I(()=>import("./go-PEFJdsE-.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>I(()=>import("./graphql-Caa12_AY.js"),__vite__mapDeps([34,2,11,35,36]))},{id:"groovy",name:"Groovy",import:()=>I(()=>import("./groovy-gcz8RCvz.js"),[])},{id:"hack",name:"Hack",import:()=>I(()=>import("./hack-C1oSbnf3.js"),__vite__mapDeps([51,1,2,3,15]))},{id:"haml",name:"Ruby Haml",import:()=>I(()=>import("./haml-AZXGPtNI.js"),__vite__mapDeps([33,2,3]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>I(()=>import("./handlebars-YebKLiTq.js"),__vite__mapDeps([52,1,2,3,38]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>I(()=>import("./haskell-Df6bDoY_.js"),[])},{id:"haxe",name:"Haxe",import:()=>I(()=>import("./haxe-BP3HzMA6.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>I(()=>import("./hcl-BWvSN4gD.js"),[])},{id:"hjson",name:"Hjson",import:()=>I(()=>import("./hjson-D5-asLiD.js"),[])},{id:"hlsl",name:"HLSL",import:()=>I(()=>import("./hlsl-D3lLCCz7.js"),[])},{id:"html",name:"HTML",import:()=>I(()=>import("./html-B8pBdPMQ.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>I(()=>import("./html-derivative-ZQ8onl8Z.js"),__vite__mapDeps([14,1,2,3]))},{id:"http",name:"HTTP",import:()=>I(()=>import("./http-C38VWM-o.js"),__vite__mapDeps([53,27,9,7,8,34,2,11,35,36]))},{id:"hxml",name:"HXML",import:()=>I(()=>import("./hxml-B2Z6b3nn.js"),__vite__mapDeps([54,55]))},{id:"hy",name:"Hy",import:()=>I(()=>import("./hy-DFXneXwc.js"),[])},{id:"imba",name:"Imba",import:()=>I(()=>import("./imba-DGztddWO.js"),[])},{id:"ini",name:"INI",aliases:["properties"],import:()=>I(()=>import("./ini-BEwlwnbL.js"),[])},{id:"java",name:"Java",import:()=>I(()=>import("./java-CylS5w8V.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>I(()=>import("./javascript-BMMyXqK5.js"),[])},{id:"jinja",name:"Jinja",import:()=>I(()=>import("./jinja-BJmZiE_F.js"),__vite__mapDeps([56,1,2,3]))},{id:"jison",name:"Jison",import:()=>I(()=>import("./jison-BCRtk9Os.js"),__vite__mapDeps([57,2]))},{id:"json",name:"JSON",import:()=>I(()=>import("./json-Cp-IABpG.js"),[])},{id:"json5",name:"JSON5",import:()=>I(()=>import("./json5-C9tS-k6U.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>I(()=>import("./jsonc-Des-eS-w.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>I(()=>import("./jsonl-DcaNXYhu.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>I(()=>import("./jsonnet-DFQXde-d.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>I(()=>import("./jssm-C2t-YnRu.js"),[])},{id:"jsx",name:"JSX",import:()=>I(()=>import("./jsx-g9-lgVsj.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>I(()=>import("./julia-Db79kMu7.js"),__vite__mapDeps([58,22,23,24,25,15,19,2,59]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>I(()=>import("./kotlin-BdnUsdx6.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>I(()=>import("./kusto-BvAqAH-y.js"),[])},{id:"latex",name:"LaTeX",import:()=>I(()=>import("./latex-okZ41ve_.js"),__vite__mapDeps([60,61,59]))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>I(()=>import("./lean-c1G5yEKj.js"),[])},{id:"less",name:"Less",import:()=>I(()=>import("./less-B1dDrJ26.js"),[])},{id:"liquid",name:"Liquid",import:()=>I(()=>import("./liquid-C1lUkxsO.js"),__vite__mapDeps([62,1,2,3,9]))},{id:"llvm",name:"LLVM IR",import:()=>I(()=>import("./llvm-D32k8WzR.js"),[])},{id:"log",name:"Log file",import:()=>I(()=>import("./log-BFvZA1X9.js"),[])},{id:"logo",name:"Logo",import:()=>I(()=>import("./logo-BtOb2qkB.js"),[])},{id:"lua",name:"Lua",import:()=>I(()=>import("./lua-BbnMAYS6.js"),__vite__mapDeps([37,25]))},{id:"luau",name:"Luau",import:()=>I(()=>import("./luau-irsrSlf-.js"),[])},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>I(()=>import("./make-CHLpvVh8.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>I(()=>import("./markdown-RrBGtqGR.js"),[])},{id:"marko",name:"Marko",import:()=>I(()=>import("./marko-C0z8HR23.js"),__vite__mapDeps([63,3,64,5,2]))},{id:"matlab",name:"MATLAB",import:()=>I(()=>import("./matlab-D7o27uSR.js"),[])},{id:"mdc",name:"MDC",import:()=>I(()=>import("./mdc-02rxpBA4.js"),__vite__mapDeps([65,42,38,14,1,2,3]))},{id:"mdx",name:"MDX",import:()=>I(()=>import("./mdx-Cmh6b_Ma.js"),[])},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>I(()=>import("./mermaid-DfEE3Bzs.js"),[])},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>I(()=>import("./mipsasm-CKIfxQSi.js"),[])},{id:"mojo",name:"Mojo",import:()=>I(()=>import("./mojo-1DNp92w6.js"),[])},{id:"move",name:"Move",import:()=>I(()=>import("./move-BkPM1oy1.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>I(()=>import("./narrat-DRg8JJMk.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>I(()=>import("./nextflow-Bk5OV074.js"),[])},{id:"nginx",name:"Nginx",import:()=>I(()=>import("./nginx-DknmC5AR.js"),__vite__mapDeps([66,37,25]))},{id:"nim",name:"Nim",import:()=>I(()=>import("./nim-ANgMEeb1.js"),__vite__mapDeps([67,25,1,2,3,7,8,24,42]))},{id:"nix",name:"Nix",import:()=>I(()=>import("./nix-BepWV7mh.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>I(()=>import("./nushell-I3RK9BU8.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>I(()=>import("./objective-c-DXmwc3jG.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>I(()=>import("./objective-cpp-CLxacb5B.js"),[])},{id:"ocaml",name:"OCaml",import:()=>I(()=>import("./ocaml-C0hk2d4L.js"),[])},{id:"pascal",name:"Pascal",import:()=>I(()=>import("./pascal-D93ZcfNL.js"),[])},{id:"perl",name:"Perl",import:()=>I(()=>import("./perl-EWVMYlR0.js"),__vite__mapDeps([68,1,2,3,7,8,15]))},{id:"php",name:"PHP",import:()=>I(()=>import("./php-9PMsNEzE.js"),__vite__mapDeps([69,1,2,3,7,8,15,9]))},{id:"plsql",name:"PL/SQL",import:()=>I(()=>import("./plsql-ChMvpjG-.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>I(()=>import("./po-BTJTHyun.js"),[])},{id:"polar",name:"Polar",import:()=>I(()=>import("./polar-C0HS_06l.js"),[])},{id:"postcss",name:"PostCSS",import:()=>I(()=>import("./postcss-CXtECtnM.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>I(()=>import("./powerquery-CEu0bR-o.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>I(()=>import("./powershell-Dpen1YoG.js"),[])},{id:"prisma",name:"Prisma",import:()=>I(()=>import("./prisma-Dd19v3D-.js"),[])},{id:"prolog",name:"Prolog",import:()=>I(()=>import("./prolog-CbFg5uaA.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>I(()=>import("./proto-DyJlTyXw.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>I(()=>import("./pug-Ch9lOoSd.js"),__vite__mapDeps([70,2,3,1]))},{id:"puppet",name:"Puppet",import:()=>I(()=>import("./puppet-BMWR74SV.js"),[])},{id:"purescript",name:"PureScript",import:()=>I(()=>import("./purescript-CtrldY6v.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>I(()=>import("./python-B6aJPvgy.js"),[])},{id:"qml",name:"QML",import:()=>I(()=>import("./qml-CHzV51_b.js"),__vite__mapDeps([71,2]))},{id:"qmldir",name:"QML Directory",import:()=>I(()=>import("./qmldir-C8lEn-DE.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>I(()=>import("./qss-IeuSbFQv.js"),[])},{id:"r",name:"R",import:()=>I(()=>import("./r-C2tOF0e5.js"),[])},{id:"racket",name:"Racket",import:()=>I(()=>import("./racket-BqYA7rlc.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>I(()=>import("./raku-DXvB9xmW.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>I(()=>import("./razor-CNXmhs1n.js"),__vite__mapDeps([72,1,2,3,73]))},{id:"reg",name:"Windows Registry Script",import:()=>I(()=>import("./reg-C-SQnVFl.js"),[])},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>I(()=>import("./regexp-CDVJQ6XC.js"),[])},{id:"rel",name:"Rel",import:()=>I(()=>import("./rel-C3B-1QV4.js"),[])},{id:"riscv",name:"RISC-V",import:()=>I(()=>import("./riscv-BM1_JUlF.js"),[])},{id:"rst",name:"reStructuredText",import:()=>I(()=>import("./rst-DHpKpUMA.js"),__vite__mapDeps([74,14,1,2,3,22,23,24,25,15,19,27,38,75,32,33,7,8,34,11,35,36,37]))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>I(()=>import("./ruby-C5MNRm7z.js"),__vite__mapDeps([32,1,2,3,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>I(()=>import("./rust-B1yitclQ.js"),[])},{id:"sas",name:"SAS",import:()=>I(()=>import("./sas-Dlf3BogE.js"),__vite__mapDeps([76,15]))},{id:"sass",name:"Sass",import:()=>I(()=>import("./sass-Cj5Yp3dK.js"),[])},{id:"scala",name:"Scala",import:()=>I(()=>import("./scala-C151Ov-r.js"),[])},{id:"scheme",name:"Scheme",import:()=>I(()=>import("./scheme-C98Dy4si.js"),[])},{id:"scss",name:"SCSS",import:()=>I(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3]))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>I(()=>import("./sdbl-DVxCFoDh.js"),[])},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>I(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([77,78]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>I(()=>import("./shellscript-Yzrsuije.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>I(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([79,27]))},{id:"smalltalk",name:"Smalltalk",import:()=>I(()=>import("./smalltalk-BERRCDM3.js"),[])},{id:"solidity",name:"Solidity",import:()=>I(()=>import("./solidity-BbcW6ACK.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>I(()=>import("./soy-B_7ge1HE.js"),__vite__mapDeps([80,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>I(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([81,82]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>I(()=>import("./splunk-BtCnVYZw.js"),[])},{id:"sql",name:"SQL",import:()=>I(()=>import("./sql-B9xm8XSJ.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>I(()=>import("./ssh-config-_ykCGR6B.js"),[])},{id:"stata",name:"Stata",import:()=>I(()=>import("./stata-C5TGba-T.js"),__vite__mapDeps([83,15]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>I(()=>import("./stylus-BEDo0Tqx.js"),[])},{id:"svelte",name:"Svelte",import:()=>I(()=>import("./svelte-CXAE1zBs.js"),__vite__mapDeps([84,2,11,3,12]))},{id:"swift",name:"Swift",import:()=>I(()=>import("./swift-fve9TYiY.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>I(()=>import("./system-verilog-CnnmHF94.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>I(()=>import("./systemd-4A_iFExJ.js"),[])},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>I(()=>import("./talonscript-CkByrt1z.js"),[])},{id:"tasl",name:"Tasl",import:()=>I(()=>import("./tasl-QIJgUcNo.js"),[])},{id:"tcl",name:"Tcl",import:()=>I(()=>import("./tcl-dwOrl1Do.js"),[])},{id:"templ",name:"Templ",import:()=>I(()=>import("./templ-kZcegUSt.js"),__vite__mapDeps([85,86,2,3]))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>I(()=>import("./terraform-BETggiCN.js"),[])},{id:"tex",name:"TeX",import:()=>I(()=>import("./tex-mQPFytnq.js"),__vite__mapDeps([61,59]))},{id:"toml",name:"TOML",import:()=>I(()=>import("./toml-vGWfd6FD.js"),[])},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>I(()=>import("./ts-tags-CHnADXob.js"),__vite__mapDeps([87,11,3,2,24,25,1,15,7,8]))},{id:"tsv",name:"TSV",import:()=>I(()=>import("./tsv-B_m7g4N7.js"),[])},{id:"tsx",name:"TSX",import:()=>I(()=>import("./tsx-COt5Ahok.js"),[])},{id:"turtle",name:"Turtle",import:()=>I(()=>import("./turtle-BsS91CYL.js"),[])},{id:"twig",name:"Twig",import:()=>I(()=>import("./twig-febACT8g.js"),__vite__mapDeps([88,3,2,5,69,1,7,8,15,9,19,32,33,34,11,35,36,22,23,24,25,27,37,38]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>I(()=>import("./typescript-DlfHMoPT.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>I(()=>import("./typespec-Df68jz8_.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>I(()=>import("./typst-DHCkPAjA.js"),[])},{id:"v",name:"V",import:()=>I(()=>import("./v-DljmTZ5-.js"),[])},{id:"vala",name:"Vala",import:()=>I(()=>import("./vala-CsfeWuGM.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>I(()=>import("./vb-D17OF-Vu.js"),[])},{id:"verilog",name:"Verilog",import:()=>I(()=>import("./verilog-BQ8w6xss.js"),[])},{id:"vhdl",name:"VHDL",import:()=>I(()=>import("./vhdl-CeAyd5Ju.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>I(()=>import("./viml-CJc9bBzg.js"),[])},{id:"vue",name:"Vue",import:()=>I(()=>import("./vue-xz9K_ZKN.js"),__vite__mapDeps([89,3,2,11,9,14,1]))},{id:"vue-html",name:"Vue HTML",import:()=>I(()=>import("./vue-html-dOMv_FQ0.js"),__vite__mapDeps([90,89,3,2,11,9,14,1]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>I(()=>import("./vyper-CDx5xZoG.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>I(()=>import("./wasm-MzD3tlZU.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>I(()=>import("./wenyan-BV7otONQ.js"),[])},{id:"wgsl",name:"WGSL",import:()=>I(()=>import("./wgsl-Dx-B1_4e.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>I(()=>import("./wikitext-BhOHFoWU.js"),[])},{id:"wit",name:"WebAssembly Interface Types",import:()=>I(()=>import("./wit-5i3qLPDT.js"),[])},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>I(()=>import("./wolfram-lXgVvXCa.js"),[])},{id:"xml",name:"XML",import:()=>I(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>I(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([91,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>I(()=>import("./yaml-Buea-lGh.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>I(()=>import("./zenscript-DVFEvuxE.js"),[])},{id:"zig",name:"Zig",import:()=>I(()=>import("./zig-CK-KhNJq.js"),[])}],VQ=Object.fromEntries(RD.map(e=>[e.id,e.import])),BQ=Object.fromEntries(RD.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),UQ={...VQ,...BQ},$Q=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>I(()=>import("./andromeeda-C3khCPGq.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>I(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>I(()=>import("./ayu-dark-Cv9koXgw.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>I(()=>import("./catppuccin-frappe-Btyk0a-E.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>I(()=>import("./catppuccin-latte-q-j0iyEw.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>I(()=>import("./catppuccin-macchiato-brDaU2vB.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>I(()=>import("./catppuccin-mocha-BR7mELCv.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>I(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>I(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>I(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>I(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>I(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>I(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>I(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>I(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>I(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>I(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>I(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>I(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>I(()=>import("./gruvbox-dark-hard-Hhtzho9R.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>I(()=>import("./gruvbox-dark-medium-DFR6f4Jn.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>I(()=>import("./gruvbox-dark-soft-BFVdkX1U.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>I(()=>import("./gruvbox-light-hard-7i6GEmcB.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>I(()=>import("./gruvbox-light-medium-Dcsh5twl.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>I(()=>import("./gruvbox-light-soft-leinZj1a.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>I(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>I(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>I(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>I(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>I(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>I(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>I(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>I(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>I(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>I(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>I(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>I(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>I(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>I(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>I(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>I(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>I(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>I(()=>import("./one-light-PoHY5YXO.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>I(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>I(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>I(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>I(()=>import("./rose-pine-BHrmToEH.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>I(()=>import("./rose-pine-dawn-CnK8MTSM.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>I(()=>import("./rose-pine-moon-NleAzG8P.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>I(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>I(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>I(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>I(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>I(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>I(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>I(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>I(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>I(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>I(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>I(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],HQ=Object.fromEntries($Q.map(e=>[e.id,e.import]));class e0 extends Error{constructor(t){super(t),this.name="ShikiError"}}function FQ(){return 2147483648}function GQ(){return typeof performance<"u"?performance.now():Date.now()}const KQ=(e,t)=>e+(t-e%t)%t;async function ZQ(e){let t,n;const r={};function a(v){n=v,r.HEAPU8=new Uint8Array(v),r.HEAPU32=new Uint32Array(v)}function s(v,_,S){r.HEAPU8.copyWithin(v,_,_+S)}function l(v){try{return t.grow(v-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function u(v){const _=r.HEAPU8.length;v=v>>>0;const S=FQ();if(v>S)return!1;for(let A=1;A<=4;A*=2){let w=_*(1+.2/A);w=Math.min(w,v+100663296);const T=Math.min(S,KQ(Math.max(v,w),65536));if(l(T))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(v,_,S=1024){const A=_+S;let w=_;for(;v[w]&&!(w>=A);)++w;if(w-_>16&&v.buffer&&d)return d.decode(v.subarray(_,w));let T="";for(;_<w;){let C=v[_++];if(!(C&128)){T+=String.fromCharCode(C);continue}const k=v[_++]&63;if((C&224)===192){T+=String.fromCharCode((C&31)<<6|k);continue}const N=v[_++]&63;if((C&240)===224?C=(C&15)<<12|k<<6|N:C=(C&7)<<18|k<<12|N<<6|v[_++]&63,C<65536)T+=String.fromCharCode(C);else{const L=C-65536;T+=String.fromCharCode(55296|L>>10,56320|L&1023)}}return T}function m(v,_){return v?h(r.HEAPU8,v,_):""}const y={emscripten_get_now:GQ,emscripten_memcpy_big:s,emscripten_resize_heap:u,fd_write:()=>0};async function g(){const _=await e({env:y,wasi_snapshot_preview1:y});t=_.memory,a(t.buffer),Object.assign(r,_),r.UTF8ToString=m}return await g(),r}var qQ=Object.defineProperty,WQ=(e,t,n)=>t in e?qQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ht=(e,t,n)=>WQ(e,typeof t!="symbol"?t+"":t,n);let Yt=null;function YQ(e){throw new e0(e.UTF8ToString(e.getLastOnigError()))}class Sh{constructor(t){Ht(this,"utf16Length"),Ht(this,"utf8Length"),Ht(this,"utf16Value"),Ht(this,"utf8Value"),Ht(this,"utf16OffsetToUtf8"),Ht(this,"utf8OffsetToUtf16");const n=t.length,r=Sh._utf8ByteLength(t),a=r!==n,s=a?new Uint32Array(n+1):null;a&&(s[n]=r);const l=a?new Uint32Array(r+1):null;a&&(l[r]=n);const u=new Uint8Array(r);let d=0;for(let h=0;h<n;h++){const m=t.charCodeAt(h);let y=m,g=!1;if(m>=55296&&m<=56319&&h+1<n){const v=t.charCodeAt(h+1);v>=56320&&v<=57343&&(y=(m-55296<<10)+65536|v-56320,g=!0)}a&&(s[h]=d,g&&(s[h+1]=d),y<=127?l[d+0]=h:y<=2047?(l[d+0]=h,l[d+1]=h):y<=65535?(l[d+0]=h,l[d+1]=h,l[d+2]=h):(l[d+0]=h,l[d+1]=h,l[d+2]=h,l[d+3]=h)),y<=127?u[d++]=y:y<=2047?(u[d++]=192|(y&1984)>>>6,u[d++]=128|(y&63)>>>0):y<=65535?(u[d++]=224|(y&61440)>>>12,u[d++]=128|(y&4032)>>>6,u[d++]=128|(y&63)>>>0):(u[d++]=240|(y&1835008)>>>18,u[d++]=128|(y&258048)>>>12,u[d++]=128|(y&4032)>>>6,u[d++]=128|(y&63)>>>0),g&&h++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=u,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){const s=t.charCodeAt(r);let l=s,u=!1;if(s>=55296&&s<=56319&&r+1<a){const d=t.charCodeAt(r+1);d>=56320&&d<=57343&&(l=(s-55296<<10)+65536|d-56320,u=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,u&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Ah=class Ir{constructor(t){if(Ht(this,"id",++Ir.LAST_ID),Ht(this,"_onigBinding"),Ht(this,"content"),Ht(this,"utf16Length"),Ht(this,"utf8Length"),Ht(this,"utf16OffsetToUtf8"),Ht(this,"utf8OffsetToUtf16"),Ht(this,"ptr"),!Yt)throw new e0("Must invoke loadWasm first.");this._onigBinding=Yt,this.content=t;const n=new Sh(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ir._sharedPtrInUse?(Ir._sharedPtr||(Ir._sharedPtr=Yt.omalloc(1e4)),Ir._sharedPtrInUse=!0,Yt.HEAPU8.set(n.utf8Value,Ir._sharedPtr),this.ptr=Ir._sharedPtr):this.ptr=n.createString(Yt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Ir._sharedPtr?Ir._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ht(Ah,"LAST_ID",0);Ht(Ah,"_sharedPtr",0);Ht(Ah,"_sharedPtrInUse",!1);let CD=Ah;class XQ{constructor(t){if(Ht(this,"_onigBinding"),Ht(this,"_ptr"),!Yt)throw new e0("Must invoke loadWasm first.");const n=[],r=[];for(let u=0,d=t.length;u<d;u++){const h=new Sh(t[u]);n[u]=h.createString(Yt),r[u]=h.utf8Length}const a=Yt.omalloc(4*t.length);Yt.HEAPU32.set(n,a/4);const s=Yt.omalloc(4*t.length);Yt.HEAPU32.set(r,s/4);const l=Yt.createOnigScanner(a,s,t.length);for(let u=0,d=t.length;u<d;u++)Yt.ofree(n[u]);Yt.ofree(s),Yt.ofree(a),l===0&&YQ(Yt),this._onigBinding=Yt,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new CD(t);const s=this._findNextMatchSync(t,n,!1,a);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){const s=this._onigBinding,l=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(l===0)return null;const u=s.HEAPU32;let d=l/4;const h=u[d++],m=u[d++],y=[];for(let g=0;g<m;g++){const v=t.convertUtf8OffsetToUtf16(u[d++]),_=t.convertUtf8OffsetToUtf16(u[d++]);y[g]={start:v,end:_,length:_-v}}return{index:h,captureIndices:y}}}function QQ(e){return typeof e.instantiator=="function"}function JQ(e){return typeof e.default=="function"}function eJ(e){return typeof e.data<"u"}function tJ(e){return typeof Response<"u"&&e instanceof Response}function nJ(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let zd;function rJ(e){if(zd)return zd;async function t(){Yt=await ZQ(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),QQ(r)?r=await r.instantiator(n):JQ(r)?r=await r.default(n):(eJ(r)&&(r=r.data),tJ(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await iJ(r)(n):r=await aJ(r)(n):nJ(r)?r=await Hg(r)(n):r instanceof WebAssembly.Module?r=await Hg(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Hg(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return zd=t(),zd}function Hg(e){return t=>WebAssembly.instantiate(e,t)}function iJ(e){return t=>WebAssembly.instantiateStreaming(e,t)}function aJ(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function oJ(e){return e&&await rJ(e),{createScanner(t){return new XQ(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new CD(t)}}}const sJ=MQ({langs:UQ,themes:HQ,engine:()=>oJ(I(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:lJ}=zQ(sJ,{guessEmbeddedLanguages:eQ}),cJ=({children:e})=>b.jsx("div",{children:b.jsx("pre",{children:b.jsx("code",{children:e.split(`
|
|
303
|
-
`).map((t,n)=>b.jsx("span",{className:"line block w-full",children:t},n))})})}),uJ=({children:e,lang:t,isDarkMode:n,onChange:r,...a})=>{const[s,l]=E.useState(null),u=E.useMemo(()=>({lang:t,theme:n?"github-dark":"github-light",transformers:[VW(),UW(),ZW(),BW(),LW(),MW()]}),[t,n]);return E.useEffect(()=>{lJ(e,u).then(d=>l(d)).catch(d=>console.error(d))},[u,e]),s?b.jsx("div",{dangerouslySetInnerHTML:{__html:s},...a,style:{backgroundColor:"transparent"}}):b.jsx(cJ,{children:e})},dJ=({className:e,onChange:t,isEditable:n,...r})=>b.jsx(uJ,{className:Ae("flex w-full",e),contentEditable:n,onInput:a=>t==null?void 0:t(a.currentTarget.textContent??""),...r}),ND=E.createContext({packageManager:"npm",setPackageManager:()=>{},codeFormat:"typescript",setCodeFormat:()=>{},contentDeclarationFormat:"typescript",setContentDeclarationFormat:()=>{}}),wh=()=>E.useContext(ND),fJ=({children:e})=>{const[t,n]=dc("packageManager","npm"),[r,a]=dc("codeFormat","typescript"),[s,l]=dc("contentDeclarationFormat","typescript");return b.jsx(ND,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:a,contentDeclarationFormat:s,setContentDeclarationFormat:l},children:e})},hJ=({children:e,...t})=>{const{packageManager:n,codeFormat:r,contentDeclarationFormat:a}=wh(),s=typeof t.packageManager>"u",l=n===t.packageManager,u=typeof t.codeFormat>"u",d=r===t.codeFormat,h=typeof t.contentDeclarationFormat>"u",m=a===t.contentDeclarationFormat;return(s||l)&&(u||d)&&(h||m)?e:b.jsx(b.Fragment,{})},mJ=()=>{const{codeFormat:e,setCodeFormat:t,setContentDeclarationFormat:n}=wh();return b.jsxs(Ie,{value:e,onValueChange:r=>{t(r),n(r)},children:[b.jsx(Ie.Trigger,{children:b.jsx(Ie.Value,{placeholder:"Code Format"})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:"typescript",children:"TypeScript"}),b.jsx(Ie.Item,{value:"esm",children:"ESM"}),b.jsx(Ie.Item,{value:"commonjs",children:"CommonJS"})]})]})},pJ=()=>{const{contentDeclarationFormat:e,setContentDeclarationFormat:t}=wh();return b.jsxs(Ie,{value:e,onValueChange:t,children:[b.jsx(Ie.Trigger,{children:b.jsx(Ie.Value,{placeholder:"Dictionary Format"})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:"typescript",children:"TypeScript"}),b.jsx(Ie.Item,{value:"commonjs",children:"CommonJS"}),b.jsx(Ie.Item,{value:"esm",children:"ESM"}),b.jsx(Ie.Item,{value:"json",children:"JSON"})]})]})},gJ={key:"copy-button",content:{label:ge({en:"Copy content",fr:"Copier le contenu",es:"Copiar contenido","en-GB":"Copy content",de:"Inhalt kopieren",ja:"コンテンツをコピー",ko:"콘텐츠 복사",zh:"复制内容",it:"Copia contenuto",pt:"Copiar conteúdo",hi:"सामग्री कॉपी करें",ar:"نسخ المحتوى",ru:"Копировать содержимое"})}},OD=({content:e})=>{const[t,n]=E.useState(!1),{label:r}=Qt(gJ),a=async()=>{try{await navigator.clipboard.writeText(e),n(!0)}catch(s){console.error("Failed to copy text: ",s)}};return E.useEffect(()=>{const s=setTimeout(()=>{n(!1)},1e3);return()=>clearTimeout(s)},[t]),b.jsx(ut,{Icon:t?kz:Iz,onClick:a,variant:"hoverable",color:"text",label:r.value,size:"icon-sm"})},yJ=()=>{const{packageManager:e,setPackageManager:t}=wh();return b.jsxs(Ie,{value:e,onValueChange:t,children:[b.jsx(Ie.Trigger,{children:b.jsx(Ie.Value,{placeholder:"Package Manager"})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:"npm",children:"npm"}),b.jsx(Ie.Item,{value:"pnpm",children:"pnpm"}),b.jsx(Ie.Item,{value:"yarn",children:"yarn"})]})]})},vJ=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:a=!0,className:s,fileName:l,packageManager:u,codeFormat:d,contentDeclarationFormat:h,...m})=>{const y=e.endsWith(`
|
|
304
|
-
`)?e.slice(0,-1):e,g=u||d||h;return b.jsx(hJ,{packageManager:u,codeFormat:d,contentDeclarationFormat:h,children:b.jsxs(qr,{className:Ae("relative text-sm leading-6",a&&"with-line-number ml-0",s),transparency:"lg",...m,children:[r&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"bg-card/50 text-neutral grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl py-1.5 pl-4 pr-12 text-xs",children:[b.jsx("span",{className:"truncate",children:l??t}),b.jsxs("div",{className:"flex items-center gap-2",children:[u&&b.jsx(yJ,{}),d&&b.jsx(mJ,{}),h&&b.jsx(pJ,{})]})]}),b.jsx("div",{className:"sticky top-28",children:b.jsx("div",{className:Ae("absolute bottom-0 right-2 flex h-7 items-center",g&&"h-11"),children:b.jsx(OD,{content:y})})})]}),b.jsx("div",{className:"grid size-full grid-cols-[0px] overflow-auto p-3",children:b.jsx(dJ,{lang:t,isDarkMode:n,children:y})})]})})},bJ=({children:e,isDarkMode:t,locale:n,options:r})=>{const{overrides:a,...s}=r??{};return b.jsx(fJ,{children:b.jsx(RW,{options:{overrides:{h1:l=>b.jsx(tZ,{isClickable:!0,...l}),h2:l=>b.jsx(nZ,{isClickable:!0,...l}),h3:l=>b.jsx(Vb,{isClickable:!0,...l}),h4:l=>b.jsx(rZ,{isClickable:!0,...l}),code:l=>{var u;return typeof l.className>"u"?b.jsx("strong",{className:"bg-card/60 rounded p-1 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur",children:l.children}):b.jsx(vJ,{isDarkMode:t,language:(u=l.className)==null?void 0:u.replace("lang-",""),...l})},blockquote:({className:l,...u})=>b.jsx("blockquote",{className:Ae("border-card text-neutral mt-5 flex flex-col gap-3 border-l-4 pl-5",l),...u}),ul:({className:l,...u})=>b.jsx("ul",{className:Ae("mt-5 flex flex-col gap-3 pl-5",l),...u}),ol:({className:l,...u})=>b.jsx("ol",{className:Ae("mt-5 flex flex-col gap-3 pl-5",l),...u}),li:({className:l,...u})=>b.jsx("li",{className:Ae("list-disc",l),...u}),img:({className:l,...u})=>b.jsx("img",{...u,loading:"lazy",className:Ae("max-w-full rounded-md",l),src:`${u.src}?raw=true`}),a:l=>{var u;return b.jsx(Bb,{color:"neutral",isExternalLink:(u=l.href)==null?void 0:u.startsWith("http"),underlined:!0,locale:n,...l})},pre:l=>l.children,table:({className:l,...u})=>b.jsx("div",{className:"grid w-full max-w-full overflow-scroll rounded",children:b.jsx("table",{className:Ae("max-w-full table-auto overflow-hidden text-left",l),...u})}),th:({className:l,...u})=>b.jsx("th",{className:Ae("border-neutral bg-neutral/10 border-b p-4",l),...u}),tr:({className:l,...u})=>b.jsx("tr",{className:Ae("hover:bg-neutral/10 hover:/10",l),...u}),td:({className:l,...u})=>b.jsx("td",{className:Ae("border-b border-neutral-500/50 p-4",l),...u}),...a},wrapper:({className:l,...u})=>b.jsxs(b.Fragment,{children:[b.jsx(NW,{}),b.jsx("div",{className:Ae("flex flex-col gap-8 p-10",l),...u})]}),...s},children:e??""})})},_J=e=>{let t,n;if(typeof e=="number"||!isNaN(Number(e)))t="=",n=e.toString();else if(typeof e=="string"){const a=["<=",">=","<",">","="].find(s=>e.startsWith(s));a&&(t=a,n=e.slice(a.length))}return{comparator:t,numberValue:n}},xJ=({value:e,onChange:t})=>{const{comparator:n,numberValue:r}=E.useMemo(()=>_J(e),[e]),[a,s]=E.useState(n??null),[l,u]=E.useState(r??null);return E.useEffect(()=>{if(a&&l&&(a!==n||l!==r)){const d=`${a}${l}`;t(d)}},[a,n,r,l,t]),b.jsxs("div",{className:"flex gap-1",children:[b.jsxs(Ie,{onValueChange:s,defaultValue:n,children:[b.jsx(Ie.Trigger,{className:"w-20",children:b.jsx(Ie.Value,{placeholder:"Select a comparator"})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:"<",children:"<"}),b.jsx(Ie.Item,{value:"<=",children:"<="}),b.jsx(Ie.Item,{value:"=",children:"="}),b.jsx(Ie.Item,{value:">=",children:">="}),b.jsx(Ie.Item,{value:">",children:">"})]})]}),b.jsx(ks,{type:"number","aria-label":"Quantity",defaultValue:l??void 0,onChange:d=>u(d.target.value),className:"min-w-4"})]})},Th={key:"navigation-view",content:{tsxNotEditable:ge({en:"React node is not editable","en-GB":"React node is not editable",fr:"Node React non éditable",es:"Nodo React no editable",de:"React-Knoten ist nicht bearbeitbar",ja:"編集できないReactノードです",ko:"편집할 수 없는 React 노드입니다",zh:"不可编辑的 React 节点",it:"Node React non modificabile",pt:"Nó React não editável",hi:"सम्पादित न करने योग्य React नोड",ar:"عقدة React غير قابلة للتحرير",ru:"React-узел не редактируемый"}),goToField:{label:ge({en:"Go to field","en-GB":"Go to field",fr:"Aller au champ",es:"Ir al campo",de:"Zum Feld gehen",ja:"フィールドに移動",ko:"필드로 이동",zh:"转到字段",it:"Vai al campo",pt:"Ir para o campo",hi:"फ़ील्ड पर जाएं",ar:"اذهب إلى الحقل",ru:"Перейти к полю"})},addNewElement:{label:ge({en:"Click to add element","en-GB":"Click to add element",fr:"Cliquez pour ajouter un élément",es:"Haga clic para agregar un elemento",de:"Klicken Sie, um ein Element hinzuzufügen",ja:"要素を追加するにはクリック",ko:"요소를 추가하려면 클릭하세요",zh:"点击添加元素",it:"Clicca per aggiungere un elemento",pt:"Clique para adicionar um elemento",hi:"तत्व जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة عنصر",ru:"Нажмите, чтобы добавить элемент"}),text:ge({en:"Add new element","en-GB":"Add new element",fr:"Ajouter un nouvel élément",es:"Agregar nuevo elemento",de:"Neues Element hinzufügen",ja:"新しい要素を追加",ko:"새 요소 추가",zh:"添加新元素",it:"Aggiungi nuovo elemento",pt:"Adicionar novo elemento",hi:"नया तत्व जोड़ें",ar:"أضف عنصرًا جديدًا",ru:"Добавить новый элемент"})},removeElement:{label:ge({en:"Click to remove element","en-GB":"Click to remove element",fr:"Cliquez pour supprimer un élément",es:"Haga clic para eliminar un elemento",de:"Klicken Sie, um ein Element zu entfernen",ja:"要素を削除するにはクリック",ko:"요소를 제거하려면 클릭하세요",zh:"点击删除元素",it:"Clicca per rimuovere un elemento",pt:"Clique para remover um elemento",hi:"तत्व निकालने के लिए क्लिक करें",ar:"انقر لإزالة عنصر",ru:"Нажмите, чтобы удалить элемент"}),text:ge({en:"Remove element","en-GB":"Remove element",fr:"Supprimer l’élément",es:"Eliminar elemento",de:"Element entfernen",ja:"要素を削除",ko:"요소 제거",zh:"删除元素",it:"Rimuovi elemento",pt:"Remover elemento",hi:"तत्व निकालें",ar:"إزالة عنصر",ru:"Удалить элемент"})},addNewEnumeration:{label:ge({en:"Click to add enumeration","en-GB":"Click to add enumeration",fr:"Cliquez pour ajouter une énumération",es:"Haga clic para agregar una enumeración",de:"Klicken Sie, um eine Aufzählung hinzuzufügen",ja:"列挙を追加するにはクリック",ko:"열거를 추가하려면 클릭하세요",zh:"点击添加枚举",it:"Clicca per aggiungere un enumerazione",pt:"Clique para adicionar uma enumeração",hi:"सूची जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة تعداد",ru:"Нажмите, чтобы добавить перечисление"}),text:ge({en:"Add new enumeration","en-GB":"Add new enumeration",fr:"Ajouter une nouvelle énumération",es:"Agregar nueva enumeración",de:"Neue Aufzählung hinzufügen",ja:"新しい列挙を追加",ko:"새 목록 추가",zh:"添加新枚举",it:"Aggiungi nuova enumerazione",pt:"Adicionar nova enumeração",hi:"नया सूची जोड़ें",ar:"أضف تعدادًا جديدًا",ru:"Добавить новое перечисление"})},removeEnumeration:{label:ge({en:"Click to remove enumeration","en-GB":"Click to remove enumeration",fr:"Cliquez pour supprimer une énumération",es:"Haga clic para eliminar una enumeración",de:"Klicken Sie, um eine Aufzählung zu entfernen",ja:"列挙を削除するにはクリック",ko:"목록을 제거하려면 클릭하세요",zh:"点击删除枚举",it:"Clicca per rimuovere un'enumerazione",pt:"Clique para remover uma enumeração",hi:"सूची निकालने के लिए क्लिक करें",ar:"انقر لإزالة تعداد",ru:"Нажмите, чтобы удалить перечисление"}),text:ge({en:"Remove enumeration","en-GB":"Remove enumeration",fr:"Supprimer l’énumération",es:"Eliminar enumeración",de:"Aufzählung entfernen",ja:"列挙を削除",ko:"목록 제거",zh:"删除枚举",it:"Rimuovi enumerazione",pt:"Remover enumeração",hi:"सूची निकालें",ar:"إزالة تعداد",ru:"Удалить перечисление"})},addNewCondition:{label:ge({en:"Click to add condition","en-GB":"Click to add condition",fr:"Cliquez pour ajouter une condition",es:"Haga clic para agregar una condición",de:"Klicken Sie, um eine Bedingung hinzuzufügen",ja:"条件を追加するにはクリック",ko:"조건을 추가하려면 클릭하세요",zh:"点击添加条件",it:"Clicca per aggiungere una condizione",pt:"Clique para adicionar uma condição",hi:"शर्ते जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة شرط",ru:"Нажмите, чтобы добавить условие"}),text:ge({en:"Add new condition","en-GB":"Add new condition",fr:"Ajouter une nouvelle condition",es:"Agregar nueva condición",de:"Neue Bedingung hinzufügen",ja:"新しい条件を追加",ko:"새 조건 추가",zh:"添加新条件",it:"Aggiungi nuova condizione",pt:"Adicionar nova condição",hi:"नया शर्ते जोड़ें",ar:"أضف شرطًا جديدًا",ru:"Добавить новое условие"})}}},EJ=({keyPath:e,dictionary:t,...n})=>{const{editedContent:r,addEditedContent:a}=Sn(),s=Fr(),{auditContentDeclarationField:l,isLoading:u}=wU();return b.jsx(_q,{variant:"default",onContentChange:d=>a(t.key,d,e),additionalButtons:b.jsx(ut,{Icon:A1,label:"Audit",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",isLoading:u,onClick:()=>{l({fileContent:JSON.stringify({...t,...(r==null?void 0:r[t.key])??{}}),keyPath:e,locales:s.internationalization.locales??[],openAiApiKey:s.editor.openAiApiKey,model:s.editor.openAiApiModel,temperature:s.editor.openAiApiTemperature}).then(d=>{if(d!=null&&d.data)try{const h=d.data.fileContent;a(t.key,h,e)}catch(h){console.error(h)}})}}),...n})},SJ=({keyPath:e,dictionary:t,...n})=>{const{addEditedContent:r}=Sn();return b.jsx(qy,{variant:"default",onContentChange:a=>r(t.key,a,e),...n})},AJ=[{content:"False",value:!1},{content:"True",value:!0}],wJ=({dictionary:e,keyPath:t,...n})=>{const{addEditedContent:r}=Sn();return b.jsx(Zc,{choices:AJ,value:!0,onChange:a=>r(e.key,a,t),color:"text",size:"sm",...n})},TJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{locale:a,defaultLocale:s}=mv(),{selectedLocales:l,availableLocales:u}=Ak(),d=e[Z.Translation],h=Object.keys(d),y=u.length>l.length?l:[...new Set([...u,...h])],g=e[Z.Translation];return b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:y.map(v=>b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 w-full p-2 text-xs",children:Hd(v,a)}),b.jsx("tr",{children:b.jsx(mo,{section:g[v]??ar(g[s]),keyPath:[...t,{type:Z.Translation,key:v}],dictionary:n,renderSection:r})})]},v))})})},RJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=Sn(),{addNewEnumeration:s,removeEnumeration:l}=Qt(Th),u=e[Z.Enumeration],d=Object.keys(u)[0];return b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:Object.keys(e[Z.Enumeration]).map(h=>{const m=[...t,{type:Z.Enumeration}];return b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 w-full",children:b.jsx("div",{className:"flex flex-1",children:b.jsx(ut,{label:l.label.value,variant:"hoverable",color:"text",Icon:Yf,className:"ml-auto",onClick:()=>a(n.key,void 0,m),children:l.text})})}),b.jsx("tr",{className:"w-full p-2",children:b.jsx(xJ,{value:h,onChange:y=>{const g=e[Z.Enumeration],v=yq(g,h,y),_={...e,[Z.Enumeration]:v};a(n.key,_,t)}})}),b.jsx("tr",{className:"block w-full",children:b.jsx(t0,{section:u[h]??ar(u[d]),keyPath:m,dictionary:n,renderSection:r})})]},h)})})}),b.jsx(ut,{label:s.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>a(n.key,ar(u[d])??"",[...t,{type:Z.Enumeration,key:"unknown"}]),Icon:Wf,className:"m-2",children:s.text})]})},CJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const a=e[Z.Condition];return b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:["true","false","fallback"].map(s=>b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 block w-full p-2 text-xs",children:String(s)},s),b.jsx("tr",{className:"block w-full",children:b.jsx(mo,{section:a[s]??ar(a.true),keyPath:[...t,{type:Z.Condition,key:s}],dictionary:n,renderSection:r})},s)]},s))})})},NJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=Sn(),{addNewElement:s,removeElement:l}=Qt(Th);return b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:e.map((u,d)=>b.jsxs(E.Fragment,{children:[b.jsxs("tr",{className:"mt-2 flex w-full justify-between gap-2 p-2",children:[b.jsx("span",{className:"text-xs",children:String(d)}),b.jsx(ut,{label:l.label.value,variant:"hoverable",color:"neutral",className:"ml-auto",textAlign:"left",onClick:()=>{const h=[...t,{type:Z.Array,key:e.length}];a(n.key,void 0,h)},Icon:Yf,children:l.text})]}),b.jsx("tr",{className:"block w-full",children:b.jsx(mo,{section:u??ar(e[0]),keyPath:[...t,{type:Z.Array,key:d}],dictionary:n,renderSection:r})})]},JSON.stringify(u)))})}),b.jsx(ut,{label:s.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>{const u=[...t,{type:Z.Array,key:e.length}];a(n.key,ar(e[0])??"",u,!1)},Icon:Wf,children:s.text})]})},OJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>b.jsx(b.Fragment,{children:b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex flex-col gap-2",children:Object.keys(e).map(a=>{const s=[...t,{type:Z.Object,key:a}],l=e,u=Object.keys(l)[0],d=l[a]??ar(l[u]);return b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 p-2 text-xs",children:String(a)},JSON.stringify(d)),b.jsx("tr",{className:"block w-full",children:b.jsx(t0,{section:d,keyPath:s,dictionary:n,renderSection:r})},JSON.stringify(d))]},a)})})})}),kJ=({section:e,keyPath:t,dictionary:n,isDarkMode:r,onContentChange:a})=>{const[s,l]=E.useState(0),u=[{content:"Edit",value:0},{content:"Preview",value:1}],d=[...t,{type:Z.Markdown}],h=e[Z.Markdown];return b.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[b.jsx(Zc,{choices:u,value:s,onChange:l,color:"text",size:"sm",className:"ml-auto"}),b.jsx(mo,{section:h,keyPath:d,dictionary:n,renderSection:s===1?m=>b.jsx(bJ,{isDarkMode:r,children:m}):void 0,onContentChange:a})]})},DJ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:Z.Insertion}],a=e[Z.Insertion];return b.jsx("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:b.jsx(mo,{section:a,keyPath:r,...n})})},IJ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:Z.File}],a=e[Z.File],{content:s}=e;return b.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[b.jsxs("span",{className:"text-neutral text-sm",children:[a," "]}),b.jsx(mo,{section:s,keyPath:r,...n})]})},LJ=({keyPath:e,dictionary:t,renderSection:n,section:r,...a})=>{const{addEditedContent:s}=Sn(),l=r[Z.Nested],u=[...e,{type:Z.Nested}];return b.jsxs("div",{className:"w-full p-2",children:[b.jsx(ly,{children:"Dictionary key"}),b.jsx(qy,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{s(t.key,{...l,dictionaryKey:String(d)},u)},children:l.dictionaryKey??""}),b.jsx(ly,{children:"Path (optional)"}),b.jsx(qy,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{s(t.key,{...l,path:d!==""?d:void 0},u)},children:l.path??""})]})},t0=({section:e,keyPath:t,dictionary:n,renderSection:r,isDarkMode:a})=>{const{tsxNotEditable:s}=Qt(Th),l=As(e);return l===Z.ReactNode?b.jsxs(b.Fragment,{children:[b.jsx("span",{children:"[React Node]"}),b.jsx("span",{className:"text-neutral text-xs",children:s})]}):l===Z.Nested?b.jsx(LJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===Z.Translation?b.jsx(TJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===Z.Enumeration?b.jsx(RJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===Z.Condition?b.jsx(CJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===Z.Insertion?b.jsx(DJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===Z.Markdown?b.jsx(kJ,{dictionary:n,keyPath:t,section:e,isDarkMode:a}):l===Z.File?b.jsx(IJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===Z.Array?b.jsx(NJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===Z.Object?b.jsx(OJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===Z.Number?b.jsx("div",{className:"w-full p-2",children:b.jsx(SJ,{dictionary:n,keyPath:t,type:"number","aria-label":"Edit field",children:e})}):l===Z.Text?b.jsx("div",{className:"w-full p-2",children:typeof r=="function"?r(e):b.jsx(EJ,{variant:"default","aria-label":"Edit field",keyPath:t,dictionary:n,children:e})}):l===Z.Boolean?b.jsx("div",{className:"w-full p-2",children:b.jsx(wJ,{dictionary:n,keyPath:t,value:e})}):b.jsxs("div",{className:"w-full p-2",children:["Error. Format not supported.",JSON.stringify(e,null,2),JSON.stringify(t,null,2),"NodeType : ",l]})},mo=e=>b.jsx(qr,{border:!0,background:"none",className:"top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky",roundedSize:"xl",children:b.jsx(t0,{...e})}),kc=e=>{const t=LT(e),n=As(e);return t&&(n===Z.ReactNode||n===Z.File)?!0:t&&typeof t.nodeType=="string"?kc(t[t.nodeType]):typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"},jJ=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r})=>{const a=[{text:t,onClick:()=>n([])},...e.map((s,l)=>{var u;return{onClick:()=>n(e.slice(0,l+1)),text:((u=s.key)==null?void 0:u.toString())??""}})];return b.jsx(dZ,{links:a,locale:r,elementType:"location"})},of=e=>String(e).replace(/([A-Z])/g," $1").toLowerCase().trim(),is=({section:e,keyPath:t,dictionaryKey:n})=>{const{locales:r}=qe==null?void 0:qe.internationalization,a=Pr(e,t),{addEditedContent:s}=ws(),{setFocusedContentKeyPath:l,focusedContent:u}=la(),{addNewElement:d,goToField:h}=Qt(Th),m=As(a),y=v=>{var _;return(((_=u==null?void 0:u.keyPath)==null?void 0:_.length)??0)>0&&Lc(v,(u==null?void 0:u.keyPath)??[])},g=kc(a);if(!a)return b.jsx(b.Fragment,{});if(g)return b.jsx(ut,{label:h.label.value,variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(t),IconRight:uf,children:of(t[t.length-1].key)});if(typeof a=="object"){if(m===Z.ReactNode)return b.jsx(b.Fragment,{children:"React Node"});if(m===Z.Translation)return b.jsx("div",{className:"flex flex-col justify-between gap-2",children:r.map(_=>{const S=[...t,{type:Z.Translation,key:_}];return b.jsx(is,{keyPath:S,section:e,dictionaryKey:n},_)})});if(m===Z.Enumeration||m===Z.Condition)return b.jsx("div",{className:"flex flex-col justify-between gap-2",children:Object.keys(a[m]).map(_=>{const S=[...t,{type:m,key:_}];return b.jsx(is,{keyPath:S,section:e,dictionaryKey:n},_)})});if(m===Z.Array)return b.jsxs("div",{className:"flex flex-col justify-between gap-2",children:[a.map((_,S)=>{const A=[...t,{type:Z.Array,key:S}];return b.jsx(is,{keyPath:A,section:e,dictionaryKey:n},JSON.stringify(A))}),b.jsx(ut,{label:d.label.value,variant:"hoverable",color:"neutral",textAlign:"left",onClick:()=>{const _=[...t,{type:Z.Array,key:a.length}],S=a,A=ar(S[S.length-1])??"";s(n,A,_,!1),l(_)},Icon:Wf,children:d.text})]});if(typeof a.nodeType=="string"){const _=[...t,{type:a.nodeType}];return b.jsx(is,{keyPath:_,section:e,dictionaryKey:n})}const v=Object.keys(a);return b.jsx("div",{className:"flex w-full max-w-full flex-col justify-between gap-2",children:v.map(_=>{const S=[...t,{type:Z.Object,key:_}],A=Pr(e,S);return kc(A)?b.jsx(ut,{label:`${h.label.value} ${_}`,isActive:y(S),variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(S),IconRight:uf,children:of(_)},_):b.jsx(z1,{label:`${h.label.value} ${_}`,isActive:y(S),onClick:()=>l(S),header:of(_),children:b.jsx("div",{className:"mt-2 flex w-full max-w-full",children:b.jsx("div",{className:"flex-1 pl-10",children:b.jsx(is,{keyPath:S,section:e,dictionaryKey:n})})})},_)})})}return b.jsxs(b.Fragment,{children:["Error loading section --",m,"--",JSON.stringify(a),"--",JSON.stringify(t)]})},MJ=({dictionary:e,isDarkMode:t})=>{var g,v;const{content:n,key:r}=e,{editedContent:a}=Sn(),{focusedContent:s,setFocusedContentKeyPath:l}=la(),u=s==null?void 0:s.keyPath,d=typeof((g=a==null?void 0:a[e.key])==null?void 0:g.content)>"u"?n:(v=a==null?void 0:a[r])==null?void 0:v.content,h=Pr(d,u??[]),m=kc(d),y=kc(h);return E.useEffect(()=>{var _;typeof h>"u"&&l(((_=s==null?void 0:s.keyPath)==null?void 0:_.slice(0,-1))??[])},[]),b.jsxs("div",{children:[b.jsxs("div",{className:"mb-6 flex items-center justify-between gap-2",children:[b.jsx(jJ,{dictionaryKey:r,keyPath:u??[],onClickKeyPath:l}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsx(gq,{})})]}),b.jsxs("div",{className:"flex gap-2 max-md:flex-col",children:[typeof d=="object"&&d&&!m&&Object.keys(d).length>0&&b.jsx(qr,{border:!0,background:"none",className:"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]",roundedSize:"xl",transparency:"sm",children:b.jsx(is,{keyPath:[],section:d,dictionaryKey:r})}),(y||(u??[]).length>0)&&b.jsx(mo,{keyPath:u??[],section:h,dictionary:e,isDarkMode:t})]})]})},PJ={key:"dictionary-details",content:{titleInput:{label:ge({en:"Title","en-GB":"Title",fr:"Titre",es:"Título",de:"Titel",ja:"タイトル",ko:"제목",zh:"标题",it:"Titolo",pt:"Título",hi:"शीर्षक",ar:"العنوان",ru:"Заголовок"}),description:ge({en:"The title of your dictionary allows you to easily identify it","en-GB":"The title of your dictionary allows you to easily identify it",fr:"Le titre de votre dictionnaire permet de l'identifier facilement",es:"El título de su diccionario le permite identificar fácilmente",de:"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren",ja:"辞書のタイトルは、それを簡単に識別することができます",ko:"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다",zh:"字典的标题使您能够轻松识别它",it:"Il titolo del tuo dizionario ti consente di identificarlo facilmente",pt:"O título do seu dicionário permite que você o identifique facilmente",hi:"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है",ar:"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة",ru:"Название вашего словаря позволяет легко его идентифицировать"}),placeholder:ge({en:"Enter the title of your dictionary","en-GB":"Enter the title of your dictionary",fr:"Entrez le titre de votre dictionnaire",es:"Ingrese el título de su diccionario",de:"Geben Sie den Titel Ihres Wörterbuchs ein",ja:"辞書のタイトルを入力してください",ko:"사전의 제목을 입력하세요",zh:"输入字典的标题",it:"Inserisci il titolo del tuo dizionario",pt:"Insira o título do seu dicionário",hi:"आपके शब्दकोश का शीर्षक दर्ज करें",ar:"أدخل عنوان القاموس الخاص بك",ru:"Введите название вашего словаря"})},keyInput:{label:ge({en:"Key","en-GB":"Key",fr:"Clé",es:"Clave",de:"Schlüssel",ja:"キー",ko:"키",zh:"键",it:"Chiave",pt:"Chave",hi:"कुंजी",ar:"مفتاح",ru:"Ключ"}),description:ge({en:"The key of your dictionary is used to identify it in the application","en-GB":"The key of your dictionary is used to identify it in the application",fr:"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application",es:"La clave de su diccionario se utiliza para identificarla en la aplicación",de:"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren",ja:"辞書のキーは、アプリケーション内でそれを識別するために使用されます",ko:"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다",zh:"字典的键用于在应用程序中识别它",it:"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione",pt:"A chave do seu dicionário é usada para identificá-lo no aplicativo",hi:"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है",ar:"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق",ru:"Ключ вашего словаря используется для его идентификации в приложении"}),placeholder:ge({en:"Enter the key of your dictionary","en-GB":"Enter the key of your dictionary",fr:"Entrez la clé de votre dictionnaire",es:"Ingrese la clave de su diccionario",de:"Geben Sie den Schlüssel Ihres Wörterbuchs ein",ja:"辞書のキーを入力してください",ko:"사전의 키를 입력하세요",zh:"输入字典的键",it:"Inserisci la chiave del tuo dizionario",pt:"Insira a chave do seu dicionário",hi:"अपने शब्दकोश की कुंजी दर्ज करें",ar:"أدخل مفتاح القاموس الخاص بك",ru:"Введите ключ вашего словаря"})},descriptionInput:{label:ge({en:"Description","en-GB":"Description",fr:"Description",es:"Descripción",de:"Beschreibung",ja:"説明",ko:"설명",zh:"描述",it:"Descrizione",pt:"Descrição",hi:"विवरण",ar:"الوصف",ru:"Описание"}),placeholder:ge({en:"Enter the description of your dictionary","en-GB":"Enter the description of your dictionary",fr:"Entrez la description de votre dictionnaire",es:"Ingrese la descripción de su diccionario",de:"Geben Sie die Beschreibung Ihres Wörterbuchs ein",ja:"辞書の説明を入力してください",ko:"사전의 설명을 입력하세요",zh:"输入字典的描述",it:"Inserisci la descrizione del tuo dizionario",pt:"Insira a descrição do seu dicionário",hi:"अपने शब्दकोश का विवरण दर्ज करें",ar:"أدخل وصف القاموس الخاص بك",ru:"Введите описание вашего словаря"}),description:ge({en:"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.","en-GB":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary.",fr:"La description de votre dictionnaire permet d'identifier facilement l'utilisateur en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire.",es:"La descripción de su diccionario le permite identificar fácilmente el usuario utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario.",de:"Die Beschreibung Ihres Wörterbuchs ermöglicht es Ihnen, es mit Schlüsselwörtern leicht zu identifizieren. Sie wird auch verwendet, um nach Ihrem Wörterbuch zu suchen und der KI zu helfen, Ihr Wörterbuch zu verstehen.",ja:"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。",ko:"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다.",zh:"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。",it:"La descrizione del tuo dizionario ti consente di identificarlo facilmente utilizzando parole chiave. Viene anche utilizzata per cercare il tuo dizionario e per assistere l'IA nella comprensione del tuo dizionario.",pt:"A descrição do seu dicionário permite que você o identifique facilmente usando palavras-chave. Também é usada para pesquisar seu dicionário e para ajudar a IA a entender seu dicionário.",hi:"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।",ar:"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك.",ru:"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."})},projectInput:{label:ge({en:"Projects","en-GB":"Projects",fr:"Projets",es:"Proyectos",de:"Projekte",ja:"プロジェクト",ko:"프로젝트",zh:"项目",it:"Progetti",pt:"Projetos",hi:"परियोजनाएँ",ar:"المشاريع",ru:"Проекты"}),description:ge({en:"A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.","en-GB":"A dictionary can be associated with one or more projects. This allows you to load the dictionary on different applications, and share it across different teams.",fr:"Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.",es:"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.",de:"Ein Wörterbuch kann mit einem oder mehreren Projekten verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.",ja:"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。",ko:"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.",zh:"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。",it:"Un dizionario può essere associato a uno o più progetti. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.",pt:"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes.",hi:"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।",ar:"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.",ru:"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами."}),placeholder:ge({en:"Select one or more projects to associate with your dictionary","en-GB":"Select one or more projects to associate with your dictionary",fr:"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire",es:"Seleccione uno o más proyectos para asociar con su diccionario",de:"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen",ja:"辞書に関連付けるプロジェクトを1つ以上選択してください",ko:"사전과 연결할 하나 이상의 프로젝트를 선택하세요",zh:"选择一个或多个项目以与您的字典关联",it:"Seleziona uno o più progetti da associare al tuo dizionario",pt:"Selecione um ou mais projetos para associar ao seu dicionário",hi:"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें",ar:"حدد مشروعًا أو أكثر لربطه بقاموسك",ru:"Выберите один или несколько проектов, чтобы связать их с вашим словарем"})},tagsSelect:{label:ge({en:"Tags","en-GB":"Tags",fr:"Tags",es:"Etiquetas",de:"Tags",ja:"タグ",ko:"태그",zh:"标签",it:"Tag",pt:"Tags",hi:"टैग",ar:"الوسوم",ru:"Теги"}),description:ge({en:"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","en-GB":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.",fr:"Un dictionnaire peut être associé à un ou plusieurs tags. Cela permet de charger le dictionnaire dans différentes applications et de le partager entre différentes équipes.",es:"Un diccionario puede estar asociado con uno o más tags. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.",de:"Ein Wörterbuch kann mit einem oder mehreren Tags verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.",ja:"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。",ko:"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.",zh:"字典可以与一个或多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。",it:"Un dizionario può essere associato a uno o più tag. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.",pt:"Um dicionário pode ser associado a um ou mais tags. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes."}),placeholder:ge({en:"Select the tags to associate with your dictionary","en-GB":"Select the tags to associate with your dictionary",fr:"Sélectionnez les tags à associer à votre dictionnaire",es:"Seleccione los tags para asociar con su diccionario",de:"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen",ja:"辞書に関連付けるタグを選択してください",ko:"사전과 연결할 태그를 선택하세요",zh:"选择与您的字典相关的标签",it:"Seleziona i tag da associare al tuo dizionario",pt:"Selecione os tags para associar ao seu dicionário",hi:"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें",ar:"حدد الوسوم التي تريد ربطها بقاموسك",ru:"Выберите теги, которые нужно связать с словарем"})},auditButton:{label:ge({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"}),text:ge({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"})}}},zJ={key:"dictionary-detail-schema",content:{titleRequiredError:ge({en:"Please enter a name for your organization.","en-GB":"Please enter a name for your organization.",fr:"Veuillez saisir un nom pour votre organisation.",es:"Por favor, ingrese un nombre para su organización.",de:"Bitte geben Sie einen Namen für Ihre Organisation ein.",ja:"あなたの組織の名前を入力してください。",ko:"조직 이름을 입력하세요.",zh:"请输入您组织的名称。",it:"Si prega di inserire un nome per la propria organizzazione.",pt:"Por favor, insira um nome para sua organização.",hi:"कृपया अपने संगठन का नाम दर्ज करें।",ar:"يرجى إدخال اسم منظمتك.",ru:"Пожалуйста, введите название вашей организации."}),titleInvalidTypeError:ge({en:"The organization name must be a valid string.","en-GB":"The organization name must be a valid string.",fr:"Le nom de votre organisation doit être une chaîne valide.",es:"El nombre de su organización debe ser una cadena válida.",de:"Der Name der Organisation muss eine gültige Zeichenfolge sein.",ja:"組織名は有効な文字列である必要があります。",ko:"조직 이름은 유효한 문자열이어야 합니다.",zh:"组织名称必须是有效的字符串。",it:"Il nome dell'organizzazione deve essere una stringa valida.",pt:"O nome da organização deve ser uma string válida.",hi:"संगठन का नाम एक वैध स्ट्रिंग होना चाहिए।",ar:"يجب أن يكون اسم المنظمة سلسلة صحيحة.",ru:"Имя организации должно быть правильной строкой."}),titleMinLengthError:ge({en:"The organization name must be at least 4 characters long.","en-GB":"The organization name must be at least 4 characters long.",fr:"Le nom de votre organisation doit comporter au moins 4 caractères.",es:"El nombre de su organización debe tener al menos 4 caracteres.",de:"Der Name der Organisation muss mindestens 4 Zeichen lang sein.",ja:"組織名は4文字以上でなければなりません。",ko:"조직 이름은 4자 이상이어야 합니다.",zh:"组织名称必须至少4个字符。",it:"Il nome dell'organizzazione deve essere lungo almeno 4 caratteri.",pt:"O nome da organização deve ter pelo menos 4 caracteres.",hi:"संगठन का नाम कम से कम 4 वर्ण का होना चाहिए।",ar:"يجب أن يكون اسم المنظمة مكونًا من 4 أحرف على الأقل.",ru:"Имя организации должно содержать не менее 4 символов."}),keyRequiredError:ge({en:"Please enter a key for your organization.","en-GB":"Please enter a key for your organization.",fr:"Veuillez saisir une clé pour votre organisation.",es:"Por favor, ingrese una clave para su organización.",de:"Bitte geben Sie einen Schlüssel für Ihre Organisation ein.",ja:"あなたの組織のためにキーを入力してください。",ko:"조직에 대한 키를 입력하세요.",zh:"请输入您组织的键。",it:"Si prega di inserire una chiave per la propria organizzazione.",pt:"Por favor, insira uma chave para sua organização.",hi:"कृपया अपने संगठन के लिए एक कुंजी दर्ज करें।",ar:"يرجى إدخال مفتاح لمنظمتك.",ru:"Пожалуйста, введите ключ для вашей организации."}),keyInvalidTypeError:ge({en:"The key must be a valid string.","en-GB":"The key must be a valid string.",fr:"La clé doit être une chaîne valide.",es:"La clave debe ser una cadena válida.",de:"Der Schlüssel muss eine gültige Zeichenfolge sein.",ja:"キーは有効な文字列である必要があります。",ko:"키는 유효한 문자열이어야 합니다.",zh:"关键字必须是有效的字符串。",it:"La chiave deve essere una stringa valida.",pt:"A chave deve ser uma string válida.",hi:"कुंजी एक वैध स्ट्रिंग होनी चाहिए।",ar:"يجب أن يكون المفتاح سلسلة صحيحة.",ru:"Ключ должен быть правильной строкой."}),keySpaceError:ge({en:"The key cannot contain spaces or special characters.","en-GB":"The key cannot contain spaces or special characters.",fr:"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.",es:"La clave no puede contener espacios o caracteres especiales.",de:"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.",ja:"キーにはスペースや特殊文字を含めることはできません。",ko:"키에는 공백이나 특수 문자가 포함될 수 없습니다.",zh:"关键字不能包含空格或特殊字符。",it:"La chiave non può contenere spazi o caratteri speciali.",pt:"A chave não pode conter espaços ou caracteres especiais.",hi:"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।",ar:"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.",ru:"Ключ не может содержать пробелы или специальные символы."}),keyMinLengthError:ge({en:"The key must be at least 4 characters long.","en-GB":"The key must be at least 4 characters long.",fr:"La clé doit comporter au moins 4 caractères.",es:"La clave debe tener al menos 4 caracteres.",de:"Der Schlüssel muss mindestens 4 Zeichen lang sein.",ja:"キーは4文字以上でなければなりません。",ko:"키는 4자 이상이어야 합니다.",zh:"键必须至少为4个字符。",it:"La chiave deve essere lunga almeno 4 caratteri.",pt:"A chave deve ter pelo menos 4 caracteres.",hi:"कुंजी में कम से कम 4 वर्ण होने चाहिए।",ar:"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.",ru:"Ключ должен содержать не менее 4 символов."}),descriptionRequiredError:ge({en:"Please enter a description for your organization.","en-GB":"Please enter a description for your organization.",fr:"Veuillez saisir une description pour votre organisation.",es:"Por favor, ingrese una descripción para su organización.",de:"Bitte geben Sie eine Beschreibung für Ihre Organisation ein.",ja:"あなたの組織の説明を入力してください。",ko:"조직에 대한 설명을 입력하세요.",zh:"请输入您组织的描述。",it:"Si prega di inserire una descrizione per la propria organizzazione.",pt:"Por favor, insira uma descrição para sua organização.",hi:"कृपया अपने संगठन का विवरण दर्ज करें।",ar:"يرجى إدخال وصف لمنظمتك.",ru:"Пожалуйста, введите описание вашей организации."}),descriptionInvalidTypeError:ge({en:"The description must be a valid string.","en-GB":"The description must be a valid string.",fr:"La description doit être une chaîne valide.",es:"La descripción debe ser una cadena válida.",de:"Die Beschreibung muss eine gültige Zeichenfolge sein.",ja:"説明は有効な文字列である必要があります。",ko:"설명은 유효한 문자열이어야 합니다.",zh:"描述必须是有效的字符串。",it:"La descrizione deve essere una stringa valida.",pt:"A descrição deve ser uma string válida.",hi:"विवरण एक वैध स्ट्रिंग होना चाहिए।",ar:"يجب أن يكون الوصف سلسلة صحيحة.",ru:"Описание должно быть правильной строкой."}),requiredErrorProjectId:ge({en:"Please select a project","en-GB":"Please select a project",fr:"Veuillez sélectionner un projet",es:"Por favor, seleccione un proyecto",de:"Bitte wählen Sie ein Projekt aus",ja:"プロジェクトを選択してください",ko:"프로젝트를 선택하세요",zh:"请选择一个项目",it:"Si prega di selezionare un progetto",pt:"Por favor, selecione um projeto",hi:"कृपया एक प्रोजेक्ट चुनें",ar:"يرجى اختيار مشروع",ru:"Пожалуйста, выберите проект"}),invalidTypeErrorProjectId:ge({en:"Please select a valid project","en-GB":"Please select a valid project",fr:"Veuillez sélectionner un projet valide",es:"Por favor, seleccione un proyecto válido",de:"Bitte wählen Sie ein gültiges Projekt aus",ja:"有効なプロジェクトを選択してください",ko:"유효한 프로젝트를 선택하세요",zh:"请选择有效的项目",it:"Si prega di selezionare un progetto valido",pt:"Por favor, selecione um projeto válido",hi:"कृपया एक वैध परियोजना चुनें",ar:"يرجى اختيار مشروع صالح",ru:"Пожалуйста, выберите действительный проект"}),invalidTypeErrorTags:ge({en:"Please enter a valid tag","en-GB":"Please enter a valid tag",fr:"Veuillez saisir un tag valide",es:"Por favor, ingrese un tag válido",de:"Bitte geben Sie einen gültigen Tag ein",ja:"有効なタグを入力してください",ko:"유효한 태그를 입력하세요",zh:"请输入有效的标签",it:"Si prega di inserire un tag valido",pt:"Por favor, insira um tag válido",hi:"कृपया एक वैध टैग दर्ज करें",ar:"يرجى إدخال وسم صالح",ru:"Пожалуйста, введите действительный тег"})}},VJ=e=>{const{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:a,keyInvalidTypeError:s,keySpaceError:l,keyMinLengthError:u,descriptionRequiredError:d,descriptionInvalidTypeError:h,requiredErrorProjectId:m,invalidTypeErrorProjectId:y,invalidTypeErrorTags:g}=Qt(zJ);return UG({title:Kl({error:v=>v.input===void 0?t.value:n.value}).refine(v=>v.length===0||v.length>=4,{error:r.value}).optional(),key:Kl({error:v=>v.input===void 0?a.value:s.value}).min(4,{error:u.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:l.value}).default(""),description:Kl({error:v=>v.input===void 0?d.value:h.value}).optional(),projectIds:by(Kl({error:v=>v.input===void 0?m.value:y.value})).default([e]),tags:by(Kl({error:()=>g.value})).default([])})},BJ=({dictionary:e})=>{var N,L;const{session:t}=Vc(),{project:n}=t??{},{data:r,isLoading:a}=bU(),{data:s}=SU(),l=VJ(String(n==null?void 0:n._id)),{form:u,isSubmitting:d}=a2(l,{defaultValues:e}),{editedContent:h,setEditedDictionary:m}=Sn(),{titleInput:y,keyInput:g,descriptionInput:v,projectInput:_,tagsSelect:S,auditButton:A}=Qt(PJ),{auditContentDeclaration:w,isLoading:T}=AU(),C=h==null?void 0:h[e.key];E.useEffect(()=>{u.reset(e)},[e,u==null?void 0:u.reset]),E.useEffect(()=>{typeof C>"u"&&u.reset(e)},[C]);const k=async()=>{const D={...e,...C};await w({fileContent:JSON.stringify(D)}).then(j=>{if(j!=null&&j.data)try{const V=JSON.parse(j.data.fileContent);m(U=>({...U,...D,...V})),u.reset({...D,...V})}catch(V){console.error(V)}})};return b.jsx(qr,{background:"none",border:!0,roundedSize:"2xl",className:"w-full px-5 pb-3 pt-5",children:b.jsxs(Ze,{className:"flex w-full flex-col gap-8",...u,schema:l,onChange:D=>m(j=>({...j,...D})),children:[b.jsxs("div",{className:"flex w-full flex-1 gap-8 max-md:flex-col",children:[b.jsx(Ze.EditableFieldInput,{name:"key",label:g.label,placeholder:g.label.value,description:g.description,disabled:d,isRequired:!0,onSave:D=>{u.setValue("key",D),m(j=>({...e,...j??{},key:D}))}}),b.jsx(Ze.EditableFieldInput,{name:"title",label:y.label,placeholder:y.placeholder.value,description:y.description,disabled:d,onSave:D=>{u.setValue("title",D),m(j=>({...e,...j??{},title:D}))}})]}),b.jsx(Ze.EditableFieldTextArea,{name:"description",label:v.label,placeholder:v.placeholder.value,description:v.description,disabled:d,onSave:D=>{u.setValue("description",D),m(j=>({...e,...j??{},description:D}))}}),b.jsxs("div",{className:"flex size-full flex-1 gap-8 max-md:flex-col",children:[b.jsxs(Ze.MultiSelect,{name:"projectIds",label:_.label.value,description:_.description.value,onValueChange:D=>{const j=[D].flat();u.setValue("projectIds",j),m(V=>({...e,...V??{},projectIds:j}))},children:[b.jsx(hn.Trigger,{getBadgeValue:D=>{var j,V;return((V=(j=r==null?void 0:r.data)==null?void 0:j.find(U=>String(U._id)===D))==null?void 0:V.name)??D},children:b.jsx(hn.Input,{placeholder:_.placeholder.value})}),b.jsx(hn.Content,{children:b.jsx(ys,{isLoading:a,children:b.jsx(hn.List,{children:(N=r==null?void 0:r.data)==null?void 0:N.map(D=>b.jsx(hn.Item,{value:String(D._id),children:D.name},String(D._id)))})})})]}),b.jsxs(Ze.MultiSelect,{name:"tags",label:S.label.value,description:S.description.value,onValueChange:D=>{u.setValue("tags",[D].flat()),m(j=>({...e,...j??{},tags:[D].flat()}))},children:[b.jsx(hn.Trigger,{getBadgeValue:D=>{var j,V;return((V=(j=r==null?void 0:r.data)==null?void 0:j.find(U=>String(U._id)===D))==null?void 0:V.name)??D},children:b.jsx(hn.Input,{placeholder:S.placeholder.value})}),b.jsx(hn.Content,{children:b.jsx(ys,{isLoading:a,children:b.jsx(hn.List,{children:(L=s==null?void 0:s.data)==null?void 0:L.map(D=>b.jsx(hn.Item,{value:String(D.key),children:D.name??D.key},String(D.key)))})})})]})]}),b.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 max-md:flex-col",children:b.jsx(Ze.Button,{type:"button",label:A.label.value,Icon:A1,variant:"outline",color:"text",className:"max-md:w-full",onClick:k,disabled:d||T,isLoading:T,children:A.text})})]})})},UJ={key:"dictionary-field-editor",content:{returnToDictionaryList:{label:ge({en:"Return to dictionary list","en-GB":"Return to dictionary list",fr:"Retourner à la liste des dictionnaires",es:"Volver a la lista de diccionarios",de:"Zurück zur Wörterbuchliste",ja:"辞書リストに戻る",ko:"사전 목록으로 돌아가기",zh:"返回字典列表",it:"Torna all'elenco dei dizionari",pt:"Voltar à lista de dicionários",hi:"शब्दकोश सूची में वापस जाएं",ar:"العودة إلى قائمة المعاجم",ru:"Вернуться к списку словарей"}),text:ge({en:"Dictionary list","en-GB":"Dictionary list",fr:"Liste des dictionnaires",es:"Lista de diccionarios",de:"Wörterbuchliste",ja:"辞書リスト",ko:"사전 목록",zh:"字典列表",it:"Elenco dei dizionari",pt:"Lista de dicionários",hi:"शब्दकोश सूची",ar:"قائمة المعاجم",ru:"Список словарей"})}}};function $J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function TT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wT(Object(n),!0).forEach(function(r){$J(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function FJ(e,t){if(e==null)return{};var n=HJ(e,t),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GJ(e,t){return KJ(e)||ZJ(e,t)||qJ(e,t)||WJ()}function KJ(e){if(Array.isArray(e))return e}function ZJ(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,s=void 0;try{for(var l=e[Symbol.iterator](),u;!(r=(u=l.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(d){a=!0,s=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw s}}return n}}function qJ(e,t){if(e){if(typeof e=="string")return RT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RT(e,t)}}function RT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
305
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function NT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CT(Object(n),!0).forEach(function(r){YJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XJ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(a,s){return s(a)},r)}}function ec(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return a.length>=e.length?e.apply(this,a):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(a,u))}}}function $f(e){return{}.toString.call(e).includes("Object")}function QJ(e){return!Object.keys(e).length}function Dc(e){return typeof e=="function"}function JJ(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function eee(e,t){return $f(t)||na("changeType"),Object.keys(t).some(function(n){return!JJ(e,n)})&&na("changeField"),t}function tee(e){Dc(e)||na("selectorType")}function nee(e){Dc(e)||$f(e)||na("handlerType"),$f(e)&&Object.values(e).some(function(t){return!Dc(t)})&&na("handlersType")}function ree(e){e||na("initialIsRequired"),$f(e)||na("initialType"),QJ(e)&&na("initialContent")}function iee(e,t){throw new Error(e[t]||e.default)}var aee={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},na=ec(iee)(aee),Vd={changes:eee,selector:tee,handler:nee,initial:ree};function oee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Vd.initial(e),Vd.handler(t);var n={current:e},r=ec(cee)(n,t),a=ec(lee)(n),s=ec(Vd.changes)(e),l=ec(see)(n);function u(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return Vd.selector(h),h(n.current)}function d(h){XJ(r,a,s,l)(h)}return[u,d]}function see(e,t){return Dc(t)?t(e.current):t}function lee(e,t){return e.current=NT(NT({},e.current),t),t}function cee(e,t,n){return Dc(t)?t(e.current):Object.keys(n).forEach(function(r){var a;return(a=t[r])===null||a===void 0?void 0:a.call(t,e.current[r])}),n}var uee={create:oee},dee={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function fee(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return a.length>=e.length?e.apply(this,a):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(a,u))}}}function hee(e){return{}.toString.call(e).includes("Object")}function mee(e){return e||OT("configIsRequired"),hee(e)||OT("configType"),e.urls?(pee(),{paths:{vs:e.urls.monacoBase}}):e}function pee(){console.warn(kD.deprecation)}function gee(e,t){throw new Error(e[t]||e.default)}var kD={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
306
|
-
You are using deprecated way of configuration.
|
|
307
|
-
|
|
308
|
-
Instead of using
|
|
309
|
-
monaco.config({ urls: { monacoBase: '...' } })
|
|
310
|
-
use
|
|
311
|
-
monaco.config({ paths: { vs: '...' } })
|
|
312
|
-
|
|
313
|
-
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
314
|
-
`},OT=fee(gee)(kD),yee={config:mee},vee=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(a){return n.reduceRight(function(s,l){return l(s)},a)}};function DD(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],DD(e[n],t[n]))}),TT(TT({},e),t)}var bee={type:"cancelation",msg:"operation is manually canceled"};function Fg(e){var t=!1,n=new Promise(function(r,a){e.then(function(s){return t?a(bee):r(s)}),e.catch(a)});return n.cancel=function(){return t=!0},n}var _ee=uee.create({config:dee,isInitialized:!1,resolve:null,reject:null,monaco:null}),ID=GJ(_ee,2),tu=ID[0],Rh=ID[1];function xee(e){var t=yee.config(e),n=t.monaco,r=FJ(t,["monaco"]);Rh(function(a){return{config:DD(a.config,r),monaco:n}})}function Eee(){var e=tu(function(t){var n=t.monaco,r=t.isInitialized,a=t.resolve;return{monaco:n,isInitialized:r,resolve:a}});if(!e.isInitialized){if(Rh({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Fg(Gg);if(window.monaco&&window.monaco.editor)return LD(window.monaco),e.resolve(window.monaco),Fg(Gg);vee(See,wee)(Tee)}return Fg(Gg)}function See(e){return document.body.appendChild(e)}function Aee(e){var t=document.createElement("script");return e&&(t.src=e),t}function wee(e){var t=tu(function(r){var a=r.config,s=r.reject;return{config:a,reject:s}}),n=Aee("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function Tee(){var e=tu(function(n){var r=n.config,a=n.resolve,s=n.reject;return{config:r,resolve:a,reject:s}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){LD(n),e.resolve(n)},function(n){e.reject(n)})}function LD(e){tu().monaco||Rh({monaco:e})}function Ree(){return tu(function(e){var t=e.monaco;return t})}var Gg=new Promise(function(e,t){return Rh({resolve:e,reject:t})}),jD={config:xee,init:Eee,__getMonacoInstance:Ree},Cee={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Kg=Cee,Nee={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Oee=Nee;function kee({children:e}){return $e.createElement("div",{style:Oee.container},e)}var Dee=kee,Iee=Dee;function Lee({width:e,height:t,isEditorReady:n,loading:r,_ref:a,className:s,wrapperProps:l}){return $e.createElement("section",{style:{...Kg.wrapper,width:e,height:t},...l},!n&&$e.createElement(Iee,null,r),$e.createElement("div",{ref:a,style:{...Kg.fullWidth,...!n&&Kg.hide},className:s}))}var jee=Lee,MD=E.memo(jee);function Mee(e){E.useEffect(e,[])}var PD=Mee;function Pee(e,t,n=!0){let r=E.useRef(!0);E.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Vn=Pee;function hc(){}function ds(e,t,n,r){return zee(e,r)||Vee(e,t,n,r)}function zee(e,t){return e.editor.getModel(zD(e,t))}function Vee(e,t,n,r){return e.editor.createModel(t,n,r?zD(e,r):void 0)}function zD(e,t){return e.Uri.parse(t)}function Bee({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:a,originalModelPath:s,modifiedModelPath:l,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:d=!1,theme:h="light",loading:m="Loading...",options:y={},height:g="100%",width:v="100%",className:_,wrapperProps:S={},beforeMount:A=hc,onMount:w=hc}){let[T,C]=E.useState(!1),[k,N]=E.useState(!0),L=E.useRef(null),D=E.useRef(null),j=E.useRef(null),V=E.useRef(w),U=E.useRef(A),ue=E.useRef(!1);PD(()=>{let ee=jD.init();return ee.then(H=>(D.current=H)&&N(!1)).catch(H=>(H==null?void 0:H.type)!=="cancelation"&&console.error("Monaco initialization: error:",H)),()=>L.current?Y():ee.cancel()}),Vn(()=>{if(L.current&&D.current){let ee=L.current.getOriginalEditor(),H=ds(D.current,e||"",r||n||"text",s||"");H!==ee.getModel()&&ee.setModel(H)}},[s],T),Vn(()=>{if(L.current&&D.current){let ee=L.current.getModifiedEditor(),H=ds(D.current,t||"",a||n||"text",l||"");H!==ee.getModel()&&ee.setModel(H)}},[l],T),Vn(()=>{let ee=L.current.getModifiedEditor();ee.getOption(D.current.editor.EditorOption.readOnly)?ee.setValue(t||""):t!==ee.getValue()&&(ee.executeEdits("",[{range:ee.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),ee.pushUndoStop())},[t],T),Vn(()=>{var ee,H;(H=(ee=L.current)==null?void 0:ee.getModel())==null||H.original.setValue(e||"")},[e],T),Vn(()=>{let{original:ee,modified:H}=L.current.getModel();D.current.editor.setModelLanguage(ee,r||n||"text"),D.current.editor.setModelLanguage(H,a||n||"text")},[n,r,a],T),Vn(()=>{var ee;(ee=D.current)==null||ee.editor.setTheme(h)},[h],T),Vn(()=>{var ee;(ee=L.current)==null||ee.updateOptions(y)},[y],T);let ie=E.useCallback(()=>{var ne;if(!D.current)return;U.current(D.current);let ee=ds(D.current,e||"",r||n||"text",s||""),H=ds(D.current,t||"",a||n||"text",l||"");(ne=L.current)==null||ne.setModel({original:ee,modified:H})},[n,t,a,e,r,s,l]),fe=E.useCallback(()=>{var ee;!ue.current&&j.current&&(L.current=D.current.editor.createDiffEditor(j.current,{automaticLayout:!0,...y}),ie(),(ee=D.current)==null||ee.editor.setTheme(h),C(!0),ue.current=!0)},[y,h,ie]);E.useEffect(()=>{T&&V.current(L.current,D.current)},[T]),E.useEffect(()=>{!k&&!T&&fe()},[k,T,fe]);function Y(){var H,ne,K,ye;let ee=(H=L.current)==null?void 0:H.getModel();u||((ne=ee==null?void 0:ee.original)==null||ne.dispose()),d||((K=ee==null?void 0:ee.modified)==null||K.dispose()),(ye=L.current)==null||ye.dispose()}return $e.createElement(MD,{width:v,height:g,isEditorReady:T,loading:m,_ref:j,className:_,wrapperProps:S})}var Uee=Bee;E.memo(Uee);function $ee(e){let t=E.useRef();return E.useEffect(()=>{t.current=e},[e]),t.current}var Hee=$ee,Bd=new Map;function Fee({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:a,path:s,theme:l="light",line:u,loading:d="Loading...",options:h={},overrideServices:m={},saveViewState:y=!0,keepCurrentModel:g=!1,width:v="100%",height:_="100%",className:S,wrapperProps:A={},beforeMount:w=hc,onMount:T=hc,onChange:C,onValidate:k=hc}){let[N,L]=E.useState(!1),[D,j]=E.useState(!0),V=E.useRef(null),U=E.useRef(null),ue=E.useRef(null),ie=E.useRef(T),fe=E.useRef(w),Y=E.useRef(),ee=E.useRef(r),H=Hee(s),ne=E.useRef(!1),K=E.useRef(!1);PD(()=>{let X=jD.init();return X.then($=>(V.current=$)&&j(!1)).catch($=>($==null?void 0:$.type)!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>U.current?P():X.cancel()}),Vn(()=>{var $,Q,re,he;let X=ds(V.current,e||r||"",t||a||"",s||n||"");X!==(($=U.current)==null?void 0:$.getModel())&&(y&&Bd.set(H,(Q=U.current)==null?void 0:Q.saveViewState()),(re=U.current)==null||re.setModel(X),y&&((he=U.current)==null||he.restoreViewState(Bd.get(s))))},[s],N),Vn(()=>{var X;(X=U.current)==null||X.updateOptions(h)},[h],N),Vn(()=>{!U.current||r===void 0||(U.current.getOption(V.current.editor.EditorOption.readOnly)?U.current.setValue(r):r!==U.current.getValue()&&(K.current=!0,U.current.executeEdits("",[{range:U.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),U.current.pushUndoStop(),K.current=!1))},[r],N),Vn(()=>{var $,Q;let X=($=U.current)==null?void 0:$.getModel();X&&a&&((Q=V.current)==null||Q.editor.setModelLanguage(X,a))},[a],N),Vn(()=>{var X;u!==void 0&&((X=U.current)==null||X.revealLine(u))},[u],N),Vn(()=>{var X;(X=V.current)==null||X.editor.setTheme(l)},[l],N);let ye=E.useCallback(()=>{var X;if(!(!ue.current||!V.current)&&!ne.current){fe.current(V.current);let $=s||n,Q=ds(V.current,r||e||"",t||a||"",$||"");U.current=(X=V.current)==null?void 0:X.editor.create(ue.current,{model:Q,automaticLayout:!0,...h},m),y&&U.current.restoreViewState(Bd.get($)),V.current.editor.setTheme(l),u!==void 0&&U.current.revealLine(u),L(!0),ne.current=!0}},[e,t,n,r,a,s,h,m,y,l,u]);E.useEffect(()=>{N&&ie.current(U.current,V.current)},[N]),E.useEffect(()=>{!D&&!N&&ye()},[D,N,ye]),ee.current=r,E.useEffect(()=>{var X,$;N&&C&&((X=Y.current)==null||X.dispose(),Y.current=($=U.current)==null?void 0:$.onDidChangeModelContent(Q=>{K.current||C(U.current.getValue(),Q)}))},[N,C]),E.useEffect(()=>{if(N){let X=V.current.editor.onDidChangeMarkers($=>{var re;let Q=(re=U.current.getModel())==null?void 0:re.uri;if(Q&&$.find(he=>he.path===Q.path)){let he=V.current.editor.getModelMarkers({resource:Q});k==null||k(he)}});return()=>{X==null||X.dispose()}}return()=>{}},[N,k]);function P(){var X,$;(X=Y.current)==null||X.dispose(),g?y&&Bd.set(s,U.current.saveViewState()):($=U.current.getModel())==null||$.dispose(),U.current.dispose()}return $e.createElement(MD,{width:v,height:_,isEditorReady:N,loading:d,_ref:ue,className:S,wrapperProps:A})}var Gee=Fee,Kee=E.memo(Gee);const Zee=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:a=!0,isReadOnly:s=!1,onChange:l})=>{const u=E.useRef(null),d=E.useRef(null),[h,m]=E.useState({height:0,width:0}),y=E.useMemo(()=>n?"vs-dark-transparent":"hc-light-theme",[n]),g=(_,S)=>{var w;d.current=_;const A=(_.getContentHeight()??0)+25;S.editor.defineTheme("vs-dark-transparent",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),S.editor.defineTheme("hc-light-theme",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),S.editor.setTheme(y),S.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),S.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),S.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),S.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),m({height:A,width:((w=u.current)==null?void 0:w.clientWidth)??0})},v=r??e.split(`
|
|
315
|
-
`).length>1;return b.jsxs("div",{className:Ae("relative h-full w-full text-sm",r&&"ml-0"),children:[a&&b.jsx("div",{className:"sticky top-5 z-10",children:b.jsx("div",{className:Ae("absolute bottom-0 right-2 flex h-7 items-center"),children:b.jsx(OD,{content:e})})}),b.jsx("div",{className:"z-0 grid size-full grid-cols-[0px] overflow-auto",ref:u,children:b.jsx(Kee,{...h,defaultLanguage:"typescript",language:t,loading:b.jsx(ys,{}),defaultValue:String(e).replace(/\n$/,""),onMount:g,onChange:l,options:{readOnly:s,cursorStyle:"line",minimap:{enabled:!1},scrollbar:{vertical:"hidden",verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:"off",quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:v?"on":"off"},theme:y,className:"my-2 rounded-md"})})]})},qee=({dictionary:e,isDarkMode:t})=>{const{setEditedContent:n,editedContent:r}=Sn(),a=l=>{try{return JSON.parse(l),!0}catch{return!1}},s=E.useMemo(()=>{var l;return((l=r==null?void 0:r[e.key])==null?void 0:l.content)??(e==null?void 0:e.content)??{}},[e]);return b.jsx(qr,{background:"none",border:!0,roundedSize:"xl",className:"w-full overflow-hidden p-3",children:b.jsx(Zee,{language:"json",onChange:l=>{a(l??"{}")&&n(e.key,JSON.parse(l??"{}"))},isDarkMode:t,children:JSON.stringify(s,null,2)})})},Wee={key:"node-type-selector",content:{triggerPlaceHolder:ge({en:"Node type","en-GB":"Node type",fr:"Type du Nœud",es:"Tipo del nodo",de:"Knotentyp",ja:"ノードタイプ",ko:"노드 유형",zh:"节点类型",it:"Tipo di nodo",pt:"Tipo de nó",hi:"नोड प्रकार",ar:"نوع العقدة",ru:"Тип узла"}),multilingual:ge({en:"Multilingual content","en-GB":"Multilingual content",fr:"Contenu Multilingue",es:"Contenido multilingüe",de:"Mehrsprachiger Inhalt",ja:"複数言語コンテンツ",ko:"다중 언어 콘텐츠",zh:"多语言内容",it:"Contenuto multilingue",pt:"Conteúdo multilíngue",hi:"बहुभाषी सामग्री",ar:"محتوى متعدد اللغات",ru:"Многоязычный контент"}),text:ge({en:"Text","en-GB":"Text",fr:"Texte",es:"Texto",de:"Text",ja:"テキスト",ko:"텍스트",zh:"文本",it:"Testo",pt:"Texto",hi:"पाठ",ar:"نص",ru:"Текст"}),number:ge({en:"Number","en-GB":"Number",fr:"Nombre",es:"Número",de:"Zahl",ja:"数字",ko:"숫자",zh:"数字",it:"Numero",pt:"Número",hi:"संख्या",ar:"رقم",ru:"Число"}),boolean:ge({en:"Boolean","en-GB":"Boolean",fr:"Booléen",es:"Booleano",de:"Bool",ja:"ブール",ko:"불리언",zh:"布尔",it:"Booleano",pt:"Booleano",hi:"बूलियन",ar:"منطقي",ru:"Булево"}),node:ge({en:"Object","en-GB":"Object",fr:"Objet",es:"Objeto",de:"Objekt",ja:"オブジェクト",ko:"객체",zh:"对象",it:"Oggetto",pt:"Objeto",hi:"ऑब्जेक्ट",ar:"كائن",ru:"Объект"}),array:ge({en:"Array","en-GB":"Array",fr:"Tableau",es:"Arreglo",de:"Array",ja:"配列",ko:"배열",zh:"数组",it:"Array",pt:"Array",hi:"ऐरे",ar:"مصفوفة",ru:"Массив"}),enumeration:ge({en:"Enumeration","en-GB":"Enumeration",fr:"Énumération",es:"Enumeración",de:"Enumeration",ja:"列挙",ko:"열거",zh:"枚举",it:"Enumerazione",pt:"Enumeração",hi:"गणना",ar:"تعداد",ru:"Перечисление"}),nest:ge({en:"Nesting","en-GB":"Nesting",fr:"Imbriquation",es:"Anidación",de:"Vererbung",ja:"ネスト",ko:"중첩",zh:"嵌套",it:"Nidificazione",pt:"Nido",hi:"नेस्टेंस",ar:"مستوى",ru:"Вложенность",nl:"Nest"}),insertion:ge({en:"Insertion","en-GB":"Insertion",fr:"Insertion",es:"Inserción",de:"Einfügung",ja:"挿入",ko:"삽입",zh:"插入",it:"Inserimento",pt:"Inserção",hi:"सम्मिलन",ar:"إدراج",ru:"Вставка"}),condition:ge({en:"Condition","en-GB":"Condition",fr:"Condition",es:"Condición",de:"Bedingung",ja:"条件",ko:"조건",zh:"条件",it:"Condizione",pt:"Condição",hi:"शर्त्ता",ar:"شرط",ru:"Условие"}),file:ge({en:"File","en-GB":"File",fr:"Fichier",es:"Archivo",de:"Datei",ja:"ファイル",ko:"파일",zh:"文件",it:"File",pt:"Arquivo",hi:"फ़ाइल",ar:"ملف",ru:"Файл"}),markdown:ge({en:"Markdown","en-GB":"Markdown",fr:"Markdown",es:"Markdown",de:"Markdown",ja:"マークダウン",ko:"마크다운",zh:"Markdown",it:"Markdown",pt:"Markdown",hi:"मार्कडाउन",ar:"مارك داون",ru:"Markdown"}),reactNode:ge({en:"React Node","en-GB":"React Node",fr:"Node React",es:"Nodo React",de:"React-Knoten",ja:"リアル・ノード",ko:"리액 노드",zh:"React 节点",it:"Nodo React",pt:"Nó React",hi:"रेड नोड",ar:"عقدة رياكت",ru:"Реакт узел"})}},Ud=({section:e,onValueChange:t})=>{const{multilingual:n,text:r,number:a,boolean:s,node:l,array:u,enumeration:d,triggerPlaceHolder:h,nest:m,condition:y,markdown:g,insertion:v,reactNode:_,file:S}=Qt(Wee),A=As(e),[w,T]=E.useState(A),C=k=>{T(k),t(k)};return b.jsxs(Ie,{value:w,onValueChange:C,children:[b.jsx(Ie.Trigger,{children:b.jsx(Ie.Value,{placeholder:h})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:Z.Translation,children:n}),b.jsx(Ie.Item,{value:Z.Text,children:r}),b.jsx(Ie.Item,{value:Z.Number,children:a}),b.jsx(Ie.Item,{value:Z.Boolean,children:s}),b.jsx(Ie.Item,{value:Z.Object,children:l}),b.jsx(Ie.Item,{value:Z.Array,children:u}),b.jsx(Ie.Item,{value:Z.Enumeration,children:d}),b.jsx(Ie.Item,{value:Z.Insertion,children:v}),b.jsx(Ie.Item,{value:Z.Markdown,children:g}),b.jsx(Ie.Item,{value:Z.Nested,children:m}),b.jsx(Ie.Item,{value:Z.Condition,children:y}),b.jsx(Ie.Item,{value:Z.ReactNode,disabled:!0,children:_}),b.jsx(Ie.Item,{value:Z.File,children:S})]})]})},VD={key:"editor-view",content:{titleInput:{placeholder:ge({en:"Enter the key of your node","en-GB":"Enter the key of your node",fr:"Entrez la clé de votre nœud",es:"Ingrese la clave de su nodo",de:"Geben Sie den Schlüssel Ihres Knotens ein",ja:"ノードのキーを入力してください",ko:"노드의 키를 입력하세요",zh:"输入您节点的键",it:"Inserisci la chiave del tuo nodo",pt:"Insira a chave do seu nó",hi:"अपनी नोड की कुंजी दर्ज करें",ar:"أدخل مفتاح العقدة الخاص بك",ru:"Введите ключ вашего узла"})},deleteButton:{label:ge({en:"Remove node from section","en-GB":"Remove node from section",fr:"Supprimer le nœud de la section",es:"Eliminar el nodo de la sección",de:"Knoten aus dem Abschnitt entfernen",ja:"セクションからノードを削除",ko:"섹션에서 노드를 제거",zh:"从部分中移除节点",it:"Rimuovi nodo dalla sezione",pt:"Remover nó da seção",hi:"सेक्शन से नोड हटाएं",ar:"إزالة العقدة من القسم",ru:"Удалить узел из секции"})},addNodeButton:{label:ge({en:"Click to add a new node","en-GB":"Click to add a new node",fr:"Cliquez pour ajouter un nouveau nœud",es:"Haga clic para agregar un nuevo nodo",de:"Klicken, um einen neuen Knoten hinzuzufügen",ja:"新しいノードを追加するにはクリックしてください",ko:"새 노드를 추가하려면 클릭하세요",zh:"点击添加新节点",it:"Fai clic per aggiungere un nuovo nodo",pt:"Clique para adicionar um novo nó",hi:"नया नोड जोड़ने के लिए क्लिक करें",ar:"انقر لإضافة عقدة جديدة",ru:"Нажмите, чтобы добавить новый узел"}),text:ge({en:"Add a new node","en-GB":"Add a new node",fr:"Ajouter un nouveau nœud",es:"Agregar un nuevo nodo",de:"Neuen Knoten hinzufügen",ja:"新しいノードを追加",ko:"새 노드 추가",zh:"添加新节点",it:"Aggiungi un nuovo nodo",pt:"Adicionar um novo nó",hi:"नया नोड जोड़ें",ar:"إضافة عقدة جديدة",ru:"Добавить новый узел"})}}},lv=({section:e,dictionaryKey:t,keyPath:n,onNodeTypeChange:r})=>{var d;const a=((d=Fr())==null?void 0:d.internationalization.locales)??[],s=As(e),l=LT(e),u=h=>{const m=zl(s,a,h);r(m)};if(s===Z.Translation||s===Z.Condition||s===Z.Enumeration){const h=Object.keys(e[s])[0],m=[...n,{type:s,key:h}];return b.jsxs("div",{className:"flex w-full flex-col gap-1",children:[b.jsx(Ud,{section:e,onValueChange:y=>r(zl(y,a))}),b.jsx(lv,{section:l,keyPath:m,dictionaryKey:t,onNodeTypeChange:u})]})}if(s===Z.Array){const h=[...n,{type:s,key:0}];return b.jsxs("div",{className:"flex w-full flex-col gap-1",children:[b.jsx(Ud,{section:e,onValueChange:m=>r(zl(m,a))}),b.jsx(lv,{section:l,keyPath:h,dictionaryKey:t,onNodeTypeChange:u})]})}return s===Z.Object?b.jsxs(b.Fragment,{children:[b.jsx(Ud,{section:e,onValueChange:h=>r(zl(h,a))}),b.jsx("div",{className:"ml-10 mt-6",children:b.jsx(Xee,{keyPath:n,section:e,dictionaryKey:t})})]}):b.jsx(Ud,{section:e,onValueChange:h=>r(zl(h,a))})},n0=({sectionKey:e,section:t,keyPath:n,dictionaryKey:r})=>{const{focusedContent:a,setFocusedContentKeyPath:s}=la(),{renameEditedContent:l,addEditedContent:u}=ws(),{titleInput:d,deleteButton:h}=Qt(VD),m=y=>{l(r,y,n);const g=n.slice(0,-1),v=n[n.length-1],_=[...g,{...v,key:y}];s(_)};return b.jsx(qr,{transparency:"xl",roundedSize:"xl",className:"w-full min-w-80 gap-2 overflow-auto px-5 py-2",border:!0,borderColor:"text",background:"none","aria-selected":Lc(n,(a==null?void 0:a.keyPath)??[]),onClick:()=>s(n),children:b.jsxs("div",{className:"flex w-full flex-col items-start justify-between gap-3",children:[typeof e=="string"&&b.jsxs("div",{className:"w-full",children:[b.jsxs("div",{className:"flex w-full items-center justify-between gap-10",children:[b.jsx(NR,{name:"key","aria-label":"Key",placeholder:d.placeholder.value,defaultValue:e,onSave:y=>m(y),variant:"invisible"}),b.jsx(ut,{label:h.label.value,variant:"hoverable",size:"icon-sm",color:"text",className:"translate-x-2",Icon:Yf,onClick:()=>{u(r,void 0,n);const y=n.slice(0,-1);s(y)}})]}),b.jsxs("span",{className:"text-neutral ml-3 text-sm",children:["( ",of(e)," )"]})]}),b.jsx(lv,{keyPath:n,dictionaryKey:r,section:t,onNodeTypeChange:y=>{u(r,y,n)}})]})})},Yee=({section:e,keyPath:t,dictionaryKey:n})=>{const{addNodeButton:r}=Qt(VD),{setFocusedContentKeyPath:a}=dv(),{addEditedContent:s}=ws();return!e||typeof e!="object"?b.jsx("div",{children:"Not an object"}):b.jsxs("div",{className:"flex flex-col gap-2 overflow-y-scroll",children:[b.jsx("ul",{className:"mr-auto flex flex-col gap-4",children:Object.keys(e).map(l=>b.jsx("li",{className:"flex w-full",children:b.jsx(n0,{sectionKey:l,section:e==null?void 0:e[l],keyPath:[...t,{type:Z.Object,key:l}],dictionaryKey:n})},l))}),b.jsx(ut,{label:r.label.value,variant:"hoverable",size:"md",color:"text",Icon:Wf,className:"flex-1",onClick:()=>{const u=[...t,{type:Z.Object,key:"newKey"}];s(n,"",u),a(u)},children:r.text})]})},Xee=({section:e,keyPath:t,dictionaryKey:n})=>!e||typeof e!="object"||typeof e.nodeType=="string"?b.jsx(n0,{sectionKey:"content",section:e,keyPath:t,dictionaryKey:n}):b.jsx(Yee,{section:e,keyPath:t,dictionaryKey:n}),Qee=({dictionary:e})=>{var s,l;const{content:t,key:n}=e,{editedContent:r}=Sn(),a=typeof((s=r==null?void 0:r[n])==null?void 0:s.content)>"u"?t:(l=r==null?void 0:r[n])==null?void 0:l.content;return b.jsx(n0,{section:a,keyPath:[],dictionaryKey:e.key})},Jee=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r,onDelete:a})=>{const s=Fr(),[l,u]=E.useState(1),{returnToDictionaryList:d}=Qt(UJ),{setFocusedContent:h}=dv(),{setLocaleDictionaries:m}=Gf();return E.useEffect(()=>{h(y=>({...y??{},dictionaryKey:e.key})),m(y=>({...y,[e.key]:e}))},[]),b.jsx(pq,{availableLocales:(s==null?void 0:s.internationalization.locales)??[],children:b.jsxs("div",{className:"flex size-full flex-col gap-6 px-2",children:[b.jsx(ut,{onClick:t,variant:"hoverable",className:"z-10 ml-5 mr-auto",color:"text",Icon:vz,label:d.label.value,children:d.text}),b.jsx(Zc,{defaultValue:l,onChange:y=>u(y),color:"text",size:"sm",className:"m-auto w-full max-w-xl",choices:[{content:"Details",value:0},{content:"Structure",value:2},{content:"Content",value:1},{content:"JSON",value:3}].filter(({value:y})=>!(!r.includes("remote")&&y===0))}),l===0&&b.jsx(BJ,{dictionary:e}),l===2&&b.jsx(Qee,{dictionary:e}),l===1&&b.jsx(MJ,{dictionary:e,isDarkMode:n}),l===3&&b.jsx(qee,{dictionary:e,isDarkMode:n}),b.jsx(dk,{dictionary:e,mode:r,onDelete:()=>{h(null),a==null||a()}})]})})},ete=({children:e,isHidden:t,minWidth:n=0,align:r="left",className:a,...s})=>b.jsx("div",{className:Ae("relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out",t?"":"grid-cols-[1fr]",a),"aria-hidden":t,...s,children:b.jsx("div",{style:{minWidth:`${n}px`},tabIndex:t!==!1?void 0:-1,className:Ae(r==="right"&&"ml-auto"),children:e})}),tte=e=>{const t=e.getBoundingClientRect(),n=t.top,r=t.bottom;if(n>=0&&r<=window.innerHeight){const s=t.left+t.width/2,l=t.top+10,u=document.elementFromPoint(s,l);return e===u||e.contains(u)}return!1},Ch=B1((e,t)=>({drawers:{},open:n=>e(r=>({drawers:{...r.drawers,[n]:!0}})),close:n=>e(r=>({drawers:{...r.drawers,[n]:!1}})),isOpen:n=>t().drawers[n]??!1})),BD=({title:e,identifier:t,children:n,header:r,closeOnOutsideClick:a=!0,backButton:s,isOpen:l,onClose:u})=>{const{isMobile:d}=dq("md"),h=E.useRef(null),m=E.useRef(null),{close:y,open:g,isOpen:v}=Ch(sk(S=>({close:()=>S.close(t),open:()=>S.open(t),isOpen:S.isOpen(t)})));lk({disableScroll:v,key:t?`right_drawer_${t}`:"right_drawer"}),E.useEffect(()=>{const S=A=>{try{if(!h.current)return;const w=v&&a,T=A.target&&!h.current.contains(A.target),C=tte(h.current);(w&&T&&C||!A.target)&&(y(),u==null||u())}catch{y(),u==null||u()}};return window.addEventListener("mousedown",S),()=>window.removeEventListener("mousedown",S)},[v,y,u,a,t]),E.useEffect(()=>{l!==void 0&&(l?g():(y(),u==null||u()))},[y,g,u,l,t]);const _=S=>{S.target===S.currentTarget&&d&&(y(),u==null||u())};return b.jsx("div",{className:"fixed right-0 top-0 z-50 flex h-full justify-end",children:b.jsx(ete,{isHidden:!v,align:"right",children:b.jsxs(qr,{className:"text-text relative flex h-screen w-screen flex-col md:w-[400px]",ref:h,roundedSize:"none",children:[b.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[b.jsxs("div",{className:"flex justify-between gap-3",children:[b.jsx("div",{children:s&&b.jsx(ut,{variant:"hoverable",color:"text",label:s.text??"Go back",onClick:s.onBack,Icon:Az,children:s==null?void 0:s.text})}),b.jsx("div",{children:b.jsx(ut,{variant:"hoverable",color:"text",label:"Close",className:"ml-auto",onClick:y,Icon:uo,size:"icon-md"})})]}),e&&b.jsx("h2",{className:"flex items-center justify-center text-lg font-bold",children:e}),r]}),b.jsx("div",{className:"flex h-full flex-col overflow-y-auto p-2",children:b.jsx("div",{className:"flex flex-1 flex-col",onClick:_,ref:m,children:n})})]})})})},nte=()=>{const{toasts:e}=oR();return b.jsxs(rU.Provider,{children:[e.map(({id:t,title:n,description:r,action:a,...s})=>b.jsxs(oU,{...s,children:[b.jsxs("div",{className:"grid gap-1",children:[n&&b.jsx(lU,{children:n}),r&&b.jsx(cU,{children:r})]}),a,b.jsx(sU,{})]},t)),b.jsx(iU,{})]})},UD=(...e)=>{const{localeDictionaries:t}=GT(),{data:n,isWaitingData:r}=_U(...e),a=E.useMemo(()=>((n==null?void 0:n.data)??[]).reduce((l,u)=>(l[u.key]=u,l),{}),[n]),s=E.useMemo(()=>kU(a??{},t),[a,t]);return{online:a,locale:t,all:s,isLoading:r}},rte=({children:e})=>b.jsx(c9,{features:HK,children:e}),ite=({children:e})=>b.jsx(rte,{children:b.jsxs(XV,{children:[b.jsx(nte,{}),e]})}),ate=({children:e})=>b.jsx(tz,{children:b.jsx(kP,{children:b.jsx(m1,{path:"*",element:e})})}),cv="dictionaryList",$D={key:"dictionary-edition-drawer",content:{openDictionaryEditor:{label:ge({en:"Click to open the dictionary in the editor",fr:"Cliquez pour ouvrir le dictionnaire dans l’éditeur",es:"Haga clic para abrir el diccionario en el editor",de:"Klicken Sie hier, um das Wörterbuch im Editor zu öffnen",ja:"エディターで辞書を開く",ko:"편집기에서 사전 열기",zh:"点击打开词典到编辑器",it:"Fai clic per aprire il dizionario nell’editor",pt:"Clique para abrir o dicionário no editor",hi:"एडिटर में शब्दकोश खोलने के लिए क्लिक करें",ar:"انقر لفتح قاموس في المحرر",ru:"Нажмите, чтобы открыть словарь в редакторе","en-GB":"Click to open the dictionary in the editor"})},backButtonText:ge({en:"Dictionary list",fr:"Liste des dictionnaires",es:"Lista de diccionarios",de:"Wörterbuchliste",ja:"辞書リスト",ko:"사전 목록",zh:"词典列表",it:"Elenco di dizionari",pt:"Lista de dicionários",hi:"शब्दकोश सूची",ar:"قائمة القوامل",ru:"Список словарей","en-GB":"Dictionary list"}),modalTitle:ge({en:"Edit dictionary",fr:"Modifier le dictionnaire",es:"Editar el diccionario",de:"Wörterbuch bearbeiten",ja:"辞書を編集",ko:"사전 편집",zh:"编辑词典",it:"Modifica dizionario",pt:"Editar dicionário",hi:"शब्दकोश संपादित करें",ar:"تحرير قاموس",ru:"Редактировать словарь","en-GB":"Edit dictionary"}),noDictionaryFocused:ge({en:"No dictionary focused",fr:"Aucun dictionnaire sélectionné",es:"No hay diccionario enfocado",de:"Kein Wörterbuch ausgewählt",ja:"フォーカスされた辞書がありません",ko:"포커스가 있는 사전이 없습니다",zh:"没有聚焦的词典",it:"Nessun dizionario selezionato",pt:"Nenhum dicionário focalizado",hi:"कोई फोकस शब्दकोश नहीं है",ar:"لا يوجد قاموس مرتبط",ru:"Нет фокусированного словаря","en-GB":"No dictionary focused"})}},r0=e=>`dictionary_edition_${e}`,HD=e=>{const t=r0(e),{isOpen:n,open:r,close:a}=Ch(),{getEditedContentValue:s}=ws(),{focusedContent:l,setFocusedContent:u}=la();return E.useEffect(()=>{var d;l&&(((d=l.keyPath)==null?void 0:d.length)??0)>0&&r(t)},[l,r,t]),{isOpen:n(t),focusedContent:l,getEditedContentValue:s,close:()=>{a(t),u(d=>d!=null&&d.dictionaryKey?{...d,keyPath:[]}:d)}}},ote=({locale:e,identifier:t,handleOnBack:n,isDarkMode:r})=>{const{modalTitle:a,openDictionaryEditor:s}=Qt($D),[l,u]=E.useState(!1),{all:d}=UD(),{focusedContent:h}=HD(t),m=E.useCallback(()=>{u(!1),n()},[n]),y=h==null?void 0:h.dictionaryKey;if(!y)return b.jsx(b.Fragment,{children:"No dictionary focused"});const g=d[y];return g?b.jsxs(b.Fragment,{children:[b.jsx(ck,{isOpen:l,onClose:()=>u(!1),hasCloseButton:!0,title:a.value,size:"xl",transparency:"lg",children:b.jsx("div",{className:"size-full px-3 pt-5",children:b.jsx(Jee,{dictionary:g,onClickDictionaryList:m,isDarkMode:r,mode:["local","remote"],onDelete:()=>{u(!1),n()}})})}),b.jsxs("div",{className:"border-text/20 /20 mb-5 flex w-full border-b border-dashed px-3 pb-2",children:[b.jsx("h3",{className:"w-full text-center text-lg",children:g.title?g.title:g.key}),b.jsx(ut,{variant:"hoverable",color:"text",size:"icon-md",IconRight:S1,label:s.label.value,onClick:()=>u(!0)})]}),b.jsx(xZ,{dictionary:g,locale:e,mode:["local","remote"]})]}):b.jsx(b.Fragment,{children:"No dictionary focused"})},ste=({locale:e,dictionaryKey:t,isDarkMode:n})=>{const{backButtonText:r}=Qt($D),a=r0(t),{focusedContent:s,close:l}=HD(t),{openDictionaryListDrawer:u}=Ch(h=>({openDictionaryListDrawer:()=>h.open(cv)})),d=()=>{l(),u()};return b.jsx(BD,{identifier:a,backButton:{onBack:d,text:r.value},onClose:l,children:s&&b.jsx(ote,{focusedContent:s,locale:e,identifier:a,handleOnBack:d,isDarkMode:n})})},lte=({locale:e,isDarkMode:t})=>{const{focusedContent:n}=la(),r=n==null?void 0:n.dictionaryKey;return r?b.jsx(ste,{locale:e,dictionaryKey:r,isDarkMode:t}):b.jsx(b.Fragment,{})},cte=()=>{const{all:e}=UD(),t=Object.keys(e),{close:n,open:r}=Ch(),{editedContent:a}=Sn(),{setFocusedContent:s}=la(),l=d=>{n(cv);const{filePath:h}=e[d];s({dictionaryKey:d,dictionaryPath:h}),r(r0(d))},u=d=>Object.keys(a??{}).includes(d);return b.jsx(BD,{title:"Dictionary list",identifier:cv,children:t.map(d=>b.jsx("div",{children:b.jsx(ut,{label:`Open dictionary editor ${d}`,onClick:()=>l(d),variant:"hoverable",color:"text",IconRight:uf,size:"md",isFullWidth:!0,children:u(d)?`✎ ${d}`:d})},d))})},ute=({children:e})=>{const[t]=lo(lr.INTLAYER_CURRENT_LOCALE,void 0,{receive:!0,emit:!1}),{data:n}=CU({autoFetch:!0}),{setLocaleDictionaries:r}=Gf();return E.useEffect(()=>{n&&r(n)},[n]),b.jsxs("div",{className:"bg-card relative size-full p-3",children:[e,b.jsx(lte,{locale:t}),b.jsx(cte,{})]})},dte=()=>{const[e,t]=E.useState();return E.useEffect(()=>{fetch("/api/config").then(n=>n.json()).then(n=>t(n.data))},[]),e},fte=({children:e,iframeRef:t})=>{const n=dte(),r=n!=null&&n.editor.applicationURL?n==null?void 0:n.editor.applicationURL:"*",a=(n==null?void 0:n.editor.editorURL)??"*";return n?b.jsx(_M,{postMessage:s=>{var l,u;window==null||window.postMessage(s,a),(u=(l=t.current)==null?void 0:l.contentWindow)==null||u.postMessage(s,r)},allowedOrigins:[r,a],mode:"editor",configuration:n,children:e}):b.jsx(ys,{})},hte=()=>{const{editedContent:e,setEditedContentState:t}=Sn(),n=()=>{const r=localStorage==null?void 0:localStorage.getItem("INTLAYER_EDITED_CONTENT_CHANGED");if(r)try{const a=JSON.parse(r);t(a)}catch(a){console.error(a)}};return E.useEffect(()=>{typeof e>"u"||localStorage==null||localStorage.setItem("INTLAYER_EDITED_CONTENT_CHANGED",JSON.stringify(e))},[e]),E.useEffect(()=>{typeof e<"u"||n()},[]),n},mte=(...e)=>M1(Xf(e)),pte={key:"no-application-url-view",content:{title:ge({en:"Your project configuration do not includes application URL","en-GB":"Your project configuration do not includes application URL",fr:"Votre configuration de projet ne comprend pas l’URL de l’application",es:"Su configuración de proyecto no incluye la URL de la aplicación",de:"Ihre Projektkonfiguration enthält keine Anwendungs-URL",ja:"あなたのプロジェクト構成にはアプリケーション URL が含まれていません",ko:"당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.",zh:"您的项目配置未包含应用程序 URL",pt:"Sua configuração do projeto não inclui a URL do aplicativo",ru:"Ваша конфигурация проекта не включает URL-адрес приложения",ar:"تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق",hi:"आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है",it:"La configurazione del progetto non include l’URL dell’applicazione"}),description:ge({en:"To use the editor, you need to add the URL of the application to access to the configuration file.","en-GB":"To use the editor, you need to add the URL of the application to access to the configuration file.",fr:"Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.",es:"Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.",de:"Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.",ja:"エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。",ko:"에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.",zh:"要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。",pt:"Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.",ru:"Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.",ar:"لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.",hi:"एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।",it:"Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione."}),documentationLink:{label:ge({en:"Click to go to the editor documentation","en-GB":"Click to go to the editor documentation",fr:"Cliquez ici pour accéder à la documentation de l’éditeur",es:"Haga clic aquí para acceder a la documentación del editor",de:"Klicken Sie hier, um die Editor-Dokumentation zu besuchen",ja:"エディターのドキュメントに移動するには、ここをクリックしてください",ko:"에디터 문서로 이동하려면 여기를 클릭하십시오.",zh:"点击此处访问编辑器文档",pt:"Clique aqui para acessar a documentação do editor",ru:"Нажмите, чтобы перейти к документации редактора",ar:"انقر هنا للوصول إلى وثائق المحرر",hi:"एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?",it:"Fai clic qui per accedere alla documentazione dell’editor"}),text:ge({en:"See how to configure the editor","en-GB":"See how to configure the editor",fr:"Voir comment configurer l’éditeur",de:"Siehe, wie man den Editor konfiguriert",ar:"انظر كيفية تكوين المحرر",hi:"एडिटर को काने के बारे में देखें",it:"Vedi come configurare l’editor",ja:"エディターの設定方法を見る",ru:"Смотрите, как настроить редактор",es:"Vea cómo configurar el editor",pt:"Veja como configurar o editor",ko:"에디터 설정 방법을 보십시오",zh:"查看如何配置编辑器"})}}},gte=()=>{const{title:e,description:t,documentationLink:n}=Qt(pte);return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsx(Vb,{className:"mb-8",children:e}),b.jsx("strong",{className:"text-neutral block",children:t}),b.jsx(Bb,{label:n.label.value,href:"https://intlayer.org/doc/concept/configuration#editor-configuration",color:"text",children:n.text})]})},yte=({iframeRef:e,applicationPath:t})=>{const{editor:n}=Fr(),r=()=>a(n.enabled),a=pM();WT(r),hte(),EM();const[s,l]=E.useState(!1),[u]=xM(void 0,{receive:!0,emit:!1});return E.useEffect(()=>{typeof u=="string"&&window.history.replaceState({},"",u)},[u]),n.applicationURL?b.jsxs("div",{className:"size-full overflow-hidden rounded-lg",children:[b.jsx(ys,{isLoading:s}),b.jsx("iframe",{src:`${n.applicationURL}${t}`,title:"Intlayer Application",className:mte("size-full",s&&"hidden"),ref:e,onLoad:()=>{l(!1),r()}})]}):b.jsx("div",{className:"flex size-full items-center justify-center",children:b.jsx(qr,{className:"flex max-w-xl flex-col gap-4 p-6",children:b.jsx(gte,{})})})},vte=()=>{const e=E.useRef(null),t=ca();return b.jsx(fte,{iframeRef:e,children:b.jsx(RM,{disableEditor:!0,children:b.jsx(ute,{children:b.jsx(yte,{iframeRef:e,applicationPath:t.pathname})})})})},bte=()=>b.jsx(ate,{children:b.jsx(ite,{children:b.jsx(vte,{})})});pj.createRoot(document.getElementById("root")).render(b.jsx(E.StrictMode,{children:b.jsx(bte,{})}));
|