intlayer-editor 5.4.0 → 5.4.2
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.
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DMNHImpm.js","assets/html-DQt1crSz.js","assets/javascript-DFxyEsuO.js","assets/css-6ydISZ1j.js","assets/angular-ts-eB8LWD2C.js","assets/scss-DkCoLJBz.js","assets/apl-DSpMDkz7.js","assets/xml-iIRqcNou.js","assets/java-DzEvymKG.js","assets/json-BLmTiKMJ.js","assets/astro-BEfdsCb3.js","assets/typescript-6msxI5qU.js","assets/postcss-BgR6IBVD.js","assets/blade-jtwiscur.js","assets/html-derivative-OoyioBIu.js","assets/sql-D8pCRXw6.js","assets/bsl-BXaZRMg3.js","assets/sdbl-Cflpv1WG.js","assets/cairo-DbSVSKxu.js","assets/python-N_fYzn4k.js","assets/cobol-DLiQ7VlT.js","assets/coffee-CN9rYqj2.js","assets/cpp-D6jLj3ac.js","assets/regexp-we84whta.js","assets/glsl-D6Vaizag.js","assets/c-Du_P13ro.js","assets/crystal-CSXto_ug.js","assets/shellscript-Cs-zf8G1.js","assets/edge-7WOHoDwQ.js","assets/elixir-C8UL7p8J.js","assets/elm-BVJIbDWr.js","assets/erb-2bVwkg7V.js","assets/ruby-Cwn6T5Qb.js","assets/haml-BjHfNtf2.js","assets/graphql-CzqHVaah.js","assets/jsx-Dog42FfX.js","assets/tsx-CHbqLUsD.js","assets/lua-DgKrCl_t.js","assets/yaml-DeMLtiT4.js","assets/fortran-fixed-form-DMTTIQFJ.js","assets/fortran-free-form-FZM7PgI4.js","assets/fsharp-B93pd7q9.js","assets/markdown-CfdnVo6U.js","assets/gdresource-I9Onfmy0.js","assets/gdshader-C8KBts9d.js","assets/gdscript-E0a2itvD.js","assets/git-commit-COHn4upB.js","assets/diff-7a-uGD01.js","assets/git-rebase-D7M3XCeK.js","assets/glimmer-js-DTuRZoQB.js","assets/glimmer-ts-BGh34NOZ.js","assets/hack-BfoaVUmQ.js","assets/handlebars-DN1vFC8Y.js","assets/http-B1MEeU_C.js","assets/hxml-BYnPWQ3Z.js","assets/haxe-BVnfiMDc.js","assets/jinja-CbuI_e8q.js","assets/jison-BThBLrI1.js","assets/julia-QW6AWql5.js","assets/r-15AZnl_Y.js","assets/latex-D6g4IvIb.js","assets/tex-C7L-Ug2D.js","assets/liquid-DwnqW0Hw.js","assets/marko-Ddcey6ql.js","assets/less-CL8eqPyx.js","assets/mdc-BSBcOUr9.js","assets/nginx-C1Yc5-eE.js","assets/nim-CuWg7p6V.js","assets/perl-Bcivc5lk.js","assets/php-XhOgcbHd.js","assets/pug-Ud6KBVuk.js","assets/qml-BdV_SRG6.js","assets/razor-R9tSNI_9.js","assets/csharp-t9jp2bdZ.js","assets/rst-C0h9YO46.js","assets/cmake-C07pmjNf.js","assets/sas-Yvy-jB3G.js","assets/shaderlab-DprXpeCX.js","assets/hlsl-DgLWmsUM.js","assets/shellsession-C_x4i0EA.js","assets/soy-CV61xlNT.js","assets/sparql-Ccgs8XSw.js","assets/turtle-imGXYByQ.js","assets/stata-nt34lD2m.js","assets/svelte-Ue2gIPbO.js","assets/templ-CJFw_bmP.js","assets/go-DSI44sMb.js","assets/ts-tags-B_RTbvdJ.js","assets/twig-DxolMe-m.js","assets/vue-BebZw_gy.js","assets/vue-html-B9Bqf25R.js","assets/xsl-BqXt74Hp.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var dM=Object.defineProperty;var fM=(e,t,n)=>t in e?dM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var le=(e,t,n)=>fM(e,typeof t!="symbol"?t+"":t,n);function hM(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 o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{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 o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fg={exports:{}},ic={};/**
|
|
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 hS;function mM(){if(hS)return ic;hS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return ic.Fragment=t,ic.jsx=n,ic.jsxs=n,ic}var mS;function pM(){return mS||(mS=1,fg.exports=mM()),fg.exports}var b=pM(),hg={exports:{}},Ze={};/**
|
|
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 pS;function gM(){if(pS)return Ze;pS=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"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function y(j){return j===null||typeof j!="object"?null:(j=g&&j[g]||j["@@iterator"],typeof j=="function"?j:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function A(j,W,F){this.props=j,this.context=W,this.refs=S,this.updater=F||v}A.prototype.isReactComponent={},A.prototype.setState=function(j,W){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,W,"setState")},A.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function w(){}w.prototype=A.prototype;function T(j,W,F){this.props=j,this.context=W,this.refs=S,this.updater=F||v}var R=T.prototype=new w;R.constructor=T,_(R,A.prototype),R.isPureReactComponent=!0;var D=Array.isArray,N={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function I(j,W,F,re,te,de){return F=de.ref,{$$typeof:e,type:j,key:W,ref:F!==void 0?F:null,props:de}}function P(j,W){return I(j.type,W,void 0,void 0,void 0,j.props)}function V(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function U(j){var W={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(F){return W[F]})}var ue=/\/+/g;function oe(j,W){return typeof j=="object"&&j!==null&&j.key!=null?U(""+j.key):W.toString(36)}function fe(){}function Y(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(fe,fe):(j.status="pending",j.then(function(W){j.status==="pending"&&(j.status="fulfilled",j.value=W)},function(W){j.status==="pending"&&(j.status="rejected",j.reason=W)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function J(j,W,F,re,te){var de=typeof j;(de==="undefined"||de==="boolean")&&(j=null);var ye=!1;if(j===null)ye=!0;else switch(de){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(j.$$typeof){case e:case t:ye=!0;break;case m:return ye=j._init,J(ye(j._payload),W,F,re,te)}}if(ye)return te=te(j),ye=re===""?"."+oe(j,0):re,D(te)?(F="",ye!=null&&(F=ye.replace(ue,"$&/")+"/"),J(te,W,F,"",function(He){return He})):te!=null&&(V(te)&&(te=P(te,F+(te.key==null||j&&j.key===te.key?"":(""+te.key).replace(ue,"$&/")+"/")+ye)),W.push(te)),1;ye=0;var pe=re===""?".":re+":";if(D(j))for(var we=0;we<j.length;we++)re=j[we],de=pe+oe(re,we),ye+=J(re,W,F,de,te);else if(we=y(j),typeof we=="function")for(j=we.call(j),we=0;!(re=j.next()).done;)re=re.value,de=pe+oe(re,we++),ye+=J(re,W,F,de,te);else if(de==="object"){if(typeof j.then=="function")return J(Y(j),W,F,re,te);throw W=String(j),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return ye}function H(j,W,F){if(j==null)return j;var re=[],te=0;return J(j,re,"","",function(de){return W.call(F,de,te++)}),re}function ne(j){if(j._status===-1){var W=j._result;W=W(),W.then(function(F){(j._status===0||j._status===-1)&&(j._status=1,j._result=F)},function(F){(j._status===0||j._status===-1)&&(j._status=2,j._result=F)}),j._status===-1&&(j._status=0,j._result=W)}if(j._status===1)return j._result.default;throw j._result}var ee=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)};function ve(){}return Ze.Children={map:H,forEach:function(j,W,F){H(j,function(){W.apply(this,arguments)},F)},count:function(j){var W=0;return H(j,function(){W++}),W},toArray:function(j){return H(j,function(W){return W})||[]},only:function(j){if(!V(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},Ze.Component=A,Ze.Fragment=n,Ze.Profiler=a,Ze.PureComponent=T,Ze.StrictMode=r,Ze.Suspense=d,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Ze.act=function(){throw Error("act(...) is not supported in production builds of React.")},Ze.cache=function(j){return function(){return j.apply(null,arguments)}},Ze.cloneElement=function(j,W,F){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var re=_({},j.props),te=j.key,de=void 0;if(W!=null)for(ye in W.ref!==void 0&&(de=void 0),W.key!==void 0&&(te=""+W.key),W)!k.call(W,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&W.ref===void 0||(re[ye]=W[ye]);var ye=arguments.length-2;if(ye===1)re.children=F;else if(1<ye){for(var pe=Array(ye),we=0;we<ye;we++)pe[we]=arguments[we+2];re.children=pe}return I(j.type,te,void 0,void 0,de,re)},Ze.createContext=function(j){return j={$$typeof:l,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:o,_context:j},j},Ze.createElement=function(j,W,F){var re,te={},de=null;if(W!=null)for(re in W.key!==void 0&&(de=""+W.key),W)k.call(W,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(te[re]=W[re]);var ye=arguments.length-2;if(ye===1)te.children=F;else if(1<ye){for(var pe=Array(ye),we=0;we<ye;we++)pe[we]=arguments[we+2];te.children=pe}if(j&&j.defaultProps)for(re in ye=j.defaultProps,ye)te[re]===void 0&&(te[re]=ye[re]);return I(j,de,void 0,void 0,null,te)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(j){return{$$typeof:u,render:j}},Ze.isValidElement=V,Ze.lazy=function(j){return{$$typeof:m,_payload:{_status:-1,_result:j},_init:ne}},Ze.memo=function(j,W){return{$$typeof:f,type:j,compare:W===void 0?null:W}},Ze.startTransition=function(j){var W=N.T,F={};N.T=F;try{var re=j(),te=N.S;te!==null&&te(F,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(ve,ee)}catch(de){ee(de)}finally{N.T=W}},Ze.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Ze.use=function(j){return N.H.use(j)},Ze.useActionState=function(j,W,F){return N.H.useActionState(j,W,F)},Ze.useCallback=function(j,W){return N.H.useCallback(j,W)},Ze.useContext=function(j){return N.H.useContext(j)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(j,W){return N.H.useDeferredValue(j,W)},Ze.useEffect=function(j,W){return N.H.useEffect(j,W)},Ze.useId=function(){return N.H.useId()},Ze.useImperativeHandle=function(j,W,F){return N.H.useImperativeHandle(j,W,F)},Ze.useInsertionEffect=function(j,W){return N.H.useInsertionEffect(j,W)},Ze.useLayoutEffect=function(j,W){return N.H.useLayoutEffect(j,W)},Ze.useMemo=function(j,W){return N.H.useMemo(j,W)},Ze.useOptimistic=function(j,W){return N.H.useOptimistic(j,W)},Ze.useReducer=function(j,W,F){return N.H.useReducer(j,W,F)},Ze.useRef=function(j){return N.H.useRef(j)},Ze.useState=function(j){return N.H.useState(j)},Ze.useSyncExternalStore=function(j,W,F){return N.H.useSyncExternalStore(j,W,F)},Ze.useTransition=function(){return N.H.useTransition()},Ze.version="19.0.0",Ze}var gS;function du(){return gS||(gS=1,hg.exports=gM()),hg.exports}var E=du();const $e=xh(E),yM=hM({__proto__:null,default:$e},[E]);var mg={exports:{}},ac={},pg={exports:{}},gg={};/**
|
|
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 yS;function vM(){return yS||(yS=1,function(e){function t(H,ne){var ee=H.length;H.push(ne);e:for(;0<ee;){var ve=ee-1>>>1,j=H[ve];if(0<a(j,ne))H[ve]=ne,H[ee]=j,ee=ve;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],ee=H.pop();if(ee!==ne){H[0]=ee;e:for(var ve=0,j=H.length,W=j>>>1;ve<W;){var F=2*(ve+1)-1,re=H[F],te=F+1,de=H[te];if(0>a(re,ee))te<j&&0>a(de,re)?(H[ve]=de,H[te]=ee,ve=te):(H[ve]=re,H[F]=ee,ve=F);else if(te<j&&0>a(de,ee))H[ve]=de,H[te]=ee,ve=te;else break e}}return ne}function a(H,ne){var ee=H.sortIndex-ne.sortIndex;return ee!==0?ee:H.id-ne.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],m=1,g=null,y=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 R(H){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=H)r(f),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(f)}}function D(H){if(S=!1,R(H),!_)if(n(d)!==null)_=!0,Y();else{var ne=n(f);ne!==null&&J(D,ne.startTime-H)}}var N=!1,k=-1,I=5,P=-1;function V(){return!(e.unstable_now()-P<I)}function U(){if(N){var H=e.unstable_now();P=H;var ne=!0;try{e:{_=!1,S&&(S=!1,w(k),k=-1),v=!0;var ee=y;try{t:{for(R(H),g=n(d);g!==null&&!(g.expirationTime>H&&V());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,y=g.priorityLevel;var j=ve(g.expirationTime<=H);if(H=e.unstable_now(),typeof j=="function"){g.callback=j,R(H),ne=!0;break t}g===n(d)&&r(d),R(H)}else r(d);g=n(d)}if(g!==null)ne=!0;else{var W=n(f);W!==null&&J(D,W.startTime-H),ne=!1}}break e}finally{g=null,y=ee,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 oe=new MessageChannel,fe=oe.port2;oe.port1.onmessage=U,ue=function(){fe.postMessage(null)}}else ue=function(){A(U,0)};function Y(){N||(N=!0,ue())}function J(H,ne){k=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"):I=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(H){switch(y){case 1:case 2:case 3:var ne=3;break;default:ne=y}var ee=y;y=ne;try{return H()}finally{y=ee}},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 ee=y;y=H;try{return ne()}finally{y=ee}},e.unstable_scheduleCallback=function(H,ne,ee){var ve=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ve+ee:ve):ee=ve,H){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=ee+j,H={id:m++,callback:ne,priorityLevel:H,startTime:ee,expirationTime:j,sortIndex:-1},ee>ve?(H.sortIndex=ee,t(f,H),n(d)===null&&H===n(f)&&(S?(w(k),k=-1):S=!0,J(D,ee-ve))):(H.sortIndex=j,t(d,H),_||v||(_=!0,Y())),H},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(H){var ne=y;return function(){var ee=y;y=ne;try{return H.apply(this,arguments)}finally{y=ee}}}}(gg)),gg}var vS;function bM(){return vS||(vS=1,pg.exports=vM()),pg.exports}var yg={exports:{}},fn={};/**
|
|
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 bS;function _M(){if(bS)return fn;bS=1;var e=du();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" 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 o(d,f,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return fn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,fn.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(d,f,null,m)},fn.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},fn.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},fn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},fn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,g=u(m,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:g,integrity:y,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},fn.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},fn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,g=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},fn.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},fn.requestFormReset=function(d){r.d.r(d)},fn.unstable_batchedUpdates=function(d,f){return d(f)},fn.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},fn.useFormStatus=function(){return l.H.useHostTransitionStatus()},fn.version="19.0.0",fn}var _S;function WT(){if(_S)return yg.exports;_S=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(),yg.exports=_M(),yg.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 xS;function xM(){if(xS)return ac;xS=1;var e=bM(),t=du(),n=WT();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+s+" 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 o=Symbol.for("react.element"),l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),y=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"),R=Symbol.for("react.offscreen"),D=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function k(i){return i===null||typeof i!="object"?null:(i=N&&i[N]||i["@@iterator"],typeof i=="function"?i:null)}var I=Symbol.for("react.client.reference");function P(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===I?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 f: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 y:return(i._context.displayName||"Context")+".Consumer";case _:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case w:return s=i.displayName||null,s!==null?s:P(i.type)||"Memo";case T:s=i._payload,i=i._init;try{return P(i(s))}catch{}}return null}var V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.assign,ue,oe;function fe(i){if(ue===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ue=s&&s[1]||"",oe=-1<c.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+ue+i+oe}var Y=!1;function J(i,s){if(!i||Y)return"";Y=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ae){var Q=ae}Reflect.construct(i,[],he)}else{try{he.call()}catch(ae){Q=ae}i.call(he.prototype)}}else{try{throw Error()}catch(ae){Q=ae}(he=i())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ae){if(ae&&Q&&typeof ae.stack=="string")return[ae.stack,Q.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=h.DetermineComponentFrameRoot(),C=x[0],O=x[1];if(C&&O){var M=C.split(`
|
|
45
|
+
`),$=O.split(`
|
|
46
|
+
`);for(p=h=0;h<M.length&&!M[h].includes("DetermineComponentFrameRoot");)h++;for(;p<$.length&&!$[p].includes("DetermineComponentFrameRoot");)p++;if(h===M.length||p===$.length)for(h=M.length-1,p=$.length-1;1<=h&&0<=p&&M[h]!==$[p];)p--;for(;1<=h&&0<=p;h--,p--)if(M[h]!==$[p]){if(h!==1||p!==1)do if(h--,p--,0>p||M[h]!==$[p]){var se=`
|
|
47
|
+
`+M[h].replace(" at new "," at ");return i.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",i.displayName)),se}while(1<=h&&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=J(i.type,!1),i;case 11:return i=J(i.type.render,!1),i;case 1:return i=J(i.type,!0),i;default:return""}}function ne(i){try{var s="";do s+=H(i),i=i.return;while(i);return s}catch(c){return`
|
|
48
|
+
Error generating stack: `+c.message+`
|
|
49
|
+
`+c.stack}}function ee(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function ve(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function j(i){if(ee(i)!==i)throw Error(r(188))}function W(i){var s=i.alternate;if(!s){if(s=ee(i),s===null)throw Error(r(188));return s!==i?null:i}for(var c=i,h=s;;){var p=c.return;if(p===null)break;var x=p.alternate;if(x===null){if(h=p.return,h!==null){c=h;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===c)return j(p),i;if(x===h)return j(p),s;x=x.sibling}throw Error(r(188))}if(c.return!==h.return)c=p,h=x;else{for(var C=!1,O=p.child;O;){if(O===c){C=!0,c=p,h=x;break}if(O===h){C=!0,h=p,c=x;break}O=O.sibling}if(!C){for(O=x.child;O;){if(O===c){C=!0,c=x,h=p;break}if(O===h){C=!0,h=x,c=p;break}O=O.sibling}if(!C)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:s}function F(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=F(i),s!==null)return s;i=i.sibling}return null}var re=Array.isArray,te=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},ye=[],pe=-1;function we(i){return{current:i}}function He(i){0>pe||(i.current=ye[pe],ye[pe]=null,pe--)}function Me(i,s){pe++,ye[pe]=i.current,i.current=s}var Ke=we(null),at=we(null),Et=we(null),Yt=we(null);function pr(i,s){switch(Me(Et,s),Me(at,i),Me(Ke,null),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)&&(s=s.namespaceURI)?HE(s):0;break;default:if(i=i===8?s.parentNode:s,s=i.tagName,i=i.namespaceURI)i=HE(i),s=FE(i,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}He(Ke),Me(Ke,s)}function Dn(){He(Ke),He(at),He(Et)}function Nr(i){i.memoizedState!==null&&Me(Yt,i);var s=Ke.current,c=FE(s,i.type);s!==c&&(Me(at,i),Me(Ke,c))}function z(i){at.current===i&&(He(Ke),He(at)),Yt.current===i&&(He(Yt),Jl._currentValue=de)}var X=Object.prototype.hasOwnProperty,ie=e.unstable_scheduleCallback,Ae=e.unstable_cancelCallback,Ee=e.unstable_shouldYield,_e=e.unstable_requestPaint,ke=e.unstable_now,Xe=e.unstable_getCurrentPriorityLevel,Lt=e.unstable_ImmediatePriority,Mt=e.unstable_UserBlockingPriority,In=e.unstable_NormalPriority,am=e.unstable_LowPriority,Os=e.unstable_IdlePriority,ll=e.log,sm=e.unstable_setDisableYieldValue,Mi=null,bn=null;function Lu(i){if(bn&&typeof bn.onCommitFiberRoot=="function")try{bn.onCommitFiberRoot(Mi,i,void 0,(i.current.flags&128)===128)}catch{}}function ji(i){if(typeof ll=="function"&&sm(i),bn&&typeof bn.setStrictMode=="function")try{bn.setStrictMode(Mi,i)}catch{}}var Ln=Math.clz32?Math.clz32:QD,ZD=Math.log,XD=Math.LN2;function QD(i){return i>>>=0,i===0?32:31-(ZD(i)/XD|0)|0}var Mu=128,ju=4194304;function Ia(i){var s=i&42;if(s!==0)return s;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 Pu(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,p=i.suspendedLanes,x=i.pingedLanes,C=i.warmLanes;i=i.finishedLanes!==0;var O=c&134217727;return O!==0?(c=O&~p,c!==0?h=Ia(c):(x&=O,x!==0?h=Ia(x):i||(C=O&~C,C!==0&&(h=Ia(C))))):(O=c&~p,O!==0?h=Ia(O):x!==0?h=Ia(x):i||(C=c&~C,C!==0&&(h=Ia(C)))),h===0?0:s!==0&&s!==h&&(s&p)===0&&(p=h&-h,C=s&-s,p>=C||p===32&&(C&4194176)!==0)?s:h}function cl(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function JD(i,s){switch(i){case 1:case 2:case 4:case 8:return s+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 s+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 Lb(){var i=Mu;return Mu<<=1,(Mu&4194176)===0&&(Mu=128),i}function Mb(){var i=ju;return ju<<=1,(ju&62914560)===0&&(ju=4194304),i}function om(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function ul(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function eI(i,s,c,h,p,x){var C=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,$=i.hiddenUpdates;for(c=C&~c;0<c;){var se=31-Ln(c),he=1<<se;O[se]=0,M[se]=-1;var Q=$[se];if(Q!==null)for($[se]=null,se=0;se<Q.length;se++){var ae=Q[se];ae!==null&&(ae.lane&=-536870913)}c&=~he}h!==0&&jb(i,h,0),x!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=x&~(C&~s))}function jb(i,s,c){i.pendingLanes|=s,i.suspendedLanes&=~s;var h=31-Ln(s);i.entangledLanes|=s,i.entanglements[h]=i.entanglements[h]|1073741824|c&4194218}function Pb(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-Ln(c),p=1<<h;p&s|i[h]&s&&(i[h]|=s),c&=~p}}function Vb(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Bb(){var i=te.p;return i!==0?i:(i=window.event,i===void 0?32:oS(i.type))}function tI(i,s){var c=te.p;try{return te.p=i,s()}finally{te.p=c}}var Pi=Math.random().toString(36).slice(2),un="__reactFiber$"+Pi,Tn="__reactProps$"+Pi,ks="__reactContainer$"+Pi,lm="__reactEvents$"+Pi,nI="__reactListeners$"+Pi,rI="__reactHandles$"+Pi,zb="__reactResources$"+Pi,dl="__reactMarker$"+Pi;function cm(i){delete i[un],delete i[Tn],delete i[lm],delete i[nI],delete i[rI]}function La(i){var s=i[un];if(s)return s;for(var c=i.parentNode;c;){if(s=c[ks]||c[un]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=qE(i);i!==null;){if(c=i[un])return c;i=qE(i)}return s}i=c,c=i.parentNode}return null}function Ds(i){if(i=i[un]||i[ks]){var s=i.tag;if(s===5||s===6||s===13||s===26||s===27||s===3)return i}return null}function fl(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function Is(i){var s=i[zb];return s||(s=i[zb]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Zt(i){i[dl]=!0}var Ub=new Set,Hb={};function Ma(i,s){Ls(i,s),Ls(i+"Capture",s)}function Ls(i,s){for(Hb[i]=s,i=0;i<s.length;i++)Ub.add(s[i])}var ei=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iI=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]*$"),Fb={},Gb={};function aI(i){return X.call(Gb,i)?!0:X.call(Fb,i)?!1:iI.test(i)?Gb[i]=!0:(Fb[i]=!0,!1)}function Vu(i,s,c){if(aI(s))if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+c)}}function Bu(i,s,c){if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+c)}}function ti(i,s,c,h){if(h===null)i.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(s,c,""+h)}}function Wn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function $b(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function sI(i){var s=$b(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,x=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return p.call(this)},set:function(C){h=""+C,x.call(this,C)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(C){h=""+C},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function zu(i){i._valueTracker||(i._valueTracker=sI(i))}function qb(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=$b(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function Uu(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 oI=/[\n"\\]/g;function Yn(i){return i.replace(oI,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function um(i,s,c,h,p,x,C,O){i.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?i.type=C:i.removeAttribute("type"),s!=null?C==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+Wn(s)):i.value!==""+Wn(s)&&(i.value=""+Wn(s)):C!=="submit"&&C!=="reset"||i.removeAttribute("value"),s!=null?dm(i,C,Wn(s)):c!=null?dm(i,C,Wn(c)):h!=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=""+Wn(O):i.removeAttribute("name")}function Kb(i,s,c,h,p,x,C,O){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.type=x),s!=null||c!=null){if(!(x!=="submit"&&x!=="reset"||s!=null))return;c=c!=null?""+Wn(c):"",s=s!=null?""+Wn(s):c,O||s===i.value||(i.value=s),i.defaultValue=s}h=h??p,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=O?i.checked:!!h,i.defaultChecked=!!h,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(i.name=C)}function dm(i,s,c){s==="number"&&Uu(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function Ms(i,s,c,h){if(i=i.options,s){s={};for(var p=0;p<c.length;p++)s["$"+c[p]]=!0;for(c=0;c<i.length;c++)p=s.hasOwnProperty("$"+i[c].value),i[c].selected!==p&&(i[c].selected=p),p&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Wn(c),s=null,p=0;p<i.length;p++){if(i[p].value===c){i[p].selected=!0,h&&(i[p].defaultSelected=!0);return}s!==null||i[p].disabled||(s=i[p])}s!==null&&(s.selected=!0)}}function Wb(i,s,c){if(s!=null&&(s=""+Wn(s),s!==i.value&&(i.value=s),c==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=c!=null?""+Wn(c):""}function Yb(i,s,c,h){if(s==null){if(h!=null){if(c!=null)throw Error(r(92));if(re(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),s=c}c=Wn(s),i.defaultValue=c,h=i.textContent,h===c&&h!==""&&h!==null&&(i.value=h)}function js(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var lI=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 Zb(i,s,c){var h=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":h?i.setProperty(s,c):typeof c!="number"||c===0||lI.has(s)?s==="float"?i.cssFloat=c:i[s]=(""+c).trim():i[s]=c+"px"}function Xb(i,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,c!=null){for(var h in c)!c.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var p in s)h=s[p],s.hasOwnProperty(p)&&c[p]!==h&&Zb(i,p,h)}else for(var x in s)s.hasOwnProperty(x)&&Zb(i,x,s[x])}function fm(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 cI=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"]]),uI=/^[\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 Hu(i){return uI.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var hm=null;function mm(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ps=null,Vs=null;function Qb(i){var s=Ds(i);if(s&&(i=s.stateNode)){var c=i[Tn]||null;e:switch(i=s.stateNode,s.type){case"input":if(um(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Yn(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var p=h[Tn]||null;if(!p)throw Error(r(90));um(h,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(s=0;s<c.length;s++)h=c[s],h.form===i.form&&qb(h)}break e;case"textarea":Wb(i,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Ms(i,!!c.multiple,s,!1)}}}var pm=!1;function Jb(i,s,c){if(pm)return i(s,c);pm=!0;try{var h=i(s);return h}finally{if(pm=!1,(Ps!==null||Vs!==null)&&(wd(),Ps&&(s=Ps,i=Vs,Vs=Ps=null,Qb(s),i)))for(s=0;s<i.length;s++)Qb(i[s])}}function hl(i,s){var c=i.stateNode;if(c===null)return null;var h=c[Tn]||null;if(h===null)return null;c=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var gm=!1;if(ei)try{var ml={};Object.defineProperty(ml,"passive",{get:function(){gm=!0}}),window.addEventListener("test",ml,ml),window.removeEventListener("test",ml,ml)}catch{gm=!1}var Vi=null,ym=null,Fu=null;function e_(){if(Fu)return Fu;var i,s=ym,c=s.length,h,p="value"in Vi?Vi.value:Vi.textContent,x=p.length;for(i=0;i<c&&s[i]===p[i];i++);var C=c-i;for(h=1;h<=C&&s[c-h]===p[x-h];h++);return Fu=p.slice(i,1<h?1-h:void 0)}function Gu(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function $u(){return!0}function t_(){return!1}function Cn(i){function s(c,h,p,x,C){this._reactName=c,this._targetInst=p,this.type=h,this.nativeEvent=x,this.target=C,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)?$u:t_,this.isPropagationStopped=t_,this}return U(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=$u)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=$u)},persist:function(){},isPersistent:$u}),s}var ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qu=Cn(ja),pl=U({},ja,{view:0,detail:0}),dI=Cn(pl),vm,bm,gl,Ku=U({},pl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xm,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!==gl&&(gl&&i.type==="mousemove"?(vm=i.screenX-gl.screenX,bm=i.screenY-gl.screenY):bm=vm=0,gl=i),vm)},movementY:function(i){return"movementY"in i?i.movementY:bm}}),n_=Cn(Ku),fI=U({},Ku,{dataTransfer:0}),hI=Cn(fI),mI=U({},pl,{relatedTarget:0}),_m=Cn(mI),pI=U({},ja,{animationName:0,elapsedTime:0,pseudoElement:0}),gI=Cn(pI),yI=U({},ja,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),vI=Cn(yI),bI=U({},ja,{data:0}),r_=Cn(bI),_I={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xI={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"},EI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SI(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=EI[i])?!!s[i]:!1}function xm(){return SI}var AI=U({},pl,{key:function(i){if(i.key){var s=_I[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Gu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?xI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xm,charCode:function(i){return i.type==="keypress"?Gu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Gu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),wI=Cn(AI),TI=U({},Ku,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),i_=Cn(TI),CI=U({},pl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xm}),RI=Cn(CI),NI=U({},ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),OI=Cn(NI),kI=U({},Ku,{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}),DI=Cn(kI),II=U({},ja,{newState:0,oldState:0}),LI=Cn(II),MI=[9,13,27,32],Em=ei&&"CompositionEvent"in window,yl=null;ei&&"documentMode"in document&&(yl=document.documentMode);var jI=ei&&"TextEvent"in window&&!yl,a_=ei&&(!Em||yl&&8<yl&&11>=yl),s_=" ",o_=!1;function l_(i,s){switch(i){case"keyup":return MI.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Bs=!1;function PI(i,s){switch(i){case"compositionend":return c_(s);case"keypress":return s.which!==32?null:(o_=!0,s_);case"textInput":return i=s.data,i===s_&&o_?null:i;default:return null}}function VI(i,s){if(Bs)return i==="compositionend"||!Em&&l_(i,s)?(i=e_(),Fu=ym=Vi=null,Bs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return a_&&s.locale!=="ko"?null:s.data;default:return null}}var BI={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 u_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!BI[i.type]:s==="textarea"}function d_(i,s,c,h){Ps?Vs?Vs.push(h):Vs=[h]:Ps=h,s=Od(s,"onChange"),0<s.length&&(c=new qu("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var vl=null,bl=null;function zI(i){PE(i,0)}function Wu(i){var s=fl(i);if(qb(s))return i}function f_(i,s){if(i==="change")return s}var h_=!1;if(ei){var Sm;if(ei){var Am="oninput"in document;if(!Am){var m_=document.createElement("div");m_.setAttribute("oninput","return;"),Am=typeof m_.oninput=="function"}Sm=Am}else Sm=!1;h_=Sm&&(!document.documentMode||9<document.documentMode)}function p_(){vl&&(vl.detachEvent("onpropertychange",g_),bl=vl=null)}function g_(i){if(i.propertyName==="value"&&Wu(bl)){var s=[];d_(s,bl,i,mm(i)),Jb(zI,s)}}function UI(i,s,c){i==="focusin"?(p_(),vl=s,bl=c,vl.attachEvent("onpropertychange",g_)):i==="focusout"&&p_()}function HI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Wu(bl)}function FI(i,s){if(i==="click")return Wu(s)}function GI(i,s){if(i==="input"||i==="change")return Wu(s)}function $I(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Mn=typeof Object.is=="function"?Object.is:$I;function _l(i,s){if(Mn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var p=c[h];if(!X.call(s,p)||!Mn(i[p],s[p]))return!1}return!0}function y_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function v_(i,s){var c=y_(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=s&&h>=s)return{node:c,offset:s-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=y_(c)}}function b_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?b_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function __(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Uu(i.document);s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=Uu(i.document)}return s}function wm(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function qI(i,s){var c=__(s);s=i.focusedElem;var h=i.selectionRange;if(c!==s&&s&&s.ownerDocument&&b_(s.ownerDocument.documentElement,s)){if(h!==null&&wm(s)){if(i=h.start,c=h.end,c===void 0&&(c=i),"selectionStart"in s)s.selectionStart=i,s.selectionEnd=Math.min(c,s.value.length);else if(c=(i=s.ownerDocument||document)&&i.defaultView||window,c.getSelection){c=c.getSelection();var p=s.textContent.length,x=Math.min(h.start,p);h=h.end===void 0?x:Math.min(h.end,p),!c.extend&&x>h&&(p=h,h=x,x=p),p=v_(s,x);var C=v_(s,h);p&&C&&(c.rangeCount!==1||c.anchorNode!==p.node||c.anchorOffset!==p.offset||c.focusNode!==C.node||c.focusOffset!==C.offset)&&(i=i.createRange(),i.setStart(p.node,p.offset),c.removeAllRanges(),x>h?(c.addRange(i),c.extend(C.node,C.offset)):(i.setEnd(C.node,C.offset),c.addRange(i)))}}for(i=[],c=s;c=c.parentNode;)c.nodeType===1&&i.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<i.length;s++)c=i[s],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var KI=ei&&"documentMode"in document&&11>=document.documentMode,zs=null,Tm=null,xl=null,Cm=!1;function x_(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Cm||zs==null||zs!==Uu(h)||(h=zs,"selectionStart"in h&&wm(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),xl&&_l(xl,h)||(xl=h,h=Od(Tm,"onSelect"),0<h.length&&(s=new qu("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=zs)))}function Pa(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Us={animationend:Pa("Animation","AnimationEnd"),animationiteration:Pa("Animation","AnimationIteration"),animationstart:Pa("Animation","AnimationStart"),transitionrun:Pa("Transition","TransitionRun"),transitionstart:Pa("Transition","TransitionStart"),transitioncancel:Pa("Transition","TransitionCancel"),transitionend:Pa("Transition","TransitionEnd")},Rm={},E_={};ei&&(E_=document.createElement("div").style,"AnimationEvent"in window||(delete Us.animationend.animation,delete Us.animationiteration.animation,delete Us.animationstart.animation),"TransitionEvent"in window||delete Us.transitionend.transition);function Va(i){if(Rm[i])return Rm[i];if(!Us[i])return i;var s=Us[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in E_)return Rm[i]=s[c];return i}var S_=Va("animationend"),A_=Va("animationiteration"),w_=Va("animationstart"),WI=Va("transitionrun"),YI=Va("transitionstart"),ZI=Va("transitioncancel"),T_=Va("transitionend"),C_=new Map,R_="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 gr(i,s){C_.set(i,s),Ma(s,[i])}var Zn=[],Hs=0,Nm=0;function Yu(){for(var i=Hs,s=Nm=Hs=0;s<i;){var c=Zn[s];Zn[s++]=null;var h=Zn[s];Zn[s++]=null;var p=Zn[s];Zn[s++]=null;var x=Zn[s];if(Zn[s++]=null,h!==null&&p!==null){var C=h.pending;C===null?p.next=p:(p.next=C.next,C.next=p),h.pending=p}x!==0&&N_(c,p,x)}}function Zu(i,s,c,h){Zn[Hs++]=i,Zn[Hs++]=s,Zn[Hs++]=c,Zn[Hs++]=h,Nm|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Om(i,s,c,h){return Zu(i,s,c,h),Xu(i)}function Bi(i,s){return Zu(i,null,null,s),Xu(i)}function N_(i,s,c){i.lanes|=c;var h=i.alternate;h!==null&&(h.lanes|=c);for(var p=!1,x=i.return;x!==null;)x.childLanes|=c,h=x.alternate,h!==null&&(h.childLanes|=c),x.tag===22&&(i=x.stateNode,i===null||i._visibility&1||(p=!0)),i=x,x=x.return;p&&s!==null&&i.tag===3&&(x=i.stateNode,p=31-Ln(c),x=x.hiddenUpdates,i=x[p],i===null?x[p]=[s]:i.push(s),s.lane=c|536870912)}function Xu(i){if(50<ql)throw ql=0,jp=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var Fs={},O_=new WeakMap;function Xn(i,s){if(typeof i=="object"&&i!==null){var c=O_.get(i);return c!==void 0?c:(s={value:i,source:s,stack:ne(s)},O_.set(i,s),s)}return{value:i,source:s,stack:ne(s)}}var Gs=[],$s=0,Qu=null,Ju=0,Qn=[],Jn=0,Ba=null,ni=1,ri="";function za(i,s){Gs[$s++]=Ju,Gs[$s++]=Qu,Qu=i,Ju=s}function k_(i,s,c){Qn[Jn++]=ni,Qn[Jn++]=ri,Qn[Jn++]=Ba,Ba=i;var h=ni;i=ri;var p=32-Ln(h)-1;h&=~(1<<p),c+=1;var x=32-Ln(s)+p;if(30<x){var C=p-p%5;x=(h&(1<<C)-1).toString(32),h>>=C,p-=C,ni=1<<32-Ln(s)+p|c<<p|h,ri=x+i}else ni=1<<x|c<<p|h,ri=i}function km(i){i.return!==null&&(za(i,1),k_(i,1,0))}function Dm(i){for(;i===Qu;)Qu=Gs[--$s],Gs[$s]=null,Ju=Gs[--$s],Gs[$s]=null;for(;i===Ba;)Ba=Qn[--Jn],Qn[Jn]=null,ri=Qn[--Jn],Qn[Jn]=null,ni=Qn[--Jn],Qn[Jn]=null}var _n=null,an=null,dt=!1,yr=null,Or=!1,Im=Error(r(519));function Ua(i){var s=Error(r(418,""));throw Al(Xn(s,i)),Im}function D_(i){var s=i.stateNode,c=i.type,h=i.memoizedProps;switch(s[un]=i,s[Tn]=h,c){case"dialog":ot("cancel",s),ot("close",s);break;case"iframe":case"object":case"embed":ot("load",s);break;case"video":case"audio":for(c=0;c<Wl.length;c++)ot(Wl[c],s);break;case"source":ot("error",s);break;case"img":case"image":case"link":ot("error",s),ot("load",s);break;case"details":ot("toggle",s);break;case"input":ot("invalid",s),Kb(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0),zu(s);break;case"select":ot("invalid",s);break;case"textarea":ot("invalid",s),Yb(s,h.value,h.defaultValue,h.children),zu(s)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||h.suppressHydrationWarning===!0||UE(s.textContent,c)?(h.popover!=null&&(ot("beforetoggle",s),ot("toggle",s)),h.onScroll!=null&&ot("scroll",s),h.onScrollEnd!=null&&ot("scrollend",s),h.onClick!=null&&(s.onclick=kd),s=!0):s=!1,s||Ua(i)}function I_(i){for(_n=i.return;_n;)switch(_n.tag){case 3:case 27:Or=!0;return;case 5:case 13:Or=!1;return;default:_n=_n.return}}function El(i){if(i!==_n)return!1;if(!dt)return I_(i),dt=!0,!1;var s=!1,c;if((c=i.tag!==3&&i.tag!==27)&&((c=i.tag===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Jp(i.type,i.memoizedProps)),c=!c),c&&(s=!0),s&&an&&Ua(i),I_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8)if(c=i.data,c==="/$"){if(s===0){an=br(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++;i=i.nextSibling}an=null}}else an=_n?br(i.stateNode.nextSibling):null;return!0}function Sl(){an=_n=null,dt=!1}function Al(i){yr===null?yr=[i]:yr.push(i)}var wl=Error(r(460)),L_=Error(r(474)),Lm={then:function(){}};function M_(i){return i=i.status,i==="fulfilled"||i==="rejected"}function ed(){}function j_(i,s,c){switch(c=i[c],c===void 0?i.push(s):c!==s&&(s.then(ed,ed),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,i===wl?Error(r(483)):i;default:if(typeof s.status=="string")s.then(ed,ed);else{if(i=vt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(h){if(s.status==="pending"){var p=s;p.status="fulfilled",p.value=h}},function(h){if(s.status==="pending"){var p=s;p.status="rejected",p.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,i===wl?Error(r(483)):i}throw Tl=s,wl}}var Tl=null;function P_(){if(Tl===null)throw Error(r(459));var i=Tl;return Tl=null,i}var qs=null,Cl=0;function td(i){var s=Cl;return Cl+=1,qs===null&&(qs=[]),j_(qs,i,s)}function Rl(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function nd(i,s){throw s.$$typeof===o?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function V_(i){var s=i._init;return s(i._payload)}function B_(i){function s(K,G){if(i){var Z=K.deletions;Z===null?(K.deletions=[G],K.flags|=16):Z.push(G)}}function c(K,G){if(!i)return null;for(;G!==null;)s(K,G),G=G.sibling;return null}function h(K){for(var G=new Map;K!==null;)K.key!==null?G.set(K.key,K):G.set(K.index,K),K=K.sibling;return G}function p(K,G){return K=Xi(K,G),K.index=0,K.sibling=null,K}function x(K,G,Z){return K.index=Z,i?(Z=K.alternate,Z!==null?(Z=Z.index,Z<G?(K.flags|=33554434,G):Z):(K.flags|=33554434,G)):(K.flags|=1048576,G)}function C(K){return i&&K.alternate===null&&(K.flags|=33554434),K}function O(K,G,Z,ce){return G===null||G.tag!==6?(G=Rp(Z,K.mode,ce),G.return=K,G):(G=p(G,Z),G.return=K,G)}function M(K,G,Z,ce){var Re=Z.type;return Re===d?se(K,G,Z.props.children,ce,Z.key):G!==null&&(G.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===T&&V_(Re)===G.type)?(G=p(G,Z.props),Rl(G,Z),G.return=K,G):(G=_d(Z.type,Z.key,Z.props,null,K.mode,ce),Rl(G,Z),G.return=K,G)}function $(K,G,Z,ce){return G===null||G.tag!==4||G.stateNode.containerInfo!==Z.containerInfo||G.stateNode.implementation!==Z.implementation?(G=Np(Z,K.mode,ce),G.return=K,G):(G=p(G,Z.children||[]),G.return=K,G)}function se(K,G,Z,ce,Re){return G===null||G.tag!==7?(G=Xa(Z,K.mode,ce,Re),G.return=K,G):(G=p(G,Z),G.return=K,G)}function he(K,G,Z){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=Rp(""+G,K.mode,Z),G.return=K,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case l:return Z=_d(G.type,G.key,G.props,null,K.mode,Z),Rl(Z,G),Z.return=K,Z;case u:return G=Np(G,K.mode,Z),G.return=K,G;case T:var ce=G._init;return G=ce(G._payload),he(K,G,Z)}if(re(G)||k(G))return G=Xa(G,K.mode,Z,null),G.return=K,G;if(typeof G.then=="function")return he(K,td(G),Z);if(G.$$typeof===v)return he(K,yd(K,G),Z);nd(K,G)}return null}function Q(K,G,Z,ce){var Re=G!==null?G.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Re!==null?null:O(K,G,""+Z,ce);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case l:return Z.key===Re?M(K,G,Z,ce):null;case u:return Z.key===Re?$(K,G,Z,ce):null;case T:return Re=Z._init,Z=Re(Z._payload),Q(K,G,Z,ce)}if(re(Z)||k(Z))return Re!==null?null:se(K,G,Z,ce,null);if(typeof Z.then=="function")return Q(K,G,td(Z),ce);if(Z.$$typeof===v)return Q(K,G,yd(K,Z),ce);nd(K,Z)}return null}function ae(K,G,Z,ce,Re){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return K=K.get(Z)||null,O(G,K,""+ce,Re);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:return K=K.get(ce.key===null?Z:ce.key)||null,M(G,K,ce,Re);case u:return K=K.get(ce.key===null?Z:ce.key)||null,$(G,K,ce,Re);case T:var nt=ce._init;return ce=nt(ce._payload),ae(K,G,Z,ce,Re)}if(re(ce)||k(ce))return K=K.get(Z)||null,se(G,K,ce,Re,null);if(typeof ce.then=="function")return ae(K,G,Z,td(ce),Re);if(ce.$$typeof===v)return ae(K,G,Z,yd(G,ce),Re);nd(G,ce)}return null}function Le(K,G,Z,ce){for(var Re=null,nt=null,Pe=G,Ve=G=0,Jt=null;Pe!==null&&Ve<Z.length;Ve++){Pe.index>Ve?(Jt=Pe,Pe=null):Jt=Pe.sibling;var ft=Q(K,Pe,Z[Ve],ce);if(ft===null){Pe===null&&(Pe=Jt);break}i&&Pe&&ft.alternate===null&&s(K,Pe),G=x(ft,G,Ve),nt===null?Re=ft:nt.sibling=ft,nt=ft,Pe=Jt}if(Ve===Z.length)return c(K,Pe),dt&&za(K,Ve),Re;if(Pe===null){for(;Ve<Z.length;Ve++)Pe=he(K,Z[Ve],ce),Pe!==null&&(G=x(Pe,G,Ve),nt===null?Re=Pe:nt.sibling=Pe,nt=Pe);return dt&&za(K,Ve),Re}for(Pe=h(Pe);Ve<Z.length;Ve++)Jt=ae(Pe,K,Ve,Z[Ve],ce),Jt!==null&&(i&&Jt.alternate!==null&&Pe.delete(Jt.key===null?Ve:Jt.key),G=x(Jt,G,Ve),nt===null?Re=Jt:nt.sibling=Jt,nt=Jt);return i&&Pe.forEach(function(ia){return s(K,ia)}),dt&&za(K,Ve),Re}function qe(K,G,Z,ce){if(Z==null)throw Error(r(151));for(var Re=null,nt=null,Pe=G,Ve=G=0,Jt=null,ft=Z.next();Pe!==null&&!ft.done;Ve++,ft=Z.next()){Pe.index>Ve?(Jt=Pe,Pe=null):Jt=Pe.sibling;var ia=Q(K,Pe,ft.value,ce);if(ia===null){Pe===null&&(Pe=Jt);break}i&&Pe&&ia.alternate===null&&s(K,Pe),G=x(ia,G,Ve),nt===null?Re=ia:nt.sibling=ia,nt=ia,Pe=Jt}if(ft.done)return c(K,Pe),dt&&za(K,Ve),Re;if(Pe===null){for(;!ft.done;Ve++,ft=Z.next())ft=he(K,ft.value,ce),ft!==null&&(G=x(ft,G,Ve),nt===null?Re=ft:nt.sibling=ft,nt=ft);return dt&&za(K,Ve),Re}for(Pe=h(Pe);!ft.done;Ve++,ft=Z.next())ft=ae(Pe,K,Ve,ft.value,ce),ft!==null&&(i&&ft.alternate!==null&&Pe.delete(ft.key===null?Ve:ft.key),G=x(ft,G,Ve),nt===null?Re=ft:nt.sibling=ft,nt=ft);return i&&Pe.forEach(function(uM){return s(K,uM)}),dt&&za(K,Ve),Re}function Dt(K,G,Z,ce){if(typeof Z=="object"&&Z!==null&&Z.type===d&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case l:e:{for(var Re=Z.key;G!==null;){if(G.key===Re){if(Re=Z.type,Re===d){if(G.tag===7){c(K,G.sibling),ce=p(G,Z.props.children),ce.return=K,K=ce;break e}}else if(G.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===T&&V_(Re)===G.type){c(K,G.sibling),ce=p(G,Z.props),Rl(ce,Z),ce.return=K,K=ce;break e}c(K,G);break}else s(K,G);G=G.sibling}Z.type===d?(ce=Xa(Z.props.children,K.mode,ce,Z.key),ce.return=K,K=ce):(ce=_d(Z.type,Z.key,Z.props,null,K.mode,ce),Rl(ce,Z),ce.return=K,K=ce)}return C(K);case u:e:{for(Re=Z.key;G!==null;){if(G.key===Re)if(G.tag===4&&G.stateNode.containerInfo===Z.containerInfo&&G.stateNode.implementation===Z.implementation){c(K,G.sibling),ce=p(G,Z.children||[]),ce.return=K,K=ce;break e}else{c(K,G);break}else s(K,G);G=G.sibling}ce=Np(Z,K.mode,ce),ce.return=K,K=ce}return C(K);case T:return Re=Z._init,Z=Re(Z._payload),Dt(K,G,Z,ce)}if(re(Z))return Le(K,G,Z,ce);if(k(Z)){if(Re=k(Z),typeof Re!="function")throw Error(r(150));return Z=Re.call(Z),qe(K,G,Z,ce)}if(typeof Z.then=="function")return Dt(K,G,td(Z),ce);if(Z.$$typeof===v)return Dt(K,G,yd(K,Z),ce);nd(K,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,G!==null&&G.tag===6?(c(K,G.sibling),ce=p(G,Z),ce.return=K,K=ce):(c(K,G),ce=Rp(Z,K.mode,ce),ce.return=K,K=ce),C(K)):c(K,G)}return function(K,G,Z,ce){try{Cl=0;var Re=Dt(K,G,Z,ce);return qs=null,Re}catch(Pe){if(Pe===wl)throw Pe;var nt=rr(29,Pe,null,K.mode);return nt.lanes=ce,nt.return=K,nt}finally{}}}var Ha=B_(!0),z_=B_(!1),Ks=we(null),rd=we(0);function U_(i,s){i=mi,Me(rd,i),Me(Ks,s),mi=i|s.baseLanes}function Mm(){Me(rd,mi),Me(Ks,Ks.current)}function jm(){mi=rd.current,He(Ks),He(rd)}var er=we(null),kr=null;function zi(i){var s=i.alternate;Me(Gt,Gt.current&1),Me(er,i),kr===null&&(s===null||Ks.current!==null||s.memoizedState!==null)&&(kr=i)}function H_(i){if(i.tag===22){if(Me(Gt,Gt.current),Me(er,i),kr===null){var s=i.alternate;s!==null&&s.memoizedState!==null&&(kr=i)}}else Ui()}function Ui(){Me(Gt,Gt.current),Me(er,er.current)}function ii(i){He(er),kr===i&&(kr=null),He(Gt)}var Gt=we(0);function id(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var XI=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(c,h){i.push(h)}};this.abort=function(){s.aborted=!0,i.forEach(function(c){return c()})}},QI=e.unstable_scheduleCallback,JI=e.unstable_NormalPriority,$t={$$typeof:v,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pm(){return{controller:new XI,data:new Map,refCount:0}}function Nl(i){i.refCount--,i.refCount===0&&QI(JI,function(){i.controller.abort()})}var Ol=null,Vm=0,Ws=0,Ys=null;function eL(i,s){if(Ol===null){var c=Ol=[];Vm=0,Ws=Gp(),Ys={status:"pending",value:void 0,then:function(h){c.push(h)}}}return Vm++,s.then(F_,F_),s}function F_(){if(--Vm===0&&Ol!==null){Ys!==null&&(Ys.status="fulfilled");var i=Ol;Ol=null,Ws=0,Ys=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function tL(i,s){var c=[],h={status:"pending",value:null,reason:null,then:function(p){c.push(p)}};return i.then(function(){h.status="fulfilled",h.value=s;for(var p=0;p<c.length;p++)(0,c[p])(s)},function(p){for(h.status="rejected",h.reason=p,p=0;p<c.length;p++)(0,c[p])(void 0)}),h}var G_=V.S;V.S=function(i,s){typeof s=="object"&&s!==null&&typeof s.then=="function"&&eL(i,s),G_!==null&&G_(i,s)};var Fa=we(null);function Bm(){var i=Fa.current;return i!==null?i:vt.pooledCache}function ad(i,s){s===null?Me(Fa,Fa.current):Me(Fa,s.pool)}function $_(){var i=Bm();return i===null?null:{parent:$t._currentValue,pool:i}}var Hi=0,Je=null,mt=null,zt=null,sd=!1,Zs=!1,Ga=!1,od=0,kl=0,Xs=null,nL=0;function jt(){throw Error(r(321))}function zm(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!Mn(i[c],s[c]))return!1;return!0}function Um(i,s,c,h,p,x){return Hi=x,Je=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,V.H=i===null||i.memoizedState===null?$a:Fi,Ga=!1,x=c(h,p),Ga=!1,Zs&&(x=K_(s,c,h,p)),q_(i),x}function q_(i){V.H=Dr;var s=mt!==null&&mt.next!==null;if(Hi=0,zt=mt=Je=null,sd=!1,kl=0,Xs=null,s)throw Error(r(300));i===null||Xt||(i=i.dependencies,i!==null&&gd(i)&&(Xt=!0))}function K_(i,s,c,h){Je=i;var p=0;do{if(Zs&&(Xs=null),kl=0,Zs=!1,25<=p)throw Error(r(301));if(p+=1,zt=mt=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=qa,x=s(c,h)}while(Zs);return x}function rL(){var i=V.H,s=i.useState()[0];return s=typeof s.then=="function"?Dl(s):s,i=i.useState()[0],(mt!==null?mt.memoizedState:null)!==i&&(Je.flags|=1024),s}function Hm(){var i=od!==0;return od=0,i}function Fm(i,s,c){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~c}function Gm(i){if(sd){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}sd=!1}Hi=0,zt=mt=Je=null,Zs=!1,kl=od=0,Xs=null}function Rn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Je.memoizedState=zt=i:zt=zt.next=i,zt}function Ut(){if(mt===null){var i=Je.alternate;i=i!==null?i.memoizedState:null}else i=mt.next;var s=zt===null?Je.memoizedState:zt.next;if(s!==null)zt=s,mt=i;else{if(i===null)throw Je.alternate===null?Error(r(467)):Error(r(310));mt=i,i={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},zt===null?Je.memoizedState=zt=i:zt=zt.next=i}return zt}var ld;ld=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Dl(i){var s=kl;return kl+=1,Xs===null&&(Xs=[]),i=j_(Xs,i,s),s=Je,(zt===null?s.memoizedState:zt.next)===null&&(s=s.alternate,V.H=s===null||s.memoizedState===null?$a:Fi),i}function cd(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Dl(i);if(i.$$typeof===v)return dn(i)}throw Error(r(438,String(i)))}function $m(i){var s=null,c=Je.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var h=Je.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(p){return p.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=ld(),Je.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(i),h=0;h<i;h++)c[h]=D;return s.index++,c}function ai(i,s){return typeof s=="function"?s(i):s}function ud(i){var s=Ut();return qm(s,mt,i)}function qm(i,s,c){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;var p=i.baseQueue,x=h.pending;if(x!==null){if(p!==null){var C=p.next;p.next=x.next,x.next=C}s.baseQueue=p=x,h.pending=null}if(x=i.baseState,p===null)i.memoizedState=x;else{s=p.next;var O=C=null,M=null,$=s,se=!1;do{var he=$.lane&-536870913;if(he!==$.lane?(ct&he)===he:(Hi&he)===he){var Q=$.revertLane;if(Q===0)M!==null&&(M=M.next={lane:0,revertLane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),he===Ws&&(se=!0);else if((Hi&Q)===Q){$=$.next,Q===Ws&&(se=!0);continue}else he={lane:0,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},M===null?(O=M=he,C=x):M=M.next=he,Je.lanes|=Q,Qi|=Q;he=$.action,Ga&&c(x,he),x=$.hasEagerState?$.eagerState:c(x,he)}else Q={lane:he,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},M===null?(O=M=Q,C=x):M=M.next=Q,Je.lanes|=he,Qi|=he;$=$.next}while($!==null&&$!==s);if(M===null?C=x:M.next=O,!Mn(x,i.memoizedState)&&(Xt=!0,se&&(c=Ys,c!==null)))throw c;i.memoizedState=x,i.baseState=C,i.baseQueue=M,h.lastRenderedState=x}return p===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function Km(i){var s=Ut(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var h=c.dispatch,p=c.pending,x=s.memoizedState;if(p!==null){c.pending=null;var C=p=p.next;do x=i(x,C.action),C=C.next;while(C!==p);Mn(x,s.memoizedState)||(Xt=!0),s.memoizedState=x,s.baseQueue===null&&(s.baseState=x),c.lastRenderedState=x}return[x,h]}function W_(i,s,c){var h=Je,p=Ut(),x=dt;if(x){if(c===void 0)throw Error(r(407));c=c()}else c=s();var C=!Mn((mt||p).memoizedState,c);if(C&&(p.memoizedState=c,Xt=!0),p=p.queue,Zm(X_.bind(null,h,p,i),[i]),p.getSnapshot!==s||C||zt!==null&&zt.memoizedState.tag&1){if(h.flags|=2048,Qs(9,Z_.bind(null,h,p,c,s),{destroy:void 0},null),vt===null)throw Error(r(349));x||(Hi&60)!==0||Y_(h,s,c)}return c}function Y_(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Je.updateQueue,s===null?(s=ld(),Je.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Z_(i,s,c,h){s.value=c,s.getSnapshot=h,Q_(s)&&J_(i)}function X_(i,s,c){return c(function(){Q_(s)&&J_(i)})}function Q_(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Mn(i,c)}catch{return!0}}function J_(i){var s=Bi(i,2);s!==null&&xn(s,i,2)}function Wm(i){var s=Rn();if(typeof i=="function"){var c=i;if(i=c(),Ga){ji(!0);try{c()}finally{ji(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:i},s}function ex(i,s,c,h){return i.baseState=c,qm(i,mt,typeof h=="function"?h:ai)}function iL(i,s,c,h,p){if(hd(i))throw Error(r(485));if(i=s.action,i!==null){var x={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){x.listeners.push(C)}};V.T!==null?c(!0):x.isTransition=!1,h(x),c=s.pending,c===null?(x.next=s.pending=x,tx(s,x)):(x.next=c.next,s.pending=c.next=x)}}function tx(i,s){var c=s.action,h=s.payload,p=i.state;if(s.isTransition){var x=V.T,C={};V.T=C;try{var O=c(p,h),M=V.S;M!==null&&M(C,O),nx(i,s,O)}catch($){Ym(i,s,$)}finally{V.T=x}}else try{x=c(p,h),nx(i,s,x)}catch($){Ym(i,s,$)}}function nx(i,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){rx(i,s,h)},function(h){return Ym(i,s,h)}):rx(i,s,c)}function rx(i,s,c){s.status="fulfilled",s.value=c,ix(s),i.state=c,s=i.pending,s!==null&&(c=s.next,c===s?i.pending=null:(c=c.next,s.next=c,tx(i,c)))}function Ym(i,s,c){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=c,ix(s),s=s.next;while(s!==h)}i.action=null}function ix(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function ax(i,s){return s}function sx(i,s){if(dt){var c=vt.formState;if(c!==null){e:{var h=Je;if(dt){if(an){t:{for(var p=an,x=Or;p.nodeType!==8;){if(!x){p=null;break t}if(p=br(p.nextSibling),p===null){p=null;break t}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){an=br(p.nextSibling),h=p.data==="F!";break e}}Ua(h)}h=!1}h&&(s=c[0])}}return c=Rn(),c.memoizedState=c.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ax,lastRenderedState:s},c.queue=h,c=Ax.bind(null,Je,h),h.dispatch=c,h=Wm(!1),x=tp.bind(null,Je,!1,h.queue),h=Rn(),p={state:s,dispatch:null,action:i,pending:null},h.queue=p,c=iL.bind(null,Je,p,x,c),p.dispatch=c,h.memoizedState=i,[s,c,!1]}function ox(i){var s=Ut();return lx(s,mt,i)}function lx(i,s,c){s=qm(i,s,ax)[0],i=ud(ai)[0],s=typeof s=="object"&&s!==null&&typeof s.then=="function"?Dl(s):s;var h=Ut(),p=h.queue,x=p.dispatch;return c!==h.memoizedState&&(Je.flags|=2048,Qs(9,aL.bind(null,p,c),{destroy:void 0},null)),[s,x,i]}function aL(i,s){i.action=s}function cx(i){var s=Ut(),c=mt;if(c!==null)return lx(s,c,i);Ut(),s=s.memoizedState,c=Ut();var h=c.queue.dispatch;return c.memoizedState=i,[s,h,!1]}function Qs(i,s,c,h){return i={tag:i,create:s,inst:c,deps:h,next:null},s=Je.updateQueue,s===null&&(s=ld(),Je.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,s.lastEffect=i),i}function ux(){return Ut().memoizedState}function dd(i,s,c,h){var p=Rn();Je.flags|=i,p.memoizedState=Qs(1|s,c,{destroy:void 0},h===void 0?null:h)}function fd(i,s,c,h){var p=Ut();h=h===void 0?null:h;var x=p.memoizedState.inst;mt!==null&&h!==null&&zm(h,mt.memoizedState.deps)?p.memoizedState=Qs(s,c,x,h):(Je.flags|=i,p.memoizedState=Qs(1|s,c,x,h))}function dx(i,s){dd(8390656,8,i,s)}function Zm(i,s){fd(2048,8,i,s)}function fx(i,s){return fd(4,2,i,s)}function hx(i,s){return fd(4,4,i,s)}function mx(i,s){if(typeof s=="function"){i=i();var c=s(i);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function px(i,s,c){c=c!=null?c.concat([i]):null,fd(4,4,mx.bind(null,s,i),c)}function Xm(){}function gx(i,s){var c=Ut();s=s===void 0?null:s;var h=c.memoizedState;return s!==null&&zm(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function yx(i,s){var c=Ut();s=s===void 0?null:s;var h=c.memoizedState;if(s!==null&&zm(s,h[1]))return h[0];if(h=i(),Ga){ji(!0);try{i()}finally{ji(!1)}}return c.memoizedState=[h,s],h}function Qm(i,s,c){return c===void 0||(Hi&1073741824)!==0?i.memoizedState=s:(i.memoizedState=c,i=bE(),Je.lanes|=i,Qi|=i,c)}function vx(i,s,c,h){return Mn(c,s)?c:Ks.current!==null?(i=Qm(i,c,h),Mn(i,s)||(Xt=!0),i):(Hi&42)===0?(Xt=!0,i.memoizedState=c):(i=bE(),Je.lanes|=i,Qi|=i,s)}function bx(i,s,c,h,p){var x=te.p;te.p=x!==0&&8>x?x:8;var C=V.T,O={};V.T=O,tp(i,!1,s,c);try{var M=p(),$=V.S;if($!==null&&$(O,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var se=tL(M,h);Il(i,s,se,Bn(i))}else Il(i,s,h,Bn(i))}catch(he){Il(i,s,{then:function(){},status:"rejected",reason:he},Bn())}finally{te.p=x,V.T=C}}function sL(){}function Jm(i,s,c,h){if(i.tag!==5)throw Error(r(476));var p=_x(i).queue;bx(i,p,s,de,c===null?sL:function(){return xx(i),c(h)})}function _x(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:de},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:c},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function xx(i){var s=_x(i).next.queue;Il(i,s,{},Bn())}function ep(){return dn(Jl)}function Ex(){return Ut().memoizedState}function Sx(){return Ut().memoizedState}function oL(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var c=Bn();i=qi(c);var h=Ki(s,i,c);h!==null&&(xn(h,s,c),jl(h,s,c)),s={cache:Pm()},i.payload=s;return}s=s.return}}function lL(i,s,c){var h=Bn();c={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},hd(i)?wx(s,c):(c=Om(i,s,c,h),c!==null&&(xn(c,i,h),Tx(c,s,h)))}function Ax(i,s,c){var h=Bn();Il(i,s,c,h)}function Il(i,s,c,h){var p={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(hd(i))wx(s,p);else{var x=i.alternate;if(i.lanes===0&&(x===null||x.lanes===0)&&(x=s.lastRenderedReducer,x!==null))try{var C=s.lastRenderedState,O=x(C,c);if(p.hasEagerState=!0,p.eagerState=O,Mn(O,C))return Zu(i,s,p,0),vt===null&&Yu(),!1}catch{}finally{}if(c=Om(i,s,p,h),c!==null)return xn(c,i,h),Tx(c,s,h),!0}return!1}function tp(i,s,c,h){if(h={lane:2,revertLane:Gp(),action:h,hasEagerState:!1,eagerState:null,next:null},hd(i)){if(s)throw Error(r(479))}else s=Om(i,c,h,2),s!==null&&xn(s,i,2)}function hd(i){var s=i.alternate;return i===Je||s!==null&&s===Je}function wx(i,s){Zs=sd=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function Tx(i,s,c){if((c&4194176)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,Pb(i,c)}}var Dr={readContext:dn,use:cd,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt};Dr.useCacheRefresh=jt,Dr.useMemoCache=jt,Dr.useHostTransitionStatus=jt,Dr.useFormState=jt,Dr.useActionState=jt,Dr.useOptimistic=jt;var $a={readContext:dn,use:cd,useCallback:function(i,s){return Rn().memoizedState=[i,s===void 0?null:s],i},useContext:dn,useEffect:dx,useImperativeHandle:function(i,s,c){c=c!=null?c.concat([i]):null,dd(4194308,4,mx.bind(null,s,i),c)},useLayoutEffect:function(i,s){return dd(4194308,4,i,s)},useInsertionEffect:function(i,s){dd(4,2,i,s)},useMemo:function(i,s){var c=Rn();s=s===void 0?null:s;var h=i();if(Ga){ji(!0);try{i()}finally{ji(!1)}}return c.memoizedState=[h,s],h},useReducer:function(i,s,c){var h=Rn();if(c!==void 0){var p=c(s);if(Ga){ji(!0);try{c(s)}finally{ji(!1)}}}else p=s;return h.memoizedState=h.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},h.queue=i,i=i.dispatch=lL.bind(null,Je,i),[h.memoizedState,i]},useRef:function(i){var s=Rn();return i={current:i},s.memoizedState=i},useState:function(i){i=Wm(i);var s=i.queue,c=Ax.bind(null,Je,s);return s.dispatch=c,[i.memoizedState,c]},useDebugValue:Xm,useDeferredValue:function(i,s){var c=Rn();return Qm(c,i,s)},useTransition:function(){var i=Wm(!1);return i=bx.bind(null,Je,i.queue,!0,!1),Rn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,c){var h=Je,p=Rn();if(dt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),vt===null)throw Error(r(349));(ct&60)!==0||Y_(h,s,c)}p.memoizedState=c;var x={value:c,getSnapshot:s};return p.queue=x,dx(X_.bind(null,h,x,i),[i]),h.flags|=2048,Qs(9,Z_.bind(null,h,x,c,s),{destroy:void 0},null),c},useId:function(){var i=Rn(),s=vt.identifierPrefix;if(dt){var c=ri,h=ni;c=(h&~(1<<32-Ln(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=od++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=nL++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},useCacheRefresh:function(){return Rn().memoizedState=oL.bind(null,Je)}};$a.useMemoCache=$m,$a.useHostTransitionStatus=ep,$a.useFormState=sx,$a.useActionState=sx,$a.useOptimistic=function(i){var s=Rn();s.memoizedState=s.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=tp.bind(null,Je,!0,c),c.dispatch=s,[i,s]};var Fi={readContext:dn,use:cd,useCallback:gx,useContext:dn,useEffect:Zm,useImperativeHandle:px,useInsertionEffect:fx,useLayoutEffect:hx,useMemo:yx,useReducer:ud,useRef:ux,useState:function(){return ud(ai)},useDebugValue:Xm,useDeferredValue:function(i,s){var c=Ut();return vx(c,mt.memoizedState,i,s)},useTransition:function(){var i=ud(ai)[0],s=Ut().memoizedState;return[typeof i=="boolean"?i:Dl(i),s]},useSyncExternalStore:W_,useId:Ex};Fi.useCacheRefresh=Sx,Fi.useMemoCache=$m,Fi.useHostTransitionStatus=ep,Fi.useFormState=ox,Fi.useActionState=ox,Fi.useOptimistic=function(i,s){var c=Ut();return ex(c,mt,i,s)};var qa={readContext:dn,use:cd,useCallback:gx,useContext:dn,useEffect:Zm,useImperativeHandle:px,useInsertionEffect:fx,useLayoutEffect:hx,useMemo:yx,useReducer:Km,useRef:ux,useState:function(){return Km(ai)},useDebugValue:Xm,useDeferredValue:function(i,s){var c=Ut();return mt===null?Qm(c,i,s):vx(c,mt.memoizedState,i,s)},useTransition:function(){var i=Km(ai)[0],s=Ut().memoizedState;return[typeof i=="boolean"?i:Dl(i),s]},useSyncExternalStore:W_,useId:Ex};qa.useCacheRefresh=Sx,qa.useMemoCache=$m,qa.useHostTransitionStatus=ep,qa.useFormState=cx,qa.useActionState=cx,qa.useOptimistic=function(i,s){var c=Ut();return mt!==null?ex(c,mt,i,s):(c.baseState=i,[i,c.queue.dispatch])};function np(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:U({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var rp={isMounted:function(i){return(i=i._reactInternals)?ee(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=Bn(),p=qi(h);p.payload=s,c!=null&&(p.callback=c),s=Ki(i,p,h),s!==null&&(xn(s,i,h),jl(s,i,h))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=Bn(),p=qi(h);p.tag=1,p.payload=s,c!=null&&(p.callback=c),s=Ki(i,p,h),s!==null&&(xn(s,i,h),jl(s,i,h))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=Bn(),h=qi(c);h.tag=2,s!=null&&(h.callback=s),s=Ki(i,h,c),s!==null&&(xn(s,i,c),jl(s,i,c))}};function Cx(i,s,c,h,p,x,C){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,x,C):s.prototype&&s.prototype.isPureReactComponent?!_l(c,h)||!_l(p,x):!0}function Rx(i,s,c,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==i&&rp.enqueueReplaceState(s,s.state,null)}function Ka(i,s){var c=s;if("ref"in s){c={};for(var h in s)h!=="ref"&&(c[h]=s[h])}if(i=i.defaultProps){c===s&&(c=U({},c));for(var p in i)c[p]===void 0&&(c[p]=i[p])}return c}var md=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=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(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function Nx(i){md(i)}function Ox(i){console.error(i)}function kx(i){md(i)}function pd(i,s){try{var c=i.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function Dx(i,s,c){try{var h=i.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function ip(i,s,c){return c=qi(c),c.tag=3,c.payload={element:null},c.callback=function(){pd(i,s)},c}function Ix(i){return i=qi(i),i.tag=3,i}function Lx(i,s,c,h){var p=c.type.getDerivedStateFromError;if(typeof p=="function"){var x=h.value;i.payload=function(){return p(x)},i.callback=function(){Dx(s,c,h)}}var C=c.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(i.callback=function(){Dx(s,c,h),typeof p!="function"&&(Ji===null?Ji=new Set([this]):Ji.add(this));var O=h.stack;this.componentDidCatch(h.value,{componentStack:O!==null?O:""})})}function cL(i,s,c,h,p){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=c.alternate,s!==null&&Ml(s,c,p,!0),c=er.current,c!==null){switch(c.tag){case 13:return kr===null?Bp():c.alternate===null&&kt===0&&(kt=3),c.flags&=-257,c.flags|=65536,c.lanes=p,h===Lm?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([h]):s.add(h),Up(i,h,p)),!1;case 22:return c.flags|=65536,h===Lm?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([h]):c.add(h)),Up(i,h,p)),!1}throw Error(r(435,c.tag))}return Up(i,h,p),Bp(),!1}if(dt)return s=er.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=p,h!==Im&&(i=Error(r(422),{cause:h}),Al(Xn(i,c)))):(h!==Im&&(s=Error(r(423),{cause:h}),Al(Xn(s,c))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,h=Xn(h,c),p=ip(i.stateNode,h,p),bp(i,p),kt!==4&&(kt=2)),!1;var x=Error(r(520),{cause:h});if(x=Xn(x,c),Gl===null?Gl=[x]:Gl.push(x),kt!==4&&(kt=2),s===null)return!0;h=Xn(h,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,i=p&-p,c.lanes|=i,i=ip(c.stateNode,h,i),bp(c,i),!1;case 1:if(s=c.type,x=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Ji===null||!Ji.has(x))))return c.flags|=65536,p&=-p,c.lanes|=p,p=Ix(p),Lx(p,i,c,h),bp(c,p),!1}c=c.return}while(c!==null);return!1}var Mx=Error(r(461)),Xt=!1;function sn(i,s,c,h){s.child=i===null?z_(s,null,c,h):Ha(s,i.child,c,h)}function jx(i,s,c,h,p){c=c.render;var x=s.ref;if("ref"in h){var C={};for(var O in h)O!=="ref"&&(C[O]=h[O])}else C=h;return Ya(s),h=Um(i,s,c,C,x,p),O=Hm(),i!==null&&!Xt?(Fm(i,s,p),si(i,s,p)):(dt&&O&&km(s),s.flags|=1,sn(i,s,h,p),s.child)}function Px(i,s,c,h,p){if(i===null){var x=c.type;return typeof x=="function"&&!Cp(x)&&x.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=x,Vx(i,s,x,h,p)):(i=_d(c.type,null,h,s,s.mode,p),i.ref=s.ref,i.return=s,s.child=i)}if(x=i.child,!hp(i,p)){var C=x.memoizedProps;if(c=c.compare,c=c!==null?c:_l,c(C,h)&&i.ref===s.ref)return si(i,s,p)}return s.flags|=1,i=Xi(x,h),i.ref=s.ref,i.return=s,s.child=i}function Vx(i,s,c,h,p){if(i!==null){var x=i.memoizedProps;if(_l(x,h)&&i.ref===s.ref)if(Xt=!1,s.pendingProps=h=x,hp(i,p))(i.flags&131072)!==0&&(Xt=!0);else return s.lanes=i.lanes,si(i,s,p)}return ap(i,s,c,h,p)}function Bx(i,s,c){var h=s.pendingProps,p=h.children,x=(s.stateNode._pendingVisibility&2)!==0,C=i!==null?i.memoizedState:null;if(Ll(i,s),h.mode==="hidden"||x){if((s.flags&128)!==0){if(h=C!==null?C.baseLanes|c:c,i!==null){for(p=s.child=i.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;s.childLanes=x&~h}else s.childLanes=0,s.child=null;return zx(i,s,h,c)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&ad(s,C!==null?C.cachePool:null),C!==null?U_(s,C):Mm(),H_(s);else return s.lanes=s.childLanes=536870912,zx(i,s,C!==null?C.baseLanes|c:c,c)}else C!==null?(ad(s,C.cachePool),U_(s,C),Ui(),s.memoizedState=null):(i!==null&&ad(s,null),Mm(),Ui());return sn(i,s,p,c),s.child}function zx(i,s,c,h){var p=Bm();return p=p===null?null:{parent:$t._currentValue,pool:p},s.memoizedState={baseLanes:c,cachePool:p},i!==null&&ad(s,null),Mm(),H_(s),i!==null&&Ml(i,s,h,!0),null}function Ll(i,s){var c=s.ref;if(c===null)i!==null&&i.ref!==null&&(s.flags|=2097664);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(s.flags|=2097664)}}function ap(i,s,c,h,p){return Ya(s),c=Um(i,s,c,h,void 0,p),h=Hm(),i!==null&&!Xt?(Fm(i,s,p),si(i,s,p)):(dt&&h&&km(s),s.flags|=1,sn(i,s,c,p),s.child)}function Ux(i,s,c,h,p,x){return Ya(s),s.updateQueue=null,c=K_(s,h,c,p),q_(i),h=Hm(),i!==null&&!Xt?(Fm(i,s,x),si(i,s,x)):(dt&&h&&km(s),s.flags|=1,sn(i,s,c,x),s.child)}function Hx(i,s,c,h,p){if(Ya(s),s.stateNode===null){var x=Fs,C=c.contextType;typeof C=="object"&&C!==null&&(x=dn(C)),x=new c(h,x),s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=rp,s.stateNode=x,x._reactInternals=s,x=s.stateNode,x.props=h,x.state=s.memoizedState,x.refs={},yp(s),C=c.contextType,x.context=typeof C=="object"&&C!==null?dn(C):Fs,x.state=s.memoizedState,C=c.getDerivedStateFromProps,typeof C=="function"&&(np(s,c,C,h),x.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(C=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),C!==x.state&&rp.enqueueReplaceState(x,x.state,null),Vl(s,h,x,p),Pl(),x.state=s.memoizedState),typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(i===null){x=s.stateNode;var O=s.memoizedProps,M=Ka(c,O);x.props=M;var $=x.context,se=c.contextType;C=Fs,typeof se=="object"&&se!==null&&(C=dn(se));var he=c.getDerivedStateFromProps;se=typeof he=="function"||typeof x.getSnapshotBeforeUpdate=="function",O=s.pendingProps!==O,se||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O||$!==C)&&Rx(s,x,h,C),$i=!1;var Q=s.memoizedState;x.state=Q,Vl(s,h,x,p),Pl(),$=s.memoizedState,O||Q!==$||$i?(typeof he=="function"&&(np(s,c,he,h),$=s.memoizedState),(M=$i||Cx(s,c,M,h,Q,$,C))?(se||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"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=$),x.props=h,x.state=$,x.context=C,h=M):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,vp(i,s),C=s.memoizedProps,se=Ka(c,C),x.props=se,he=s.pendingProps,Q=x.context,$=c.contextType,M=Fs,typeof $=="object"&&$!==null&&(M=dn($)),O=c.getDerivedStateFromProps,($=typeof O=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==he||Q!==M)&&Rx(s,x,h,M),$i=!1,Q=s.memoizedState,x.state=Q,Vl(s,h,x,p),Pl();var ae=s.memoizedState;C!==he||Q!==ae||$i||i!==null&&i.dependencies!==null&&gd(i.dependencies)?(typeof O=="function"&&(np(s,c,O,h),ae=s.memoizedState),(se=$i||Cx(s,c,se,h,Q,ae,M)||i!==null&&i.dependencies!==null&&gd(i.dependencies))?($||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ae,M),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ae,M)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===i.memoizedProps&&Q===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&Q===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ae),x.props=h,x.state=ae,x.context=M,h=se):(typeof x.componentDidUpdate!="function"||C===i.memoizedProps&&Q===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&Q===i.memoizedState||(s.flags|=1024),h=!1)}return x=h,Ll(i,s),h=(s.flags&128)!==0,x||h?(x=s.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:x.render(),s.flags|=1,i!==null&&h?(s.child=Ha(s,i.child,null,p),s.child=Ha(s,null,c,p)):sn(i,s,c,p),s.memoizedState=x.state,i=s.child):i=si(i,s,p),i}function Fx(i,s,c,h){return Sl(),s.flags|=256,sn(i,s,c,h),s.child}var sp={dehydrated:null,treeContext:null,retryLane:0};function op(i){return{baseLanes:i,cachePool:$_()}}function lp(i,s,c){return i=i!==null?i.childLanes&~c:0,s&&(i|=ir),i}function Gx(i,s,c){var h=s.pendingProps,p=!1,x=(s.flags&128)!==0,C;if((C=x)||(C=i!==null&&i.memoizedState===null?!1:(Gt.current&2)!==0),C&&(p=!0,s.flags&=-129),C=(s.flags&32)!==0,s.flags&=-33,i===null){if(dt){if(p?zi(s):Ui(),dt){var O=an,M;if(M=O){e:{for(M=O,O=Or;M.nodeType!==8;){if(!O){O=null;break e}if(M=br(M.nextSibling),M===null){O=null;break e}}O=M}O!==null?(s.memoizedState={dehydrated:O,treeContext:Ba!==null?{id:ni,overflow:ri}:null,retryLane:536870912},M=rr(18,null,null,0),M.stateNode=O,M.return=s,s.child=M,_n=s,an=null,M=!0):M=!1}M||Ua(s)}if(O=s.memoizedState,O!==null&&(O=O.dehydrated,O!==null))return O.data==="$!"?s.lanes=16:s.lanes=536870912,null;ii(s)}return O=h.children,h=h.fallback,p?(Ui(),p=s.mode,O=up({mode:"hidden",children:O},p),h=Xa(h,p,c,null),O.return=s,h.return=s,O.sibling=h,s.child=O,p=s.child,p.memoizedState=op(c),p.childLanes=lp(i,C,c),s.memoizedState=sp,h):(zi(s),cp(s,O))}if(M=i.memoizedState,M!==null&&(O=M.dehydrated,O!==null)){if(x)s.flags&256?(zi(s),s.flags&=-257,s=dp(i,s,c)):s.memoizedState!==null?(Ui(),s.child=i.child,s.flags|=128,s=null):(Ui(),p=h.fallback,O=s.mode,h=up({mode:"visible",children:h.children},O),p=Xa(p,O,c,null),p.flags|=2,h.return=s,p.return=s,h.sibling=p,s.child=h,Ha(s,i.child,null,c),h=s.child,h.memoizedState=op(c),h.childLanes=lp(i,C,c),s.memoizedState=sp,s=p);else if(zi(s),O.data==="$!"){if(C=O.nextSibling&&O.nextSibling.dataset,C)var $=C.dgst;C=$,h=Error(r(419)),h.stack="",h.digest=C,Al({value:h,source:null,stack:null}),s=dp(i,s,c)}else if(Xt||Ml(i,s,c,!1),C=(c&i.childLanes)!==0,Xt||C){if(C=vt,C!==null){if(h=c&-c,(h&42)!==0)h=1;else switch(h){case 2:h=1;break;case 8:h=4;break;case 32:h=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:h=64;break;case 268435456:h=134217728;break;default:h=0}if(h=(h&(C.suspendedLanes|c))!==0?0:h,h!==0&&h!==M.retryLane)throw M.retryLane=h,Bi(i,h),xn(C,i,h),Mx}O.data==="$?"||Bp(),s=dp(i,s,c)}else O.data==="$?"?(s.flags|=128,s.child=i.child,s=AL.bind(null,i),O._reactRetry=s,s=null):(i=M.treeContext,an=br(O.nextSibling),_n=s,dt=!0,yr=null,Or=!1,i!==null&&(Qn[Jn++]=ni,Qn[Jn++]=ri,Qn[Jn++]=Ba,ni=i.id,ri=i.overflow,Ba=s),s=cp(s,h.children),s.flags|=4096);return s}return p?(Ui(),p=h.fallback,O=s.mode,M=i.child,$=M.sibling,h=Xi(M,{mode:"hidden",children:h.children}),h.subtreeFlags=M.subtreeFlags&31457280,$!==null?p=Xi($,p):(p=Xa(p,O,c,null),p.flags|=2),p.return=s,h.return=s,h.sibling=p,s.child=h,h=p,p=s.child,O=i.child.memoizedState,O===null?O=op(c):(M=O.cachePool,M!==null?($=$t._currentValue,M=M.parent!==$?{parent:$,pool:$}:M):M=$_(),O={baseLanes:O.baseLanes|c,cachePool:M}),p.memoizedState=O,p.childLanes=lp(i,C,c),s.memoizedState=sp,h):(zi(s),c=i.child,i=c.sibling,c=Xi(c,{mode:"visible",children:h.children}),c.return=s,c.sibling=null,i!==null&&(C=s.deletions,C===null?(s.deletions=[i],s.flags|=16):C.push(i)),s.child=c,s.memoizedState=null,c)}function cp(i,s){return s=up({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function up(i,s){return gE(i,s,0,null)}function dp(i,s,c){return Ha(s,i.child,null,c),i=cp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function $x(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),pp(i.return,s,c)}function fp(i,s,c,h,p){var x=i.memoizedState;x===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:p}:(x.isBackwards=s,x.rendering=null,x.renderingStartTime=0,x.last=h,x.tail=c,x.tailMode=p)}function qx(i,s,c){var h=s.pendingProps,p=h.revealOrder,x=h.tail;if(sn(i,s,h.children,c),h=Gt.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&$x(i,c,s);else if(i.tag===19)$x(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}switch(Me(Gt,h),p){case"forwards":for(c=s.child,p=null;c!==null;)i=c.alternate,i!==null&&id(i)===null&&(p=c),c=c.sibling;c=p,c===null?(p=s.child,s.child=null):(p=c.sibling,c.sibling=null),fp(s,!1,p,c,x);break;case"backwards":for(c=null,p=s.child,s.child=null;p!==null;){if(i=p.alternate,i!==null&&id(i)===null){s.child=p;break}i=p.sibling,p.sibling=c,c=p,p=i}fp(s,!0,c,null,x);break;case"together":fp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function si(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Qi|=s.lanes,(c&s.childLanes)===0)if(i!==null){if(Ml(i,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,c=Xi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Xi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function hp(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&gd(i)))}function uL(i,s,c){switch(s.tag){case 3:pr(s,s.stateNode.containerInfo),Gi(s,$t,i.memoizedState.cache),Sl();break;case 27:case 5:Nr(s);break;case 4:pr(s,s.stateNode.containerInfo);break;case 10:Gi(s,s.type,s.memoizedProps.value);break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(zi(s),s.flags|=128,null):(c&s.child.childLanes)!==0?Gx(i,s,c):(zi(s),i=si(i,s,c),i!==null?i.sibling:null);zi(s);break;case 19:var p=(i.flags&128)!==0;if(h=(c&s.childLanes)!==0,h||(Ml(i,s,c,!1),h=(c&s.childLanes)!==0),p){if(h)return qx(i,s,c);s.flags|=128}if(p=s.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Me(Gt,Gt.current),h)break;return null;case 22:case 23:return s.lanes=0,Bx(i,s,c);case 24:Gi(s,$t,i.memoizedState.cache)}return si(i,s,c)}function Kx(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps)Xt=!0;else{if(!hp(i,c)&&(s.flags&128)===0)return Xt=!1,uL(i,s,c);Xt=(i.flags&131072)!==0}else Xt=!1,dt&&(s.flags&1048576)!==0&&k_(s,Ju,s.index);switch(s.lanes=0,s.tag){case 16:e:{i=s.pendingProps;var h=s.elementType,p=h._init;if(h=p(h._payload),s.type=h,typeof h=="function")Cp(h)?(i=Ka(h,i),s.tag=1,s=Hx(null,s,h,i,c)):(s.tag=0,s=ap(null,s,h,i,c));else{if(h!=null){if(p=h.$$typeof,p===_){s.tag=11,s=jx(null,s,h,i,c);break e}else if(p===w){s.tag=14,s=Px(null,s,h,i,c);break e}}throw s=P(h)||h,Error(r(306,s,""))}}return s;case 0:return ap(i,s,s.type,s.pendingProps,c);case 1:return h=s.type,p=Ka(h,s.pendingProps),Hx(i,s,h,p,c);case 3:e:{if(pr(s,s.stateNode.containerInfo),i===null)throw Error(r(387));var x=s.pendingProps;p=s.memoizedState,h=p.element,vp(i,s),Vl(s,x,null,c);var C=s.memoizedState;if(x=C.cache,Gi(s,$t,x),x!==p.cache&&gp(s,[$t],c,!0),Pl(),x=C.element,p.isDehydrated)if(p={element:x,isDehydrated:!1,cache:C.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=Fx(i,s,x,c);break e}else if(x!==h){h=Xn(Error(r(424)),s),Al(h),s=Fx(i,s,x,c);break e}else for(an=br(s.stateNode.containerInfo.firstChild),_n=s,dt=!0,yr=null,Or=!0,c=z_(s,null,x,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Sl(),x===h){s=si(i,s,c);break e}sn(i,s,x,c)}s=s.child}return s;case 26:return Ll(i,s),i===null?(c=ZE(s.type,null,s.pendingProps,null))?s.memoizedState=c:dt||(c=s.type,i=s.pendingProps,h=Dd(Et.current).createElement(c),h[un]=s,h[Tn]=i,on(h,c,i),Zt(h),s.stateNode=h):s.memoizedState=ZE(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return Nr(s),i===null&&dt&&(h=s.stateNode=KE(s.type,s.pendingProps,Et.current),_n=s,Or=!0,an=br(h.firstChild)),h=s.pendingProps.children,i!==null||dt?sn(i,s,h,c):s.child=Ha(s,null,h,c),Ll(i,s),s.child;case 5:return i===null&&dt&&((p=h=an)&&(h=zL(h,s.type,s.pendingProps,Or),h!==null?(s.stateNode=h,_n=s,an=br(h.firstChild),Or=!1,p=!0):p=!1),p||Ua(s)),Nr(s),p=s.type,x=s.pendingProps,C=i!==null?i.memoizedProps:null,h=x.children,Jp(p,x)?h=null:C!==null&&Jp(p,C)&&(s.flags|=32),s.memoizedState!==null&&(p=Um(i,s,rL,null,null,c),Jl._currentValue=p),Ll(i,s),sn(i,s,h,c),s.child;case 6:return i===null&&dt&&((i=c=an)&&(c=UL(c,s.pendingProps,Or),c!==null?(s.stateNode=c,_n=s,an=null,i=!0):i=!1),i||Ua(s)),null;case 13:return Gx(i,s,c);case 4:return pr(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Ha(s,null,h,c):sn(i,s,h,c),s.child;case 11:return jx(i,s,s.type,s.pendingProps,c);case 7:return sn(i,s,s.pendingProps,c),s.child;case 8:return sn(i,s,s.pendingProps.children,c),s.child;case 12:return sn(i,s,s.pendingProps.children,c),s.child;case 10:return h=s.pendingProps,Gi(s,s.type,h.value),sn(i,s,h.children,c),s.child;case 9:return p=s.type._context,h=s.pendingProps.children,Ya(s),p=dn(p),h=h(p),s.flags|=1,sn(i,s,h,c),s.child;case 14:return Px(i,s,s.type,s.pendingProps,c);case 15:return Vx(i,s,s.type,s.pendingProps,c);case 19:return qx(i,s,c);case 22:return Bx(i,s,c);case 24:return Ya(s),h=dn($t),i===null?(p=Bm(),p===null&&(p=vt,x=Pm(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=c),p=x),s.memoizedState={parent:h,cache:p},yp(s),Gi(s,$t,p)):((i.lanes&c)!==0&&(vp(i,s),Vl(s,null,null,c),Pl()),p=i.memoizedState,x=s.memoizedState,p.parent!==h?(p={parent:h,cache:h},s.memoizedState=p,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=p),Gi(s,$t,h)):(h=x.cache,Gi(s,$t,h),h!==p.cache&&gp(s,[$t],c,!0))),sn(i,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}var mp=we(null),Wa=null,oi=null;function Gi(i,s,c){Me(mp,s._currentValue),s._currentValue=c}function li(i){i._currentValue=mp.current,He(mp)}function pp(i,s,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===c)break;i=i.return}}function gp(i,s,c,h){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var x=p.dependencies;if(x!==null){var C=p.child;x=x.firstContext;e:for(;x!==null;){var O=x;x=p;for(var M=0;M<s.length;M++)if(O.context===s[M]){x.lanes|=c,O=x.alternate,O!==null&&(O.lanes|=c),pp(x.return,c,i),h||(C=null);break e}x=O.next}}else if(p.tag===18){if(C=p.return,C===null)throw Error(r(341));C.lanes|=c,x=C.alternate,x!==null&&(x.lanes|=c),pp(C,c,i),C=null}else C=p.child;if(C!==null)C.return=p;else for(C=p;C!==null;){if(C===i){C=null;break}if(p=C.sibling,p!==null){p.return=C.return,C=p;break}C=C.return}p=C}}function Ml(i,s,c,h){i=null;for(var p=s,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 C=p.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var O=p.type;Mn(p.pendingProps.value,C.value)||(i!==null?i.push(O):i=[O])}}else if(p===Yt.current){if(C=p.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(Jl):i=[Jl])}p=p.return}i!==null&&gp(s,i,c,h),s.flags|=262144}function gd(i){for(i=i.firstContext;i!==null;){if(!Mn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ya(i){Wa=i,oi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function dn(i){return Wx(Wa,i)}function yd(i,s){return Wa===null&&Ya(i),Wx(i,s)}function Wx(i,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},oi===null){if(i===null)throw Error(r(308));oi=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else oi=oi.next=s;return c}var $i=!1;function yp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vp(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ki(i,s,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(wt&2)!==0){var p=h.pending;return p===null?s.next=s:(s.next=p.next,p.next=s),h.pending=s,s=Xu(i),N_(i,null,c),s}return Zu(i,h,s,c),Xu(i)}function jl(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194176)!==0)){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,Pb(i,c)}}function bp(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var p=null,x=null;if(c=c.firstBaseUpdate,c!==null){do{var C={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};x===null?p=x=C:x=x.next=C,c=c.next}while(c!==null);x===null?p=x=s:x=x.next=s}else p=x=s;c={baseState:h.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:h.shared,callbacks:h.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}var _p=!1;function Pl(){if(_p){var i=Ys;if(i!==null)throw i}}function Vl(i,s,c,h){_p=!1;var p=i.updateQueue;$i=!1;var x=p.firstBaseUpdate,C=p.lastBaseUpdate,O=p.shared.pending;if(O!==null){p.shared.pending=null;var M=O,$=M.next;M.next=null,C===null?x=$:C.next=$,C=M;var se=i.alternate;se!==null&&(se=se.updateQueue,O=se.lastBaseUpdate,O!==C&&(O===null?se.firstBaseUpdate=$:O.next=$,se.lastBaseUpdate=M))}if(x!==null){var he=p.baseState;C=0,se=$=M=null,O=x;do{var Q=O.lane&-536870913,ae=Q!==O.lane;if(ae?(ct&Q)===Q:(h&Q)===Q){Q!==0&&Q===Ws&&(_p=!0),se!==null&&(se=se.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var Le=i,qe=O;Q=s;var Dt=c;switch(qe.tag){case 1:if(Le=qe.payload,typeof Le=="function"){he=Le.call(Dt,he,Q);break e}he=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=qe.payload,Q=typeof Le=="function"?Le.call(Dt,he,Q):Le,Q==null)break e;he=U({},he,Q);break e;case 2:$i=!0}}Q=O.callback,Q!==null&&(i.flags|=64,ae&&(i.flags|=8192),ae=p.callbacks,ae===null?p.callbacks=[Q]:ae.push(Q))}else ae={lane:Q,tag:O.tag,payload:O.payload,callback:O.callback,next:null},se===null?($=se=ae,M=he):se=se.next=ae,C|=Q;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);se===null&&(M=he),p.baseState=M,p.firstBaseUpdate=$,p.lastBaseUpdate=se,x===null&&(p.shared.lanes=0),Qi|=C,i.lanes=C,i.memoizedState=he}}function Yx(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function Zx(i,s){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Yx(c[i],s)}function Bl(i,s){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var p=h.next;c=p;do{if((c.tag&i)===i){h=void 0;var x=c.create,C=c.inst;h=x(),C.destroy=h}c=c.next}while(c!==p)}}catch(O){yt(s,s.return,O)}}function Wi(i,s,c){try{var h=s.updateQueue,p=h!==null?h.lastEffect:null;if(p!==null){var x=p.next;h=x;do{if((h.tag&i)===i){var C=h.inst,O=C.destroy;if(O!==void 0){C.destroy=void 0,p=s;var M=c;try{O()}catch($){yt(p,M,$)}}}h=h.next}while(h!==x)}}catch($){yt(s,s.return,$)}}function Xx(i){var s=i.updateQueue;if(s!==null){var c=i.stateNode;try{Zx(s,c)}catch(h){yt(i,i.return,h)}}}function Qx(i,s,c){c.props=Ka(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(h){yt(i,s,h)}}function Za(i,s){try{var c=i.ref;if(c!==null){var h=i.stateNode;switch(i.tag){case 26:case 27:case 5:var p=h;break;default:p=h}typeof c=="function"?i.refCleanup=c(p):c.current=p}}catch(x){yt(i,s,x)}}function jn(i,s){var c=i.ref,h=i.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(p){yt(i,s,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(p){yt(i,s,p)}else c.current=null}function Jx(i){var s=i.type,c=i.memoizedProps,h=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(p){yt(i,i.return,p)}}function eE(i,s,c){try{var h=i.stateNode;ML(h,i.type,c,s),h[Tn]=s}catch(p){yt(i,i.return,p)}}function tE(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27||i.tag===4}function xp(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||tE(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 Ep(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=kd));else if(h!==4&&h!==27&&(i=i.child,i!==null))for(Ep(i,s,c),i=i.sibling;i!==null;)Ep(i,s,c),i=i.sibling}function vd(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(h!==4&&h!==27&&(i=i.child,i!==null))for(vd(i,s,c),i=i.sibling;i!==null;)vd(i,s,c),i=i.sibling}var ci=!1,Ot=!1,Sp=!1,nE=typeof WeakSet=="function"?WeakSet:Set,Qt=null,rE=!1;function dL(i,s){if(i=i.containerInfo,Xp=Vd,i=__(i),wm(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var p=h.anchorOffset,x=h.focusNode;h=h.focusOffset;try{c.nodeType,x.nodeType}catch{c=null;break e}var C=0,O=-1,M=-1,$=0,se=0,he=i,Q=null;t:for(;;){for(var ae;he!==c||p!==0&&he.nodeType!==3||(O=C+p),he!==x||h!==0&&he.nodeType!==3||(M=C+h),he.nodeType===3&&(C+=he.nodeValue.length),(ae=he.firstChild)!==null;)Q=he,he=ae;for(;;){if(he===i)break t;if(Q===c&&++$===p&&(O=C),Q===x&&++se===h&&(M=C),(ae=he.nextSibling)!==null)break;he=Q,Q=he.parentNode}he=ae}c=O===-1||M===-1?null:{start:O,end:M}}else c=null}c=c||{start:0,end:0}}else c=null;for(Qp={focusedElem:i,selectionRange:c},Vd=!1,Qt=s;Qt!==null;)if(s=Qt,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Qt=i;else for(;Qt!==null;){switch(s=Qt,x=s.alternate,i=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&x!==null){i=void 0,c=s,p=x.memoizedProps,x=x.memoizedState,h=c.stateNode;try{var Le=Ka(c.type,p,c.elementType===c.type);i=h.getSnapshotBeforeUpdate(Le,x),h.__reactInternalSnapshotBeforeUpdate=i}catch(qe){yt(c,c.return,qe)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,c=i.nodeType,c===9)ng(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":ng(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=s.sibling,i!==null){i.return=s.return,Qt=i;break}Qt=s.return}return Le=rE,rE=!1,Le}function iE(i,s,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:di(i,c),h&4&&Bl(5,c);break;case 1:if(di(i,c),h&4)if(i=c.stateNode,s===null)try{i.componentDidMount()}catch(O){yt(c,c.return,O)}else{var p=Ka(c.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(p,s,i.__reactInternalSnapshotBeforeUpdate)}catch(O){yt(c,c.return,O)}}h&64&&Xx(c),h&512&&Za(c,c.return);break;case 3:if(di(i,c),h&64&&(h=c.updateQueue,h!==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{Zx(h,i)}catch(O){yt(c,c.return,O)}}break;case 26:di(i,c),h&512&&Za(c,c.return);break;case 27:case 5:di(i,c),s===null&&h&4&&Jx(c),h&512&&Za(c,c.return);break;case 12:di(i,c);break;case 13:di(i,c),h&4&&oE(i,c);break;case 22:if(p=c.memoizedState!==null||ci,!p){s=s!==null&&s.memoizedState!==null||Ot;var x=ci,C=Ot;ci=p,(Ot=s)&&!C?Yi(i,c,(c.subtreeFlags&8772)!==0):di(i,c),ci=x,Ot=C}h&512&&(c.memoizedProps.mode==="manual"?Za(c,c.return):jn(c,c.return));break;default:di(i,c)}}function aE(i){var s=i.alternate;s!==null&&(i.alternate=null,aE(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&cm(s)),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 Ht=null,Pn=!1;function ui(i,s,c){for(c=c.child;c!==null;)sE(i,s,c),c=c.sibling}function sE(i,s,c){if(bn&&typeof bn.onCommitFiberUnmount=="function")try{bn.onCommitFiberUnmount(Mi,c)}catch{}switch(c.tag){case 26:Ot||jn(c,s),ui(i,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Ot||jn(c,s);var h=Ht,p=Pn;for(Ht=c.stateNode,ui(i,s,c),c=c.stateNode,s=c.attributes;s.length;)c.removeAttributeNode(s[0]);cm(c),Ht=h,Pn=p;break;case 5:Ot||jn(c,s);case 6:p=Ht;var x=Pn;if(Ht=null,ui(i,s,c),Ht=p,Pn=x,Ht!==null)if(Pn)try{i=Ht,h=c.stateNode,i.nodeType===8?i.parentNode.removeChild(h):i.removeChild(h)}catch(C){yt(c,s,C)}else try{Ht.removeChild(c.stateNode)}catch(C){yt(c,s,C)}break;case 18:Ht!==null&&(Pn?(s=Ht,c=c.stateNode,s.nodeType===8?tg(s.parentNode,c):s.nodeType===1&&tg(s,c),rc(s)):tg(Ht,c.stateNode));break;case 4:h=Ht,p=Pn,Ht=c.stateNode.containerInfo,Pn=!0,ui(i,s,c),Ht=h,Pn=p;break;case 0:case 11:case 14:case 15:Ot||Wi(2,c,s),Ot||Wi(4,c,s),ui(i,s,c);break;case 1:Ot||(jn(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"&&Qx(c,s,h)),ui(i,s,c);break;case 21:ui(i,s,c);break;case 22:Ot||jn(c,s),Ot=(h=Ot)||c.memoizedState!==null,ui(i,s,c),Ot=h;break;default:ui(i,s,c)}}function oE(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{rc(i)}catch(c){yt(s,s.return,c)}}function fL(i){switch(i.tag){case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new nE),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new nE),s;default:throw Error(r(435,i.tag))}}function Ap(i,s){var c=fL(i);s.forEach(function(h){var p=wL.bind(null,i,h);c.has(h)||(c.add(h),h.then(p,p))})}function tr(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var p=c[h],x=i,C=s,O=C;e:for(;O!==null;){switch(O.tag){case 27:case 5:Ht=O.stateNode,Pn=!1;break e;case 3:Ht=O.stateNode.containerInfo,Pn=!0;break e;case 4:Ht=O.stateNode.containerInfo,Pn=!0;break e}O=O.return}if(Ht===null)throw Error(r(160));sE(x,C,p),Ht=null,Pn=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(s.subtreeFlags&13878)for(s=s.child;s!==null;)lE(s,i),s=s.sibling}var vr=null;function lE(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:tr(s,i),nr(i),h&4&&(Wi(3,i,i.return),Bl(3,i),Wi(5,i,i.return));break;case 1:tr(s,i),nr(i),h&512&&(Ot||c===null||jn(c,c.return)),h&64&&ci&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var p=vr;if(tr(s,i),nr(i),h&512&&(Ot||c===null||jn(c,c.return)),h&4){var x=c!==null?c.memoizedState:null;if(h=i.memoizedState,c===null)if(h===null)if(i.stateNode===null){e:{h=i.type,c=i.memoizedProps,p=p.ownerDocument||p;t:switch(h){case"title":x=p.getElementsByTagName("title")[0],(!x||x[dl]||x[un]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(h),p.head.insertBefore(x,p.querySelector("head > title"))),on(x,h,c),x[un]=i,Zt(x),h=x;break e;case"link":var C=JE("link","href",p).get(h+(c.href||""));if(C){for(var O=0;O<C.length;O++)if(x=C[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)){C.splice(O,1);break t}}x=p.createElement(h),on(x,h,c),p.head.appendChild(x);break;case"meta":if(C=JE("meta","content",p).get(h+(c.content||""))){for(O=0;O<C.length;O++)if(x=C[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)){C.splice(O,1);break t}}x=p.createElement(h),on(x,h,c),p.head.appendChild(x);break;default:throw Error(r(468,h))}x[un]=i,Zt(x),h=x}i.stateNode=h}else eS(p,i.type,i.stateNode);else i.stateNode=QE(p,h,i.memoizedProps);else x!==h?(x===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):x.count--,h===null?eS(p,i.type,i.stateNode):QE(p,h,i.memoizedProps)):h===null&&i.stateNode!==null&&eE(i,i.memoizedProps,c.memoizedProps)}break;case 27:if(h&4&&i.alternate===null){p=i.stateNode,x=i.memoizedProps;try{for(var M=p.firstChild;M;){var $=M.nextSibling,se=M.nodeName;M[dl]||se==="HEAD"||se==="BODY"||se==="SCRIPT"||se==="STYLE"||se==="LINK"&&M.rel.toLowerCase()==="stylesheet"||p.removeChild(M),M=$}for(var he=i.type,Q=p.attributes;Q.length;)p.removeAttributeNode(Q[0]);on(p,he,x),p[un]=i,p[Tn]=x}catch(Le){yt(i,i.return,Le)}}case 5:if(tr(s,i),nr(i),h&512&&(Ot||c===null||jn(c,c.return)),i.flags&32){p=i.stateNode;try{js(p,"")}catch(Le){yt(i,i.return,Le)}}h&4&&i.stateNode!=null&&(p=i.memoizedProps,eE(i,p,c!==null?c.memoizedProps:p)),h&1024&&(Sp=!0);break;case 6:if(tr(s,i),nr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,c=i.stateNode;try{c.nodeValue=h}catch(Le){yt(i,i.return,Le)}}break;case 3:if(Md=null,p=vr,vr=Id(s.containerInfo),tr(s,i),vr=p,nr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{rc(s.containerInfo)}catch(Le){yt(i,i.return,Le)}Sp&&(Sp=!1,cE(i));break;case 4:h=vr,vr=Id(i.stateNode.containerInfo),tr(s,i),nr(i),vr=h;break;case 12:tr(s,i),nr(i);break;case 13:tr(s,i),nr(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Ip=ke()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Ap(i,h)));break;case 22:if(h&512&&(Ot||c===null||jn(c,c.return)),M=i.memoizedState!==null,$=c!==null&&c.memoizedState!==null,se=ci,he=Ot,ci=se||M,Ot=he||$,tr(s,i),Ot=he,ci=se,nr(i),s=i.stateNode,s._current=i,s._visibility&=-3,s._visibility|=s._pendingVisibility&2,h&8192&&(s._visibility=M?s._visibility&-2:s._visibility|1,M&&(s=ci||Ot,c===null||$||s||Js(i)),i.memoizedProps===null||i.memoizedProps.mode!=="manual"))e:for(c=null,s=i;;){if(s.tag===5||s.tag===26||s.tag===27){if(c===null){$=c=s;try{if(p=$.stateNode,M)x=p.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{C=$.stateNode,O=$.memoizedProps.style;var ae=O!=null&&O.hasOwnProperty("display")?O.display:null;C.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(Le){yt($,$.return,Le)}}}else if(s.tag===6){if(c===null){$=s;try{$.stateNode.nodeValue=M?"":$.memoizedProps}catch(Le){yt($,$.return,Le)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=i.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,Ap(i,c))));break;case 19:tr(s,i),nr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Ap(i,h)));break;case 21:break;default:tr(s,i),nr(i)}}function nr(i){var s=i.flags;if(s&2){try{if(i.tag!==27){e:{for(var c=i.return;c!==null;){if(tE(c)){var h=c;break e}c=c.return}throw Error(r(160))}switch(h.tag){case 27:var p=h.stateNode,x=xp(i);vd(i,x,p);break;case 5:var C=h.stateNode;h.flags&32&&(js(C,""),h.flags&=-33);var O=xp(i);vd(i,O,C);break;case 3:case 4:var M=h.stateNode.containerInfo,$=xp(i);Ep(i,$,M);break;default:throw Error(r(161))}}}catch(se){yt(i,i.return,se)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function cE(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;cE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function di(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)iE(i,s.alternate,s),s=s.sibling}function Js(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:Wi(4,s,s.return),Js(s);break;case 1:jn(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&Qx(s,s.return,c),Js(s);break;case 26:case 27:case 5:jn(s,s.return),Js(s);break;case 22:jn(s,s.return),s.memoizedState===null&&Js(s);break;default:Js(s)}i=i.sibling}}function Yi(i,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,p=i,x=s,C=x.flags;switch(x.tag){case 0:case 11:case 15:Yi(p,x,c),Bl(4,x);break;case 1:if(Yi(p,x,c),h=x,p=h.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch($){yt(h,h.return,$)}if(h=x,p=h.updateQueue,p!==null){var O=h.stateNode;try{var M=p.shared.hiddenCallbacks;if(M!==null)for(p.shared.hiddenCallbacks=null,p=0;p<M.length;p++)Yx(M[p],O)}catch($){yt(h,h.return,$)}}c&&C&64&&Xx(x),Za(x,x.return);break;case 26:case 27:case 5:Yi(p,x,c),c&&h===null&&C&4&&Jx(x),Za(x,x.return);break;case 12:Yi(p,x,c);break;case 13:Yi(p,x,c),c&&C&4&&oE(p,x);break;case 22:x.memoizedState===null&&Yi(p,x,c),Za(x,x.return);break;default:Yi(p,x,c)}s=s.sibling}}function wp(i,s){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&Nl(c))}function Tp(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Nl(i))}function Zi(i,s,c,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)uE(i,s,c,h),s=s.sibling}function uE(i,s,c,h){var p=s.flags;switch(s.tag){case 0:case 11:case 15:Zi(i,s,c,h),p&2048&&Bl(9,s);break;case 3:Zi(i,s,c,h),p&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Nl(i)));break;case 12:if(p&2048){Zi(i,s,c,h),i=s.stateNode;try{var x=s.memoizedProps,C=x.id,O=x.onPostCommit;typeof O=="function"&&O(C,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(M){yt(s,s.return,M)}}else Zi(i,s,c,h);break;case 23:break;case 22:x=s.stateNode,s.memoizedState!==null?x._visibility&4?Zi(i,s,c,h):zl(i,s):x._visibility&4?Zi(i,s,c,h):(x._visibility|=4,eo(i,s,c,h,(s.subtreeFlags&10256)!==0)),p&2048&&wp(s.alternate,s);break;case 24:Zi(i,s,c,h),p&2048&&Tp(s.alternate,s);break;default:Zi(i,s,c,h)}}function eo(i,s,c,h,p){for(p=p&&(s.subtreeFlags&10256)!==0,s=s.child;s!==null;){var x=i,C=s,O=c,M=h,$=C.flags;switch(C.tag){case 0:case 11:case 15:eo(x,C,O,M,p),Bl(8,C);break;case 23:break;case 22:var se=C.stateNode;C.memoizedState!==null?se._visibility&4?eo(x,C,O,M,p):zl(x,C):(se._visibility|=4,eo(x,C,O,M,p)),p&&$&2048&&wp(C.alternate,C);break;case 24:eo(x,C,O,M,p),p&&$&2048&&Tp(C.alternate,C);break;default:eo(x,C,O,M,p)}s=s.sibling}}function zl(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=i,h=s,p=h.flags;switch(h.tag){case 22:zl(c,h),p&2048&&wp(h.alternate,h);break;case 24:zl(c,h),p&2048&&Tp(h.alternate,h);break;default:zl(c,h)}s=s.sibling}}var Ul=8192;function to(i){if(i.subtreeFlags&Ul)for(i=i.child;i!==null;)dE(i),i=i.sibling}function dE(i){switch(i.tag){case 26:to(i),i.flags&Ul&&i.memoizedState!==null&&eM(vr,i.memoizedState,i.memoizedProps);break;case 5:to(i);break;case 3:case 4:var s=vr;vr=Id(i.stateNode.containerInfo),to(i),vr=s;break;case 22:i.memoizedState===null&&(s=i.alternate,s!==null&&s.memoizedState!==null?(s=Ul,Ul=16777216,to(i),Ul=s):to(i));break;default:to(i)}}function fE(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function Hl(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Qt=h,mE(h,i)}fE(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)hE(i),i=i.sibling}function hE(i){switch(i.tag){case 0:case 11:case 15:Hl(i),i.flags&2048&&Wi(9,i,i.return);break;case 3:Hl(i);break;case 12:Hl(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&4&&(i.return===null||i.return.tag!==13)?(s._visibility&=-5,bd(i)):Hl(i);break;default:Hl(i)}}function bd(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Qt=h,mE(h,i)}fE(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:Wi(8,s,s.return),bd(s);break;case 22:c=s.stateNode,c._visibility&4&&(c._visibility&=-5,bd(s));break;default:bd(s)}i=i.sibling}}function mE(i,s){for(;Qt!==null;){var c=Qt;switch(c.tag){case 0:case 11:case 15:Wi(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Nl(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,Qt=h;else e:for(c=i;Qt!==null;){h=Qt;var p=h.sibling,x=h.return;if(aE(h),h===c){Qt=null;break e}if(p!==null){p.return=x,Qt=p;break e}Qt=x}}}function hL(i,s,c,h){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=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(i,s,c,h){return new hL(i,s,c,h)}function Cp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Xi(i,s){var c=i.alternate;return c===null?(c=rr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,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,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function pE(i,s){i.flags&=31457282;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=s,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,s=c.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function _d(i,s,c,h,p,x){var C=0;if(h=i,typeof i=="function")Cp(i)&&(C=1);else if(typeof i=="string")C=QL(i,c,Ke.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case d:return Xa(c.children,p,x,s);case f:C=8,p|=24;break;case m:return i=rr(12,c,s,p|2),i.elementType=m,i.lanes=x,i;case S:return i=rr(13,c,s,p),i.elementType=S,i.lanes=x,i;case A:return i=rr(19,c,s,p),i.elementType=A,i.lanes=x,i;case R:return gE(c,p,x,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case g:case v:C=10;break e;case y:C=9;break e;case _:C=11;break e;case w:C=14;break e;case T:C=16,h=null;break e}C=29,c=Error(r(130,i===null?"null":typeof i,"")),h=null}return s=rr(C,c,s,p),s.elementType=i,s.type=h,s.lanes=x,s}function Xa(i,s,c,h){return i=rr(7,i,h,s),i.lanes=c,i}function gE(i,s,c,h){i=rr(22,i,h,s),i.elementType=R,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 C=Bi(x,2);C!==null&&(p._pendingVisibility|=2,xn(C,x,2))}},attach:function(){var x=p._current;if(x===null)throw Error(r(456));if((p._pendingVisibility&2)!==0){var C=Bi(x,2);C!==null&&(p._pendingVisibility&=-3,xn(C,x,2))}}};return i.stateNode=p,i}function Rp(i,s,c){return i=rr(6,i,null,s),i.lanes=c,i}function Np(i,s,c){return s=rr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function fi(i){i.flags|=4}function yE(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!tS(s)){if(s=er.current,s!==null&&((ct&4194176)===ct?kr!==null:(ct&62914560)!==ct&&(ct&536870912)===0||s!==kr))throw Tl=Lm,L_;i.flags|=8192}}function xd(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?Mb():536870912,i.lanes|=s,ro|=s)}function Fl(i,s){if(!dt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function At(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(s)for(var p=i.child;p!==null;)c|=p.lanes|p.childLanes,h|=p.subtreeFlags&31457280,h|=p.flags&31457280,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)c|=p.lanes|p.childLanes,h|=p.subtreeFlags,h|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=h,i.childLanes=c,s}function mL(i,s,c){var h=s.pendingProps;switch(Dm(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(s),null;case 1:return At(s),null;case 3:return c=s.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),li($t),Dn(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(El(s)?fi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,yr!==null&&(Pp(yr),yr=null))),At(s),null;case 26:return c=s.memoizedState,i===null?(fi(s),c!==null?(At(s),yE(s,c)):(At(s),s.flags&=-16777217)):c?c!==i.memoizedState?(fi(s),At(s),yE(s,c)):(At(s),s.flags&=-16777217):(i.memoizedProps!==h&&fi(s),At(s),s.flags&=-16777217),null;case 27:z(s),c=Et.current;var p=s.type;if(i!==null&&s.stateNode!=null)i.memoizedProps!==h&&fi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}i=Ke.current,El(s)?D_(s):(i=KE(p,h,c),s.stateNode=i,fi(s))}return At(s),null;case 5:if(z(s),c=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==h&&fi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}if(i=Ke.current,El(s))D_(s);else{switch(p=Dd(Et.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 h.is=="string"?p.createElement("select",{is:h.is}):p.createElement("select"),h.multiple?i.multiple=!0:h.size&&(i.size=h.size);break;default:i=typeof h.is=="string"?p.createElement(c,{is:h.is}):p.createElement(c)}}i[un]=s,i[Tn]=h;e:for(p=s.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===s)break e;for(;p.sibling===null;){if(p.return===null||p.return===s)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}s.stateNode=i;e:switch(on(i,c,h),c){case"button":case"input":case"select":case"textarea":i=!!h.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&fi(s)}}return At(s),s.flags&=-16777217,null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==h&&fi(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(i=Et.current,El(s)){if(i=s.stateNode,c=s.memoizedProps,h=null,p=_n,p!==null)switch(p.tag){case 27:case 5:h=p.memoizedProps}i[un]=s,i=!!(i.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||UE(i.nodeValue,c)),i||Ua(s)}else i=Dd(i).createTextNode(h),i[un]=s,s.stateNode=i}return At(s),null;case 13:if(h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=El(s),h!==null&&h.dehydrated!==null){if(i===null){if(!p)throw Error(r(318));if(p=s.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[un]=s}else Sl(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),p=!1}else yr!==null&&(Pp(yr),yr=null),p=!0;if(!p)return s.flags&256?(ii(s),s):(ii(s),null)}if(ii(s),(s.flags&128)!==0)return s.lanes=c,s;if(c=h!==null,i=i!==null&&i.memoizedState!==null,c){h=s.child,p=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(p=h.alternate.memoizedState.cachePool.pool);var x=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(x=h.memoizedState.cachePool.pool),x!==p&&(h.flags|=2048)}return c!==i&&c&&(s.child.flags|=8192),xd(s,s.updateQueue),At(s),null;case 4:return Dn(),i===null&&Wp(s.stateNode.containerInfo),At(s),null;case 10:return li(s.type),At(s),null;case 19:if(He(Gt),p=s.memoizedState,p===null)return At(s),null;if(h=(s.flags&128)!==0,x=p.rendering,x===null)if(h)Fl(p,!1);else{if(kt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=id(i),x!==null){for(s.flags|=128,Fl(p,!1),i=x.updateQueue,s.updateQueue=i,xd(s,i),s.subtreeFlags=0,i=c,c=s.child;c!==null;)pE(c,i),c=c.sibling;return Me(Gt,Gt.current&1|2),s.child}i=i.sibling}p.tail!==null&&ke()>Ed&&(s.flags|=128,h=!0,Fl(p,!1),s.lanes=4194304)}else{if(!h)if(i=id(x),i!==null){if(s.flags|=128,h=!0,i=i.updateQueue,s.updateQueue=i,xd(s,i),Fl(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!dt)return At(s),null}else 2*ke()-p.renderingStartTime>Ed&&c!==536870912&&(s.flags|=128,h=!0,Fl(p,!1),s.lanes=4194304);p.isBackwards?(x.sibling=s.child,s.child=x):(i=p.last,i!==null?i.sibling=x:s.child=x,p.last=x)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=ke(),s.sibling=null,i=Gt.current,Me(Gt,h?i&1|2:i&1),s):(At(s),null);case 22:case 23:return ii(s),jm(),h=s.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(c&536870912)!==0&&(s.flags&128)===0&&(At(s),s.subtreeFlags&6&&(s.flags|=8192)):At(s),c=s.updateQueue,c!==null&&xd(s,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==c&&(s.flags|=2048),i!==null&&He(Fa),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),li($t),At(s),null;case 25:return null}throw Error(r(156,s.tag))}function pL(i,s){switch(Dm(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return li($t),Dn(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return z(s),null;case 13:if(ii(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Sl()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return He(Gt),null;case 4:return Dn(),null;case 10:return li(s.type),null;case 22:case 23:return ii(s),jm(),i!==null&&He(Fa),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return li($t),null;case 25:return null;default:return null}}function vE(i,s){switch(Dm(s),s.tag){case 3:li($t),Dn();break;case 26:case 27:case 5:z(s);break;case 4:Dn();break;case 13:ii(s);break;case 19:He(Gt);break;case 10:li(s.type);break;case 22:case 23:ii(s),jm(),i!==null&&He(Fa);break;case 24:li($t)}}var gL={getCacheForType:function(i){var s=dn($t),c=s.data.get(i);return c===void 0&&(c=i(),s.data.set(i,c)),c}},yL=typeof WeakMap=="function"?WeakMap:Map,wt=0,vt=null,it=null,ct=0,bt=0,Vn=null,hi=!1,no=!1,Op=!1,mi=0,kt=0,Qi=0,Qa=0,kp=0,ir=0,ro=0,Gl=null,Ir=null,Dp=!1,Ip=0,Ed=1/0,Sd=null,Ji=null,Ad=!1,Ja=null,$l=0,Lp=0,Mp=null,ql=0,jp=null;function Bn(){if((wt&2)!==0&&ct!==0)return ct&-ct;if(V.T!==null){var i=Ws;return i!==0?i:Gp()}return Bb()}function bE(){ir===0&&(ir=(ct&536870912)===0||dt?Lb():536870912);var i=er.current;return i!==null&&(i.flags|=32),ir}function xn(i,s,c){(i===vt&&bt===2||i.cancelPendingCommit!==null)&&(io(i,0),pi(i,ct,ir,!1)),ul(i,c),((wt&2)===0||i!==vt)&&(i===vt&&((wt&2)===0&&(Qa|=c),kt===4&&pi(i,ct,ir,!1)),Lr(i))}function _E(i,s,c){if((wt&6)!==0)throw Error(r(327));var h=!c&&(s&60)===0&&(s&i.expiredLanes)===0||cl(i,s),p=h?_L(i,s):zp(i,s,!0),x=h;do{if(p===0){no&&!h&&pi(i,s,0,!1);break}else if(p===6)pi(i,s,0,!hi);else{if(c=i.current.alternate,x&&!vL(c)){p=zp(i,s,!1),x=!1;continue}if(p===2){if(x=s,i.errorRecoveryDisabledLanes&x)var C=0;else C=i.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){s=C;e:{var O=i;p=Gl;var M=O.current.memoizedState.isDehydrated;if(M&&(io(O,C).flags|=256),C=zp(O,C,!1),C!==2){if(Op&&!M){O.errorRecoveryDisabledLanes|=x,Qa|=x,p=4;break e}x=Ir,Ir=p,x!==null&&Pp(x)}p=C}if(x=!1,p!==2)continue}}if(p===1){io(i,0),pi(i,s,0,!0);break}e:{switch(h=i,p){case 0:case 1:throw Error(r(345));case 4:if((s&4194176)===s){pi(h,s,ir,!hi);break e}break;case 2:Ir=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=c,h.finishedLanes=s,(s&62914560)===s&&(x=Ip+300-ke(),10<x)){if(pi(h,s,ir,!hi),Pu(h,0)!==0)break e;h.timeoutHandle=GE(xE.bind(null,h,c,Ir,Sd,Dp,s,ir,Qa,ro,hi,2,-0,0),x);break e}xE(h,c,Ir,Sd,Dp,s,ir,Qa,ro,hi,0,-0,0)}}break}while(!0);Lr(i)}function Pp(i){Ir===null?Ir=i:Ir.push.apply(Ir,i)}function xE(i,s,c,h,p,x,C,O,M,$,se,he,Q){var ae=s.subtreeFlags;if((ae&8192||(ae&16785408)===16785408)&&(Ql={stylesheets:null,count:0,unsuspend:JL},dE(s),s=tM(),s!==null)){i.cancelPendingCommit=s(RE.bind(null,i,c,h,p,C,O,M,1,he,Q)),pi(i,x,C,!$);return}RE(i,c,h,p,C,O,M,se,he,Q)}function vL(i){for(var s=i;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var p=c[h],x=p.getSnapshot;p=p.value;try{if(!Mn(x(),p))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function pi(i,s,c,h){s&=~kp,s&=~Qa,i.suspendedLanes|=s,i.pingedLanes&=~s,h&&(i.warmLanes|=s),h=i.expirationTimes;for(var p=s;0<p;){var x=31-Ln(p),C=1<<x;h[x]=-1,p&=~C}c!==0&&jb(i,c,s)}function wd(){return(wt&6)===0?(Kl(0),!1):!0}function Vp(){if(it!==null){if(bt===0)var i=it.return;else i=it,oi=Wa=null,Gm(i),qs=null,Cl=0,i=it;for(;i!==null;)vE(i.alternate,i),i=i.return;it=null}}function io(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,PL(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),Vp(),vt=i,it=c=Xi(i.current,null),ct=s,bt=0,Vn=null,hi=!1,no=cl(i,s),Op=!1,ro=ir=kp=Qa=Qi=kt=0,Ir=Gl=null,Dp=!1,(s&8)!==0&&(s|=s&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=s;0<h;){var p=31-Ln(h),x=1<<p;s|=i[p],h&=~x}return mi=s,Yu(),c}function EE(i,s){Je=null,V.H=Dr,s===wl?(s=P_(),bt=3):s===L_?(s=P_(),bt=4):bt=s===Mx?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Vn=s,it===null&&(kt=1,pd(i,Xn(s,i.current)))}function SE(){var i=V.H;return V.H=Dr,i===null?Dr:i}function AE(){var i=V.A;return V.A=gL,i}function Bp(){kt=4,hi||(ct&4194176)!==ct&&er.current!==null||(no=!0),(Qi&134217727)===0&&(Qa&134217727)===0||vt===null||pi(vt,ct,ir,!1)}function zp(i,s,c){var h=wt;wt|=2;var p=SE(),x=AE();(vt!==i||ct!==s)&&(Sd=null,io(i,s)),s=!1;var C=kt;e:do try{if(bt!==0&&it!==null){var O=it,M=Vn;switch(bt){case 8:Vp(),C=6;break e;case 3:case 2:case 6:er.current===null&&(s=!0);var $=bt;if(bt=0,Vn=null,ao(i,O,M,$),c&&no){C=0;break e}break;default:$=bt,bt=0,Vn=null,ao(i,O,M,$)}}bL(),C=kt;break}catch(se){EE(i,se)}while(!0);return s&&i.shellSuspendCounter++,oi=Wa=null,wt=h,V.H=p,V.A=x,it===null&&(vt=null,ct=0,Yu()),C}function bL(){for(;it!==null;)wE(it)}function _L(i,s){var c=wt;wt|=2;var h=SE(),p=AE();vt!==i||ct!==s?(Sd=null,Ed=ke()+500,io(i,s)):no=cl(i,s);e:do try{if(bt!==0&&it!==null){s=it;var x=Vn;t:switch(bt){case 1:bt=0,Vn=null,ao(i,s,x,1);break;case 2:if(M_(x)){bt=0,Vn=null,TE(s);break}s=function(){bt===2&&vt===i&&(bt=7),Lr(i)},x.then(s,s);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:M_(x)?(bt=0,Vn=null,TE(s)):(bt=0,Vn=null,ao(i,s,x,7));break;case 5:var C=null;switch(it.tag){case 26:C=it.memoizedState;case 5:case 27:var O=it;if(!C||tS(C)){bt=0,Vn=null;var M=O.sibling;if(M!==null)it=M;else{var $=O.return;$!==null?(it=$,Td($)):it=null}break t}}bt=0,Vn=null,ao(i,s,x,5);break;case 6:bt=0,Vn=null,ao(i,s,x,6);break;case 8:Vp(),kt=6;break e;default:throw Error(r(462))}}xL();break}catch(se){EE(i,se)}while(!0);return oi=Wa=null,V.H=h,V.A=p,wt=c,it!==null?0:(vt=null,ct=0,Yu(),kt)}function xL(){for(;it!==null&&!Ee();)wE(it)}function wE(i){var s=Kx(i.alternate,i,mi);i.memoizedProps=i.pendingProps,s===null?Td(i):it=s}function TE(i){var s=i,c=s.alternate;switch(s.tag){case 15:case 0:s=Ux(c,s,s.pendingProps,s.type,void 0,ct);break;case 11:s=Ux(c,s,s.pendingProps,s.type.render,s.ref,ct);break;case 5:Gm(s);default:vE(c,s),s=it=pE(s,mi),s=Kx(c,s,mi)}i.memoizedProps=i.pendingProps,s===null?Td(i):it=s}function ao(i,s,c,h){oi=Wa=null,Gm(s),qs=null,Cl=0;var p=s.return;try{if(cL(i,p,s,c,ct)){kt=1,pd(i,Xn(c,i.current)),it=null;return}}catch(x){if(p!==null)throw it=p,x;kt=1,pd(i,Xn(c,i.current)),it=null;return}s.flags&32768?(dt||h===1?i=!0:no||(ct&536870912)!==0?i=!1:(hi=i=!0,(h===2||h===3||h===6)&&(h=er.current,h!==null&&h.tag===13&&(h.flags|=16384))),CE(s,i)):Td(s)}function Td(i){var s=i;do{if((s.flags&32768)!==0){CE(s,hi);return}i=s.return;var c=mL(s.alternate,s,mi);if(c!==null){it=c;return}if(s=s.sibling,s!==null){it=s;return}it=s=i}while(s!==null);kt===0&&(kt=5)}function CE(i,s){do{var c=pL(i.alternate,i);if(c!==null){c.flags&=32767,it=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(i=i.sibling,i!==null)){it=i;return}it=i=c}while(i!==null);kt=6,it=null}function RE(i,s,c,h,p,x,C,O,M,$){var se=V.T,he=te.p;try{te.p=2,V.T=null,EL(i,s,c,h,he,p,x,C,O,M,$)}finally{V.T=se,te.p=he}}function EL(i,s,c,h,p,x,C,O){do so();while(Ja!==null);if((wt&6)!==0)throw Error(r(327));var M=i.finishedWork;if(h=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 $=M.lanes|M.childLanes;if($|=Nm,eI(i,h,$,x,C,O),i===vt&&(it=vt=null,ct=0),(M.subtreeFlags&10256)===0&&(M.flags&10256)===0||Ad||(Ad=!0,Lp=$,Mp=c,TL(In,function(){return so(),null})),c=(M.flags&15990)!==0,(M.subtreeFlags&15990)!==0||c?(c=V.T,V.T=null,x=te.p,te.p=2,C=wt,wt|=4,dL(i,M),lE(M,i),qI(Qp,i.containerInfo),Vd=!!Xp,Qp=Xp=null,i.current=M,iE(i,M.alternate,M),_e(),wt=C,te.p=x,V.T=c):i.current=M,Ad?(Ad=!1,Ja=i,$l=h):NE(i,$),$=i.pendingLanes,$===0&&(Ji=null),Lu(M.stateNode),Lr(i),s!==null)for(p=i.onRecoverableError,M=0;M<s.length;M++)$=s[M],p($.value,{componentStack:$.stack});return($l&3)!==0&&so(),$=i.pendingLanes,(h&4194218)!==0&&($&42)!==0?i===jp?ql++:(ql=0,jp=i):ql=0,Kl(0),null}function NE(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,Nl(s)))}function so(){if(Ja!==null){var i=Ja,s=Lp;Lp=0;var c=Vb($l),h=V.T,p=te.p;try{if(te.p=32>c?32:c,V.T=null,Ja===null)var x=!1;else{c=Mp,Mp=null;var C=Ja,O=$l;if(Ja=null,$l=0,(wt&6)!==0)throw Error(r(331));var M=wt;if(wt|=4,hE(C.current),uE(C,C.current,O,c),wt=M,Kl(0,!1),bn&&typeof bn.onPostCommitFiberRoot=="function")try{bn.onPostCommitFiberRoot(Mi,C)}catch{}x=!0}return x}finally{te.p=p,V.T=h,NE(i,s)}}return!1}function OE(i,s,c){s=Xn(c,s),s=ip(i.stateNode,s,2),i=Ki(i,s,2),i!==null&&(ul(i,2),Lr(i))}function yt(i,s,c){if(i.tag===3)OE(i,i,c);else for(;s!==null;){if(s.tag===3){OE(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ji===null||!Ji.has(h))){i=Xn(c,i),c=Ix(2),h=Ki(s,c,2),h!==null&&(Lx(c,h,s,i),ul(h,2),Lr(h));break}}s=s.return}}function Up(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new yL;var p=new Set;h.set(s,p)}else p=h.get(s),p===void 0&&(p=new Set,h.set(s,p));p.has(c)||(Op=!0,p.add(c),i=SL.bind(null,i,s,c),s.then(i,i))}function SL(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,vt===i&&(ct&c)===c&&(kt===4||kt===3&&(ct&62914560)===ct&&300>ke()-Ip?(wt&2)===0&&io(i,0):kp|=c,ro===ct&&(ro=0)),Lr(i)}function kE(i,s){s===0&&(s=Mb()),i=Bi(i,s),i!==null&&(ul(i,s),Lr(i))}function AL(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),kE(i,c)}function wL(i,s){var c=0;switch(i.tag){case 13:var h=i.stateNode,p=i.memoizedState;p!==null&&(c=p.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),kE(i,c)}function TL(i,s){return ie(i,s)}var Cd=null,oo=null,Hp=!1,Rd=!1,Fp=!1,es=0;function Lr(i){i!==oo&&i.next===null&&(oo===null?Cd=oo=i:oo=oo.next=i),Rd=!0,Hp||(Hp=!0,RL(CL))}function Kl(i,s){if(!Fp&&Rd){Fp=!0;do for(var c=!1,h=Cd;h!==null;){if(i!==0){var p=h.pendingLanes;if(p===0)var x=0;else{var C=h.suspendedLanes,O=h.pingedLanes;x=(1<<31-Ln(42|i)+1)-1,x&=p&~(C&~O),x=x&201326677?x&201326677|1:x?x|2:0}x!==0&&(c=!0,LE(h,x))}else x=ct,x=Pu(h,h===vt?x:0),(x&3)===0||cl(h,x)||(c=!0,LE(h,x));h=h.next}while(c);Fp=!1}}function CL(){Rd=Hp=!1;var i=0;es!==0&&(jL()&&(i=es),es=0);for(var s=ke(),c=null,h=Cd;h!==null;){var p=h.next,x=DE(h,s);x===0?(h.next=null,c===null?Cd=p:c.next=p,p===null&&(oo=c)):(c=h,(i!==0||(x&3)!==0)&&(Rd=!0)),h=p}Kl(i)}function DE(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,p=i.expirationTimes,x=i.pendingLanes&-62914561;0<x;){var C=31-Ln(x),O=1<<C,M=p[C];M===-1?((O&c)===0||(O&h)!==0)&&(p[C]=JD(O,s)):M<=s&&(i.expiredLanes|=O),x&=~O}if(s=vt,c=ct,c=Pu(i,i===s?c:0),h=i.callbackNode,c===0||i===s&&bt===2||i.cancelPendingCommit!==null)return h!==null&&h!==null&&Ae(h),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||cl(i,c)){if(s=c&-c,s===i.callbackPriority)return s;switch(h!==null&&Ae(h),Vb(c)){case 2:case 8:c=Mt;break;case 32:c=In;break;case 268435456:c=Os;break;default:c=In}return h=IE.bind(null,i),c=ie(c,h),i.callbackPriority=s,i.callbackNode=c,s}return h!==null&&h!==null&&Ae(h),i.callbackPriority=2,i.callbackNode=null,2}function IE(i,s){var c=i.callbackNode;if(so()&&i.callbackNode!==c)return null;var h=ct;return h=Pu(i,i===vt?h:0),h===0?null:(_E(i,h,s),DE(i,ke()),i.callbackNode!=null&&i.callbackNode===c?IE.bind(null,i):null)}function LE(i,s){if(so())return null;_E(i,s,!0)}function RL(i){VL(function(){(wt&6)!==0?ie(Lt,i):i()})}function Gp(){return es===0&&(es=Lb()),es}function ME(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Hu(""+i)}function jE(i,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,i.id&&c.setAttribute("form",i.id),s.parentNode.insertBefore(c,s),i=new FormData(i),c.parentNode.removeChild(c),i}function NL(i,s,c,h,p){if(s==="submit"&&c&&c.stateNode===p){var x=ME((p[Tn]||null).action),C=h.submitter;C&&(s=(s=C[Tn]||null)?ME(s.formAction):C.getAttribute("formAction"),s!==null&&(x=s,C=null));var O=new qu("action","action",null,h,p);i.push({event:O,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(es!==0){var M=C?jE(p,C):new FormData(p);Jm(c,{pending:!0,data:M,method:p.method,action:x},null,M)}}else typeof x=="function"&&(O.preventDefault(),M=C?jE(p,C):new FormData(p),Jm(c,{pending:!0,data:M,method:p.method,action:x},x,M))},currentTarget:p}]})}}for(var $p=0;$p<R_.length;$p++){var qp=R_[$p],OL=qp.toLowerCase(),kL=qp[0].toUpperCase()+qp.slice(1);gr(OL,"on"+kL)}gr(S_,"onAnimationEnd"),gr(A_,"onAnimationIteration"),gr(w_,"onAnimationStart"),gr("dblclick","onDoubleClick"),gr("focusin","onFocus"),gr("focusout","onBlur"),gr(WI,"onTransitionRun"),gr(YI,"onTransitionStart"),gr(ZI,"onTransitionCancel"),gr(T_,"onTransitionEnd"),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),Ma("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ma("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ma("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ma("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ma("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ma("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wl="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(" "),DL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wl));function PE(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],p=h.event;h=h.listeners;e:{var x=void 0;if(s)for(var C=h.length-1;0<=C;C--){var O=h[C],M=O.instance,$=O.currentTarget;if(O=O.listener,M!==x&&p.isPropagationStopped())break e;x=O,p.currentTarget=$;try{x(p)}catch(se){md(se)}p.currentTarget=null,x=M}else for(C=0;C<h.length;C++){if(O=h[C],M=O.instance,$=O.currentTarget,O=O.listener,M!==x&&p.isPropagationStopped())break e;x=O,p.currentTarget=$;try{x(p)}catch(se){md(se)}p.currentTarget=null,x=M}}}}function ot(i,s){var c=s[lm];c===void 0&&(c=s[lm]=new Set);var h=i+"__bubble";c.has(h)||(VE(s,i,2,!1),c.add(h))}function Kp(i,s,c){var h=0;s&&(h|=4),VE(c,i,h,s)}var Nd="_reactListening"+Math.random().toString(36).slice(2);function Wp(i){if(!i[Nd]){i[Nd]=!0,Ub.forEach(function(c){c!=="selectionchange"&&(DL.has(c)||Kp(c,!1,i),Kp(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Nd]||(s[Nd]=!0,Kp("selectionchange",!1,s))}}function VE(i,s,c,h){switch(oS(s)){case 2:var p=iM;break;case 8:p=aM;break;default:p=og}c=p.bind(null,s,c,i),p=void 0,!gm||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(p=!0),h?p!==void 0?i.addEventListener(s,c,{capture:!0,passive:p}):i.addEventListener(s,c,!0):p!==void 0?i.addEventListener(s,c,{passive:p}):i.addEventListener(s,c,!1)}function Yp(i,s,c,h,p){var x=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var C=h.tag;if(C===3||C===4){var O=h.stateNode.containerInfo;if(O===p||O.nodeType===8&&O.parentNode===p)break;if(C===4)for(C=h.return;C!==null;){var M=C.tag;if((M===3||M===4)&&(M=C.stateNode.containerInfo,M===p||M.nodeType===8&&M.parentNode===p))return;C=C.return}for(;O!==null;){if(C=La(O),C===null)return;if(M=C.tag,M===5||M===6||M===26||M===27){h=x=C;continue e}O=O.parentNode}}h=h.return}Jb(function(){var $=x,se=mm(c),he=[];e:{var Q=C_.get(i);if(Q!==void 0){var ae=qu,Le=i;switch(i){case"keypress":if(Gu(c)===0)break e;case"keydown":case"keyup":ae=wI;break;case"focusin":Le="focus",ae=_m;break;case"focusout":Le="blur",ae=_m;break;case"beforeblur":case"afterblur":ae=_m;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=n_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=hI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=RI;break;case S_:case A_:case w_:ae=gI;break;case T_:ae=OI;break;case"scroll":case"scrollend":ae=dI;break;case"wheel":ae=DI;break;case"copy":case"cut":case"paste":ae=vI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=i_;break;case"toggle":case"beforetoggle":ae=LI}var qe=(s&4)!==0,Dt=!qe&&(i==="scroll"||i==="scrollend"),K=qe?Q!==null?Q+"Capture":null:Q;qe=[];for(var G=$,Z;G!==null;){var ce=G;if(Z=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||Z===null||K===null||(ce=hl(G,K),ce!=null&&qe.push(Yl(G,ce,Z))),Dt)break;G=G.return}0<qe.length&&(Q=new ae(Q,Le,null,c,se),he.push({event:Q,listeners:qe}))}}if((s&7)===0){e:{if(Q=i==="mouseover"||i==="pointerover",ae=i==="mouseout"||i==="pointerout",Q&&c!==hm&&(Le=c.relatedTarget||c.fromElement)&&(La(Le)||Le[ks]))break e;if((ae||Q)&&(Q=se.window===se?se:(Q=se.ownerDocument)?Q.defaultView||Q.parentWindow:window,ae?(Le=c.relatedTarget||c.toElement,ae=$,Le=Le?La(Le):null,Le!==null&&(Dt=ee(Le),qe=Le.tag,Le!==Dt||qe!==5&&qe!==27&&qe!==6)&&(Le=null)):(ae=null,Le=$),ae!==Le)){if(qe=n_,ce="onMouseLeave",K="onMouseEnter",G="mouse",(i==="pointerout"||i==="pointerover")&&(qe=i_,ce="onPointerLeave",K="onPointerEnter",G="pointer"),Dt=ae==null?Q:fl(ae),Z=Le==null?Q:fl(Le),Q=new qe(ce,G+"leave",ae,c,se),Q.target=Dt,Q.relatedTarget=Z,ce=null,La(se)===$&&(qe=new qe(K,G+"enter",Le,c,se),qe.target=Z,qe.relatedTarget=Dt,ce=qe),Dt=ce,ae&&Le)t:{for(qe=ae,K=Le,G=0,Z=qe;Z;Z=lo(Z))G++;for(Z=0,ce=K;ce;ce=lo(ce))Z++;for(;0<G-Z;)qe=lo(qe),G--;for(;0<Z-G;)K=lo(K),Z--;for(;G--;){if(qe===K||K!==null&&qe===K.alternate)break t;qe=lo(qe),K=lo(K)}qe=null}else qe=null;ae!==null&&BE(he,Q,ae,qe,!1),Le!==null&&Dt!==null&&BE(he,Dt,Le,qe,!0)}}e:{if(Q=$?fl($):window,ae=Q.nodeName&&Q.nodeName.toLowerCase(),ae==="select"||ae==="input"&&Q.type==="file")var Re=f_;else if(u_(Q))if(h_)Re=GI;else{Re=HI;var nt=UI}else ae=Q.nodeName,!ae||ae.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?$&&fm($.elementType)&&(Re=f_):Re=FI;if(Re&&(Re=Re(i,$))){d_(he,Re,c,se);break e}nt&&nt(i,Q,$),i==="focusout"&&$&&Q.type==="number"&&$.memoizedProps.value!=null&&dm(Q,"number",Q.value)}switch(nt=$?fl($):window,i){case"focusin":(u_(nt)||nt.contentEditable==="true")&&(zs=nt,Tm=$,xl=null);break;case"focusout":xl=Tm=zs=null;break;case"mousedown":Cm=!0;break;case"contextmenu":case"mouseup":case"dragend":Cm=!1,x_(he,c,se);break;case"selectionchange":if(KI)break;case"keydown":case"keyup":x_(he,c,se)}var Pe;if(Em)e:{switch(i){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Bs?l_(i,c)&&(Ve="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ve="onCompositionStart");Ve&&(a_&&c.locale!=="ko"&&(Bs||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Bs&&(Pe=e_()):(Vi=se,ym="value"in Vi?Vi.value:Vi.textContent,Bs=!0)),nt=Od($,Ve),0<nt.length&&(Ve=new r_(Ve,i,null,c,se),he.push({event:Ve,listeners:nt}),Pe?Ve.data=Pe:(Pe=c_(c),Pe!==null&&(Ve.data=Pe)))),(Pe=jI?PI(i,c):VI(i,c))&&(Ve=Od($,"onBeforeInput"),0<Ve.length&&(nt=new r_("onBeforeInput","beforeinput",null,c,se),he.push({event:nt,listeners:Ve}),nt.data=Pe)),NL(he,i,$,c,se)}PE(he,s)})}function Yl(i,s,c){return{instance:i,listener:s,currentTarget:c}}function Od(i,s){for(var c=s+"Capture",h=[];i!==null;){var p=i,x=p.stateNode;p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=hl(i,c),p!=null&&h.unshift(Yl(i,p,x)),p=hl(i,s),p!=null&&h.push(Yl(i,p,x))),i=i.return}return h}function lo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function BE(i,s,c,h,p){for(var x=s._reactName,C=[];c!==null&&c!==h;){var O=c,M=O.alternate,$=O.stateNode;if(O=O.tag,M!==null&&M===h)break;O!==5&&O!==26&&O!==27||$===null||(M=$,p?($=hl(c,x),$!=null&&C.unshift(Yl(c,$,M))):p||($=hl(c,x),$!=null&&C.push(Yl(c,$,M)))),c=c.return}C.length!==0&&i.push({event:s,listeners:C})}var IL=/\r\n?/g,LL=/\u0000|\uFFFD/g;function zE(i){return(typeof i=="string"?i:""+i).replace(IL,`
|
|
50
|
+
`).replace(LL,"")}function UE(i,s){return s=zE(s),zE(i)===s}function kd(){}function pt(i,s,c,h,p,x){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||js(i,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&js(i,""+h);break;case"className":Bu(i,"class",h);break;case"tabIndex":Bu(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Bu(i,c,h);break;case"style":Xb(i,h,x);break;case"data":if(s!=="object"){Bu(i,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||c!=="href")){i.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=Hu(""+h),i.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="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"?(s!=="input"&&pt(i,s,"name",p.name,p,null),pt(i,s,"formEncType",p.formEncType,p,null),pt(i,s,"formMethod",p.formMethod,p,null),pt(i,s,"formTarget",p.formTarget,p,null)):(pt(i,s,"encType",p.encType,p,null),pt(i,s,"method",p.method,p,null),pt(i,s,"target",p.target,p,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=Hu(""+h),i.setAttribute(c,h);break;case"onClick":h!=null&&(i.onclick=kd);break;case"onScroll":h!=null&&ot("scroll",i);break;case"onScrollEnd":h!=null&&ot("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}c=Hu(""+h),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":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""+h):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":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":h===!0?i.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,h):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(c,h):i.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(c):i.setAttribute(c,h);break;case"popover":ot("beforetoggle",i),ot("toggle",i),Vu(i,"popover",h);break;case"xlinkActuate":ti(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ti(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ti(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ti(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ti(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ti(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ti(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ti(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ti(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Vu(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=cI.get(c)||c,Vu(i,c,h))}}function Zp(i,s,c,h,p,x){switch(c){case"style":Xb(i,h,x);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof h=="string"?js(i,h):(typeof h=="number"||typeof h=="bigint")&&js(i,""+h);break;case"onScroll":h!=null&&ot("scroll",i);break;case"onScrollEnd":h!=null&&ot("scrollend",i);break;case"onClick":h!=null&&(i.onclick=kd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hb.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(p=c.endsWith("Capture"),s=c.slice(2,p?c.length-7:void 0),x=i[Tn]||null,x=x!=null?x[c]:null,typeof x=="function"&&i.removeEventListener(s,x,p),typeof h=="function")){typeof x!="function"&&x!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(s,h,p);break e}c in i?i[c]=h:h===!0?i.setAttribute(c,""):Vu(i,c,h)}}}function on(i,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ot("error",i),ot("load",i);var h=!1,p=!1,x;for(x in c)if(c.hasOwnProperty(x)){var C=c[x];if(C!=null)switch(x){case"src":h=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:pt(i,s,x,C,c,null)}}p&&pt(i,s,"srcSet",c.srcSet,c,null),h&&pt(i,s,"src",c.src,c,null);return;case"input":ot("invalid",i);var O=x=C=p=null,M=null,$=null;for(h in c)if(c.hasOwnProperty(h)){var se=c[h];if(se!=null)switch(h){case"name":p=se;break;case"type":C=se;break;case"checked":M=se;break;case"defaultChecked":$=se;break;case"value":x=se;break;case"defaultValue":O=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:pt(i,s,h,se,c,null)}}Kb(i,x,O,M,$,C,p,!1),zu(i);return;case"select":ot("invalid",i),h=C=x=null;for(p in c)if(c.hasOwnProperty(p)&&(O=c[p],O!=null))switch(p){case"value":x=O;break;case"defaultValue":C=O;break;case"multiple":h=O;default:pt(i,s,p,O,c,null)}s=x,c=C,i.multiple=!!h,s!=null?Ms(i,!!h,s,!1):c!=null&&Ms(i,!!h,c,!0);return;case"textarea":ot("invalid",i),x=p=h=null;for(C in c)if(c.hasOwnProperty(C)&&(O=c[C],O!=null))switch(C){case"value":h=O;break;case"defaultValue":p=O;break;case"children":x=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(91));break;default:pt(i,s,C,O,c,null)}Yb(i,h,p,x),zu(i);return;case"option":for(M in c)if(c.hasOwnProperty(M)&&(h=c[M],h!=null))switch(M){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:pt(i,s,M,h,c,null)}return;case"dialog":ot("cancel",i),ot("close",i);break;case"iframe":case"object":ot("load",i);break;case"video":case"audio":for(h=0;h<Wl.length;h++)ot(Wl[h],i);break;case"image":ot("error",i),ot("load",i);break;case"details":ot("toggle",i);break;case"embed":case"source":case"link":ot("error",i),ot("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($ in c)if(c.hasOwnProperty($)&&(h=c[$],h!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:pt(i,s,$,h,c,null)}return;default:if(fm(s)){for(se in c)c.hasOwnProperty(se)&&(h=c[se],h!==void 0&&Zp(i,s,se,h,c,void 0));return}}for(O in c)c.hasOwnProperty(O)&&(h=c[O],h!=null&&pt(i,s,O,h,c,null))}function ML(i,s,c,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,C=null,O=null,M=null,$=null,se=null;for(ae in c){var he=c[ae];if(c.hasOwnProperty(ae)&&he!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":M=he;default:h.hasOwnProperty(ae)||pt(i,s,ae,null,h,he)}}for(var Q in h){var ae=h[Q];if(he=c[Q],h.hasOwnProperty(Q)&&(ae!=null||he!=null))switch(Q){case"type":x=ae;break;case"name":p=ae;break;case"checked":$=ae;break;case"defaultChecked":se=ae;break;case"value":C=ae;break;case"defaultValue":O=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,s));break;default:ae!==he&&pt(i,s,Q,ae,h,he)}}um(i,C,O,M,$,se,x,p);return;case"select":ae=C=O=Q=null;for(x in c)if(M=c[x],c.hasOwnProperty(x)&&M!=null)switch(x){case"value":break;case"multiple":ae=M;default:h.hasOwnProperty(x)||pt(i,s,x,null,h,M)}for(p in h)if(x=h[p],M=c[p],h.hasOwnProperty(p)&&(x!=null||M!=null))switch(p){case"value":Q=x;break;case"defaultValue":O=x;break;case"multiple":C=x;default:x!==M&&pt(i,s,p,x,h,M)}s=O,c=C,h=ae,Q!=null?Ms(i,!!c,Q,!1):!!h!=!!c&&(s!=null?Ms(i,!!c,s,!0):Ms(i,!!c,c?[]:"",!1));return;case"textarea":ae=Q=null;for(O in c)if(p=c[O],c.hasOwnProperty(O)&&p!=null&&!h.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:pt(i,s,O,null,h,p)}for(C in h)if(p=h[C],x=c[C],h.hasOwnProperty(C)&&(p!=null||x!=null))switch(C){case"value":Q=p;break;case"defaultValue":ae=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==x&&pt(i,s,C,p,h,x)}Wb(i,Q,ae);return;case"option":for(var Le in c)if(Q=c[Le],c.hasOwnProperty(Le)&&Q!=null&&!h.hasOwnProperty(Le))switch(Le){case"selected":i.selected=!1;break;default:pt(i,s,Le,null,h,Q)}for(M in h)if(Q=h[M],ae=c[M],h.hasOwnProperty(M)&&Q!==ae&&(Q!=null||ae!=null))switch(M){case"selected":i.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:pt(i,s,M,Q,h,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 qe in c)Q=c[qe],c.hasOwnProperty(qe)&&Q!=null&&!h.hasOwnProperty(qe)&&pt(i,s,qe,null,h,Q);for($ in h)if(Q=h[$],ae=c[$],h.hasOwnProperty($)&&Q!==ae&&(Q!=null||ae!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,s));break;default:pt(i,s,$,Q,h,ae)}return;default:if(fm(s)){for(var Dt in c)Q=c[Dt],c.hasOwnProperty(Dt)&&Q!==void 0&&!h.hasOwnProperty(Dt)&&Zp(i,s,Dt,void 0,h,Q);for(se in h)Q=h[se],ae=c[se],!h.hasOwnProperty(se)||Q===ae||Q===void 0&&ae===void 0||Zp(i,s,se,Q,h,ae);return}}for(var K in c)Q=c[K],c.hasOwnProperty(K)&&Q!=null&&!h.hasOwnProperty(K)&&pt(i,s,K,null,h,Q);for(he in h)Q=h[he],ae=c[he],!h.hasOwnProperty(he)||Q===ae||Q==null&&ae==null||pt(i,s,he,Q,h,ae)}var Xp=null,Qp=null;function Dd(i){return i.nodeType===9?i:i.ownerDocument}function HE(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 FE(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function Jp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var eg=null;function jL(){var i=window.event;return i&&i.type==="popstate"?i===eg?!1:(eg=i,!0):(eg=null,!1)}var GE=typeof setTimeout=="function"?setTimeout:void 0,PL=typeof clearTimeout=="function"?clearTimeout:void 0,$E=typeof Promise=="function"?Promise:void 0,VL=typeof queueMicrotask=="function"?queueMicrotask:typeof $E<"u"?function(i){return $E.resolve(null).then(i).catch(BL)}:GE;function BL(i){setTimeout(function(){throw i})}function tg(i,s){var c=s,h=0;do{var p=c.nextSibling;if(i.removeChild(c),p&&p.nodeType===8)if(c=p.data,c==="/$"){if(h===0){i.removeChild(p),rc(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=p}while(c);rc(s)}function ng(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":ng(c),cm(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function zL(i,s,c,h){for(;i.nodeType===1;){var p=c;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[dl])switch(s){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(s==="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=br(i.nextSibling),i===null)break}return null}function UL(i,s,c){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=br(i.nextSibling),i===null))return null;return i}function br(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="F!"||s==="F")break;if(s==="/$")return null}}return i}function qE(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}function KE(i,s,c){switch(s=Dd(c),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}var ar=new Map,WE=new Set;function Id(i){return typeof i.getRootNode=="function"?i.getRootNode():i.ownerDocument}var gi=te.d;te.d={f:HL,r:FL,D:GL,C:$L,L:qL,m:KL,X:YL,S:WL,M:ZL};function HL(){var i=gi.f(),s=wd();return i||s}function FL(i){var s=Ds(i);s!==null&&s.tag===5&&s.type==="form"?xx(s):gi.r(i)}var co=typeof document>"u"?null:document;function YE(i,s,c){var h=co;if(h&&typeof s=="string"&&s){var p=Yn(s);p='link[rel="'+i+'"][href="'+p+'"]',typeof c=="string"&&(p+='[crossorigin="'+c+'"]'),WE.has(p)||(WE.add(p),i={rel:i,crossOrigin:c,href:s},h.querySelector(p)===null&&(s=h.createElement("link"),on(s,"link",i),Zt(s),h.head.appendChild(s)))}}function GL(i){gi.D(i),YE("dns-prefetch",i,null)}function $L(i,s){gi.C(i,s),YE("preconnect",i,s)}function qL(i,s,c){gi.L(i,s,c);var h=co;if(h&&i&&s){var p='link[rel="preload"][as="'+Yn(s)+'"]';s==="image"&&c&&c.imageSrcSet?(p+='[imagesrcset="'+Yn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(p+='[imagesizes="'+Yn(c.imageSizes)+'"]')):p+='[href="'+Yn(i)+'"]';var x=p;switch(s){case"style":x=uo(i);break;case"script":x=fo(i)}ar.has(x)||(i=U({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:i,as:s},c),ar.set(x,i),h.querySelector(p)!==null||s==="style"&&h.querySelector(Zl(x))||s==="script"&&h.querySelector(Xl(x))||(s=h.createElement("link"),on(s,"link",i),Zt(s),h.head.appendChild(s)))}}function KL(i,s){gi.m(i,s);var c=co;if(c&&i){var h=s&&typeof s.as=="string"?s.as:"script",p='link[rel="modulepreload"][as="'+Yn(h)+'"][href="'+Yn(i)+'"]',x=p;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=fo(i)}if(!ar.has(x)&&(i=U({rel:"modulepreload",href:i},s),ar.set(x,i),c.querySelector(p)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Xl(x)))return}h=c.createElement("link"),on(h,"link",i),Zt(h),c.head.appendChild(h)}}}function WL(i,s,c){gi.S(i,s,c);var h=co;if(h&&i){var p=Is(h).hoistableStyles,x=uo(i);s=s||"default";var C=p.get(x);if(!C){var O={loading:0,preload:null};if(C=h.querySelector(Zl(x)))O.loading=5;else{i=U({rel:"stylesheet",href:i,"data-precedence":s},c),(c=ar.get(x))&&rg(i,c);var M=C=h.createElement("link");Zt(M),on(M,"link",i),M._p=new Promise(function($,se){M.onload=$,M.onerror=se}),M.addEventListener("load",function(){O.loading|=1}),M.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Ld(C,s,h)}C={type:"stylesheet",instance:C,count:1,state:O},p.set(x,C)}}}function YL(i,s){gi.X(i,s);var c=co;if(c&&i){var h=Is(c).hoistableScripts,p=fo(i),x=h.get(p);x||(x=c.querySelector(Xl(p)),x||(i=U({src:i,async:!0},s),(s=ar.get(p))&&ig(i,s),x=c.createElement("script"),Zt(x),on(x,"link",i),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},h.set(p,x))}}function ZL(i,s){gi.M(i,s);var c=co;if(c&&i){var h=Is(c).hoistableScripts,p=fo(i),x=h.get(p);x||(x=c.querySelector(Xl(p)),x||(i=U({src:i,async:!0,type:"module"},s),(s=ar.get(p))&&ig(i,s),x=c.createElement("script"),Zt(x),on(x,"link",i),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},h.set(p,x))}}function ZE(i,s,c,h){var p=(p=Et.current)?Id(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"?(s=uo(c.href),c=Is(p).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=uo(c.href);var x=Is(p).hoistableStyles,C=x.get(i);if(C||(p=p.ownerDocument||p,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(i,C),(x=p.querySelector(Zl(i)))&&!x._p&&(C.instance=x,C.state.loading=5),ar.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},ar.set(i,c),x||XL(p,i,c,C.state))),s&&h===null)throw Error(r(528,""));return C}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=fo(c),c=Is(p).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function uo(i){return'href="'+Yn(i)+'"'}function Zl(i){return'link[rel="stylesheet"]['+i+"]"}function XE(i){return U({},i,{"data-precedence":i.precedence,precedence:null})}function XL(i,s,c,h){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=i.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),on(s,"link",c),Zt(s),i.head.appendChild(s))}function fo(i){return'[src="'+Yn(i)+'"]'}function Xl(i){return"script[async]"+i}function QE(i,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=i.querySelector('style[data-href~="'+Yn(c.href)+'"]');if(h)return s.instance=h,Zt(h),h;var p=U({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),Zt(h),on(h,"style",p),Ld(h,c.precedence,i),s.instance=h;case"stylesheet":p=uo(c.href);var x=i.querySelector(Zl(p));if(x)return s.state.loading|=4,s.instance=x,Zt(x),x;h=XE(c),(p=ar.get(p))&&rg(h,p),x=(i.ownerDocument||i).createElement("link"),Zt(x);var C=x;return C._p=new Promise(function(O,M){C.onload=O,C.onerror=M}),on(x,"link",h),s.state.loading|=4,Ld(x,c.precedence,i),s.instance=x;case"script":return x=fo(c.src),(p=i.querySelector(Xl(x)))?(s.instance=p,Zt(p),p):(h=c,(p=ar.get(x))&&(h=U({},c),ig(h,p)),i=i.ownerDocument||i,p=i.createElement("script"),Zt(p),on(p,"link",h),i.head.appendChild(p),s.instance=p);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,Ld(h,c.precedence,i));return s.instance}function Ld(i,s,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=h.length?h[h.length-1]:null,x=p,C=0;C<h.length;C++){var O=h[C];if(O.dataset.precedence===s)x=O;else if(x!==p)break}x?x.parentNode.insertBefore(i,x.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(i,s.firstChild))}function rg(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function ig(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var Md=null;function JE(i,s,c){if(Md===null){var h=new Map,p=Md=new Map;p.set(c,h)}else p=Md,h=p.get(c),h||(h=new Map,p.set(c,h));if(h.has(i))return h;for(h.set(i,null),c=c.getElementsByTagName(i),p=0;p<c.length;p++){var x=c[p];if(!(x[dl]||x[un]||i==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var C=x.getAttribute(s)||"";C=i+C;var O=h.get(C);O?O.push(x):h.set(C,[x])}}return h}function eS(i,s,c){i=i.ownerDocument||i,i.head.insertBefore(c,s==="title"?i.querySelector("head > title"):null)}function QL(i,s,c){if(c===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return i=s.disabled,typeof s.precedence=="string"&&i==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function tS(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var Ql=null;function JL(){}function eM(i,s,c){if(Ql===null)throw Error(r(475));var h=Ql;if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=uo(c.href),x=i.querySelector(Zl(p));if(x){i=x._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=jd.bind(h),i.then(h,h)),s.state.loading|=4,s.instance=x,Zt(x);return}x=i.ownerDocument||i,c=XE(c),(p=ar.get(p))&&rg(c,p),x=x.createElement("link"),Zt(x);var C=x;C._p=new Promise(function(O,M){C.onload=O,C.onerror=M}),on(x,"link",c),s.instance=x}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(h.count++,s=jd.bind(h),i.addEventListener("load",s),i.addEventListener("error",s))}}function tM(){if(Ql===null)throw Error(r(475));var i=Ql;return i.stylesheets&&i.count===0&&ag(i,i.stylesheets),0<i.count?function(s){var c=setTimeout(function(){if(i.stylesheets&&ag(i,i.stylesheets),i.unsuspend){var h=i.unsuspend;i.unsuspend=null,h()}},6e4);return i.unsuspend=s,function(){i.unsuspend=null,clearTimeout(c)}}:null}function jd(){if(this.count--,this.count===0){if(this.stylesheets)ag(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Pd=null;function ag(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Pd=new Map,s.forEach(nM,i),Pd=null,jd.call(i))}function nM(i,s){if(!(s.state.loading&4)){var c=Pd.get(i);if(c)var h=c.get(null);else{c=new Map,Pd.set(i,c);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var C=p[x];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(c.set(C.dataset.precedence,C),h=C)}h&&c.set(null,h)}p=s.instance,C=p.getAttribute("data-precedence"),x=c.get(C)||h,x===h&&c.set(null,p),c.set(C,p),this.count++,h=jd.bind(this),p.addEventListener("load",h),p.addEventListener("error",h),x?x.parentNode.insertBefore(p,x.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),s.state.loading|=4}}var Jl={$$typeof:v,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function rM(i,s,c,h,p,x,C,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=om(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=om(0),this.hiddenUpdates=om(null),this.identifierPrefix=h,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function nS(i,s,c,h,p,x,C,O,M,$,se,he){return i=new rM(i,s,c,C,O,M,$,he),s=1,x===!0&&(s|=24),x=rr(3,null,null,s),i.current=x,x.stateNode=i,s=Pm(),s.refCount++,i.pooledCache=s,s.refCount++,x.memoizedState={element:h,isDehydrated:c,cache:s},yp(x),i}function rS(i){return i?(i=Fs,i):Fs}function iS(i,s,c,h,p,x){p=rS(p),h.context===null?h.context=p:h.pendingContext=p,h=qi(s),h.payload={element:c},x=x===void 0?null:x,x!==null&&(h.callback=x),c=Ki(i,h,s),c!==null&&(xn(c,i,s),jl(c,i,s))}function aS(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function sg(i,s){aS(i,s),(i=i.alternate)&&aS(i,s)}function sS(i){if(i.tag===13){var s=Bi(i,67108864);s!==null&&xn(s,i,67108864),sg(i,67108864)}}var Vd=!0;function iM(i,s,c,h){var p=V.T;V.T=null;var x=te.p;try{te.p=2,og(i,s,c,h)}finally{te.p=x,V.T=p}}function aM(i,s,c,h){var p=V.T;V.T=null;var x=te.p;try{te.p=8,og(i,s,c,h)}finally{te.p=x,V.T=p}}function og(i,s,c,h){if(Vd){var p=lg(h);if(p===null)Yp(i,s,h,Bd,c),lS(i,h);else if(oM(p,i,s,c,h))h.stopPropagation();else if(lS(i,h),s&4&&-1<sM.indexOf(i)){for(;p!==null;){var x=Ds(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var C=Ia(x.pendingLanes);if(C!==0){var O=x;for(O.pendingLanes|=2,O.entangledLanes|=2;C;){var M=1<<31-Ln(C);O.entanglements[1]|=M,C&=~M}Lr(x),(wt&6)===0&&(Ed=ke()+500,Kl(0))}}break;case 13:O=Bi(x,2),O!==null&&xn(O,x,2),wd(),sg(x,2)}if(x=lg(h),x===null&&Yp(i,s,h,Bd,c),x===p)break;p=x}p!==null&&h.stopPropagation()}else Yp(i,s,h,null,c)}}function lg(i){return i=mm(i),cg(i)}var Bd=null;function cg(i){if(Bd=null,i=La(i),i!==null){var s=ee(i);if(s===null)i=null;else{var c=s.tag;if(c===13){if(i=ve(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Bd=i,null}function oS(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(Xe()){case Lt:return 2;case Mt:return 8;case In:case am:return 32;case Os:return 268435456;default:return 32}default:return 32}}var ug=!1,ea=null,ta=null,na=null,ec=new Map,tc=new Map,ra=[],sM="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 lS(i,s){switch(i){case"focusin":case"focusout":ea=null;break;case"dragenter":case"dragleave":ta=null;break;case"mouseover":case"mouseout":na=null;break;case"pointerover":case"pointerout":ec.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":tc.delete(s.pointerId)}}function nc(i,s,c,h,p,x){return i===null||i.nativeEvent!==x?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:x,targetContainers:[p]},s!==null&&(s=Ds(s),s!==null&&sS(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,p!==null&&s.indexOf(p)===-1&&s.push(p),i)}function oM(i,s,c,h,p){switch(s){case"focusin":return ea=nc(ea,i,s,c,h,p),!0;case"dragenter":return ta=nc(ta,i,s,c,h,p),!0;case"mouseover":return na=nc(na,i,s,c,h,p),!0;case"pointerover":var x=p.pointerId;return ec.set(x,nc(ec.get(x)||null,i,s,c,h,p)),!0;case"gotpointercapture":return x=p.pointerId,tc.set(x,nc(tc.get(x)||null,i,s,c,h,p)),!0}return!1}function cS(i){var s=La(i.target);if(s!==null){var c=ee(s);if(c!==null){if(s=c.tag,s===13){if(s=ve(c),s!==null){i.blockedOn=s,tI(i.priority,function(){if(c.tag===13){var h=Bn(),p=Bi(c,h);p!==null&&xn(p,c,h),sg(c,h)}});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function zd(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=lg(i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);hm=h,c.target.dispatchEvent(h),hm=null}else return s=Ds(c),s!==null&&sS(s),i.blockedOn=c,!1;s.shift()}return!0}function uS(i,s,c){zd(i)&&c.delete(s)}function lM(){ug=!1,ea!==null&&zd(ea)&&(ea=null),ta!==null&&zd(ta)&&(ta=null),na!==null&&zd(na)&&(na=null),ec.forEach(uS),tc.forEach(uS)}function Ud(i,s){i.blockedOn===s&&(i.blockedOn=null,ug||(ug=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,lM)))}var Hd=null;function dS(i){Hd!==i&&(Hd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Hd===i&&(Hd=null);for(var s=0;s<i.length;s+=3){var c=i[s],h=i[s+1],p=i[s+2];if(typeof h!="function"){if(cg(h||c)===null)continue;break}var x=Ds(c);x!==null&&(i.splice(s,3),s-=3,Jm(x,{pending:!0,data:p,method:c.method,action:h},h,p))}}))}function rc(i){function s(M){return Ud(M,i)}ea!==null&&Ud(ea,i),ta!==null&&Ud(ta,i),na!==null&&Ud(na,i),ec.forEach(s),tc.forEach(s);for(var c=0;c<ra.length;c++){var h=ra[c];h.blockedOn===i&&(h.blockedOn=null)}for(;0<ra.length&&(c=ra[0],c.blockedOn===null);)cS(c),c.blockedOn===null&&ra.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var p=c[h],x=c[h+1],C=p[Tn]||null;if(typeof x=="function")C||dS(c);else if(C){var O=null;if(x&&x.hasAttribute("formAction")){if(p=x,C=x[Tn]||null)O=C.formAction;else if(cg(p)!==null)continue}else O=C.action;typeof O=="function"?c[h+1]=O:(c.splice(h,3),h-=3),dS(c)}}}function dg(i){this._internalRoot=i}Fd.prototype.render=dg.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=Bn();iS(c,h,i,s,null,null)},Fd.prototype.unmount=dg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;i.tag===0&&so(),iS(i.current,2,null,i,null,null),wd(),s[ks]=null}};function Fd(i){this._internalRoot=i}Fd.prototype.unstable_scheduleHydration=function(i){if(i){var s=Bb();i={blockedOn:null,target:i,priority:s};for(var c=0;c<ra.length&&s!==0&&s<ra[c].priority;c++);ra.splice(c,0,i),c===0&&cS(i)}};var fS=t.version;if(fS!=="19.0.0")throw Error(r(527,fS,"19.0.0"));te.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=W(s),i=i!==null?F(i):null,i=i===null?null:i.stateNode,i};var cM={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:V,findFiberByHostInstance:La,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gd.isDisabled&&Gd.supportsFiber)try{Mi=Gd.inject(cM),bn=Gd}catch{}}return ac.createRoot=function(i,s){if(!a(i))throw Error(r(299));var c=!1,h="",p=Nx,x=Ox,C=kx,O=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(O=s.unstable_transitionCallbacks)),s=nS(i,1,!1,null,null,c,h,p,x,C,O,null),i[ks]=s.current,Wp(i.nodeType===8?i.parentNode:i),new dg(s)},ac.hydrateRoot=function(i,s,c){if(!a(i))throw Error(r(299));var h=!1,p="",x=Nx,C=Ox,O=kx,M=null,$=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(p=c.identifierPrefix),c.onUncaughtError!==void 0&&(x=c.onUncaughtError),c.onCaughtError!==void 0&&(C=c.onCaughtError),c.onRecoverableError!==void 0&&(O=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(M=c.unstable_transitionCallbacks),c.formState!==void 0&&($=c.formState)),s=nS(i,1,!0,s,c??null,h,p,x,C,O,M,$),s.context=rS(null),c=s.current,h=Bn(),p=qi(h),p.callback=null,Ki(c,p,h),s.current.lanes=h,ul(s,h),Lr(s),i[ks]=s.current,Wp(i),new Fd(s)},ac.version="19.0.0",ac}var ES;function EM(){if(ES)return mg.exports;ES=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(),mg.exports=xM(),mg.exports}var SM=EM();const AM={locales:["en","en-GB","fr","es","de","ja","ko","zh","it","pt","hi","ar","ru"],defaultLocale:"en"},wM={cookieName:"INTLAYER_LOCALE",prefixDefault:!1},TM={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,openAiApiKey:"",openAiApiModel:"gpt-4o-2024-11-20",openAiApiTemperature:.1},rt={internationalization:AM,middleware:wM,editor:TM};var q=(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))(q||{});const CM=(e,t,n)=>({...n,nodeType:e,[e]:t}),SS=(e,t,n)=>{let r=e,a=null,o=[];if(t.length===0)return n;for(let l=0;l<t.length;l++){const u=t[l];if(a=r,(u.type===q.Object||u.type===q.Array)&&(o=[u.key],(!r[u.key]||typeof r[u.key]!="object")&&(r[u.key]={}),r=r[u.key]),(u.type===q.Translation||u.type===q.Enumeration)&&(o=[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===q.Enumeration||u.type===q.Condition)&&(o=[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===q.Markdown||u.type===q.Insertion)&&(o=[u.type],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]=""),r=r[u.type]),u.type===q.File&&(o=["content"],r=r.content),u.type&&(r=r),l===t.length-1&&a&&o.length>0){let d=a;for(const f of o.slice(0,-1))d=d[f];typeof n>"u"?delete d[o[o.length-1]]:d[o[o.length-1]]=n}}return e},Ur=(e,t)=>{let n=structuredClone(e);for(const r of t)r.type===q.Object||r.type===q.Array?n=n==null?void 0:n[r.key]:r.type===q.Translation||r.type===q.Condition||r.type===q.Enumeration?n=n==null?void 0:n[r.type][r.key]:(r.type===q.Markdown||r.type===q.Insertion||r.type===q.File)&&(n=n==null?void 0:n[r.type]);return n},YT=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===q.Translation||t.nodeType===q.Enumeration||t.nodeType===q.Condition||t.nodeType===q.Insertion||t.nodeType===q.File){const r=Object.keys(n)[0];return n[r]}return t.nodeType===q.Nested?void 0:n}return!e||typeof e!="object"?e:Array.isArray(e)?e[0]:e},RM=(e,t,n)=>{let r=e,a=null,o=null;for(const l of n)a=r,(l.type===q.Object||l.type===q.Array)&&(o=l.key,r=r[l.key]),(l.type===q.Translation||l.type===q.Enumeration||l.type===q.Condition)&&(o=l.type,r=r[l.type][l.key]),(l.type===q.Markdown||l.type===q.ReactNode||l.type===q.Insertion||l.type===q.File)&&(o=l.type,r=r[l.type]);if(a&&o!==null)if(Array.isArray(a))a[o]=r;else{const l={};for(const u of Object.keys(a))u===o&&typeof t<"u"?l[t]=r:l[u]=a[u];Object.keys(a).forEach(u=>delete a[u]),Object.assign(a,l)}return e},NM=e=>typeof e=="object"&&typeof(e==null?void 0:e.key)<"u"&&typeof(e==null?void 0:e.props)<"u",qo=e=>typeof e=="string"?q.Text:typeof(e==null?void 0:e.nodeType)=="string"?e.nodeType:Array.isArray(e)?q.Array:NM(e)?q.ReactNode:typeof e=="number"?q.Number:typeof e=="boolean"?q.Boolean:e&&typeof e=="object"?q.Object:q.Unknown,sc=(e,t,n)=>{const r=structuredClone(n);switch(e){case q.Translation:return{nodeType:q.Translation,[q.Translation]:Object.assign({},...t.map(a=>({[a]:structuredClone(r)??""})))};case q.Enumeration:return{nodeType:q.Enumeration,[q.Enumeration]:{1:r??""}};case q.Condition:return{nodeType:q.Condition,[q.Condition]:{true:r??"",false:r??""}};case q.Insertion:return{nodeType:q.Insertion,[q.Insertion]:{insertion:r??""}};case q.Nested:return{nodeType:q.Nested,[q.Nested]:{dictionaryKey:""}};case q.Markdown:return{nodeType:q.Markdown,[q.Markdown]:r??""};case q.File:return{nodeType:q.File,[q.File]:r??""};case q.Object:return{newKey:r??""};case q.Array:return[r??""];case q.Text:return r??"";case q.Number:return r??0;case q.Boolean:return r??!0;default:return r??""}},dr=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===q.Translation||r.nodeType===q.Enumeration||r.nodeType===q.Condition||r.nodeType===q.Insertion?dr(a):r.nodeType===q.Nested?"dictionary-key":r.nodeType===q.File?"file/path":r.nodeType===q.Markdown?dr(r):a}if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(dr);const t=Object.entries(e).map(([r,a])=>[r,dr(a)]);return Object.fromEntries(t)},gf=(e,t)=>{for(const r of t.plugins??[])if(r.canHandle(e))return r.transform(e,t,(a,o)=>gf(a,o));if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map((r,a)=>{const o={...t,children:r,keyPath:[...t.keyPath,{type:q.Array,key:a}]};return gf(r,o)});const n={};for(const r in e){const a={...t,children:e[r],keyPath:[...t.keyPath,{type:q.Object,key:r}]};n[r]=gf(e[r],a)}return n},OM=(e,t)=>{const n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},kM=(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,o=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||o||l||u||d)return r}},DM=(e,t)=>{const n=kM(e,t)??"fallback";return e[n]},AS={},Uv=(e,t,n=rt.internationalization.defaultLocale)=>{const r=[zM,PM(n),VM,BM,UM,HM,...t.plugins??[]];return gf(e,{...t,plugins:r})},ZT=(e,t,n)=>{const r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return Uv(e.content,r,t)},IM=(e,t,n)=>{const r=AS[e];if(!r)throw new Error(`Dictionary ${e} not found`,AS);return ZT(r,t,n)},LM=(e,t,n)=>{const r=IM(e,n==null?void 0:n.locale,n==null?void 0:n.plugins);if(typeof t=="string"){const a=t.split(".");let o=r;for(const l of a)if(o=o==null?void 0:o[l],o===void 0)return r;return o}return r},MM=(e,t)=>{const{defaultLocale:n}=rt==null?void 0:rt.internationalization;return e[t??n]??e[n]},jM=(e,t)=>e.replace(/\{\{(.*?)\}\}/g,(n,r)=>(t[r]??"").toString()),PM=e=>({id:"translation-plugin",canHandle:t=>typeof t=="object"&&(t==null?void 0:t.nodeType)===q.Translation,transform:(t,n,r)=>{const a=structuredClone(t[q.Translation]);for(const o in a){const l={...n,children:a[o],keyPath:[...n.keyPath,{type:q.Translation,key:o}]};a[o]=r(a[o],l)}return MM(a,e)}}),VM={id:"enumeration-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Enumeration,transform:(e,t,n)=>{const r=structuredClone(e[q.Enumeration]);for(const a in r){const o=r[a],l={...t,children:o,keyPath:[...t.keyPath,{type:q.Enumeration,key:a}]};r[a]=n(o,l)}return a=>DM(r,a)}},BM={id:"condition-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Condition,transform:(e,t,n)=>{const r=structuredClone(e[q.Condition]);for(const a in r){const o=r[a],l={...t,children:o,keyPath:[...t.keyPath,{type:q.Condition,key:a}]};r[a]=n(o,l)}return a=>OM(r,a)}},zM={id:"insertion-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Insertion,transform:(e,t,n)=>{const r=[...t.keyPath,{type:q.Insertion}],a=e[q.Insertion];return n(a,{...t,children:a,keyPath:r,plugins:[{id:"insertion-string-plugin",canHandle:l=>typeof l=="string",transform:(l,u,d)=>{const f=d(l,{...u,children:l,plugins:[...(t.plugins??[]).filter(m=>m.id!=="intlayer-node-plugin")]});return m=>{const g=jM(f,m);return d(g,{...u,plugins:t.plugins,children:g})}}},...t.plugins??[]]})}},UM={id:"nested-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Nested,transform:(e,t)=>LM(e.nested.dictionaryKey,e.nested.path,t)},HM={id:"file-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.File,transform:(e,t,n)=>n(e.content,{...t,children:e.content})},wS={method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"},FM=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),$d=e=>e.reduce((t,n)=>{const r=t??{},a=FM(n??{});return typeof r=="object"&&typeof a=="object"?{...r,...a}:a??r},{}),De=async(e,...t)=>{const{signal:n}=new AbortController;let r="",a;const o=t.map(({body:v,params:_,headers:S,...A})=>A),l=$d([wS,...o]),u=$d([wS.headers,...t.map(v=>v.headers)]),d=$d(t.map(v=>v.params)),f=l.method;if(f!=="GET"&&f!=="HEAD"){const v=$d(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},g=`${e}${r}`,y=await fetch(g,m);if(!y.ok){const v=await y.json();throw new Error(JSON.stringify(v.error)??"An error occurred")}return await y.json()},GM=(e={},t)=>{var m,g;const n=((m=t==null?void 0:t.editor)==null?void 0:m.backendURL)??((g=rt.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{auditContentDeclaration:async(y,v={})=>await De(`${r}/audit/dictionary`,e,v,{method:"POST",body:y}),auditContentDeclarationField:async(y,v={})=>await De(`${r}/audit/dictionary/field`,e,v,{method:"POST",body:y}),auditContentDeclarationMetadata:async(y,v={})=>await De(`${r}/audit/dictionary/metadata`,e,v,{method:"POST",body:y}),auditTag:async(y,v={})=>await De(`${r}/audit/tag`,e,v,{method:"POST",body:y}),askDocQuestion:async(y,v={})=>{var T;if(!y)return;const{onMessage:_,onDone:S,...A}=y,w=new AbortController;try{const R=await fetch(`${r}/ask`,{method:"POST",headers:{"Content-Type":"application/json",...e.headers,...v.headers},body:JSON.stringify(A),signal:w.signal});if(!R.ok){const I=await R.json().catch(()=>({}));throw new Error(I.message||"Failed to fetch response")}const D=(T=R.body)==null?void 0:T.getReader();if(!D)throw new Error("No reader available");const N=new TextDecoder;let k="";for(;;){const{done:I,value:P}=await D.read();if(I)break;k+=N.decode(P,{stream:!0});const V=k.split(`
|
|
51
|
+
`);k=V.pop()??"";for(const U of V)if(U.startsWith("data: "))try{const ue=JSON.parse(U.slice(6));ue.chunk&&(_==null||_(ue.chunk)),ue.done&&ue.response&&(S==null||S(ue.response))}catch(ue){console.error("Failed to parse SSE data:",ue)}}}catch(R){throw console.error("Error in askDocQuestion:",R),R}},autocomplete:async(y,v={})=>await De(`${r}/autocomplete`,e,v,{method:"POST",body:y})}},$M=(e={},t)=>{var k,I;const n=((k=t==null?void 0:t.editor)==null?void 0:k.backendURL)??((I=rt.editor)==null?void 0:I.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 o=`${n}/api/auth`;return{login:async(P,V={})=>await De(`${o}/login`,e,V,{method:"POST",body:P}),getLoginWithGitHubURL:P=>{const V=new URLSearchParams(P);return`${o}/login/github?${V.toString()}`},getLoginWithGoogleURL:P=>{const V=new URLSearchParams(P);return`${o}/login/google?${V.toString()}`},register:async(P,V={},U={})=>await De(`${o}/register`,e,U,{method:"POST",body:P,params:V}),logout:async(P={})=>await De(`${o}/logout`,e,P,{method:"POST"}),resetPassword:async(P,V={})=>await De(`${o}/password/reset`,e,V,{params:P,method:"POST"}),defineNewPassword:async(P,V={})=>await De(`${o}/password/define`,e,V,{method:"POST",body:P}),askResetPassword:async(P,V={})=>await De(`${o}/password/reset`,e,V,{method:"POST",body:{email:P}}),checkIfUserHasPassword:async(P={})=>await De(`${o}/password/has`,e,P,{method:"GET"}),verifyEmail:async({userId:P,secret:V},U={})=>await De(`${o}/active/${P}/${V}`,e,U,{method:"PUT"}),getVerifyEmailStatusURL:P=>`${o}/verify-email-status/${String(P)}`,changePassword:async(P,V={})=>await De(`${o}/password`,e,V,{method:"PUT",body:P}),createSession:async(P,V={})=>await De(`${o}/session`,e,V,{method:"POST",body:P}),getSession:async(P,V={})=>await De(`${n}/session`,e,V,{params:{session_token:P}}),getCSRFToken:async(P={})=>await De(`${n}/csrf-token`,e,P),getOAuth2AccessToken:async(P={})=>await De(`${n}/oauth2/token`,e,P,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:{grant_type:"client_credentials",client_id:r,client_secret:a}})}},qM=(e={},t)=>{var g,y;const n=((g=t==null?void 0:t.editor)==null?void 0:g.backendURL)??((y=rt.editor)==null?void 0:y.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 De(r,e,_,{params:v}),getDictionariesKeys:async(v={})=>await De(`${r}/keys`,e,v),getDictionary:async(v,_,S={})=>await De(`${r}/${v}`,e,S,{params:_?{version:_.toString()}:void 0}),pushDictionaries:async(v,_={})=>await De(`${r}`,e,_,{method:"PATCH",body:{dictionaries:v}}),addDictionary:async(v,_={})=>await De(`${r}`,e,_,{method:"POST",body:v}),updateDictionary:async(v,_,S={})=>await De(`${r}/${v}`,e,S,{method:"PUT",body:_}),deleteDictionary:async(v,_={})=>await De(`${r}`,e,_,{method:"DELETE",body:{id:v}})}},KM=(e={},t)=>{var l,u;const n=((l=t==null?void 0:t.editor)==null?void 0:l.editorURL)??((u=rt.editor)==null?void 0:u.editorURL);if(!n)throw new Error("Editor URL is not defined in the Intlayer configuration.");const r=`${n}/api`;return{getConfiguration:async(d={})=>(await De(`${r}/config`,e,d)).data,writeDictionary:async(d,f={})=>await De(`${r}/dictionary`,e,f,{method:"POST",body:{dictionary:d}})}},WM=(e={},t)=>{var v,_;const n=((v=t==null?void 0:t.editor)==null?void 0:v.backendURL)??((_=rt.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 De(r,e,A,{params:S}),getOrganization:async(S,A={})=>await De(`${r}/${String(S)}`,e,A),addOrganization:async(S,A={})=>await De(r,e,A,{method:"POST",body:S}),addOrganizationMember:async(S,A={})=>De(`${r}/member`,e,A,{method:"POST",body:S}),updateOrganization:async(S,A={})=>De(r,e,A,{method:"PUT",body:S}),updateOrganizationMembers:async(S,A={})=>De(`${r}/members`,e,A,{method:"PUT",body:S}),deleteOrganization:async(S={})=>await De(r,e,S,{method:"DELETE"}),selectOrganization:async(S,A={})=>await De(`${r}/${String(S)}`,e,A,{method:"PUT"}),unselectOrganization:async(S={})=>await De(`${r}/logout`,e,S,{method:"POST"})}},YM=(e={},t)=>{var S,A;const n=((S=t==null?void 0:t.editor)==null?void 0:S.backendURL)??((A=rt.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 De(r,e,T,{params:w}),addProject:async(w,T={})=>await De(`${r}`,e,T,{method:"POST",body:w}),updateProject:async(w,T={})=>await De(`${r}`,e,T,{method:"PUT",body:w}),updateProjectMembers:async(w,T={})=>await De(`${r}/members`,e,T,{method:"PUT",body:w}),pushProjectConfiguration:async(w,T={})=>await De(`${r}/configuration`,e,T,{method:"PUT",body:w}),deleteProject:async(w={})=>await De(`${r}`,e,w,{method:"DELETE"}),selectProject:async(w,T={})=>await De(`${r}/${String(w)}`,e,T,{method:"PUT"}),unselectProject:async(w={})=>await De(`${r}/logout`,e,w,{method:"POST"}),addNewAccessKey:async(w,T={})=>await De(`${r}/access_key`,e,T,{method:"POST",body:w}),deleteAccessKey:async(w,T={})=>await De(`${r}/access_key`,e,T,{method:"DELETE",body:{clientId:w}}),refreshAccessKey:async(w,T={})=>await De(`${r}/access_key`,e,T,{method:"PATCH",body:{clientId:w}})}},ZM=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.backendURL)??((d=rt.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(f,m={})=>await De(`${r}/pricing`,e,m,{method:"POST",body:f}),getSubscription:async(f,m={})=>await De(`${r}/create-subscription`,e,m,{method:"POST",body:f}),cancelSubscription:async(f={})=>await De(`${r}/cancel-subscription`,e,f,{method:"POST"})}},XM=(e={},t)=>{var d,f;const n=((d=t==null?void 0:t.editor)==null?void 0:d.backendURL)??((f=rt.editor)==null?void 0:f.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/tag`;return{getTags:async(m,g={})=>await De(r,e,g,{params:m}),addTag:async(m,g={})=>await De(`${r}`,e,g,{method:"POST",body:m}),updateTag:async(m,g,y={})=>await De(`${r}/${m}`,e,y,{method:"PUT",body:g}),deleteTag:async(m,g={})=>await De(`${r}/${m}`,e,g,{method:"DELETE"})}},QM=(e={},t)=>{var g,y;const n=((g=t==null?void 0:t.editor)==null?void 0:g.backendURL)??((y=rt.editor)==null?void 0:y.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 De(`${r}/`,e,_,{method:"POST",body:v}),getUsers:async(v,_={})=>await De(r,e,_,{params:v}),getUserById:async(v,_={})=>await De(`${r}/${v}`,e,_),getUserByAccount:async(v,_,S={})=>await De(`${r}/account/${_}/${v}`,e,S),getUserByEmail:async(v,_={})=>await De(`${r}/email/${v}`,e,_),updateUser:async(v,_={})=>await De(`${r}`,e,_,{method:"PUT",body:v}),deleteUser:async(v,_={})=>await De(`${r}/${v}`,e,_,{method:"DELETE"})}},Eh=(e={},t)=>({organization:WM(e,t),project:YM(e,t),user:QM(e,t),auth:$M(e,t),dictionary:qM(e,t),stripe:ZM(e,t),ai:GM(e,t),tag:XM(e,t),editor:KM(e,t)});var B=(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))(B||{});const JM=e=>{switch(e){case B.ENGLISH:case B.FRENCH:case B.SPANISH:case B.PORTUGUESE:case B.GERMAN:case B.AFRIKAANS:case B.AZERI_LATIN:case B.BELARUSIAN:case B.BULGARIAN:case B.BOSNIAN:case B.CATALAN:case B.CZECH:case B.WELSH:case B.DANISH:case B.ESPERANTO:case B.ESTONIAN:case B.BASQUE:case B.FINNISH:case B.FAROESE:case B.GALICIAN:case B.GREEK:case B.CROATIAN:case B.HUNGARIAN:case B.ARMENIAN:case B.INDONESIAN:case B.ICELANDIC:case B.ITALIAN:case B.JAPANESE:case B.GEORGIAN:case B.KAZAKH:case B.KANNADA:case B.KOREAN:case B.KONKANI:case B.KYRGYZ:case B.LITHUANIAN:case B.LATVIAN:case B.MAORI:case B.FYRO_MACEDONIAN:case B.MONGOLIAN:case B.MARATHI:case B.MALAY:case B.MALTESE:case B.NORWEGIAN_BOKMAL:case B.DUTCH:case B.NORTHERN_SOTHO:case B.PUNJABI:case B.POLISH:case B.QUECHUA:case B.ROMANIAN:case B.RUSSIAN:case B.SANSKRIT:case B.SAMI_NORTHERN:case B.SLOVAK:case B.SLOVENIAN:case B.ALBANIAN:case B.SERBIAN_LATIN:case B.SWEDISH:case B.SWAHILI:case B.TAMIL:case B.TELUGU:case B.THAI:case B.TAGALOG:case B.TSWANA:case B.TURKISH:case B.UKRAINIAN:case B.UZBEK_LATIN:case B.VIETNAMESE:case B.XHOSA:case B.CHINESE_SIMPLIFIED:case B.CHINESE_TRADITIONAL:case B.ZULU:case B.AFRIKAANS_SOUTH_AFRICA:case B.AZERI_LATIN_AZERBAIJAN:case B.BELARUSIAN_BELARUS:case B.BULGARIAN_BULGARIA:case B.BOSNIAN_BOSNIA_AND_HERZEGOVINA:case B.CATALAN_SPAIN:case B.CZECH_CZECH_REPUBLIC:case B.WELSH_UNITED_KINGDOM:case B.DANISH_DENMARK:case B.GERMAN_AUSTRIA:case B.GERMAN_SWITZERLAND:case B.GERMAN_GERMANY:case B.GERMAN_LIECHTENSTEIN:case B.GERMAN_LUXEMBOURG:case B.GREEK_GREECE:case B.ENGLISH_AUSTRALIA:case B.ENGLISH_BELIZE:case B.ENGLISH_CANADA:case B.ENGLISH_CARIBBEAN:case B.ENGLISH_UNITED_KINGDOM:case B.ENGLISH_IRELAND:case B.ENGLISH_JAMAICA:case B.ENGLISH_NEW_ZEALAND:case B.ENGLISH_PHILIPPINES:case B.ENGLISH_TRINIDAD_AND_TOBAGO:case B.ENGLISH_UNITED_STATES:case B.ENGLISH_SOUTH_AFRICA:case B.ENGLISH_ZIMBABWE:case B.SPANISH_ARGENTINA:case B.SPANISH_BOLIVIA:case B.SPANISH_CHILE:case B.SPANISH_COLOMBIA:case B.SPANISH_COSTA_RICA:case B.SPANISH_DOMINICAN_REPUBLIC:case B.SPANISH_ECUADOR:case B.SPANISH_SPAIN:case B.SPANISH_GUATEMALA:case B.SPANISH_HONDURAS:case B.SPANISH_MEXICO:case B.SPANISH_NICARAGUA:case B.SPANISH_PANAMA:case B.SPANISH_PERU:case B.SPANISH_PUERTO_RICO:case B.SPANISH_PARAGUAY:case B.SPANISH_EL_SALVADOR:case B.SPANISH_URUGUAY:case B.SPANISH_VENEZUELA:case B.ESTONIAN_ESTONIA:case B.BASQUE_SPAIN:case B.FINNISH_FINLAND:case B.FAROESE_FAROE_ISLANDS:case B.FRENCH_BELGIUM:case B.FRENCH_CANADA:case B.FRENCH_SWITZERLAND:case B.FRENCH_FRANCE:case B.FRENCH_LUXEMBOURG:case B.FRENCH_PRINCIPALITY_OF_MONACO:case B.GALICIAN_SPAIN:case B.GUJARATI_INDIA:case B.HEBREW_ISRAEL:case B.HINDI_INDIA:case B.CROATIAN_BOSNIA_AND_HERZEGOVINA:case B.CROATIAN_CROATIA:case B.HUNGARIAN_HUNGARY:case B.ARMENIAN_ARMENIA:case B.INDONESIAN_INDONESIA:case B.ICELANDIC_ICELAND:case B.ITALIAN_SWITZERLAND:case B.ITALIAN_ITALY:case B.JAPANESE_JAPAN:case B.GEORGIAN_GEORGIA:case B.KAZAKH_KAZAKHSTAN:case B.KANNADA_INDIA:case B.KOREAN_KOREA:case B.KONKANI_INDIA:case B.KYRGYZ_KYRGYZSTAN:case B.LITHUANIAN_LITHUANIA:case B.LATVIAN_LATVIA:case B.MAORI_NEW_ZEALAND:case B.FYRO_MACEDONIAN_MACEDONIA:case B.MONGOLIAN_MONGOLIA:case B.MARATHI_INDIA:case B.MALAY_BRUNEI_DARUSSALAM:case B.MALAY_MALAYSIA:case B.MALTESE_MALTA:case B.NORWEGIAN_BOKMAL_NORWAY:case B.DUTCH_BELGIUM:case B.DUTCH_NETHERLANDS:case B.NORWEGIAN_NYNORSK_NORWAY:case B.NORTHERN_SOTHO_SOUTH_AFRICA:case B.PUNJABI_INDIA:case B.POLISH_POLAND:case B.PORTUGUESE_BRAZIL:case B.PORTUGUESE_PORTUGAL:case B.QUECHUA_BOLIVIA:case B.QUECHUA_ECUADOR:case B.QUECHUA_PERU:case B.ROMANIAN_ROMANIA:case B.RUSSIAN_RUSSIA:case B.SANSKRIT_INDIA:case B.SAMI_NORTHERN_FINLAND:case B.SAMI_NORTHERN_NORWAY:case B.SAMI_NORTHERN_SWEDEN:case B.SLOVAK_SLOVAKIA:case B.SLOVENIAN_SLOVENIA:case B.ALBANIAN_ALBANIA:case B.SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA:case B.SERBIAN_LATIN_SERBIA_AND_MONTENEGRO:case B.SWAHILI_KENYA:case B.TAMIL_INDIA:case B.TELUGU_INDIA:case B.THAI_THAILAND:case B.TAGALOG_PHILIPPINES:case B.TSWANA_SOUTH_AFRICA:case B.TURKISH_TURKEY:case B.TATAR_RUSSIA:case B.TSOGA:case B.UKRAINIAN_UKRAINE:case B.UZBEK_LATIN_UZBEKISTAN:case B.VIETNAMESE_VIET_NAM:case B.XHOSA_SOUTH_AFRICA:case B.CHINESE_HONG_KONG:case B.CHINESE_MACAU:case B.CHINESE_SINGAPORE:case B.ZULU_SOUTH_AFRICA:return"ltr";case B.ARABIC:case B.FARSI:case B.URDU:case B.PASHTO:case B.SYRIAC:case B.ARABIC_UNITED_ARAB_EMIRATES:case B.ARABIC_BAHRAIN:case B.ARABIC_ALGERIA:case B.ARABIC_EGYPT:case B.ARABIC_IRAQ:case B.ARABIC_JORDAN:case B.ARABIC_KUWAIT:case B.ARABIC_LEBANON:case B.ARABIC_LIBYA:case B.ARABIC_MOROCCO:case B.ARABIC_OMAN:case B.ARABIC_QATAR:case B.ARABIC_SAUDI_ARABIA:case B.ARABIC_SYRIA:case B.ARABIC_TUNISIA:case B.ARABIC_YEMEN:case B.FARSI_IRAN:case B.URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN:case B.PASHTO_AFGHANISTAN:case B.SYRIAC_SYRIA:return"rtl";default:return"auto"}},XT=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),TS=new Map,yf=(e,t=e)=>{if(typeof(Intl==null?void 0:Intl.DisplayNames)!="function")return e;let n=TS.get(t);return n||(n=new Intl.DisplayNames([t],{type:"language"}),TS.set(t,n)),n.of(e)??"Unknown locale"},ej=(e,t=rt.internationalization.locales)=>{const n=XT(e);let r=e;e.endsWith("/")&&(r=e.slice(0,-1));const a=n?new URL(r):new URL(r,"http://example.com"),o=a.pathname;o.startsWith("/")||(a.pathname=`/${o}`);const l=o.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","")},tj=(e,t=rt.internationalization.locales,n=rt.internationalization.defaultLocale,r=rt.middleware.prefixDefault)=>{const a=ej(e,t),o=XT(a),l=o?new URL(a):new URL(a,"http://example.com");let u=l.pathname;u.startsWith("/")||(u=`/${u}`);const d=o?`${l.protocol}//${l.host}`:"";return t.reduce((m,g)=>{const y=g.toString()===n.toString();let _=r||!y?`/${g}${u}`:u;_.length>1&&_.endsWith("/")&&(_=_.slice(0,-1));const S=o?`${d}${_}${l.search}${l.hash}`:`${_}${l.search}${l.hash}`;return m[g]=S,m},{})},nj=(e,t,n=rt.internationalization.locales,r=rt.internationalization.defaultLocale,a=rt.middleware.prefixDefault)=>tj(e,n,r,a)[t],rj=(e,t=rt.internationalization.locales,n=rt.internationalization.defaultLocale)=>{const r=[e].flat(),a=o=>o.trim().toLowerCase();try{for(const o of r){const l=a(o),u=t.find(m=>a(m)===l);if(u)return u;const[d]=l.split("-"),f=t.find(m=>a(m).split("-")[0]===d);if(f)return f}}catch{}return n},ge=e=>CM(q.Translation,e),ij=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(o=>{const l=o.trim();return l.startsWith('"')&&l.endsWith('"')||!isNaN(Number(l))?l:`"${l}"`}).join(", ")}]`),JSON.parse(t)},QT=e=>{try{const t=e.split(/\r?\n/),n=t.find(o=>o.trim()!=="");if(!n||n.trim()!=="---")return{};const r={};let a=!1;for(const o of t){if(o.trim()==="---"){if(a)break;a=!0;continue}if(a){const u=o.match(/^([^:]+)\s*:\s*(.*)$/);if(u){const d=u[1].trim(),f=u[2].trim();try{r[d]=ij(f)}catch{r[d]=f}}}}return r}catch{return}},fu=(e,t)=>e.every((n,r)=>t[r]&&t[r].key===n.key&&t[r].type===n.type),aj=(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(/\/$/,""),o=r.pathname.replace(/\/$/,"");return!(a!==""&&o!==""&&a!==o)}catch(n){return console.error("Invalid URL(s)",n),!1}},sj=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 hr=(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))(hr||{});const oj=E.createContext(void 0),lj=E.createContext(void 0),cj=({children:e})=>{const[t,n]=E.useState({}),r=(a,o)=>{n(l=>({...l,[a]:{...l==null?void 0:l[a],content:o}}))};return b.jsx(oj.Provider,{value:{changedContent:t},children:b.jsx(lj.Provider,{value:{setChangedContent:r},children:e})})},ln=[];for(let e=0;e<256;++e)ln.push((e+256).toString(16).slice(1));function uj(e,t=0){return(ln[e[t+0]]+ln[e[t+1]]+ln[e[t+2]]+ln[e[t+3]]+"-"+ln[e[t+4]]+ln[e[t+5]]+"-"+ln[e[t+6]]+ln[e[t+7]]+"-"+ln[e[t+8]]+ln[e[t+9]]+"-"+ln[e[t+10]]+ln[e[t+11]]+ln[e[t+12]]+ln[e[t+13]]+ln[e[t+14]]+ln[e[t+15]]).toLowerCase()}let vg;const dj=new Uint8Array(16);function fj(){if(!vg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");vg=crypto.getRandomValues.bind(crypto)}return vg(dj)}const hj=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),CS={randomUUID:hj};function mj(e,t,n){var a;if(CS.randomUUID&&!e)return CS.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??fj();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,uj(r)}const{editor:yi}=rt,JT=E.createContext({postMessage:()=>null,allowedOrigins:[yi==null?void 0:yi.applicationURL,yi==null?void 0:yi.editorURL,yi==null?void 0:yi.cmsURL],senderId:""}),RS=({children:e,allowedOrigins:t,postMessage:n})=>{const r=E.useRef(mj()),a=E.useMemo(()=>({postMessage:n,allowedOrigins:t,senderId:r.current}),[n,t,r.current]);return b.jsx(JT.Provider,{value:a,children:e})},e1=()=>E.useContext(JT),Mo=(e,t,n)=>{const{allowedOrigins:r,postMessage:a,senderId:o}=e1();return E.useEffect(()=>{if(t){const u=d=>{const{type:f,data:m,senderId:g}=d.data;f===e&&g!==o&&(typeof r>"u"||r!=null&&r.some(y=>aj(y,d.origin))||r!=null&&r.includes("*"))&&t(m)};return window.addEventListener("message",u),()=>window.removeEventListener("message",u)}},[r,a,o,n]),u=>{a({type:e,data:u,senderId:o})}},pj=(e,t)=>typeof e=="function"?e(t):e,As=(e,t,n)=>{const{postMessage:r,senderId:a}=e1(),{emit:o,receive:l}=n??{emit:!0,receive:!0},u=(v,_)=>{const S=pj(v,_);return o&&typeof r=="function"&&typeof S<"u"&&r({type:`${e}/post`,data:S,senderId:a}),S},d=()=>{typeof r=="function"&&r({type:`${e}/post`,data:f,senderId:a})},[f,m]=E.useState(()=>u(t)),g=v=>m(_=>u(v,_));Mo(`${e}/post`,l?v=>{m(v)}:void 0);const y=(v,_)=>{o&&typeof r=="function"&&_!==a&&(typeof f>"u"||r({type:`${e}/post`,data:f,senderId:a}))};return Mo(`${e}/get`,o?y:void 0,f),E.useEffect(()=>{l&&typeof r=="function"&&typeof f>"u"&&r({type:`${e}/get`,senderId:a})},[]),[f,g,d]},t1=E.createContext(void 0),gj=({children:e,configuration:t})=>b.jsx(t1.Provider,{value:t,children:e}),Zr=()=>E.useContext(t1),n1=E.createContext(void 0),r1=E.createContext(void 0),yj=({children:e})=>{const[t,n]=As(hr.INTLAYER_LOCALE_DICTIONARIES_CHANGED,void 0),r=E.useMemo(()=>({localeDictionaries:t??{}}),[t]),a=E.useMemo(()=>({setLocaleDictionaries:n,setLocaleDictionary:o=>{n(l=>({...l,[o.key]:o}))}}),[n]);return b.jsx(n1.Provider,{value:r,children:b.jsx(r1.Provider,{value:a,children:e})})},Hv=()=>E.useContext(r1),i1=()=>{const e=Hv(),t=E.useContext(n1);if(!t)throw new Error("useDictionariesRecordStates must be used within a DictionariesRecordProvider");return{...t,...e}},a1=E.createContext(void 0),vj=e=>Mo(`${hr.INTLAYER_EDITED_CONTENT_CHANGED}/get`,e),s1=E.createContext(void 0),NS=(e,t)=>typeof e=="function"?e(t):e,bj=({children:e})=>{const{localeDictionaries:t}=i1(),[n,r]=As(hr.INTLAYER_EDITED_CONTENT_CHANGED),a=v=>{let _=NS(v);return r(S=>(_=NS(v,S==null?void 0:S[_.key]),{...S,[_.key]:_})),_},o=(v,_)=>{r(S=>({...S,[v]:{...S==null?void 0:S[v],content:_}}))},l=(v,_,S=[],A=!0)=>{r(w=>{var k,I;const T=(k=t[v])==null?void 0:k.content,R=structuredClone(((I=w==null?void 0:w[v])==null?void 0:I.content)??T);let D=S;if(!A){let P=0;const V=S.slice(0,-1),U=S[S.length-1];let ue=U.key;for(;typeof Ur(R,D)<"u";)P++,ue=P===0?U.key:`${U.key} (${P})`,D=[...V,{...U,key:ue}]}const N=SS(R,D,_);return{...w,[v]:{...w==null?void 0:w[v],content:N}}})},u=(v,_,S=[])=>{r(A=>{var D,N;const w=(D=t[v])==null?void 0:D.content,T=structuredClone(((N=A==null?void 0:A[v])==null?void 0:N.content)??w),R=RM(T,_,S);return{...A,[v]:{...A==null?void 0:A[v],content:R}}})},d=(v,_)=>{r(S=>{var D,N;const A=(D=t[v])==null?void 0:D.content,w=structuredClone(((N=S==null?void 0:S[v])==null?void 0:N.content)??A),T=Ur(A,_),R=SS(w,_,T);return{...S,[v]:{...S==null?void 0:S[v],content:R}}})},f=v=>{r(_=>{const S={..._};return delete S[v],S})},m=v=>{r(_=>Object.entries(_).reduce((A,[w,T])=>w===v?A:{...A,[w]:T},{}))},g=()=>{r({})},y=(v,_)=>{var A;const S=((A=n==null?void 0:n[v])==null?void 0:A.content)??{};return Ur(S,_)};return b.jsx(a1.Provider,{value:{editedContent:n},children:b.jsx(s1.Provider,{value:{setEditedContentState:r,setEditedDictionary:a,setEditedContent:o,addEditedContent:l,renameEditedContent:u,removeEditedContent:d,restoreEditedContent:f,clearEditedDictionaryContent:m,clearEditedContent:g,getEditedContentValue:y},children:e})})},Ko=()=>E.useContext(s1),wn=()=>{const e=E.useContext(a1),t=Ko();return{...e,...t}},o1=E.createContext({enabled:!1}),_j=e=>As(hr.INTLAYER_EDITOR_ENABLED,!1,e),xj=e=>Mo(`${hr.INTLAYER_EDITOR_ENABLED}/post`,e),l1=e=>Mo(`${hr.INTLAYER_EDITOR_ENABLED}/get`,e),Ej=({children:e})=>{const[t]=_j({emit:!1,receive:!0});return b.jsx(o1.Provider,{value:{enabled:t},children:e})},c1=()=>E.useContext(o1),u1=E.createContext(void 0),d1=E.createContext(void 0),Sj=({children:e})=>{const[t,n]=As(hr.INTLAYER_FOCUSED_CONTENT_CHANGED,null),r=a=>{n(o=>o&&{...o,keyPath:a})};return b.jsx(u1.Provider,{value:{focusedContent:t},children:b.jsx(d1.Provider,{value:{setFocusedContent:n,setFocusedContentKeyPath:r},children:e})})},Fv=()=>{const e=E.useContext(d1);if(e===void 0)throw new Error("useFocusDictionaryActions must be used within a FocusDictionaryProvider");return e},Ea=()=>{const e=Fv(),t=E.useContext(u1);if(t===void 0)throw new Error("useFocusDictionaryState must be used within a FocusDictionaryProvider");return{...t,...e}},OS=({children:e})=>{const t=vj();return E.useEffect(()=>{t()},[]),b.jsx(yj,{children:b.jsx(bj,{children:b.jsx(Sj,{children:e})})})},Aj=({children:e,fallback:t})=>{const n=l1(),{enabled:r}=c1();return E.useEffect(()=>{r||n()},[r]),r?e:t},wj=({children:e,fallback:t})=>{const[n,r]=E.useState(!1);return E.useEffect(()=>{r(window.self!==window.top)},[]),n?e:t},Tj=({children:e,configuration:t,...n})=>b.jsx(cj,{children:b.jsx(Ej,{children:b.jsx(gj,{configuration:t,children:n.mode==="editor"?b.jsx(RS,{...n,children:b.jsx(OS,{children:e})}):b.jsx(wj,{fallback:e,children:b.jsx(RS,{...n,children:b.jsx(Aj,{fallback:e,children:b.jsx(OS,{children:e})})})})})})}),Cj=(e,t)=>As(hr.INTLAYER_URL_CHANGE,e,t),Rj=()=>Mo(`${hr.INTLAYER_IFRAME_CLICKED}/get`,sj);/*! js-cookie v3.0.5 | MIT */function qd(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 Nj={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 Ty(e,t){function n(a,o,l){if(!(typeof document>"u")){l=qd({},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(o,a)+u}}function r(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var o=document.cookie?document.cookie.split("; "):[],l={},u=0;u<o.length;u++){var d=o[u].split("="),f=d.slice(1).join("=");try{var m=decodeURIComponent(d[0]);if(l[m]=e.read(f,m),a===m)break}catch{}}return a?l[a]:l}}return Object.create({set:n,get:r,remove:function(a,o){n(a,"",qd({},o,{expires:-1}))},withAttributes:function(a){return Ty(this.converter,qd({},this.attributes,a))},withConverter:function(a){return Ty(qd({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var f1=Ty(Nj,{path:"/"});const{cookieName:h1}=rt.middleware,Oj={path:"/",expires:void 0,domain:void 0,secure:!1,sameSite:"strict"},Gv=f1.get(h1),m1=e=>{f1.set(h1,e,Oj)},kj=()=>({localeCookie:Gv,setLocaleCookie:m1});var KT;const Sh=E.createContext({locale:Gv??((KT=rt==null?void 0:rt.internationalization)==null?void 0:KT.defaultLocale),setLocale:()=>null,disableEditor:!1}),Dj=()=>E.useContext(Sh),Ij=({locale:e,defaultLocale:t,children:n,setLocale:r,disableEditor:a})=>{const{internationalization:o}=rt??{},{defaultLocale:l,locales:u}=o??{},d=e??Gv??t??l,[f,m]=As(hr.INTLAYER_CURRENT_LOCALE,d),y=r??(_=>{if(f.toString()!==_.toString()){if(!(u!=null&&u.map(String).includes(_))){console.error(`Locale ${_} is not available`);return}m(_),m1(_)}}),v=rj(e??f);return b.jsx(Sh.Provider,{value:{locale:v,setLocale:y,disableEditor:a},children:n})},If=({children:e,value:t,additionalProps:n})=>{const r=E.isValidElement(e)?e:b.jsx(b.Fragment,{children:e});return new Proxy(r,{get(a,o,l){return o==="value"?t:n&&Object.keys(n).includes(o)?n[o]:Reflect.get(a,o,l)}})},Lj=250,Mj=({children:e,onPress:t,onClickOutside:n,pressDuration:r=Lj,isSelecting:a,...o})=>{const l=E.useRef(null),[u,d]=E.useState(!1),[f,m]=E.useState(a),g=E.useRef(null),y=typeof e=="string",v=()=>{m(!0),t()},_=()=>{g.current=setTimeout(()=>{v()},r)},S=()=>{g.current&&(clearTimeout(g.current),g.current=null)},A=()=>{S(),_()},w=()=>{d(!0)},T=()=>{d(!1),S()},R=E.useCallback(k=>{l.current&&!l.current.contains(k.target)&&(m(!1),n==null||n())},[n]);E.useEffect(()=>(document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}),[R]);const D=k=>{f&&(k.preventDefault(),k.stopPropagation())},N=()=>{m(!1)};return b.jsx("span",{style:{display:y?"inline":"inline-block",cursor:"pointer",userSelect:"none",borderRadius:"0.375rem",outlineWidth:"2px",outlineOffset:"4px",outlineStyle:"solid",outlineColor:a||f||u?"inherit":"transparent",transition:"all 100ms 50ms ease-in-out"},role:"button",tabIndex:0,onKeyUp:()=>null,onClick:D,onMouseDown:A,onMouseUp:T,onMouseLeave:T,onTouchStart:A,onTouchEnd:T,onTouchCancel:T,onBlur:N,onMouseEnter:w,ref:l,...o,children:e})},jj=({children:e,dictionaryKey:t,keyPath:n})=>{const{focusedContent:r,setFocusedContent:a}=Ea(),o=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&&fu((r==null?void 0:r.keyPath)??[],n))??!1},[r,n,t]);return b.jsx(Mj,{onPress:o,isSelecting:l,children:e})},Lf=({children:e,...t})=>{const{enabled:n}=c1(),{disableEditor:r}=Dj();return n&&!r?b.jsx(jj,{...t,children:e}):e},$v=({dictionaryKey:e,keyPath:t,children:n})=>{const r=Ko();return r?r.getEditedContentValue(e,t)??n:n},Pj=e=>{const t=$v(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},Vj=E.createContext({renderMarkdown:e=>e}),Bj=()=>E.useContext(Vj),zj=({dictionaryKey:e,keyPath:t,children:n,locale:r})=>{const{renderMarkdown:a}=Bj(),o=$v({dictionaryKey:e,keyPath:t,children:n});if(typeof o!="string"){const l=Uv(o,{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(o)},Uj=({dictionaryKey:e,keyPath:t,children:n,metadataKeyPath:r})=>{const a=$v({dictionaryKey:e,keyPath:t,children:n}),o=QT(a);return Ur(o,r)},p1=e=>{if(typeof e=="string")return e;const n=(o=>{var l;if(o!=null&&o.props&&typeof o.props.children=="object"){const u=[],{children:d}=o.props;return Object.keys(d??{}).forEach(f=>{u.push(p1((d??{})[f]))}),{...o,props:{...o.props,children:u}}}return{...o,props:{...o.props,children:((l=o.props)==null?void 0:l.children)??[]}}})(e),{type:r,props:a}=n;return E.createElement(r??"span",a,...a.children)},Hj={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{plugins:t,...n})=>If({...n,value:n.children,children:E.createElement(Lf,{...n,key:n.children},b.jsx(Pj,{...n,children:n.children}))})},Fj={id:"react-node-plugin",canHandle:e=>typeof e=="object"&&typeof e.props<"u"&&typeof e.key<"u",transform:(e,{plugins:t,...n})=>If({...n,value:"[[react-element]]",children:b.jsx(Lf,{...n,children:p1(e)})})},Gj={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,t,n)=>{const{plugins:r,...a}=t,o=QT(e),u=n(o,{plugins:[{id:"markdown-metadata-plugin",canHandle:d=>typeof d=="string"||typeof d=="number"||typeof d=="boolean"||!d,transform:(d,f)=>If({...f,value:d,children:b.jsx(Lf,{...a,children:b.jsx(Uj,{...a,metadataKeyPath:f.keyPath,children:e})})})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return If({...t,value:e,children:b.jsx(Lf,{...a,children:b.jsx(zj,{...a,children:e})}),additionalProps:{metadata:u}})}},$j={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===q.Markdown,transform:(e,t,n)=>{const r=[...t.keyPath,{type:q.Markdown}],a=e[q.Markdown];return n(a,{...t,children:a,keyPath:r,plugins:[Gj,...t.plugins??[]]})}},qj=(e,t,n)=>ZT(e,t,[Hj,Fj,$j]),rn=(e,t)=>{const{locale:n}=E.useContext(Sh);return qj(e,n)},qv=({onLocaleChange:e}={})=>{const{defaultLocale:t,locales:n}=(rt==null?void 0:rt.internationalization)??{},{locale:r,setLocale:a}=E.useContext(Sh),{setLocaleCookie:o}=kj();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),o(u),e==null||e(u)}}};var oc={},kS;function Kj(){if(kS)return oc;kS=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.parse=l,oc.serialize=f;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,o=(()=>{const y=function(){};return y.prototype=Object.create(null),y})();function l(y,v){const _=new o,S=y.length;if(S<2)return _;const A=(v==null?void 0:v.decode)||m;let w=0;do{const T=y.indexOf("=",w);if(T===-1)break;const R=y.indexOf(";",w),D=R===-1?S:R;if(T>D){w=y.lastIndexOf(";",T-1)+1;continue}const N=u(y,w,T),k=d(y,T,N),I=y.slice(N,k);if(_[I]===void 0){let P=u(y,T+1,D),V=d(y,D,P);const U=A(y.slice(P,V));_[I]=U}w=D+1}while(w<S);return _}function u(y,v,_){do{const S=y.charCodeAt(v);if(S!==32&&S!==9)return v}while(++v<_);return _}function d(y,v,_){for(;v>_;){const S=y.charCodeAt(--v);if(S!==32&&S!==9)return v+1}return _}function f(y,v,_){const S=(_==null?void 0:_.encode)||encodeURIComponent;if(!e.test(y))throw new TypeError(`argument name is invalid: ${y}`);const A=S(v);if(!t.test(A))throw new TypeError(`argument val is invalid: ${v}`);let w=y+"="+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(!g(_.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(y){if(y.indexOf("%")===-1)return y;try{return decodeURIComponent(y)}catch{return y}}function g(y){return a.call(y)==="[object Date]"}return oc}Kj();/**
|
|
52
|
+
* react-router v7.4.0
|
|
53
|
+
*
|
|
54
|
+
* Copyright (c) Remix Software Inc.
|
|
55
|
+
*
|
|
56
|
+
* This source code is licensed under the MIT license found in the
|
|
57
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
58
|
+
*
|
|
59
|
+
* @license MIT
|
|
60
|
+
*/var DS="popstate";function Wj(e={}){function t(r,a){let{pathname:o,search:l,hash:u}=r.location;return Cy("",{pathname:o,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:Lc(a)}return Zj(t,n,null,e)}function Rt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function qr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Yj(){return Math.random().toString(36).substring(2,10)}function IS(e,t){return{usr:e.state,key:e.key,idx:t}}function Cy(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wo(t):t,state:n,key:t&&t.key||r||Yj()}}function Lc({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 Wo(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 Zj(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,u="POP",d=null,f=m();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function m(){return(l.state||{idx:null}).idx}function g(){u="POP";let A=m(),w=A==null?null:A-f;f=A,d&&d({action:u,location:S.location,delta:w})}function y(A,w){u="PUSH";let T=Cy(S.location,A,w);f=m()+1;let R=IS(T,f),D=S.createHref(T);try{l.pushState(R,"",D)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(D)}o&&d&&d({action:u,location:S.location,delta:1})}function v(A,w){u="REPLACE";let T=Cy(S.location,A,w);f=m();let R=IS(T,f),D=S.createHref(T);l.replaceState(R,"",D),o&&d&&d({action:u,location:S.location,delta:0})}function _(A){let w=a.location.origin!=="null"?a.location.origin:a.location.href,T=typeof A=="string"?A:Lc(A);return T=T.replace(/ $/,"%20"),Rt(w,`No window.location.(origin|href) available to create URL for href: ${T}`),new URL(T,w)}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(DS,g),d=A,()=>{a.removeEventListener(DS,g),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:y,replace:v,go(A){return l.go(A)}};return S}function g1(e,t,n="/"){return Xj(e,t,n,!1)}function Xj(e,t,n,r){let a=typeof t=="string"?Wo(t):t,o=Ci(a.pathname||"/",n);if(o==null)return null;let l=y1(e);Qj(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let f=cP(o);u=oP(l[d],f,r)}return u}function y1(e,t=[],n=[],r=""){let a=(o,l,u)=>{let d={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};d.relativePath.startsWith("/")&&(Rt(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 f=Ai([r,d.relativePath]),m=n.concat(d);o.children&&o.children.length>0&&(Rt(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),y1(o.children,t,m,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:aP(f,o.index),routesMeta:m})};return e.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))a(o,l);else for(let d of v1(o.path))a(o,l,d)}),t}function v1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let l=v1(r.join("/")),u=[];return u.push(...l.map(d=>d===""?o:[o,d].join("/"))),a&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function Qj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Jj=/^:[\w-]+$/,eP=3,tP=2,nP=1,rP=10,iP=-2,LS=e=>e==="*";function aP(e,t){let n=e.split("/"),r=n.length;return n.some(LS)&&(r+=iP),t&&(r+=tP),n.filter(a=>!LS(a)).reduce((a,o)=>a+(Jj.test(o)?eP:o===""?nP:rP),r)}function sP(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 oP(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",g=Mf({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},m),y=d.route;if(!g&&f&&n&&!r[r.length-1].route.index&&(g=Mf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!g)return null;Object.assign(a,g.params),l.push({params:a,pathname:Ai([o,g.pathname]),pathnameBase:hP(Ai([o,g.pathnameBase])),route:y}),g.pathnameBase!=="/"&&(o=Ai([o,g.pathnameBase]))}return l}function Mf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=lP(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((f,{paramName:m,isOptional:g},y)=>{if(m==="*"){let _=u[y]||"";l=o.slice(0,o.length-_.length).replace(/(.)\/+$/,"$1")}const v=u[y];return g&&!v?f[m]=void 0:f[m]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:l,pattern:e}}function lP(e,t=!1,n=!0){qr(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 cP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return qr(!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 Ci(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 uP(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Wo(e):e;return{pathname:n?n.startsWith("/")?n:dP(n,t):t,search:mP(r),hash:pP(a)}}function dP(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 bg(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 fP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function b1(e){let t=fP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function _1(e,t,n,r=!1){let a;typeof e=="string"?a=Wo(e):(a={...e},Rt(!a.pathname||!a.pathname.includes("?"),bg("?","pathname","search",a)),Rt(!a.pathname||!a.pathname.includes("#"),bg("#","pathname","hash",a)),Rt(!a.search||!a.search.includes("#"),bg("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=n;else{let g=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),g-=1;a.pathname=y.join("/")}u=g>=0?t[g]:"/"}let d=uP(a,u),f=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var Ai=e=>e.join("/").replace(/\/\/+/g,"/"),hP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function gP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var x1=["POST","PUT","PATCH","DELETE"];new Set(x1);var yP=["GET",...x1];new Set(yP);var Yo=E.createContext(null);Yo.displayName="DataRouter";var Ah=E.createContext(null);Ah.displayName="DataRouterState";var E1=E.createContext({isTransitioning:!1});E1.displayName="ViewTransition";var vP=E.createContext(new Map);vP.displayName="Fetchers";var bP=E.createContext(null);bP.displayName="Await";var Xr=E.createContext(null);Xr.displayName="Navigation";var hu=E.createContext(null);hu.displayName="Location";var Ii=E.createContext({outlet:null,matches:[],isDataRoute:!1});Ii.displayName="Route";var Kv=E.createContext(null);Kv.displayName="RouteError";function _P(e,{relative:t}={}){Rt(mu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=E.useContext(Xr),{hash:a,pathname:o,search:l}=pu(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Ai([n,o])),r.createHref({pathname:u,search:l,hash:a})}function mu(){return E.useContext(hu)!=null}function Sa(){return Rt(mu(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(hu).location}var S1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function A1(e){E.useContext(Xr).static||E.useLayoutEffect(e)}function xP(){let{isDataRoute:e}=E.useContext(Ii);return e?LP():EP()}function EP(){Rt(mu(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(Yo),{basename:t,navigator:n}=E.useContext(Xr),{matches:r}=E.useContext(Ii),{pathname:a}=Sa(),o=JSON.stringify(b1(r)),l=E.useRef(!1);return A1(()=>{l.current=!0}),E.useCallback((d,f={})=>{if(qr(l.current,S1),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=_1(d,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Ai([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,o,a,e])}E.createContext(null);function pu(e,{relative:t}={}){let{matches:n}=E.useContext(Ii),{pathname:r}=Sa(),a=JSON.stringify(b1(n));return E.useMemo(()=>_1(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function SP(e,t){return w1(e,t)}function w1(e,t,n,r){var T;Rt(mu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a,static:o}=E.useContext(Xr),{matches:l}=E.useContext(Ii),u=l[l.length-1],d=u?u.params:{},f=u?u.pathname:"/",m=u?u.pathnameBase:"/",g=u&&u.route;{let R=g&&g.path||"";T1(f,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${R}">) 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.
|
|
61
|
+
|
|
62
|
+
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let y=Sa(),v;if(t){let R=typeof t=="string"?Wo(t):t;Rt(m==="/"||((T=R.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 "${R.pathname}" was given in the \`location\` prop.`),v=R}else v=y;let _=v.pathname||"/",S=_;if(m!=="/"){let R=m.replace(/^\//,"").split("/");S="/"+_.replace(/^\//,"").split("/").slice(R.length).join("/")}let A=!o&&n&&n.matches&&n.matches.length>0?n.matches:g1(e,{pathname:S});qr(g||A!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),qr(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=RP(A&&A.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:Ai([m,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?m:Ai([m,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),l,n,r);return t&&w?E.createElement(hu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},w):w}function AP(){let e=IP(),t=gP(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},o={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:o},"ErrorBoundary")," or"," ",E.createElement("code",{style:o},"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 wP=E.createElement(AP,null),TP=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(Ii.Provider,{value:this.props.routeContext},E.createElement(Kv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function CP({routeContext:e,match:t,children:n}){let r=E.useContext(Yo);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Ii.Provider,{value:e},n)}function RP(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,o=n==null?void 0:n.errors;if(o!=null){let d=a.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);Rt(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).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 f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:g}=n,y=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!g||g[f.route.id]===void 0);if(f.route.lazy||y){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,f,m)=>{let g,y=!1,v=null,_=null;n&&(g=o&&f.route.id?o[f.route.id]:void 0,v=f.route.errorElement||wP,l&&(u<0&&m===0?(T1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,_=null):u===m&&(y=!0,_=f.route.hydrateFallbackElement||null)));let S=t.concat(a.slice(0,m+1)),A=()=>{let w;return g?w=v:y?w=_:f.route.Component?w=E.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,E.createElement(CP,{match:f,routeContext:{outlet:d,matches:S,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?E.createElement(TP,{location:n.location,revalidation:n.revalidation,component:v,error:g,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):A()},null)}function Wv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function NP(e){let t=E.useContext(Yo);return Rt(t,Wv(e)),t}function OP(e){let t=E.useContext(Ah);return Rt(t,Wv(e)),t}function kP(e){let t=E.useContext(Ii);return Rt(t,Wv(e)),t}function Yv(e){let t=kP(e),n=t.matches[t.matches.length-1];return Rt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function DP(){return Yv("useRouteId")}function IP(){var r;let e=E.useContext(Kv),t=OP("useRouteError"),n=Yv("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function LP(){let{router:e}=NP("useNavigate"),t=Yv("useNavigate"),n=E.useRef(!1);return A1(()=>{n.current=!0}),E.useCallback(async(a,o={})=>{qr(n.current,S1),n.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var MS={};function T1(e,t,n){!t&&!MS[e]&&(MS[e]=!0,qr(!1,n))}E.memo(MP);function MP({routes:e,future:t,state:n}){return w1(e,void 0,n,t)}function C1(e){Rt(!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 jP({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1}){Rt(!mu(),"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:o,future:{}}),[l,a,o]);typeof n=="string"&&(n=Wo(n));let{pathname:d="/",search:f="",hash:m="",state:g=null,key:y="default"}=n,v=E.useMemo(()=>{let _=Ci(d,l);return _==null?null:{location:{pathname:_,search:f,hash:m,state:g,key:y},navigationType:r}},[l,d,f,m,g,y,r]);return qr(v!=null,`<Router basename="${l}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:E.createElement(Xr.Provider,{value:u},E.createElement(hu.Provider,{children:t,value:v}))}function PP({children:e,location:t}){return SP(Ry(e),t)}function Ry(e,t=[]){let n=[];return E.Children.forEach(e,(r,a)=>{if(!E.isValidElement(r))return;let o=[...t,a];if(r.type===E.Fragment){n.push.apply(n,Ry(r.props.children,o));return}Rt(r.type===C1,`[${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>`),Rt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.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=Ry(r.props.children,o)),n.push(l)}),n}var vf="get",bf="application/x-www-form-urlencoded";function wh(e){return e!=null&&typeof e.tagName=="string"}function VP(e){return wh(e)&&e.tagName.toLowerCase()==="button"}function BP(e){return wh(e)&&e.tagName.toLowerCase()==="form"}function zP(e){return wh(e)&&e.tagName.toLowerCase()==="input"}function UP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HP(e,t){return e.button===0&&(!t||t==="_self")&&!UP(e)}var Kd=null;function FP(){if(Kd===null)try{new FormData(document.createElement("form"),0),Kd=!1}catch{Kd=!0}return Kd}var GP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _g(e){return e!=null&&!GP.has(e)?(qr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bf}"`),null):e}function $P(e,t){let n,r,a,o,l;if(BP(e)){let u=e.getAttribute("action");r=u?Ci(u,t):null,n=e.getAttribute("method")||vf,a=_g(e.getAttribute("enctype"))||bf,o=new FormData(e)}else if(VP(e)||zP(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?Ci(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||vf,a=_g(e.getAttribute("formenctype"))||_g(u.getAttribute("enctype"))||bf,o=new FormData(u,e),!FP()){let{name:f,type:m,value:g}=e;if(m==="image"){let y=f?`${f}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else f&&o.append(f,g)}}else{if(wh(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=vf,r=null,a=bf,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:l}}function Zv(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function qP(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 KP(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 WP(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await qP(o,n);return l.links?l.links():[]}return[]}));return QP(r.flat(1).filter(KP).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function jS(e,t,n,r,a,o){let l=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>{var m;return n[f].pathname!==d.pathname||((m=n[f].route.path)==null?void 0:m.endsWith("*"))&&n[f].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,f)=>l(d,f)||u(d,f)):o==="data"?t.filter((d,f)=>{var g;let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function YP(e,t,{includeHydrateFallback:n}={}){return ZP(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function ZP(e){return[...new Set(e)]}function XP(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function QP(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(XP(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}function JP(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&&Ci(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function R1(){let e=E.useContext(Yo);return Zv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function eV(){let e=E.useContext(Ah);return Zv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Xv=E.createContext(void 0);Xv.displayName="FrameworkContext";function N1(){let e=E.useContext(Xv);return Zv(e,"You must render this element inside a <HydratedRouter> element"),e}function tV(e,t){let n=E.useContext(Xv),[r,a]=E.useState(!1),[o,l]=E.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:g}=t,y=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 y.current&&A.observe(y.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"?[o,y,{}]:[o,y,{onFocus:lc(u,v),onBlur:lc(d,_),onMouseEnter:lc(f,v),onMouseLeave:lc(m,_),onTouchStart:lc(g,v)}]:[!1,y,{}]}function lc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function nV({page:e,...t}){let{router:n}=R1(),r=E.useMemo(()=>g1(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?E.createElement(iV,{page:e,matches:r,...t}):null}function rV(e){let{manifest:t,routeModules:n}=N1(),[r,a]=E.useState([]);return E.useEffect(()=>{let o=!1;return WP(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function iV({page:e,matches:t,...n}){let r=Sa(),{manifest:a,routeModules:o}=N1(),{basename:l}=R1(),{loaderData:u,matches:d}=eV(),f=E.useMemo(()=>jS(e,t,d,a,r,"data"),[e,t,d,a,r]),m=E.useMemo(()=>jS(e,t,d,a,r,"assets"),[e,t,d,a,r]),g=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let _=new Set,S=!1;if(t.forEach(w=>{var R;let T=a.routes[w.route.id];!T||!T.hasLoader||(!f.some(D=>D.route.id===w.route.id)&&w.route.id in u&&((R=o[w.route.id])!=null&&R.shouldRevalidate)||T.hasClientLoader?S=!0:_.add(w.route.id))}),_.size===0)return[];let A=JP(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,f,t,e,o]),y=E.useMemo(()=>YP(m,a),[m,a]),v=rV(m);return E.createElement(E.Fragment,null,g.map(_=>E.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),y.map(_=>E.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),v.map(({key:_,link:S})=>E.createElement("link",{key:_,...S})))}function aV(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var O1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{O1&&(window.__reactRouterVersion="7.4.0")}catch{}function sV({basename:e,children:t,window:n}){let r=E.useRef();r.current==null&&(r.current=Wj({window:n,v5Compat:!0}));let a=r.current,[o,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(jP,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a})}var k1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,D1=E.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:o,replace:l,state:u,target:d,to:f,preventScrollReset:m,viewTransition:g,...y},v){let{basename:_}=E.useContext(Xr),S=typeof f=="string"&&k1.test(f),A,w=!1;if(typeof f=="string"&&S&&(A=f,O1))try{let V=new URL(window.location.href),U=f.startsWith("//")?new URL(V.protocol+f):new URL(f),ue=Ci(U.pathname,_);U.origin===V.origin&&ue!=null?f=ue+U.search+U.hash:w=!0}catch{qr(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let T=_P(f,{relative:a}),[R,D,N]=tV(r,y),k=uV(f,{replace:l,state:u,target:d,preventScrollReset:m,relative:a,viewTransition:g});function I(V){t&&t(V),V.defaultPrevented||k(V)}let P=E.createElement("a",{...y,...N,href:A||T,onClick:w||o?t:I,ref:aV(v,D),target:d,"data-discover":!S&&n==="render"?"true":void 0});return R&&!S?E.createElement(E.Fragment,null,P,E.createElement(nV,{page:T})):P});D1.displayName="Link";var oV=E.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:l,viewTransition:u,children:d,...f},m){let g=pu(l,{relative:f.relative}),y=Sa(),v=E.useContext(Ah),{navigator:_,basename:S}=E.useContext(Xr),A=v!=null&&pV(g)&&u===!0,w=_.encodeLocation?_.encodeLocation(g).pathname:g.pathname,T=y.pathname,R=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(T=T.toLowerCase(),R=R?R.toLowerCase():null,w=w.toLowerCase()),R&&S&&(R=Ci(R,S)||R);const D=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let N=T===w||!a&&T.startsWith(w)&&T.charAt(D)==="/",k=R!=null&&(R===w||!a&&R.startsWith(w)&&R.charAt(w.length)==="/"),I={isActive:N,isPending:k,isTransitioning:A},P=N?t:void 0,V;typeof r=="function"?V=r(I):V=[r,N?"active":null,k?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(I):o;return E.createElement(D1,{...f,"aria-current":P,className:V,ref:m,style:U,to:l,viewTransition:u},typeof d=="function"?d(I):d)});oV.displayName="NavLink";var lV=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=vf,action:u,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:g,...y},v)=>{let _=hV(),S=mV(u,{relative:f}),A=l.toLowerCase()==="get"?"get":"post",w=typeof u=="string"&&k1.test(u),T=R=>{if(d&&d(R),R.defaultPrevented)return;R.preventDefault();let D=R.nativeEvent.submitter,N=(D==null?void 0:D.getAttribute("formmethod"))||l;_(D||R.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:o,relative:f,preventScrollReset:m,viewTransition:g})};return E.createElement("form",{ref:v,method:A,action:S,onSubmit:r?d:T,...y,"data-discover":!w&&e==="render"?"true":void 0})});lV.displayName="Form";function cV(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function I1(e){let t=E.useContext(Yo);return Rt(t,cV(e)),t}function uV(e,{target:t,replace:n,state:r,preventScrollReset:a,relative:o,viewTransition:l}={}){let u=xP(),d=Sa(),f=pu(e,{relative:o});return E.useCallback(m=>{if(HP(m,t)){m.preventDefault();let g=n!==void 0?n:Lc(d)===Lc(f);u(e,{replace:g,state:r,preventScrollReset:a,relative:o,viewTransition:l})}},[d,u,f,n,r,t,e,a,o,l])}var dV=0,fV=()=>`__${String(++dV)}__`;function hV(){let{router:e}=I1("useSubmit"),{basename:t}=E.useContext(Xr),n=DP();return E.useCallback(async(r,a={})=>{let{action:o,method:l,encType:u,formData:d,body:f}=$P(r,t);if(a.navigate===!1){let m=a.fetcherKey||fV();await e.fetch(m,n,a.action||o,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:d,body:f,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 mV(e,{relative:t}={}){let{basename:n}=E.useContext(Xr),r=E.useContext(Ii);Rt(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...pu(e||".",{relative:t})},l=Sa();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),d=u.getAll("index");if(d.some(m=>m==="")){u.delete("index"),d.filter(g=>g).forEach(g=>u.append("index",g));let m=u.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Ai([n,o.pathname])),Lc(o)}function pV(e,t={}){let n=E.useContext(E1);Rt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=I1("useViewTransitionState"),a=pu(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Ci(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ci(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Mf(a.pathname,l)!=null||Mf(a.pathname,o)!=null}new TextEncoder;var ws=WT();const gV=xh(ws);/**
|
|
63
|
+
* @license lucide-react v0.488.0 - ISC
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the ISC license.
|
|
66
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
+
*/const yV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vV=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),PS=e=>{const t=vV(e);return t.charAt(0).toUpperCase()+t.slice(1)},L1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
68
|
+
* @license lucide-react v0.488.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var bV={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"};/**
|
|
73
|
+
* @license lucide-react v0.488.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/const _V=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...u},d)=>E.createElement("svg",{ref:d,...bV,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:L1("lucide",a),...u},[...l.map(([f,m])=>E.createElement(f,m)),...Array.isArray(o)?o:[o]]));/**
|
|
78
|
+
* @license lucide-react v0.488.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/const St=(e,t)=>{const n=E.forwardRef(({className:r,...a},o)=>E.createElement(_V,{ref:o,iconNode:t,className:L1(`lucide-${yV(PS(e))}`,`lucide-${e}`,r),...a}));return n.displayName=PS(e),n};/**
|
|
83
|
+
* @license lucide-react v0.488.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const xV=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],EV=St("arrow-left",xV);/**
|
|
88
|
+
* @license lucide-react v0.488.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const SV=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],AV=St("arrow-up-from-line",SV);/**
|
|
93
|
+
* @license lucide-react v0.488.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const wV=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Zo=St("check",wV);/**
|
|
98
|
+
* @license lucide-react v0.488.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const TV=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],M1=St("chevron-down",TV);/**
|
|
103
|
+
* @license lucide-react v0.488.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const CV=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],RV=St("chevron-left",CV);/**
|
|
108
|
+
* @license lucide-react v0.488.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const NV=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],jf=St("chevron-right",NV);/**
|
|
113
|
+
* @license lucide-react v0.488.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const OV=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],kV=St("chevron-up",OV);/**
|
|
118
|
+
* @license lucide-react v0.488.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
121
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
+
*/const DV=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],IV=St("chevrons-up-down",DV);/**
|
|
123
|
+
* @license lucide-react v0.488.0 - ISC
|
|
124
|
+
*
|
|
125
|
+
* This source code is licensed under the ISC license.
|
|
126
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
+
*/const LV=[["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"}]],MV=St("copy-check",LV);/**
|
|
128
|
+
* @license lucide-react v0.488.0 - ISC
|
|
129
|
+
*
|
|
130
|
+
* This source code is licensed under the ISC license.
|
|
131
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
+
*/const jV=[["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"}]],PV=St("copy",jV);/**
|
|
133
|
+
* @license lucide-react v0.488.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/const VV=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],BV=St("download",VV);/**
|
|
138
|
+
* @license lucide-react v0.488.0 - ISC
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the ISC license.
|
|
141
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
+
*/const zV=[["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"}]],UV=St("external-link",zV);/**
|
|
143
|
+
* @license lucide-react v0.488.0 - ISC
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the ISC license.
|
|
146
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
+
*/const HV=[["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"}]],FV=St("eye-off",HV);/**
|
|
148
|
+
* @license lucide-react v0.488.0 - ISC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the ISC license.
|
|
151
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
+
*/const GV=[["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"}]],$V=St("eye",GV);/**
|
|
153
|
+
* @license lucide-react v0.488.0 - ISC
|
|
154
|
+
*
|
|
155
|
+
* This source code is licensed under the ISC license.
|
|
156
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
+
*/const qV=[["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"}]],KV=St("globe",qV);/**
|
|
158
|
+
* @license lucide-react v0.488.0 - ISC
|
|
159
|
+
*
|
|
160
|
+
* This source code is licensed under the ISC license.
|
|
161
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
+
*/const WV=[["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"}]],YV=St("move-vertical",WV);/**
|
|
163
|
+
* @license lucide-react v0.488.0 - ISC
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the ISC license.
|
|
166
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
+
*/const ZV=[["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"}]],j1=St("pencil",ZV);/**
|
|
168
|
+
* @license lucide-react v0.488.0 - ISC
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the ISC license.
|
|
171
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
+
*/const XV=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Th=St("plus",XV);/**
|
|
173
|
+
* @license lucide-react v0.488.0 - ISC
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the ISC license.
|
|
176
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
+
*/const QV=[["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"}]],JV=St("rotate-ccw",QV);/**
|
|
178
|
+
* @license lucide-react v0.488.0 - ISC
|
|
179
|
+
*
|
|
180
|
+
* This source code is licensed under the ISC license.
|
|
181
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
+
*/const eB=[["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"}]],VS=St("save",eB);/**
|
|
183
|
+
* @license lucide-react v0.488.0 - ISC
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the ISC license.
|
|
186
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
+
*/const tB=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],nB=St("search",tB);/**
|
|
188
|
+
* @license lucide-react v0.488.0 - ISC
|
|
189
|
+
*
|
|
190
|
+
* This source code is licensed under the ISC license.
|
|
191
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
+
*/const rB=[["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"}]],Qv=St("trash",rB);/**
|
|
193
|
+
* @license lucide-react v0.488.0 - ISC
|
|
194
|
+
*
|
|
195
|
+
* This source code is licensed under the ISC license.
|
|
196
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
+
*/const iB=[["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"}]],P1=St("wand-sparkles",iB);/**
|
|
198
|
+
* @license lucide-react v0.488.0 - ISC
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the ISC license.
|
|
201
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
+
*/const aB=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ts=St("x",aB);function V1(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=V1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ch(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=V1(e))&&(r&&(r+=" "),r+=t);return r}const Jv="-",sB=e=>{const t=lB(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Jv);return u[0]===""&&u.length!==1&&u.shift(),B1(u,t)||oB(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},B1=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?B1(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(Jv);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},BS=/^\[(.+)\]$/,oB=e=>{if(BS.test(e)){const t=BS.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},lB=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)Ny(n[a],r,a,t);return r},Ny=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:zS(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(cB(a)){Ny(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,l])=>{Ny(l,zS(t,o),n,r)})})},zS=(e,t)=>{let n=e;return t.split(Jv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},cB=e=>e.isThemeGetter,uB=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return a(o,l),l},set(o,l){n.has(o)?n.set(o,l):a(o,l)}}},Oy="!",ky=":",dB=ky.length,fB=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const o=[];let l=0,u=0,d=0,f;for(let _=0;_<a.length;_++){let S=a[_];if(l===0&&u===0){if(S===ky){o.push(a.slice(d,_)),d=_+dB;continue}if(S==="/"){f=_;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const m=o.length===0?a:a.substring(d),g=hB(m),y=g!==m,v=f&&f>d?f-d:void 0;return{modifiers:o,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:v}};if(t){const a=t+ky,o=r;r=l=>l.startsWith(a)?o(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const a=r;r=o=>n({className:o,parseClassName:a})}return r},hB=e=>e.endsWith(Oy)?e.substring(0,e.length-1):e.startsWith(Oy)?e.substring(1):e,mB=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const a=[];let o=[];return r.forEach(l=>{l[0]==="["||t[l]?(a.push(...o.sort(),l),o=[]):o.push(l)}),a.push(...o.sort()),a}},pB=e=>({cache:uB(e.cacheSize),parseClassName:fB(e),sortModifiers:mB(e),...sB(e)}),gB=/\s+/,yB=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:o}=t,l=[],u=e.trim().split(gB);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:g,modifiers:y,hasImportantModifier:v,baseClassName:_,maybePostfixModifierPosition:S}=n(m);if(g){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=o(y).join(":"),R=v?T+Oy:T,D=R+w;if(l.includes(D))continue;l.push(D);const N=a(w,A);for(let k=0;k<N.length;++k){const I=N[k];l.push(R+I)}d=m+(d.length>0?" "+d:d)}return d};function vB(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=z1(t))&&(r&&(r+=" "),r+=n);return r}const z1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=z1(e[r]))&&(n&&(n+=" "),n+=t);return n};function bB(e,...t){let n,r,a,o=l;function l(d){const f=t.reduce((m,g)=>g(m),e());return n=pB(f),r=n.cache.get,a=n.cache.set,o=u,u(d)}function u(d){const f=r(d);if(f)return f;const m=yB(d,n);return a(d,m),m}return function(){return o(vB.apply(null,arguments))}}const en=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},U1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,H1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_B=/^\d+\/\d+$/,xB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EB=/\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$/,SB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,AB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>_B.test(e),st=e=>!!e&&!Number.isNaN(Number(e)),ts=e=>!!e&&Number.isInteger(Number(e)),US=e=>e.endsWith("%")&&st(e.slice(0,-1)),aa=e=>xB.test(e),TB=()=>!0,CB=e=>EB.test(e)&&!SB.test(e),e0=()=>!1,RB=e=>AB.test(e),NB=e=>wB.test(e),OB=e=>!Ne(e)&&!Oe(e),kB=e=>Xo(e,$1,e0),Ne=e=>U1.test(e),ns=e=>Xo(e,q1,CB),xg=e=>Xo(e,HB,st),DB=e=>Xo(e,F1,e0),IB=e=>Xo(e,G1,NB),LB=e=>Xo(e,e0,RB),Oe=e=>H1.test(e),Wd=e=>Qo(e,q1),MB=e=>Qo(e,FB),jB=e=>Qo(e,F1),PB=e=>Qo(e,$1),VB=e=>Qo(e,G1),BB=e=>Qo(e,GB,!0),Xo=(e,t,n)=>{const r=U1.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Qo=(e,t,n=!1)=>{const r=H1.exec(e);return r?r[1]?t(r[1]):n:!1},F1=e=>e==="position",zB=new Set(["image","url"]),G1=e=>zB.has(e),UB=new Set(["length","size","percentage"]),$1=e=>UB.has(e),q1=e=>e==="length",HB=e=>e==="number",FB=e=>e==="family-name",GB=e=>e==="shadow",$B=()=>{const e=en("color"),t=en("font"),n=en("text"),r=en("font-weight"),a=en("tracking"),o=en("leading"),l=en("breakpoint"),u=en("container"),d=en("spacing"),f=en("radius"),m=en("shadow"),g=en("inset-shadow"),y=en("drop-shadow"),v=en("blur"),_=en("perspective"),S=en("aspect"),A=en("ease"),w=en("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],k=()=>[Oe,Ne,d],I=()=>[ho,"full","auto",...k()],P=()=>[ts,"none","subgrid",Oe,Ne],V=()=>["auto",{span:["full",ts,Oe,Ne]},Oe,Ne],U=()=>[ts,"auto",Oe,Ne],ue=()=>["auto","min","max","fr",Oe,Ne],oe=()=>["start","end","center","between","around","evenly","stretch","baseline"],fe=()=>["start","end","center","stretch"],Y=()=>["auto",...k()],J=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],H=()=>[e,Oe,Ne],ne=()=>[US,ns],ee=()=>["","none","full",f,Oe,Ne],ve=()=>["",st,Wd,ns],j=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["","none",v,Oe,Ne],re=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Oe,Ne],te=()=>["none",st,Oe,Ne],de=()=>["none",st,Oe,Ne],ye=()=>[st,Oe,Ne],pe=()=>[ho,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[aa],breakpoint:[aa],color:[TB],container:[aa],"drop-shadow":[aa],ease:["in","out","in-out"],font:[OB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[aa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[aa],shadow:[aa],spacing:["px",st],text:[aa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,Ne,Oe,S]}],container:["container"],columns:[{columns:[st,Ne,Oe,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:[...R(),Ne,Oe]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[ts,"auto",Oe,Ne]}],basis:[{basis:[ho,"full","auto",u,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[st,ho,"auto","initial","none",Ne]}],grow:[{grow:["",st,Oe,Ne]}],shrink:[{shrink:["",st,Oe,Ne]}],order:[{order:[ts,"first","last","none",Oe,Ne]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ue()}],"auto-rows":[{"auto-rows":ue()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...fe(),"baseline"]}],"align-self":[{self:["auto",...fe(),"baseline"]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[u,"screen",...J()]}],"min-w":[{"min-w":[u,"screen","none",...J()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...J()]}],h:[{h:["screen",...J()]}],"min-h":[{"min-h":["screen","none",...J()]}],"max-h":[{"max-h":["screen",...J()]}],"font-size":[{text:["base",n,Wd,ns]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Oe,xg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",US,Ne]}],"font-family":[{font:[MB,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":[st,"none",Oe,xg]}],leading:[{leading:[o,...k()]}],"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:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:[st,"from-font","auto",Oe,ns]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[st,"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:k()}],"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"]}],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:[...R(),jB,DB]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",PB,kB]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ts,Oe,Ne],radial:["",Oe,Ne],conic:[ts,Oe,Ne]},VB,IB]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:ve()}],"border-w-x":[{"border-x":ve()}],"border-w-y":[{"border-y":ve()}],"border-w-s":[{"border-s":ve()}],"border-w-e":[{"border-e":ve()}],"border-w-t":[{"border-t":ve()}],"border-w-r":[{"border-r":ve()}],"border-w-b":[{"border-b":ve()}],"border-w-l":[{"border-l":ve()}],"divide-x":[{"divide-x":ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...j(),"hidden","none"]}],"divide-style":[{divide:[...j(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...j(),"none","hidden"]}],"outline-offset":[{"outline-offset":[st,Oe,Ne]}],"outline-w":[{outline:["",st,Wd,ns]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,BB,LB]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",Oe,Ne,g]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[st,ns]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ve()}],"inset-ring-color":[{"inset-ring":H()}],opacity:[{opacity:[st,Oe,Ne]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none",Oe,Ne]}],blur:[{blur:F()}],brightness:[{brightness:[st,Oe,Ne]}],contrast:[{contrast:[st,Oe,Ne]}],"drop-shadow":[{"drop-shadow":["","none",y,Oe,Ne]}],grayscale:[{grayscale:["",st,Oe,Ne]}],"hue-rotate":[{"hue-rotate":[st,Oe,Ne]}],invert:[{invert:["",st,Oe,Ne]}],saturate:[{saturate:[st,Oe,Ne]}],sepia:[{sepia:["",st,Oe,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Ne]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[st,Oe,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[st,Oe,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",st,Oe,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[st,Oe,Ne]}],"backdrop-invert":[{"backdrop-invert":["",st,Oe,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[st,Oe,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[st,Oe,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",st,Oe,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"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:[st,"initial",Oe,Ne]}],ease:[{ease:["linear","initial",A,Oe,Ne]}],delay:[{delay:[st,Oe,Ne]}],animate:[{animate:["none",w,Oe,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,Oe,Ne]}],"perspective-origin":[{"perspective-origin":re()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[Oe,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:re()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",...H()]}],"stroke-w":[{stroke:[st,Wd,ns,xg]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},K1=bB($B),Te=(...e)=>K1(Ch(e)),HS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,FS=Ch,mr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return FS(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(f=>{const m=n==null?void 0:n[f],g=o==null?void 0:o[f];if(m===null)return null;const y=HS(m)||HS(g);return a[f][y]}),u=n&&Object.entries(n).reduce((f,m)=>{let[g,y]=m;return y===void 0||(f[g]=y),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:g,className:y,...v}=m;return Object.entries(v).every(_=>{let[S,A]=_;return Array.isArray(A)?A.includes({...o,...u}[S]):{...o,...u}[S]===A})?[...f,g,y]:f},[]);return FS(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},qB=({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:Te("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"})]})]})}),jo=({children:e,isLoading:t=!0,className:n,...r})=>b.jsx(b.Fragment,{children:t?b.jsx("div",{className:Te("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(qB,{className:"size-10 max-h-full max-w-full"})}):e??b.jsx(b.Fragment,{})}),Eg=mr("",{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"}}),KB=mr("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}}),gt=({variant:e,size:t,color:n,children:r,Icon:a,IconRight:o,iconClassName:l,isLoading:u,isActive:d,isFullWidth:f=!1,textAlign:m,disabled:g,label:y,className:v,type:_="button",...S})=>{const A=e==="link"||e==="invisible-link";return b.jsxs("button",{disabled:u||g,"aria-current":d?"page":void 0,"aria-label":y,"aria-busy":u,role:A?"link":void 0,type:_,className:KB({variant:e,size:t,color:n,isFullWidth:f,textAlign:m??(o?"left":"center"),hasIconLeft:typeof r<"u"&&(typeof a<"u"||typeof u<"u"),hasIconRight:typeof r<"u"&&typeof o<"u",className:v}),...S,children:[a&&!u&&b.jsx(a,{className:Eg({size:t,className:l,position:"left"})}),b.jsx(jo,{className:Eg({size:t,className:l,position:"left"}),isLoading:u??!1}),b.jsx("span",{children:r}),o&&b.jsx(o,{className:Eg({size:t,className:l,position:"right"})})]})},W1=({children:e,isHidden:t,className:n="",isOverable:r=!1,isFocusable:a=!1,minHeight:o=0,...l})=>b.jsx("div",{"aria-hidden":a?t:void 0,tabIndex:a?0:void 0,role:a?"button":"none",className:Te("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:`${o}px`},className:Te(r&&"group-hover/height-smoother:visible",a&&"group-focus/height-smoother:visible",n),children:e})}),Y1=({children:e,header:t,isOpen:n=!1,onClick:r,...a})=>{const[o,l]=E.useState(n),u=o==null?void 0:!o;return E.useEffect(()=>{n!=null&&l(n)},[n]),b.jsxs("div",{className:"w-full",children:[b.jsx(gt,{variant:"hoverable",color:"text",onClick:d=>{l(f=>!f),r==null||r(d)},isFullWidth:!0,className:"flex items-center justify-between gap-2",IconRight:M1,iconClassName:Te("transform transition-transform duration-500 ease-in-out",o?"rotate-0":"-rotate-180"),...a,children:t}),b.jsx(W1,{tabIndex:u!==!1?void 0:-1,isHidden:u,children:e})]})},WB={},GS=e=>{let t;const n=new Set,r=(m,g)=>{const y=typeof m=="function"?m(t):m;if(!Object.is(y,t)){const v=t;t=g??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(_=>_(t,v))}},a=()=>t,d={setState:r,getState:a,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(WB?"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()}},f=t=e(r,a,d);return d},YB=e=>e?GS(e):GS;var Sg={exports:{}},Ag={},wg={exports:{}},Tg={};/**
|
|
203
|
+
* @license React
|
|
204
|
+
* use-sync-external-store-shim.production.js
|
|
205
|
+
*
|
|
206
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the MIT license found in the
|
|
209
|
+
* LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/var $S;function ZB(){if($S)return Tg;$S=1;var e=du();function t(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(g,y){var v=y(),_=r({inst:{value:v,getSnapshot:y}}),S=_[0].inst,A=_[1];return o(function(){S.value=v,S.getSnapshot=y,d(S)&&A({inst:S})},[g,v,y]),a(function(){return d(S)&&A({inst:S}),g(function(){d(S)&&A({inst:S})})},[g]),l(v),v}function d(g){var y=g.getSnapshot;g=g.value;try{var v=y();return!n(g,v)}catch{return!0}}function f(g,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Tg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Tg}var qS;function Z1(){return qS||(qS=1,wg.exports=ZB()),wg.exports}/**
|
|
211
|
+
* @license React
|
|
212
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
213
|
+
*
|
|
214
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
215
|
+
*
|
|
216
|
+
* This source code is licensed under the MIT license found in the
|
|
217
|
+
* LICENSE file in the root directory of this source tree.
|
|
218
|
+
*/var KS;function XB(){if(KS)return Ag;KS=1;var e=du(),t=Z1();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Ag.useSyncExternalStoreWithSelector=function(f,m,g,y,v){var _=o(null);if(_.current===null){var S={hasValue:!1,value:null};_.current=S}else S=_.current;_=u(function(){function w(k){if(!T){if(T=!0,R=k,k=y(k),v!==void 0&&S.hasValue){var I=S.value;if(v(I,k))return D=I}return D=k}if(I=D,r(R,k))return I;var P=y(k);return v!==void 0&&v(I,P)?(R=k,I):(R=k,D=P)}var T=!1,R,D,N=g===void 0?null:g;return[function(){return w(m())},N===null?void 0:function(){return w(N())}]},[m,g,y,v]);var A=a(f,_[0],_[1]);return l(function(){S.hasValue=!0,S.value=A},[A]),d(A),A},Ag}var WS;function QB(){return WS||(WS=1,Sg.exports=XB()),Sg.exports}var JB=QB();const ez=xh(JB),X1={},{useDebugValue:tz}=$e,{useSyncExternalStoreWithSelector:nz}=ez;let YS=!1;const rz=e=>e;function iz(e,t=rz,n){(X1?"production":void 0)!=="production"&&n&&!YS&&(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"),YS=!0);const r=nz(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return tz(r),r}const ZS=e=>{(X1?"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"?YB(e):e,n=(r,a)=>iz(t,r,a);return Object.assign(n,t),n},Q1=e=>e?ZS(e):ZS,az=Q1((e,t)=>({scrollBlockers:[],addBlockage:(n,r)=>e(a=>{const o=a.scrollBlockers,l=o.find(u=>u.element===r);if(l){const d=l.blockers.includes(n)?l.blockers:[...l.blockers,n];return{scrollBlockers:o.map(f=>f.element===r?{...f,blockers:d}:f)}}return r.style.overflowY="hidden",r.style.overflowX="hidden",{scrollBlockers:[...o,{element:r,blockers:[n]}]}}),removeBlockage:(n,r)=>e(a=>{const o=a.scrollBlockers,l=o.find(u=>u.element===r);return l?l.blockers.length>1?{scrollBlockers:o.map(u=>u.element===r?{...u,blockers:u.blockers.filter(d=>d!==n)}:u)}:(r.style.overflowY="auto",{scrollBlockers:o.filter(u=>u.element!==r)}):{scrollBlockers:o}}),isElementScrollBlocked:n=>t().scrollBlockers.some(r=>r.element===n)})),vo=()=>({isFetched:!1,fetchedDateTime:null,isLoading:!1,isInvalidated:!1,error:null,isSuccess:!1,data:null,errorCount:0,isEnabled:!0}),Cg=(e,t)=>t.filter(n=>e.includes(n.split("/")[0])),sz=(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]??vo(),...a}}}}case"MAKE_QUERY_IN_ERROR":{const{key:r,error:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??vo(),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,o=[r].flat(),l=Object.keys(e.states),u=Cg(o,l);if(u.length===0)return e;const d=structuredClone(e.states);return u.forEach(f=>{d[f]={...e.states[f]??vo(),...a}}),{...e,states:d}}case"RESET_KEY_STATE":{const{keys:r}=t,a=[r].flat();if(a.length===0)return e;const o=Object.keys(e.states),l=Cg(a,o);if(l.length===0)return e;const u={...e.states};return l.forEach(d=>{u[d]=vo()}),{...e,states:u}}case"RESET_STATE":{const r=[t.excludeKeys].flat(),a=Object.keys(e.states),o=Cg(r,a),l={};return a.forEach(u=>{l[u]=o.includes(u)?e.states[u]:vo()}),{...e,states:l}}default:return e}},J1=E.createContext(null),oz=({children:e})=>{const[t,n]=E.useReducer(sz,{states:{}}),r=f=>t.states[f]??vo(),a=(f,m)=>{n({type:"SET_QUERY_STATE",key:f,value:m})},o=(f,m)=>{n({type:"SET_QUERIES_STATE",keys:f,value:m})},l=(f,m)=>{n({type:"MAKE_QUERY_IN_ERROR",key:f,error:m})},u=f=>{n({type:"RESET_KEY_STATE",keys:f})},d=f=>{n({type:"RESET_STATE",excludeKeys:f})};return b.jsx(J1.Provider,{value:{getStates:r,setQueryState:a,setQueriesState:o,makeQueryInError:l,resetKeyState:u,resetState:d},children:e})},lz=()=>{const e=E.useContext(J1);if(!e)throw new Error("useAsyncState must be used within an AsyncStateProvider");return e},Yd=new Map,cz=!1,uz=!1,dz=!0,fz=!1,hz=1,mz=!1,pz=5*60*1e3,gz=5*60*1e3,Dy=e=>e?Array.isArray(e)?e:[e]:[],XS=(e,t)=>Dy(t).length>0?`${e}/${JSON.stringify(t)}`:e,gu=(e,t,n)=>{const r=(n==null?void 0:n.retryLimit)??hz,a=(n==null?void 0:n.autoFetch)??fz,o=(n==null?void 0:n.retryTime)??gz,l=(n==null?void 0:n.cache)??cz,u=(n==null?void 0:n.store)??uz,d=(n==null?void 0:n.enable)??dz,f=(n==null?void 0:n.revalidation)??mz,m=(n==null?void 0:n.revalidateTime)??pz,g=(n==null?void 0:n.updateQueries)??[],y=(n==null?void 0:n.invalidateQueries)??[],v=n==null?void 0:n.onSuccess,_=n==null?void 0:n.onError,S=Dy((n==null?void 0:n.args)??[]),{getStates:A,setQueryState:w,setQueriesState:T,makeQueryInError:R}=lz(),D=E.useRef(S),N=E.useRef(null),k=XS(e,D.current),{isFetched:I,fetchedDateTime:P,isLoading:V,isEnabled:U,error:ue,isSuccess:oe,isInvalidated:fe,data:Y,errorCount:J}=A(k),H=async(...W)=>{const F=XS(e,W);N.current&&N.current.abort();const re=new AbortController;if(N.current=re,Yd.has(F))return Yd.get(F);const te=(async()=>{w(F,{isLoading:!0});let de=null;return await t(...W).then(ye=>{de=ye,w(F,{data:ye,errorCount:0,isLoading:!1,isFetched:!0,fetchedDateTime:new Date,isSuccess:!0,isInvalidated:!1,error:null}),v==null||v(ye),y.length>0&&T(y,{isInvalidated:!0}),g.length>0&&T(g,{data:ye}),u&&localStorage.setItem(F,JSON.stringify(ye))}).catch(ye=>{console.error({error:ye});const pe=ye instanceof Error?ye.message:String(ye);R(F,pe),_==null||_(ye.message)}).finally(()=>{Yd.delete(F)}),de})();return Yd.set(F,te),await te},ne=async(...W)=>{if(!(!U||!d))return W&&(D.current=Dy(W)),await H(...D.current)},ee=async(...W)=>!U||!d||V?void 0:!fe&&oe&&l&&Y?Y:await ne(...W);E.useEffect(()=>{d!==U&&w(k,{isEnabled:U})},[d,U,k]),E.useEffect(()=>{if(!U||!d||!u||fe||I||Y)return;const W=localStorage.getItem(k);try{W&&w(k,{data:JSON.parse(W)})}catch(F){console.error(F)}},[u,k,I,fe,U,d,Y]),E.useEffect(()=>{a&&(!U||!d||I&&!fe||V||H(...D.current))},[a,U,d,I,fe,V,H]),E.useEffect(()=>{const W=J>0&&r>0,F=J>r;if(!U||!d||!W||F||!(l||u)||V||oe)return;const re=setTimeout(()=>{H(...D.current)},o);return()=>clearTimeout(re)},[U,J,r,d,o,l,u,oe,V,H]),E.useEffect(()=>{if(!f||m<=0||!U||!d||V||!oe||!P||!(l||u))return;const W=setTimeout(()=>{H(...D.current)},m);return()=>clearTimeout(W)},[f,m,l,u,oe,P,V,U,d,H]);const ve=W=>{w(k,{data:W})},j={isFetched:I,isInvalidated:fe,error:ue,data:Y,errorCount:J,isSuccess:oe,isEnabled:U,isDisabled:!U,isLoading:V,isWaitingData:V&&!I&&!Y,isRevalidating:V&&I,[e]:ee,revalidate:ne,setData:ve};return E.useEffect(()=>()=>{N.current&&N.current.abort()},[]),j},yz=e=>{var u;const t=Zr(),r=Eh(void 0,e??t??rt),{data:a,isFetched:o}=gu("getCSRFToken",r.auth.getCSRFToken,{cache:!0,autoFetch:!0});return{csrfToken:(u=a==null?void 0:a.data)==null?void 0:u.csrf_token,csrfTokenFetched:o}},vz=e=>{const t=Zr(),n=e??t??rt,r=Eh(void 0,n),{data:a}=gu("getOAuth2AccessToken",r.auth.getOAuth2AccessToken,{cache:!0,autoFetch:!0,enable:!!(n.editor.clientId&&n.editor.clientSecret)});return{oAuth2AccessToken:a==null?void 0:a.data}},bz=(e,t)=>{const n=Zr(),a=Eh(void 0,t??n??rt),{getSession:o,revalidate:l,data:u,setData:d,isFetched:f}=gu("getSession",async()=>{try{const g=await a.auth.getSession();if(g.data){const{user:y,organization:v,project:_}=g.data;return{user:y,organization:v,isOrganizationAdmin:(y&&((v==null?void 0:v.adminsIds)??[]).includes(y._id))??!1,project:_,isProjectAdmin:(y&&((_==null?void 0:_.adminsIds)??[]).includes(y._id))??!1}}}catch(g){console.error(g)}return null},{cache:!0,store:!0,autoFetch:!0,enable:!e,invalidateQueries:["getOrganizations","getProjects","getUsers","getDictionaries"]});return{session:E.useMemo(()=>u??(f?null:void 0),[u,f]),fetchSession:o,revalidateSession:l,setSession:d}},yu=({session:e,intlayerConfiguration:t}={})=>{const{csrfToken:n,csrfTokenFetched:r}=yz(t),{session:a,fetchSession:o,revalidateSession:l,setSession:u}=bz(e,t),{oAuth2AccessToken:d}=vz(t);return{session:a,fetchSession:o,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 lt(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 QS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eC(...e){return t=>{let n=!1;const r=e.map(a=>{const o=QS(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():QS(e[a],null)}}}}function Nt(...e){return E.useCallback(eC(...e),e)}function _z(e,t){const n=E.createContext(t),r=o=>{const{children:l,...u}=o,d=E.useMemo(()=>u,Object.values(u));return b.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function a(o){const l=E.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function vu(e,t=[]){let n=[];function r(o,l){const u=E.createContext(l),d=n.length;n=[...n,l];const f=g=>{var w;const{scope:y,children:v,..._}=g,S=((w=y==null?void 0:y[e])==null?void 0:w[d])||u,A=E.useMemo(()=>_,Object.values(_));return b.jsx(S.Provider,{value:A,children:v})};f.displayName=o+"Provider";function m(g,y){var S;const v=((S=y==null?void 0:y[e])==null?void 0:S[d])||u,_=E.useContext(v);if(_)return _;if(l!==void 0)return l;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[f,m]}const a=()=>{const o=n.map(l=>E.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,xz(a,...t)]}function xz(...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(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const g=d(o)[`__scope${f}`];return{...u,...g}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var ps=E.forwardRef((e,t)=>{const{children:n,...r}=e,a=E.Children.toArray(n),o=a.find(Sz);if(o){const l=o.props.children,u=a.map(d=>d===o?E.Children.count(l)>1?E.Children.only(null):E.isValidElement(l)?l.props.children:null:d);return b.jsx(Iy,{...r,ref:t,children:E.isValidElement(l)?E.cloneElement(l,void 0,u):null})}return b.jsx(Iy,{...r,ref:t,children:n})});ps.displayName="Slot";var Iy=E.forwardRef((e,t)=>{const{children:n,...r}=e;if(E.isValidElement(n)){const a=wz(n),o=Az(r,n.props);return n.type!==E.Fragment&&(o.ref=t?eC(t,a):a),E.cloneElement(n,o)}return E.Children.count(n)>1?E.Children.only(null):null});Iy.displayName="SlotClone";var Ez=({children:e})=>b.jsx(b.Fragment,{children:e});function Sz(e){return E.isValidElement(e)&&e.type===Ez}function Az(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{o(...u),a(...u)}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function wz(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 tC(e){const t=e+"CollectionProvider",[n,r]=vu(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=v=>{const{scope:_,children:S}=v,A=$e.useRef(null),w=$e.useRef(new Map).current;return b.jsx(a,{scope:_,itemMap:w,collectionRef:A,children:S})};l.displayName=t;const u=e+"CollectionSlot",d=$e.forwardRef((v,_)=>{const{scope:S,children:A}=v,w=o(u,S),T=Nt(_,w.collectionRef);return b.jsx(ps,{ref:T,children:A})});d.displayName=u;const f=e+"CollectionItemSlot",m="data-radix-collection-item",g=$e.forwardRef((v,_)=>{const{scope:S,children:A,...w}=v,T=$e.useRef(null),R=Nt(_,T),D=o(f,S);return $e.useEffect(()=>(D.itemMap.set(T,{ref:T,...w}),()=>void D.itemMap.delete(T))),b.jsx(ps,{[m]:"",ref:R,children:A})});g.displayName=f;function y(v){const _=o(e+"CollectionConsumer",v);return $e.useCallback(()=>{const A=_.collectionRef.current;if(!A)return[];const w=Array.from(A.querySelectorAll(`[${m}]`));return Array.from(_.itemMap.values()).sort((D,N)=>w.indexOf(D.ref.current)-w.indexOf(N.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:l,Slot:d,ItemSlot:g},y,r]}var Tz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],tt=Tz.reduce((e,t)=>{const n=E.forwardRef((r,a)=>{const{asChild:o,...l}=r,u=o?ps:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(u,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function nC(e,t){e&&ws.flushSync(()=>e.dispatchEvent(t))}function Kn(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 Cz(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(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 Rz="DismissableLayer",Ly="dismissableLayer.update",Nz="dismissableLayer.pointerDownOutside",Oz="dismissableLayer.focusOutside",JS,rC=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rh=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=E.useContext(rC),[m,g]=E.useState(null),y=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=E.useState({}),_=Nt(t,I=>g(I)),S=Array.from(f.layers),[A]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=S.indexOf(A),T=m?S.indexOf(m):-1,R=f.layersWithOutsidePointerEventsDisabled.size>0,D=T>=w,N=Dz(I=>{const P=I.target,V=[...f.branches].some(U=>U.contains(P));!D||V||(a==null||a(I),l==null||l(I),I.defaultPrevented||u==null||u())},y),k=Iz(I=>{const P=I.target;[...f.branches].some(U=>U.contains(P))||(o==null||o(I),l==null||l(I),I.defaultPrevented||u==null||u())},y);return Cz(I=>{T===f.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&u&&(I.preventDefault(),u()))},y),E.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(JS=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),eA(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=JS)}},[m,y,n,f]),E.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),eA())},[m,f]),E.useEffect(()=>{const I=()=>v({});return document.addEventListener(Ly,I),()=>document.removeEventListener(Ly,I)},[]),b.jsx(tt.div,{...d,ref:_,style:{pointerEvents:R?D?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,k.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,N.onPointerDownCapture)})});Rh.displayName=Rz;var kz="DismissableLayerBranch",iC=E.forwardRef((e,t)=>{const n=E.useContext(rC),r=E.useRef(null),a=Nt(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),b.jsx(tt.div,{...e,ref:a})});iC.displayName=kz;function Dz(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=E.useRef(!1),a=E.useRef(()=>{});return E.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){aC(Nz,n,f,{discrete:!0})};const f={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",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Iz(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=E.useRef(!1);return E.useEffect(()=>{const a=o=>{o.target&&!r.current&&aC(Oz,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eA(){const e=new CustomEvent(Ly);document.dispatchEvent(e)}function aC(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?nC(a,o):a.dispatchEvent(o)}var Lz=Rh,Mz=iC,yn=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},jz="Portal",Nh=E.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[a,o]=E.useState(!1);yn(()=>o(!0),[]);const l=n||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?gV.createPortal(b.jsx(tt.div,{...r,ref:t}),l):null});Nh.displayName=jz;function Pz(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var bu=e=>{const{present:t,children:n}=e,r=Vz(t),a=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=Nt(r.ref,Bz(a));return typeof n=="function"||r.isPresent?E.cloneElement(a,{ref:o}):null};bu.displayName="Presence";function Vz(e){const[t,n]=E.useState(),r=E.useRef({}),a=E.useRef(e),o=E.useRef("none"),l=e?"mounted":"unmounted",[u,d]=Pz(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const f=Zd(r.current);o.current=u==="mounted"?f:"none"},[u]),yn(()=>{const f=r.current,m=a.current;if(m!==e){const y=o.current,v=Zd(f);e?d("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(m&&y!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),yn(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,g=v=>{const S=Zd(r.current).includes(v.animationName);if(v.target===t&&S&&(d("ANIMATION_END"),!a.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},y=v=>{v.target===t&&(o.current=Zd(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:E.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function Zd(e){return(e==null?void 0:e.animationName)||"none"}function Bz(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 Pf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=zz({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r,u=Kn(n),d=E.useCallback(f=>{if(o){const g=typeof f=="function"?f(e):f;g!==e&&u(g)}else a(f)},[o,e,a,u]);return[l,d]}function zz({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,a=E.useRef(r),o=Kn(t);return E.useEffect(()=>{a.current!==r&&(o(r),a.current=r)},[r,a,o]),n}var Uz="VisuallyHidden",Oh=E.forwardRef((e,t)=>b.jsx(tt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Oh.displayName=Uz;var t0="ToastProvider",[n0,Hz,Fz]=tC("Toast"),[sC,Gz]=vu("Toast",[Fz]),[$z,kh]=sC(t0),r0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:l}=e,[u,d]=E.useState(null),[f,m]=E.useState(0),g=E.useRef(!1),y=E.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${t0}\`. Expected non-empty \`string\`.`),b.jsx(n0.Provider,{scope:t,children:b.jsx($z,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:o,toastCount:f,viewport:u,onViewportChange:d,onToastAdd:E.useCallback(()=>m(v=>v+1),[]),onToastRemove:E.useCallback(()=>m(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:y,children:l})})};r0.displayName=t0;var oC="ToastViewport",qz=["F8"],My="toast.viewportPause",jy="toast.viewportResume",i0=E.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=qz,label:a="Notifications ({hotkey})",...o}=e,l=kh(oC,n),u=Hz(n),d=E.useRef(null),f=E.useRef(null),m=E.useRef(null),g=E.useRef(null),y=Nt(t,g,l.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=l.toastCount>0;E.useEffect(()=>{const A=w=>{var R;r.length!==0&&r.every(D=>w[D]||w.code===D)&&((R=g.current)==null||R.focus())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[r]),E.useEffect(()=>{const A=d.current,w=g.current;if(_&&A&&w){const T=()=>{if(!l.isClosePausedRef.current){const k=new CustomEvent(My);w.dispatchEvent(k),l.isClosePausedRef.current=!0}},R=()=>{if(l.isClosePausedRef.current){const k=new CustomEvent(jy);w.dispatchEvent(k),l.isClosePausedRef.current=!1}},D=k=>{!A.contains(k.relatedTarget)&&R()},N=()=>{A.contains(document.activeElement)||R()};return A.addEventListener("focusin",T),A.addEventListener("focusout",D),A.addEventListener("pointermove",T),A.addEventListener("pointerleave",N),window.addEventListener("blur",T),window.addEventListener("focus",R),()=>{A.removeEventListener("focusin",T),A.removeEventListener("focusout",D),A.removeEventListener("pointermove",T),A.removeEventListener("pointerleave",N),window.removeEventListener("blur",T),window.removeEventListener("focus",R)}}},[_,l.isClosePausedRef]);const S=E.useCallback(({tabbingDirection:A})=>{const T=u().map(R=>{const D=R.ref.current,N=[D,...a2(D)];return A==="forwards"?N:N.reverse()});return(A==="forwards"?T.reverse():T).flat()},[u]);return E.useEffect(()=>{const A=g.current;if(A){const w=T=>{var N,k,I;const R=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!R){const P=document.activeElement,V=T.shiftKey;if(T.target===A&&V){(N=f.current)==null||N.focus();return}const oe=S({tabbingDirection:V?"backwards":"forwards"}),fe=oe.findIndex(Y=>Y===P);Rg(oe.slice(fe+1))?T.preventDefault():V?(k=f.current)==null||k.focus():(I=m.current)==null||I.focus()}};return A.addEventListener("keydown",w),()=>A.removeEventListener("keydown",w)}},[u,S]),b.jsxs(Mz,{ref:d,role:"region","aria-label":a.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&b.jsx(Py,{ref:f,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"forwards"});Rg(A)}}),b.jsx(n0.Slot,{scope:n,children:b.jsx(tt.ol,{tabIndex:-1,...o,ref:y})}),_&&b.jsx(Py,{ref:m,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"backwards"});Rg(A)}})]})});i0.displayName=oC;var lC="ToastFocusProxy",Py=E.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=kh(lC,n);return b.jsx(Oh,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{var f;const u=l.relatedTarget;!((f=o.viewport)!=null&&f.contains(u))&&r()}})});Py.displayName=lC;var Dh="Toast",Kz="toast.swipeStart",Wz="toast.swipeMove",Yz="toast.swipeCancel",Zz="toast.swipeEnd",a0=E.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...l}=e,[u=!0,d]=Pf({prop:r,defaultProp:a,onChange:o});return b.jsx(bu,{present:n||u,children:b.jsx(Jz,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:Kn(e.onPause),onResume:Kn(e.onResume),onSwipeStart:lt(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:lt(e.onSwipeMove,f=>{const{x:m,y:g}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:lt(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:lt(e.onSwipeEnd,f=>{const{x:m,y:g}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),d(!1)})})})});a0.displayName=Dh;var[Xz,Qz]=sC(Dh,{onClose(){}}),Jz=E.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:o,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:f,onSwipeStart:m,onSwipeMove:g,onSwipeCancel:y,onSwipeEnd:v,..._}=e,S=kh(Dh,n),[A,w]=E.useState(null),T=Nt(t,Y=>w(Y)),R=E.useRef(null),D=E.useRef(null),N=a||S.duration,k=E.useRef(0),I=E.useRef(N),P=E.useRef(0),{onToastAdd:V,onToastRemove:U}=S,ue=Kn(()=>{var J;(A==null?void 0:A.contains(document.activeElement))&&((J=S.viewport)==null||J.focus()),l()}),oe=E.useCallback(Y=>{!Y||Y===1/0||(window.clearTimeout(P.current),k.current=new Date().getTime(),P.current=window.setTimeout(ue,Y))},[ue]);E.useEffect(()=>{const Y=S.viewport;if(Y){const J=()=>{oe(I.current),f==null||f()},H=()=>{const ne=new Date().getTime()-k.current;I.current=I.current-ne,window.clearTimeout(P.current),d==null||d()};return Y.addEventListener(My,H),Y.addEventListener(jy,J),()=>{Y.removeEventListener(My,H),Y.removeEventListener(jy,J)}}},[S.viewport,N,d,f,oe]),E.useEffect(()=>{o&&!S.isClosePausedRef.current&&oe(N)},[o,N,S.isClosePausedRef,oe]),E.useEffect(()=>(V(),()=>U()),[V,U]);const fe=E.useMemo(()=>A?fC(A):null,[A]);return S.viewport?b.jsxs(b.Fragment,{children:[fe&&b.jsx(e2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:fe}),b.jsx(Xz,{scope:n,onClose:ue,children:ws.createPortal(b.jsx(n0.ItemSlot,{scope:n,children:b.jsx(Lz,{asChild:!0,onEscapeKeyDown:lt(u,()=>{S.isFocusedToastEscapeKeyDownRef.current||ue(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(tt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":S.swipeDirection,..._,ref:T,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:lt(e.onKeyDown,Y=>{Y.key==="Escape"&&(u==null||u(Y.nativeEvent),Y.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,ue()))}),onPointerDown:lt(e.onPointerDown,Y=>{Y.button===0&&(R.current={x:Y.clientX,y:Y.clientY})}),onPointerMove:lt(e.onPointerMove,Y=>{if(!R.current)return;const J=Y.clientX-R.current.x,H=Y.clientY-R.current.y,ne=!!D.current,ee=["left","right"].includes(S.swipeDirection),ve=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,j=ee?ve(0,J):0,W=ee?0:ve(0,H),F=Y.pointerType==="touch"?10:2,re={x:j,y:W},te={originalEvent:Y,delta:re};ne?(D.current=re,Xd(Wz,g,te,{discrete:!1})):tA(re,S.swipeDirection,F)?(D.current=re,Xd(Kz,m,te,{discrete:!1}),Y.target.setPointerCapture(Y.pointerId)):(Math.abs(J)>F||Math.abs(H)>F)&&(R.current=null)}),onPointerUp:lt(e.onPointerUp,Y=>{const J=D.current,H=Y.target;if(H.hasPointerCapture(Y.pointerId)&&H.releasePointerCapture(Y.pointerId),D.current=null,R.current=null,J){const ne=Y.currentTarget,ee={originalEvent:Y,delta:J};tA(J,S.swipeDirection,S.swipeThreshold)?Xd(Zz,v,ee,{discrete:!0}):Xd(Yz,y,ee,{discrete:!0}),ne.addEventListener("click",ve=>ve.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),e2=e=>{const{__scopeToast:t,children:n,...r}=e,a=kh(Dh,t),[o,l]=E.useState(!1),[u,d]=E.useState(!1);return r2(()=>l(!0)),E.useEffect(()=>{const f=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(f)},[]),u?null:b.jsx(Nh,{asChild:!0,children:b.jsx(Oh,{...r,children:o&&b.jsxs(b.Fragment,{children:[a.label," ",n]})})})},t2="ToastTitle",s0=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(tt.div,{...r,ref:t})});s0.displayName=t2;var n2="ToastDescription",o0=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(tt.div,{...r,ref:t})});o0.displayName=n2;var cC="ToastAction",l0=E.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(dC,{altText:n,asChild:!0,children:b.jsx(Ih,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${cC}\`. Expected non-empty \`string\`.`),null)});l0.displayName=cC;var uC="ToastClose",Ih=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=Qz(uC,n);return b.jsx(dC,{asChild:!0,children:b.jsx(tt.button,{type:"button",...r,ref:t,onClick:lt(e.onClick,a.onClose)})})});Ih.displayName=uC;var dC=E.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return b.jsx(tt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function fC(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),i2(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...fC(r))}}),t}function Xd(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?nC(a,o):a.dispatchEvent(o)}var tA=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),o=r>a;return t==="left"||t==="right"?o&&r>n:!o&&a>n};function r2(e=()=>{}){const t=Kn(e);yn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function i2(e){return e.nodeType===e.ELEMENT_NODE}function a2(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 Rg(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var s2=r0,hC=i0,mC=a0,pC=s0,gC=o0,o2=l0,yC=Ih;const l2=Object.freeze(Object.defineProperty({__proto__:null,Action:o2,Close:yC,Description:gC,Provider:s2,Root:mC,Title:pC,Toast:a0,ToastAction:l0,ToastClose:Ih,ToastDescription:o0,ToastProvider:r0,ToastTitle:s0,ToastViewport:i0,Viewport:hC,createToastScope:Gz},Symbol.toStringTag,{value:"Module"})),c2=l2,u2=({className:e,...t})=>b.jsx(hC,{className:Te("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}),d2=mr("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"}}),f2=({className:e,variant:t,...n})=>b.jsx(mC,{className:Te(d2({variant:t}),e),...n}),h2=({className:e,...t})=>b.jsx(yC,{className:Te("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(Ts,{className:"size-5"})}),m2=({className:e,...t})=>b.jsx(pC,{className:Te("text-sm font-semibold [&+div]:text-xs",e),...t}),p2=({className:e,...t})=>b.jsx(gC,{className:Te("text-sm opacity-90",e),...t}),g2=1,y2=15*60*1e3;let Ng=0;const v2=()=>(Ng=(Ng+1)%Number.MAX_SAFE_INTEGER,Ng.toString()),Og=new Map,nA=e=>{if(Og.has(e))return;const t=setTimeout(()=>{Og.delete(e),Sc({type:"REMOVE_TOAST",toastId:e})},y2);Og.set(e,t)},b2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,g2)};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?nA(n):e.toasts.forEach(r=>{nA(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)}}},_f=[];let xf={toasts:[]};const Sc=e=>{xf=b2(xf,e),_f.forEach(t=>{t(xf)})},_2=({...e})=>{const t=v2(),n=a=>Sc({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Sc({type:"DISMISS_TOAST",toastId:t});return Sc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}},vC=()=>{const[e,t]=E.useState(xf);return E.useEffect(()=>(_f.push(t),()=>{const n=_f.indexOf(t);n>-1&&_f.splice(n,1)}),[e]),{...e,toast:_2,dismiss:n=>Sc({type:"DISMISS_TOAST",toastId:n})}},Li=e=>{const t=Zr(),{csrfToken:n,oAuth2AccessToken:r}=yu(),a=r!=null&&r.accessToken?{Authorization:`Bearer ${r.accessToken}`}:void 0;return Eh({headers:a,body:n?{csrf_token:n}:void 0},t)};var x2={};const bC=e=>{const{toast:t}=vC();return{...e,onError:n=>{var a;let r;try{if(typeof n>"u")return;r=JSON.parse(n)}catch{r=n}[r].flatMap(o=>o).forEach(o=>t({title:(x2.NODE_ENV==="production"?o.title:o.code)??"Error",description:o.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)}}},E2=(e,{requireUser:t,requireProject:n,requireOrganization:r}={})=>{const a=Zr(),{csrfToken:o,oAuth2AccessToken:l,session:u}=yu({intlayerConfiguration:a}),d=(e==null?void 0:e.enable)??!0,f=u?u.user:l==null?void 0:l.user,m=u?u.organization:l==null?void 0:l.organization,g=u?u.project:l==null?void 0:l.project;return{...e,enable:d&&(t?!!f:!0)&&(n?!!g:!0)&&(r?!!m:!0)&&(!!o||!u&&!!l)}},Aa=(e,t,n,r)=>{const a=E2(n??{},r),o=bC(a);return gu(e,t,o)},S2=(e,t,n)=>{const r=bC({});return gu(e,t,r)},A2=e=>Aa("logout",Li().auth.logout,{invalidateQueries:["getSession"],...e}),w2=e=>Aa("getProjects",Li().project.getProjects,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),T2=e=>Aa("getDictionaries",Li().dictionary.getDictionaries,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0,requireProject:!0}),C2=e=>Aa("pushDictionaries",Li().dictionary.pushDictionaries,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),R2=e=>Aa("getTags",Li().tag.getTags,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),N2=e=>Aa("auditContentDeclaration",Li().ai.auditContentDeclarationMetadata,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),O2=e=>Aa("auditContentDeclarationField",Li().ai.auditContentDeclarationField,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),k2=e=>Aa("autocomplete",Li().ai.autocomplete,e),D2=e=>S2("writeDictionary",Li().editor.writeDictionary);var kg,rA;function I2(){if(rA)return kg;rA=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]"||o(w)}var r=typeof Symbol=="function"&&Symbol.for,a=r?Symbol.for("react.element"):60103;function o(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,R){return w.concat(T).map(function(D){return u(D,R)})}function f(w,T){if(!T.customMerge)return S;var R=T.customMerge(w);return typeof R=="function"?R:S}function m(w){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(w).filter(function(T){return Object.propertyIsEnumerable.call(w,T)}):[]}function g(w){return Object.keys(w).concat(m(w))}function y(w,T){try{return T in w}catch{return!1}}function v(w,T){return y(w,T)&&!(Object.hasOwnProperty.call(w,T)&&Object.propertyIsEnumerable.call(w,T))}function _(w,T,R){var D={};return R.isMergeableObject(w)&&g(w).forEach(function(N){D[N]=u(w[N],R)}),g(T).forEach(function(N){v(w,N)||(y(w,N)&&R.isMergeableObject(T[N])?D[N]=f(N,R)(w[N],T[N],R):D[N]=u(T[N],R))}),D}function S(w,T,R){R=R||{},R.arrayMerge=R.arrayMerge||d,R.isMergeableObject=R.isMergeableObject||e,R.cloneUnlessOtherwiseSpecified=u;var D=Array.isArray(T),N=Array.isArray(w),k=D===N;return k?D?R.arrayMerge(w,T,R):_(w,T,R):u(T,R)}S.all=function(T,R){if(!Array.isArray(T))throw new Error("first argument should be an array");return T.reduce(function(D,N){return S(D,N,R)},{})};var A=S;return kg=A,kg}var L2=I2();const M2=xh(L2),j2=()=>{const{session:e,revalidateSession:t,setSession:n}=yu(),{logout:r}=A2(),a=e!=null&&e.user?"authenticated":"unauthenticated",o=a==="authenticated",l=a==="unauthenticated",u=e==null?void 0:e.user;return{isAuthenticated:o,isUnauthenticated:l,user:u,revalidateSession:t,logout:async()=>{n(null),await r()}}};var _u=e=>e.type==="checkbox",ls=e=>e instanceof Date,En=e=>e==null;const _C=e=>typeof e=="object";var Bt=e=>!En(e)&&!Array.isArray(e)&&_C(e)&&!ls(e),xC=e=>Bt(e)&&e.target?_u(e.target)?e.target.checked:e.target.value:e,P2=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,EC=(e,t)=>e.has(P2(t)),V2=e=>{const t=e.constructor&&e.constructor.prototype;return Bt(t)&&t.hasOwnProperty("isPrototypeOf")},c0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Nn(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(!(c0&&(e instanceof Blob||r))&&(n||Bt(e)))if(t=n?[]:{},!n&&!V2(e))t=e;else for(const a in e)e.hasOwnProperty(a)&&(t[a]=Nn(e[a]));else return e;return t}var Lh=e=>Array.isArray(e)?e.filter(Boolean):[],Vt=e=>e===void 0,xe=(e,t,n)=>{if(!t||!Bt(e))return n;const r=Lh(t.split(/[,[\].]+?/)).reduce((a,o)=>En(a)?a:a[o],e);return Vt(r)||r===e?Vt(e[t])?n:e[t]:r},cr=e=>typeof e=="boolean",u0=e=>/^\w*$/.test(e),SC=e=>Lh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ht=(e,t,n)=>{let r=-1;const a=u0(t)?[t]:SC(t),o=a.length,l=o-1;for(;++r<o;){const u=a[r];let d=n;if(r!==l){const f=e[u];d=Bt(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}return e};const Vf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Er={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},vi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},AC=$e.createContext(null),wa=()=>$e.useContext(AC),B2=e=>{const{children:t,...n}=e;return $e.createElement(AC.Provider,{value:n},t)};var wC=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(a,o,{get:()=>{const l=o;return t._proxyFormState[l]!==Er.all&&(t._proxyFormState[l]=!r||Er.all),n&&(n[l]=!0),e[l]}});return a},On=e=>Bt(e)&&!Object.keys(e).length,TC=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return On(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(l=>t[l]===(!r||Er.all))},Ac=e=>Array.isArray(e)?e:[e],CC=(e,t,n)=>!e||!t||e===t||Ac(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function d0(e){const t=$e.useRef(e);t.current=e,$e.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function z2(e){const t=wa(),{control:n=t.control,disabled:r,name:a,exact:o}=e||{},[l,u]=$e.useState(n._formState),d=$e.useRef(!0),f=$e.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),m=$e.useRef(a);return m.current=a,d0({disabled:r,next:g=>d.current&&CC(m.current,g.name,o)&&TC(g,f.current,n._updateFormState)&&u({...n._formState,...g}),subject:n._subjects.state}),$e.useEffect(()=>(d.current=!0,f.current.isValid&&n._updateValid(!0),()=>{d.current=!1}),[n]),$e.useMemo(()=>wC(l,n,f.current,!1),[l,n])}var Br=e=>typeof e=="string",RC=(e,t,n,r,a)=>Br(e)?(r&&t.watch.add(e),xe(n,e,a)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),xe(n,o))):(r&&(t.watchAll=!0),n);function U2(e){const t=wa(),{control:n=t.control,name:r,defaultValue:a,disabled:o,exact:l}=e||{},u=$e.useRef(r);u.current=r,d0({disabled:o,subject:n._subjects.values,next:m=>{CC(u.current,m.name,l)&&f(Nn(RC(u.current,n._names,m.values||n._formValues,!1,a)))}});const[d,f]=$e.useState(n._getWatch(r,a));return $e.useEffect(()=>n._removeUnmounted()),d}function H2(e){const t=wa(),{name:n,disabled:r,control:a=t.control,shouldUnregister:o}=e,l=EC(a._names.array,n),u=U2({control:a,name:n,defaultValue:xe(a._formValues,n,xe(a._defaultValues,n,e.defaultValue)),exact:!0}),d=z2({control:a,name:n,exact:!0}),f=$e.useRef(a.register(n,{...e.rules,value:u,...cr(e.disabled)?{disabled:e.disabled}:{}})),m=$e.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!xe(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!xe(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!xe(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!xe(d.validatingFields,n)},error:{enumerable:!0,get:()=>xe(d.errors,n)}}),[d,n]),g=$e.useMemo(()=>({name:n,value:u,...cr(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:y=>f.current.onChange({target:{value:xC(y),name:n},type:Vf.CHANGE}),onBlur:()=>f.current.onBlur({target:{value:xe(a._formValues,n),name:n},type:Vf.BLUR}),ref:y=>{const v=xe(a._fields,n);v&&y&&(v._f.ref={focus:()=>y.focus(),select:()=>y.select(),setCustomValidity:_=>y.setCustomValidity(_),reportValidity:()=>y.reportValidity()})}}),[n,a._formValues,r,d.disabled,u,a._fields]);return $e.useEffect(()=>{const y=a._options.shouldUnregister||o,v=(_,S)=>{const A=xe(a._fields,_);A&&A._f&&(A._f.mount=S)};if(v(n,!0),y){const _=Nn(xe(a._options.defaultValues,n));ht(a._defaultValues,n,_),Vt(xe(a._formValues,n))&&ht(a._formValues,n,_)}return!l&&a.register(n),()=>{(l?y&&!a._state.action:y)?a.unregister(n):v(n,!1)}},[n,a,l,o]),$e.useEffect(()=>{a._updateDisabledField({disabled:r,fields:a._fields,name:n})},[r,n,a]),$e.useMemo(()=>({field:g,formState:d,fieldState:m}),[g,d,m])}const F2=e=>e.render(H2(e));var NC=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},iA=e=>({isOnSubmit:!e||e===Er.onSubmit,isOnBlur:e===Er.onBlur,isOnChange:e===Er.onChange,isOnAll:e===Er.all,isOnTouch:e===Er.onTouched}),aA=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const wc=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const o=xe(e,a);if(o){const{_f:l,...u}=o;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(wc(u,t))break}else if(Bt(u)&&wc(u,t))break}}};var G2=(e,t,n)=>{const r=Ac(xe(e,n));return ht(r,"root",t[n]),ht(e,n,r),e},f0=e=>e.type==="file",Pr=e=>typeof e=="function",Bf=e=>{if(!c0)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ef=e=>Br(e),h0=e=>e.type==="radio",zf=e=>e instanceof RegExp;const sA={value:!1,isValid:!1},oA={value:!0,isValid:!0};var OC=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&&!Vt(e[0].attributes.value)?Vt(e[0].value)||e[0].value===""?oA:{value:e[0].value,isValid:!0}:oA:sA}return sA};const lA={isValid:!1,value:null};var kC=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,lA):lA;function cA(e,t,n="validate"){if(Ef(e)||Array.isArray(e)&&e.every(Ef)||cr(e)&&!e)return{type:n,message:Ef(e)?e:"",ref:t}}var mo=e=>Bt(e)&&!zf(e)?e:{value:e,message:""},uA=async(e,t,n,r,a,o)=>{const{ref:l,refs:u,required:d,maxLength:f,minLength:m,min:g,max:y,pattern:v,validate:_,name:S,valueAsNumber:A,mount:w}=e._f,T=xe(n,S);if(!w||t.has(S))return{};const R=u?u[0]:l,D=oe=>{a&&R.reportValidity&&(R.setCustomValidity(cr(oe)?"":oe||""),R.reportValidity())},N={},k=h0(l),I=_u(l),P=k||I,V=(A||f0(l))&&Vt(l.value)&&Vt(T)||Bf(l)&&l.value===""||T===""||Array.isArray(T)&&!T.length,U=NC.bind(null,S,r,N),ue=(oe,fe,Y,J=vi.maxLength,H=vi.minLength)=>{const ne=oe?fe:Y;N[S]={type:oe?J:H,message:ne,ref:l,...U(oe?J:H,ne)}};if(o?!Array.isArray(T)||!T.length:d&&(!P&&(V||En(T))||cr(T)&&!T||I&&!OC(u).isValid||k&&!kC(u).isValid)){const{value:oe,message:fe}=Ef(d)?{value:!!d,message:d}:mo(d);if(oe&&(N[S]={type:vi.required,message:fe,ref:R,...U(vi.required,fe)},!r))return D(fe),N}if(!V&&(!En(g)||!En(y))){let oe,fe;const Y=mo(y),J=mo(g);if(!En(T)&&!isNaN(T)){const H=l.valueAsNumber||T&&+T;En(Y.value)||(oe=H>Y.value),En(J.value)||(fe=H<J.value)}else{const H=l.valueAsDate||new Date(T),ne=j=>new Date(new Date().toDateString()+" "+j),ee=l.type=="time",ve=l.type=="week";Br(Y.value)&&T&&(oe=ee?ne(T)>ne(Y.value):ve?T>Y.value:H>new Date(Y.value)),Br(J.value)&&T&&(fe=ee?ne(T)<ne(J.value):ve?T<J.value:H<new Date(J.value))}if((oe||fe)&&(ue(!!oe,Y.message,J.message,vi.max,vi.min),!r))return D(N[S].message),N}if((f||m)&&!V&&(Br(T)||o&&Array.isArray(T))){const oe=mo(f),fe=mo(m),Y=!En(oe.value)&&T.length>+oe.value,J=!En(fe.value)&&T.length<+fe.value;if((Y||J)&&(ue(Y,oe.message,fe.message),!r))return D(N[S].message),N}if(v&&!V&&Br(T)){const{value:oe,message:fe}=mo(v);if(zf(oe)&&!T.match(oe)&&(N[S]={type:vi.pattern,message:fe,ref:l,...U(vi.pattern,fe)},!r))return D(fe),N}if(_){if(Pr(_)){const oe=await _(T,n),fe=cA(oe,R);if(fe&&(N[S]={...fe,...U(vi.validate,fe.message)},!r))return D(fe.message),N}else if(Bt(_)){let oe={};for(const fe in _){if(!On(oe)&&!r)break;const Y=cA(await _[fe](T,n),R,fe);Y&&(oe={...Y,...U(fe,Y.message)},D(Y.message),r&&(N[S]=oe))}if(!On(oe)&&(N[S]={ref:R,...oe},!r))return N}}return D(!0),N};function $2(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Vt(e)?r++:e[t[r++]];return e}function q2(e){for(const t in e)if(e.hasOwnProperty(t)&&!Vt(e[t]))return!1;return!0}function qt(e,t){const n=Array.isArray(t)?t:u0(t)?[t]:SC(t),r=n.length===1?e:$2(e,n),a=n.length-1,o=n[a];return r&&delete r[o],a!==0&&(Bt(r)&&On(r)||Array.isArray(r)&&q2(r))&&qt(e,n.slice(0,-1)),e}var Dg=()=>{let e=[];return{get observers(){return e},next:a=>{for(const o of e)o.next&&o.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(o=>o!==a)}}),unsubscribe:()=>{e=[]}}},Vy=e=>En(e)||!_C(e);function da(e,t){if(Vy(e)||Vy(t))return e===t;if(ls(e)&&ls(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 o=e[a];if(!r.includes(a))return!1;if(a!=="ref"){const l=t[a];if(ls(o)&&ls(l)||Bt(o)&&Bt(l)||Array.isArray(o)&&Array.isArray(l)?!da(o,l):o!==l)return!1}}return!0}var DC=e=>e.type==="select-multiple",K2=e=>h0(e)||_u(e),Ig=e=>Bf(e)&&e.isConnected,IC=e=>{for(const t in e)if(Pr(e[t]))return!0;return!1};function Uf(e,t={}){const n=Array.isArray(e);if(Bt(e)||n)for(const r in e)Array.isArray(e[r])||Bt(e[r])&&!IC(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Uf(e[r],t[r])):En(e[r])||(t[r]=!0);return t}function LC(e,t,n){const r=Array.isArray(e);if(Bt(e)||r)for(const a in e)Array.isArray(e[a])||Bt(e[a])&&!IC(e[a])?Vt(t)||Vy(n[a])?n[a]=Array.isArray(e[a])?Uf(e[a],[]):{...Uf(e[a])}:LC(e[a],En(t)?{}:t[a],n[a]):n[a]=!da(e[a],t[a]);return n}var cc=(e,t)=>LC(e,t,Uf(t)),MC=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Vt(e)?e:t?e===""?NaN:e&&+e:n&&Br(e)?new Date(e):r?r(e):e;function Lg(e){const t=e.ref;return f0(t)?t.files:h0(t)?kC(e.refs).value:DC(t)?[...t.selectedOptions].map(({value:n})=>n):_u(t)?OC(e.refs).value:MC(Vt(t.value)?e.ref.value:t.value,e)}var W2=(e,t,n,r)=>{const a={};for(const o of e){const l=xe(t,o);l&&ht(a,o,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},uc=e=>Vt(e)?e:zf(e)?e.source:Bt(e)?zf(e.value)?e.value.source:e.value:e;const dA="AsyncFunction";var Y2=e=>!!e&&!!e.validate&&!!(Pr(e.validate)&&e.validate.constructor.name===dA||Bt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===dA)),Z2=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function fA(e,t,n){const r=xe(e,n);if(r||u0(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const o=a.join("."),l=xe(t,o),u=xe(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(u&&u.type)return{name:o,error:u};a.pop()}return{name:n}}var X2=(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,Q2=(e,t)=>!Lh(xe(e,t)).length&&qt(e,t);const J2={mode:Er.onSubmit,reValidateMode:Er.onChange,shouldFocusError:!0};function eU(e={}){let t={...J2,...e},n={submitCount:0,isDirty:!1,isLoading:Pr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},a=Bt(t.defaultValues)||Bt(t.values)?Nn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Nn(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,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:Dg(),array:Dg(),state:Dg()},y=iA(t.mode),v=iA(t.reValidateMode),_=t.criteriaMode===Er.all,S=z=>X=>{clearTimeout(f),f=setTimeout(z,X)},A=async z=>{if(!t.disabled&&(m.isValid||z)){const X=t.resolver?On((await P()).errors):await U(r,!0);X!==n.isValid&&g.state.next({isValid:X})}},w=(z,X)=>{!t.disabled&&(m.isValidating||m.validatingFields)&&((z||Array.from(u.mount)).forEach(ie=>{ie&&(X?ht(n.validatingFields,ie,X):qt(n.validatingFields,ie))}),g.state.next({validatingFields:n.validatingFields,isValidating:!On(n.validatingFields)}))},T=(z,X=[],ie,Ae,Ee=!0,_e=!0)=>{if(Ae&&ie&&!t.disabled){if(l.action=!0,_e&&Array.isArray(xe(r,z))){const ke=ie(xe(r,z),Ae.argA,Ae.argB);Ee&&ht(r,z,ke)}if(_e&&Array.isArray(xe(n.errors,z))){const ke=ie(xe(n.errors,z),Ae.argA,Ae.argB);Ee&&ht(n.errors,z,ke),Q2(n.errors,z)}if(m.touchedFields&&_e&&Array.isArray(xe(n.touchedFields,z))){const ke=ie(xe(n.touchedFields,z),Ae.argA,Ae.argB);Ee&&ht(n.touchedFields,z,ke)}m.dirtyFields&&(n.dirtyFields=cc(a,o)),g.state.next({name:z,isDirty:oe(z,X),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ht(o,z,X)},R=(z,X)=>{ht(n.errors,z,X),g.state.next({errors:n.errors})},D=z=>{n.errors=z,g.state.next({errors:n.errors,isValid:!1})},N=(z,X,ie,Ae)=>{const Ee=xe(r,z);if(Ee){const _e=xe(o,z,Vt(ie)?xe(a,z):ie);Vt(_e)||Ae&&Ae.defaultChecked||X?ht(o,z,X?_e:Lg(Ee._f)):J(z,_e),l.mount&&A()}},k=(z,X,ie,Ae,Ee)=>{let _e=!1,ke=!1;const Xe={name:z};if(!t.disabled){const Lt=!!(xe(r,z)&&xe(r,z)._f&&xe(r,z)._f.disabled);if(!ie||Ae){m.isDirty&&(ke=n.isDirty,n.isDirty=Xe.isDirty=oe(),_e=ke!==Xe.isDirty);const Mt=Lt||da(xe(a,z),X);ke=!!(!Lt&&xe(n.dirtyFields,z)),Mt||Lt?qt(n.dirtyFields,z):ht(n.dirtyFields,z,!0),Xe.dirtyFields=n.dirtyFields,_e=_e||m.dirtyFields&&ke!==!Mt}if(ie){const Mt=xe(n.touchedFields,z);Mt||(ht(n.touchedFields,z,ie),Xe.touchedFields=n.touchedFields,_e=_e||m.touchedFields&&Mt!==ie)}_e&&Ee&&g.state.next(Xe)}return _e?Xe:{}},I=(z,X,ie,Ae)=>{const Ee=xe(n.errors,z),_e=m.isValid&&cr(X)&&n.isValid!==X;if(t.delayError&&ie?(d=S(()=>R(z,ie)),d(t.delayError)):(clearTimeout(f),d=null,ie?ht(n.errors,z,ie):qt(n.errors,z)),(ie?!da(Ee,ie):Ee)||!On(Ae)||_e){const ke={...Ae,..._e&&cr(X)?{isValid:X}:{},errors:n.errors,name:z};n={...n,...ke},g.state.next(ke)}},P=async z=>{w(z,!0);const X=await t.resolver(o,t.context,W2(z||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(z),X},V=async z=>{const{errors:X}=await P(z);if(z)for(const ie of z){const Ae=xe(X,ie);Ae?ht(n.errors,ie,Ae):qt(n.errors,ie)}else n.errors=X;return X},U=async(z,X,ie={valid:!0})=>{for(const Ae in z){const Ee=z[Ae];if(Ee){const{_f:_e,...ke}=Ee;if(_e){const Xe=u.array.has(_e.name),Lt=Ee._f&&Y2(Ee._f);Lt&&m.validatingFields&&w([Ae],!0);const Mt=await uA(Ee,u.disabled,o,_,t.shouldUseNativeValidation&&!X,Xe);if(Lt&&m.validatingFields&&w([Ae]),Mt[_e.name]&&(ie.valid=!1,X))break;!X&&(xe(Mt,_e.name)?Xe?G2(n.errors,Mt,_e.name):ht(n.errors,_e.name,Mt[_e.name]):qt(n.errors,_e.name))}!On(ke)&&await U(ke,X,ie)}}return ie.valid},ue=()=>{for(const z of u.unMount){const X=xe(r,z);X&&(X._f.refs?X._f.refs.every(ie=>!Ig(ie)):!Ig(X._f.ref))&&ye(z)}u.unMount=new Set},oe=(z,X)=>!t.disabled&&(z&&X&&ht(o,z,X),!da(W(),a)),fe=(z,X,ie)=>RC(z,u,{...l.mount?o:Vt(X)?a:Br(z)?{[z]:X}:X},ie,X),Y=z=>Lh(xe(l.mount?o:a,z,t.shouldUnregister?xe(a,z,[]):[])),J=(z,X,ie={})=>{const Ae=xe(r,z);let Ee=X;if(Ae){const _e=Ae._f;_e&&(!_e.disabled&&ht(o,z,MC(X,_e)),Ee=Bf(_e.ref)&&En(X)?"":X,DC(_e.ref)?[..._e.ref.options].forEach(ke=>ke.selected=Ee.includes(ke.value)):_e.refs?_u(_e.ref)?_e.refs.length>1?_e.refs.forEach(ke=>(!ke.defaultChecked||!ke.disabled)&&(ke.checked=Array.isArray(Ee)?!!Ee.find(Xe=>Xe===ke.value):Ee===ke.value)):_e.refs[0]&&(_e.refs[0].checked=!!Ee):_e.refs.forEach(ke=>ke.checked=ke.value===Ee):f0(_e.ref)?_e.ref.value="":(_e.ref.value=Ee,_e.ref.type||g.values.next({name:z,values:{...o}})))}(ie.shouldDirty||ie.shouldTouch)&&k(z,Ee,ie.shouldTouch,ie.shouldDirty,!0),ie.shouldValidate&&j(z)},H=(z,X,ie)=>{for(const Ae in X){const Ee=X[Ae],_e=`${z}.${Ae}`,ke=xe(r,_e);(u.array.has(z)||Bt(Ee)||ke&&!ke._f)&&!ls(Ee)?H(_e,Ee,ie):J(_e,Ee,ie)}},ne=(z,X,ie={})=>{const Ae=xe(r,z),Ee=u.array.has(z),_e=Nn(X);ht(o,z,_e),Ee?(g.array.next({name:z,values:{...o}}),(m.isDirty||m.dirtyFields)&&ie.shouldDirty&&g.state.next({name:z,dirtyFields:cc(a,o),isDirty:oe(z,_e)})):Ae&&!Ae._f&&!En(_e)?H(z,_e,ie):J(z,_e,ie),aA(z,u)&&g.state.next({...n}),g.values.next({name:l.mount?z:void 0,values:{...o}})},ee=async z=>{l.mount=!0;const X=z.target;let ie=X.name,Ae=!0;const Ee=xe(r,ie),_e=()=>X.type?Lg(Ee._f):xC(z),ke=Xe=>{Ae=Number.isNaN(Xe)||ls(Xe)&&isNaN(Xe.getTime())||da(Xe,xe(o,ie,Xe))};if(Ee){let Xe,Lt;const Mt=_e(),In=z.type===Vf.BLUR||z.type===Vf.FOCUS_OUT,am=!Z2(Ee._f)&&!t.resolver&&!xe(n.errors,ie)&&!Ee._f.deps||X2(In,xe(n.touchedFields,ie),n.isSubmitted,v,y),Os=aA(ie,u,In);ht(o,ie,Mt),In?(Ee._f.onBlur&&Ee._f.onBlur(z),d&&d(0)):Ee._f.onChange&&Ee._f.onChange(z);const ll=k(ie,Mt,In,!1),sm=!On(ll)||Os;if(!In&&g.values.next({name:ie,type:z.type,values:{...o}}),am)return m.isValid&&(t.mode==="onBlur"&&In?A():In||A()),sm&&g.state.next({name:ie,...Os?{}:ll});if(!In&&Os&&g.state.next({...n}),t.resolver){const{errors:Mi}=await P([ie]);if(ke(Mt),Ae){const bn=fA(n.errors,r,ie),Lu=fA(Mi,r,bn.name||ie);Xe=Lu.error,ie=Lu.name,Lt=On(Mi)}}else w([ie],!0),Xe=(await uA(Ee,u.disabled,o,_,t.shouldUseNativeValidation))[ie],w([ie]),ke(Mt),Ae&&(Xe?Lt=!1:m.isValid&&(Lt=await U(r,!0)));Ae&&(Ee._f.deps&&j(Ee._f.deps),I(ie,Lt,Xe,ll))}},ve=(z,X)=>{if(xe(n.errors,X)&&z.focus)return z.focus(),1},j=async(z,X={})=>{let ie,Ae;const Ee=Ac(z);if(t.resolver){const _e=await V(Vt(z)?z:Ee);ie=On(_e),Ae=z?!Ee.some(ke=>xe(_e,ke)):ie}else z?(Ae=(await Promise.all(Ee.map(async _e=>{const ke=xe(r,_e);return await U(ke&&ke._f?{[_e]:ke}:ke)}))).every(Boolean),!(!Ae&&!n.isValid)&&A()):Ae=ie=await U(r);return g.state.next({...!Br(z)||m.isValid&&ie!==n.isValid?{}:{name:z},...t.resolver||!z?{isValid:ie}:{},errors:n.errors}),X.shouldFocus&&!Ae&&wc(r,ve,z?Ee:u.mount),Ae},W=z=>{const X={...l.mount?o:a};return Vt(z)?X:Br(z)?xe(X,z):z.map(ie=>xe(X,ie))},F=(z,X)=>({invalid:!!xe((X||n).errors,z),isDirty:!!xe((X||n).dirtyFields,z),error:xe((X||n).errors,z),isValidating:!!xe(n.validatingFields,z),isTouched:!!xe((X||n).touchedFields,z)}),re=z=>{z&&Ac(z).forEach(X=>qt(n.errors,X)),g.state.next({errors:z?n.errors:{}})},te=(z,X,ie)=>{const Ae=(xe(r,z,{_f:{}})._f||{}).ref,Ee=xe(n.errors,z)||{},{ref:_e,message:ke,type:Xe,...Lt}=Ee;ht(n.errors,z,{...Lt,...X,ref:Ae}),g.state.next({name:z,errors:n.errors,isValid:!1}),ie&&ie.shouldFocus&&Ae&&Ae.focus&&Ae.focus()},de=(z,X)=>Pr(z)?g.values.subscribe({next:ie=>z(fe(void 0,X),ie)}):fe(z,X,!0),ye=(z,X={})=>{for(const ie of z?Ac(z):u.mount)u.mount.delete(ie),u.array.delete(ie),X.keepValue||(qt(r,ie),qt(o,ie)),!X.keepError&&qt(n.errors,ie),!X.keepDirty&&qt(n.dirtyFields,ie),!X.keepTouched&&qt(n.touchedFields,ie),!X.keepIsValidating&&qt(n.validatingFields,ie),!t.shouldUnregister&&!X.keepDefaultValue&&qt(a,ie);g.values.next({values:{...o}}),g.state.next({...n,...X.keepDirty?{isDirty:oe()}:{}}),!X.keepIsValid&&A()},pe=({disabled:z,name:X,field:ie,fields:Ae})=>{(cr(z)&&l.mount||z||u.disabled.has(X))&&(z?u.disabled.add(X):u.disabled.delete(X),k(X,Lg(ie?ie._f:xe(Ae,X)._f),!1,!1,!0))},we=(z,X={})=>{let ie=xe(r,z);const Ae=cr(X.disabled)||cr(t.disabled);return ht(r,z,{...ie||{},_f:{...ie&&ie._f?ie._f:{ref:{name:z}},name:z,mount:!0,...X}}),u.mount.add(z),ie?pe({field:ie,disabled:cr(X.disabled)?X.disabled:t.disabled,name:z}):N(z,!0,X.value),{...Ae?{disabled:X.disabled||t.disabled}:{},...t.progressive?{required:!!X.required,min:uc(X.min),max:uc(X.max),minLength:uc(X.minLength),maxLength:uc(X.maxLength),pattern:uc(X.pattern)}:{},name:z,onChange:ee,onBlur:ee,ref:Ee=>{if(Ee){we(z,X),ie=xe(r,z);const _e=Vt(Ee.value)&&Ee.querySelectorAll&&Ee.querySelectorAll("input,select,textarea")[0]||Ee,ke=K2(_e),Xe=ie._f.refs||[];if(ke?Xe.find(Lt=>Lt===_e):_e===ie._f.ref)return;ht(r,z,{_f:{...ie._f,...ke?{refs:[...Xe.filter(Ig),_e,...Array.isArray(xe(a,z))?[{}]:[]],ref:{type:_e.type,name:z}}:{ref:_e}}}),N(z,!1,void 0,_e)}else ie=xe(r,z,{}),ie._f&&(ie._f.mount=!1),(t.shouldUnregister||X.shouldUnregister)&&!(EC(u.array,z)&&l.action)&&u.unMount.add(z)}}},He=()=>t.shouldFocusError&&wc(r,ve,u.mount),Me=z=>{cr(z)&&(g.state.next({disabled:z}),wc(r,(X,ie)=>{const Ae=xe(r,ie);Ae&&(X.disabled=Ae._f.disabled||z,Array.isArray(Ae._f.refs)&&Ae._f.refs.forEach(Ee=>{Ee.disabled=Ae._f.disabled||z}))},0,!1))},Ke=(z,X)=>async ie=>{let Ae;ie&&(ie.preventDefault&&ie.preventDefault(),ie.persist&&ie.persist());let Ee=Nn(o);if(u.disabled.size)for(const _e of u.disabled)ht(Ee,_e,void 0);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:_e,values:ke}=await P();n.errors=_e,Ee=ke}else await U(r);if(qt(n.errors,"root"),On(n.errors)){g.state.next({errors:{}});try{await z(Ee,ie)}catch(_e){Ae=_e}}else X&&await X({...n.errors},ie),He(),setTimeout(He);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:On(n.errors)&&!Ae,submitCount:n.submitCount+1,errors:n.errors}),Ae)throw Ae},at=(z,X={})=>{xe(r,z)&&(Vt(X.defaultValue)?ne(z,Nn(xe(a,z))):(ne(z,X.defaultValue),ht(a,z,Nn(X.defaultValue))),X.keepTouched||qt(n.touchedFields,z),X.keepDirty||(qt(n.dirtyFields,z),n.isDirty=X.defaultValue?oe(z,Nn(xe(a,z))):oe()),X.keepError||(qt(n.errors,z),m.isValid&&A()),g.state.next({...n}))},Et=(z,X={})=>{const ie=z?Nn(z):a,Ae=Nn(ie),Ee=On(z),_e=Ee?a:Ae;if(X.keepDefaultValues||(a=ie),!X.keepValues){if(X.keepDirtyValues){const ke=new Set([...u.mount,...Object.keys(cc(a,o))]);for(const Xe of Array.from(ke))xe(n.dirtyFields,Xe)?ht(_e,Xe,xe(o,Xe)):ne(Xe,xe(_e,Xe))}else{if(c0&&Vt(z))for(const ke of u.mount){const Xe=xe(r,ke);if(Xe&&Xe._f){const Lt=Array.isArray(Xe._f.refs)?Xe._f.refs[0]:Xe._f.ref;if(Bf(Lt)){const Mt=Lt.closest("form");if(Mt){Mt.reset();break}}}}r={}}o=t.shouldUnregister?X.keepDefaultValues?Nn(a):{}:Nn(_e),g.array.next({values:{..._e}}),g.values.next({values:{..._e}})}u={mount:X.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!m.isValid||!!X.keepIsValid||!!X.keepDirtyValues,l.watch=!!t.shouldUnregister,g.state.next({submitCount:X.keepSubmitCount?n.submitCount:0,isDirty:Ee?!1:X.keepDirty?n.isDirty:!!(X.keepDefaultValues&&!da(z,a)),isSubmitted:X.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ee?{}:X.keepDirtyValues?X.keepDefaultValues&&o?cc(a,o):n.dirtyFields:X.keepDefaultValues&&z?cc(a,z):X.keepDirty?n.dirtyFields:{},touchedFields:X.keepTouched?n.touchedFields:{},errors:X.keepErrors?n.errors:{},isSubmitSuccessful:X.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Yt=(z,X)=>Et(Pr(z)?z(o):z,X);return{control:{register:we,unregister:ye,getFieldState:F,handleSubmit:Ke,setError:te,_executeSchema:P,_getWatch:fe,_getDirty:oe,_updateValid:A,_removeUnmounted:ue,_updateFieldArray:T,_updateDisabledField:pe,_getFieldArray:Y,_reset:Et,_resetDefaultValues:()=>Pr(t.defaultValues)&&t.defaultValues().then(z=>{Yt(z,t.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:z=>{n={...n,...z}},_disableForm:Me,_subjects:g,_proxyFormState:m,_setErrors:D,get _fields(){return r},get _formValues(){return o},get _state(){return l},set _state(z){l=z},get _defaultValues(){return a},get _names(){return u},set _names(z){u=z},get _formState(){return n},set _formState(z){n=z},get _options(){return t},set _options(z){t={...t,...z}}},trigger:j,register:we,handleSubmit:Ke,watch:de,setValue:ne,getValues:W,reset:Yt,resetField:at,clearErrors:re,unregister:ye,setError:te,setFocus:(z,X={})=>{const ie=xe(r,z),Ae=ie&&ie._f;if(Ae){const Ee=Ae.refs?Ae.refs[0]:Ae.ref;Ee.focus&&(Ee.focus(),X.shouldSelect&&Pr(Ee.select)&&Ee.select())}},getFieldState:F}}function tU(e={}){const t=$e.useRef(void 0),n=$e.useRef(void 0),[r,a]=$e.useState({isDirty:!1,isValidating:!1,isLoading:Pr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Pr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...eU(e),formState:r});const o=t.current.control;return o._options=e,d0({subject:o._subjects.state,next:l=>{TC(l,o._proxyFormState,o._updateFormState,!0)&&a({...o._formState})}}),$e.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),$e.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==r.isDirty&&o._subjects.state.next({isDirty:l})}},[o,r.isDirty]),$e.useEffect(()=>{e.values&&!da(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,a(l=>({...l}))):o._resetDefaultValues()},[e.values,o]),$e.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),$e.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),$e.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=wC(r,o),t.current}const hA=(e,t,n)=>{if(e&&"reportValidity"in e){const r=xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},jC=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?hA(r.ref,n,e):r.refs&&r.refs.forEach(a=>hA(a,n,e))}},nU=(e,t)=>{t.shouldUseNativeValidation&&jC(e,t);const n={};for(const r in e){const a=xe(t.fields,r),o=Object.assign(e[r]||{},{ref:a&&a.ref});if(rU(t.names||Object.keys(e),r)){const l=Object.assign({},xe(n,r));ht(l,"root",o),ht(n,r,l)}else ht(n,r,o)}return n},rU=(e,t)=>e.some(n=>n.startsWith(t+"."));var iU=function(e,t){for(var n={};e.length;){var r=e[0],a=r.code,o=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:o,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(g){return e.push(g)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=NC(l,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n},aU=function(e,t,n){return n===void 0&&(n={}),function(r,a,o){try{return Promise.resolve(function(l,u){try{var d=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(f){return o.shouldUseNativeValidation&&jC({},o),{errors:{},values:n.raw?r:f}})}catch(f){return u(f)}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:nU(iU(l.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}}};const Mg=async e=>e&&typeof e.then=="function"?await e:e,sU=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:a,children:o,autoComplete:l,...u})=>{const d=async f=>{const m=(e==null?void 0:e.safeParse(f))??{success:!0,data:void 0};await Mg(t==null?void 0:t(f)),m.success?await Mg(n==null?void 0:n(m.data)):await Mg(r==null?void 0:r(new Error(m.error.errors.map(g=>g.message).join(", "))))};return b.jsx(B2,{...u,children:b.jsx("form",{className:Te("flex size-full flex-col gap-y-6",a),onSubmit:u.handleSubmit(d),autoComplete:l?"on":"off",children:o})})},oU=(e,t)=>{const n=tU({resolver:aU(e),...t}),r=n.formState.isSubmitting,a=n.formState.isSubmitted,o=n.formState.isLoading,l=n.formState.isValid;return{form:n,isSubmitting:r,isSubmitted:a,isLoading:o,isValid:l}},lU=e=>{const t=E.useId(),n=E.useMemo(()=>({id:t}),[t]);return b.jsx(PC,{value:n,children:b.jsx("div",{className:"flex flex-col gap-2 p-2",...e})})},PC=E.createContext({}),VC=E.createContext({}),cU=({...e})=>{const t=E.useMemo(()=>({name:e.name}),[e.name]);return b.jsx(VC,{value:t,children:b.jsx(F2,{...e})})},Ta=()=>{const e=E.useContext(VC),t=E.useContext(PC),{getFieldState:n,formState:r}=wa(),a=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...a}},BC=mr("",{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"}}),Jo=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...a})=>b.jsx("input",{className:BC({variant:t,size:n,validationStyleEnabled:e?"enabled":"disabled",className:r}),...a}),uU=mr("",{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"}}),dU=({validationStyleEnabled:e=!1,label:t,size:n,color:r,variant:a,className:o,...l})=>{const u=E.useId();return b.jsxs(b.Fragment,{children:[b.jsx("input",{type:"checkbox",className:uU({variant:a,size:n,color:r,validationStyleEnabled:e?"enabled":"disabled",className:o}),id:u,...l}),b.jsx("label",{htmlFor:u,children:t})]})},fU=e=>{const[t,n]=E.useState(!1),r=o=>{o.preventDefault(),o.stopPropagation(),n(l=>!l)},a=t?$V:FV;return b.jsxs("div",{className:"relative",children:[b.jsx(Jo,{...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})})]})},zC=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>b.jsx("textarea",{className:Te("resize-none",BC({variant:t,validationStyleEnabled:n?"enabled":"disabled",className:e})),...r}),UC=({value:e="",onCancel:t,onSave:n,onClick:r,children:a,isDisabled:o,...l})=>{const[u,d]=E.useState(!1),f=E.useRef(null),m=_=>{_.stopPropagation(),d(!1),n()},g=_=>{_.stopPropagation(),d(!1),t()},y=!e||e===""?"-":e,v=E.useCallback(_=>{const S=window.getSelection();S&&S.toString().trim()!==""||f.current&&!f.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:f,...l,children:[b.jsxs("div",{className:Te("flex flex-1 gap-2",u?"display":"hidden"),children:[a,b.jsx(gt,{label:"Save",variant:"hoverable",size:"icon-sm",color:"text",Icon:Zo,onClick:m,disabled:o,className:"!text-current"}),b.jsx(gt,{label:"Cancel",color:"text",variant:"hoverable",className:"!text-current",size:"icon-sm",Icon:Ts,onClick:g,disabled:o})]},String(u)),b.jsxs("div",{className:Te("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:y}),b.jsx(gt,{label:"Edit",Icon:j1,color:"text",variant:"hoverable",size:"icon-sm",className:"invisible !text-current group-hover/editable-field:visible",disabled:o,onClick:_=>{_.stopPropagation(),d(!0)}})]})]})},HC=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=E.useRef(null),o=()=>{var f;e==null||e(((f=a.current)==null?void 0:f.value)??"")},l=()=>{a.current&&(a.current.value=a.current.defaultValue??""),t==null||t()};E.useImperativeHandle(n,()=>a.current);const u=E.useMemo(()=>{var f;return r.value??((f=a.current)==null?void 0:f.value)??r.defaultValue},[r.value,r.defaultValue,(d=a.current)==null?void 0:d.value]);return b.jsx(UC,{value:u,onCancel:l,onSave:o,children:b.jsx(Jo,{ref:a,...r})})},mA=24,pA=12,m0=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:a,...o})=>{const l=E.useRef(null);E.useImperativeHandle(a,()=>l.current);const u=()=>{const m=l.current;if(!m||!t)return;const g=m.style;g.height="auto";const y=m.scrollHeight,v=mA*r+pA,_=mA+pA;g.height=Math.max(Math.min(y,v),_)+"px"};E.useEffect(()=>{u()},[o.value,o.defaultValue,u]);const d=m=>{n==null||n(m),u()},f=m=>{l.current=m,m&&u()};return b.jsx(zC,{ref:f,onChange:d,className:Te("overflow-y-scroll",t?"resize-none":"",e),...o})},FC=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=E.useRef(null);E.useImperativeHandle(n,()=>a.current);const o=()=>{var f;e==null||e(((f=a.current)==null?void 0:f.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(UC,{value:u,onCancel:l,onSave:o,onClick:f=>{f.preventDefault(),f.stopPropagation()},children:b.jsx(m0,{className:"leading-6",ref:a,onClick:f=>{f.preventDefault(),f.stopPropagation()},...r})})},hU=mr("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"}}),mU=({className:e,variant:t,color:n,...r})=>b.jsx("div",{className:Te(hU({variant:t,color:n}),e),...r});var pU=yM.useId||(()=>{}),gU=0;function fr(e){const[t,n]=E.useState(pU());return yn(()=>{n(r=>r??String(gU++))},[e]),t?`radix-${t}`:""}var jg="focusScope.autoFocusOnMount",Pg="focusScope.autoFocusOnUnmount",gA={bubbles:!1,cancelable:!0},yU="FocusScope",p0=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[u,d]=E.useState(null),f=Kn(a),m=Kn(o),g=E.useRef(null),y=Nt(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(R){if(v.paused||!u)return;const D=R.target;u.contains(D)?g.current=D:ca(g.current,{select:!0})},A=function(R){if(v.paused||!u)return;const D=R.relatedTarget;D!==null&&(u.contains(D)||ca(g.current,{select:!0}))},w=function(R){if(document.activeElement===document.body)for(const N of R)N.removedNodes.length>0&&ca(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){vA.add(v);const S=document.activeElement;if(!u.contains(S)){const w=new CustomEvent(jg,gA);u.addEventListener(jg,f),u.dispatchEvent(w),w.defaultPrevented||(vU(SU(GC(u)),{select:!0}),document.activeElement===S&&ca(u))}return()=>{u.removeEventListener(jg,f),setTimeout(()=>{const w=new CustomEvent(Pg,gA);u.addEventListener(Pg,m),u.dispatchEvent(w),w.defaultPrevented||ca(S??document.body,{select:!0}),u.removeEventListener(Pg,m),vA.remove(v)},0)}}},[u,f,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,[R,D]=bU(T);R&&D?!S.shiftKey&&w===D?(S.preventDefault(),n&&ca(R,{select:!0})):S.shiftKey&&w===R&&(S.preventDefault(),n&&ca(D,{select:!0})):w===T&&S.preventDefault()}},[n,r,v.paused]);return b.jsx(tt.div,{tabIndex:-1,...l,ref:y,onKeyDown:_})});p0.displayName=yU;function vU(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ca(r,{select:t}),document.activeElement!==n)return}function bU(e){const t=GC(e),n=yA(t,e),r=yA(t.reverse(),e);return[n,r]}function GC(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 yA(e,t){for(const n of e)if(!_U(n,{upTo:t}))return n}function _U(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 xU(e){return e instanceof HTMLInputElement&&"select"in e}function ca(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xU(e)&&t&&e.select()}}var vA=EU();function EU(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=bA(e,t),e.unshift(t)},remove(t){var n;e=bA(e,t),(n=e[0])==null||n.resume()}}}function bA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function SU(e){return e.filter(t=>t.tagName!=="A")}var Vg=0;function $C(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_A()),document.body.insertAdjacentElement("beforeend",e[1]??_A()),Vg++,()=>{Vg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vg--}},[])}function _A(){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 Vr=function(){return Vr=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Vr.apply(this,arguments)};function qC(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 AU(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Sf="right-scroll-bar-position",Af="width-before-scroll-bar",wU="with-scroll-bars-hidden",TU="--removed-body-scroll-bar-size";function Bg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function CU(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 RU=typeof window<"u"?E.useLayoutEffect:E.useEffect,xA=new WeakMap;function NU(e,t){var n=CU(null,function(r){return e.forEach(function(a){return Bg(a,r)})});return RU(function(){var r=xA.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(u){o.has(u)||Bg(u,null)}),o.forEach(function(u){a.has(u)||Bg(u,l)})}xA.set(n,e)},[e]),n}function OU(e){return e}function kU(e,t){t===void 0&&(t=OU);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(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var d=function(){var m=l;l=[],m.forEach(o)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return a}function DU(e){e===void 0&&(e={});var t=kU(null);return t.options=Vr({async:!0,ssr:!1},e),t}var KC=function(e){var t=e.sideCar,n=qC(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,Vr({},n))};KC.isSideCarExport=!0;function IU(e,t){return e.useMedium(t),KC}var WC=DU(),zg=function(){},Mh=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:zg,onWheelCapture:zg,onTouchMoveCapture:zg}),a=r[0],o=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,g=e.shards,y=e.sideCar,v=e.noIsolation,_=e.inert,S=e.allowPinchZoom,A=e.as,w=A===void 0?"div":A,T=e.gapMode,R=qC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=y,N=NU([n,t]),k=Vr(Vr({},R),a);return E.createElement(E.Fragment,null,m&&E.createElement(D,{sideCar:WC,removeScrollBar:f,shards:g,noIsolation:v,inert:_,setCallbacks:o,allowPinchZoom:!!S,lockRef:n,gapMode:T}),l?E.cloneElement(E.Children.only(u),Vr(Vr({},k),{ref:N})):E.createElement(w,Vr({},k,{className:d,ref:N}),u))});Mh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mh.classNames={fullWidth:Af,zeroRight:Sf};var LU=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function MU(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=LU();return t&&e.setAttribute("nonce",t),e}function jU(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function PU(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var VU=function(){var e=0,t=null;return{add:function(n){e==0&&(t=MU())&&(jU(t,n),PU(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},BU=function(){var e=VU();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},YC=function(){var e=BU(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},zU={left:0,top:0,right:0,gap:0},Ug=function(e){return parseInt(e||"",10)||0},UU=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)]},HU=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zU;var t=UU(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])}},FU=YC(),Oo="data-scroll-locked",GU=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
219
|
+
.`.concat(wU,` {
|
|
220
|
+
overflow: hidden `).concat(r,`;
|
|
221
|
+
padding-right: `).concat(u,"px ").concat(r,`;
|
|
222
|
+
}
|
|
223
|
+
body[`).concat(Oo,`] {
|
|
224
|
+
overflow: hidden `).concat(r,`;
|
|
225
|
+
overscroll-behavior: contain;
|
|
226
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
227
|
+
padding-left: `.concat(a,`px;
|
|
228
|
+
padding-top: `).concat(o,`px;
|
|
229
|
+
padding-right: `).concat(l,`px;
|
|
230
|
+
margin-left:0;
|
|
231
|
+
margin-top:0;
|
|
232
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
233
|
+
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.`).concat(Sf,` {
|
|
237
|
+
right: `).concat(u,"px ").concat(r,`;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.`).concat(Af,` {
|
|
241
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.`).concat(Sf," .").concat(Sf,` {
|
|
245
|
+
right: 0 `).concat(r,`;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.`).concat(Af," .").concat(Af,` {
|
|
249
|
+
margin-right: 0 `).concat(r,`;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
body[`).concat(Oo,`] {
|
|
253
|
+
`).concat(TU,": ").concat(u,`px;
|
|
254
|
+
}
|
|
255
|
+
`)},EA=function(){var e=parseInt(document.body.getAttribute(Oo)||"0",10);return isFinite(e)?e:0},$U=function(){E.useEffect(function(){return document.body.setAttribute(Oo,(EA()+1).toString()),function(){var e=EA()-1;e<=0?document.body.removeAttribute(Oo):document.body.setAttribute(Oo,e.toString())}},[])},qU=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;$U();var o=E.useMemo(function(){return HU(a)},[a]);return E.createElement(FU,{styles:GU(o,!t,a,n?"":"!important")})},By=!1;if(typeof window<"u")try{var Qd=Object.defineProperty({},"passive",{get:function(){return By=!0,!0}});window.addEventListener("test",Qd,Qd),window.removeEventListener("test",Qd,Qd)}catch{By=!1}var po=By?{passive:!1}:!1,KU=function(e){return e.tagName==="TEXTAREA"},ZC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!KU(e)&&n[t]==="visible")},WU=function(e){return ZC(e,"overflowY")},YU=function(e){return ZC(e,"overflowX")},SA=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=XC(e,r);if(a){var o=QC(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ZU=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},XU=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},XC=function(e,t){return e==="v"?WU(t):YU(t)},QC=function(e,t){return e==="v"?ZU(t):XU(t)},QU=function(e,t){return e==="h"&&t==="rtl"?-1:1},JU=function(e,t,n,r,a){var o=QU(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),f=!1,m=l>0,g=0,y=0;do{var v=QC(e,u),_=v[0],S=v[1],A=v[2],w=S-A-o*_;(_||w)&&XC(e,u)&&(g+=w,y+=_),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(g)<1||!m&&Math.abs(y)<1)&&(f=!0),f},Jd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},AA=function(e){return[e.deltaX,e.deltaY]},wA=function(e){return e&&"current"in e?e.current:e},eH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tH=function(e){return`
|
|
256
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
257
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
258
|
+
`)},nH=0,go=[];function rH(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),a=E.useState(nH++)[0],o=E.useState(YC)[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=AU([e.lockRef.current],(e.shards||[]).map(wA),!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=Jd(S),T=n.current,R="deltaX"in S?S.deltaX:T[0]-w[0],D="deltaY"in S?S.deltaY:T[1]-w[1],N,k=S.target,I=Math.abs(R)>Math.abs(D)?"h":"v";if("touches"in S&&I==="h"&&k.type==="range")return!1;var P=SA(I,k);if(!P)return!0;if(P?N=I:(N=I==="v"?"h":"v",P=SA(I,k)),!P)return!1;if(!r.current&&"changedTouches"in S&&(R||D)&&(r.current=N),!N)return!0;var V=r.current||N;return JU(V,A,S,V==="h"?R:D)},[]),d=E.useCallback(function(S){var A=S;if(!(!go.length||go[go.length-1]!==o)){var w="deltaY"in A?AA(A):Jd(A),T=t.current.filter(function(N){return N.name===A.type&&(N.target===A.target||A.target===N.shadowParent)&&eH(N.delta,w)})[0];if(T&&T.should){A.cancelable&&A.preventDefault();return}if(!T){var R=(l.current.shards||[]).map(wA).filter(Boolean).filter(function(N){return N.contains(A.target)}),D=R.length>0?u(A,R[0]):!l.current.noIsolation;D&&A.cancelable&&A.preventDefault()}}},[]),f=E.useCallback(function(S,A,w,T){var R={name:S,delta:A,target:w,should:T,shadowParent:iH(w)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(D){return D!==R})},1)},[]),m=E.useCallback(function(S){n.current=Jd(S),r.current=void 0},[]),g=E.useCallback(function(S){f(S.type,AA(S),S.target,u(S,e.lockRef.current))},[]),y=E.useCallback(function(S){f(S.type,Jd(S),S.target,u(S,e.lockRef.current))},[]);E.useEffect(function(){return go.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:y}),document.addEventListener("wheel",d,po),document.addEventListener("touchmove",d,po),document.addEventListener("touchstart",m,po),function(){go=go.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,po),document.removeEventListener("touchmove",d,po),document.removeEventListener("touchstart",m,po)}},[]);var v=e.removeScrollBar,_=e.inert;return E.createElement(E.Fragment,null,_?E.createElement(o,{styles:tH(a)}):null,v?E.createElement(qU,{gapMode:e.gapMode}):null)}function iH(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const aH=IU(WC,rH);var g0=E.forwardRef(function(e,t){return E.createElement(Mh,Vr({},e,{ref:t,sideCar:aH}))});g0.classNames=Mh.classNames;var sH=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},yo=new WeakMap,ef=new WeakMap,tf={},Hg=0,JC=function(e){return e&&(e.host||JC(e.parentNode))},oH=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=JC(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})},lH=function(e,t,n,r){var a=oH(t,Array.isArray(e)?e:[e]);tf[n]||(tf[n]=new WeakMap);var o=tf[n],l=[],u=new Set,d=new Set(a),f=function(g){!g||u.has(g)||(u.add(g),f(g.parentNode))};a.forEach(f);var m=function(g){!g||d.has(g)||Array.prototype.forEach.call(g.children,function(y){if(u.has(y))m(y);else try{var v=y.getAttribute(r),_=v!==null&&v!=="false",S=(yo.get(y)||0)+1,A=(o.get(y)||0)+1;yo.set(y,S),o.set(y,A),l.push(y),S===1&&_&&ef.set(y,!0),A===1&&y.setAttribute(n,"true"),_||y.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",y,w)}})};return m(t),u.clear(),Hg++,function(){l.forEach(function(g){var y=yo.get(g)-1,v=o.get(g)-1;yo.set(g,y),o.set(g,v),y||(ef.has(g)||g.removeAttribute(r),ef.delete(g)),v||g.removeAttribute(n)}),Hg--,Hg||(yo=new WeakMap,yo=new WeakMap,ef=new WeakMap,tf={})}},eR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=sH(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),lH(r,a,n,"aria-hidden")):function(){return null}},y0="Dialog",[tR,UQ]=vu(y0),[cH,Rr]=tR(y0),nR=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,u=E.useRef(null),d=E.useRef(null),[f=!1,m]=Pf({prop:r,defaultProp:a,onChange:o});return b.jsx(cH,{scope:t,triggerRef:u,contentRef:d,contentId:fr(),titleId:fr(),descriptionId:fr(),open:f,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(g=>!g),[m]),modal:l,children:n})};nR.displayName=y0;var rR="DialogTrigger",uH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(rR,n),o=Nt(t,a.triggerRef);return b.jsx(tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":_0(a.open),...r,ref:o,onClick:lt(e.onClick,a.onOpenToggle)})});uH.displayName=rR;var v0="DialogPortal",[dH,iR]=tR(v0,{forceMount:void 0}),aR=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Rr(v0,t);return b.jsx(dH,{scope:t,forceMount:n,children:E.Children.map(r,l=>b.jsx(bu,{present:n||o.open,children:b.jsx(Nh,{asChild:!0,container:a,children:l})}))})};aR.displayName=v0;var Hf="DialogOverlay",sR=E.forwardRef((e,t)=>{const n=iR(Hf,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Rr(Hf,e.__scopeDialog);return o.modal?b.jsx(bu,{present:r||o.open,children:b.jsx(fH,{...a,ref:t})}):null});sR.displayName=Hf;var fH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(Hf,n);return b.jsx(g0,{as:ps,allowPinchZoom:!0,shards:[a.contentRef],children:b.jsx(tt.div,{"data-state":_0(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gs="DialogContent",oR=E.forwardRef((e,t)=>{const n=iR(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Rr(gs,e.__scopeDialog);return b.jsx(bu,{present:r||o.open,children:o.modal?b.jsx(hH,{...a,ref:t}):b.jsx(mH,{...a,ref:t})})});oR.displayName=gs;var hH=E.forwardRef((e,t)=>{const n=Rr(gs,e.__scopeDialog),r=E.useRef(null),a=Nt(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return eR(o)},[]),b.jsx(lR,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:lt(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:lt(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:lt(e.onFocusOutside,o=>o.preventDefault())})}),mH=E.forwardRef((e,t)=>{const n=Rr(gs,e.__scopeDialog),r=E.useRef(!1),a=E.useRef(!1);return b.jsx(lR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),lR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,u=Rr(gs,n),d=E.useRef(null),f=Nt(t,d);return $C(),b.jsxs(b.Fragment,{children:[b.jsx(p0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:b.jsx(Rh,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":_0(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(vH,{titleId:u.titleId}),b.jsx(_H,{contentRef:d,descriptionId:u.descriptionId})]})]})}),b0="DialogTitle",pH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(b0,n);return b.jsx(tt.h2,{id:a.titleId,...r,ref:t})});pH.displayName=b0;var cR="DialogDescription",gH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(cR,n);return b.jsx(tt.p,{id:a.descriptionId,...r,ref:t})});gH.displayName=cR;var uR="DialogClose",yH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Rr(uR,n);return b.jsx(tt.button,{type:"button",...r,ref:t,onClick:lt(e.onClick,()=>a.onOpenChange(!1))})});yH.displayName=uR;function _0(e){return e?"open":"closed"}var dR="DialogTitleWarning",[HQ,fR]=_z(dR,{contentName:gs,titleName:b0,docsSlug:"dialog"}),vH=({titleId:e})=>{const t=fR(dR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
259
|
+
|
|
260
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
261
|
+
|
|
262
|
+
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},bH="DialogDescriptionWarning",_H=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fR(bH).contentName}}.`;return E.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},xH=nR,EH=aR,SH=sR,AH=oR,TA=1,wH=.9,TH=.8,CH=.17,Fg=.1,Gg=.999,RH=.9999,NH=.99,OH=/[\\\/_+.#"@\[\(\{&]/,kH=/[\\\/_+.#"@\[\(\{&]/g,DH=/[\s-]/,hR=/[\s-]/g;function zy(e,t,n,r,a,o,l){if(o===t.length)return a===e.length?TA:NH;var u=`${a},${o}`;if(l[u]!==void 0)return l[u];for(var d=r.charAt(o),f=n.indexOf(d,a),m=0,g,y,v,_;f>=0;)g=zy(e,t,n,r,f+1,o+1,l),g>m&&(f===a?g*=TA:OH.test(e.charAt(f-1))?(g*=TH,v=e.slice(a,f-1).match(kH),v&&a>0&&(g*=Math.pow(Gg,v.length))):DH.test(e.charAt(f-1))?(g*=wH,_=e.slice(a,f-1).match(hR),_&&a>0&&(g*=Math.pow(Gg,_.length))):(g*=CH,a>0&&(g*=Math.pow(Gg,f-a))),e.charAt(f)!==t.charAt(o)&&(g*=RH)),(g<Fg&&n.charAt(f-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(f-1)!==r.charAt(o))&&(y=zy(e,t,n,r,f+1,o+2,l),y*Fg>g&&(g=y*Fg)),g>m&&(m=g),f=n.indexOf(d,f+1);return l[u]=m,m}function CA(e){return e.toLowerCase().replace(hR," ")}function IH(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,zy(e,t,CA(e),CA(t),0,0,{})}var LH=Z1(),dc='[cmdk-group=""]',$g='[cmdk-group-items=""]',MH='[cmdk-group-heading=""]',x0='[cmdk-item=""]',RA=`${x0}:not([aria-disabled="true"])`,Uy="cmdk-item-select",as="data-value",jH=(e,t,n)=>IH(e,t,n),mR=E.createContext(void 0),xu=()=>E.useContext(mR),pR=E.createContext(void 0),E0=()=>E.useContext(pR),gR=E.createContext(void 0),yR=E.forwardRef((e,t)=>{let n=bo(()=>{var F,re;return{search:"",value:(re=(F=e.value)!=null?F:e.defaultValue)!=null?re:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=bo(()=>new Set),a=bo(()=>new Map),o=bo(()=>new Map),l=bo(()=>new Set),u=vR(e),{label:d,children:f,value:m,onValueChange:g,filter:y,shouldFilter:v,loop:_,disablePointerSelection:S=!1,vimBindings:A=!0,...w}=e,T=fr(),R=fr(),D=fr(),N=E.useRef(null),k=KH();ys(()=>{if(m!==void 0){let F=m.trim();n.current.value=F,I.emit()}},[m]),ys(()=>{k(6,fe)},[]);let I=E.useMemo(()=>({subscribe:F=>(l.current.add(F),()=>l.current.delete(F)),snapshot:()=>n.current,setState:(F,re,te)=>{var de,ye,pe;if(!Object.is(n.current[F],re)){if(n.current[F]=re,F==="search")oe(),U(),k(1,ue);else if(F==="value"&&(te||k(5,fe),((de=u.current)==null?void 0:de.value)!==void 0)){let we=re??"";(pe=(ye=u.current).onValueChange)==null||pe.call(ye,we);return}I.emit()}},emit:()=>{l.current.forEach(F=>F())}}),[]),P=E.useMemo(()=>({value:(F,re,te)=>{var de;re!==((de=o.current.get(F))==null?void 0:de.value)&&(o.current.set(F,{value:re,keywords:te}),n.current.filtered.items.set(F,V(re,te)),k(2,()=>{U(),I.emit()}))},item:(F,re)=>(r.current.add(F),re&&(a.current.has(re)?a.current.get(re).add(F):a.current.set(re,new Set([F]))),k(3,()=>{oe(),U(),n.current.value||ue(),I.emit()}),()=>{o.current.delete(F),r.current.delete(F),n.current.filtered.items.delete(F);let te=Y();k(4,()=>{oe(),(te==null?void 0:te.getAttribute("id"))===F&&ue(),I.emit()})}),group:F=>(a.current.has(F)||a.current.set(F,new Set),()=>{o.current.delete(F),a.current.delete(F)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:T,inputId:D,labelId:R,listInnerRef:N}),[]);function V(F,re){var te,de;let ye=(de=(te=u.current)==null?void 0:te.filter)!=null?de:jH;return F?ye(F,n.current.search,re):0}function U(){if(!n.current.search||u.current.shouldFilter===!1)return;let F=n.current.filtered.items,re=[];n.current.filtered.groups.forEach(de=>{let ye=a.current.get(de),pe=0;ye.forEach(we=>{let He=F.get(we);pe=Math.max(He,pe)}),re.push([de,pe])});let te=N.current;J().sort((de,ye)=>{var pe,we;let He=de.getAttribute("id"),Me=ye.getAttribute("id");return((pe=F.get(Me))!=null?pe:0)-((we=F.get(He))!=null?we:0)}).forEach(de=>{let ye=de.closest($g);ye?ye.appendChild(de.parentElement===ye?de:de.closest(`${$g} > *`)):te.appendChild(de.parentElement===te?de:de.closest(`${$g} > *`))}),re.sort((de,ye)=>ye[1]-de[1]).forEach(de=>{var ye;let pe=(ye=N.current)==null?void 0:ye.querySelector(`${dc}[${as}="${encodeURIComponent(de[0])}"]`);pe==null||pe.parentElement.appendChild(pe)})}function ue(){let F=J().find(te=>te.getAttribute("aria-disabled")!=="true"),re=F==null?void 0:F.getAttribute(as);I.setState("value",re||void 0)}function oe(){var F,re,te,de;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ye=0;for(let pe of r.current){let we=(re=(F=o.current.get(pe))==null?void 0:F.value)!=null?re:"",He=(de=(te=o.current.get(pe))==null?void 0:te.keywords)!=null?de:[],Me=V(we,He);n.current.filtered.items.set(pe,Me),Me>0&&ye++}for(let[pe,we]of a.current)for(let He of we)if(n.current.filtered.items.get(He)>0){n.current.filtered.groups.add(pe);break}n.current.filtered.count=ye}function fe(){var F,re,te;let de=Y();de&&(((F=de.parentElement)==null?void 0:F.firstChild)===de&&((te=(re=de.closest(dc))==null?void 0:re.querySelector(MH))==null||te.scrollIntoView({block:"nearest"})),de.scrollIntoView({block:"nearest"}))}function Y(){var F;return(F=N.current)==null?void 0:F.querySelector(`${x0}[aria-selected="true"]`)}function J(){var F;return Array.from(((F=N.current)==null?void 0:F.querySelectorAll(RA))||[])}function H(F){let re=J()[F];re&&I.setState("value",re.getAttribute(as))}function ne(F){var re;let te=Y(),de=J(),ye=de.findIndex(we=>we===te),pe=de[ye+F];(re=u.current)!=null&&re.loop&&(pe=ye+F<0?de[de.length-1]:ye+F===de.length?de[0]:de[ye+F]),pe&&I.setState("value",pe.getAttribute(as))}function ee(F){let re=Y(),te=re==null?void 0:re.closest(dc),de;for(;te&&!de;)te=F>0?$H(te,dc):qH(te,dc),de=te==null?void 0:te.querySelector(RA);de?I.setState("value",de.getAttribute(as)):ne(F)}let ve=()=>H(J().length-1),j=F=>{F.preventDefault(),F.metaKey?ve():F.altKey?ee(1):ne(1)},W=F=>{F.preventDefault(),F.metaKey?H(0):F.altKey?ee(-1):ne(-1)};return E.createElement(tt.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:F=>{var re;if((re=w.onKeyDown)==null||re.call(w,F),!F.defaultPrevented)switch(F.key){case"n":case"j":{A&&F.ctrlKey&&j(F);break}case"ArrowDown":{j(F);break}case"p":case"k":{A&&F.ctrlKey&&W(F);break}case"ArrowUp":{W(F);break}case"Home":{F.preventDefault(),H(0);break}case"End":{F.preventDefault(),ve();break}case"Enter":if(!F.nativeEvent.isComposing&&F.keyCode!==229){F.preventDefault();let te=Y();if(te){let de=new Event(Uy);te.dispatchEvent(de)}}}}},E.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:YH},d),jh(e,F=>E.createElement(pR.Provider,{value:I},E.createElement(mR.Provider,{value:P},F))))}),PH=E.forwardRef((e,t)=>{var n,r;let a=fr(),o=E.useRef(null),l=E.useContext(gR),u=xu(),d=vR(e),f=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;ys(()=>{if(!f)return u.item(a,l==null?void 0:l.id)},[f]);let m=bR(a,o,[e.value,e.children,o],e.keywords),g=E0(),y=vs(k=>k.value&&k.value===m.current),v=vs(k=>f||u.filter()===!1?!0:k.search?k.filtered.items.get(a)>0:!0);E.useEffect(()=>{let k=o.current;if(!(!k||e.disabled))return k.addEventListener(Uy,_),()=>k.removeEventListener(Uy,_)},[v,e.onSelect,e.disabled]);function _(){var k,I;S(),(I=(k=d.current).onSelect)==null||I.call(k,m.current)}function S(){g.setState("value",m.current,!0)}if(!v)return null;let{disabled:A,value:w,onSelect:T,forceMount:R,keywords:D,...N}=e;return E.createElement(tt.div,{ref:Mc([o,t]),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!y,"data-disabled":!!A,"data-selected":!!y,onPointerMove:A||u.getDisablePointerSelection()?void 0:S,onClick:A?void 0:_},e.children)}),VH=E.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,l=fr(),u=E.useRef(null),d=E.useRef(null),f=fr(),m=xu(),g=vs(v=>a||m.filter()===!1?!0:v.search?v.filtered.groups.has(l):!0);ys(()=>m.group(l),[]),bR(l,u,[e.value,e.heading,d]);let y=E.useMemo(()=>({id:l,forceMount:a}),[a]);return E.createElement(tt.div,{ref:Mc([u,t]),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},n&&E.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),jh(e,v=>E.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},E.createElement(gR.Provider,{value:y},v))))}),BH=E.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=E.useRef(null),o=vs(l=>!l.search);return!n&&!o?null:E.createElement(tt.div,{ref:Mc([a,t]),...r,"cmdk-separator":"",role:"separator"})}),zH=E.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=E0(),l=vs(m=>m.search),u=vs(m=>m.value),d=xu(),f=E.useMemo(()=>{var m;let g=(m=d.listInnerRef.current)==null?void 0:m.querySelector(`${x0}[${as}="${encodeURIComponent(u)}"]`);return g==null?void 0:g.getAttribute("id")},[]);return E.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),E.createElement(tt.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":f,id:d.inputId,type:"text",value:a?e.value:l,onChange:m=>{a||o.setState("search",m.target.value),n==null||n(m.target.value)}})}),UH=E.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=E.useRef(null),l=E.useRef(null),u=xu();return E.useEffect(()=>{if(l.current&&o.current){let d=l.current,f=o.current,m,g=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let y=d.offsetHeight;f.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return g.observe(d),()=>{cancelAnimationFrame(m),g.unobserve(d)}}},[]),E.createElement(tt.div,{ref:Mc([o,t]),...a,"cmdk-list":"",role:"listbox","aria-label":r,id:u.listId},jh(e,d=>E.createElement("div",{ref:Mc([l,u.listInnerRef]),"cmdk-list-sizer":""},d)))}),HH=E.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:l,...u}=e;return E.createElement(xH,{open:n,onOpenChange:r},E.createElement(EH,{container:l},E.createElement(SH,{"cmdk-overlay":"",className:a}),E.createElement(AH,{"aria-label":e.label,"cmdk-dialog":"",className:o},E.createElement(yR,{ref:t,...u}))))}),FH=E.forwardRef((e,t)=>vs(n=>n.filtered.count===0)?E.createElement(tt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),GH=E.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return E.createElement(tt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},jh(e,l=>E.createElement("div",{"aria-hidden":!0},l)))}),Eu=Object.assign(yR,{List:UH,Item:PH,Input:zH,Group:VH,Separator:BH,Dialog:HH,Empty:FH,Loading:GH});function $H(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function qH(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function vR(e){let t=E.useRef(e);return ys(()=>{t.current=e}),t}var ys=typeof window>"u"?E.useEffect:E.useLayoutEffect;function bo(e){let t=E.useRef();return t.current===void 0&&(t.current=e()),t}function Mc(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function vs(e){let t=E0(),n=()=>e(t.snapshot());return LH.useSyncExternalStore(t.subscribe,n,n)}function bR(e,t,n,r=[]){let a=E.useRef(),o=xu();return ys(()=>{var l;let u=(()=>{var f;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(f=m.current.textContent)==null?void 0:f.trim():a.current}})(),d=r.map(f=>f.trim());o.value(e,u,d),(l=t.current)==null||l.setAttribute(as,u),a.current=u}),a}var KH=()=>{let[e,t]=E.useState(),n=bo(()=>new Map);return ys(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function WH(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function jh({asChild:e,children:t},n){return e&&E.isValidElement(t)?E.cloneElement(WH(t),{ref:t.ref},n(t.props.children)):n(t)}var YH={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const _R=({className:e,...t})=>b.jsx(Eu,{className:Te("flex size-full flex-col overflow-hidden rounded-md",e),...t}),ZH=({className:e,...t})=>b.jsxs("div",{className:"flex w-full items-center","cmdk-input-wrapper":"",children:[b.jsx(nB,{className:"mr-2 size-4 shrink-0 opacity-50"}),b.jsx(Eu.Input,{className:Te("placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}),XH=({className:e,...t})=>b.jsx(Eu.List,{className:Te("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}),QH=e=>b.jsx(Eu.Empty,{className:"py-6 text-center text-sm",...e}),JH=({className:e,...t})=>b.jsx(Eu.Item,{className:Te("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}),Ff={..._R,Input:ZH,List:XH,Empty:QH,Item:JH},xR=E.createContext(null),Ph=()=>{const e=E.useContext(xR);if(!e)throw new Error("useMultiSelect must be used within MultiSelectProvider");return e},eF=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,className:a,children:o,dir:l,...u})=>{const[d,f]=E.useState(t??[]),[m,g]=E.useState(""),[y,v]=E.useState(!1),[_,S]=E.useState(-1),A=E.useRef(null),[w,T]=E.useState(!1),[R,D]=E.useState("");E.useEffect(()=>{e&&f(e)},[e]);const N=E.useCallback(V=>{if(d.includes(V)){const U=d.filter(ue=>ue!==V);f(U),n==null||n(U)}else{const U=[...d,V];f(U),n==null||n(U)}},[d]),k=E.useCallback(V=>{V.preventDefault();const U=V.currentTarget,ue=U.value.substring(U.selectionStart??0,U.selectionEnd??0);D(ue),T(ue===m)},[m]),I=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)},oe=()=>{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&&oe();break;case"ArrowRight":l==="rtl"?d.length>0&&U.selectionStart===0&&oe():d.length>0&&(_!==-1||r)&&ue();break;case"Backspace":case"Delete":d.length>0&&(_!==-1&&_<d.length?(N(d[_]),fe()):(U.selectionStart===0&&R===m||w)&&N(d[d.length-1]));break;case"Enter":v(!0);break;case"Escape":_!==-1?S(-1):y&&v(!1);break}},[d,m,_,r]),P=E.useMemo(()=>({value:d,onValueChange:N,open:y,setOpen:v,inputValue:m,setInputValue:g,activeIndex:_,setActiveIndex:S,ref:A,handleSelect:k}),[d,N,y,v,m,g,_,S,A,k]);return b.jsx(xR,{value:P,children:b.jsx(_R,{onKeyDown:I,className:Te("flex w-full flex-col gap-2 overflow-visible bg-transparent",a),dir:l,...u,children:o})})},tF=({className:e,getBadgeValue:t=o=>o,validationStyleEnabled:n=!1,children:r,...a})=>{const{value:o,onValueChange:l,activeIndex:u}=Ph(),d=E.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]);return b.jsxs("div",{className:Te("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:[o.length>0&&b.jsx("div",{className:"flex w-full flex-wrap gap-1",children:o.map((f,m)=>b.jsxs(mU,{className:Te("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(f)}),b.jsxs("button",{"aria-label":`Remove ${f} option`,"aria-roledescription":"button to remove option",onMouseDown:d,onClick:()=>l(f),children:[b.jsxs("span",{className:"sr-only",children:["Remove ",f," option"]}),b.jsx(Ts,{className:"size-4 cursor-pointer"})]})]},f))}),r]})},nF=({className:e,...t})=>{const{setOpen:n,inputValue:r,setInputValue:a,activeIndex:o,setActiveIndex:l,handleSelect:u,ref:d}=Ph();return b.jsx(Ff.Input,{...t,tabIndex:0,ref:d,value:r,onValueChange:o===-1?a:void 0,onSelect:u,onBlur:()=>n(!1),onFocus:()=>n(!0),onClick:()=>l(-1),className:Te("outline-hidden ml-2 flex-1 cursor-pointer",e,o!==-1&&"caret-transparent")})},rF=({children:e})=>{const{open:t}=Ph();return b.jsx("div",{className:"relative",children:t&&e})},iF=({className:e,children:t})=>b.jsxs(Ff.List,{className:Te("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(Ff.Empty,{children:b.jsx("span",{className:"text-muted-foreground",children:"No results found"})})]}),aF=({className:e,value:t,children:n,...r})=>{const{value:a,onValueChange:o,setInputValue:l}=Ph(),u=E.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]),d=a.includes(t);return b.jsxs(Ff.Item,{...r,onSelect:()=>{o(t),l("")},className:Te("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(Zo,{className:"size-4"})]})},mn=eF;mn.Trigger=tF;mn.Input=nF;mn.Content=rF;mn.List=iF;mn.Item=aF;const sF=({className:e,children:t,...n})=>b.jsxs("i",{className:Te("text-xs text-neutral-400",e),...n,children:["ⓘ ",t]}),Hy=({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}),oF=({className:e,...t})=>{const{error:n,formItemId:r}=Ta();return b.jsx(Hy,{className:Te("mb-2",n&&"text-error",e),htmlFor:r,...t})},lF=({isRequired:e})=>e?b.jsx("span",{"aria-label":"Asterisk meaning the field is required",children:"*"}):b.jsx(b.Fragment,{}),ER=({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(oF,{htmlFor:r,id:`${r}-label`,className:Ch("font-bold",a),children:[e,b.jsx(lF,{isRequired:t})]}),n&&b.jsx(sF,{content:n})]});function NA(e,[t,n]){return Math.min(n,Math.max(t,e))}var cF=E.createContext(void 0);function uF(e){const t=E.useContext(cF);return e||t||"ltr"}const dF=["top","right","bottom","left"],ha=Math.min,Hn=Math.max,Gf=Math.round,nf=Math.floor,Hr=e=>({x:e,y:e}),fF={left:"right",right:"left",bottom:"top",top:"bottom"},hF={start:"end",end:"start"};function Fy(e,t,n){return Hn(e,ha(t,n))}function Ri(e,t){return typeof e=="function"?e(t):e}function Ni(e){return e.split("-")[0]}function el(e){return e.split("-")[1]}function S0(e){return e==="x"?"y":"x"}function A0(e){return e==="y"?"height":"width"}function ma(e){return["top","bottom"].includes(Ni(e))?"y":"x"}function w0(e){return S0(ma(e))}function mF(e,t,n){n===void 0&&(n=!1);const r=el(e),a=w0(e),o=A0(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=$f(l)),[l,$f(l)]}function pF(e){const t=$f(e);return[Gy(e),t,Gy(t)]}function Gy(e){return e.replace(/start|end/g,t=>hF[t])}function gF(e,t,n){const r=["left","right"],a=["right","left"],o=["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?o:l;default:return[]}}function yF(e,t,n,r){const a=el(e);let o=gF(Ni(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(Gy)))),o}function $f(e){return e.replace(/left|right|bottom|top/g,t=>fF[t])}function vF(e){return{top:0,right:0,bottom:0,left:0,...e}}function SR(e){return typeof e!="number"?vF(e):{top:e,right:e,bottom:e,left:e}}function qf(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 OA(e,t,n){let{reference:r,floating:a}=e;const o=ma(t),l=w0(t),u=A0(l),d=Ni(t),f=o==="y",m=r.x+r.width/2-a.width/2,g=r.y+r.height/2-a.height/2,y=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:g};break;case"left":v={x:r.x-a.width,y:g};break;default:v={x:r.x,y:r.y}}switch(el(t)){case"start":v[l]-=y*(n&&f?-1:1);break;case"end":v[l]+=y*(n&&f?-1:1);break}return v}const bF=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=OA(f,r,d),y=r,v={},_=0;for(let S=0;S<u.length;S++){const{name:A,fn:w}=u[S],{x:T,y:R,data:D,reset:N}=await w({x:m,y:g,initialPlacement:r,placement:y,strategy:a,middlewareData:v,rects:f,platform:l,elements:{reference:e,floating:t}});m=T??m,g=R??g,v={...v,[A]:{...v[A],...D}},N&&_<=50&&(_++,typeof N=="object"&&(N.placement&&(y=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:m,y:g}=OA(f,y,d)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:v}};async function jc(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=Ri(t,e),_=SR(v),A=u[y?g==="floating"?"reference":"floating":g],w=qf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(A)))==null||n?A:A.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),T=g==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),D=await(o.isElement==null?void 0:o.isElement(R))?await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1}:{x:1,y:1},N=qf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:T,offsetParent:R,strategy:d}):T);return{top:(w.top-N.top+_.top)/D.y,bottom:(N.bottom-w.bottom+_.bottom)/D.y,left:(w.left-N.left+_.left)/D.x,right:(N.right-w.right+_.right)/D.x}}const _F=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Ri(e,t)||{};if(f==null)return{};const g=SR(m),y={x:n,y:r},v=w0(a),_=A0(v),S=await l.getDimensions(f),A=v==="y",w=A?"top":"left",T=A?"bottom":"right",R=A?"clientHeight":"clientWidth",D=o.reference[_]+o.reference[v]-y[v]-o.floating[_],N=y[v]-o.reference[v],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let I=k?k[R]:0;(!I||!await(l.isElement==null?void 0:l.isElement(k)))&&(I=u.floating[R]||o.floating[_]);const P=D/2-N/2,V=I/2-S[_]/2-1,U=ha(g[w],V),ue=ha(g[T],V),oe=U,fe=I-S[_]-ue,Y=I/2-S[_]/2+P,J=Fy(oe,Y,fe),H=!d.arrow&&el(a)!=null&&Y!==J&&o.reference[_]/2-(Y<oe?U:ue)-S[_]/2<0,ne=H?Y<oe?Y-oe:Y-fe:0;return{[v]:y[v]+ne,data:{[v]:J,centerOffset:Y-J-ne,...H&&{alignmentOffset:ne}},reset:H}}}),xF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:y,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:S=!0,...A}=Ri(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Ni(a),T=ma(u),R=Ni(u)===u,D=await(d.isRTL==null?void 0:d.isRTL(f.floating)),N=y||(R||!S?[$f(u)]:pF(u)),k=_!=="none";!y&&k&&N.push(...yF(u,S,_,D));const I=[u,...N],P=await jc(t,A),V=[];let U=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&V.push(P[w]),g){const Y=mF(a,l,D);V.push(P[Y[0]],P[Y[1]])}if(U=[...U,{placement:a,overflows:V}],!V.every(Y=>Y<=0)){var ue,oe;const Y=(((ue=o.flip)==null?void 0:ue.index)||0)+1,J=I[Y];if(J)return{data:{index:Y,overflows:U},reset:{placement:J}};let H=(oe=U.filter(ne=>ne.overflows[0]<=0).sort((ne,ee)=>ne.overflows[1]-ee.overflows[1])[0])==null?void 0:oe.placement;if(!H)switch(v){case"bestFit":{var fe;const ne=(fe=U.filter(ee=>{if(k){const ve=ma(ee.placement);return ve===T||ve==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(ve=>ve>0).reduce((ve,j)=>ve+j,0)]).sort((ee,ve)=>ee[1]-ve[1])[0])==null?void 0:fe[0];ne&&(H=ne);break}case"initialPlacement":H=u;break}if(a!==H)return{reset:{placement:H}}}return{}}}};function kA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function DA(e){return dF.some(t=>e[t]>=0)}const EF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Ri(e,t);switch(r){case"referenceHidden":{const o=await jc(t,{...a,elementContext:"reference"}),l=kA(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:DA(l)}}}case"escaped":{const o=await jc(t,{...a,altBoundary:!0}),l=kA(o,n.floating);return{data:{escapedOffsets:l,escaped:DA(l)}}}default:return{}}}}};async function SF(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ni(n),u=el(n),d=ma(n)==="y",f=["left","top"].includes(l)?-1:1,m=o&&d?-1:1,g=Ri(t,e);let{mainAxis:y,crossAxis:v,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof _=="number"&&(v=u==="end"?_*-1:_),d?{x:v*m,y:y*f}:{x:y*f,y:v*m}}const AF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:l,middlewareData:u}=t,d=await SF(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:o+d.y,data:{...d,placement:l}}}}},wF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:w,y:T}=A;return{x:w,y:T}}},...d}=Ri(e,t),f={x:n,y:r},m=await jc(t,d),g=ma(Ni(a)),y=S0(g);let v=f[y],_=f[g];if(o){const A=y==="y"?"top":"left",w=y==="y"?"bottom":"right",T=v+m[A],R=v-m[w];v=Fy(T,v,R)}if(l){const A=g==="y"?"top":"left",w=g==="y"?"bottom":"right",T=_+m[A],R=_-m[w];_=Fy(T,_,R)}const S=u.fn({...t,[y]:v,[g]:_});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:o,[g]:l}}}}}},TF=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Ri(e,t),m={x:n,y:r},g=ma(a),y=S0(g);let v=m[y],_=m[g];const S=Ri(u,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const R=y==="y"?"height":"width",D=o.reference[y]-o.floating[R]+A.mainAxis,N=o.reference[y]+o.reference[R]-A.mainAxis;v<D?v=D:v>N&&(v=N)}if(f){var w,T;const R=y==="y"?"width":"height",D=["top","left"].includes(Ni(a)),N=o.reference[g]-o.floating[R]+(D&&((w=l.offset)==null?void 0:w[g])||0)+(D?0:A.crossAxis),k=o.reference[g]+o.reference[R]+(D?0:((T=l.offset)==null?void 0:T[g])||0)-(D?A.crossAxis:0);_<N?_=N:_>k&&(_=k)}return{[y]:v,[g]:_}}}},CF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Ri(e,t),m=await jc(t,f),g=Ni(a),y=el(a),v=ma(a)==="y",{width:_,height:S}=o.floating;let A,w;g==="top"||g==="bottom"?(A=g,w=y===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(w=g,A=y==="end"?"top":"bottom");const T=S-m.top-m.bottom,R=_-m.left-m.right,D=ha(S-m[A],T),N=ha(_-m[w],R),k=!t.middlewareData.shift;let I=D,P=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=T),k&&!y){const U=Hn(m.left,0),ue=Hn(m.right,0),oe=Hn(m.top,0),fe=Hn(m.bottom,0);v?P=_-2*(U!==0||ue!==0?U+ue:Hn(m.left,m.right)):I=S-2*(oe!==0||fe!==0?oe+fe:Hn(m.top,m.bottom))}await d({...t,availableWidth:P,availableHeight:I});const V=await l.getDimensions(u.floating);return _!==V.width||S!==V.height?{reset:{rects:!0}}:{}}}};function Vh(){return typeof window<"u"}function tl(e){return AR(e)?(e.nodeName||"").toLowerCase():"#document"}function Gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(AR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AR(e){return Vh()?e instanceof Node||e instanceof Gn(e).Node:!1}function wr(e){return Vh()?e instanceof Element||e instanceof Gn(e).Element:!1}function Kr(e){return Vh()?e instanceof HTMLElement||e instanceof Gn(e).HTMLElement:!1}function IA(e){return!Vh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gn(e).ShadowRoot}function Su(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function RF(e){return["table","td","th"].includes(tl(e))}function Bh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function T0(e){const t=C0(),n=wr(e)?Tr(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 NF(e){let t=pa(e);for(;Kr(t)&&!Po(t);){if(T0(t))return t;if(Bh(t))return null;t=pa(t)}return null}function C0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Po(e){return["html","body","#document"].includes(tl(e))}function Tr(e){return Gn(e).getComputedStyle(e)}function zh(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pa(e){if(tl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||IA(e)&&e.host||Qr(e);return IA(t)?t.host:t}function wR(e){const t=pa(e);return Po(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&Su(t)?t:wR(t)}function Pc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=wR(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=Gn(a);if(o){const u=$y(l);return t.concat(l,l.visualViewport||[],Su(a)?a:[],u&&n?Pc(u):[])}return t.concat(a,Pc(a,[],n))}function $y(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function TR(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Kr(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=Gf(n)!==o||Gf(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function R0(e){return wr(e)?e:e.contextElement}function ko(e){const t=R0(e);if(!Kr(t))return Hr(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=TR(t);let l=(o?Gf(n.width):n.width)/r,u=(o?Gf(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const OF=Hr(0);function CR(e){const t=Gn(e);return!C0()||!t.visualViewport?OF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kF(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gn(e)?!1:t}function bs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=R0(e);let l=Hr(1);t&&(r?wr(r)&&(l=ko(r)):l=ko(e));const u=kF(o,n,r)?CR(o):Hr(0);let d=(a.left+u.x)/l.x,f=(a.top+u.y)/l.y,m=a.width/l.x,g=a.height/l.y;if(o){const y=Gn(o),v=r&&wr(r)?Gn(r):r;let _=y,S=$y(_);for(;S&&r&&v!==_;){const A=ko(S),w=S.getBoundingClientRect(),T=Tr(S),R=w.left+(S.clientLeft+parseFloat(T.paddingLeft))*A.x,D=w.top+(S.clientTop+parseFloat(T.paddingTop))*A.y;d*=A.x,f*=A.y,m*=A.x,g*=A.y,d+=R,f+=D,_=Gn(S),S=$y(_)}}return qf({width:m,height:g,x:d,y:f})}function N0(e,t){const n=zh(e).scrollLeft;return t?t.left+n:bs(Qr(e)).left+n}function RR(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:N0(e,r)),o=r.top+t.scrollTop;return{x:a,y:o}}function DF(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=Qr(r),u=t?Bh(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},f=Hr(1);const m=Hr(0),g=Kr(r);if((g||!g&&!o)&&((tl(r)!=="body"||Su(l))&&(d=zh(r)),Kr(r))){const v=bs(r);f=ko(r),m.x=v.x+r.clientLeft,m.y=v.y+r.clientTop}const y=l&&!g&&!o?RR(l,d,!0):Hr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+y.x,y:n.y*f.y-d.scrollTop*f.y+m.y+y.y}}function IF(e){return Array.from(e.getClientRects())}function LF(e){const t=Qr(e),n=zh(e),r=e.ownerDocument.body,a=Hn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Hn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+N0(e);const u=-n.scrollTop;return Tr(r).direction==="rtl"&&(l+=Hn(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:u}}function MF(e,t){const n=Gn(e),r=Qr(e),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){o=a.width,l=a.height;const f=C0();(!f||f&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}return{width:o,height:l,x:u,y:d}}function jF(e,t){const n=bs(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Kr(e)?ko(e):Hr(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,d=a*o.x,f=r*o.y;return{width:l,height:u,x:d,y:f}}function LA(e,t,n){let r;if(t==="viewport")r=MF(e,n);else if(t==="document")r=LF(Qr(e));else if(wr(t))r=jF(t,n);else{const a=CR(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return qf(r)}function NR(e,t){const n=pa(e);return n===t||!wr(n)||Po(n)?!1:Tr(n).position==="fixed"||NR(n,t)}function PF(e,t){const n=t.get(e);if(n)return n;let r=Pc(e,[],!1).filter(u=>wr(u)&&tl(u)!=="body"),a=null;const o=Tr(e).position==="fixed";let l=o?pa(e):e;for(;wr(l)&&!Po(l);){const u=Tr(l),d=T0(l);!d&&u.position==="fixed"&&(a=null),(o?!d&&!a:!d&&u.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Su(l)&&!d&&NR(e,l))?r=r.filter(m=>m!==l):a=u,l=pa(l)}return t.set(e,r),r}function VF(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?Bh(t)?[]:PF(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const g=LA(t,m,a);return f.top=Hn(g.top,f.top),f.right=ha(g.right,f.right),f.bottom=ha(g.bottom,f.bottom),f.left=Hn(g.left,f.left),f},LA(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function BF(e){const{width:t,height:n}=TR(e);return{width:t,height:n}}function zF(e,t,n){const r=Kr(t),a=Qr(t),o=n==="fixed",l=bs(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=Hr(0);if(r||!r&&!o)if((tl(t)!=="body"||Su(a))&&(u=zh(t)),r){const y=bs(t,!0,o,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else a&&(d.x=N0(a));const f=a&&!r&&!o?RR(a,u):Hr(0),m=l.left+u.scrollLeft-d.x-f.x,g=l.top+u.scrollTop-d.y-f.y;return{x:m,y:g,width:l.width,height:l.height}}function qg(e){return Tr(e).position==="static"}function MA(e,t){if(!Kr(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qr(e)===n&&(n=n.ownerDocument.body),n}function OR(e,t){const n=Gn(e);if(Bh(e))return n;if(!Kr(e)){let a=pa(e);for(;a&&!Po(a);){if(wr(a)&&!qg(a))return a;a=pa(a)}return n}let r=MA(e,t);for(;r&&RF(r)&&qg(r);)r=MA(r,t);return r&&Po(r)&&qg(r)&&!T0(r)?n:r||NF(e)||n}const UF=async function(e){const t=this.getOffsetParent||OR,n=this.getDimensions,r=await n(e.floating);return{reference:zF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function HF(e){return Tr(e).direction==="rtl"}const FF={convertOffsetParentRelativeRectToViewportRelativeRect:DF,getDocumentElement:Qr,getClippingRect:VF,getOffsetParent:OR,getElementRects:UF,getClientRects:IF,getDimensions:BF,getScale:ko,isElement:wr,isRTL:HF};function kR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function GF(e,t){let n=null,r;const a=Qr(e);function o(){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),o();const f=e.getBoundingClientRect(),{left:m,top:g,width:y,height:v}=f;if(u||t(),!y||!v)return;const _=nf(g),S=nf(a.clientWidth-(m+y)),A=nf(a.clientHeight-(g+v)),w=nf(m),R={rootMargin:-_+"px "+-S+"px "+-A+"px "+-w+"px",threshold:Hn(0,ha(1,d))||1};let D=!0;function N(k){const I=k[0].intersectionRatio;if(I!==d){if(!D)return l();I?l(!1,I):r=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!kR(f,e.getBoundingClientRect())&&l(),D=!1}try{n=new IntersectionObserver(N,{...R,root:a.ownerDocument})}catch{n=new IntersectionObserver(N,R)}n.observe(e)}return l(!0),o}function $F(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=R0(e),m=a||o?[...f?Pc(f):[],...Pc(t)]:[];m.forEach(w=>{a&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const g=f&&u?GF(f,n):null;let y=-1,v=null;l&&(v=new ResizeObserver(w=>{let[T]=w;T&&T.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var R;(R=v)==null||R.observe(t)})),n()}),f&&!d&&v.observe(f),v.observe(t));let _,S=d?bs(e):null;d&&A();function A(){const w=bs(e);S&&!kR(S,w)&&n(),S=w,_=requestAnimationFrame(A)}return n(),()=>{var w;m.forEach(T=>{a&&T.removeEventListener("scroll",n),o&&T.removeEventListener("resize",n)}),g==null||g(),(w=v)==null||w.disconnect(),v=null,d&&cancelAnimationFrame(_)}}const qF=AF,KF=wF,WF=xF,YF=CF,ZF=EF,jA=_F,XF=TF,QF=(e,t,n)=>{const r=new Map,a={platform:FF,...n},o={...a.platform,_c:r};return bF(e,t,{...a,platform:o})};var wf=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Kf(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(!Kf(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 o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!Kf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function DR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PA(e,t){const n=DR(e);return Math.round(t*n)/n}function Kg(e){const t=E.useRef(e);return wf(()=>{t.current=e}),t}function JF(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,g]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,v]=E.useState(r);Kf(y,r)||v(r);const[_,S]=E.useState(null),[A,w]=E.useState(null),T=E.useCallback(ee=>{ee!==k.current&&(k.current=ee,S(ee))},[]),R=E.useCallback(ee=>{ee!==I.current&&(I.current=ee,w(ee))},[]),D=o||_,N=l||A,k=E.useRef(null),I=E.useRef(null),P=E.useRef(m),V=d!=null,U=Kg(d),ue=Kg(a),oe=Kg(f),fe=E.useCallback(()=>{if(!k.current||!I.current)return;const ee={placement:t,strategy:n,middleware:y};ue.current&&(ee.platform=ue.current),QF(k.current,I.current,ee).then(ve=>{const j={...ve,isPositioned:oe.current!==!1};Y.current&&!Kf(P.current,j)&&(P.current=j,ws.flushSync(()=>{g(j)}))})},[y,t,n,ue,oe]);wf(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,g(ee=>({...ee,isPositioned:!1})))},[f]);const Y=E.useRef(!1);wf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),wf(()=>{if(D&&(k.current=D),N&&(I.current=N),D&&N){if(U.current)return U.current(D,N,fe);fe()}},[D,N,fe,U,V]);const J=E.useMemo(()=>({reference:k,floating:I,setReference:T,setFloating:R}),[T,R]),H=E.useMemo(()=>({reference:D,floating:N}),[D,N]),ne=E.useMemo(()=>{const ee={position:n,left:0,top:0};if(!H.floating)return ee;const ve=PA(H.floating,m.x),j=PA(H.floating,m.y);return u?{...ee,transform:"translate("+ve+"px, "+j+"px)",...DR(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ve,top:j}},[n,u,H.floating,m.x,m.y]);return E.useMemo(()=>({...m,update:fe,refs:J,elements:H,floatingStyles:ne}),[m,fe,J,H,ne])}const e4=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?jA({element:r.current,padding:a}).fn(n):{}:r?jA({element:r,padding:a}).fn(n):{}}}},t4=(e,t)=>({...qF(e),options:[e,t]}),n4=(e,t)=>({...KF(e),options:[e,t]}),r4=(e,t)=>({...XF(e),options:[e,t]}),i4=(e,t)=>({...WF(e),options:[e,t]}),a4=(e,t)=>({...YF(e),options:[e,t]}),s4=(e,t)=>({...ZF(e),options:[e,t]}),o4=(e,t)=>({...e4(e),options:[e,t]});var l4="Arrow",IR=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return b.jsx(tt.svg,{...o,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"})})});IR.displayName=l4;var c4=IR;function u4(e){const[t,n]=E.useState(void 0);return yn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.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 O0="Popper",[LR,MR]=vu(O0),[d4,jR]=LR(O0),PR=e=>{const{__scopePopper:t,children:n}=e,[r,a]=E.useState(null);return b.jsx(d4,{scope:t,anchor:r,onAnchorChange:a,children:n})};PR.displayName=O0;var VR="PopperAnchor",BR=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=jR(VR,n),l=E.useRef(null),u=Nt(t,l);return E.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:b.jsx(tt.div,{...a,ref:u})});BR.displayName=VR;var k0="PopperContent",[f4,h4]=LR(k0),zR=E.forwardRef((e,t)=>{var pe,we,He,Me,Ke,at;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:y=!1,updatePositionStrategy:v="optimized",onPlaced:_,...S}=e,A=jR(k0,n),[w,T]=E.useState(null),R=Nt(t,Et=>T(Et)),[D,N]=E.useState(null),k=u4(D),I=(k==null?void 0:k.width)??0,P=(k==null?void 0:k.height)??0,V=r+(o!=="center"?"-"+o:""),U=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},ue=Array.isArray(f)?f:[f],oe=ue.length>0,fe={padding:U,boundary:ue.filter(p4),altBoundary:oe},{refs:Y,floatingStyles:J,placement:H,isPositioned:ne,middlewareData:ee}=JF({strategy:"fixed",placement:V,whileElementsMounted:(...Et)=>$F(...Et,{animationFrame:v==="always"}),elements:{reference:A.anchor},middleware:[t4({mainAxis:a+P,alignmentAxis:l}),d&&n4({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?r4():void 0,...fe}),d&&i4({...fe}),a4({...fe,apply:({elements:Et,rects:Yt,availableWidth:pr,availableHeight:Dn})=>{const{width:Nr,height:z}=Yt.reference,X=Et.floating.style;X.setProperty("--radix-popper-available-width",`${pr}px`),X.setProperty("--radix-popper-available-height",`${Dn}px`),X.setProperty("--radix-popper-anchor-width",`${Nr}px`),X.setProperty("--radix-popper-anchor-height",`${z}px`)}}),D&&o4({element:D,padding:u}),g4({arrowWidth:I,arrowHeight:P}),y&&s4({strategy:"referenceHidden",...fe})]}),[ve,j]=FR(H),W=Kn(_);yn(()=>{ne&&(W==null||W())},[ne,W]);const F=(pe=ee.arrow)==null?void 0:pe.x,re=(we=ee.arrow)==null?void 0:we.y,te=((He=ee.arrow)==null?void 0:He.centerOffset)!==0,[de,ye]=E.useState();return yn(()=>{w&&ye(window.getComputedStyle(w).zIndex)},[w]),b.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:ne?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(Me=ee.transformOrigin)==null?void 0:Me.x,(Ke=ee.transformOrigin)==null?void 0:Ke.y].join(" "),...((at=ee.hide)==null?void 0:at.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(f4,{scope:n,placedSide:ve,onArrowChange:N,arrowX:F,arrowY:re,shouldHideArrow:te,children:b.jsx(tt.div,{"data-side":ve,"data-align":j,...S,ref:R,style:{...S.style,animation:ne?void 0:"none"}})})})});zR.displayName=k0;var UR="PopperArrow",m4={top:"bottom",right:"left",bottom:"top",left:"right"},HR=E.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=h4(UR,r),l=m4[o.placedSide];return b.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:b.jsx(c4,{...a,ref:n,style:{...a.style,display:"block"}})})});HR.displayName=UR;function p4(e){return e!==null}var g4=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,[f,m]=FR(n),g={start:"0%",center:"50%",end:"100%"}[m],y=(((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 f==="bottom"?(_=l?g:`${y}px`,S=`${-d}px`):f==="top"?(_=l?g:`${y}px`,S=`${r.floating.height+d}px`):f==="right"?(_=`${-d}px`,S=l?g:`${v}px`):f==="left"&&(_=`${r.floating.width+d}px`,S=l?g:`${v}px`),{data:{x:_,y:S}}}});function FR(e){const[t,n="center"]=e.split("-");return[t,n]}var y4=PR,v4=BR,b4=zR,_4=HR;function x4(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 E4=[" ","Enter","ArrowUp","ArrowDown"],S4=[" ","Enter"],Au="Select",[Uh,Hh,A4]=tC(Au),[nl,FQ]=vu(Au,[A4,MR]),Fh=MR(),[w4,Ca]=nl(Au),[T4,C4]=nl(Au),GR=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:f,name:m,autoComplete:g,disabled:y,required:v,form:_}=e,S=Fh(t),[A,w]=E.useState(null),[T,R]=E.useState(null),[D,N]=E.useState(!1),k=uF(f),[I=!1,P]=Pf({prop:r,defaultProp:a,onChange:o}),[V,U]=Pf({prop:l,defaultProp:u,onChange:d}),ue=E.useRef(null),oe=A?_||!!A.closest("form"):!0,[fe,Y]=E.useState(new Set),J=Array.from(fe).map(H=>H.props.value).join(";");return b.jsx(y4,{...S,children:b.jsxs(w4,{required:v,scope:t,trigger:A,onTriggerChange:w,valueNode:T,onValueNodeChange:R,valueNodeHasChildren:D,onValueNodeHasChildrenChange:N,contentId:fr(),value:V,onValueChange:U,open:I,onOpenChange:P,dir:k,triggerPointerDownPosRef:ue,disabled:y,children:[b.jsx(Uh.Provider,{scope:t,children:b.jsx(T4,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(H=>{Y(ne=>new Set(ne).add(H))},[]),onNativeOptionRemove:E.useCallback(H=>{Y(ne=>{const ee=new Set(ne);return ee.delete(H),ee})},[]),children:n})}),oe?b.jsxs(gN,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:g,value:V,onChange:H=>U(H.target.value),disabled:y,form:_,children:[V===void 0?b.jsx("option",{value:""}):null,Array.from(fe)]},J):null]})})};GR.displayName=Au;var $R="SelectTrigger",qR=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=Fh(n),l=Ca($R,n),u=l.disabled||r,d=Nt(t,l.onTriggerChange),f=Hh(n),m=E.useRef("touch"),[g,y,v]=yN(S=>{const A=f().filter(R=>!R.disabled),w=A.find(R=>R.value===l.value),T=vN(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(v4,{asChild:!0,...o,children:b.jsx(tt.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":pN(l.value)?"":void 0,...a,ref:d,onClick:lt(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&_(S)}),onPointerDown:lt(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:lt(a.onKeyDown,S=>{const A=g.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&y(S.key),!(A&&S.key===" ")&&E4.includes(S.key)&&(_(),S.preventDefault())})})})});qR.displayName=$R;var KR="SelectValue",WR=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:l="",...u}=e,d=Ca(KR,n),{onValueNodeHasChildrenChange:f}=d,m=o!==void 0,g=Nt(t,d.onValueNodeChange);return yn(()=>{f(m)},[f,m]),b.jsx(tt.span,{...u,ref:g,style:{pointerEvents:"none"},children:pN(d.value)?b.jsx(b.Fragment,{children:l}):o})});WR.displayName=KR;var R4="SelectIcon",YR=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return b.jsx(tt.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});YR.displayName=R4;var N4="SelectPortal",ZR=e=>b.jsx(Nh,{asChild:!0,...e});ZR.displayName=N4;var _s="SelectContent",XR=E.forwardRef((e,t)=>{const n=Ca(_s,e.__scopeSelect),[r,a]=E.useState();if(yn(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?ws.createPortal(b.jsx(QR,{scope:e.__scopeSelect,children:b.jsx(Uh.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),o):null}return b.jsx(JR,{...e,ref:t})});XR.displayName=_s;var _r=10,[QR,Ra]=nl(_s),O4="SelectContentImpl",JR=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:v,sticky:_,hideWhenDetached:S,avoidCollisions:A,...w}=e,T=Ca(_s,n),[R,D]=E.useState(null),[N,k]=E.useState(null),I=Nt(t,pe=>D(pe)),[P,V]=E.useState(null),[U,ue]=E.useState(null),oe=Hh(n),[fe,Y]=E.useState(!1),J=E.useRef(!1);E.useEffect(()=>{if(R)return eR(R)},[R]),$C();const H=E.useCallback(pe=>{const[we,...He]=oe().map(at=>at.ref.current),[Me]=He.slice(-1),Ke=document.activeElement;for(const at of pe)if(at===Ke||(at==null||at.scrollIntoView({block:"nearest"}),at===we&&N&&(N.scrollTop=0),at===Me&&N&&(N.scrollTop=N.scrollHeight),at==null||at.focus(),document.activeElement!==Ke))return},[oe,N]),ne=E.useCallback(()=>H([P,R]),[H,P,R]);E.useEffect(()=>{fe&&ne()},[fe,ne]);const{onOpenChange:ee,triggerPointerDownPosRef:ve}=T;E.useEffect(()=>{if(R){let pe={x:0,y:0};const we=Me=>{var Ke,at;pe={x:Math.abs(Math.round(Me.pageX)-(((Ke=ve.current)==null?void 0:Ke.x)??0)),y:Math.abs(Math.round(Me.pageY)-(((at=ve.current)==null?void 0:at.y)??0))}},He=Me=>{pe.x<=10&&pe.y<=10?Me.preventDefault():R.contains(Me.target)||ee(!1),document.removeEventListener("pointermove",we),ve.current=null};return ve.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",He,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",He,{capture:!0})}}},[R,ee,ve]),E.useEffect(()=>{const pe=()=>ee(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[ee]);const[j,W]=yN(pe=>{const we=oe().filter(Ke=>!Ke.disabled),He=we.find(Ke=>Ke.ref.current===document.activeElement),Me=vN(we,pe,He);Me&&setTimeout(()=>Me.ref.current.focus())}),F=E.useCallback((pe,we,He)=>{const Me=!J.current&&!He;(T.value!==void 0&&T.value===we||Me)&&(V(pe),Me&&(J.current=!0))},[T.value]),re=E.useCallback(()=>R==null?void 0:R.focus(),[R]),te=E.useCallback((pe,we,He)=>{const Me=!J.current&&!He;(T.value!==void 0&&T.value===we||Me)&&ue(pe)},[T.value]),de=r==="popper"?qy:eN,ye=de===qy?{side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:v,sticky:_,hideWhenDetached:S,avoidCollisions:A}:{};return b.jsx(QR,{scope:n,content:R,viewport:N,onViewportChange:k,itemRefCallback:F,selectedItem:P,onItemLeave:re,itemTextRefCallback:te,focusSelectedItem:ne,selectedItemText:U,position:r,isPositioned:fe,searchRef:j,children:b.jsx(g0,{as:ps,allowPinchZoom:!0,children:b.jsx(p0,{asChild:!0,trapped:T.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:lt(a,pe=>{var we;(we=T.trigger)==null||we.focus({preventScroll:!0}),pe.preventDefault()}),children:b.jsx(Rh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:b.jsx(de,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:pe=>pe.preventDefault(),...w,...ye,onPlaced:()=>Y(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:lt(w.onKeyDown,pe=>{const we=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!we&&pe.key.length===1&&W(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Me=oe().filter(Ke=>!Ke.disabled).map(Ke=>Ke.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Me=Me.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Ke=pe.target,at=Me.indexOf(Ke);Me=Me.slice(at+1)}setTimeout(()=>H(Me)),pe.preventDefault()}})})})})})})});JR.displayName=O4;var k4="SelectItemAlignedPosition",eN=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=Ca(_s,n),l=Ra(_s,n),[u,d]=E.useState(null),[f,m]=E.useState(null),g=Nt(t,I=>m(I)),y=Hh(n),v=E.useRef(!1),_=E.useRef(!0),{viewport:S,selectedItem:A,selectedItemText:w,focusSelectedItem:T}=l,R=E.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&f&&S&&A&&w){const I=o.trigger.getBoundingClientRect(),P=f.getBoundingClientRect(),V=o.valueNode.getBoundingClientRect(),U=w.getBoundingClientRect();if(o.dir!=="rtl"){const Ke=U.left-P.left,at=V.left-Ke,Et=I.left-at,Yt=I.width+Et,pr=Math.max(Yt,P.width),Dn=window.innerWidth-_r,Nr=NA(at,[_r,Math.max(_r,Dn-pr)]);u.style.minWidth=Yt+"px",u.style.left=Nr+"px"}else{const Ke=P.right-U.right,at=window.innerWidth-V.right-Ke,Et=window.innerWidth-I.right-at,Yt=I.width+Et,pr=Math.max(Yt,P.width),Dn=window.innerWidth-_r,Nr=NA(at,[_r,Math.max(_r,Dn-pr)]);u.style.minWidth=Yt+"px",u.style.right=Nr+"px"}const ue=y(),oe=window.innerHeight-_r*2,fe=S.scrollHeight,Y=window.getComputedStyle(f),J=parseInt(Y.borderTopWidth,10),H=parseInt(Y.paddingTop,10),ne=parseInt(Y.borderBottomWidth,10),ee=parseInt(Y.paddingBottom,10),ve=J+H+fe+ee+ne,j=Math.min(A.offsetHeight*5,ve),W=window.getComputedStyle(S),F=parseInt(W.paddingTop,10),re=parseInt(W.paddingBottom,10),te=I.top+I.height/2-_r,de=oe-te,ye=A.offsetHeight/2,pe=A.offsetTop+ye,we=J+H+pe,He=ve-we;if(we<=te){const Ke=ue.length>0&&A===ue[ue.length-1].ref.current;u.style.bottom="0px";const at=f.clientHeight-S.offsetTop-S.offsetHeight,Et=Math.max(de,ye+(Ke?re:0)+at+ne),Yt=we+Et;u.style.height=Yt+"px"}else{const Ke=ue.length>0&&A===ue[0].ref.current;u.style.top="0px";const Et=Math.max(te,J+S.offsetTop+(Ke?F:0)+ye)+He;u.style.height=Et+"px",S.scrollTop=we-te+S.offsetTop}u.style.margin=`${_r}px 0`,u.style.minHeight=j+"px",u.style.maxHeight=oe+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[y,o.trigger,o.valueNode,u,f,S,A,w,o.dir,r]);yn(()=>R(),[R]);const[D,N]=E.useState();yn(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const k=E.useCallback(I=>{I&&_.current===!0&&(R(),T==null||T(),_.current=!1)},[R,T]);return b.jsx(I4,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:k,children:b.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:b.jsx(tt.div,{...a,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});eN.displayName=k4;var D4="SelectPopperPosition",qy=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=_r,...o}=e,l=Fh(n);return b.jsx(b4,{...l,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});qy.displayName=D4;var[I4,D0]=nl(_s,{}),Ky="SelectViewport",tN=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=Ra(Ky,n),l=D0(Ky,n),u=Nt(t,o.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(tt.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:lt(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:y}=l;if(y!=null&&y.current&&g){const v=Math.abs(d.current-m.scrollTop);if(v>0){const _=window.innerHeight-_r*2,S=parseFloat(g.style.minHeight),A=parseFloat(g.style.height),w=Math.max(S,A);if(w<_){const T=w+v,R=Math.min(_,T),D=T-R;g.style.height=R+"px",g.style.bottom==="0px"&&(m.scrollTop=D>0?D:0,g.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});tN.displayName=Ky;var nN="SelectGroup",[L4,M4]=nl(nN),rN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=fr();return b.jsx(L4,{scope:n,id:a,children:b.jsx(tt.div,{role:"group","aria-labelledby":a,...r,ref:t})})});rN.displayName=nN;var iN="SelectLabel",aN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=M4(iN,n);return b.jsx(tt.div,{id:a.id,...r,ref:t})});aN.displayName=iN;var Wf="SelectItem",[j4,sN]=nl(Wf),oN=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...l}=e,u=Ca(Wf,n),d=Ra(Wf,n),f=u.value===r,[m,g]=E.useState(o??""),[y,v]=E.useState(!1),_=Nt(t,T=>{var R;return(R=d.itemRefCallback)==null?void 0:R.call(d,T,r,a)}),S=fr(),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(j4,{scope:n,value:r,disabled:a,textId:S,isSelected:f,onItemTextChange:E.useCallback(T=>{g(R=>R||((T==null?void 0:T.textContent)??"").trim())},[]),children:b.jsx(Uh.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:b.jsx(tt.div,{role:"option","aria-labelledby":S,"data-highlighted":y?"":void 0,"aria-selected":f&&y,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:_,onFocus:lt(l.onFocus,()=>v(!0)),onBlur:lt(l.onBlur,()=>v(!1)),onClick:lt(l.onClick,()=>{A.current!=="mouse"&&w()}),onPointerUp:lt(l.onPointerUp,()=>{A.current==="mouse"&&w()}),onPointerDown:lt(l.onPointerDown,T=>{A.current=T.pointerType}),onPointerMove:lt(l.onPointerMove,T=>{var R;A.current=T.pointerType,a?(R=d.onItemLeave)==null||R.call(d):A.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:lt(l.onPointerLeave,T=>{var R;T.currentTarget===document.activeElement&&((R=d.onItemLeave)==null||R.call(d))}),onKeyDown:lt(l.onKeyDown,T=>{var D;((D=d.searchRef)==null?void 0:D.current)!==""&&T.key===" "||(S4.includes(T.key)&&w(),T.key===" "&&T.preventDefault())})})})})});oN.displayName=Wf;var gc="SelectItemText",lN=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,l=Ca(gc,n),u=Ra(gc,n),d=sN(gc,n),f=C4(gc,n),[m,g]=E.useState(null),y=Nt(t,w=>g(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}=f;return yn(()=>(S(_),()=>A(_)),[S,A,_]),b.jsxs(b.Fragment,{children:[b.jsx(tt.span,{id:d.textId,...o,ref:y}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?ws.createPortal(o.children,l.valueNode):null]})});lN.displayName=gc;var cN="SelectItemIndicator",uN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return sN(cN,n).isSelected?b.jsx(tt.span,{"aria-hidden":!0,...r,ref:t}):null});uN.displayName=cN;var Wy="SelectScrollUpButton",dN=E.forwardRef((e,t)=>{const n=Ra(Wy,e.__scopeSelect),r=D0(Wy,e.__scopeSelect),[a,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return yn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;o(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?b.jsx(hN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});dN.displayName=Wy;var Yy="SelectScrollDownButton",fN=E.forwardRef((e,t)=>{const n=Ra(Yy,e.__scopeSelect),r=D0(Yy,e.__scopeSelect),[a,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return yn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;o(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?b.jsx(hN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});fN.displayName=Yy;var hN=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=Ra("SelectScrollButton",n),l=E.useRef(null),u=Hh(n),d=E.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return E.useEffect(()=>()=>d(),[d]),yn(()=>{var m;const f=u().find(g=>g.ref.current===document.activeElement);(m=f==null?void 0:f.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),b.jsx(tt.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:lt(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:lt(a.onPointerMove,()=>{var f;(f=o.onItemLeave)==null||f.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:lt(a.onPointerLeave,()=>{d()})})}),P4="SelectSeparator",mN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(tt.div,{"aria-hidden":!0,...r,ref:t})});mN.displayName=P4;var Zy="SelectArrow",V4=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Fh(n),o=Ca(Zy,n),l=Ra(Zy,n);return o.open&&l.position==="popper"?b.jsx(_4,{...a,...r,ref:t}):null});V4.displayName=Zy;function pN(e){return e===""||e===void 0}var gN=E.forwardRef((e,t)=>{const{value:n,...r}=e,a=E.useRef(null),o=Nt(t,a),l=x4(n);return E.useEffect(()=>{const u=a.current,d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==n&&m){const g=new Event("change",{bubbles:!0});m.call(u,n),u.dispatchEvent(g)}},[l,n]),b.jsx(Oh,{asChild:!0,children:b.jsx("select",{...r,ref:o,defaultValue:n})})});gN.displayName="BubbleSelect";function yN(e){const t=Kn(e),n=E.useRef(""),r=E.useRef(0),a=E.useCallback(l=>{const u=n.current+l;t(u),function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(u)},[t]),o=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function vN(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=B4(e,Math.max(o,0));a.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function B4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var z4=GR,U4=qR,H4=WR,F4=YR,G4=ZR,$4=XR,q4=tN,K4=rN,W4=aN,Y4=oN,Z4=lN,X4=uN,Q4=dN,J4=fN,e3=mN;const t3=z4,n3=K4,r3=H4,i3=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>b.jsxs(U4,{className:Te("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(F4,{asChild:!0,children:b.jsx(IV,{className:"size-4 opacity-50"})})]}),bN=({className:e,...t})=>b.jsx(Q4,{className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(kV,{})}),_N=({className:e,...t})=>b.jsx(J4,{className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(M1,{})}),a3=({className:e,children:t,position:n="popper",...r})=>b.jsx(G4,{children:b.jsxs($4,{className:Te("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(bN,{}),b.jsx(q4,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(_N,{})]})}),s3=({className:e,...t})=>b.jsx(W4,{className:Te("px-1 py-0.5 text-sm font-semibold",e),...t}),o3=({className:e,children:t,...n})=>b.jsxs(Y4,{className:Te("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(X4,{children:b.jsx(Zo,{className:"size-4"})})}),b.jsx(Z4,{children:t})]}),l3=({className:e,...t})=>b.jsx(e3,{className:Te("-mx-1 my-1 h-px bg-red-300",e),...t}),je=t3;je.Group=n3;je.Value=r3;je.Trigger=i3;je.ScrollUpButton=bN;je.ScrollDownButton=_N;je.Content=a3;je.Label=s3;je.Item=o3;je.Separator=l3;const c3=e=>(e==null?void 0:e.getAttribute("aria-selected"))==="true",u3=(e,t=c3,n=!1)=>{const[r,a]=E.useState(null),[o,l]=E.useState(null),u=e.current.length;return E.useEffect(()=>{const d=()=>{let S=null;if(o?S=o: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 f=[];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"]}),f.push(A)}});const m=[],g=S=>{if(!S)return;const A=new ResizeObserver(()=>{d()});A.observe(S),m.push(A)},y=e.current.find(t)??null;y&&g(y),o&&g(o);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),f.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,o,u]),{choiceIndicatorPosition:r}},d3=[{content:"Off",value:!1},{content:"On",value:!0}],f3=mr("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"}}),h3=mr("z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out 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"}}),m3=mr("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"}}}),wu=({choices:e=d3,value:t,defaultValue:n,onChange:r,color:a="primary",size:o="md",className:l})=>{const[u,d]=E.useState(t??n??e[0].value),f=E.useRef([]),m=E.useRef(null),{choiceIndicatorPosition:g}=u3(f),y=v=>{d(v),r==null||r(v)};return E.useEffect(()=>{t!==void 0&&d(t)},[t]),b.jsx("div",{className:f3({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",R=A===u;return E.createElement("button",{...w,className:Te(h3({size:o})),key:T?A:_,role:"tab",onClick:()=>y(A),"aria-selected":R,disabled:R,ref:D=>{f.current[_]=D}},S)}),g&&b.jsx("div",{className:Te(m3({color:a})),style:g,ref:m})]})})},p3=e=>{const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=Ta();return b.jsx(ps,{id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})},g3=e=>{const{formDescriptionId:t}=Ta();return b.jsx("p",{className:"text-neutral text-sm",id:t,...e})},y3=({children:e,...t})=>{const{error:n,formMessageId:r}=Ta(),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},Gh=({label:e,description:t,isRequired:n,info:r,children:a,showErrorMessage:o=!0,htmlFor:l})=>b.jsxs(et.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(ER,{isRequired:n,info:r,htmlFor:l,children:e}),t&&b.jsx(et.Description,{children:t})]}),b.jsx(et.Control,{children:a}),o&&b.jsx(et.Message,{"data-testid":"error-message"})]}),v3=({field:e,name:t,label:n,Element:r,isRequired:a=!1,info:o,description:l,showErrorMessage:u=!0,...d})=>{const{error:f}=Ta();return b.jsx(Gh,{htmlFor:t,label:n,description:l,isRequired:a,info:o,showErrorMessage:u,"aria-invalid":!!f,children:b.jsx(r,{"data-testid":"element",id:t,...e,...d,children:d.children})})},Na=e=>{const{control:t}=wa();return b.jsx(et.Field,{control:t,name:e.name,render:({field:n})=>b.jsx(v3,{...e,field:n})})},b3=e=>b.jsx(Na,{id:e.name,"data-testid":e.name,Element:Jo,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),_3=({autoComplete:e,...t})=>b.jsx(Na,{Element:fU,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}),x3=e=>b.jsx(Na,{Element:zC,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}),E3=e=>b.jsx(Na,{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:HC,...e}),S3=e=>b.jsx(Na,{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:FC,...e}),A3=e=>b.jsx(Na,{Element:m0,id:e.name,"data-testid":e.name,...e}),w3=({inputLabel:e,...t})=>b.jsx(dU,{...t,label:e}),T3=({autoComplete:e,...t})=>b.jsx(Na,{Element:w3,id:t.name,"data-testid":t.name,autoComplete:e,minLength:6,maxLength:255,...t}),C3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=wa();return b.jsx(et.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ta();return b.jsx(Gh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:b.jsx(mn,{onValueChange:f.onChange,values:f.value,...u,children:l})})}})},R3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=wa();return b.jsx(et.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ta();return b.jsx(Gh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:b.jsx(je,{onValueChange:f.onChange,defaultValue:f.value,...u,children:l})})}})},N3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=wa();return b.jsx(et.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ta();return b.jsx(Gh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:b.jsx(wu,{...f,...u,children:l})})}})},et=sU;et.Description=g3;et.Control=p3;et.Field=cU;et.Item=lU;et.Label=ER;et.Message=y3;et.Element=Na;et.Input=b3;et.InputPassword=_3;et.Checkbox=T3;et.TextArea=x3;et.AutoSizedTextArea=A3;et.Button=gt;et.Select=R3;et.MultiSelect=C3;et.EditableFieldInput=E3;et.EditableFieldTextArea=S3;et.SwitchSelector=N3;var ut;(function(e){e.assertEqual=a=>a;function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const o={};for(const l of a)o[l]=l;return o},e.getValidEnumValues=a=>{const o=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),l={};for(const u of o)l[u]=a[u];return e.objectValues(l)},e.objectValues=a=>e.objectKeys(a).map(function(o){return a[o]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const o=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&o.push(l);return o},e.find=(a,o)=>{for(const l of a)if(o(l))return l},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function r(a,o=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(a,o)=>typeof o=="bigint"?o.toString():o})(ut||(ut={}));var Xy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Xy||(Xy={}));const Ce=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xi=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},me=ut.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),O3=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class $n extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},a=o=>{for(const l of o.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(l))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof $n))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ut.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.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}}get formErrors(){return this.flatten()}}$n.create=e=>new $n(e);const Vo=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ut.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${ut.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ut.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${ut.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,ut.assertNever(e)}return{message:n}};let xN=Vo;function k3(e){xN=e}function Yf(){return xN}const Zf=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,o=[...n,...a.path||[]],l={...a,path:o};if(a.message!==void 0)return{...a,path:o,message:a.message};let u="";const d=r.filter(f=>!!f).slice().reverse();for(const f of d)u=f(l,{data:t,defaultError:u}).message;return{...a,path:o,message:u}},D3=[];function Se(e,t){const n=Yf(),r=Zf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Vo?void 0:Vo].filter(a=>!!a)});e.common.issues.push(r)}class vn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return Ge;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const o=await a.key,l=await a.value;r.push({key:o,value:l})}return vn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:o,value:l}=a;if(o.status==="aborted"||l.status==="aborted")return Ge;o.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(r[o.value]=l.value)}return{status:t.value,value:r}}}const Ge=Object.freeze({status:"aborted"}),Eo=e=>({status:"dirty",value:e}),An=e=>({status:"valid",value:e}),Qy=e=>e.status==="aborted",Jy=e=>e.status==="dirty",xs=e=>e.status==="valid",Vc=e=>typeof Promise<"u"&&e instanceof Promise;function Xf(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function EN(e,t,n,r,a){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ie||(Ie={}));var yc,vc;class Wr{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const VA=(e,t)=>{if(xs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new $n(e.common.issues);return this._error=n,this._error}}};function Ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(l,u)=>{var d,f;const{message:m}=e;return l.code==="invalid_enum_value"?{message:m??u.defaultError}:typeof u.data>"u"?{message:(d=m??r)!==null&&d!==void 0?d:u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:(f=m??n)!==null&&f!==void 0?f:u.defaultError}},description:a}}class Qe{get description(){return this._def.description}_getType(t){return xi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new vn,ctx:{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Vc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const a={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xi(t)},o=this._parseSync({data:t,path:a.path,parent:a});return VA(a,o)}"~validate"(t){var n,r;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xi(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:a});return xs(o)?{value:o.value}:{issues:a.common.issues}}catch(o){!((r=(n=o==null?void 0:o.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:a}).then(o=>xs(o)?{value:o.value}:{issues:a.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xi(t)},a=this._parse({data:t,path:r.path,parent:r}),o=await(Vc(a)?a:Promise.resolve(a));return VA(r,o)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,o)=>{const l=t(a),u=()=>o.addIssue({code:me.custom,...r(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new Cr({schema:this,typeName:Ue.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Fr.create(this,this._def)}nullable(){return ba.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ar.create(this)}promise(){return zo.create(this,this._def)}or(t){return Hc.create([this,t],this._def)}and(t){return Fc.create(this,t,this._def)}transform(t){return new Cr({...Ye(this._def),schema:this,typeName:Ue.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Wc({...Ye(this._def),innerType:this,defaultValue:n,typeName:Ue.ZodDefault})}brand(){return new I0({typeName:Ue.ZodBranded,type:this,...Ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Yc({...Ye(this._def),innerType:this,catchValue:n,typeName:Ue.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Tu.create(this,t)}readonly(){return Zc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const I3=/^c[^\s-]{8,}$/i,L3=/^[0-9a-z]+$/,M3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,j3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,P3=/^[a-z0-9_-]{21}$/i,V3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,B3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,z3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,U3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wg;const H3=/^(?:(?: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])$/,F3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,G3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,$3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,q3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,K3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,SN="((\\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])))",W3=new RegExp(`^${SN}$`);function AN(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 Y3(e){return new RegExp(`^${AN(e)}$`)}function wN(e){let t=`${SN}T${AN(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Z3(e,t){return!!((t==="v4"||!t)&&H3.test(e)||(t==="v6"||!t)&&G3.test(e))}function X3(e,t){if(!V3.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||!a.typ||!a.alg||t&&a.alg!==t)}catch{return!1}}function Q3(e,t){return!!((t==="v4"||!t)&&F3.test(e)||(t==="v6"||!t)&&$3.test(e))}class Sr extends Qe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const o=this._getOrReturnCtx(t);return Se(o,{code:me.invalid_type,expected:Ce.string,received:o.parsedType}),Ge}const r=new vn;let a;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const l=t.data.length>o.value,u=t.data.length<o.value;(l||u)&&(a=this._getOrReturnCtx(t,a),l?Se(a,{code:me.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&Se(a,{code:me.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")z3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"email",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Wg||(Wg=new RegExp(U3,"u")),Wg.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"emoji",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")j3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"uuid",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")P3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"nanoid",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")I3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cuid",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")L3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cuid2",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")M3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"ulid",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Se(a,{validation:"url",code:me.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"regex",code:me.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?wN(o).test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?W3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Y3(o).test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?B3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"duration",code:me.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Z3(t.data,o.version)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"ip",code:me.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?X3(t.data,o.alg)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"jwt",code:me.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Q3(t.data,o.version)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cidr",code:me.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?q3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"base64",code:me.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?K3.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"base64url",code:me.invalid_string,message:o.message}),r.dirty()):ut.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:me.invalid_string,...Ie.errToObj(r)})}_addCheck(t){return new Sr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ie.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ie.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ie.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Ie.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ie.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ie.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ie.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ie.errToObj(n)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new Sr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Sr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Sr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Sr.create=e=>{var t;return new Sr({checks:[],typeName:Ue.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ye(e)})};function J3(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,o=parseInt(e.toFixed(a).replace(".","")),l=parseInt(t.toFixed(a).replace(".",""));return o%l/Math.pow(10,a)}class ga extends Qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const o=this._getOrReturnCtx(t);return Se(o,{code:me.invalid_type,expected:Ce.number,received:o.parsedType}),Ge}let r;const a=new vn;for(const o of this._def.checks)o.kind==="int"?ut.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:me.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?J3(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:me.not_finite,message:o.message}),a.dirty()):ut.assertNever(o);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,a){return new ga({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(a)}]})}_addCheck(t){return new ga({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ut.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ga.create=e=>new ga({checks:[],typeName:Ue.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ye(e)});class ya extends Qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ce.bigint)return this._getInvalidInput(t);let r;const a=new vn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):ut.assertNever(o);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Se(n,{code:me.invalid_type,expected:Ce.bigint,received:n.parsedType}),Ge}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,a){return new ya({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(a)}]})}_addCheck(t){return new ya({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ya.create=e=>{var t;return new ya({checks:[],typeName:Ue.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ye(e)})};class Bc extends Qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:Ce.boolean,received:r.parsedType}),Ge}return An(t.data)}}Bc.create=e=>new Bc({typeName:Ue.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ye(e)});class Es extends Qe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const o=this._getOrReturnCtx(t);return Se(o,{code:me.invalid_type,expected:Ce.date,received:o.parsedType}),Ge}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Se(o,{code:me.invalid_date}),Ge}const r=new vn;let a;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):ut.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Es({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Es.create=e=>new Es({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ue.ZodDate,...Ye(e)});class Qf extends Qe{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:Ce.symbol,received:r.parsedType}),Ge}return An(t.data)}}Qf.create=e=>new Qf({typeName:Ue.ZodSymbol,...Ye(e)});class zc extends Qe{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:Ce.undefined,received:r.parsedType}),Ge}return An(t.data)}}zc.create=e=>new zc({typeName:Ue.ZodUndefined,...Ye(e)});class Uc extends Qe{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:Ce.null,received:r.parsedType}),Ge}return An(t.data)}}Uc.create=e=>new Uc({typeName:Ue.ZodNull,...Ye(e)});class Bo extends Qe{constructor(){super(...arguments),this._any=!0}_parse(t){return An(t.data)}}Bo.create=e=>new Bo({typeName:Ue.ZodAny,...Ye(e)});class hs extends Qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return An(t.data)}}hs.create=e=>new hs({typeName:Ue.ZodUnknown,...Ye(e)});class Oi extends Qe{_parse(t){const n=this._getOrReturnCtx(t);return Se(n,{code:me.invalid_type,expected:Ce.never,received:n.parsedType}),Ge}}Oi.create=e=>new Oi({typeName:Ue.ZodNever,...Ye(e)});class Jf extends Qe{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:Ce.void,received:r.parsedType}),Ge}return An(t.data)}}Jf.create=e=>new Jf({typeName:Ue.ZodVoid,...Ye(e)});class Ar extends Qe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Ce.array)return Se(n,{code:me.invalid_type,expected:Ce.array,received:n.parsedType}),Ge;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(l||u)&&(Se(n,{code:l?me.too_big:me.too_small,minimum:u?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(Se(n,{code:me.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(Se(n,{code:me.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,u)=>a.type._parseAsync(new Wr(n,l,n.path,u)))).then(l=>vn.mergeArray(r,l));const o=[...n.data].map((l,u)=>a.type._parseSync(new Wr(n,l,n.path,u)));return vn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ar({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new Ar({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new Ar({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}Ar.create=(e,t)=>new Ar({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ue.ZodArray,...Ye(t)});function _o(e){if(e instanceof Tt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Fr.create(_o(r))}return new Tt({...e._def,shape:()=>t})}else return e instanceof Ar?new Ar({...e._def,type:_o(e.element)}):e instanceof Fr?Fr.create(_o(e.unwrap())):e instanceof ba?ba.create(_o(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>_o(t))):e}class Tt extends Qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ut.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ce.object){const f=this._getOrReturnCtx(t);return Se(f,{code:me.invalid_type,expected:Ce.object,received:f.parsedType}),Ge}const{status:r,ctx:a}=this._processInputParams(t),{shape:o,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof Oi&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||u.push(f);const d=[];for(const f of l){const m=o[f],g=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Wr(a,g,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof Oi){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")u.length>0&&(Se(a,{code:me.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const g=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new Wr(a,g,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const g=await m.key,y=await m.value;f.push({key:g,value:y,alwaysSet:m.alwaysSet})}return f}).then(f=>vn.mergeObjectSync(r,f)):vn.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new Tt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,o,l,u;const d=(l=(o=(a=this._def).errorMap)===null||o===void 0?void 0:o.call(a,n,r).message)!==null&&l!==void 0?l:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=Ie.errToObj(t).message)!==null&&u!==void 0?u:d}:{message:d}}}:{}})}strip(){return new Tt({...this._def,unknownKeys:"strip"})}passthrough(){return new Tt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Tt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Tt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ue.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Tt({...this._def,catchall:t})}pick(t){const n={};return ut.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Tt({...this._def,shape:()=>n})}omit(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Tt({...this._def,shape:()=>n})}deepPartial(){return _o(this)}partial(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}),new Tt({...this._def,shape:()=>n})}required(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Fr;)o=o._def.innerType;n[r]=o}}),new Tt({...this._def,shape:()=>n})}keyof(){return TN(ut.objectKeys(this.shape))}}Tt.create=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strip",catchall:Oi.create(),typeName:Ue.ZodObject,...Ye(t)});Tt.strictCreate=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strict",catchall:Oi.create(),typeName:Ue.ZodObject,...Ye(t)});Tt.lazycreate=(e,t)=>new Tt({shape:e,unknownKeys:"strip",catchall:Oi.create(),typeName:Ue.ZodObject,...Ye(t)});class Hc extends Qe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const l=o.map(u=>new $n(u.ctx.common.issues));return Se(n,{code:me.invalid_union,unionErrors:l}),Ge}if(n.common.async)return Promise.all(r.map(async o=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(a);{let o;const l=[];for(const d of r){const f={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!o&&(o={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=l.map(d=>new $n(d));return Se(n,{code:me.invalid_union,unionErrors:u}),Ge}}get options(){return this._def.options}}Hc.create=(e,t)=>new Hc({options:e,typeName:Ue.ZodUnion,...Ye(t)});const _i=e=>e instanceof $c?_i(e.schema):e instanceof Cr?_i(e.innerType()):e instanceof qc?[e.value]:e instanceof va?e.options:e instanceof Kc?ut.objectValues(e.enum):e instanceof Wc?_i(e._def.innerType):e instanceof zc?[void 0]:e instanceof Uc?[null]:e instanceof Fr?[void 0,..._i(e.unwrap())]:e instanceof ba?[null,..._i(e.unwrap())]:e instanceof I0||e instanceof Zc?_i(e.unwrap()):e instanceof Yc?_i(e._def.innerType):[];class $h extends Qe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return Se(n,{code:me.invalid_type,expected:Ce.object,received:n.parsedType}),Ge;const r=this.discriminator,a=n.data[r],o=this.optionsMap.get(a);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Se(n,{code:me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const o of n){const l=_i(o.shape[t]);if(!l.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of l){if(a.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);a.set(u,o)}}return new $h({typeName:Ue.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,...Ye(r)})}}function ev(e,t){const n=xi(e),r=xi(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const a=ut.objectKeys(t),o=ut.objectKeys(e).filter(u=>a.indexOf(u)!==-1),l={...e,...t};for(const u of o){const d=ev(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let o=0;o<e.length;o++){const l=e[o],u=t[o],d=ev(l,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Ce.date&&r===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Fc extends Qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(o,l)=>{if(Qy(o)||Qy(l))return Ge;const u=ev(o.value,l.value);return u.valid?((Jy(o)||Jy(l))&&n.dirty(),{status:n.value,value:u.data}):(Se(r,{code:me.invalid_intersection_types}),Ge)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,l])=>a(o,l)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Fc.create=(e,t,n)=>new Fc({left:e,right:t,typeName:Ue.ZodIntersection,...Ye(n)});class Yr extends Qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return Se(r,{code:me.invalid_type,expected:Ce.array,received:r.parsedType}),Ge;if(r.data.length<this._def.items.length)return Se(r,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ge;!this._def.rest&&r.data.length>this._def.items.length&&(Se(r,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new Wr(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(o).then(l=>vn.mergeArray(n,l)):vn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Yr({...this._def,rest:t})}}Yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:e,typeName:Ue.ZodTuple,rest:null,...Ye(t)})};class Gc extends Qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.object)return Se(r,{code:me.invalid_type,expected:Ce.object,received:r.parsedType}),Ge;const a=[],o=this._def.keyType,l=this._def.valueType;for(const u in r.data)a.push({key:o._parse(new Wr(r,u,r.path,u)),value:l._parse(new Wr(r,r.data[u],r.path,u)),alwaysSet:u in r.data});return r.common.async?vn.mergeObjectAsync(n,a):vn.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Qe?new Gc({keyType:t,valueType:n,typeName:Ue.ZodRecord,...Ye(r)}):new Gc({keyType:Sr.create(),valueType:t,typeName:Ue.ZodRecord,...Ye(n)})}}class eh extends Qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return Se(r,{code:me.invalid_type,expected:Ce.map,received:r.parsedType}),Ge;const a=this._def.keyType,o=this._def.valueType,l=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new Wr(r,u,r.path,[f,"key"])),value:o._parse(new Wr(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return Ge;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return Ge;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}eh.create=(e,t,n)=>new eh({valueType:t,keyType:e,typeName:Ue.ZodMap,...Ye(n)});class Ss extends Qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return Se(r,{code:me.invalid_type,expected:Ce.set,received:r.parsedType}),Ge;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Se(r,{code:me.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(Se(r,{code:me.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const o=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return Ge;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((d,f)=>o._parse(new Wr(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new Ss({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new Ss({...this._def,maxSize:{value:t,message:Ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ss.create=(e,t)=>new Ss({valueType:e,minSize:null,maxSize:null,typeName:Ue.ZodSet,...Ye(t)});class Do extends Qe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.function)return Se(n,{code:me.invalid_type,expected:Ce.function,received:n.parsedType}),Ge;function r(u,d){return Zf({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yf(),Vo].filter(f=>!!f),issueData:{code:me.invalid_arguments,argumentsError:d}})}function a(u,d){return Zf({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yf(),Vo].filter(f=>!!f),issueData:{code:me.invalid_return_type,returnTypeError:d}})}const o={errorMap:n.common.contextualErrorMap},l=n.data;if(this._def.returns instanceof zo){const u=this;return An(async function(...d){const f=new $n([]),m=await u._def.args.parseAsync(d,o).catch(v=>{throw f.addIssue(r(d,v)),f}),g=await Reflect.apply(l,this,m);return await u._def.returns._def.type.parseAsync(g,o).catch(v=>{throw f.addIssue(a(g,v)),f})})}else{const u=this;return An(function(...d){const f=u._def.args.safeParse(d,o);if(!f.success)throw new $n([r(d,f.error)]);const m=Reflect.apply(l,this,f.data),g=u._def.returns.safeParse(m,o);if(!g.success)throw new $n([a(m,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Do({...this._def,args:Yr.create(t).rest(hs.create())})}returns(t){return new Do({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Do({args:t||Yr.create([]).rest(hs.create()),returns:n||hs.create(),typeName:Ue.ZodFunction,...Ye(r)})}}class $c extends Qe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$c.create=(e,t)=>new $c({getter:e,typeName:Ue.ZodLazy,...Ye(t)});class qc extends Qe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Se(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),Ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}qc.create=(e,t)=>new qc({value:e,typeName:Ue.ZodLiteral,...Ye(t)});function TN(e,t){return new va({values:e,typeName:Ue.ZodEnum,...Ye(t)})}class va extends Qe{constructor(){super(...arguments),yc.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{expected:ut.joinValues(r),received:n.parsedType,code:me.invalid_type}),Ge}if(Xf(this,yc)||EN(this,yc,new Set(this._def.values)),!Xf(this,yc).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{received:n.data,code:me.invalid_enum_value,options:r}),Ge}return An(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return va.create(t,{...this._def,...n})}exclude(t,n=this._def){return va.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}yc=new WeakMap;va.create=TN;class Kc extends Qe{constructor(){super(...arguments),vc.set(this,void 0)}_parse(t){const n=ut.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const a=ut.objectValues(n);return Se(r,{expected:ut.joinValues(a),received:r.parsedType,code:me.invalid_type}),Ge}if(Xf(this,vc)||EN(this,vc,new Set(ut.getValidEnumValues(this._def.values))),!Xf(this,vc).has(t.data)){const a=ut.objectValues(n);return Se(r,{received:r.data,code:me.invalid_enum_value,options:a}),Ge}return An(t.data)}get enum(){return this._def.values}}vc=new WeakMap;Kc.create=(e,t)=>new Kc({values:e,typeName:Ue.ZodNativeEnum,...Ye(t)});class zo extends Qe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return Se(n,{code:me.invalid_type,expected:Ce.promise,received:n.parsedType}),Ge;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return An(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}zo.create=(e,t)=>new zo({type:e,typeName:Ue.ZodPromise,...Ye(t)});class Cr extends Qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,o={addIssue:l=>{Se(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),a.type==="preprocess"){const l=a.transform(r.data,o);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return Ge;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?Ge:d.status==="dirty"||n.value==="dirty"?Eo(d.value):d});{if(n.value==="aborted")return Ge;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?Ge:u.status==="dirty"||n.value==="dirty"?Eo(u.value):u}}if(a.type==="refinement"){const l=u=>{const d=a.refinement(u,o);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ge:(u.status==="dirty"&&n.dirty(),l(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ge:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!xs(l))return l;const u=a.transform(l.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>xs(l)?Promise.resolve(a.transform(l.value,o)).then(u=>({status:n.value,value:u})):l);ut.assertNever(a)}}Cr.create=(e,t,n)=>new Cr({schema:e,typeName:Ue.ZodEffects,effect:t,...Ye(n)});Cr.createWithPreprocess=(e,t,n)=>new Cr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ue.ZodEffects,...Ye(n)});class Fr extends Qe{_parse(t){return this._getType(t)===Ce.undefined?An(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Fr.create=(e,t)=>new Fr({innerType:e,typeName:Ue.ZodOptional,...Ye(t)});class ba extends Qe{_parse(t){return this._getType(t)===Ce.null?An(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ba.create=(e,t)=>new ba({innerType:e,typeName:Ue.ZodNullable,...Ye(t)});class Wc extends Qe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Wc.create=(e,t)=>new Wc({innerType:e,typeName:Ue.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ye(t)});class Yc extends Qe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Vc(a)?a.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new $n(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new $n(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Yc.create=(e,t)=>new Yc({innerType:e,typeName:Ue.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ye(t)});class th extends Qe{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:Ce.nan,received:r.parsedType}),Ge}return{status:"valid",value:t.data}}}th.create=e=>new th({typeName:Ue.ZodNaN,...Ye(e)});const e5=Symbol("zod_brand");class I0 extends Qe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Tu extends Qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ge:o.status==="dirty"?(n.dirty(),Eo(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ge:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new Tu({in:t,out:n,typeName:Ue.ZodPipeline})}}class Zc extends Qe{_parse(t){const n=this._def.innerType._parse(t),r=a=>(xs(a)&&(a.value=Object.freeze(a.value)),a);return Vc(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}Zc.create=(e,t)=>new Zc({innerType:e,typeName:Ue.ZodReadonly,...Ye(t)});function BA(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function CN(e,t={},n){return e?Bo.create().superRefine((r,a)=>{var o,l;const u=e(r);if(u instanceof Promise)return u.then(d=>{var f,m;if(!d){const g=BA(t,r),y=(m=(f=g.fatal)!==null&&f!==void 0?f:n)!==null&&m!==void 0?m:!0;a.addIssue({code:"custom",...g,fatal:y})}});if(!u){const d=BA(t,r),f=(l=(o=d.fatal)!==null&&o!==void 0?o:n)!==null&&l!==void 0?l:!0;a.addIssue({code:"custom",...d,fatal:f})}}):Bo.create()}const t5={object:Tt.lazycreate};var Ue;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ue||(Ue={}));const n5=(e,t={message:`Input not instance of ${e.name}`})=>CN(n=>n instanceof e,t),RN=Sr.create,NN=ga.create,r5=th.create,i5=ya.create,ON=Bc.create,a5=Es.create,s5=Qf.create,o5=zc.create,l5=Uc.create,c5=Bo.create,u5=hs.create,d5=Oi.create,f5=Jf.create,h5=Ar.create,m5=Tt.create,p5=Tt.strictCreate,g5=Hc.create,y5=$h.create,v5=Fc.create,b5=Yr.create,_5=Gc.create,x5=eh.create,E5=Ss.create,S5=Do.create,A5=$c.create,w5=qc.create,T5=va.create,C5=Kc.create,R5=zo.create,zA=Cr.create,N5=Fr.create,O5=ba.create,k5=Cr.createWithPreprocess,D5=Tu.create,I5=()=>RN().optional(),L5=()=>NN().optional(),M5=()=>ON().optional(),j5={string:e=>Sr.create({...e,coerce:!0}),number:e=>ga.create({...e,coerce:!0}),boolean:e=>Bc.create({...e,coerce:!0}),bigint:e=>ya.create({...e,coerce:!0}),date:e=>Es.create({...e,coerce:!0})},P5=Ge;var sa=Object.freeze({__proto__:null,defaultErrorMap:Vo,setErrorMap:k3,getErrorMap:Yf,makeIssue:Zf,EMPTY_PATH:D3,addIssueToContext:Se,ParseStatus:vn,INVALID:Ge,DIRTY:Eo,OK:An,isAborted:Qy,isDirty:Jy,isValid:xs,isAsync:Vc,get util(){return ut},get objectUtil(){return Xy},ZodParsedType:Ce,getParsedType:xi,ZodType:Qe,datetimeRegex:wN,ZodString:Sr,ZodNumber:ga,ZodBigInt:ya,ZodBoolean:Bc,ZodDate:Es,ZodSymbol:Qf,ZodUndefined:zc,ZodNull:Uc,ZodAny:Bo,ZodUnknown:hs,ZodNever:Oi,ZodVoid:Jf,ZodArray:Ar,ZodObject:Tt,ZodUnion:Hc,ZodDiscriminatedUnion:$h,ZodIntersection:Fc,ZodTuple:Yr,ZodRecord:Gc,ZodMap:eh,ZodSet:Ss,ZodFunction:Do,ZodLazy:$c,ZodLiteral:qc,ZodEnum:va,ZodNativeEnum:Kc,ZodPromise:zo,ZodEffects:Cr,ZodTransformer:Cr,ZodOptional:Fr,ZodNullable:ba,ZodDefault:Wc,ZodCatch:Yc,ZodNaN:th,BRAND:e5,ZodBranded:I0,ZodPipeline:Tu,ZodReadonly:Zc,custom:CN,Schema:Qe,ZodSchema:Qe,late:t5,get ZodFirstPartyTypeKind(){return Ue},coerce:j5,any:c5,array:h5,bigint:i5,boolean:ON,date:a5,discriminatedUnion:y5,effect:zA,enum:T5,function:S5,instanceof:n5,intersection:v5,lazy:A5,literal:w5,map:x5,nan:r5,nativeEnum:C5,never:d5,null:l5,nullable:O5,number:NN,object:m5,oboolean:M5,onumber:L5,optional:N5,ostring:I5,pipeline:D5,preprocess:k5,promise:R5,record:_5,set:E5,strictObject:p5,string:RN,symbol:s5,transformer:zA,tuple:b5,undefined:o5,union:g5,unknown:u5,void:f5,NEVER:P5,ZodIssueCode:me,quotelessJson:O3,ZodError:$n});const kN=E.createContext({});function V5(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const L0=typeof window<"u",B5=L0?E.useLayoutEffect:E.useEffect,M0=E.createContext(null),DN=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function z5(e=!0){const t=E.useContext(M0);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,o=E.useId();E.useEffect(()=>{if(e)return a(o)},[e]);const l=E.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}function j0(e,t){e.indexOf(t)===-1&&e.push(t)}function P0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const qn=e=>e;let IN=qn;const U5={useManualTiming:!1};function V0(e){let t;return()=>(t===void 0&&(t=e()),t)}const Uo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class B0{constructor(){this.subscriptions=[]}add(t){return j0(this.subscriptions,t),()=>P0(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 o=0;o<a;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wi=e=>e*1e3,Ti=e=>e/1e3;function LN(e,t){return t?e*(1e3/t):0}const H5=V0(()=>window.ScrollTimeline!==void 0);class F5{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(a=>{if(H5()&&a.attachTimeline)return a.attachTimeline(t);if(typeof n=="function")return n(a)});return()=>{r.forEach((a,o)=>{a&&a(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class G5 extends F5{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function z0(e,t){return e?e[t]||e.default||e:void 0}const tv=2e4;function MN(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<tv;)t+=n,r=e.next(t);return t>=tv?1/0:t}function U0(e){return typeof e=="function"}function UA(e,t){e.timeline=t,e.onfinish=null}const H0=e=>Array.isArray(e)&&typeof e[0]=="number",$5={linearEasing:void 0};function q5(e,t){const n=V0(e);return()=>{var r;return(r=$5[t])!==null&&r!==void 0?r:n()}}const nh=q5(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jN=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let o=0;o<a;o++)r+=e(Uo(0,a-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function PN(e){return!!(typeof e=="function"&&nh()||!e||typeof e=="string"&&(e in nv||nh())||H0(e)||Array.isArray(e)&&e.every(PN))}const bc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,nv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bc([0,.65,.55,1]),circOut:bc([.55,0,1,.45]),backIn:bc([.31,.01,.66,-.59]),backOut:bc([.33,1.53,.69,.99])};function VN(e,t){if(e)return typeof e=="function"&&nh()?jN(e,t):H0(e)?bc(e):Array.isArray(e)?e.map(n=>VN(n,t)||nv.easeOut):nv[e]}const rf=["read","resolveKeyframes","update","preRender","render","postRender"];function K5(e,t){let n=new Set,r=new Set,a=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(f.schedule(m),e()),m(u)}const f={schedule:(m,g=!1,y=!1)=>{const _=y&&a?n:r;return g&&l.add(m),_.has(m)||_.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(u=m,a){o=!0;return}a=!0,[n,r]=[r,n],n.forEach(d),n.clear(),a=!1,o&&(o=!1,f.process(m))}};return f}const W5=40;function BN(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=rf.reduce((w,T)=>(w[T]=K5(o),w),{}),{read:u,resolveKeyframes:d,update:f,preRender:m,render:g,postRender:y}=l,v=()=>{const w=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(w-a.timestamp,W5),1),a.timestamp=w,a.isProcessing=!0,u.process(a),d.process(a),f.process(a),m.process(a),g.process(a),y.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(v))},_=()=>{n=!0,r=!0,a.isProcessing||e(v)};return{schedule:rf.reduce((w,T)=>{const R=l[T];return w[T]=(D,N=!1,k=!1)=>(n||_(),R.schedule(D,N,k)),w},{}),cancel:w=>{for(let T=0;T<rf.length;T++)l[rf[T]].cancel(w)},state:a,steps:l}}const{schedule:xt,cancel:_a,state:cn,steps:Yg}=BN(typeof requestAnimationFrame<"u"?requestAnimationFrame:qn,!0),{schedule:F0}=BN(queueMicrotask,!1);let Tf;function Y5(){Tf=void 0}const Gr={now:()=>(Tf===void 0&&Gr.set(cn.isProcessing||U5.useManualTiming?cn.timestamp:performance.now()),Tf),set:e=>{Tf=e,queueMicrotask(Y5)}},xr={x:!1,y:!1};function zN(){return xr.x||xr.y}function Z5(e){return e==="x"||e==="y"?xr[e]?null:(xr[e]=!0,()=>{xr[e]=!1}):xr.x||xr.y?null:(xr.x=xr.y=!0,()=>{xr.x=xr.y=!1})}function X5(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let a=document;const o=(r=void 0)!==null&&r!==void 0?r:a.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function UN(e,t){const n=X5(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function HA(e){return!(e.pointerType==="touch"||zN())}function Q5(e,t,n={}){const[r,a,o]=UN(e,n),l=u=>{if(!HA(u))return;const{target:d}=u,f=t(d,u);if(typeof f!="function"||!d)return;const m=g=>{HA(g)&&(f(g),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,a)};return r.forEach(u=>{u.addEventListener("pointerenter",l,a)}),o}function FA(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const HN=(e,t)=>t?e===t?!0:HN(e,t.parentElement):!1,G0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,J5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eG(e){return J5.has(e.tagName)||e.tabIndex!==-1}const _c=new WeakSet;function GA(e){return t=>{t.key==="Enter"&&e(t)}}function Zg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tG=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=GA(()=>{if(_c.has(n))return;Zg(n,"down");const a=GA(()=>{Zg(n,"up")}),o=()=>Zg(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function $A(e){return G0(e)&&!zN()}function nG(e,t,n={}){const[r,a,o]=UN(e,n),l=u=>{const d=u.currentTarget;if(!d||!$A(u)||_c.has(d))return;_c.add(d),FA(u,"set");const f=t(d,u),m=(v,_)=>{d.removeEventListener("pointerup",g),d.removeEventListener("pointercancel",y),FA(v,"release"),!(!$A(v)||!_c.has(d))&&(_c.delete(d),typeof f=="function"&&f(v,{success:_}))},g=v=>{(v.isTrusted?rG(v,d instanceof Element?d.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?m(v,!1):m(v,!(d instanceof Element)||HN(d,v.target))},y=v=>{m(v,!1)};d.addEventListener("pointerup",g,a),d.addEventListener("pointercancel",y,a),d.addEventListener("lostpointercapture",y,a)};return r.forEach(u=>{u=n.useGlobalTarget?window:u;let d=!1;u instanceof HTMLElement&&(d=!0,!eG(u)&&u.getAttribute("tabindex")===null&&(u.tabIndex=0)),u.addEventListener("pointerdown",l,a),d&&u.addEventListener("focus",f=>tG(f,a),a)}),o}function rG(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const qA=30,iG=e=>!isNaN(parseFloat(e));class aG{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{const o=Gr.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Gr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=iG(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 B0);const r=this.events[t].add(n);return t==="change"?()=>{r(),xt.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()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Gr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>qA)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,qA);return LN(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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xc(e,t){return new aG(e,t)}const $0=E.createContext({strict:!1}),KA={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"]},Ho={};for(const e in KA)Ho[e]={isEnabled:t=>KA[e].some(n=>!!t[n])};function rv(e){for(const t in e)Ho[t]={...Ho[t],...e[t]}}function sG({children:e,features:t,strict:n=!1}){const[,r]=E.useState(!Xg(t)),a=E.useRef(void 0);if(!Xg(t)){const{renderer:o,...l}=t;a.current=o,rv(l)}return E.useEffect(()=>{Xg(t)&&t().then(({renderer:o,...l})=>{rv(l),a.current=o,r(!0)})},[]),b.jsx($0.Provider,{value:{renderer:a.current,strict:n},children:e})}function Xg(e){return typeof e=="function"}const oG=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 rh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oG.has(e)}let FN=e=>!rh(e);function lG(e){e&&(FN=t=>t.startsWith("on")?!rh(t):e(t))}try{lG(require("@emotion/is-prop-valid").default)}catch{}function cG(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(FN(a)||n===!0&&rh(a)||!t&&!rh(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function uG(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 qh=E.createContext({});function Kh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Qc(e){return typeof e=="string"||Array.isArray(e)}const q0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],K0=["initial",...q0];function Wh(e){return Kh(e.animate)||K0.some(t=>Qc(e[t]))}function GN(e){return!!(Wh(e)||e.variants)}function dG(e,t){if(Wh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Qc(n)?n:void 0,animate:Qc(r)?r:void 0}}return e.inherit!==!1?t:{}}function fG(e){const{initial:t,animate:n}=dG(e,E.useContext(qh));return E.useMemo(()=>({initial:t,animate:n}),[WA(t),WA(n)])}function WA(e){return Array.isArray(e)?e.join(" "):e}const hG=Symbol.for("motionComponentSymbol");function So(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function mG(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):So(n)&&(n.current=r))},[t])}const W0=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),pG="framerAppearId",$N="data-"+W0(pG),qN=E.createContext({});function gG(e,t,n,r,a){var o,l;const{visualElement:u}=E.useContext(qh),d=E.useContext($0),f=E.useContext(M0),m=E.useContext(DN).reducedMotion,g=E.useRef(null);r=r||d.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:u,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:m}));const y=g.current,v=E.useContext(qN);y&&!y.projection&&a&&(y.type==="html"||y.type==="svg")&&yG(g.current,n,a,v);const _=E.useRef(!1);E.useInsertionEffect(()=>{y&&_.current&&y.update(n,f)});const S=n[$N],A=E.useRef(!!S&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,S))&&((l=window.MotionHasOptimisedAnimation)===null||l===void 0?void 0:l.call(window,S)));return B5(()=>{y&&(_.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),F0.render(y.render),A.current&&y.animationState&&y.animationState.animateChanges())}),E.useEffect(()=>{y&&(!A.current&&y.animationState&&y.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,S)}),A.current=!1))}),y}function yG(e,t,n,r){const{layoutId:a,layout:o,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:KN(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:!!l||u&&So(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:d,layoutRoot:f})}function KN(e){if(e)return e.options.allowProjection!==!1?e.projection:KN(e.parent)}function vG({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){var o,l;e&&rv(e);function u(f,m){let g;const y={...E.useContext(DN),...f,layoutId:bG(f)},{isStatic:v}=y,_=fG(f),S=r(f,v);if(!v&&L0){_G();const A=xG(y);g=A.MeasureLayout,_.visualElement=gG(a,S,y,t,A.ProjectionNode)}return b.jsxs(qh.Provider,{value:_,children:[g&&_.visualElement?b.jsx(g,{visualElement:_.visualElement,...y}):null,n(a,f,mG(S,_.visualElement,m),S,v,_.visualElement)]})}u.displayName=`motion.${typeof a=="string"?a:`create(${(l=(o=a.displayName)!==null&&o!==void 0?o:a.name)!==null&&l!==void 0?l:""})`}`;const d=E.forwardRef(u);return d[hG]=a,d}function bG({layoutId:e}){const t=E.useContext(kN).id;return t&&e!==void 0?t+"-"+e:e}function _G(e,t){E.useContext($0).strict}function xG(e){const{drag:t,layout:n}=Ho;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 WN=e=>t=>typeof t=="string"&&t.startsWith(e),Y0=WN("--"),EG=WN("var(--"),Z0=e=>EG(e)?SG.test(e.split("/*")[0].trim()):!1,SG=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Jc={};function AG(e){for(const t in e)Jc[t]=e[t],Y0(t)&&(Jc[t].isCSSVariable=!0)}const rl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cs=new Set(rl);function YN(e,{layout:t,layoutId:n}){return Cs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Jc[e]||e==="opacity")}const gn=e=>!!(e&&e.getVelocity),ZN=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ki=(e,t,n)=>n>t?t:n<e?e:n,il={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},eu={...il,transform:e=>ki(0,1,e)},af={...il,default:1},Cu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ua=Cu("deg"),$r=Cu("%"),Be=Cu("px"),wG=Cu("vh"),TG=Cu("vw"),YA={...$r,parse:e=>$r.parse(e)/100,transform:e=>$r.transform(e*100)},CG={borderWidth:Be,borderTopWidth:Be,borderRightWidth:Be,borderBottomWidth:Be,borderLeftWidth:Be,borderRadius:Be,radius:Be,borderTopLeftRadius:Be,borderTopRightRadius:Be,borderBottomRightRadius:Be,borderBottomLeftRadius:Be,width:Be,maxWidth:Be,height:Be,maxHeight:Be,top:Be,right:Be,bottom:Be,left:Be,padding:Be,paddingTop:Be,paddingRight:Be,paddingBottom:Be,paddingLeft:Be,margin:Be,marginTop:Be,marginRight:Be,marginBottom:Be,marginLeft:Be,backgroundPositionX:Be,backgroundPositionY:Be},RG={rotate:ua,rotateX:ua,rotateY:ua,rotateZ:ua,scale:af,scaleX:af,scaleY:af,scaleZ:af,skew:ua,skewX:ua,skewY:ua,distance:Be,translateX:Be,translateY:Be,translateZ:Be,x:Be,y:Be,z:Be,perspective:Be,transformPerspective:Be,opacity:eu,originX:YA,originY:YA,originZ:Be},ZA={...il,transform:Math.round},X0={...CG,...RG,zIndex:ZA,size:Be,fillOpacity:eu,strokeOpacity:eu,numOctaves:ZA},NG={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},OG=rl.length;function kG(e,t,n){let r="",a=!0;for(let o=0;o<OG;o++){const l=rl[o],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 f=ZN(u,X0[l]);if(!d){a=!1;const m=NG[l]||l;r+=`${m}(${f}) `}n&&(t[l]=f)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function Q0(e,t,n){const{style:r,vars:a,transformOrigin:o}=e;let l=!1,u=!1;for(const d in t){const f=t[d];if(Cs.has(d)){l=!0;continue}else if(Y0(d)){a[d]=f;continue}else{const m=ZN(f,X0[d]);d.startsWith("origin")?(u=!0,o[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=kG(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:m=0}=o;r.transformOrigin=`${d} ${f} ${m}`}}const J0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function XN(e,t,n){for(const r in t)!gn(t[r])&&!YN(r,n)&&(e[r]=t[r])}function DG({transformTemplate:e},t){return E.useMemo(()=>{const n=J0();return Q0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function IG(e,t){const n=e.style||{},r={};return XN(r,n,e),Object.assign(r,DG(e,t)),r}function LG(e,t){const n={},r=IG(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 MG=["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 eb(e){return typeof e!="string"||e.includes("-")?!1:!!(MG.indexOf(e)>-1||/[A-Z]/u.test(e))}const jG={offset:"stroke-dashoffset",array:"stroke-dasharray"},PG={offset:"strokeDashoffset",array:"strokeDasharray"};function VG(e,t,n=1,r=0,a=!0){e.pathLength=1;const o=a?jG:PG;e[o.offset]=Be.transform(-r);const l=Be.transform(t),u=Be.transform(n);e[o.array]=`${l} ${u}`}function XA(e,t,n){return typeof e=="string"?e:Be.transform(t+n*e)}function BG(e,t,n){const r=XA(t,e.x,e.width),a=XA(n,e.y,e.height);return`${r} ${a}`}function tb(e,{attrX:t,attrY:n,attrScale:r,originX:a,originY:o,pathLength:l,pathSpacing:u=1,pathOffset:d=0,...f},m,g){if(Q0(e,f,g),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v,dimensions:_}=e;y.transform&&(_&&(v.transform=y.transform),delete y.transform),_&&(a!==void 0||o!==void 0||v.transform)&&(v.transformOrigin=BG(_,a!==void 0?a:.5,o!==void 0?o:.5)),t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),r!==void 0&&(y.scale=r),l!==void 0&&VG(y,l,u,d,!1)}const QN=()=>({...J0(),attrs:{}}),nb=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zG(e,t,n,r){const a=E.useMemo(()=>{const o=QN();return tb(o,t,nb(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};XN(o,e.style,e),a.style={...o,...a.style}}return a}function UG(e=!1){return(n,r,a,{latestValues:o},l)=>{const d=(eb(n)?zG:LG)(r,o,l,n),f=cG(r,typeof n=="string",e),m=n!==E.Fragment?{...f,...d,ref:a}:{},{children:g}=r,y=E.useMemo(()=>gn(g)?g.get():g,[g]);return E.createElement(n,{...m,children:y})}}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 rb(e,t,n,r){if(typeof t=="function"){const[a,o]=QA(r);t=t(n!==void 0?n:e.custom,a,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,o]=QA(r);t=t(n!==void 0?n:e.custom,a,o)}return t}const iv=e=>Array.isArray(e),HG=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),FG=e=>iv(e)?e[e.length-1]||0:e;function Cf(e){const t=gn(e)?e.get():e;return HG(t)?t.toValue():t}function GG({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,a,o){const l={latestValues:$G(r,a,o,e),renderState:t()};return n&&(l.onMount=u=>n({props:r,current:u,...l}),l.onUpdate=u=>n(u)),l}const JN=e=>(t,n)=>{const r=E.useContext(qh),a=E.useContext(M0),o=()=>GG(e,t,r,a);return n?o():V5(o)};function $G(e,t,n,r){const a={},o=r(e,{});for(const y in o)a[y]=Cf(o[y]);let{initial:l,animate:u}=e;const d=Wh(e),f=GN(e);t&&f&&!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 g=m?u:l;if(g&&typeof g!="boolean"&&!Kh(g)){const y=Array.isArray(g)?g:[g];for(let v=0;v<y.length;v++){const _=rb(e,y[v]);if(_){const{transitionEnd:S,transition:A,...w}=_;for(const T in w){let R=w[T];if(Array.isArray(R)){const D=m?R.length-1:0;R=R[D]}R!==null&&(a[T]=R)}for(const T in S)a[T]=S[T]}}}return a}function ib(e,t,n){var r;const{style:a}=e,o={};for(const l in a)(gn(a[l])||t.style&&gn(t.style[l])||YN(l,e)||((r=n==null?void 0:n.getValue(l))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[l]=a[l]);return o}const qG={useVisualState:JN({scrapeMotionValuesFromProps:ib,createRenderState:J0})};function eO(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function tO(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const nO=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 rO(e,t,n,r){tO(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(nO.has(a)?a:W0(a),t.attrs[a])}function iO(e,t,n){const r=ib(e,t,n);for(const a in e)if(gn(e[a])||gn(t[a])){const o=rl.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[o]=e[a]}return r}const JA=["x","y","width","height","cx","cy","r"],KG={useVisualState:JN({scrapeMotionValuesFromProps:iO,createRenderState:QN,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:a})=>{if(!n)return;let o=!!e.drag;if(!o){for(const u in a)if(Cs.has(u)){o=!0;break}}if(!o)return;let l=!t;if(t)for(let u=0;u<JA.length;u++){const d=JA[u];e[d]!==t[d]&&(l=!0)}l&&xt.read(()=>{eO(n,r),xt.render(()=>{tb(r,a,nb(n.tagName),e.transformTemplate),rO(n,r)})})}})};function WG(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const l={...eb(r)?KG:qG,preloadedFeatures:e,useRender:UG(a),createVisualElement:t,Component:r};return vG(l)}}function tu(e,t,n){const r=e.getProps();return rb(r,t,n!==void 0?n:r.custom,e)}const aO=new Set(["width","height","top","left","right","bottom",...rl]);function YG(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xc(n))}function ZG(e,t){const n=tu(e,t);let{transitionEnd:r={},transition:a={},...o}=n||{};o={...o,...r};for(const l in o){const u=FG(o[l]);YG(e,l,u)}}function XG(e){return!!(gn(e)&&e.add)}function av(e,t){const n=e.getValue("willChange");if(XG(n))return n.add(t)}function sO(e){return e.props[$N]}const oO=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,QG=1e-7,JG=12;function e$(e,t,n,r,a){let o,l,u=0;do l=t+(n-t)/2,o=oO(l,r,a)-e,o>0?n=l:t=l;while(Math.abs(o)>QG&&++u<JG);return l}function Ru(e,t,n,r){if(e===t&&n===r)return qn;const a=o=>e$(o,0,1,e,n);return o=>o===0||o===1?o:oO(a(o),t,r)}const lO=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cO=e=>t=>1-e(1-t),uO=Ru(.33,1.53,.69,.99),ab=cO(uO),dO=lO(ab),fO=e=>(e*=2)<1?.5*ab(e):.5*(2-Math.pow(2,-10*(e-1))),sb=e=>1-Math.sin(Math.acos(e)),hO=cO(sb),mO=lO(sb),pO=e=>/^0[^.\s]+$/u.test(e);function t$(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||pO(e):!0}const Tc=e=>Math.round(e*1e5)/1e5,ob=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function n$(e){return e==null}const r$=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lb=(e,t)=>n=>!!(typeof n=="string"&&r$.test(n)&&n.startsWith(e)||t&&!n$(n)&&Object.prototype.hasOwnProperty.call(n,t)),gO=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,o,l,u]=r.match(ob);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},i$=e=>ki(0,255,e),Qg={...il,transform:e=>Math.round(i$(e))},cs={test:lb("rgb","red"),parse:gO("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Qg.transform(e)+", "+Qg.transform(t)+", "+Qg.transform(n)+", "+Tc(eu.transform(r))+")"};function a$(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 sv={test:lb("#"),parse:a$,transform:cs.transform},Ao={test:lb("hsl","hue"),parse:gO("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$r.transform(Tc(t))+", "+$r.transform(Tc(n))+", "+Tc(eu.transform(r))+")"},pn={test:e=>cs.test(e)||sv.test(e)||Ao.test(e),parse:e=>cs.test(e)?cs.parse(e):Ao.test(e)?Ao.parse(e):sv.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?cs.transform(e):Ao.transform(e)},s$=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function o$(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ob))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(s$))===null||n===void 0?void 0:n.length)||0)>0}const yO="number",vO="color",l$="var",c$="var(",ew="${}",u$=/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 nu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;const u=t.replace(u$,d=>(pn.test(d)?(r.color.push(o),a.push(vO),n.push(pn.parse(d))):d.startsWith(c$)?(r.var.push(o),a.push(l$),n.push(d)):(r.number.push(o),a.push(yO),n.push(parseFloat(d))),++o,ew)).split(ew);return{values:n,split:u,indexes:r,types:a}}function bO(e){return nu(e).values}function _O(e){const{split:t,types:n}=nu(e),r=t.length;return a=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],a[l]!==void 0){const u=n[l];u===yO?o+=Tc(a[l]):u===vO?o+=pn.transform(a[l]):o+=a[l]}return o}}const d$=e=>typeof e=="number"?0:e;function f$(e){const t=bO(e);return _O(e)(t.map(d$))}const xa={test:o$,parse:bO,createTransformer:_O,getAnimatableNone:f$},h$=new Set(["brightness","contrast","saturate","opacity"]);function m$(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ob)||[];if(!r)return e;const a=n.replace(r,"");let o=h$.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}const p$=/\b([a-z-]*)\(.*?\)/gu,ov={...xa,getAnimatableNone:e=>{const t=e.match(p$);return t?t.map(m$).join(" "):e}},g$={...X0,color:pn,backgroundColor:pn,outlineColor:pn,fill:pn,stroke:pn,borderColor:pn,borderTopColor:pn,borderRightColor:pn,borderBottomColor:pn,borderLeftColor:pn,filter:ov,WebkitFilter:ov},xO=e=>g$[e];function EO(e,t){let n=xO(e);return n!==ov&&(n=xa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const y$=new Set(["auto","none","0"]);function v$(e,t,n){let r=0,a;for(;r<e.length&&!a;){const o=e[r];typeof o=="string"&&!y$.has(o)&&nu(o).values.length&&(a=e[r]),r++}if(a&&n)for(const o of t)e[o]=EO(n,a)}const us=e=>e*180/Math.PI,lv=e=>{const t=us(Math.atan2(e[1],e[0]));return cv(t)},b$={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:lv,rotateZ:lv,skewX:e=>us(Math.atan(e[1])),skewY:e=>us(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},cv=e=>(e=e%360,e<0&&(e+=360),e),tw=lv,nw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rw=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_$={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nw,scaleY:rw,scale:e=>(nw(e)+rw(e))/2,rotateX:e=>cv(us(Math.atan2(e[6],e[5]))),rotateY:e=>cv(us(Math.atan2(-e[2],e[0]))),rotateZ:tw,rotate:tw,skewX:e=>us(Math.atan(e[4])),skewY:e=>us(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function iw(e){return e.includes("scale")?1:0}function uv(e,t){if(!e||e==="none")return iw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=_$,a=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=b$,a=u}if(!a)return iw(t);const o=r[t],l=a[1].split(",").map(E$);return typeof o=="function"?o(l):l[o]}const x$=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return uv(n,t)};function E$(e){return parseFloat(e.trim())}const aw=e=>e===il||e===Be,S$=new Set(["x","y","z"]),A$=rl.filter(e=>!S$.has(e));function w$(e){const t=[];return A$.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fo={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})=>uv(t,"x"),y:(e,{transform:t})=>uv(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const ms=new Set;let dv=!1,fv=!1;function SO(){if(fv){const e=Array.from(ms).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=w$(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(([o,l])=>{var u;(u=r.getValue(o))===null||u===void 0||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}fv=!1,dv=!1,ms.forEach(e=>e.complete()),ms.clear()}function AO(){ms.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(fv=!0)})}function T$(){AO(),SO()}class cb{constructor(t,n,r,a,o,l=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=o,this.isAsync=l}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ms.add(this),dv||(dv=!0,xt.read(AO),xt.resolveKeyframes(SO))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const l=a==null?void 0:a.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(r&&n){const d=r.readValue(n,u);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=u),a&&l===void 0&&a.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ms.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ms.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const wO=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),C$=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function R$(e){const t=C$.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function TO(e,t,n=1){const[r,a]=R$(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return wO(l)?parseFloat(l):l}return Z0(a)?TO(a,t,n+1):a}const CO=e=>t=>t.test(e),N$={test:e=>e==="auto",parse:e=>e},RO=[il,Be,$r,ua,TG,wG,N$],sw=e=>RO.find(CO(e));class NO extends cb{constructor(t,n,r,a,o){super(t,n,r,a,o,!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 f=t[d];if(typeof f=="string"&&(f=f.trim(),Z0(f))){const m=TO(f,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!aO.has(r)||t.length!==2)return;const[a,o]=t,l=sw(a),u=sw(o);if(l!==u)if(aw(l)&&aw(u))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)t$(t[a])&&r.push(a);r.length&&v$(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=Fo[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 t;const{element:n,name:r,unresolvedKeyframes:a}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const l=a.length-1,u=a[l];a[l]=Fo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([d,f])=>{n.getValue(d).set(f)}),this.resolveNoneKeyframes()}}const ow=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(xa.test(e)||e==="0")&&!e.startsWith("url("));function O$(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 k$(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=ow(a,t),u=ow(o,t);return!l||!u?!1:O$(e)||(n==="spring"||U0(n))&&r}const D$=e=>e!==null;function Yh(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(D$),o=t&&n!=="loop"&&t%2===1?0:a.length-1;return!o||r===void 0?a[o]:r}const I$=40;class OO{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:l="loop",...u}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Gr.now(),this.options={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:o,repeatType:l,...u},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>I$?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&T$(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Gr.now(),this.hasAttemptedResolve=!0;const{name:r,type:a,velocity:o,delay:l,onComplete:u,onUpdate:d,isGenerator:f}=this.options;if(!f&&!k$(t,r,a,o))if(l)this.options.duration=0;else{d&&d(Yh(t,this.options,n)),u&&u(),this.resolveFinishedPromise();return}const m=this.initPlayback(t,n);m!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...m},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ct=(e,t,n)=>e+(t-e)*n;function Jg(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 L$({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,o=0,l=0;if(!t)a=o=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;a=Jg(d,u,e+1/3),o=Jg(d,u,e),l=Jg(d,u,e-1/3)}return{red:Math.round(a*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function ih(e,t){return n=>n>0?t:e}const ey=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},M$=[sv,cs,Ao],j$=e=>M$.find(t=>t.test(e));function lw(e){const t=j$(e);if(!t)return!1;let n=t.parse(e);return t===Ao&&(n=L$(n)),n}const cw=(e,t)=>{const n=lw(e),r=lw(t);if(!n||!r)return ih(e,t);const a={...n};return o=>(a.red=ey(n.red,r.red,o),a.green=ey(n.green,r.green,o),a.blue=ey(n.blue,r.blue,o),a.alpha=Ct(n.alpha,r.alpha,o),cs.transform(a))},P$=(e,t)=>n=>t(e(n)),Nu=(...e)=>e.reduce(P$),hv=new Set(["none","hidden"]);function V$(e,t){return hv.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function B$(e,t){return n=>Ct(e,t,n)}function ub(e){return typeof e=="number"?B$:typeof e=="string"?Z0(e)?ih:pn.test(e)?cw:H$:Array.isArray(e)?kO:typeof e=="object"?pn.test(e)?cw:z$:ih}function kO(e,t){const n=[...e],r=n.length,a=e.map((o,l)=>ub(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=a[l](o);return n}}function z$(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=ub(e[a])(e[a],t[a]));return a=>{for(const o in r)n[o]=r[o](a);return n}}function U$(e,t){var n;const r=[],a={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],u=e.indexes[l][a[l]],d=(n=e.values[u])!==null&&n!==void 0?n:0;r[o]=d,a[l]++}return r}const H$=(e,t)=>{const n=xa.createTransformer(t),r=nu(e),a=nu(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?hv.has(e)&&!a.values.length||hv.has(t)&&!r.values.length?V$(e,t):Nu(kO(U$(r,a),a.values),n):ih(e,t)};function DO(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ct(e,t,n):ub(e)(e,t)}const F$=5;function IO(e,t,n){const r=Math.max(t-F$,0);return LN(n-e(r),t-r)}const It={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},uw=.001;function G$({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:r=It.mass}){let a,o,l=1-t;l=ki(It.minDamping,It.maxDamping,l),e=ki(It.minDuration,It.maxDuration,Ti(e)),l<1?(a=f=>{const m=f*l,g=m*e,y=m-n,v=mv(f,l),_=Math.exp(-g);return uw-y/v*_},o=f=>{const g=f*l*e,y=g*n+n,v=Math.pow(l,2)*Math.pow(f,2)*e,_=Math.exp(-g),S=mv(Math.pow(f,2),l);return(-a(f)+uw>0?-1:1)*((y-v)*_)/S}):(a=f=>{const m=Math.exp(-f*e),g=(f-n)*e+1;return-.001+m*g},o=f=>{const m=Math.exp(-f*e),g=(n-f)*(e*e);return m*g});const u=5/e,d=q$(a,o,u);if(e=wi(e),isNaN(d))return{stiffness:It.stiffness,damping:It.damping,duration:e};{const f=Math.pow(d,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const $$=12;function q$(e,t,n){let r=n;for(let a=1;a<$$;a++)r=r-e(r)/t(r);return r}function mv(e,t){return e*Math.sqrt(1-t*t)}const K$=["duration","bounce"],W$=["stiffness","damping","mass"];function dw(e,t){return t.some(n=>e[n]!==void 0)}function Y$(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!dw(e,W$)&&dw(e,K$))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,o=2*ki(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:It.mass,stiffness:a,damping:o}}else{const n=G$(e);t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function LO(e=It.visualDuration,t=It.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:d,damping:f,mass:m,duration:g,velocity:y,isResolvedFromDuration:v}=Y$({...n,velocity:-Ti(n.velocity||0)}),_=y||0,S=f/(2*Math.sqrt(d*m)),A=l-o,w=Ti(Math.sqrt(d/m)),T=Math.abs(A)<5;r||(r=T?It.restSpeed.granular:It.restSpeed.default),a||(a=T?It.restDelta.granular:It.restDelta.default);let R;if(S<1){const N=mv(w,S);R=k=>{const I=Math.exp(-S*w*k);return l-I*((_+S*w*A)/N*Math.sin(N*k)+A*Math.cos(N*k))}}else if(S===1)R=N=>l-Math.exp(-w*N)*(A+(_+w*A)*N);else{const N=w*Math.sqrt(S*S-1);R=k=>{const I=Math.exp(-S*w*k),P=Math.min(N*k,300);return l-I*((_+S*w*A)*Math.sinh(P)+N*A*Math.cosh(P))/N}}const D={calculatedDuration:v&&g||null,next:N=>{const k=R(N);if(v)u.done=N>=g;else{let I=0;S<1&&(I=N===0?wi(_):IO(R,N,k));const P=Math.abs(I)<=r,V=Math.abs(l-k)<=a;u.done=P&&V}return u.value=u.done?l:k,u},toString:()=>{const N=Math.min(MN(D),tv),k=jN(I=>D.next(N*I).value,N,30);return N+"ms "+k}};return D}function fw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:d,restDelta:f=.5,restSpeed:m}){const g=e[0],y={done:!1,value:g},v=P=>u!==void 0&&P<u||d!==void 0&&P>d,_=P=>u===void 0?d:d===void 0||Math.abs(u-P)<Math.abs(d-P)?u:d;let S=n*t;const A=g+S,w=l===void 0?A:l(A);w!==A&&(S=w-g);const T=P=>-S*Math.exp(-P/r),R=P=>w+T(P),D=P=>{const V=T(P),U=R(P);y.done=Math.abs(V)<=f,y.value=y.done?w:U};let N,k;const I=P=>{v(y.value)&&(N=P,k=LO({keyframes:[y.value,_(y.value)],velocity:IO(R,P,y.value),damping:a,stiffness:o,restDelta:f,restSpeed:m}))};return I(0),{calculatedDuration:null,next:P=>{let V=!1;return!k&&N===void 0&&(V=!0,D(P),I(P)),N!==void 0&&P>=N?k.next(P-N):(!V&&D(P),y)}}}const Z$=Ru(.42,0,1,1),X$=Ru(0,0,.58,1),MO=Ru(.42,0,.58,1),Q$=e=>Array.isArray(e)&&typeof e[0]!="number",J$={linear:qn,easeIn:Z$,easeInOut:MO,easeOut:X$,circIn:sb,circInOut:mO,circOut:hO,backIn:ab,backInOut:dO,backOut:uO,anticipate:fO},hw=e=>{if(H0(e)){IN(e.length===4);const[t,n,r,a]=e;return Ru(t,n,r,a)}else if(typeof e=="string")return J$[e];return e};function e6(e,t,n){const r=[],a=n||DO,o=e.length-1;for(let l=0;l<o;l++){let u=a(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||qn:t;u=Nu(d,u)}r.push(u)}return r}function t6(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(IN(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=e6(t,r,a),d=u.length,f=m=>{if(l&&m<e[0])return t[0];let g=0;if(d>1)for(;g<e.length-2&&!(m<e[g+1]);g++);const y=Uo(e[g],e[g+1],m);return u[g](y)};return n?m=>f(ki(e[0],e[o-1],m)):f}function n6(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Uo(0,t,r);e.push(Ct(n,1,a))}}function r6(e){const t=[0];return n6(t,e.length-1),t}function i6(e,t){return e.map(n=>n*t)}function a6(e,t){return e.map(()=>t||MO).splice(0,e.length-1)}function ah({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=Q$(r)?r.map(hw):hw(r),o={done:!1,value:t[0]},l=i6(n&&n.length===t.length?n:r6(t),e),u=t6(l,t,{ease:Array.isArray(a)?a:a6(t,a)});return{calculatedDuration:e,next:d=>(o.value=u(d),o.done=d>=e,o)}}const s6=e=>{const t=({timestamp:n})=>e(n);return{start:()=>xt.update(t,!0),stop:()=>_a(t),now:()=>cn.isProcessing?cn.timestamp:Gr.now()}},o6={decay:fw,inertia:fw,tween:ah,keyframes:ah,spring:LO},l6=e=>e/100;class db extends OO{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:d}=this.options;d&&d()};const{name:n,motionValue:r,element:a,keyframes:o}=this.options,l=(a==null?void 0:a.KeyframeResolver)||cb,u=(d,f)=>this.onKeyframesResolved(d,f);this.resolver=new l(o,u,n,r,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:o,velocity:l=0}=this.options,u=U0(n)?n:o6[n]||ah;let d,f;u!==ah&&typeof t[0]!="number"&&(d=Nu(l6,DO(t[0],t[1])),t=[0,100]);const m=u({...this.options,keyframes:t});o==="mirror"&&(f=u({...this.options,keyframes:[...t].reverse(),velocity:-l})),m.calculatedDuration===null&&(m.calculatedDuration=MN(m));const{calculatedDuration:g}=m,y=g+a,v=y*(r+1)-a;return{generator:m,mirroredGenerator:f,mapPercentToKeyframes:d,calculatedDuration:g,resolvedDuration:y,totalDuration:v}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:a,generator:o,mirroredGenerator:l,mapPercentToKeyframes:u,keyframes:d,calculatedDuration:f,totalDuration:m,resolvedDuration:g}=r;if(this.startTime===null)return o.next(0);const{delay:y,repeat:v,repeatType:_,repeatDelay:S,onUpdate:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-m/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const w=this.currentTime-y*(this.speed>=0?1:-1),T=this.speed>=0?w<0:w>m;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=m);let R=this.currentTime,D=o;if(v){const P=Math.min(this.currentTime,m)/g;let V=Math.floor(P),U=P%1;!U&&P>=1&&(U=1),U===1&&V--,V=Math.min(V,v+1),!!(V%2)&&(_==="reverse"?(U=1-U,S&&(U-=S/g)):_==="mirror"&&(D=l)),R=ki(0,1,U)*g}const N=T?{done:!1,value:d[0]}:D.next(R);u&&(N.value=u(N.value));let{done:k}=N;!T&&f!==null&&(k=this.speed>=0?this.currentTime>=m:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return I&&a!==void 0&&(N.value=Yh(d,this.options,a)),A&&A(N.value),I&&this.finish(),N}get duration(){const{resolved:t}=this;return t?Ti(t.calculatedDuration):0}get time(){return Ti(this.currentTime)}set time(t){t=wi(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ti(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=s6,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const c6=new Set(["opacity","clipPath","filter","transform"]);function u6(e,t,n,{delay:r=0,duration:a=300,repeat:o=0,repeatType:l="loop",ease:u="easeInOut",times:d}={}){const f={[t]:n};d&&(f.offset=d);const m=VN(u,a);return Array.isArray(m)&&(f.easing=m),e.animate(f,{delay:r,duration:a,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"})}const d6=V0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sh=10,f6=2e4;function h6(e){return U0(e.type)||e.type==="spring"||!PN(e.ease)}function m6(e,t){const n=new db({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const a=[];let o=0;for(;!r.done&&o<f6;)r=n.sample(o),a.push(r.value),o+=sh;return{times:void 0,keyframes:a,duration:o-sh,ease:"linear"}}const jO={anticipate:fO,backInOut:dO,circInOut:mO};function p6(e){return e in jO}class mw extends OO{constructor(t){super(t);const{name:n,motionValue:r,element:a,keyframes:o}=this.options;this.resolver=new NO(o,(l,u)=>this.onKeyframesResolved(l,u),n,r,a),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:a,ease:o,type:l,motionValue:u,name:d,startTime:f}=this.options;if(!u.owner||!u.owner.current)return!1;if(typeof o=="string"&&nh()&&p6(o)&&(o=jO[o]),h6(this.options)){const{onComplete:g,onUpdate:y,motionValue:v,element:_,...S}=this.options,A=m6(t,S);t=A.keyframes,t.length===1&&(t[1]=t[0]),r=A.duration,a=A.times,o=A.ease,l="keyframes"}const m=u6(u.owner.current,d,t,{...this.options,duration:r,times:a,ease:o});return m.startTime=f??this.calcStartTime(),this.pendingTimeline?(UA(m,this.pendingTimeline),this.pendingTimeline=void 0):m.onfinish=()=>{const{onComplete:g}=this.options;u.set(Yh(t,this.options,n)),g&&g(),this.cancel(),this.resolveFinishedPromise()},{animation:m,duration:r,times:a,type:l,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ti(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ti(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=wi(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return qn;const{animation:r}=n;UA(r,t)}return qn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:a,type:o,ease:l,times:u}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:f,onUpdate:m,onComplete:g,element:y,...v}=this.options,_=new db({...v,keyframes:r,duration:a,type:o,ease:l,times:u,isGenerator:!0}),S=wi(this.time);f.setWithVelocity(_.sample(S-sh).value,_.sample(S).value,sh)}const{onStop:d}=this.options;d&&d(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:a,repeatType:o,damping:l,type:u}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:f}=n.owner.getProps();return d6()&&r&&c6.has(r)&&!d&&!f&&!a&&o!=="mirror"&&l!==0&&u!=="inertia"}}const g6={type:"spring",stiffness:500,damping:25,restSpeed:10},y6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),v6={type:"keyframes",duration:.8},b6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_6=(e,{keyframes:t})=>t.length>2?v6:Cs.has(e)?e.startsWith("scale")?y6(t[1]):g6:b6;function x6({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:o,repeatType:l,repeatDelay:u,from:d,elapsed:f,...m}){return!!Object.keys(m).length}const fb=(e,t,n,r={},a,o)=>l=>{const u=z0(r,e)||{},d=u.delay||r.delay||0;let{elapsed:f=0}=r;f=f-wi(d);let m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-f,onUpdate:y=>{t.set(y),u.onUpdate&&u.onUpdate(y)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:a};x6(u)||(m={...m,..._6(e,m)}),m.duration&&(m.duration=wi(m.duration)),m.repeatDelay&&(m.repeatDelay=wi(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(g=!0)),m.allowFlatten=!u.type&&!u.ease,g&&!o&&t.get()!==void 0){const y=Yh(m.keyframes,u);if(y!==void 0)return xt.update(()=>{m.onUpdate(y),m.onComplete()}),new G5([])}return!o&&mw.supports(m)?new mw(m):new db(m)};function E6({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function PO(e,t,{delay:n=0,transitionOverride:r,type:a}={}){var o;let{transition:l=e.getDefaultTransition(),transitionEnd:u,...d}=t;r&&(l=r);const f=[],m=a&&e.animationState&&e.animationState.getState()[a];for(const g in d){const y=e.getValue(g,(o=e.latestValues[g])!==null&&o!==void 0?o:null),v=d[g];if(v===void 0||m&&E6(m,g))continue;const _={delay:n,...z0(l||{},g)};let S=!1;if(window.MotionHandoffAnimation){const w=sO(e);if(w){const T=window.MotionHandoffAnimation(w,g,xt);T!==null&&(_.startTime=T,S=!0)}}av(e,g),y.start(fb(g,y,v,e.shouldReduceMotion&&aO.has(g)?{type:!1}:_,e,S));const A=y.animation;A&&f.push(A)}return u&&Promise.all(f).then(()=>{xt.update(()=>{u&&ZG(e,u)})}),f}function pv(e,t,n={}){var r;const a=tu(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(o=n.transitionOverride);const l=a?()=>Promise.all(PO(e,a,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:m=0,staggerChildren:g,staggerDirection:y}=o;return S6(e,t,m+f,g,y,n)}:()=>Promise.resolve(),{when:d}=o;if(d){const[f,m]=d==="beforeChildren"?[l,u]:[u,l];return f().then(()=>m())}else return Promise.all([l(),u(n.delay)])}function S6(e,t,n=0,r=0,a=1,o){const l=[],u=(e.variantChildren.size-1)*r,d=a===1?(f=0)=>f*r:(f=0)=>u-f*r;return Array.from(e.variantChildren).sort(A6).forEach((f,m)=>{f.notify("AnimationStart",t),l.push(pv(f,t,{...o,delay:n+d(m)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(l)}function A6(e,t){return e.sortNodePosition(t)}function w6(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(o=>pv(e,o,n));r=Promise.all(a)}else if(typeof t=="string")r=pv(e,t,n);else{const a=typeof t=="function"?tu(e,t,n.custom):t;r=Promise.all(PO(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function VO(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 T6=K0.length;function BO(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?BO(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<T6;n++){const r=K0[n],a=e.props[r];(Qc(a)||a===!1)&&(t[r]=a)}return t}const C6=[...q0].reverse(),R6=q0.length;function N6(e){return t=>Promise.all(t.map(({animation:n,options:r})=>w6(e,n,r)))}function O6(e){let t=N6(e),n=pw(),r=!0;const a=d=>(f,m)=>{var g;const y=tu(e,m,d==="exit"?(g=e.presenceContext)===null||g===void 0?void 0:g.custom:void 0);if(y){const{transition:v,transitionEnd:_,...S}=y;f={...f,...S,..._}}return f};function o(d){t=d(e)}function l(d){const{props:f}=e,m=BO(e.parent)||{},g=[],y=new Set;let v={},_=1/0;for(let A=0;A<R6;A++){const w=C6[A],T=n[w],R=f[w]!==void 0?f[w]:m[w],D=Qc(R),N=w===d?T.isActive:null;N===!1&&(_=A);let k=R===m[w]&&R!==f[w]&&D;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),T.protectedKeys={...v},!T.isActive&&N===null||!R&&!T.prevProp||Kh(R)||typeof R=="boolean")continue;const I=k6(T.prevProp,R);let P=I||w===d&&T.isActive&&!k&&D||A>_&&D,V=!1;const U=Array.isArray(R)?R:[R];let ue=U.reduce(a(w),{});N===!1&&(ue={});const{prevResolvedValues:oe={}}=T,fe={...oe,...ue},Y=ne=>{P=!0,y.has(ne)&&(V=!0,y.delete(ne)),T.needsAnimating[ne]=!0;const ee=e.getValue(ne);ee&&(ee.liveStyle=!1)};for(const ne in fe){const ee=ue[ne],ve=oe[ne];if(v.hasOwnProperty(ne))continue;let j=!1;iv(ee)&&iv(ve)?j=!VO(ee,ve):j=ee!==ve,j?ee!=null?Y(ne):y.add(ne):ee!==void 0&&y.has(ne)?Y(ne):T.protectedKeys[ne]=!0}T.prevProp=R,T.prevResolvedValues=ue,T.isActive&&(v={...v,...ue}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(k&&I)||V)&&g.push(...U.map(ne=>({animation:ne,options:{type:w}})))}if(y.size){const A={};if(typeof f.initial!="boolean"){const w=tu(e,Array.isArray(f.initial)?f.initial[0]:f.initial);w&&w.transition&&(A.transition=w.transition)}y.forEach(w=>{const T=e.getBaseTarget(w),R=e.getValue(w);R&&(R.liveStyle=!0),A[w]=T??null}),g.push({animation:A})}let S=!!g.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(g):Promise.resolve()}function u(d,f){var m;if(n[d].isActive===f)return Promise.resolve();(m=e.variantChildren)===null||m===void 0||m.forEach(y=>{var v;return(v=y.animationState)===null||v===void 0?void 0:v.setActive(d,f)}),n[d].isActive=f;const g=l(d);for(const y in n)n[y].protectedKeys={};return g}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=pw(),r=!0}}}function k6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!VO(t,e):!1}function rs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pw(){return{animate:rs(!0),whileInView:rs(),whileHover:rs(),whileTap:rs(),whileDrag:rs(),whileFocus:rs(),exit:rs()}}class Oa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class D6 extends Oa{constructor(t){super(t),t.animationState||(t.animationState=O6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kh(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===void 0||t.call(this)}}let I6=0;class L6 extends Oa{constructor(){super(...arguments),this.id=I6++}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 zO={animation:{Feature:D6},exit:{Feature:L6}};function ru(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ou(e){return{point:{x:e.pageX,y:e.pageY}}}const M6=e=>t=>G0(t)&&e(t,Ou(t));function Cc(e,t,n,r){return ru(e,t,M6(n),r)}function UO({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function j6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function P6(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 HO=1e-4,V6=1-HO,B6=1+HO,FO=.01,z6=0-FO,U6=0+FO;function Sn(e){return e.max-e.min}function H6(e,t,n){return Math.abs(e-t)<=n}function gw(e,t,n,r=.5){e.origin=r,e.originPoint=Ct(t.min,t.max,e.origin),e.scale=Sn(n)/Sn(t),e.translate=Ct(n.min,n.max,e.origin)-e.originPoint,(e.scale>=V6&&e.scale<=B6||isNaN(e.scale))&&(e.scale=1),(e.translate>=z6&&e.translate<=U6||isNaN(e.translate))&&(e.translate=0)}function Rc(e,t,n,r){gw(e.x,t.x,n.x,r?r.originX:void 0),gw(e.y,t.y,n.y,r?r.originY:void 0)}function yw(e,t,n){e.min=n.min+t.min,e.max=e.min+Sn(t)}function F6(e,t,n){yw(e.x,t.x,n.x),yw(e.y,t.y,n.y)}function vw(e,t,n){e.min=t.min-n.min,e.max=e.min+Sn(t)}function Nc(e,t,n){vw(e.x,t.x,n.x),vw(e.y,t.y,n.y)}const bw=()=>({translate:0,scale:1,origin:0,originPoint:0}),wo=()=>({x:bw(),y:bw()}),_w=()=>({min:0,max:0}),Pt=()=>({x:_w(),y:_w()});function lr(e){return[e("x"),e("y")]}function ty(e){return e===void 0||e===1}function gv({scale:e,scaleX:t,scaleY:n}){return!ty(e)||!ty(t)||!ty(n)}function is(e){return gv(e)||GO(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function GO(e){return xw(e.x)||xw(e.y)}function xw(e){return e&&e!=="0%"}function oh(e,t,n){const r=e-n,a=t*r;return n+a}function Ew(e,t,n,r,a){return a!==void 0&&(e=oh(e,a,r)),oh(e,n,r)+t}function yv(e,t=0,n=1,r,a){e.min=Ew(e.min,t,n,r,a),e.max=Ew(e.max,t,n,r,a)}function $O(e,{x:t,y:n}){yv(e.x,t.translate,t.scale,t.originPoint),yv(e.y,n.translate,n.scale,n.originPoint)}const Sw=.999999999999,Aw=1.0000000000001;function G6(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let o,l;for(let u=0;u<a;u++){o=n[u],l=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Co(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,$O(e,l)),r&&is(o.latestValues)&&Co(e,o.latestValues))}t.x<Aw&&t.x>Sw&&(t.x=1),t.y<Aw&&t.y>Sw&&(t.y=1)}function To(e,t){e.min=e.min+t,e.max=e.max+t}function ww(e,t,n,r,a=.5){const o=Ct(e.min,e.max,a);yv(e,t,n,o,r)}function Co(e,t){ww(e.x,t.x,t.scaleX,t.scale,t.originX),ww(e.y,t.y,t.scaleY,t.scale,t.originY)}function qO(e,t){return UO(P6(e.getBoundingClientRect(),t))}function $6(e,t,n){const r=qO(e,n),{scroll:a}=t;return a&&(To(r.x,a.offset.x),To(r.y,a.offset.y)),r}const KO=({current:e})=>e?e.ownerDocument.defaultView:null,Tw=(e,t)=>Math.abs(e-t);function q6(e,t){const n=Tw(e.x,t.x),r=Tw(e.y,t.y);return Math.sqrt(n**2+r**2)}class WO{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:o=!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 g=ry(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,v=q6(g.offset,{x:0,y:0})>=3;if(!y&&!v)return;const{point:_}=g,{timestamp:S}=cn;this.history.push({..._,timestamp:S});const{onStart:A,onMove:w}=this.handlers;y||(A&&A(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,g)},this.handlePointerMove=(g,y)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=ny(y,this.transformPagePoint),xt.update(this.updatePoint,!0)},this.handlePointerUp=(g,y)=>{this.end();const{onEnd:v,onSessionEnd:_,resumeAnimation:S}=this.handlers;if(this.dragSnapToOrigin&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=ry(g.type==="pointercancel"?this.lastMoveEventInfo:ny(y,this.transformPagePoint),this.history);this.startEvent&&v&&v(g,A),_&&_(g,A)},!G0(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const l=Ou(t),u=ny(l,this.transformPagePoint),{point:d}=u,{timestamp:f}=cn;this.history=[{...d,timestamp:f}];const{onSessionStart:m}=n;m&&m(t,ry(u,this.history)),this.removeListeners=Nu(Cc(this.contextWindow,"pointermove",this.handlePointerMove),Cc(this.contextWindow,"pointerup",this.handlePointerUp),Cc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_a(this.updatePoint)}}function ny(e,t){return t?{point:t(e.point)}:e}function Cw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ry({point:e},t){return{point:e,delta:Cw(e,YO(t)),offset:Cw(e,K6(t)),velocity:W6(t,.1)}}function K6(e){return e[0]}function YO(e){return e[e.length-1]}function W6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=YO(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>wi(t)));)n--;if(!r)return{x:0,y:0};const o=Ti(a.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(a.x-r.x)/o,y:(a.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function Y6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ct(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ct(n,e,r.max):Math.min(e,n)),e}function Rw(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 Z6(e,{top:t,left:n,bottom:r,right:a}){return{x:Rw(e.x,n,a),y:Rw(e.y,t,r)}}function Nw(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 X6(e,t){return{x:Nw(e.x,t.x),y:Nw(e.y,t.y)}}function Q6(e,t){let n=.5;const r=Sn(e),a=Sn(t);return a>r?n=Uo(t.min,t.max-r,e.min):r>a&&(n=Uo(e.min,e.max-a,t.min)),ki(0,1,n)}function J6(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 vv=.35;function e8(e=vv){return e===!1?e=0:e===!0&&(e=vv),{x:Ow(e,"left","right"),y:Ow(e,"top","bottom")}}function Ow(e,t,n){return{min:kw(e,t),max:kw(e,n)}}function kw(e,t){return typeof e=="number"?e:e[t]||0}const t8=new WeakMap;class n8{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=Pt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=m=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ou(m).point)},o=(m,g)=>{const{drag:y,dragPropagation:v,onDragStart:_}=this.getProps();if(y&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Z5(y),!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),lr(A=>{let w=this.getAxisMotionValue(A).get()||0;if($r.test(w)){const{projection:T}=this.visualElement;if(T&&T.layout){const R=T.layout.layoutBox[A];R&&(w=Sn(R)*(parseFloat(w)/100))}}this.originPoint[A]=w}),_&&xt.postRender(()=>_(m,g)),av(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},l=(m,g)=>{const{dragPropagation:y,dragDirectionLock:v,onDirectionLock:_,onDrag:S}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:A}=g;if(v&&this.currentDirection===null){this.currentDirection=r8(A),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",g.point,A),this.updateAxis("y",g.point,A),this.visualElement.render(),S&&S(m,g)},u=(m,g)=>this.stop(m,g),d=()=>lr(m=>{var g;return this.getAnimationState(m)==="paused"&&((g=this.getAxisMotionValue(m).animation)===null||g===void 0?void 0:g.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new WO(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:KO(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&xt.postRender(()=>o(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||!sf(t,a,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=Y6(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&So(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=Z6(a.layoutBox,n):this.constraints=!1,this.elastic=e8(r),o!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&lr(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=J6(a.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!So(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const o=$6(r,a.root,this.visualElement.getTransformPagePoint());let l=X6(a.layout.layoutBox,o);if(n){const u=n(j6(l));this.hasMutatedConstraints=!!u,u&&(l=UO(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},f=lr(m=>{if(!sf(m,n,this.currentDirection))return;let g=d&&d[m]||{};l&&(g={min:0,max:0});const y=a?200:1e6,v=a?40:1e7,_={type:"inertia",velocity:r?t[m]:0,bounceStiffness:y,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...o,...g};return this.startAxisValueAnimation(m,_)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return av(this.visualElement,t),r.start(fb(t,r,0,n,this.visualElement,!1))}stopAnimation(){lr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){lr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?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){lr(n=>{const{drag:r}=this.getProps();if(!sf(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,o=this.getAxisMotionValue(n);if(a&&a.layout){const{min:l,max:u}=a.layout.layoutBox[n];o.set(t[n]-Ct(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!So(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};lr(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();a[l]=Q6({min:d,max:d},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),lr(l=>{if(!sf(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:f}=this.constraints[l];u.set(Ct(d,f,a[l]))})}addListeners(){if(!this.visualElement.current)return;t8.set(this.visualElement,this);const t=this.visualElement.current,n=Cc(t,"pointerdown",d=>{const{drag:f,dragListener:m=!0}=this.getProps();f&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();So(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,o=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),xt.read(r);const l=ru(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f})=>{this.isDragging&&f&&(lr(m=>{const g=this.getAxisMotionValue(m);g&&(this.originPoint[m]+=d[m].translate,g.set(g.get()+d[m].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:o=!1,dragElastic:l=vv,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function sf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function r8(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class i8 extends Oa{constructor(t){super(t),this.removeGroupControls=qn,this.removeListeners=qn,this.controls=new n8(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Dw=e=>(t,n)=>{e&&xt.postRender(()=>e(t,n))};class a8 extends Oa{constructor(){super(...arguments),this.removePointerDownListener=qn}onPointerDown(t){this.session=new WO(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:KO(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:Dw(t),onStart:Dw(n),onMove:r,onEnd:(o,l)=>{delete this.session,a&&xt.postRender(()=>a(o,l))}}}mount(){this.removePointerDownListener=Cc(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 Rf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Iw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Be.test(e))e=parseFloat(e);else return e;const n=Iw(e,t.target.x),r=Iw(e,t.target.y);return`${n}% ${r}%`}},s8={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=xa.parse(e);if(a.length>5)return r;const o=xa.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 f=Ct(u,d,.5);return typeof a[2+l]=="number"&&(a[2+l]/=f),typeof a[3+l]=="number"&&(a[3+l]/=f),o(a)}};class o8 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:o}=t;AG(l8),o&&(n.group&&n.group.add(o),r&&r.register&&a&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Rf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:o}=this.props,l=r.projection;return l&&(l.isPresent=o,a||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||xt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),F0.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 ZO(e){const[t,n]=z5(),r=E.useContext(kN);return b.jsx(o8,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(qN),isPresent:t,safeToRemove:n})}const l8={borderRadius:{...fc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fc,borderTopRightRadius:fc,borderBottomLeftRadius:fc,borderBottomRightRadius:fc,boxShadow:s8};function c8(e,t,n){const r=gn(e)?e:Xc(e);return r.start(fb("",r,t,n)),r.animation}function u8(e){return e instanceof SVGElement&&e.tagName!=="svg"}const d8=(e,t)=>e.depth-t.depth;class f8{constructor(){this.children=[],this.isDirty=!1}add(t){j0(this.children,t),this.isDirty=!0}remove(t){P0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(d8),this.isDirty=!1,this.children.forEach(t)}}function h8(e,t){const n=Gr.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(_a(r),e(o-t))};return xt.read(r,!0),()=>_a(r)}const XO=["TopLeft","TopRight","BottomLeft","BottomRight"],m8=XO.length,Lw=e=>typeof e=="string"?parseFloat(e):e,Mw=e=>typeof e=="number"||Be.test(e);function p8(e,t,n,r,a,o){a?(e.opacity=Ct(0,n.opacity!==void 0?n.opacity:1,g8(r)),e.opacityExit=Ct(t.opacity!==void 0?t.opacity:1,0,y8(r))):o&&(e.opacity=Ct(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<m8;l++){const u=`border${XO[l]}Radius`;let d=jw(t,u),f=jw(n,u);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||Mw(d)===Mw(f)?(e[u]=Math.max(Ct(Lw(d),Lw(f),r),0),($r.test(f)||$r.test(d))&&(e[u]+="%")):e[u]=f}(t.rotate||n.rotate)&&(e.rotate=Ct(t.rotate||0,n.rotate||0,r))}function jw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const g8=QO(0,.5,hO),y8=QO(.5,.95,qn);function QO(e,t,n){return r=>r<e?0:r>t?1:n(Uo(e,t,r))}function Pw(e,t){e.min=t.min,e.max=t.max}function sr(e,t){Pw(e.x,t.x),Pw(e.y,t.y)}function Vw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Bw(e,t,n,r,a){return e-=t,e=oh(e,1/n,r),a!==void 0&&(e=oh(e,1/a,r)),e}function v8(e,t=0,n=1,r=.5,a,o=e,l=e){if($r.test(t)&&(t=parseFloat(t),t=Ct(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=Ct(o.min,o.max,r);e===o&&(u-=t),e.min=Bw(e.min,t,n,u,a),e.max=Bw(e.max,t,n,u,a)}function zw(e,t,[n,r,a],o,l){v8(e,t[n],t[r],t[a],t.scale,o,l)}const b8=["x","scaleX","originX"],_8=["y","scaleY","originY"];function Uw(e,t,n,r){zw(e.x,t,b8,n?n.x:void 0,r?r.x:void 0),zw(e.y,t,_8,n?n.y:void 0,r?r.y:void 0)}function Hw(e){return e.translate===0&&e.scale===1}function JO(e){return Hw(e.x)&&Hw(e.y)}function Fw(e,t){return e.min===t.min&&e.max===t.max}function x8(e,t){return Fw(e.x,t.x)&&Fw(e.y,t.y)}function Gw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ek(e,t){return Gw(e.x,t.x)&&Gw(e.y,t.y)}function $w(e){return Sn(e.x)/Sn(e.y)}function qw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class E8{constructor(){this.members=[]}add(t){j0(this.members,t),t.scheduleRender()}remove(t){if(P0(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 o=this.members[a];if(o.isPresent!==!1){r=o;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 S8(e,t,n){let r="";const a=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((a||o||l)&&(r=`translate3d(${a}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:m,rotateX:g,rotateY:y,skewX:v,skewY:_}=n;f&&(r=`perspective(${f}px) ${r}`),m&&(r+=`rotate(${m}deg) `),g&&(r+=`rotateX(${g}deg) `),y&&(r+=`rotateY(${y}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 iy=["","X","Y","Z"],A8={visibility:"hidden"},Kw=1e3;let w8=0;function ay(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function tk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=sO(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",xt,!(a||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&tk(r)}function nk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(l={},u=t==null?void 0:t()){this.id=w8++,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(R8),this.nodes.forEach(I8),this.nodes.forEach(L8),this.nodes.forEach(N8)},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 f8)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new B0),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,u=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=u8(l),this.instance=l;const{layoutId:d,layout:f,visualElement:m}=this.options;if(m&&!m.current&&m.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),u&&(f||d)&&(this.isLayoutDirty=!0),e){let g;const y=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,g&&g(),g=h8(y,250),Rf.hasAnimatedSinceResize&&(Rf.hasAnimatedSinceResize=!1,this.nodes.forEach(Yw))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&m&&(d||f)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:_})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||m.getDefaultTransition()||B8,{onLayoutAnimationStart:A,onLayoutAnimationComplete:w}=m.getProps(),T=!this.targetLayout||!ek(this.targetLayout,_),R=!y&&v;if(this.options.layoutRoot||this.resumeFrom||R||y&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(g,R);const D={...z0(S,"layout"),onPlay:A,onComplete:w};(m.shouldReduceMotion||this.options.layoutRoot)&&(D.delay=0,D.type=!1),this.startAnimation(D)}else y||Yw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=_})}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,_a(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(M8),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&&tk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const g=this.path[m];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ww);return}this.isUpdating||this.nodes.forEach(k8),this.isUpdating=!1,this.nodes.forEach(D8),this.nodes.forEach(T8),this.nodes.forEach(C8),this.clearAllSnapshots();const u=Gr.now();cn.delta=ki(0,1e3/60,u-cn.timestamp),cn.timestamp=u,cn.isProcessing=!0,Yg.update.process(cn),Yg.preRender.process(cn),Yg.render.process(cn),cn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,F0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(O8),this.sharedNodes.forEach(j8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Sn(this.snapshot.measuredBox.x)&&!Sn(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=Pt(),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){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&&!JO(this.projectionDelta),d=this.getTransformTemplate(),f=d?d(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;l&&(u||is(this.latestValues)||m)&&(a(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),z8(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:u}=this.options;if(!u)return Pt();const d=u.measureViewportBox();if(!(((l=this.scroll)===null||l===void 0?void 0:l.wasRoot)||this.path.some(U8))){const{scroll:m}=this.root;m&&(To(d.x,m.offset.x),To(d.y,m.offset.y))}return d}removeElementScroll(l){var u;const d=Pt();if(sr(d,l),!((u=this.scroll)===null||u===void 0)&&u.wasRoot)return d;for(let f=0;f<this.path.length;f++){const m=this.path[f],{scroll:g,options:y}=m;m!==this.root&&g&&y.layoutScroll&&(g.wasRoot&&sr(d,l),To(d.x,g.offset.x),To(d.y,g.offset.y))}return d}applyTransform(l,u=!1){const d=Pt();sr(d,l);for(let f=0;f<this.path.length;f++){const m=this.path[f];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Co(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),is(m.latestValues)&&Co(d,m.latestValues)}return is(this.latestValues)&&Co(d,this.latestValues),d}removeTransform(l){const u=Pt();sr(u,l);for(let d=0;d<this.path.length;d++){const f=this.path[d];if(!f.instance||!is(f.latestValues))continue;gv(f.latestValues)&&f.updateSnapshot();const m=Pt(),g=f.measurePageBox();sr(m,g),Uw(u,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,m)}return is(this.latestValues)&&Uw(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!==cn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var u;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:y}=this.options;if(!(!this.layout||!(g||y))){if(this.resolvedRelativeTargetAt=cn.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pt(),this.relativeTargetOrigin=Pt(),Nc(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),sr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pt(),this.targetWithTransforms=Pt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),F6(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sr(this.target,this.layout.layoutBox),$O(this.target,this.targetDelta)):sr(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=Pt(),this.relativeTargetOrigin=Pt(),Nc(this.relativeTargetOrigin,this.target,v.target),sr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||gv(this.parent.latestValues)||GO(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 l;const u=this.getLead(),d=!!this.resumingFrom||this!==u;let f=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===cn.timestamp&&(f=!1),f)return;const{layout:m,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||g))return;sr(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;G6(this.layoutCorrected,this.treeScale,this.path,d),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=Pt());const{target:_}=u;if(!_){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Vw(this.prevProjectionDelta.x,this.projectionDelta.x),Vw(this.prevProjectionDelta.y,this.projectionDelta.y)),Rc(this.projectionDelta,this.layoutCorrected,_,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!qw(this.projectionDelta.x,this.prevProjectionDelta.x)||!qw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",_))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)===null||u===void 0||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wo(),this.projectionDelta=wo(),this.projectionDeltaWithTransform=wo()}setAnimationOrigin(l,u=!1){const d=this.snapshot,f=d?d.latestValues:{},m={...this.latestValues},g=wo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const y=Pt(),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(V8));this.animationProgress=0;let R;this.mixTargetDelta=D=>{const N=D/1e3;Zw(g.x,l.x,N),Zw(g.y,l.y,N),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nc(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),P8(this.relativeTarget,this.relativeTargetOrigin,y,N),R&&x8(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Pt()),sr(R,this.relativeTarget)),S&&(this.animationValues=m,p8(m,f,this.latestValues,N,T,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(_a(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xt.update(()=>{Rf.hasAnimatedSinceResize=!0,this.currentAnimation=c8(0,Kw,{...l,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},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(Kw),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:f,latestValues:m}=l;if(!(!u||!d||!f)){if(this!==l&&this.layout&&f&&rk(this.options.animationType,this.layout.layoutBox,f.layoutBox)){d=this.target||Pt();const g=Sn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+g;const y=Sn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+y}sr(u,d),Co(u,m),Rc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new E8),this.sharedNodes.get(l).add(u);const f=u.options.initialPromotionConfig;u.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:u}=this.options;return u?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:u}=this.options;return u?(l=this.getStack())===null||l===void 0?void 0:l.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 f=this.getStack();f&&f.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 f={};d.z&&ay("z",l,f,this.animationValues);for(let m=0;m<iy.length;m++)ay(`rotate${iy[m]}`,l,f,this.animationValues),ay(`skew${iy[m]}`,l,f,this.animationValues);l.render();for(const m in f)l.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);l.scheduleRender()}getProjectionStyles(l){var u,d;if(!this.instance||this.isSVG)return;if(!this.isVisible)return A8;const f={visibility:""},m=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=Cf(l==null?void 0:l.pointerEvents)||"",f.transform=m?m(this.latestValues,""):"none",f;const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){const S={};return this.options.layoutId&&(S.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,S.pointerEvents=Cf(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!is(this.latestValues)&&(S.transform=m?m({},""):"none",this.hasProjected=!1),S}const y=g.animationValues||g.latestValues;this.applyTransformsToTarget(),f.transform=S8(this.projectionDeltaWithTransform,this.treeScale,y),m&&(f.transform=m(y,f.transform));const{x:v,y:_}=this.projectionDelta;f.transformOrigin=`${v.origin*100}% ${_.origin*100}% 0`,g.animationValues?f.opacity=g===this?(d=(u=y.opacity)!==null&&u!==void 0?u:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:f.opacity=g===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const S in Jc){if(y[S]===void 0)continue;const{correct:A,applyTo:w,isCSSVariable:T}=Jc[S],R=f.transform==="none"?y[S]:A(y[S],g);if(w){const D=w.length;for(let N=0;N<D;N++)f[w[N]]=R}else T?this.options.visualElement.renderState.vars[S]=R:f[S]=R}return this.options.layoutId&&(f.pointerEvents=g===this?Cf(l==null?void 0:l.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(Ww),this.root.sharedNodes.clear()}}}function T8(e){e.updateLayout()}function C8(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:o}=e.options,l=n.source!==e.layout.source;o==="size"?lr(g=>{const y=l?n.measuredBox[g]:n.layoutBox[g],v=Sn(y);y.min=r[g].min,y.max=y.min+v}):rk(o,n.layoutBox,r)&&lr(g=>{const y=l?n.measuredBox[g]:n.layoutBox[g],v=Sn(r[g]);y.max=y.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+v)});const u=wo();Rc(u,r,n.layoutBox);const d=wo();l?Rc(d,e.applyTransform(a,!0),n.measuredBox):Rc(d,r,n.layoutBox);const f=!JO(u);let m=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:y,layout:v}=g;if(y&&v){const _=Pt();Nc(_,n.layoutBox,y.layoutBox);const S=Pt();Nc(S,r,v.layoutBox),ek(_,S)||(m=!0),g.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=_,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:d,layoutDelta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function R8(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 N8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function O8(e){e.clearSnapshot()}function Ww(e){e.clearMeasurements()}function k8(e){e.isLayoutDirty=!1}function D8(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Yw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function I8(e){e.resolveTargetDelta()}function L8(e){e.calcProjection()}function M8(e){e.resetSkewAndRotation()}function j8(e){e.removeLeadSnapshot()}function Zw(e,t,n){e.translate=Ct(t.translate,0,n),e.scale=Ct(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Xw(e,t,n,r){e.min=Ct(t.min,n.min,r),e.max=Ct(t.max,n.max,r)}function P8(e,t,n,r){Xw(e.x,t.x,n.x,r),Xw(e.y,t.y,n.y,r)}function V8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const B8={duration:.45,ease:[.4,0,.1,1]},Qw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Jw=Qw("applewebkit/")&&!Qw("chrome/")?Math.round:qn;function eT(e){e.min=Jw(e.min),e.max=Jw(e.max)}function z8(e){eT(e.x),eT(e.y)}function rk(e,t,n){return e==="position"||e==="preserve-aspect"&&!H6($w(t),$w(n),.2)}function U8(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const H8=nk({attachResizeListener:(e,t)=>ru(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),sy={current:void 0},ik=nk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sy.current){const e=new H8({});e.mount(window),e.setOptions({layoutScroll:!0}),sy.current=e}return sy.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),F8={pan:{Feature:a8},drag:{Feature:i8,ProjectionNode:ik,MeasureLayout:ZO}};function tT(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,o=r[a];o&&xt.postRender(()=>o(t,Ou(t)))}class G8 extends Oa{mount(){const{current:t}=this.node;t&&(this.unmount=Q5(t,(n,r)=>(tT(this.node,r,"Start"),a=>tT(this.node,a,"End"))))}unmount(){}}class $8 extends Oa{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=Nu(ru(this.node.current,"focus",()=>this.onFocus()),ru(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function nT(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),o=r[a];o&&xt.postRender(()=>o(t,Ou(t)))}class q8 extends Oa{mount(){const{current:t}=this.node;t&&(this.unmount=nG(t,(n,r)=>(nT(this.node,r,"Start"),(a,{success:o})=>nT(this.node,a,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const bv=new WeakMap,oy=new WeakMap,K8=e=>{const t=bv.get(e.target);t&&t(e)},W8=e=>{e.forEach(K8)};function Y8({root:e,...t}){const n=e||document;oy.has(n)||oy.set(n,{});const r=oy.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(W8,{root:e,...t})),r[a]}function Z8(e,t,n){const r=Y8(t);return bv.set(e,n),r.observe(e),()=>{bv.delete(e),r.unobserve(e)}}const X8={some:0,all:1};class Q8 extends Oa{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:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:X8[a]},u=d=>{const{isIntersecting:f}=d;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),y=f?m:g;y&&y(d)};return Z8(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(J8(t,n))&&this.startObserver()}unmount(){}}function J8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ak={inView:{Feature:Q8},tap:{Feature:q8},focus:{Feature:$8},hover:{Feature:G8}},e9={layout:{ProjectionNode:ik,MeasureLayout:ZO}},_v={current:null},sk={current:!1};function t9(){if(sk.current=!0,!!L0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>_v.current=e.matches;e.addListener(t),t()}else _v.current=!1}const n9=[...RO,pn,xa],r9=e=>n9.find(CO(e)),i9=new WeakMap;function a9(e,t,n){for(const r in t){const a=t[r],o=n[r];if(gn(a))e.addValue(r,a);else if(gn(o))e.addValue(r,Xc(a,{owner:e}));else if(o!==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,Xc(l!==void 0?l:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const rT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class s9{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:o,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=cb,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 v=Gr.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,xt.render(this.render,!1,!0))};const{latestValues:d,renderState:f,onUpdate:m}=l;this.onUpdate=m,this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Wh(n),this.isVariantNode=GN(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const v in y){const _=y[v];d[v]!==void 0&&gn(_)&&_.set(d[v],!1)}}mount(t){this.current=t,i9.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)),sk.current||t9(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_v.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),_a(this.notifyUpdate),_a(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=Cs.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&xt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),o(),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 Ho){const n=Ho[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 o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pt()}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<rT.length;r++){const a=rT[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const o="on"+a,l=t[o];l&&(this.propEventSubscriptions[a]=this.on(a,l))}this.prevMotionValues=a9(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=Xc(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(wO(a)||pO(a))?a=parseFloat(a):!r9(a)&&xa.test(n)&&(a=EO(t,n)),this.setBaseTarget(t,gn(a)?a.get():a)),gn(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const l=rb(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);l&&(a=l[t])}if(r&&a!==void 0)return a;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!gn(o)?o:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new B0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ok extends s9{constructor(){super(...arguments),this.KeyframeResolver=NO}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 o9(e){return window.getComputedStyle(e)}class l9 extends ok{constructor(){super(...arguments),this.type="html",this.renderInstance=tO}readValueFromInstance(t,n){if(Cs.has(n))return x$(t,n);{const r=o9(t),a=(Y0(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return qO(t,n)}build(t,n,r){Q0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ib(t,n,r)}}class c9 extends ok{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&eO(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Cs.has(n)){const r=xO(n);return r&&r.default||0}return n=nO.has(n)?n:W0(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return iO(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&xt.postRender(this.updateDimensions)}build(t,n,r){tb(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){rO(t,n,r,a)}mount(t){this.isSVGTag=nb(t.tagName),super.mount(t)}}const lk=(e,t)=>eb(e)?new c9(t):new l9(t,{allowProjection:e!==E.Fragment}),u9=WG({...zO,...ak,...F8,...e9},lk),ck=uG(u9),d9={renderer:lk,...zO,...ak},uk=e=>{const[t,n]=E.useState(e);return E.useEffect(()=>{n(e??window.document.body)},[e]),t};function f9(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:h9}=$e;function dk(e){const t=h9();return n=>{const r=e(n);return f9(t.current,r)?t.current:t.current=r}}const fk=e=>{const{disableScroll:t=!1,element:n,key:r="unnamed_blocker"}=e??{},{isElementScrollBlocked:a,addBlockage:o,removeBlockage:l}=az(dk(f=>({isElementScrollBlocked:f.isElementScrollBlocked,addBlockage:f.addBlockage,removeBlockage:f.removeBlockage}))),u=uk(n);return E.useEffect(()=>{const f=n??window.document.body;t?o(r,f):l(r,f)},[o,t,n,r,l]),{isScrollBlocked:u?a(u):!1}},m9=mr("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"}}),Jr=({children:e,roundedSize:t,padding:n,transparency:r,separator:a,className:o,border:l,borderColor:u,background:d,...f})=>b.jsx("div",{className:Te(m9({roundedSize:t,transparency:r,padding:n,separator:a,border:typeof l=="boolean"?l?"with":"none":void 0,background:d,borderColor:u,className:o})),...f,children:e}),hb="relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8",p9="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",g9=({className:e,...t})=>b.jsx("h1",{className:Te("mt-5 text-2xl font-bold",e),...t}),y9=({className:e,...t})=>b.jsx("h2",{className:Te("mt-16 mb-2 text-2xl font-bold",hb,e),...t}),v9=({className:e,...t})=>b.jsx("h3",{className:Te("mt-5 mb-2 text-xl font-bold",hb,e),...t}),b9=({className:e,...t})=>b.jsx("h4",{className:Te("mt-3 text-lg font-bold",hb,e),...t}),_9=e=>String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase(),x9=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"})},E9=(e,t)=>{const n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,a=window.getComputedStyle(e,":after"),o=n+parseInt(a.getPropertyValue("left"),10),l=o+parseInt(a.width,10),u=r+parseInt(a.getPropertyValue("top"),10),d=u+parseInt(a.height,10),f=t.clientX,m=t.clientY;return f>=o&&f<=l&&m>=u&&m<=d},mb=({H:e,children:t,className:n,isClickable:r,...a})=>{const o=typeof t=="string"?_9(t):void 0,l=u=>{const{id:d}=u.currentTarget;if(E9(u.currentTarget,u)&&typeof d=="string"){const g=`${window.location.href.split("#")[0]}#${d}`;navigator.clipboard.writeText(g),x9(d)}};return b.jsx(e,{id:o,onClick:r?l:void 0,"aria-label":r?`Click to scroll to section ${o} and copy the link to the clipboard`:void 0,className:Te(r&&p9,n),...a,children:t})},S9=({isClickable:e,...t})=>b.jsx(g9,{...t}),A9=({isClickable:e=!1,...t})=>b.jsx(mb,{H:y9,isClickable:e,...t}),pb=({isClickable:e=!1,...t})=>b.jsx(mb,{H:v9,isClickable:e,...t}),w9=({isClickable:e=!1,...t})=>b.jsx(mb,{H:b9,isClickable:e,...t}),T9=mr("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"}}),C9=ck.create(Jr),hk=({children:e,isOpen:t,container:n,disableScroll:r=!1,onClose:a,hasCloseButton:o=!1,title:l,size:u="md",className:d,...f})=>{const m=uk(n);if(fk({key:"modal",disableScroll:t&&r}),!m)return b.jsx(b.Fragment,{});const g=typeof l=="string";return ws.createPortal(b.jsx(ck.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:y=>{y.stopPropagation(),a==null||a()},"aria-hidden":!t,children:b.jsx("div",{className:"flex justify-center p-4",children:b.jsxs(C9,{onClick:y=>y.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:T9({size:u,className:d}),role:"dialog","aria-modal":!0,roundedSize:"2xl",...f,children:[b.jsxs("div",{className:Te("cursor-default px-4",o&&g?"flex items-center justify-center":o?"flex items-center justify-end":g?"items-center":"hidden"),children:[g&&b.jsx(pb,{className:"ml-4 flex items-center justify-center text-lg font-bold",children:l}),o&&b.jsx(gt,{variant:"hoverable",color:"text",label:"Close modal",className:"ml-auto",onClick:y=>{y.stopPropagation(),a==null||a()},Icon:Ts,size:"icon-md"})]}),b.jsx("div",{className:"flex flex-1 flex-col items-center overflow-auto",children:e})]})})}),m)},R9=mr("gap-3 font-medium 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/10 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"}}),N9=({href:e,isExternalLink:t})=>{const n=typeof e=="string"&&e.trim()!=="";return t===!0||typeof t>"u"&&n&&/^https?:\/\//.test(e)},gb=e=>{const{variant:t="default",color:n="primary",children:r,label:a,className:o,isActive:l,underlined:u,locale:d,isExternalLink:f,href:m,...g}=e,{internationalization:y}=rt,v=N9(e),_=typeof r=="string",S=v?"noopener noreferrer nofollow":void 0,A=v?"_blank":"_self",w=d?d===y.defaultLocale?"x-default":d:void 0,T=d&&m&&!v?nj(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:Te(R9({variant:t,color:n,underlined:u,className:o})),...g,children:[t==="button"?b.jsx("span",{children:r}):r,v&&_&&b.jsx(UV,{className:"ml-2 inline-block size-4"})]})},mk={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:"Перейти на"})}},O9=({href:e,lang:t,children:n,onClick:r,color:a,position:o,locale:l,...u})=>{const{linkLabel:d}=rn(mk);return b.jsxs(b.Fragment,{children:[b.jsx(gb,{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:o.toString()})]})},k9=({children:e,onClick:t,color:n,position:r,...a})=>{const{linkLabel:o}=rn(mk);return b.jsxs(b.Fragment,{children:[b.jsx(gt,{onClick:t,variant:"link",label:`${o} ${e}`,color:n,itemProp:"item",...a,children:b.jsx("span",{itemProp:"name",children:e})}),b.jsx("meta",{itemProp:"position",content:r.toString()})]})},D9=({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()})]}),I9=({links:e,className:t,color:n="text",locale:r,elementType:a="page",...o})=>b.jsx("nav",{"aria-label":"breadcrumb",children:b.jsx("ol",{className:Te("flex flex-row flex-wrap items-center gap-2 text-sm",t),itemScope:!0,itemType:"http://schema.org/BreadcrumbList",...o,children:e.map((l,u)=>{const d=u===e.length-1,f=typeof l=="object"&&typeof l.href=="string",m=typeof l=="object"&&typeof l.onClick=="function",y=u===e.length-1?a:void 0,v=l.text??l;let _=b.jsx(D9,{position:u+1,"aria-current":y,children:v},v);f?_=b.jsx(O9,{href:l.href,color:n,position:u+1,locale:r,"aria-current":y,children:v},v):m&&(_=b.jsx(k9,{onClick:l.onClick,color:n,position:u+1,"aria-current":y,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(jf,{size:10})]},v)})})}),L9={key:"save-dictionary-details",content:{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:"Нажмите, чтобы отменить"})}}}},pk=({dictionary:e,mode:t,className:n,...r})=>{var U;const[a,o]=E.useState(!1),{setLocaleDictionary:l}=Hv(),{writeDictionary:u,isLoading:d}=D2(),{pushDictionaries:f,isLoading:m}=C2(),g=d||m,y=t.includes("local")&&((U=e.filePath)==null?void 0:U.endsWith(".json")),{editedContent:v,restoreEditedContent:_}=wn(),{resetButton:S,saveButton:A,publishButton:w,downloadButton:T,confirmation:R}=rn(L9),{isAuthenticated:D}=yu(),N=v==null?void 0:v[e.key],k=N&&JSON.stringify(N)!==JSON.stringify(e),I=typeof(e==null?void 0:e._id)>"u",P=async()=>{if(!(v!=null&&v[e.key]))return;const ue={...e,...v==null?void 0:v[e.key]};await u(ue).then(()=>{l(v==null?void 0:v[e.key]),_(e.key)})},V=async()=>{if(!(v!=null&&v[e.key]))return;const ue={...e,...v==null?void 0:v[e.key]};await f([ue]).then(oe=>{oe&&(l(v==null?void 0:v[e.key]),_(e.key))})};return b.jsxs(b.Fragment,{children:[b.jsx(hk,{isOpen:a,title:R.title.value,size:"md",children:b.jsxs("form",{className:"size-full px-3",children:[y?b.jsx("p",{className:"text-neutral py-4 text-sm",children:R.message}):b.jsx("p",{className:"text-neutral py-4 text-sm",children:R.differentFormatMessage}),b.jsxs("div",{className:"mt-12 flex justify-end gap-2 max-md:flex-col",children:[b.jsx(et.Button,{label:R.cancelButton.label.value,disabled:!k||g,color:"text",className:"max-md:w-full",variant:"outline",onClick:()=>o(!1),children:R.cancelButton.text}),b.jsx(et.Button,{label:R.confirmButton.label.value,disabled:!k||g,Icon:VS,color:"text",className:"max-md:w-full",isLoading:m,onClick:P,children:R.confirmButton.text})]})]})}),b.jsxs("form",{className:Te("flex justify-end gap-2 max-md:flex-col",n),...r,children:[k&&b.jsx(et.Button,{label:S.label.value,disabled:!k,Icon:JV,variant:"outline",color:"text",className:"max-md:w-full",onClick:()=>_(e.key),children:S.text}),t.includes("local")&&b.jsx(et.Button,{label:T.label.value,disabled:!k||g,Icon:BV,color:"text",variant:D?"outline":"default",className:"max-md:w-full",isLoading:d,onClick:()=>o(!0),children:T.text}),t.includes("remote")&&D&&I&&b.jsx(et.Button,{label:w.label.value,disabled:g,Icon:AV,color:"text",className:"max-md:w-full",isLoading:m,onClick:V,children:w.text}),t.includes("remote")&&D&&!I&&k&&b.jsx(et.Button,{label:A.label.value,disabled:!k||g,Icon:VS,color:"text",className:"max-md:w-full",isLoading:m,onClick:V,children:A.text})]})]})},gk=({level:e,title:t,description:n,children:r,rightParam:a,isSelected:o,...l})=>b.jsx("div",{className:Te("rounded-md p-2 transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",e===2&&"hover:bg-card/30",e>=3&&"",o===!0&&"bg-card/40"),...l,children:b.jsx(Y1,{isOpen:o,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:Te(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})}),yk=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:a,onFocusKeyPath:o,renderSection:l})=>{const u=r??Ur(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,f=String(u??t);return b.jsx("span",{role:"button",tabIndex:0,className:Te("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(),o(e)},children:typeof l=="function"?l(f):b.jsx(FC,{"aria-label":"Editable field",defaultValue:f,onSave:m=>a({keyPath:e,newValue:m}),onCancel:()=>null})})},M9=e=>{const{keyPath:t,section:n}=e,{addEditedContent:r}=wn(),a=Ur(e.editedContent,t),o=n[q.File],{content:l}=n,u=[...t,{type:q.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:[o," "]}),b.jsx(yk,{...e,keyPath:u,section:l,editedContentValue:a==null?void 0:a.content,onContentChange:d=>{console.log("lll",{subSection:o,file:{...n,content:d.newValue},keyPath:t,newKeyPath:u}),r(e.dictionary.key,{...n,content:d.newValue},t)}})]})},j9=e=>{const{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:a=[]}=e;return n.map((o,l)=>{const u={key:l,type:q.Array},d=[...t,u];return b.jsx(gk,{level:t.length,title:`${l}`,description:"",isSelected:fu(d,a),onClick:f=>{f.stopPropagation(),r(d)},children:b.jsx(ka,{...e,keyPath:d,section:o})},JSON.stringify(o))})},P9=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=>!yb.includes(r)).map(r=>{const a={type:q.Condition,key:r},o=[...t,a],l=n[q.Condition][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(ka,{...e,key:r,keyPath:o,section:l})]})})})},V9=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=>!yb.includes(r)).map(r=>{const a={type:q.Enumeration,key:r},o=[...t,a],l=n[q.Enumeration][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(ka,{...e,key:r,keyPath:o,section:l})]})})})},B9=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:q.Insertion}],a=n[q.Insertion];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(ka,{...e,keyPath:r,section:a})})},z9=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:q.Markdown}],a=n[q.Markdown];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(ka,{...e,keyPath:r,section:a})})},U9=e=>{const{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:a}=e;return Object.keys(n).filter(o=>!yb.includes(o)).map(o=>{const l={key:o,type:q.Object},u=[...t,l];return b.jsx(gk,{level:t.length,title:o,description:"",isSelected:fu(u,r),onClick:d=>{d.stopPropagation(),a(u)},children:b.jsx(ka,{...e,keyPath:u,section:n[o]})},o)})},H9=e=>{const{keyPath:t,section:n,locale:r}=e,a={type:q.Translation,key:r},o=[...t,a],l=n.translation[r];return b.jsx(ka,{...e,keyPath:o,section:l})},yb=["filePath","id","nodeType"],ka=e=>{const n=Ur(e.editedContent,e.keyPath)??e.section,r=qo(n);if(typeof n=="object")return r===q.ReactNode?b.jsx("span",{className:"text-neutral text-xs",children:"React node not editable"}):r===q.Nested?b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:"[Nested] Dictionary"}):r===q.Markdown?b.jsx(z9,{...e,section:n}):r===q.Translation?b.jsx(H9,{...e,section:n}):r===q.Enumeration?b.jsx(V9,{...e,section:n}):r===q.Condition?b.jsx(P9,{...e,section:n}):r===q.Insertion?b.jsx(B9,{...e,section:n}):r===q.Array?b.jsx(j9,{...e,section:n}):r===q.File?b.jsx(M9,{...e,section:n}):b.jsx(U9,{...e,section:n});if(typeof n=="string")return b.jsx(yk,{...e,section:n})},F9=({dictionary:e,mode:t,...n})=>{var d;const{editedContent:r,addEditedContent:a}=wn(),{focusedContent:o,setFocusedContentKeyPath:l}=Ea(),u=o==null?void 0:o.keyPath;return b.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2",children:[b.jsx("div",{children:E.createElement(ka,{...n,keyPath:[],dictionary:e,key:JSON.stringify(((r==null?void 0:r[e.key])??e).content),editedContent:(d=r==null?void 0:r[e.key])==null?void 0:d.content,focusedKeyPath:u,section:e.content,onContentChange:f=>{a(e.key,f.newValue,f.keyPath)},onFocusKeyPath:l})}),b.jsx(pk,{dictionary:e,mode:t,className:"mb-4 flex-col"})]})};function Di(e){return Array.isArray?Array.isArray(e):_k(e)==="[object Array]"}function G9(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function $9(e){return e==null?"":G9(e)}function zr(e){return typeof e=="string"}function vk(e){return typeof e=="number"}function q9(e){return e===!0||e===!1||K9(e)&&_k(e)=="[object Boolean]"}function bk(e){return typeof e=="object"}function K9(e){return bk(e)&&e!==null}function Fn(e){return e!=null}function ly(e){return!e.trim().length}function _k(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const W9="Incorrect 'index' type",Y9=e=>`Invalid value for key ${e}`,Z9=e=>`Pattern length exceeds max of ${e}.`,X9=e=>`Missing ${e} property in key`,Q9=e=>`Property 'weight' in key '${e}' must be a positive integer`,iT=Object.prototype.hasOwnProperty;class J9{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let a=xk(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 xk(e){let t=null,n=null,r=null,a=1,o=null;if(zr(e)||Di(e))r=e,t=aT(e),n=xv(e);else{if(!iT.call(e,"name"))throw new Error(X9("name"));const l=e.name;if(r=l,iT.call(e,"weight")&&(a=e.weight,a<=0))throw new Error(Q9(l));t=aT(l),n=xv(l),o=e.getFn}return{path:t,id:n,weight:a,src:r,getFn:o}}function aT(e){return Di(e)?e:e.split(".")}function xv(e){return Di(e)?e.join("."):e}function e7(e,t){let n=[],r=!1;const a=(o,l,u)=>{if(Fn(o))if(!l[u])n.push(o);else{let d=l[u];const f=o[d];if(!Fn(f))return;if(u===l.length-1&&(zr(f)||vk(f)||q9(f)))n.push($9(f));else if(Di(f)){r=!0;for(let m=0,g=f.length;m<g;m+=1)a(f[m],l,u+1)}else l.length&&a(f,l,u+1)}};return a(e,zr(t)?t.split("."):t,0),r?n:n[0]}const t7={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},n7={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},r7={location:0,threshold:.6,distance:100},i7={useExtendedSearch:!1,getFn:e7,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Fe={...n7,...t7,...r7,...i7};const a7=/[^ ]+/g;function s7(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(a){const o=a.match(a7).length;if(n.has(o))return n.get(o);const l=1/Math.pow(o,.5*e),u=parseFloat(Math.round(l*r)/r);return n.set(o,u),u},clear(){n.clear()}}}class vb{constructor({getFn:t=Fe.getFn,fieldNormWeight:n=Fe.fieldNormWeight}={}){this.norm=s7(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,zr(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();zr(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(!Fn(t)||ly(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,o)=>{let l=a.getFn?a.getFn(t):this.getFn(t,a.path);if(Fn(l)){if(Di(l)){let u=[];const d=[{nestedArrIndex:-1,value:l}];for(;d.length;){const{nestedArrIndex:f,value:m}=d.pop();if(Fn(m))if(zr(m)&&!ly(m)){let g={v:m,i:f,n:this.norm.get(m)};u.push(g)}else Di(m)&&m.forEach((g,y)=>{d.push({nestedArrIndex:y,value:g})})}r.$[o]=u}else if(zr(l)&&!ly(l)){let u={v:l,n:this.norm.get(l)};r.$[o]=u}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Ek(e,t,{getFn:n=Fe.getFn,fieldNormWeight:r=Fe.fieldNormWeight}={}){const a=new vb({getFn:n,fieldNormWeight:r});return a.setKeys(e.map(xk)),a.setSources(t),a.create(),a}function o7(e,{getFn:t=Fe.getFn,fieldNormWeight:n=Fe.fieldNormWeight}={}){const{keys:r,records:a}=e,o=new vb({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(a),o}function of(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:a=Fe.distance,ignoreLocation:o=Fe.ignoreLocation}={}){const l=t/e.length;if(o)return l;const u=Math.abs(r-n);return a?l+u/a:u?1:l}function l7(e=[],t=Fe.minMatchCharLength){let n=[],r=-1,a=-1,o=0;for(let l=e.length;o<l;o+=1){let u=e[o];u&&r===-1?r=o:!u&&r!==-1&&(a=o-1,a-r+1>=t&&n.push([r,a]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}const ss=32;function c7(e,t,n,{location:r=Fe.location,distance:a=Fe.distance,threshold:o=Fe.threshold,findAllMatches:l=Fe.findAllMatches,minMatchCharLength:u=Fe.minMatchCharLength,includeMatches:d=Fe.includeMatches,ignoreLocation:f=Fe.ignoreLocation}={}){if(t.length>ss)throw new Error(Z9(ss));const m=t.length,g=e.length,y=Math.max(0,Math.min(r,g));let v=o,_=y;const S=u>1||d,A=S?Array(g):[];let w;for(;(w=e.indexOf(t,_))>-1;){let I=of(t,{currentLocation:w,expectedLocation:y,distance:a,ignoreLocation:f});if(v=Math.min(I,v),_=w+m,S){let P=0;for(;P<m;)A[w+P]=1,P+=1}}_=-1;let T=[],R=1,D=m+g;const N=1<<m-1;for(let I=0;I<m;I+=1){let P=0,V=D;for(;P<V;)of(t,{errors:I,currentLocation:y+V,expectedLocation:y,distance:a,ignoreLocation:f})<=v?P=V:D=V,V=Math.floor((D-P)/2+P);D=V;let U=Math.max(1,y-V+1),ue=l?g:Math.min(y+V,g)+m,oe=Array(ue+2);oe[ue+1]=(1<<I)-1;for(let Y=ue;Y>=U;Y-=1){let J=Y-1,H=n[e.charAt(J)];if(S&&(A[J]=+!!H),oe[Y]=(oe[Y+1]<<1|1)&H,I&&(oe[Y]|=(T[Y+1]|T[Y])<<1|1|T[Y+1]),oe[Y]&N&&(R=of(t,{errors:I,currentLocation:J,expectedLocation:y,distance:a,ignoreLocation:f}),R<=v)){if(v=R,_=J,_<=y)break;U=Math.max(1,2*y-_)}}if(of(t,{errors:I+1,currentLocation:y,expectedLocation:y,distance:a,ignoreLocation:f})>v)break;T=oe}const k={isMatch:_>=0,score:Math.max(.001,R)};if(S){const I=l7(A,u);I.length?d&&(k.indices=I):k.isMatch=!1}return k}function u7(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 lh=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 Sk{constructor(t,{location:n=Fe.location,threshold:r=Fe.threshold,distance:a=Fe.distance,includeMatches:o=Fe.includeMatches,findAllMatches:l=Fe.findAllMatches,minMatchCharLength:u=Fe.minMatchCharLength,isCaseSensitive:d=Fe.isCaseSensitive,ignoreDiacritics:f=Fe.ignoreDiacritics,ignoreLocation:m=Fe.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:a,includeMatches:o,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:f,ignoreLocation:m},t=d?t:t.toLowerCase(),t=f?lh(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const g=(v,_)=>{this.chunks.push({pattern:v,alphabet:u7(v),startIndex:_})},y=this.pattern.length;if(y>ss){let v=0;const _=y%ss,S=y-_;for(;v<S;)g(this.pattern.substr(v,ss),v),v+=ss;if(_){const A=y-ss;g(this.pattern.substr(A),A)}}else g(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a}=this.options;if(t=n?t:t.toLowerCase(),t=r?lh(t):t,this.pattern===t){let S={isMatch:!0,score:0};return a&&(S.indices=[[0,t.length-1]]),S}const{location:o,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:f,ignoreLocation:m}=this.options;let g=[],y=0,v=!1;this.chunks.forEach(({pattern:S,alphabet:A,startIndex:w})=>{const{isMatch:T,score:R,indices:D}=c7(t,S,A,{location:o+w,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:f,includeMatches:a,ignoreLocation:m});T&&(v=!0),y+=R,T&&D&&(g=[...g,...D])});let _={isMatch:v,score:v?y/this.chunks.length:1};return v&&a&&(_.indices=g),_}}class Da{constructor(t){this.pattern=t}static isMultiMatch(t){return sT(t,this.multiRegex)}static isSingleMatch(t){return sT(t,this.singleRegex)}search(){}}function sT(e,t){const n=e.match(t);return n?n[1]:null}class d7 extends Da{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 f7 extends Da{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 h7 extends Da{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 m7 extends Da{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 p7 extends Da{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 g7 extends Da{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 Ak extends Da{constructor(t,{location:n=Fe.location,threshold:r=Fe.threshold,distance:a=Fe.distance,includeMatches:o=Fe.includeMatches,findAllMatches:l=Fe.findAllMatches,minMatchCharLength:u=Fe.minMatchCharLength,isCaseSensitive:d=Fe.isCaseSensitive,ignoreDiacritics:f=Fe.ignoreDiacritics,ignoreLocation:m=Fe.ignoreLocation}={}){super(t),this._bitapSearch=new Sk(t,{location:n,threshold:r,distance:a,includeMatches:o,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:f,ignoreLocation:m})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class wk extends Da{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=[],o=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+o,a.push([r,n-1]);const l=!!a.length;return{isMatch:l,score:l?0:1,indices:a}}}const Ev=[d7,wk,h7,m7,g7,p7,f7,Ak],oT=Ev.length,y7=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,v7="|";function b7(e,t={}){return e.split(v7).map(n=>{let r=n.trim().split(y7).filter(o=>o&&!!o.trim()),a=[];for(let o=0,l=r.length;o<l;o+=1){const u=r[o];let d=!1,f=-1;for(;!d&&++f<oT;){const m=Ev[f];let g=m.isMultiMatch(u);g&&(a.push(new m(g,t)),d=!0)}if(!d)for(f=-1;++f<oT;){const m=Ev[f];let g=m.isSingleMatch(u);if(g){a.push(new m(g,t));break}}}return a})}const _7=new Set([Ak.type,wk.type]);class x7{constructor(t,{isCaseSensitive:n=Fe.isCaseSensitive,ignoreDiacritics:r=Fe.ignoreDiacritics,includeMatches:a=Fe.includeMatches,minMatchCharLength:o=Fe.minMatchCharLength,ignoreLocation:l=Fe.ignoreLocation,findAllMatches:u=Fe.findAllMatches,location:d=Fe.location,threshold:f=Fe.threshold,distance:m=Fe.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a,minMatchCharLength:o,findAllMatches:u,ignoreLocation:l,location:d,threshold:f,distance:m},t=n?t:t.toLowerCase(),t=r?lh(t):t,this.pattern=t,this.query=b7(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:o}=this.options;t=a?t:t.toLowerCase(),t=o?lh(t):t;let l=0,u=[],d=0;for(let f=0,m=n.length;f<m;f+=1){const g=n[f];u.length=0,l=0;for(let y=0,v=g.length;y<v;y+=1){const _=g[y],{isMatch:S,indices:A,score:w}=_.search(t);if(S){if(l+=1,d+=w,r){const T=_.constructor.type;_7.has(T)?u=[...u,...A]:u.push(A)}}else{d=0,l=0,u.length=0;break}}if(l){let y={isMatch:!0,score:d/l};return r&&(y.indices=u),y}}return{isMatch:!1,score:1}}}const Sv=[];function E7(...e){Sv.push(...e)}function Av(e,t){for(let n=0,r=Sv.length;n<r;n+=1){let a=Sv[n];if(a.condition(e,t))return new a(e,t)}return new Sk(e,t)}const ch={AND:"$and",OR:"$or"},wv={PATH:"$path",PATTERN:"$val"},Tv=e=>!!(e[ch.AND]||e[ch.OR]),S7=e=>!!e[wv.PATH],A7=e=>!Di(e)&&bk(e)&&!Tv(e),lT=e=>({[ch.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Tk(e,t,{auto:n=!0}={}){const r=a=>{let o=Object.keys(a);const l=S7(a);if(!l&&o.length>1&&!Tv(a))return r(lT(a));if(A7(a)){const d=l?a[wv.PATH]:o[0],f=l?a[wv.PATTERN]:a[d];if(!zr(f))throw new Error(Y9(d));const m={keyId:xv(d),pattern:f};return n&&(m.searcher=Av(f,t)),m}let u={children:[],operator:o[0]};return o.forEach(d=>{const f=a[d];Di(f)&&f.forEach(m=>{u.children.push(r(m))})}),u};return Tv(e)||(e=lT(e)),r(e)}function w7(e,{ignoreFieldNorm:t=Fe.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:a,norm:o,score:l})=>{const u=a?a.weight:null;r*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(t?1:o))}),n.score=r})}function T7(e,t){const n=e.matches;t.matches=[],Fn(n)&&n.forEach(r=>{if(!Fn(r.indices)||!r.indices.length)return;const{indices:a,value:o}=r;let l={indices:a,value:o};r.key&&(l.key=r.key.src),r.idx>-1&&(l.refIndex=r.idx),t.matches.push(l)})}function C7(e,t){t.score=e.score}function R7(e,t,{includeMatches:n=Fe.includeMatches,includeScore:r=Fe.includeScore}={}){const a=[];return n&&a.push(T7),r&&a.push(C7),e.map(o=>{const{idx:l}=o,u={item:t[l],refIndex:l};return a.length&&a.forEach(d=>{d(o,u)}),u})}class al{constructor(t,n={},r){this.options={...Fe,...n},this.options.useExtendedSearch,this._keyStore=new J9(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof vb))throw new Error(W9);this._myIndex=n||Ek(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Fn(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 o=this._docs[r];t(o,r)&&(this.removeAt(r),r-=1,a-=1,n.push(o))}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:o,sortFn:l,ignoreFieldNorm:u}=this.options;let d=zr(t)?zr(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return w7(d,{ignoreFieldNorm:u}),o&&d.sort(l),vk(n)&&n>-1&&(d=d.slice(0,n)),R7(d,this._docs,{includeMatches:r,includeScore:a})}_searchStringList(t){const n=Av(t,this.options),{records:r}=this._myIndex,a=[];return r.forEach(({v:o,i:l,n:u})=>{if(!Fn(o))return;const{isMatch:d,score:f,indices:m}=n.searchIn(o);d&&a.push({item:o,idx:l,matches:[{score:f,value:o,norm:u,indices:m}]})}),a}_searchLogical(t){const n=Tk(t,this.options),r=(u,d,f)=>{if(!u.children){const{keyId:g,searcher:y}=u,v=this._findMatches({key:this._keyStore.get(g),value:this._myIndex.getValueForItemAtKeyId(d,g),searcher:y});return v&&v.length?[{idx:f,item:d,matches:v}]:[]}const m=[];for(let g=0,y=u.children.length;g<y;g+=1){const v=u.children[g],_=r(v,d,f);if(_.length)m.push(..._);else if(u.operator===ch.AND)return[]}return m},a=this._myIndex.records,o={},l=[];return a.forEach(({$:u,i:d})=>{if(Fn(u)){let f=r(n,u,d);f.length&&(o[d]||(o[d]={idx:d,item:u,matches:[]},l.push(o[d])),f.forEach(({matches:m})=>{o[d].matches.push(...m)}))}}),l}_searchObjectList(t){const n=Av(t,this.options),{keys:r,records:a}=this._myIndex,o=[];return a.forEach(({$:l,i:u})=>{if(!Fn(l))return;let d=[];r.forEach((f,m)=>{d.push(...this._findMatches({key:f,value:l[m],searcher:n}))}),d.length&&o.push({idx:u,item:l,matches:d})}),o}_findMatches({key:t,value:n,searcher:r}){if(!Fn(n))return[];let a=[];if(Di(n))n.forEach(({v:o,i:l,n:u})=>{if(!Fn(o))return;const{isMatch:d,score:f,indices:m}=r.searchIn(o);d&&a.push({score:f,key:t,value:o,idx:l,norm:u,indices:m})});else{const{v:o,n:l}=n,{isMatch:u,score:d,indices:f}=r.searchIn(o);u&&a.push({score:d,key:t,value:o,norm:l,indices:f})}return a}}al.version="7.1.0";al.createIndex=Ek;al.parseIndex=o7;al.config=Fe;al.parseQuery=Tk;E7(x7);const N7=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}},O7=()=>{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)},k7=()=>{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},D7=e=>{if(!(typeof window>"u"))return((window==null?void 0:window.innerWidth)??0)<=e},cT=(e="md")=>{const t=N7(e),n=O7(),r=D7(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n}},I7=(e="md")=>{const[t,n]=E.useState(cT(e));return E.useEffect(()=>{const r=()=>{n(cT(e))};return window.addEventListener("resize",r,{passive:!0}),()=>window.removeEventListener("resize",r)},[e]),t},Oc=({children:e,className:t,identifier:n,...r})=>b.jsx("div",{className:Te("group/dropdown relative flex",t),"aria-label":`DropDown ${n}`,id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),L7=({children:e,identifier:t,className:n,...r})=>b.jsx("button",{className:Te("w-full cursor-pointer",n),"aria-label":`Open panel ${t}`,onClick:a=>{k7()&&a.currentTarget.focus({preventScroll:!0})},onBlur:a=>a.currentTarget.blur(),...r,children:e}),M7=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:a="start",identifier:o,className:l,...u})=>b.jsx("div",{className:Te("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-${o}`,id:`unrollable-panel-${o}`,children:b.jsx(W1,{isHidden:t,className:Te("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})});Oc.Trigger=L7;Oc.Panel=M7;const j7={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:"Показать только выбранные языки"})}}},kc=(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]),o=E.useCallback(()=>{const l=localStorage==null?void 0:localStorage.getItem(e);l&&r(JSON.parse(l))},[e,r]);return E.useMemo(()=>[n,a,o],[n,a,o])},Ck=E.createContext({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),Rk=()=>E.useContext(Ck),P7=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{const{locale:r}=qv(),[a,o]=kc("locale-content-selector-selected-locales",t??[r]);return b.jsx(Ck,{value:{availableLocales:e,selectedLocales:a,setSelectedLocales:o},children:n})},cy="locale-switcher-content",V7=({panelProps:e,isMultilingual:t=!0})=>{const{switchTo:n,searchInput:r,localeSwitcherLabel:a,languageListLabel:o,seeAllLocalesSwitch:l}=rn(j7),u=E.useRef(null),{locale:d}=qv(),{availableLocales:f,selectedLocales:m,setSelectedLocales:g}=Rk(),y=E.useMemo(()=>f.map(N=>{const k=yf(N,B.ENGLISH),I=yf(N,d),P=yf(N);return{locale:N,englishName:k,currentLocaleName:I,ownLocaleName:P}}),[f,d]),[v,_]=E.useState(y),[S,A]=kc("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 al(y,N)},[y]),T=E.useCallback(N=>{if(N){const k=w.search(N).map(I=>I.item);_(k)}else _(y)},[w,y]),R=N=>{t?m.includes(N)?m.length>1&&g(k=>k.filter(I=>I!==N)):g(k=>[...k,N]):g([N])},D=N=>{A(N),g(N?f:[d])};return b.jsx("div",{className:"border-text text-text rounded-xl border transition-colors","aria-label":a.value,children:b.jsxs(Oc,{identifier:cy,children:[b.jsx(Oc.Trigger,{identifier:cy,children:b.jsxs("div",{className:"flex w-full items-center justify-between",children:[b.jsx("div",{className:"px-2 py-1",children:b.jsx(KV,{size:18})}),b.jsx(YV,{className:"self-center",size:18})]})}),b.jsx(Oc.Panel,{identifier:cy,isOverable:!0,isFocusable:!0,className:"left-auto right-0",...e,children:b.jsxs(Jr,{className:"max-h-[80vh] min-w-28",separator:"y",role:"listbox",transparency:"sm",border:!0,roundedSize:"2xl",borderColor:"text","aria-label":o.value,children:[t&&b.jsx("div",{className:"m-auto p-2",children:b.jsx(wu,{defaultValue:!1,onChange:D,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(Jo,{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:k,ownLocaleName:I})=>b.jsx("li",{className:"px-1.5 py-1",children:b.jsx(gt,{onClick:()=>R(N),label:`${n} ${k}`,disabled:!(f??f).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(Zo,{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:JM(N),lang:N,children:I}),b.jsx("span",{className:"text-neutral text-xs",children:k})]}),b.jsx("span",{className:"text-neutral text-sm",children:N.toUpperCase()})]})]})})},N))})]})]})})]})})},B7=(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},Cv=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...o})=>{const[l,u]=E.useState(e),[d,f]=E.useState(0),m=l!==e,g=()=>{u(e),f(S=>S+1)},y=()=>{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(Jo,{onChange:v,"aria-label":"value",variant:"invisible",className:"size-full",defaultValue:e,...o},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(gt,{Icon:Zo,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!_,onClick:y}),b.jsx(gt,{Icon:Ts,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:g})]}),a]})]},String(e))},z7=(e,t)=>{const[n,r]=E.useState(e);return E.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>clearTimeout(a)},[e,t]),n},U7=({isActive:e=!0,suggestion:t,...n})=>{const r=String(n.value??n.defaultValue??""),{autocomplete:a}=k2(),o=Zr(),[l,u]=E.useState(!1),[d,f]=E.useState(r),[m,g]=E.useState(""),y=z7(d,200);E.useEffect(()=>{typeof n.value>"u"||f(r)},[n.value,n.defaultValue]),E.useEffect(()=>{if(!e||!l)return;const _=async()=>{var S;try{const A=await a({text:y,openAiApiKey:o.editor.openAiApiKey,model:o.editor.openAiApiModel,temperature:o.editor.openAiApiTemperature}),w=((S=A==null?void 0:A.data)==null?void 0:S.autocompletion)??"";if(w.startsWith(y)){const T=w.slice(y.length);return g(T)}return g(w)}catch(A){console.error("Autocomplete error:",A)}};y.length>3?(g(""),_()):g("")},[y,e]);const v=()=>{f(_=>_+m),g("")};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(m0,{...n,value:d,onChange:_=>{var S;u(!0),f(_.target.value),(S=n.onChange)==null||S.call(n,_)},onKeyDown:_=>{var S;_.key==="Tab"&&m&&(_.preventDefault(),v()),(S=n.onKeyDown)==null||S.call(n,_)}})]})},H7=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...o})=>{const{isAuthenticated:l}=j2(),[u,d]=E.useState(e),[f,m]=E.useState(0),g=u!==e,y=()=>{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(U7,{onChange:_,variant:"invisible",className:"size-full",defaultValue:e,isActive:l,...o},f),(g||a)&&b.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[g&&b.jsxs(b.Fragment,{children:[b.jsx(gt,{Icon:Zo,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!S,onClick:v}),b.jsx(gt,{Icon:Ts,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:y})]}),a]})]},e)};function os(){return os=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},os.apply(this,arguments)}const F7=["children","options"],ze={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 uT;(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"})(uT||(uT={}));const dT=["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"}),fT={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},G7=["style","script"],$7=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,q7=/mailto:/i,K7=/\n{2,}$/,Nk=/^(\s*>[\s\S]*?)(?=\n\n|$)/,W7=/^ *> ?/gm,Y7=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Z7=/^ {2,}\n/,X7=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Ok=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,kk=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Q7=/^(`+)((?:\\`|[^`])+)\1/,J7=/^(?:\n *)*\n/,eq=/\r\n?/g,tq=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,nq=/^\[\^([^\]]+)]/,rq=/\f/g,iq=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,aq=/^\s*?\[(x|\s)\]/,Dk=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ik=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Lk=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Rv=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,sq=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Mk=/^<!--[\s\S]*?(?:-->)/,oq=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Nv=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,lq=/^\{.*\}$/,cq=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,uq=/^<([^ >]+@[^ >]+)>/,dq=/^<([^ >]+:\/[^ >]+)>/,fq=/-([a-z])?/gi,jk=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,hq=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,mq=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,pq=/^\[([^\]]*)\] ?\[([^\]]*)\]/,gq=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,yq=/\t/g,vq=/(^ *\||\| *$)/g,bq=/^ *:-+: *$/,_q=/^ *:-+ *$/,xq=/^ *-+: *$/,Zh="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",Eq=new RegExp(`^([*_])\\1${Zh}\\1\\1(?!\\1)`),Sq=new RegExp(`^([*_])${Zh}\\1(?!\\1)`),Aq=new RegExp(`^(==)${Zh}\\1`),wq=new RegExp(`^(~~)${Zh}\\1`),Tq=/^\\([^0-9A-Za-z\s])/,uy=/\\([^0-9A-Za-z\s])/g,Cq=/^([\s\S](?:(?! |[0-9]\.)[^*_~\-\n<`\\\[!])*)/,Rq=/^\n+/,Nq=/^([ \t]*)/,Oq=/\\([^\\])/g,kq=/(?:^|\n)( *)$/,bb="(?:\\d+\\.)",_b="(?:[*+-])";function Pk(e){return"( *)("+(e===1?bb:_b)+") +"}const Vk=Pk(1),Bk=Pk(2);function zk(e){return new RegExp("^"+(e===1?Vk:Bk))}const Dq=zk(1),Iq=zk(2);function Uk(e){return new RegExp("^"+(e===1?Vk:Bk)+"[^\\n]*(?:\\n(?!\\1"+(e===1?bb:_b)+" )[^\\n]*)*(\\n|$)","gm")}const Lq=Uk(1),Mq=Uk(2);function Hk(e){const t=e===1?bb:_b;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Fk=Hk(1),Gk=Hk(2);function hT(e,t){const n=t===1,r=n?Fk:Gk,a=n?Lq:Mq,o=n?Dq:Iq;return{match:Go(function(l,u){const d=kq.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 f=n?+l[2]:void 0,m=l[0].replace(K7,`
|
|
263
|
+
`).match(a);let g=!1;return{items:m.map(function(y,v){const _=o.exec(y)[0].length,S=new RegExp("^ {1,"+_+"}","gm"),A=y.replace(S,"").replace(o,""),w=v===m.length-1,T=A.indexOf(`
|
|
264
|
+
|
|
265
|
+
`)!==-1||w&&g;g=T;const R=d.inline,D=d.list;let N;d.list=!0,T?(d.inline=!1,N=iu(A)+`
|
|
266
|
+
|
|
267
|
+
`):(d.inline=!0,N=iu(A));const k=u(N,d);return d.inline=R,d.list=D,k}),ordered:n,start:f}},render:(l,u,d)=>e(l.ordered?"ol":"ul",{key:d.key,start:l.type===ze.orderedList?l.start:void 0},l.items.map(function(f,m){return e("li",{key:m},u(f,d))}))}}const jq=new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Pq=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,$k=[Nk,Ok,kk,Dk,Lk,Ik,jk,Fk,Gk],Vq=[...$k,/^[^\n]+(?: \n|\n{2,})/,Rv,Mk,Nv];function iu(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function hc(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 Bq(e){return xq.test(e)?"right":bq.test(e)?"center":_q.test(e)?"left":null}function mT(e,t,n,r){const a=n.inTable;n.inTable=!0;let o=[[]],l="";function u(){if(!l)return;const d=o[o.length-1];d.push.apply(d,t(l,n)),l=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,f,m)=>{d.trim()==="|"&&(u(),r)?f!==0&&f!==m.length-1&&o.push([]):l+=d}),u(),n.inTable=a,o}function zq(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(vq,"").split("|").map(Bq):[],a=e[3]?function(l,u,d){return l.trim().split(`
|
|
268
|
+
`).map(function(f){return mT(f,u,d,!0)})}(e[3],t,n):[],o=mT(e[1],t,n,!!a.length);return n.inline=!1,a.length?{align:r,cells:a,header:o,type:ze.table}:{children:o,type:ze.paragraph}}function pT(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Go(e){return e.inline=1,e}function oa(e){return Go(function(t,n){return n.inline?e.exec(t):null})}function la(e){return Go(function(t,n){return n.inline||n.simple?e.exec(t):null})}function bi(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function mc(e){return Go(function(t){return e.exec(t)})}function Uq(e,t){if(t.inline||t.simple)return null;let n="";e.split(`
|
|
269
|
+
`).every(a=>(a+=`
|
|
270
|
+
`,!$k.some(o=>o.test(a))&&(n+=a,!!a.trim())));const r=iu(n);return r==""?null:[n,,r]}function Hq(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch{return null}return e}function gT(e){return e.replace(Oq,"$1")}function Nf(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!0,n.simple=!0;const o=e(t,n);return n.inline=r,n.simple=a,o}function Fq(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!1,n.simple=!0;const o=e(t,n);return n.inline=r,n.simple=a,o}function Gq(e,t,n){const r=n.inline||!1;n.inline=!1;const a=e(t,n);return n.inline=r,a}const dy=(e,t,n)=>({children:Nf(t,e[2],n)});function fy(){return{}}function hy(){return null}function $q(...e){return e.filter(Boolean).join(" ")}function my(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 qq(e="",t={}){function n(y,v,..._){const S=my(t.overrides,`${y}.props`,{});return t.createElement(function(A,w){const T=my(w,A);return T?typeof T=="function"||typeof T=="object"&&"render"in T?T:my(w,`${A}.component`,A):A}(y,t.overrides),os({},v,S,{className:$q(v==null?void 0:v.className,S.className)||void 0}),..._)}function r(y){y=y.replace(iq,"");let v=!1;t.forceInline?v=!0:t.forceBlock||(v=gq.test(y)===!1);const _=f(d(v?y:`${iu(y).replace(Rq,"")}
|
|
271
|
+
|
|
272
|
+
`,{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(y,v){const _=v.match($7);return _?_.reduce(function(S,A){const w=A.indexOf("=");if(w!==-1){const T=function(k){return k.indexOf("-")!==-1&&k.match(oq)===null&&(k=k.replace(fq,function(I,P){return P.toUpperCase()})),k}(A.slice(0,w)).trim(),R=function(k){const I=k[0];return(I==='"'||I==="'")&&k.length>=2&&k[k.length-1]===I?k.slice(1,-1):k}(A.slice(w+1).trim()),D=dT[T]||T;if(D==="ref")return S;const N=S[D]=function(k,I,P,V){return I==="style"?P.split(/;\s?/).reduce(function(U,ue){const oe=ue.slice(0,ue.indexOf(":"));return U[oe.trim().replace(/(-[a-z])/g,fe=>fe[1].toUpperCase())]=ue.slice(oe.length+1).trim(),U},{}):I==="href"||I==="src"?V(P,k,I):(P.match(lq)&&(P=P.slice(1,P.length-1)),P==="true"||P!=="false"&&P)}(y,T,R,t.sanitizer);typeof N=="string"&&(Rv.test(N)||Nv.test(N))&&(S[D]=r(N.trim()))}else A!=="style"&&(S[dT[A]||A]=!0);return S},{}):null}t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||Hq,t.slugify=t.slugify||hc,t.namedCodesToUnicode=t.namedCodesToUnicode?os({},fT,t.namedCodesToUnicode):fT,t.createElement=t.createElement||E.createElement;const o=[],l={},u={[ze.blockQuote]:{match:bi(Nk),order:1,parse(y,v,_){const[,S,A]=y[0].replace(W7,"").match(Y7);return{alert:S,children:v(A,_)}},render(y,v,_){const S={key:_.key};return y.alert&&(S.className="markdown-alert-"+t.slugify(y.alert.toLowerCase(),hc),y.children.unshift({attrs:{},children:[{type:ze.text,text:y.alert}],noInnerParse:!0,type:ze.htmlBlock,tag:"header"})),n("blockquote",S,v(y.children,_))}},[ze.breakLine]:{match:mc(Z7),order:1,parse:fy,render:(y,v,_)=>n("br",{key:_.key})},[ze.breakThematic]:{match:bi(X7),order:1,parse:fy,render:(y,v,_)=>n("hr",{key:_.key})},[ze.codeBlock]:{match:bi(kk),order:0,parse:y=>({lang:void 0,text:iu(y[0].replace(/^ {4}/gm,"")).replace(uy,"$1")}),render:(y,v,_)=>n("pre",{key:_.key},n("code",os({},y.attrs,{className:y.lang?`lang-${y.lang}`:""}),y.text))},[ze.codeFenced]:{match:bi(Ok),order:0,parse:y=>({attrs:a("code",y[3]||""),lang:y[2]||void 0,text:y[4].replace(uy,"$1"),type:ze.codeBlock})},[ze.codeInline]:{match:la(Q7),order:3,parse:y=>({text:y[2].replace(uy,"$1")}),render:(y,v,_)=>n("code",{key:_.key},y.text)},[ze.footnote]:{match:bi(tq),order:0,parse:y=>(o.push({footnote:y[2],identifier:y[1]}),{}),render:hy},[ze.footnoteReference]:{match:oa(nq),order:1,parse:y=>({target:`#${t.slugify(y[1],hc)}`,text:y[1]}),render:(y,v,_)=>n("a",{key:_.key,href:t.sanitizer(y.target,"a","href")},n("sup",{key:_.key},y.text))},[ze.gfmTask]:{match:oa(aq),order:1,parse:y=>({completed:y[1].toLowerCase()==="x"}),render:(y,v,_)=>n("input",{checked:y.completed,key:_.key,readOnly:!0,type:"checkbox"})},[ze.heading]:{match:bi(t.enforceAtxHeadings?Ik:Dk),order:1,parse:(y,v,_)=>({children:Nf(v,y[2],_),id:t.slugify(y[2],hc),level:y[1].length}),render:(y,v,_)=>n(`h${y.level}`,{id:y.id,key:_.key},v(y.children,_))},[ze.headingSetext]:{match:bi(Lk),order:0,parse:(y,v,_)=>({children:Nf(v,y[1],_),level:y[2]==="="?1:2,type:ze.heading})},[ze.htmlBlock]:{match:mc(Rv),order:1,parse(y,v,_){const[,S]=y[3].match(Nq),A=new RegExp(`^${S}`,"gm"),w=y[3].replace(A,""),T=(R=w,Vq.some(P=>P.test(R))?Gq:Nf);var R;const D=y[1].toLowerCase(),N=G7.indexOf(D)!==-1,k=(N?D:y[1]).trim(),I={attrs:a(k,y[2]),noInnerParse:N,tag:k};return _.inAnchor=_.inAnchor||D==="a",N?I.text=y[3]:I.children=T(v,w,_),_.inAnchor=!1,I},render:(y,v,_)=>n(y.tag,os({key:_.key},y.attrs),y.text||(y.children?v(y.children,_):""))},[ze.htmlSelfClosing]:{match:mc(Nv),order:1,parse(y){const v=y[1].trim();return{attrs:a(v,y[2]||""),tag:v}},render:(y,v,_)=>n(y.tag,os({},y.attrs,{key:_.key}))},[ze.htmlComment]:{match:mc(Mk),order:1,parse:()=>({}),render:hy},[ze.image]:{match:la(Pq),order:1,parse:y=>({alt:y[1],target:gT(y[2]),title:y[3]}),render:(y,v,_)=>n("img",{key:_.key,alt:y.alt||void 0,title:y.title||void 0,src:t.sanitizer(y.target,"img","src")})},[ze.link]:{match:oa(jq),order:3,parse:(y,v,_)=>({children:Fq(v,y[1],_),target:gT(y[2]),title:y[3]}),render:(y,v,_)=>n("a",{key:_.key,href:t.sanitizer(y.target,"a","href"),title:y.title},v(y.children,_))},[ze.linkAngleBraceStyleDetector]:{match:oa(dq),order:0,parse:y=>({children:[{text:y[1],type:ze.text}],target:y[1],type:ze.link})},[ze.linkBareUrlDetector]:{match:Go((y,v)=>v.inAnchor||t.disableAutoLink?null:oa(cq)(y,v)),order:0,parse:y=>({children:[{text:y[1],type:ze.text}],target:y[1],title:void 0,type:ze.link})},[ze.linkMailtoDetector]:{match:oa(uq),order:0,parse(y){let v=y[1],_=y[1];return q7.test(_)||(_="mailto:"+_),{children:[{text:v.replace("mailto:",""),type:ze.text}],target:_,type:ze.link}}},[ze.orderedList]:hT(n,1),[ze.unorderedList]:hT(n,2),[ze.newlineCoalescer]:{match:bi(J7),order:3,parse:fy,render:()=>`
|
|
273
|
+
`},[ze.paragraph]:{match:Go(Uq),order:3,parse:dy,render:(y,v,_)=>n("p",{key:_.key},v(y.children,_))},[ze.ref]:{match:oa(hq),order:0,parse:y=>(l[y[1]]={target:y[2],title:y[4]},{}),render:hy},[ze.refImage]:{match:la(mq),order:0,parse:y=>({alt:y[1]||void 0,ref:y[2]}),render:(y,v,_)=>l[y.ref]?n("img",{key:_.key,alt:y.alt,src:t.sanitizer(l[y.ref].target,"img","src"),title:l[y.ref].title}):null},[ze.refLink]:{match:oa(pq),order:0,parse:(y,v,_)=>({children:v(y[1],_),fallbackChildren:y[0],ref:y[2]}),render:(y,v,_)=>l[y.ref]?n("a",{key:_.key,href:t.sanitizer(l[y.ref].target,"a","href"),title:l[y.ref].title},v(y.children,_)):n("span",{key:_.key},y.fallbackChildren)},[ze.table]:{match:bi(jk),order:1,parse:zq,render(y,v,_){const S=y;return n("table",{key:_.key},n("thead",null,n("tr",null,S.header.map(function(A,w){return n("th",{key:w,style:pT(S,w)},v(A,_))}))),n("tbody",null,S.cells.map(function(A,w){return n("tr",{key:w},A.map(function(T,R){return n("td",{key:R,style:pT(S,R)},v(T,_))}))})))}},[ze.text]:{match:mc(Cq),order:4,parse:y=>({text:y[0].replace(sq,(v,_)=>t.namedCodesToUnicode[_]?t.namedCodesToUnicode[_]:v)}),render:y=>y.text},[ze.textBolded]:{match:la(Eq),order:2,parse:(y,v,_)=>({children:v(y[2],_)}),render:(y,v,_)=>n("strong",{key:_.key},v(y.children,_))},[ze.textEmphasized]:{match:la(Sq),order:3,parse:(y,v,_)=>({children:v(y[2],_)}),render:(y,v,_)=>n("em",{key:_.key},v(y.children,_))},[ze.textEscaped]:{match:la(Tq),order:1,parse:y=>({text:y[1],type:ze.text})},[ze.textMarked]:{match:la(Aq),order:3,parse:dy,render:(y,v,_)=>n("mark",{key:_.key},v(y.children,_))},[ze.textStrikethroughed]:{match:la(wq),order:3,parse:dy,render:(y,v,_)=>n("del",{key:_.key},v(y.children,_))}};t.disableParsingRawHTML===!0&&(delete u[ze.htmlBlock],delete u[ze.htmlSelfClosing]);const d=function(y){let v=Object.keys(y);function _(S,A){let w,T,R=[],D="",N="";for(A.prevCapture=A.prevCapture||"";S;){let k=0;for(;k<v.length;){if(D=v[k],w=y[D],A.inline&&!w.match.inline){k++;continue}const I=w.match(S,A);if(I){N=I[0],A.prevCapture+=N,S=S.substring(N.length),T=w.parse(I,_,A),T.type==null&&(T.type=D),R.push(T);break}k++}}return A.prevCapture="",R}return v.sort(function(S,A){let w=y[S].order,T=y[A].order;return w!==T?w-T:S<A?-1:1}),function(S,A){return _(function(w){return w.replace(eq,`
|
|
274
|
+
`).replace(rq,"").replace(yq," ")}(S),A)}}(u),f=(m=function(y,v){return function(_,S,A){const w=y[_.type].render;return v?v(()=>w(_,S,A),_,S,A):w(_,S,A)}}(u,t.renderRule),function y(v,_={}){if(Array.isArray(v)){const S=_.key,A=[];let w=!1;for(let T=0;T<v.length;T++){_.key=T;const R=y(v[T],_),D=typeof R=="string";D&&w?A[A.length-1]+=R:R!==null&&A.push(R),w=D}return _.key=S,A}return m(v,y,_)});var m;const g=r(e);return o.length?n("div",null,g,n("footer",{key:"footer"},o.map(function(y){return n("div",{id:t.slugify(y.identifier,hc),key:y.identifier},y.identifier,f(d(y.footnote,{inline:!0})))}))):g}const Kq=e=>{let{children:t="",options:n}=e,r=function(a,o){if(a==null)return{};var l,u,d={},f=Object.keys(a);for(u=0;u<f.length;u++)o.indexOf(l=f[u])>=0||(d[l]=a[l]);return d}(e,F7);return E.cloneElement(qq(t,n),r)},Wq=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"})},Yq=()=>{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&&Wq(e)},[e]),null},Zq=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function Xq(e,t,n){const r=[];for(const a of e){if(n==="v3"){const u=a.children.flatMap((d,f)=>{if(d.type!=="element")return d;const m=d.children[0];if(m.type!=="text")return d;const g=f===a.children.length-1;if(!vT(m.value,g))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 o=a.children;let l=o.length-1;n==="v1"?l=0:t&&(l=o.length-2);for(let u=Math.max(l,0);u<o.length;u++){const d=o[u];if(d.type!=="element")continue;const f=d.children.at(0);if((f==null?void 0:f.type)!=="text")continue;const m=u===o.length-1,g=vT(f.value,m);if(g)if(t&&!m&&u!==0){const y=yT(o[u-1],"{")&&yT(o[u+1],"}");r.push({info:g,line:a,token:d,isLineCommentOnly:o.length===3&&d.children.length===1,isJsxStyle:y})}else r.push({info:g,line:a,token:d,isLineCommentOnly:o.length===1&&d.children.length===1,isJsxStyle:!1})}}return r}function yT(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function vT(e,t){let n=e.trimStart();const r=e.length-n.length;n=n.trimEnd();const a=e.length-n.length-r;for(const[o,l]of Zq){if(l&&!t)continue;const u=o.exec(n);if(u)return[" ".repeat(r)+u[1],u[2],u[3]?u[3]+" ".repeat(a):void 0]}}function Qq(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function qk(e,t,n,r){return r==null&&(r="v3"),{name:e,code(a){const o=a.children.filter(f=>f.type==="element"),l=[];a.data??(a.data={});const u=a.data;u._shiki_notation??(u._shiki_notation=Xq(o,["jsx","tsx"].includes(this.options.lang),r));const d=u._shiki_notation;for(const f of d){if(f.info[1].length===0)continue;let m=o.indexOf(f.line);f.isLineCommentOnly&&r!=="v1"&&m++;let g=!1;if(f.info[1]=f.info[1].replace(t,(...v)=>n.call(this,v,f.line,f.token,o,m)?(g=!0,""):v[0]),!g)continue;r==="v1"&&(f.info[1]=Qq(f.info[1]));const y=f.info[1].trim().length===0;if(y&&(f.info[1]=""),y&&f.isLineCommentOnly)l.push(f.line);else if(y&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(y)f.line.children.splice(f.line.children.indexOf(f.token),1);else{const v=f.token.children[0];v.type==="text"&&(v.value=f.info.join(""))}}for(const f of l){const m=a.children.indexOf(f),g=a.children[m+1];let y=1;(g==null?void 0:g.type)==="text"&&(g==null?void 0:g.value)===`
|
|
275
|
+
`&&(y=2),a.children.splice(m,y)}}}}function Jq(e){if(!e)return null;const t=e.match(/\{([\d,-]+)\}/);return t?t[1].split(",").flatMap(r=>{const a=r.split("-").map(o=>Number.parseInt(o,10));return a.length===1?[a[0]]:Array.from({length:a[1]-a[0]+1},(o,l)=>l+a[0])}):null}const lf=Symbol("highlighted-lines");function eK(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[lf]??(a[lf]=Jq(this.options.meta.__raw)),(a[lf]??[]).includes(r)&&this.addClassToHast(n,t),n}}}function tK(e){return e?Array.from(e.matchAll(/\/((?:\\.|[^/])+)\//g)).map(n=>n[1].replace(/\\(.)/g,"$1")):[]}function nK(e={}){const{className:t="highlighted-word"}=e;return{name:"@shikijs/transformers:meta-word-highlight",preprocess(n,r){var o;if(!((o=this.options.meta)!=null&&o.__raw))return;const a=tK(this.options.meta.__raw);r.decorations||(r.decorations=[]);for(const l of a){const u=rK(n,l);for(const d of u)r.decorations.push({start:d,end:d+l.length,properties:{class:t}})}}}}function rK(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 iK(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xb(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0}=e;return qk(t,new RegExp(`\\s*\\[!code (${Object.keys(n).map(iK).join("|")})(:\\d+)?\\]`),function([a,o,l=":1"],u,d,f,m){const g=Number.parseInt(l.slice(1),10);for(let y=m;y<Math.min(m+g,f.length);y++)this.addClassToHast(f[y],n[o]);return r&&this.addClassToHast(this.pre,r),!0},e.matchAlgorithm)}function aK(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff"}=e;return xb({classMap:{"++":t,"--":n},classActivePre:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function sK(e={}){const{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:n="has-highlighted"}=e;return xb({classMap:t,classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function oK(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted"}=e;return xb({classMap:{highlight:t,hl:t},classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}function lK(e,t,n,r){const a=Kk(e);let o=a.indexOf(n);for(;o!==-1;)cK.call(this,e.children,t,o,n.length,r),o=a.indexOf(n,o+1)}function Kk(e){return e.type==="text"?e.value:e.type==="element"&&e.tagName==="span"?e.children.map(Kk).join(""):""}function cK(e,t,n,r,a){let o=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(uK([o,o+d.value.length-1],[n,n+r])){const f=Math.max(0,n-o),m=r-Math.max(0,o-n);if(m===0)continue;const g=dK(u,d,f,m);this.addClassToHast(g[1],a);const y=g.filter(Boolean);e.splice(l,1,...y),l+=y.length-1}o+=d.value.length}}}function uK(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function dK(e,t,n,r){const a=t.value,o=l=>fK(e,{children:[{type:"text",value:l}]});return[n>0?o(a.slice(0,n)):void 0,o(a.slice(n,n+r)),n+r<a.length?o(a.slice(n+r)):void 0]}function fK(e,t){return{...e,properties:{...e.properties},...t}}function hK(e={}){const{classActiveWord:t="highlighted-word",classActivePre:n=void 0}=e;return qk("@shikijs/transformers:notation-highlight-word",/\s*\[!code word:((?:\\.|[^:\]])+)(:\d+)?\]/,function([r,a,o],l,u,d,f){const m=o?Number.parseInt(o.slice(1),10):d.length;a=a.replace(/\\(.)/g,"$1");for(let g=f;g<Math.min(f+m,d.length);g++)lK.call(this,d[g],u,a,t);return n&&this.addClassToHast(this.pre,n),!0},e.matchAlgorithm)}const mK="modulepreload",pK=function(e){return"/"+e},bT={},L=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};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(f=>{if(f=pK(f),f in bT)return;bT[f]=!0;const m=f.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const y=document.createElement("link");if(y.rel=m?"stylesheet":mK,m||(y.as="script"),y.crossOrigin="",y.href=f,d&&y.setAttribute("nonce",d),document.head.appendChild(y),m)return new Promise((v,_)=>{y.addEventListener("load",v),y.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(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"&&o(u.reason);return t().catch(o)})};let nn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function gK(e){return Eb(e)}function Eb(e){return Array.isArray(e)?yK(e):e instanceof RegExp?e:typeof e=="object"?vK(e):e}function yK(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Eb(e[n]);return t}function vK(e){let t={};for(let n in e)t[n]=Eb(e[n]);return t}function Wk(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Yk(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Yk(e.substring(0,e.length-1)):e.substr(~t+1)}var py=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,cf=class{static hasCaptures(e){return e===null?!1:(py.lastIndex=0,py.test(e))}static replaceCaptures(e,t,n){return e.replace(py,(r,a,o,l)=>{let u=n[parseInt(a||o,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 Zk(e,t){return e<t?-1:e>t?1:0}function Xk(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 o=Zk(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function _T(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 Jk=class{constructor(e){le(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}},uh=class{constructor(e,t,n){le(this,"_cachedMatchRoot",new Jk(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(xK(e),t)}static createFromParsedTheme(e,t){return SK(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=>bK(e.parent,a.parentScopes));return r?new eD(r.fontStyle,r.foreground,r.background):null}},gy=class Of{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Of(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Of(n,t[r]);return n}push(t){return new Of(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 bK(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&&!_K(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function _K(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var eD=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function xK(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,o=t.length;a<o;a++){let l=t[a];if(!l.settings)continue;let u;if(typeof l.scope=="string"){let g=l.scope;g=g.replace(/^[,]+/,""),g=g.replace(/[,]+$/,""),u=g.split(",")}else Array.isArray(l.scope)?u=l.scope:u=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let g=l.settings.fontStyle.split(" ");for(let y=0,v=g.length;y<v;y++)switch(g[y]){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 f=null;typeof l.settings.foreground=="string"&&_T(l.settings.foreground)&&(f=l.settings.foreground);let m=null;typeof l.settings.background=="string"&&_T(l.settings.background)&&(m=l.settings.background);for(let g=0,y=u.length;g<y;g++){let _=u[g].trim().split(" "),S=_[_.length-1],A=null;_.length>1&&(A=_.slice(0,_.length-1),A.reverse()),n[r++]=new EK(S,A,a,d,f,m)}}return n}var EK=class{constructor(e,t,n,r,a,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=o}},Si=(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))(Si||{});function SK(e,t){e.sort((d,f)=>{let m=Zk(d.scope,f.scope);return m!==0||(m=Xk(d.parentScopes,f.parentScopes),m!==0)?m:d.index-f.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 o=new AK(t),l=new eD(n,o.getId(r),o.getId(a)),u=new TK(new Ov(0,null,-1,0,0),[]);for(let d=0,f=e.length;d<f;d++){let m=e[d];u.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new uh(o,l,u)}var AK=class{constructor(e){le(this,"_isFrozen");le(this,"_lastColorId");le(this,"_id2color");le(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)}},wK=Object.freeze([]),Ov=class tD{constructor(t,n,r,a,o){le(this,"scopeDepth");le(this,"parentScopes");le(this,"fontStyle");le(this,"foreground");le(this,"background");this.scopeDepth=t,this.parentScopes=n||wK,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new tD(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)}},TK=class kv{constructor(t,n=[],r={}){le(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 o=n.parentScopes[a].length-t.parentScopes[r].length;if(o!==0)return o;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,o;if(r===-1?(a=t,o=""):(a=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(kv._cmpBySpecificity),n}insert(t,n,r,a,o,l){if(n===""){this._doInsertHere(t,r,a,o,l);return}let u=n.indexOf("."),d,f;u===-1?(d=n,f=""):(d=n.substring(0,u),f=n.substring(u+1));let m;this._children.hasOwnProperty(d)?m=this._children[d]:(m=new kv(this._mainRule.clone(),Ov.cloneArr(this._rulesWithParentScopes)),this._children[d]=m),m.insert(t+1,f,r,a,o,l)}_doInsertHere(t,n,r,a,o){if(n===null){this._mainRule.acceptOverwrite(t,r,a,o);return}for(let l=0,u=this._rulesWithParentScopes.length;l<u;l++){let d=this._rulesWithParentScopes[l];if(Xk(d.parentScopes,n)===0){d.acceptOverwrite(t,r,a,o);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Ov(t,n,r,a,o))}},$o=class or{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=or.getLanguageId(t),r=or.getTokenType(t),a=or.getFontStyle(t),o=or.getForeground(t),l=or.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:o,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,o,l,u){let d=or.getLanguageId(t),f=or.getTokenType(t),m=or.containsBalancedBrackets(t)?1:0,g=or.getFontStyle(t),y=or.getForeground(t),v=or.getBackground(t);return n!==0&&(d=n),r!==8&&(f=r),a!==null&&(m=a?1:0),o!==-1&&(g=o),l!==0&&(y=l),u!==0&&(v=u),(d<<0|f<<8|m<<10|g<<11|y<<15|v<<24)>>>0}};function dh(e,t){const n=[],r=CK(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 f=l();if(n.push({matcher:f,priority:d}),a!==",")break;a=r.next()}return n;function o(){if(a==="-"){a=r.next();const d=o();return f=>!!d&&!d(f)}if(a==="("){a=r.next();const d=u();return a===")"&&(a=r.next()),d}if(xT(a)){const d=[];do d.push(a),a=r.next();while(xT(a));return f=>t(d,f)}return null}function l(){const d=[];let f=o();for(;f;)d.push(f),f=o();return m=>d.every(g=>g(m))}function u(){const d=[];let f=l();for(;f&&(d.push(f),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");f=l()}return m=>d.some(g=>g(m))}}function xT(e){return!!e&&!!e.match(/[\w\.:]+/)}function CK(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 nD(e){typeof e.dispose=="function"&&e.dispose()}var au=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},RK=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},NK=class{constructor(){le(this,"_references",[]);le(this,"_seenReferenceKeys",new Set);le(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))}},OK=class{constructor(e,t){le(this,"seenFullScopeRequests",new Set);le(this,"seenPartialScopeRequests",new Set);le(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new au(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new NK;for(const n of e)kK(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof au){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 kK(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 o=n.lookup(t);e instanceof au?kf({baseGrammar:o,selfGrammar:a},r):Dv(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);const l=n.injections(e.scopeName);if(l)for(const u of l)r.add(new au(u))}function Dv(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];fh([r],t,n)}}function kf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&fh(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&fh(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function fh(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const a=r.repository?Wk({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&fh(r.patterns,{...t,repository:a},n);const o=r.include;if(!o)continue;const l=rD(o);switch(l.kind){case 0:kf({...t,selfGrammar:t.baseGrammar},n);break;case 1:kf(t,n);break;case 2:Dv(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?Dv(l.ruleName,d,n):kf(d,n)}else l.kind===4?n.add(new RK(l.scopeName,l.ruleName)):n.add(new au(l.scopeName));break}}}var DK=class{constructor(){le(this,"kind",0)}},IK=class{constructor(){le(this,"kind",1)}},LK=class{constructor(e){le(this,"kind",2);this.ruleName=e}},MK=class{constructor(e){le(this,"kind",3);this.scopeName=e}},jK=class{constructor(e,t){le(this,"kind",4);this.scopeName=e,this.ruleName=t}};function rD(e){if(e==="$base")return new DK;if(e==="$self")return new IK;const t=e.indexOf("#");if(t===-1)return new MK(e);if(t===0)return new LK(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new jK(n,r)}}var PK=/\\(\d+)/,ET=/\\(\d+)/g,VK=-1,iD=-2;var ku=class{constructor(e,t,n,r){le(this,"$location");le(this,"id");le(this,"_nameIsCapturing");le(this,"_name");le(this,"_contentNameIsCapturing");le(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=cf.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=cf.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Yk(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:cf.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:cf.replaceCaptures(this._contentName,e,t)}},BK=class extends ku{constructor(t,n,r,a,o){super(t,n,r,a);le(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}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!")}},zK=class extends ku{constructor(t,n,r,a,o){super(t,n,r,null);le(this,"_match");le(this,"captures");le(this,"_cachedCompiledPatterns");this._match=new su(a,this.id),this.captures=o,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 ou,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ST=class extends ku{constructor(t,n,r,a,o){super(t,n,r,a);le(this,"hasMissingPatterns");le(this,"patterns");le(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.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 ou,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Iv=class extends ku{constructor(t,n,r,a,o,l,u,d,f,m){super(t,n,r,a);le(this,"_begin");le(this,"beginCaptures");le(this,"_end");le(this,"endHasBackReferences");le(this,"endCaptures");le(this,"applyEndPatternLast");le(this,"hasMissingPatterns");le(this,"patterns");le(this,"_cachedCompiledPatterns");this._begin=new su(o,this.id),this.beginCaptures=l,this._end=new su(u||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=d,this.applyEndPatternLast=f||!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 ou;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}},hh=class extends ku{constructor(t,n,r,a,o,l,u,d,f){super(t,n,r,a);le(this,"_begin");le(this,"beginCaptures");le(this,"whileCaptures");le(this,"_while");le(this,"whileHasBackReferences");le(this,"hasMissingPatterns");le(this,"patterns");le(this,"_cachedCompiledPatterns");le(this,"_cachedCompiledWhilePatterns");this._begin=new su(o,this.id),this.beginCaptures=l,this.whileCaptures=d,this._while=new su(u,iD),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.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 ou;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 ou,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},aD=class hn{static createCaptureRule(t,n,r,a,o){return t.registerRule(l=>new BK(n,l,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new zK(t.$vscodeTextmateLocation,t.id,t.name,t.match,hn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Wk({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new ST(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,hn._compilePatterns(o,n,r))}return t.while?new hh(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,hn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,hn._compileCaptures(t.whileCaptures||t.captures,n,r),hn._compilePatterns(t.patterns,n,r)):new Iv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,hn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,hn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,hn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let o=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);u>o&&(o=u)}for(let l=0;l<=o;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=hn.getCompiledRuleId(t[l],n,r)),a[u]=hn.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 o=0,l=t.length;o<l;o++){const u=t[o];let d=-1;if(u.include){const f=rD(u.include);switch(f.kind){case 0:case 1:d=hn.getCompiledRuleId(r[u.include],n,r);break;case 2:let m=r[f.ruleName];m&&(d=hn.getCompiledRuleId(m,n,r));break;case 3:case 4:const g=f.scopeName,y=f.kind===4?f.ruleName:null,v=n.getExternalGrammar(g,r);if(v)if(y){let _=v.repository[y];_&&(d=hn.getCompiledRuleId(_,n,v.repository))}else d=hn.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else d=hn.getCompiledRuleId(u,n,r);if(d!==-1){const f=n.getRule(d);let m=!1;if((f instanceof ST||f instanceof Iv||f instanceof hh)&&f.hasMissingPatterns&&f.patterns.length===0&&(m=!0),m)continue;a.push(d)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},su=class sD{constructor(t,n){le(this,"source");le(this,"ruleId");le(this,"hasAnchor");le(this,"hasBackReferences");le(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let a=0,o=[],l=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const f=t.charAt(u+1);f==="z"?(o.push(t.substring(a,u)),o.push("$(?!\\n)(?<!\\n)"),a=u+2):(f==="A"||f==="G")&&(l=!0),u++}this.hasAnchor=l,a===0?this.source=t:(o.push(t.substring(a,r)),this.source=o.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=PK.test(this.source):this.hasBackReferences=!1}clone(){return new sD(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 ET.lastIndex=0,this.source.replace(ET,(a,o)=>Qk(r[parseInt(o,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=[],o,l,u,d;for(o=0,l=this.source.length;o<l;o++)u=this.source.charAt(o),t[o]=u,n[o]=u,r[o]=u,a[o]=u,u==="\\"&&o+1<l&&(d=this.source.charAt(o+1),d==="A"?(t[o+1]="",n[o+1]="",r[o+1]="A",a[o+1]="A"):d==="G"?(t[o+1]="",n[o+1]="G",r[o+1]="",a[o+1]="G"):(t[o+1]=d,n[o+1]=d,r[o+1]=d,a[o+1]=d),o++);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}},ou=class{constructor(){le(this,"_items");le(this,"_hasAnchors");le(this,"_cached");le(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 AT(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 AT(e,r,this._items.map(a=>a.ruleId))}},AT=class{constructor(e,t,n){le(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(`
|
|
276
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},yy=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Ei,UK=(Ei=class{constructor(t,n){le(this,"_defaultAttributes");le(this,"_embeddedLanguagesMatcher");le(this,"_getBasicScopeAttributes",new Jk(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new yy(n,r)}));this._defaultAttributes=new yy(t,8),this._embeddedLanguagesMatcher=new HK(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Ei._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Ei.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!")}},le(Ei,"_NULL_SCOPE_METADATA",new yy(0,0)),le(Ei,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Ei),HK=class{constructor(e){le(this,"values");le(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])}},wT=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function oD(e,t,n,r,a,o,l,u){const d=t.content.length;let f=!1,m=-1;if(l){const v=FK(e,t,n,r,a,o);a=v.stack,r=v.linePos,n=v.isFirstLine,m=v.anchorPosition}const g=Date.now();for(;!f;){if(u!==0&&Date.now()-g>u)return new wT(a,!0);y()}return new wT(a,!1);function y(){const v=GK(e,t,n,r,a,m);if(!v){o.produce(a,d),f=!0;return}const _=v.captureIndices,S=v.matchedRuleId,A=_&&_.length>0?_[0].end>r:!1;if(S===VK){const w=a.getRule(e);o.produce(a,_[0].start),a=a.withContentNameScopesList(a.nameScopesList),xc(e,t,n,a,o,w.endCaptures,_),o.produce(a,_[0].end);const T=a;if(a=a.parent,m=T.getAnchorPos(),!A&&T.getEnterPos()===r){a=T,o.produce(a,d),f=!0;return}}else{const w=e.getRule(S);o.produce(a,_[0].start);const T=a,R=w.getName(t.content,_),D=a.contentNameScopesList.pushAttributed(R,e);if(a=a.push(S,r,m,_[0].end===d,null,D,D),w instanceof Iv){const N=w;xc(e,t,n,a,o,N.beginCaptures,_),o.produce(a,_[0].end),m=_[0].end;const k=N.getContentName(t.content,_),I=D.pushAttributed(k,e);if(a=a.withContentNameScopesList(I),N.endHasBackReferences&&(a=a.withEndRule(N.getEndWithResolvedBackReferences(t.content,_))),!A&&T.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(w instanceof hh){const N=w;xc(e,t,n,a,o,N.beginCaptures,_),o.produce(a,_[0].end),m=_[0].end;const k=N.getContentName(t.content,_),I=D.pushAttributed(k,e);if(a=a.withContentNameScopesList(I),N.whileHasBackReferences&&(a=a.withEndRule(N.getWhileWithResolvedBackReferences(t.content,_))),!A&&T.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(xc(e,t,n,a,o,w.captures,_),o.produce(a,_[0].end),a=a.pop(),!A){a=a.safePop(),o.produce(a,d),f=!0;return}}_[0].end>r&&(r=_[0].end,n=!1)}}function FK(e,t,n,r,a,o){let l=a.beginRuleCapturedEOL?0:-1;const u=[];for(let d=a;d;d=d.pop()){const f=d.getRule(e);f instanceof hh&&u.push({rule:f,stack:d})}for(let d=u.pop();d;d=u.pop()){const{ruleScanner:f,findOptions:m}=KK(d.rule,e,d.stack.endRule,n,r===l),g=f.findNextMatchSync(t,r,m);if(g){if(g.ruleId!==iD){a=d.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(o.produce(d.stack,g.captureIndices[0].start),xc(e,t,n,d.stack,o,d.rule.whileCaptures,g.captureIndices),o.produce(d.stack,g.captureIndices[0].end),l=g.captureIndices[0].end,g.captureIndices[0].end>r&&(r=g.captureIndices[0].end,n=!1))}else{a=d.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:l,isFirstLine:n}}function GK(e,t,n,r,a,o){const l=$K(e,t,n,r,a,o),u=e.getInjections();if(u.length===0)return l;const d=qK(u,e,t,n,r,a,o);if(!d)return l;if(!l)return d;const f=l.captureIndices[0].start,m=d.captureIndices[0].start;return m<f||d.priorityMatch&&m===f?d:l}function $K(e,t,n,r,a,o){const l=a.getRule(e),{ruleScanner:u,findOptions:d}=lD(l,e,a.endRule,n,r===o),f=u.findNextMatchSync(t,r,d);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function qK(e,t,n,r,a,o,l){let u=Number.MAX_VALUE,d=null,f,m=0;const g=o.contentNameScopesList.getScopeNames();for(let y=0,v=e.length;y<v;y++){const _=e[y];if(!_.matcher(g))continue;const S=t.getRule(_.ruleId),{ruleScanner:A,findOptions:w}=lD(S,t,null,r,a===l),T=A.findNextMatchSync(n,a,w);if(!T)continue;const R=T.captureIndices[0].start;if(!(R>=u)&&(u=R,d=T.captureIndices,f=T.ruleId,m=_.priority,u===a))break}return d?{priorityMatch:m===-1,captureIndices:d,matchedRuleId:f}:null}function lD(e,t,n,r,a){return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function KK(e,t,n,r,a){return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function xc(e,t,n,r,a,o,l){if(o.length===0)return;const u=t.content,d=Math.min(o.length,l.length),f=[],m=l[0].end;for(let g=0;g<d;g++){const y=o[g];if(y===null)continue;const v=l[g];if(v.length===0)continue;if(v.start>m)break;for(;f.length>0&&f[f.length-1].endPos<=v.start;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?a.produceFromScopes(f[f.length-1].scopes,v.start):a.produce(r,v.start),y.retokenizeCapturedWithRuleId){const S=y.getName(u,l),A=r.contentNameScopesList.pushAttributed(S,e),w=y.getContentName(u,l),T=A.pushAttributed(w,e),R=r.push(y.retokenizeCapturedWithRuleId,v.start,-1,!1,null,A,T),D=e.createOnigString(u.substring(0,v.end));oD(e,D,n&&v.start===0,v.start,R,a,!1,0),nD(D);continue}const _=y.getName(u,l);if(_!==null){const A=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(_,e);f.push(new WK(A,v.end))}}for(;f.length>0;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var WK=class{constructor(e,t){le(this,"scopes");le(this,"endPos");this.scopes=e,this.endPos=t}};function YK(e,t,n,r,a,o,l,u){return new XK(e,t,n,r,a,o,l,u)}function TT(e,t,n,r,a){const o=dh(t,mh),l=aD.getCompiledRuleId(n,r,a.repository);for(const u of o)e.push({debugSelector:t,matcher:u.matcher,ruleId:l,grammar:a,priority:u.priority})}function mh(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(ZK(t[a],r))return n=a+1,!0;return!1})}function ZK(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 XK=class{constructor(e,t,n,r,a,o,l,u){le(this,"_rootId");le(this,"_lastRuleId");le(this,"_ruleId2desc");le(this,"_includedGrammars");le(this,"_grammarRepository");le(this,"_grammar");le(this,"_injections");le(this,"_basicScopeAttributesProvider");le(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new UK(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=CT(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const d of Object.keys(a)){const f=dh(d,mh);for(const m of f)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)TT(t,l,a[l],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(l=>{const u=this.getExternalGrammar(l);if(u){const d=u.injectionSelector;d&&TT(t,d,u,this,u)}})}return t.sort((a,o)=>a.priority-o.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]=CT(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=aD.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===Lv.NULL){a=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),g=$o.set(0,f.languageId,f.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),y=this.getRule(this._rootId).getName(null,null);let v;y?v=Dc.createRootAndLookUpScopeName(y,g,this):v=Dc.createRoot("unknown",g),t=new Lv(null,this._rootId,-1,-1,!1,null,v,v)}else a=!1,t.reset();e=e+`
|
|
277
|
+
`;const o=this.createOnigString(e),l=o.content.length,u=new JK(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=oD(this,o,a,0,t,u,!0,r);return nD(o),{lineLength:l,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function CT(e,t){return e=gK(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 Dc=class Mr{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 o of n)a=gy.push(a,o.scopeNames),r=new Mr(r,a,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Mr(null,new gy(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const a=r.getMetadataForScope(t),o=new gy(null,t),l=r.themeProvider.themeMatch(o),u=Mr.mergeAttributes(n,a,l);return new Mr(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Mr.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,o=0,l=0;return r!==null&&(a=r.fontStyle,o=r.foregroundId,l=r.backgroundId),$o.set(t,n.languageId,n.tokenType,null,a,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Mr._pushAttributed(this,t,n);const r=t.split(/ /g);let a=this;for(const o of r)a=Mr._pushAttributed(a,o,n);return a}static _pushAttributed(t,n,r){const a=r.getMetadataForScope(n),o=t.scopePath.push(n),l=r.themeProvider.themeMatch(o),u=Mr.mergeAttributes(t.tokenAttributes,a,l);return new Mr(t,o,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}},ur,Lv=(ur=class{constructor(t,n,r,a,o,l,u,d){le(this,"_stackElementBrand");le(this,"_enterPos");le(this,"_anchorPos");le(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,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:ur._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Dc.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(){ur._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,o,l,u){return new ur(this,t,n,r,a,o,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 ur(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=Dc.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new ur(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Dc.fromExtension(r,n.contentNameScopesList))}},le(ur,"NULL",new ur(null,0,0,0,!1,null,null,null)),ur),QK=class{constructor(e,t){le(this,"balancedBracketScopes");le(this,"unbalancedBracketScopes");le(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):dh(n,mh).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>dh(n,mh).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}},JK=class{constructor(e,t,n,r){le(this,"_emitBinaryTokens");le(this,"_lineText");le(this,"_tokens");le(this,"_binaryTokens");le(this,"_lastTokenEndIndex");le(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,o=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(o=!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=$o.set(a,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(a=$o.set(a,0,8,o,-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}},eW=class{constructor(e,t){le(this,"_grammars",new Map);le(this,"_rawGrammars",new Map);le(this,"_injectionGrammars",new Map);le(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 o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,YK(e,o,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},tW=class{constructor(t){le(this,"_options");le(this,"_syncRegistry");le(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new eW(uh.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(uh.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 QK(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,a,o){const l=new OK(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,o)}_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,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,a,o)}},Mv=Lv.NULL;const nW=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Du{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Du.prototype.normal={};Du.prototype.property={};Du.prototype.space=void 0;function cD(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Du(n,r,t)}function jv(e){return e.toLowerCase()}class kn{constructor(t,n){this.attribute=n,this.property=t}}kn.prototype.attribute="";kn.prototype.booleanish=!1;kn.prototype.boolean=!1;kn.prototype.commaOrSpaceSeparated=!1;kn.prototype.commaSeparated=!1;kn.prototype.defined=!1;kn.prototype.mustUseProperty=!1;kn.prototype.number=!1;kn.prototype.overloadedBoolean=!1;kn.prototype.property="";kn.prototype.spaceSeparated=!1;kn.prototype.space=void 0;let rW=0;const We=Rs(),Ft=Rs(),uD=Rs(),be=Rs(),_t=Rs(),Io=Rs(),zn=Rs();function Rs(){return 2**++rW}const Pv=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Ft,commaOrSpaceSeparated:zn,commaSeparated:Io,number:be,overloadedBoolean:uD,spaceSeparated:_t},Symbol.toStringTag,{value:"Module"})),vy=Object.keys(Pv);class Sb extends kn{constructor(t,n,r,a){let o=-1;if(super(t,n),RT(this,"space",a),typeof r=="number")for(;++o<vy.length;){const l=vy[o];RT(this,vy[o],(r&Pv[l])===Pv[l])}}}Sb.prototype.defined=!0;function RT(e,t,n){n&&(e[t]=n)}function sl(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new Sb(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[jv(r)]=r,n[jv(o.attribute)]=r}return new Du(t,n,e.space)}const dD=sl({properties:{ariaActiveDescendant:null,ariaAtomic:Ft,ariaAutoComplete:null,ariaBusy:Ft,ariaChecked:Ft,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:_t,ariaCurrent:null,ariaDescribedBy:_t,ariaDetails:null,ariaDisabled:Ft,ariaDropEffect:_t,ariaErrorMessage:null,ariaExpanded:Ft,ariaFlowTo:_t,ariaGrabbed:Ft,ariaHasPopup:null,ariaHidden:Ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_t,ariaLevel:be,ariaLive:null,ariaModal:Ft,ariaMultiLine:Ft,ariaMultiSelectable:Ft,ariaOrientation:null,ariaOwns:_t,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:Ft,ariaReadOnly:Ft,ariaRelevant:null,ariaRequired:Ft,ariaRoleDescription:_t,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:Ft,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function fD(e,t){return t in e?e[t]:t}function hD(e,t){return fD(e,t.toLowerCase())}const iW=sl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Io,acceptCharset:_t,accessKey:_t,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:_t,autoFocus:We,autoPlay:We,blocking:_t,capture:null,charSet:null,checked:We,cite:null,className:_t,cols:be,colSpan:null,content:null,contentEditable:Ft,controls:We,controlsList:_t,coords:be|Io,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:uD,draggable:Ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:_t,height:be,hidden:We,high:be,href:null,hrefLang:null,htmlFor:_t,httpEquiv:_t,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:_t,itemRef:_t,itemScope:We,itemType:_t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:be,pattern:null,ping:_t,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:_t,required:We,reversed:We,rows:be,rowSpan:be,sandbox:_t,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:Ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Ft,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_t,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:Ft,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:hD}),aW=sl({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:zn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:_t,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:Io,g2:Io,glyphName:Io,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,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:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zn,rev:zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zn,requiredFeatures:zn,requiredFonts:zn,requiredFormats:zn,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fD}),mD=sl({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()}}),pD=sl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:hD}),gD=sl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),sW=/[A-Z]/g,NT=/-[a-z]/g,oW=/^data[-\w.:]+$/i;function lW(e,t){const n=jv(t);let r=t,a=kn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&oW.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(NT,uW);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!NT.test(o)){let l=o.replace(sW,cW);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=Sb}return new a(r,t)}function cW(e){return"-"+e.toLowerCase()}function uW(e){return e.charAt(1).toUpperCase()}const dW=cD([dD,iW,mD,pD,gD],"html"),yD=cD([dD,aW,mD,pD,gD],"svg"),OT={}.hasOwnProperty;function fW(e,t){const n=t||{};function r(a,...o){let l=r.invalid;const u=r.handlers;if(a&&OT.call(a,e)){const d=String(a[e]);l=OT.call(u,d)?u[d]:r.unknown}if(l)return l.call(this,a,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const hW=/["&'<>`]/g,mW=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,pW=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,gW=/[|\\{}()[\]^$+*?.]/g,kT=new WeakMap;function yW(e,t){if(e=e.replace(t.subset?vW(t.subset):hW,r),t.subset||t.escapeOnly)return e;return e.replace(mW,n).replace(pW,r);function n(a,o,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(a,o,l){return t.format(a.charCodeAt(0),l.charCodeAt(o+1),t)}}function vW(e){let t=kT.get(e);return t||(t=bW(e),kT.set(e,t)),t}function bW(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(gW,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const _W=/[\dA-Fa-f]/;function xW(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!_W.test(String.fromCharCode(t))?r:r+";"}const EW=/\d/;function SW(e,t,n){const r="&#"+String(e);return n&&t&&!EW.test(String.fromCharCode(t))?r:r+";"}const AW=["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"],by={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:"€"},wW=["cent","copy","divide","gt","lt","not","para","times"],vD={}.hasOwnProperty,Vv={};let uf;for(uf in by)vD.call(by,uf)&&(Vv[by[uf]]=uf);const TW=/[^\dA-Za-z]/;function CW(e,t,n,r){const a=String.fromCharCode(e);if(vD.call(Vv,a)){const o=Vv[a],l="&"+o;return n&&AW.includes(o)&&!wW.includes(o)&&(!r||t&&t!==61&&TW.test(String.fromCharCode(t)))?l:l+";"}return""}function RW(e,t,n){let r=xW(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=CW(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const o=SW(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function Lo(e,t){return yW(e,Object.assign({format:RW},t))}const NW=/^>|^->|<!--|-->|--!>|<!-$/g,OW=[">"],kW=["<",">"];function DW(e,t,n,r){return r.settings.bogusComments?"<?"+Lo(e.value,Object.assign({},r.settings.characterReferences,{subset:OW}))+">":"<!--"+e.value.replace(NW,a)+"-->";function a(o){return Lo(o,Object.assign({},r.settings.characterReferences,{subset:kW}))}}function IW(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function DT(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 LW(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function MW(e){return e.join(" ").trim()}const jW=/[ \t\n\f\r]/g;function Ab(e){return typeof e=="object"?e.type==="text"?IT(e.value):!1:IT(e)}function IT(e){return e.replace(jW,"")===""}const Wt=_D(1),bD=_D(-1),PW=[];function _D(e){return t;function t(n,r,a){const o=n?n.children:PW;let l=(r||0)+e,u=o[l];if(!a)for(;u&&Ab(u);)l+=e,u=o[l];return u}}const VW={}.hasOwnProperty;function xD(e){return t;function t(n,r,a){return VW.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const wb=xD({body:zW,caption:_y,colgroup:_y,dd:GW,dt:FW,head:_y,html:BW,li:HW,optgroup:$W,option:qW,p:UW,rp:LT,rt:LT,tbody:WW,td:MT,tfoot:YW,th:MT,thead:KW,tr:ZW});function _y(e,t,n){const r=Wt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Ab(r.value.charAt(0)))}function BW(e,t,n){const r=Wt(n,t);return!r||r.type!=="comment"}function zW(e,t,n){const r=Wt(n,t);return!r||r.type!=="comment"}function UW(e,t,n){const r=Wt(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 HW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function FW(e,t,n){const r=Wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function GW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function LT(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function $W(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function qW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function KW(e,t,n){const r=Wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function WW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function YW(e,t,n){return!Wt(n,t)}function ZW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function MT(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const XW=xD({body:eY,colgroup:tY,head:JW,html:QW,tbody:nY});function QW(e){const t=Wt(e,-1);return!t||t.type!=="comment"}function JW(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 eY(e){const t=Wt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Ab(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function tY(e,t,n){const r=bD(n,t),a=Wt(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 nY(e,t,n){const r=bD(n,t),a=Wt(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 df={name:[[`
|
|
278
|
+
\f\r &/=>`.split(""),`
|
|
279
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
280
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
281
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
282
|
+
\f\r &>`.split(""),`\0
|
|
283
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
284
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
285
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function rY(e,t,n,r){const a=r.schema,o=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=yD);const f=iY(r,e.properties),m=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,m&&(l=!1),(f||!o||!XW(e,t,n))&&(u.push("<",e.tagName,f?" "+f:""),l&&(a.space==="svg"||r.settings.closeSelfClosing)&&(d=f.charAt(f.length-1),(!r.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(m),!l&&(!o||!wb(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function iY(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const o=aY(e,a,t[a]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function aY(e,t,n){const r=lW(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=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=Lo(r.attribute,Object.assign({},e.settings.characterReferences,{subset:df.name[a][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?LW:MW)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(u=Lo(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:df.unquoted[a][o]}))),u!==n&&(e.settings.quoteSmart&&DT(n,l)>DT(n,e.alternative)&&(l=e.alternative),u=l+Lo(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?df.single:df.double)[a][o],attribute:!0}))+l),d+(u&&"="+u))}const sY=["<","&"];function ED(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Lo(e.value,Object.assign({},r.settings.characterReferences,{subset:sY}))}function oY(e,t,n,r){return r.settings.allowDangerousHtml?e.value:ED(e,t,n,r)}function lY(e,t,n,r){return r.all(e)}const cY=fW("type",{invalid:uY,unknown:dY,handlers:{comment:DW,doctype:IW,element:rY,raw:oY,root:lY,text:ED}});function uY(e){throw new Error("Expected node, not `"+e+"`")}function dY(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const fY={},hY={},mY=[];function pY(e,t){const n=t||fY,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:gY,all:yY,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||nW,characterReferences:n.characterReferences||hY,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?yD:dW,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function gY(e,t,n){return cY(e,t,n,this)}function yY(e){const t=[],n=e&&e.children||mY;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function ph(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[a,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[a]=o:a===r&&Object.assign(n,o);return n}function ds(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function vY(e){return Array.isArray(e)?e:[e]}async function SD(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Tb(e){return!e||["plaintext","txt","text","plain"].includes(e)}function AD(e){return e==="ansi"||Tb(e)}function Cb(e){return e==="none"}function wD(e){return Cb(e)}function TD(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 o;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+=((o=n[l+1])==null?void 0:o.length)||0}return a}function bY(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 o=a,l=0;for(const u of t){if(o<u.length)break;o-=u.length,l++}return{line:l,character:o}}function r(a,o){let l=0;for(let u=0;u<a;u++)l+=t[u].length;return l+=o,l}return{lines:t,indexToPos:n,posToIndex:r}}function _Y(e,t,n){const r=new Set;for(const o of e.matchAll(/lang=["']([\w-]+)["']/g))r.add(o[1]);for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(o[1]);for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g))r.add(o[1]);if(!n)return Array.from(r);const a=n.getBundledLanguages();return Array.from(r).filter(o=>o&&a[o])}function xY(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 EY(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 o=n.filter(l=>a.offset<l&&l<a.offset+a.content.length).map(l=>l-a.offset).sort((l,u)=>l-u);return o.length?xY(a,o):a})):e}function SY(e,t,n,r){const a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(d=>CD(e.variants[d])),l=new Set(o.flatMap(d=>Object.keys(d))),u={};return o.forEach((d,f)=>{for(const m of l){const g=d[m]||"inherit";if(f===0&&r)u[m]=g;else{const y=m==="color"?"":m==="background-color"?"-bg":`-${m}`,v=n+t[f]+(m==="color"?"":y);u[v]=g}}}),a.htmlStyle=u,a}function CD(e){const t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&Si.Italic&&(t["font-style"]="italic"),e.fontStyle&Si.Bold&&(t["font-weight"]="bold"),e.fontStyle&Si.Underline&&(t["text-decoration"]="underline")),t}function AY(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const RD=new WeakMap;function Qh(e,t){RD.set(e,t)}function lu(e){return RD.get(e)}class ol{constructor(...t){le(this,"_stacks",{});le(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 ol(Object.fromEntries(vY(n).map(r=>[r,Mv])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return wY(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function wY(e){const t=[],n=new Set;function r(a){var l;if(n.has(a))return;n.add(a);const o=(l=a==null?void 0:a.nameScopesList)==null?void 0:l.scopeName;o&&t.push(o),a.parent&&r(a.parent)}return r(e),t}function TY(e,t){if(!(e instanceof ol))throw new nn("Invalid grammar state");return e.getInternalStack(t)}function CY(){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 nn(`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 nn(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${a.lines.length}`);if(l.character<0||l.character>u.length)throw new nn(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${u.length}`);return{...l,offset:a.posToIndex(l.line,l.character)}}};const a=bY(n.source),o=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));RY(o),e.set(n.meta,{decorations:o,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 EY(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(g=>g.type==="element"&&g.tagName==="span");if(a.length!==r.converter.lines.length)throw new nn(`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 o(g,y,v,_){const S=a[g];let A="",w=-1,T=-1;if(y===0&&(w=0),v===0&&(T=0),v===Number.POSITIVE_INFINITY&&(T=S.children.length),w===-1||T===-1)for(let D=0;D<S.children.length;D++)A+=ND(S.children[D]),w===-1&&A.length===y&&(w=D+1),T===-1&&A.length===v&&(T=D+1);if(w===-1)throw new nn(`Failed to find start index for decoration ${JSON.stringify(_.start)}`);if(T===-1)throw new nn(`Failed to find end index for decoration ${JSON.stringify(_.end)}`);const R=S.children.slice(w,T);if(!_.alwaysWrap&&R.length===S.children.length)u(S,_,"line");else if(!_.alwaysWrap&&R.length===1&&R[0].type==="element")u(R[0],_,"token");else{const D={type:"element",tagName:"span",properties:{},children:R};u(D,_,"wrapper"),S.children.splice(w,R.length,D)}}function l(g,y){a[g]=u(a[g],y,"line")}function u(g,y,v){var A;const _=y.properties||{},S=y.transform||(w=>w);return g.tagName=y.tagName||"span",g.properties={...g.properties,..._,class:g.properties.class},(A=y.properties)!=null&&A.class&&TD(g,y.properties.class),g=S(g,v)||g,g}const d=[],f=r.decorations.sort((g,y)=>y.start.offset-g.start.offset||g.end.offset-y.end.offset);for(const g of f){const{start:y,end:v}=g;if(y.line===v.line)o(y.line,y.character,v.character,g);else if(y.line<v.line){o(y.line,y.character,Number.POSITIVE_INFINITY,g);for(let _=y.line+1;_<v.line;_++)d.unshift(()=>l(_,g));o(v.line,0,v.character,g)}}d.forEach(g=>g())}}}function RY(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new nn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const a=e[r],o=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(o||l||u||d){if(o&&l||u&&d)continue;throw new nn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function ND(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(ND).join(""):""}const NY=[CY()];function gh(e){return[...e.transformers||[],...NY]}var fs=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],xy={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function OY(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 jT(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 kY(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)xy[r]&&t.push({type:"setDecoration",value:xy[r]});else if(r<=29){const a=xy[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:fs[r-30]}});else if(r===38){const a=jT(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:fs[r-40]}});else if(r===48){const a=jT(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:fs[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:fs[r-100+8]}})}return t}function DY(){let e=null,t=null,n=new Set;return{parse(r){const a=[];let o=0;do{const l=OY(r,o),u=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(u.length>0&&a.push({value:u,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=kY(l.sequence);for(const f of d)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of d)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}o=l.position}while(o<r.length);return a}}}var IY={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 LY(e=IY){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 f=0;f<fs.length;f++)r.push(t(fs[f]));let u=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let m=0;m<6;m++)for(let g=0;g<6;g++)r.push(n([u[f],u[m],u[g]]));let d=8;for(let f=0;f<24;f++,d+=10)r.push(n([d,d,d]));return r}function o(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 o(u.index)}}return{value:l}}function MY(e,t,n){const r=ph(e,n),a=Xh(t),o=LY(Object.fromEntries(fs.map(u=>{var d;return[u,(d=e.colors)==null?void 0:d[`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`]]}))),l=DY();return a.map(u=>l.parse(u[0]).map(d=>{let f,m;d.decorations.has("reverse")?(f=d.background?o.value(d.background):e.bg,m=d.foreground?o.value(d.foreground):e.fg):(f=d.foreground?o.value(d.foreground):e.fg,m=d.background?o.value(d.background):void 0),f=ds(f,r),m=ds(m,r),d.decorations.has("dim")&&(f=jY(f));let g=Si.None;return d.decorations.has("bold")&&(g|=Si.Bold),d.decorations.has("italic")&&(g|=Si.Italic),d.decorations.has("underline")&&(g|=Si.Underline),{content:d.value,offset:u[1],color:f,bgColor:m,fontStyle:g}}))}function jY(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 Rb(e,t,n={}){const{lang:r="text",theme:a=e.getLoadedThemes()[0]}=n;if(Tb(r)||Cb(a))return Xh(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:o,colorMap:l}=e.setTheme(a);if(r==="ansi")return MY(o,t,n);const u=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==u.name)throw new nn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(o.name))throw new nn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return VY(t,u,o,l,n)}function PY(...e){if(e.length===2)return lu(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=r;if(Tb(a)||Cb(o))throw new nn("Plain language does not have grammar state");if(a==="ansi")throw new nn("ANSI language does not have grammar state");const{theme:l,colorMap:u}=t.setTheme(o),d=t.getLanguage(a);return new ol(yh(n,d,l,u,r).stateStack,d.name,l.name)}function VY(e,t,n,r,a){const o=yh(e,t,n,r,a),l=new ol(yh(e,t,n,r,a).stateStack,t.name,n.name);return Qh(o.tokens,l),o.tokens}function yh(e,t,n,r,a){const o=ph(n,a),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:u=500}=a,d=Xh(e);let f=a.grammarState?TY(a.grammarState,n.name)??Mv:a.grammarContextCode!=null?yh(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:Mv,m=[];const g=[];for(let y=0,v=d.length;y<v;y++){const[_,S]=d[y];if(_===""){m=[],g.push([]);continue}if(l>0&&_.length>=l){m=[],g.push([{content:_,offset:S,color:"",fontStyle:0}]);continue}let A,w,T;a.includeExplanation&&(A=t.tokenizeLine(_,f,u),w=A.tokens,T=0);const R=t.tokenizeLine2(_,f,u),D=R.tokens.length/2;for(let N=0;N<D;N++){const k=R.tokens[2*N],I=N+1<D?R.tokens[2*N+2]:_.length;if(k===I)continue;const P=R.tokens[2*N+1],V=ds(r[$o.getForeground(P)],o),U=$o.getFontStyle(P),ue={content:_.substring(k,I),offset:S+k,color:V,fontStyle:U};if(a.includeExplanation){const oe=[];if(a.includeExplanation!=="scopeName")for(const Y of n.settings){let J;switch(typeof Y.scope){case"string":J=Y.scope.split(/,/).map(H=>H.trim());break;case"object":J=Y.scope;break;default:continue}oe.push({settings:Y,selectors:J.map(H=>H.split(/ /))})}ue.explanation=[];let fe=0;for(;k+fe<I;){const Y=w[T],J=_.substring(Y.startIndex,Y.endIndex);fe+=J.length,ue.explanation.push({content:J,scopes:a.includeExplanation==="scopeName"?BY(Y.scopes):zY(oe,Y.scopes)}),T+=1}}m.push(ue)}g.push(m),m=[],f=R.ruleStack}return{tokens:g,stateStack:f}}function BY(e){return e.map(t=>({scopeName:t}))}function zY(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const o=t[r];n[r]={scopeName:o,themeMatches:HY(e,o,t.slice(0,r))}}return n}function PT(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function UY(e,t,n){if(!PT(e[e.length-1],t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)PT(e[r],n[a])&&(r-=1),a-=1;return r===-1}function HY(e,t,n){const r=[];for(const{selectors:a,settings:o}of e)for(const l of a)if(UY(l,t,n)){r.push(o);break}return r}function OD(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 f=Rb(e,t,{...n,theme:d.theme}),m=lu(f),g=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:f,state:m,theme:g}}),o=FY(...a.map(d=>d.tokens)),l=o[0].map((d,f)=>d.map((m,g)=>{const y={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(y.explanation=m.explanation),o.forEach((v,_)=>{const{content:S,explanation:A,offset:w,...T}=v[f][g];y.variants[r[_].color]=T}),y})),u=a[0].state?new ol(Object.fromEntries(a.map(d=>{var f;return[d.theme,(f=d.state)==null?void 0:f.getInternalStack(d.theme)]})),a[0].state.lang):void 0;return u&&Qh(l,u),l}function FY(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const a=e.map(d=>d[r]),o=t.map(()=>[]);t.forEach((d,f)=>d.push(o[f]));const l=a.map(()=>0),u=a.map(d=>d[0]);for(;u.every(d=>d);){const d=Math.min(...u.map(f=>f.content.length));for(let f=0;f<n;f++){const m=u[f];m.content.length===d?(o[f].push(m),l[f]+=1,u[f]=a[f][l[f]]):(o[f].push({...m,content:m.content.slice(0,d)}),u[f]={...m,content:m.content.slice(d),offset:m.offset+d})}}}return t}function vh(e,t,n){let r,a,o,l,u,d;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:m="--shiki-"}=n,g=Object.entries(n.themes).filter(A=>A[1]).map(A=>({color:A[0],theme:A[1]})).sort((A,w)=>A.color===f?-1:w.color===f?1:0);if(g.length===0)throw new nn("`themes` option must not be empty");const y=OD(e,t,n);if(d=lu(y),f&&!g.find(A=>A.color===f))throw new nn(`\`themes\` option must contain the defaultColor key \`${f}\``);const v=g.map(A=>e.getTheme(A.theme)),_=g.map(A=>A.color);o=y.map(A=>A.map(w=>SY(w,_,m,f))),d&&Qh(o,d);const S=g.map(A=>ph(A.theme,n));a=g.map((A,w)=>(w===0&&f?"":`${m+A.color}:`)+(ds(v[w].fg,S[w])||"inherit")).join(";"),r=g.map((A,w)=>(w===0&&f?"":`${m+A.color}-bg:`)+(ds(v[w].bg,S[w])||"inherit")).join(";"),l=`shiki-themes ${v.map(A=>A.name).join(" ")}`,u=f?void 0:[a,r].join(";")}else if("theme"in n){const f=ph(n.theme,n);o=Rb(e,t,n);const m=e.getTheme(n.theme);r=ds(m.bg,f),a=ds(m.fg,f),l=m.name,d=lu(o)}else throw new nn("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:a,bg:r,themeName:l,rootStyle:u,grammarState:d}}function bh(e,t,n,r={meta:{},options:n,codeToHast:(a,o)=>bh(e,a,o),codeToTokens:(a,o)=>vh(e,a,o)}){var v,_;let a=t;for(const S of gh(n))a=((v=S.preprocess)==null?void 0:v.call(r,a,n))||a;let{tokens:o,fg:l,bg:u,themeName:d,rootStyle:f,grammarState:m}=vh(e,a,n);const{mergeWhitespaces:g=!0}=n;g===!0?o=$Y(o):g==="never"&&(o=qY(o));const y={...r,get source(){return a}};for(const S of gh(n))o=((_=S.tokens)==null?void 0:_.call(y,o))||o;return GY(o,{...n,fg:l,bg:u,themeName:d,rootStyle:f},y,m)}function GY(e,t,n,r=lu(e)){var _,S,A;const a=gh(t),o=[],l={type:"root",children:[]},{structure:u="classic",tabindex:d="0"}=t;let f={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:o};const g=[],y={...n,structure:u,addClassToHast:TD,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return f},get code(){return m},get lines(){return g}};if(e.forEach((w,T)=>{var N,k;T&&(u==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
|
|
286
|
+
`}));let R={type:"element",tagName:"span",properties:{class:"line"},children:[]},D=0;for(const I of w){let P={type:"element",tagName:"span",properties:{...I.htmlAttrs},children:[{type:"text",value:I.content}]};const V=AY(I.htmlStyle||CD(I));V&&(P.properties.style=V);for(const U of a)P=((N=U==null?void 0:U.span)==null?void 0:N.call(y,P,T+1,D,R,I))||P;u==="inline"?l.children.push(P):u==="classic"&&R.children.push(P),D+=I.content.length}if(u==="classic"){for(const I of a)R=((k=I==null?void 0:I.line)==null?void 0:k.call(y,R,T+1))||R;g.push(R),o.push(R)}}),u==="classic"){for(const w of a)m=((_=w==null?void 0:w.code)==null?void 0:_.call(y,m))||m;f.children.push(m);for(const w of a)f=((S=w==null?void 0:w.pre)==null?void 0:S.call(y,f))||f;l.children.push(f)}let v=l;for(const w of a)v=((A=w==null?void 0:w.root)==null?void 0:A.call(y,v))||v;return r&&Qh(v,r),v}function $Y(e){return e.map(t=>{const n=[];let r="",a=0;return t.forEach((o,l)=>{const d=!(o.fontStyle&&o.fontStyle&Si.Underline);d&&o.content.match(/^\s+$/)&&t[l+1]?(a||(a=o.offset),r+=o.content):r?(d?n.push({...o,offset:a,content:r+o.content}):n.push({content:r,offset:a},o),a=0,r=""):n.push(o)}),n})}function qY(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,o,l]=r;if(!a&&!l)return n;const u=[{...n,offset:n.offset+a.length,content:o}];return a&&u.unshift({content:a,offset:n.offset}),l&&u.push({content:l,offset:n.offset+a.length+o.length}),u}))}const KY=pY;function WY(e,t,n){var o;const r={meta:{},options:n,codeToHast:(l,u)=>bh(e,l,u),codeToTokens:(l,u)=>vh(e,l,u)};let a=KY(bh(e,t,n,r));for(const l of gh(n))a=((o=l.postprocess)==null?void 0:o.call(r,a,n))||a;return a}const VT={light:"#333333",dark:"#bbbbbb"},BT={light:"#fffffe",dark:"#1e1e1e"},zT="__shiki_resolved";function Nb(e){var u,d,f,m,g;if(e!=null&&e[zT])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 y=t.settings?t.settings.find(v=>!v.name&&!v.scope):void 0;(u=y==null?void 0:y.settings)!=null&&u.foreground&&(r=y.settings.foreground),(d=y==null?void 0:y.settings)!=null&&d.background&&(n=y.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["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"?VT.light:VT.dark),n||(n=t.type==="light"?BT.light:BT.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 o=new Map;function l(y){var _;if(o.has(y))return o.get(y);a+=1;const v=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return(_=t.colorReplacements)!=null&&_[`#${v}`]?l(y):(o.set(y,v),v)}t.settings=t.settings.map(y=>{var A,w;const v=((A=y.settings)==null?void 0:A.foreground)&&!y.settings.foreground.startsWith("#"),_=((w=y.settings)==null?void 0:w.background)&&!y.settings.background.startsWith("#");if(!v&&!_)return y;const S={...y,settings:{...y.settings}};if(v){const T=l(y.settings.foreground);t.colorReplacements[T]=y.settings.foreground,S.settings.foreground=T}if(_){const T=l(y.settings.background);t.colorReplacements[T]=y.settings.background,S.settings.background=T}return S});for(const y of Object.keys(t.colors||{}))if((y==="editor.foreground"||y==="editor.background"||y.startsWith("terminal.ansi"))&&!((g=t.colors[y])!=null&&g.startsWith("#"))){const v=l(t.colors[y]);t.colorReplacements[v]=t.colors[y],t.colors[y]=v}return Object.defineProperty(t,zT,{enumerable:!1,writable:!1,value:!0}),t}async function kD(e){return Array.from(new Set((await Promise.all(e.filter(t=>!AD(t)).map(async t=>await SD(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function DD(e){return(await Promise.all(e.map(async n=>wD(n)?null:Nb(await SD(n))))).filter(n=>!!n)}let YY=3;function ZY(e,t=3){t>YY||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Ro=class extends Error{constructor(t){super(t),this.name="ShikiError"}};class XY extends tW{constructor(n,r,a,o={}){super(n);le(this,"_resolvedThemes",new Map);le(this,"_resolvedGrammars",new Map);le(this,"_langMap",new Map);le(this,"_langGraph",new Map);le(this,"_textmateThemeCache",new WeakMap);le(this,"_loadedThemesCache",null);le(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=a,this._alias=o,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=Nb(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=uh.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 Ro(`Circular alias \`${Array.from(r).join(" -> ")} -> ${n}\``);r.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){var l,u,d,f;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(m=>{var g;return(g=m.embeddedLangsLazy)==null?void 0:g.includes(n.name)}));this._resolver.addLanguage(n);const a={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,a);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),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),(f=(d=this._syncRegistry)==null?void 0:d._grammars)==null||f.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 o of n)this.resolveEmbeddedLanguages(o);const r=Array.from(this._langGraph.entries()),a=r.filter(([o,l])=>!l);if(a.length){const o=r.filter(([l,u])=>{var d;return u&&((d=u.embeddedLangs)==null?void 0:d.some(f=>a.map(([m])=>m).includes(f)))}).filter(l=>!a.includes(l));throw new Ro(`Missing languages ${a.map(([l])=>`\`${l}\``).join(", ")}, required by ${o.map(([l])=>`\`${l}\``).join(", ")}`)}for(const[o,l]of r)this._resolver.addLanguage(l);for(const[o,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 QY{constructor(t,n){le(this,"_langs",new Map);le(this,"_scopeToLang",new Map);le(this,"_injections",new Map);le(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 o=n.slice(0,a).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let pc=0;function JY(e){pc+=1,e.warnings!==!1&&pc>=10&&pc%10===0&&console.warn(`[Shiki] ${pc} 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 Ro("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Nb),a=new QY(e.engine,n),o=new XY(a,r,n,e.langAlias);let l;function u(T){A();const R=o.getGrammar(typeof T=="string"?T:T.name);if(!R)throw new Ro(`Language \`${T}\` not found, you may need to load it first`);return R}function d(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};A();const R=o.getTheme(T);if(!R)throw new Ro(`Theme \`${T}\` not found, you may need to load it first`);return R}function f(T){A();const R=d(T);l!==T&&(o.setTheme(R),l=T);const D=o.getColorMap();return{theme:R,colorMap:D}}function m(){return A(),o.getLoadedThemes()}function g(){return A(),o.getLoadedLanguages()}function y(...T){A(),o.loadLanguages(T.flat(1))}async function v(...T){return y(await kD(T))}function _(...T){A();for(const R of T.flat(1))o.loadTheme(R)}async function S(...T){return A(),_(await DD(T))}function A(){if(t)throw new Ro("Shiki instance has been disposed")}function w(){t||(t=!0,o.dispose(),pc-=1)}return{setTheme:f,getTheme:d,getLanguage:u,getLoadedThemes:m,getLoadedLanguages:g,loadLanguage:v,loadLanguageSync:y,loadTheme:S,loadThemeSync:_,dispose:w,[Symbol.dispose]:w}}async function eZ(e){e.engine||ZY("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([DD(e.themes||[]),kD(e.langs||[]),e.engine]);return JY({...e,themes:t,langs:n,engine:r})}async function tZ(e){const t=await eZ(e);return{getLastGrammarState:(...n)=>PY(t,...n),codeToTokensBase:(n,r)=>Rb(t,n,r),codeToTokensWithThemes:(n,r)=>OD(t,n,r),codeToTokens:(n,r)=>vh(t,n,r),codeToHast:(n,r)=>bh(t,n,r),codeToHtml:(n,r)=>WY(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function nZ(e){const t=e.langs,n=e.themes,r=e.engine;async function a(o){function l(g){if(typeof g=="string"){if(AD(g))return[];const y=t[g];if(!y)throw new nn(`Language \`${g}\` is not included in this bundle. You may want to load it from external source.`);return y}return g}function u(g){if(wD(g))return"none";if(typeof g=="string"){const y=n[g];if(!y)throw new nn(`Theme \`${g}\` is not included in this bundle. You may want to load it from external source.`);return y}return g}const d=(o.themes??[]).map(g=>u(g)),f=(o.langs??[]).map(g=>l(g)),m=await tZ({engine:o.engine??r(),...o,themes:d,langs:f});return{...m,loadLanguage(...g){return m.loadLanguage(...g.map(l))},loadTheme(...g){return m.loadTheme(...g.map(u))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return a}function rZ(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 iZ(e,t){const n=rZ(e);async function r(a,o){var d;const l=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),u=await((d=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:d.call(t,a,o.lang,l));return u&&await l.loadLanguage(...u),l}return{getSingletonHighlighter(a){return n(a)},async codeToHtml(a,o){return(await r(a,o)).codeToHtml(a,o)},async codeToHast(a,o){return(await r(a,o)).codeToHast(a,o)},async codeToTokens(a,o){return(await r(a,o)).codeToTokens(a,o)},async codeToTokensBase(a,o){return(await r(a,o)).codeToTokensBase(a,o)},async codeToTokensWithThemes(a,o){return(await r(a,o)).codeToTokensWithThemes(a,o)},async getLastGrammarState(a,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(a,o)}}}const ID=[{id:"abap",name:"ABAP",import:()=>L(()=>import("./abap-CuzaboPy.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>L(()=>import("./actionscript-3-BWZb6ht_.js"),[])},{id:"ada",name:"Ada",import:()=>L(()=>import("./ada-lbGJHcqN.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>L(()=>import("./angular-html-DMNHImpm.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>L(()=>import("./angular-ts-eB8LWD2C.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>L(()=>import("./apache-ClrZ-IwE.js"),[])},{id:"apex",name:"Apex",import:()=>L(()=>import("./apex-DHEJMXht.js"),[])},{id:"apl",name:"APL",import:()=>L(()=>import("./apl-DSpMDkz7.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>L(()=>import("./applescript-d8h0XnfP.js"),[])},{id:"ara",name:"Ara",import:()=>L(()=>import("./ara-D11-aFNM.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>L(()=>import("./asciidoc-BPN7z6_Y.js"),[])},{id:"asm",name:"Assembly",import:()=>L(()=>import("./asm-B-o3LjfJ.js"),[])},{id:"astro",name:"Astro",import:()=>L(()=>import("./astro-BEfdsCb3.js"),__vite__mapDeps([10,9,2,11,3,12]))},{id:"awk",name:"AWK",import:()=>L(()=>import("./awk-DFufGi5b.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>L(()=>import("./ballerina-DCKmv_4D.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>L(()=>import("./bat-9J6oqHce.js"),[])},{id:"beancount",name:"Beancount",import:()=>L(()=>import("./beancount-CJ6EEQ2V.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>L(()=>import("./berry-CufD37jc.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>L(()=>import("./bibtex-B5xtV7zU.js"),[])},{id:"bicep",name:"Bicep",import:()=>L(()=>import("./bicep-B-_DnH9T.js"),[])},{id:"blade",name:"Blade",import:()=>L(()=>import("./blade-jtwiscur.js"),__vite__mapDeps([13,14,1,2,3,7,8,15,9]))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>L(()=>import("./bsl-BXaZRMg3.js"),__vite__mapDeps([16,17]))},{id:"c",name:"C",import:()=>L(()=>import("./c-Du_P13ro.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>L(()=>import("./cadence-BhCOhF7G.js"),[])},{id:"cairo",name:"Cairo",import:()=>L(()=>import("./cairo-DbSVSKxu.js"),__vite__mapDeps([18,19]))},{id:"clarity",name:"Clarity",import:()=>L(()=>import("./clarity-D72Djq1u.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>L(()=>import("./clojure-I1vGaenB.js"),[])},{id:"cmake",name:"CMake",import:()=>L(()=>import("./cmake-C07pmjNf.js"),[])},{id:"cobol",name:"COBOL",import:()=>L(()=>import("./cobol-DLiQ7VlT.js"),__vite__mapDeps([20,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>L(()=>import("./codeowners-Bp6g37R7.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>L(()=>import("./codeql-TbzFAQVx.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>L(()=>import("./coffee-CN9rYqj2.js"),__vite__mapDeps([21,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>L(()=>import("./common-lisp-0v_W_vIl.js"),[])},{id:"coq",name:"Coq",import:()=>L(()=>import("./coq-DqPPCFWZ.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>L(()=>import("./cpp-D6jLj3ac.js"),__vite__mapDeps([22,23,24,25,15]))},{id:"crystal",name:"Crystal",import:()=>L(()=>import("./crystal-CSXto_ug.js"),__vite__mapDeps([26,1,2,3,15,25,27]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>L(()=>import("./csharp-t9jp2bdZ.js"),[])},{id:"css",name:"CSS",import:()=>L(()=>import("./css-6ydISZ1j.js"),[])},{id:"csv",name:"CSV",import:()=>L(()=>import("./csv-fuZLfV_i.js"),[])},{id:"cue",name:"CUE",import:()=>L(()=>import("./cue-DZa-IHfU.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>L(()=>import("./cypher-B8QFFMEI.js"),[])},{id:"d",name:"D",import:()=>L(()=>import("./d-BWEIE2mf.js"),[])},{id:"dart",name:"Dart",import:()=>L(()=>import("./dart-Bc9cAHms.js"),[])},{id:"dax",name:"DAX",import:()=>L(()=>import("./dax-B4O06LmT.js"),[])},{id:"desktop",name:"Desktop",import:()=>L(()=>import("./desktop-C480DKyb.js"),[])},{id:"diff",name:"Diff",import:()=>L(()=>import("./diff-7a-uGD01.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>L(()=>import("./docker-BcOcwvcX.js"),[])},{id:"dotenv",name:"dotEnv",import:()=>L(()=>import("./dotenv-RqsQB2BX.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>L(()=>import("./dream-maker-CwZzURTK.js"),[])},{id:"edge",name:"Edge",import:()=>L(()=>import("./edge-7WOHoDwQ.js"),__vite__mapDeps([28,11,1,2,3,14]))},{id:"elixir",name:"Elixir",import:()=>L(()=>import("./elixir-C8UL7p8J.js"),__vite__mapDeps([29,1,2,3]))},{id:"elm",name:"Elm",import:()=>L(()=>import("./elm-BVJIbDWr.js"),__vite__mapDeps([30,24,25]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>L(()=>import("./emacs-lisp-BGJzjoMF.js"),[])},{id:"erb",name:"ERB",import:()=>L(()=>import("./erb-2bVwkg7V.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:()=>L(()=>import("./erlang-Buh6fjeB.js"),[])},{id:"fennel",name:"Fennel",import:()=>L(()=>import("./fennel-BN5cw1dr.js"),[])},{id:"fish",name:"Fish",import:()=>L(()=>import("./fish-BIU4F8Lx.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>L(()=>import("./fluent-DPdCYVuL.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>L(()=>import("./fortran-fixed-form-DMTTIQFJ.js"),__vite__mapDeps([39,40]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>L(()=>import("./fortran-free-form-FZM7PgI4.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>L(()=>import("./fsharp-B93pd7q9.js"),__vite__mapDeps([41,42]))},{id:"gdresource",name:"GDResource",import:()=>L(()=>import("./gdresource-I9Onfmy0.js"),__vite__mapDeps([43,44,45]))},{id:"gdscript",name:"GDScript",import:()=>L(()=>import("./gdscript-E0a2itvD.js"),[])},{id:"gdshader",name:"GDShader",import:()=>L(()=>import("./gdshader-C8KBts9d.js"),[])},{id:"genie",name:"Genie",import:()=>L(()=>import("./genie-CZ1jFyQ7.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>L(()=>import("./gherkin-B-23jXpc.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>L(()=>import("./git-commit-COHn4upB.js"),__vite__mapDeps([46,47]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>L(()=>import("./git-rebase-D7M3XCeK.js"),__vite__mapDeps([48,27]))},{id:"gleam",name:"Gleam",import:()=>L(()=>import("./gleam-CFlCaHJ1.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>L(()=>import("./glimmer-js-DTuRZoQB.js"),__vite__mapDeps([49,2,11,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>L(()=>import("./glimmer-ts-BGh34NOZ.js"),__vite__mapDeps([50,11,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>L(()=>import("./glsl-D6Vaizag.js"),__vite__mapDeps([24,25]))},{id:"gnuplot",name:"Gnuplot",import:()=>L(()=>import("./gnuplot-DwPOQrla.js"),[])},{id:"go",name:"Go",import:()=>L(()=>import("./go-DSI44sMb.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>L(()=>import("./graphql-CzqHVaah.js"),__vite__mapDeps([34,2,11,35,36]))},{id:"groovy",name:"Groovy",import:()=>L(()=>import("./groovy-DnUZ9V9w.js"),[])},{id:"hack",name:"Hack",import:()=>L(()=>import("./hack-BfoaVUmQ.js"),__vite__mapDeps([51,1,2,3,15]))},{id:"haml",name:"Ruby Haml",import:()=>L(()=>import("./haml-BjHfNtf2.js"),__vite__mapDeps([33,2,3]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>L(()=>import("./handlebars-DN1vFC8Y.js"),__vite__mapDeps([52,1,2,3,38]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>L(()=>import("./haskell-C97r5ta3.js"),[])},{id:"haxe",name:"Haxe",import:()=>L(()=>import("./haxe-BVnfiMDc.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>L(()=>import("./hcl-BRpPFe2i.js"),[])},{id:"hjson",name:"Hjson",import:()=>L(()=>import("./hjson-Bgmt9vRU.js"),[])},{id:"hlsl",name:"HLSL",import:()=>L(()=>import("./hlsl-DgLWmsUM.js"),[])},{id:"html",name:"HTML",import:()=>L(()=>import("./html-DQt1crSz.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>L(()=>import("./html-derivative-OoyioBIu.js"),__vite__mapDeps([14,1,2,3]))},{id:"http",name:"HTTP",import:()=>L(()=>import("./http-B1MEeU_C.js"),__vite__mapDeps([53,27,9,7,8,34,2,11,35,36]))},{id:"hxml",name:"HXML",import:()=>L(()=>import("./hxml-BYnPWQ3Z.js"),__vite__mapDeps([54,55]))},{id:"hy",name:"Hy",import:()=>L(()=>import("./hy--6ePOT02.js"),[])},{id:"imba",name:"Imba",import:()=>L(()=>import("./imba-ZOHZ3W7h.js"),[])},{id:"ini",name:"INI",aliases:["properties"],import:()=>L(()=>import("./ini-m1-xr6K8.js"),[])},{id:"java",name:"Java",import:()=>L(()=>import("./java-DzEvymKG.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>L(()=>import("./javascript-DFxyEsuO.js"),[])},{id:"jinja",name:"Jinja",import:()=>L(()=>import("./jinja-CbuI_e8q.js"),__vite__mapDeps([56,1,2,3]))},{id:"jison",name:"Jison",import:()=>L(()=>import("./jison-BThBLrI1.js"),__vite__mapDeps([57,2]))},{id:"json",name:"JSON",import:()=>L(()=>import("./json-BLmTiKMJ.js"),[])},{id:"json5",name:"JSON5",import:()=>L(()=>import("./json5-C5z8RDkF.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>L(()=>import("./jsonc-CuA0FkKk.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>L(()=>import("./jsonl-CBcFDUab.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>L(()=>import("./jsonnet-CCBwdCM5.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>L(()=>import("./jssm-BtZDPN4U.js"),[])},{id:"jsx",name:"JSX",import:()=>L(()=>import("./jsx-Dog42FfX.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>L(()=>import("./julia-QW6AWql5.js"),__vite__mapDeps([58,22,23,24,25,15,19,2,59]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>L(()=>import("./kotlin-MsGODAH1.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>L(()=>import("./kusto-BEWisg9D.js"),[])},{id:"latex",name:"LaTeX",import:()=>L(()=>import("./latex-D6g4IvIb.js"),__vite__mapDeps([60,61,59]))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>L(()=>import("./lean-Bsgk112v.js"),[])},{id:"less",name:"Less",import:()=>L(()=>import("./less-CL8eqPyx.js"),[])},{id:"liquid",name:"Liquid",import:()=>L(()=>import("./liquid-DwnqW0Hw.js"),__vite__mapDeps([62,1,2,3,9]))},{id:"llvm",name:"LLVM IR",import:()=>L(()=>import("./llvm-CQsJUk-H.js"),[])},{id:"log",name:"Log file",import:()=>L(()=>import("./log-DnFCEHlQ.js"),[])},{id:"logo",name:"Logo",import:()=>L(()=>import("./logo-CkBIg-lq.js"),[])},{id:"lua",name:"Lua",import:()=>L(()=>import("./lua-DgKrCl_t.js"),__vite__mapDeps([37,25]))},{id:"luau",name:"Luau",import:()=>L(()=>import("./luau-CqbnzJ-x.js"),[])},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>L(()=>import("./make-CSWLD5xG.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>L(()=>import("./markdown-CfdnVo6U.js"),[])},{id:"marko",name:"Marko",import:()=>L(()=>import("./marko-Ddcey6ql.js"),__vite__mapDeps([63,3,64,5,2]))},{id:"matlab",name:"MATLAB",import:()=>L(()=>import("./matlab-LZB065En.js"),[])},{id:"mdc",name:"MDC",import:()=>L(()=>import("./mdc-BSBcOUr9.js"),__vite__mapDeps([65,42,38,14,1,2,3]))},{id:"mdx",name:"MDX",import:()=>L(()=>import("./mdx-B_I5quxp.js"),[])},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>L(()=>import("./mermaid-CXyZL9PL.js"),[])},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>L(()=>import("./mipsasm-BwEeJ4dY.js"),[])},{id:"mojo",name:"Mojo",import:()=>L(()=>import("./mojo-DHZoLXvC.js"),[])},{id:"move",name:"Move",import:()=>L(()=>import("./move-_bK4LppZ.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>L(()=>import("./narrat-CElRTuuq.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>L(()=>import("./nextflow--CXHmARm.js"),[])},{id:"nginx",name:"Nginx",import:()=>L(()=>import("./nginx-C1Yc5-eE.js"),__vite__mapDeps([66,37,25]))},{id:"nim",name:"Nim",import:()=>L(()=>import("./nim-CuWg7p6V.js"),__vite__mapDeps([67,25,1,2,3,7,8,24,42]))},{id:"nix",name:"Nix",import:()=>L(()=>import("./nix-C-iLU9M_.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>L(()=>import("./nushell-BsWK4Erq.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>L(()=>import("./objective-c-JQgEzMhr.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>L(()=>import("./objective-cpp-CAZ1NrJr.js"),[])},{id:"ocaml",name:"OCaml",import:()=>L(()=>import("./ocaml-CANNzmGA.js"),[])},{id:"pascal",name:"Pascal",import:()=>L(()=>import("./pascal-CUU_xxmv.js"),[])},{id:"perl",name:"Perl",import:()=>L(()=>import("./perl-Bcivc5lk.js"),__vite__mapDeps([68,1,2,3,7,8,15]))},{id:"php",name:"PHP",import:()=>L(()=>import("./php-XhOgcbHd.js"),__vite__mapDeps([69,1,2,3,7,8,15,9]))},{id:"plsql",name:"PL/SQL",import:()=>L(()=>import("./plsql-Csx-KgEj.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>L(()=>import("./po-CZKeM8oa.js"),[])},{id:"polar",name:"Polar",import:()=>L(()=>import("./polar-C9vCuADp.js"),[])},{id:"postcss",name:"PostCSS",import:()=>L(()=>import("./postcss-BgR6IBVD.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>L(()=>import("./powerquery-BZR5jcz4.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>L(()=>import("./powershell-Q0c5v3Fs.js"),[])},{id:"prisma",name:"Prisma",import:()=>L(()=>import("./prisma-yac1gHcz.js"),[])},{id:"prolog",name:"Prolog",import:()=>L(()=>import("./prolog-S2snRG_L.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>L(()=>import("./proto-B2asqJ_e.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>L(()=>import("./pug-Ud6KBVuk.js"),__vite__mapDeps([70,2,3,1]))},{id:"puppet",name:"Puppet",import:()=>L(()=>import("./puppet-qBI2rw6w.js"),[])},{id:"purescript",name:"PureScript",import:()=>L(()=>import("./purescript-CYAc_BdW.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>L(()=>import("./python-N_fYzn4k.js"),[])},{id:"qml",name:"QML",import:()=>L(()=>import("./qml-BdV_SRG6.js"),__vite__mapDeps([71,2]))},{id:"qmldir",name:"QML Directory",import:()=>L(()=>import("./qmldir-C8lEn-DE.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>L(()=>import("./qss-xAjwRsjP.js"),[])},{id:"r",name:"R",import:()=>L(()=>import("./r-15AZnl_Y.js"),[])},{id:"racket",name:"Racket",import:()=>L(()=>import("./racket-DfaBuPIG.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>L(()=>import("./raku-DARByBhS.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>L(()=>import("./razor-R9tSNI_9.js"),__vite__mapDeps([72,1,2,3,73]))},{id:"reg",name:"Windows Registry Script",import:()=>L(()=>import("./reg-eiUPDiaM.js"),[])},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>L(()=>import("./regexp-we84whta.js"),[])},{id:"rel",name:"Rel",import:()=>L(()=>import("./rel-CLLaPSAr.js"),[])},{id:"riscv",name:"RISC-V",import:()=>L(()=>import("./riscv-BOXXFo5k.js"),[])},{id:"rst",name:"reStructuredText",import:()=>L(()=>import("./rst-C0h9YO46.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:()=>L(()=>import("./ruby-Cwn6T5Qb.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:()=>L(()=>import("./rust-A6NUYkDQ.js"),[])},{id:"sas",name:"SAS",import:()=>L(()=>import("./sas-Yvy-jB3G.js"),__vite__mapDeps([76,15]))},{id:"sass",name:"Sass",import:()=>L(()=>import("./sass-DxKx6i08.js"),[])},{id:"scala",name:"Scala",import:()=>L(()=>import("./scala-urTpdRWL.js"),[])},{id:"scheme",name:"Scheme",import:()=>L(()=>import("./scheme-DfDtJdlR.js"),[])},{id:"scss",name:"SCSS",import:()=>L(()=>import("./scss-DkCoLJBz.js"),__vite__mapDeps([5,3]))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>L(()=>import("./sdbl-Cflpv1WG.js"),[])},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>L(()=>import("./shaderlab-DprXpeCX.js"),__vite__mapDeps([77,78]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>L(()=>import("./shellscript-Cs-zf8G1.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>L(()=>import("./shellsession-C_x4i0EA.js"),__vite__mapDeps([79,27]))},{id:"smalltalk",name:"Smalltalk",import:()=>L(()=>import("./smalltalk-CvaLaq0K.js"),[])},{id:"solidity",name:"Solidity",import:()=>L(()=>import("./solidity-BWEW8IEt.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>L(()=>import("./soy-CV61xlNT.js"),__vite__mapDeps([80,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>L(()=>import("./sparql-Ccgs8XSw.js"),__vite__mapDeps([81,82]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>L(()=>import("./splunk-RtPzT0sk.js"),[])},{id:"sql",name:"SQL",import:()=>L(()=>import("./sql-D8pCRXw6.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>L(()=>import("./ssh-config-BhVUZvoY.js"),[])},{id:"stata",name:"Stata",import:()=>L(()=>import("./stata-nt34lD2m.js"),__vite__mapDeps([83,15]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>L(()=>import("./stylus-q-cGTZ-j.js"),[])},{id:"svelte",name:"Svelte",import:()=>L(()=>import("./svelte-Ue2gIPbO.js"),__vite__mapDeps([84,2,11,3,12]))},{id:"swift",name:"Swift",import:()=>L(()=>import("./swift-zJDMamB5.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>L(()=>import("./system-verilog-6Pjza-7V.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>L(()=>import("./systemd-BzvtnNXz.js"),[])},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>L(()=>import("./talonscript-B5KooqzE.js"),[])},{id:"tasl",name:"Tasl",import:()=>L(()=>import("./tasl-actOPUJz.js"),[])},{id:"tcl",name:"Tcl",import:()=>L(()=>import("./tcl-BX3nBwNA.js"),[])},{id:"templ",name:"Templ",import:()=>L(()=>import("./templ-CJFw_bmP.js"),__vite__mapDeps([85,86,2,3]))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>L(()=>import("./terraform-BWjU2UX-.js"),[])},{id:"tex",name:"TeX",import:()=>L(()=>import("./tex-C7L-Ug2D.js"),__vite__mapDeps([61,59]))},{id:"toml",name:"TOML",import:()=>L(()=>import("./toml-x-gNw4Ca.js"),[])},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>L(()=>import("./ts-tags-B_RTbvdJ.js"),__vite__mapDeps([87,11,3,2,24,25,1,15,7,8]))},{id:"tsv",name:"TSV",import:()=>L(()=>import("./tsv-B_m7g4N7.js"),[])},{id:"tsx",name:"TSX",import:()=>L(()=>import("./tsx-CHbqLUsD.js"),[])},{id:"turtle",name:"Turtle",import:()=>L(()=>import("./turtle-imGXYByQ.js"),[])},{id:"twig",name:"Twig",import:()=>L(()=>import("./twig-DxolMe-m.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:()=>L(()=>import("./typescript-6msxI5qU.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>L(()=>import("./typespec-5ugHtu89.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>L(()=>import("./typst-DGKQAwST.js"),[])},{id:"v",name:"V",import:()=>L(()=>import("./v-2Dvll9y_.js"),[])},{id:"vala",name:"Vala",import:()=>L(()=>import("./vala-DhIY81xx.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>L(()=>import("./vb-D4bKSGYI.js"),[])},{id:"verilog",name:"Verilog",import:()=>L(()=>import("./verilog-DmSgp3mE.js"),[])},{id:"vhdl",name:"VHDL",import:()=>L(()=>import("./vhdl-DCjSv28y.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>L(()=>import("./viml-DMG7XCk5.js"),[])},{id:"vue",name:"Vue",import:()=>L(()=>import("./vue-BebZw_gy.js"),__vite__mapDeps([89,1,2,3,11,9,14]))},{id:"vue-html",name:"Vue HTML",import:()=>L(()=>import("./vue-html-B9Bqf25R.js"),__vite__mapDeps([90,89,1,2,3,11,9,14]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>L(()=>import("./vyper-D68BUWwe.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>L(()=>import("./wasm-CJJW67X8.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>L(()=>import("./wenyan-BXqZv6Dq.js"),[])},{id:"wgsl",name:"WGSL",import:()=>L(()=>import("./wgsl-Do8n-e3P.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>L(()=>import("./wikitext-CQSnJ68I.js"),[])},{id:"wit",name:"WebAssembly Interface Types",import:()=>L(()=>import("./wit-dyhQlKC1.js"),[])},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>L(()=>import("./wolfram-EuqmgloR.js"),[])},{id:"xml",name:"XML",import:()=>L(()=>import("./xml-iIRqcNou.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>L(()=>import("./xsl-BqXt74Hp.js"),__vite__mapDeps([91,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>L(()=>import("./yaml-DeMLtiT4.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>L(()=>import("./zenscript-BbLEZwDK.js"),[])},{id:"zig",name:"Zig",import:()=>L(()=>import("./zig-DFp_trfT.js"),[])}],aZ=Object.fromEntries(ID.map(e=>[e.id,e.import])),sZ=Object.fromEntries(ID.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),oZ={...aZ,...sZ},lZ=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>L(()=>import("./andromeeda-C3khCPGq.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>L(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>L(()=>import("./ayu-dark-Cv9koXgw.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>L(()=>import("./catppuccin-frappe-BtitwTYg.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>L(()=>import("./catppuccin-latte-CW_h_59B.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>L(()=>import("./catppuccin-macchiato-CXeUe8zM.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>L(()=>import("./catppuccin-mocha-Cj87Vp-p.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>L(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>L(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>L(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>L(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>L(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>L(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>L(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>L(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>L(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>L(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>L(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>L(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>L(()=>import("./gruvbox-dark-hard-BNFkGX63.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>L(()=>import("./gruvbox-dark-medium-fPwOVgKi.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>L(()=>import("./gruvbox-dark-soft-rn_0Wvg-.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>L(()=>import("./gruvbox-light-hard-DPpLE3g-.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>L(()=>import("./gruvbox-light-medium-BBkKoO69.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>L(()=>import("./gruvbox-light-soft-Ism0zgIY.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>L(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>L(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>L(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>L(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>L(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>L(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>L(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>L(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>L(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>L(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>L(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>L(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>L(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>L(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>L(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>L(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>L(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>L(()=>import("./one-light-PoHY5YXO.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>L(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>L(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>L(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>L(()=>import("./rose-pine-BZeqa82Q.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>L(()=>import("./rose-pine-dawn-Dr8AihTi.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>L(()=>import("./rose-pine-moon-Bo9_Wbqy.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>L(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>L(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>L(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>L(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>L(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>L(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>L(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>L(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>L(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>L(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>L(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],cZ=Object.fromEntries(lZ.map(e=>[e.id,e.import]));class Ob extends Error{constructor(t){super(t),this.name="ShikiError"}}function uZ(){return 2147483648}function dZ(){return typeof performance<"u"?performance.now():Date.now()}const fZ=(e,t)=>e+(t-e%t)%t;async function hZ(e){let t,n;const r={};function a(v){n=v,r.HEAPU8=new Uint8Array(v),r.HEAPU32=new Uint32Array(v)}function o(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=uZ();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,fZ(Math.max(v,w),65536));if(l(T))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(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 R=v[_++];if(!(R&128)){T+=String.fromCharCode(R);continue}const D=v[_++]&63;if((R&224)===192){T+=String.fromCharCode((R&31)<<6|D);continue}const N=v[_++]&63;if((R&240)===224?R=(R&15)<<12|D<<6|N:R=(R&7)<<18|D<<12|N<<6|v[_++]&63,R<65536)T+=String.fromCharCode(R);else{const k=R-65536;T+=String.fromCharCode(55296|k>>10,56320|k&1023)}}return T}function m(v,_){return v?f(r.HEAPU8,v,_):""}const g={emscripten_get_now:dZ,emscripten_memcpy_big:o,emscripten_resize_heap:u,fd_write:()=>0};async function y(){const _=await e({env:g,wasi_snapshot_preview1:g});t=_.memory,a(t.buffer),Object.assign(r,_),r.UTF8ToString=m}return await y(),r}var mZ=Object.defineProperty,pZ=(e,t,n)=>t in e?mZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kt=(e,t,n)=>pZ(e,typeof t!="symbol"?t+"":t,n);let tn=null;function gZ(e){throw new Ob(e.UTF8ToString(e.getLastOnigError()))}class Jh{constructor(t){Kt(this,"utf16Length"),Kt(this,"utf8Length"),Kt(this,"utf16Value"),Kt(this,"utf8Value"),Kt(this,"utf16OffsetToUtf8"),Kt(this,"utf8OffsetToUtf16");const n=t.length,r=Jh._utf8ByteLength(t),a=r!==n,o=a?new Uint32Array(n+1):null;a&&(o[n]=r);const l=a?new Uint32Array(r+1):null;a&&(l[r]=n);const u=new Uint8Array(r);let d=0;for(let f=0;f<n;f++){const m=t.charCodeAt(f);let g=m,y=!1;if(m>=55296&&m<=56319&&f+1<n){const v=t.charCodeAt(f+1);v>=56320&&v<=57343&&(g=(m-55296<<10)+65536|v-56320,y=!0)}a&&(o[f]=d,y&&(o[f+1]=d),g<=127?l[d+0]=f:g<=2047?(l[d+0]=f,l[d+1]=f):g<=65535?(l[d+0]=f,l[d+1]=f,l[d+2]=f):(l[d+0]=f,l[d+1]=f,l[d+2]=f,l[d+3]=f)),g<=127?u[d++]=g:g<=2047?(u[d++]=192|(g&1984)>>>6,u[d++]=128|(g&63)>>>0):g<=65535?(u[d++]=224|(g&61440)>>>12,u[d++]=128|(g&4032)>>>6,u[d++]=128|(g&63)>>>0):(u[d++]=240|(g&1835008)>>>18,u[d++]=128|(g&258048)>>>12,u[d++]=128|(g&4032)>>>6,u[d++]=128|(g&63)>>>0),y&&f++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=u,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){const o=t.charCodeAt(r);let l=o,u=!1;if(o>=55296&&o<=56319&&r+1<a){const d=t.charCodeAt(r+1);d>=56320&&d<=57343&&(l=(o-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 em=class jr{constructor(t){if(Kt(this,"id",++jr.LAST_ID),Kt(this,"_onigBinding"),Kt(this,"content"),Kt(this,"utf16Length"),Kt(this,"utf8Length"),Kt(this,"utf16OffsetToUtf8"),Kt(this,"utf8OffsetToUtf16"),Kt(this,"ptr"),!tn)throw new Ob("Must invoke loadWasm first.");this._onigBinding=tn,this.content=t;const n=new Jh(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!jr._sharedPtrInUse?(jr._sharedPtr||(jr._sharedPtr=tn.omalloc(1e4)),jr._sharedPtrInUse=!0,tn.HEAPU8.set(n.utf8Value,jr._sharedPtr),this.ptr=jr._sharedPtr):this.ptr=n.createString(tn)}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===jr._sharedPtr?jr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Kt(em,"LAST_ID",0);Kt(em,"_sharedPtr",0);Kt(em,"_sharedPtrInUse",!1);let LD=em;class yZ{constructor(t){if(Kt(this,"_onigBinding"),Kt(this,"_ptr"),!tn)throw new Ob("Must invoke loadWasm first.");const n=[],r=[];for(let u=0,d=t.length;u<d;u++){const f=new Jh(t[u]);n[u]=f.createString(tn),r[u]=f.utf8Length}const a=tn.omalloc(4*t.length);tn.HEAPU32.set(n,a/4);const o=tn.omalloc(4*t.length);tn.HEAPU32.set(r,o/4);const l=tn.createOnigScanner(a,o,t.length);for(let u=0,d=t.length;u<d;u++)tn.ofree(n[u]);tn.ofree(o),tn.ofree(a),l===0&&gZ(tn),this._onigBinding=tn,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 LD(t);const o=this._findNextMatchSync(t,n,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){const o=this._onigBinding,l=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(l===0)return null;const u=o.HEAPU32;let d=l/4;const f=u[d++],m=u[d++],g=[];for(let y=0;y<m;y++){const v=t.convertUtf8OffsetToUtf16(u[d++]),_=t.convertUtf8OffsetToUtf16(u[d++]);g[y]={start:v,end:_,length:_-v}}return{index:f,captureIndices:g}}}function vZ(e){return typeof e.instantiator=="function"}function bZ(e){return typeof e.default=="function"}function _Z(e){return typeof e.data<"u"}function xZ(e){return typeof Response<"u"&&e instanceof Response}function EZ(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 ff;function SZ(e){if(ff)return ff;async function t(){tn=await hZ(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),vZ(r)?r=await r.instantiator(n):bZ(r)?r=await r.default(n):(_Z(r)&&(r=r.data),xZ(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await AZ(r)(n):r=await wZ(r)(n):EZ(r)?r=await Ey(r)(n):r instanceof WebAssembly.Module?r=await Ey(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Ey(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return ff=t(),ff}function Ey(e){return t=>WebAssembly.instantiate(e,t)}function AZ(e){return t=>WebAssembly.instantiateStreaming(e,t)}function wZ(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function TZ(e){return e&&await SZ(e),{createScanner(t){return new yZ(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new LD(t)}}}const CZ=nZ({langs:oZ,themes:cZ,engine:()=>TZ(L(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:RZ}=iZ(CZ,{guessEmbeddedLanguages:_Y}),NZ=({children:e})=>b.jsx("div",{children:b.jsx("pre",{children:b.jsx("code",{children:e.split(`
|
|
287
|
+
`).map((t,n)=>b.jsx("span",{className:"line block w-full",children:t},n))})})}),OZ=({children:e,lang:t,isDarkMode:n,onChange:r,...a})=>{const[o,l]=E.useState(null),u=E.useMemo(()=>({lang:t,theme:n?"github-dark":"github-light",transformers:[aK(),oK(),hK(),sK(),eK(),nK()]}),[t,n]);return E.useEffect(()=>{RZ(e,u).then(d=>l(d)).catch(d=>console.error(d))},[u,e]),o?b.jsx("div",{dangerouslySetInnerHTML:{__html:o},...a,style:{backgroundColor:"transparent"}}):b.jsx(NZ,{children:e})},kZ=({className:e,onChange:t,isEditable:n,...r})=>b.jsx(OZ,{className:Te("flex w-full",e),contentEditable:n,onInput:a=>t==null?void 0:t(a.currentTarget.textContent??""),...r}),MD=E.createContext({packageManager:"npm",setPackageManager:()=>{},codeFormat:"typescript",setCodeFormat:()=>{},contentDeclarationFormat:"typescript",setContentDeclarationFormat:()=>{}}),tm=()=>E.useContext(MD),DZ=({children:e})=>{const[t,n]=kc("packageManager","npm"),[r,a]=kc("codeFormat","typescript"),[o,l]=kc("contentDeclarationFormat","typescript");return b.jsx(MD,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:a,contentDeclarationFormat:o,setContentDeclarationFormat:l},children:e})},IZ=({children:e,...t})=>{const{packageManager:n,codeFormat:r,contentDeclarationFormat:a}=tm(),o=typeof t.packageManager>"u",l=n===t.packageManager,u=typeof t.codeFormat>"u",d=r===t.codeFormat,f=typeof t.contentDeclarationFormat>"u",m=a===t.contentDeclarationFormat;return(o||l)&&(u||d)&&(f||m)?e:b.jsx(b.Fragment,{})},LZ=()=>{const{codeFormat:e,setCodeFormat:t,setContentDeclarationFormat:n}=tm();return b.jsxs(je,{value:e,onValueChange:r=>{t(r),n(r)},children:[b.jsx(je.Trigger,{children:b.jsx(je.Value,{placeholder:"Code Format"})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:"typescript",children:"TypeScript"}),b.jsx(je.Item,{value:"esm",children:"ESM"}),b.jsx(je.Item,{value:"commonjs",children:"CommonJS"})]})]})},MZ=()=>{const{contentDeclarationFormat:e,setContentDeclarationFormat:t}=tm();return b.jsxs(je,{value:e,onValueChange:t,children:[b.jsx(je.Trigger,{children:b.jsx(je.Value,{placeholder:"Dictionary Format"})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:"typescript",children:"TypeScript"}),b.jsx(je.Item,{value:"commonjs",children:"CommonJS"}),b.jsx(je.Item,{value:"esm",children:"ESM"}),b.jsx(je.Item,{value:"json",children:"JSON"})]})]})},jZ={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:"Копировать содержимое"})}},jD=({content:e})=>{const[t,n]=E.useState(!1),{label:r}=rn(jZ),a=async()=>{try{await navigator.clipboard.writeText(e),n(!0)}catch(o){console.error("Failed to copy text: ",o)}};return E.useEffect(()=>{const o=setTimeout(()=>{n(!1)},1e3);return()=>clearTimeout(o)},[t]),b.jsx(gt,{Icon:t?MV:PV,onClick:a,variant:"hoverable",color:"text",label:r.value,size:"icon-sm"})},PZ=()=>{const{packageManager:e,setPackageManager:t}=tm();return b.jsxs(je,{value:e,onValueChange:t,children:[b.jsx(je.Trigger,{children:b.jsx(je.Value,{placeholder:"Package Manager"})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:"npm",children:"npm"}),b.jsx(je.Item,{value:"pnpm",children:"pnpm"}),b.jsx(je.Item,{value:"yarn",children:"yarn"})]})]})},VZ=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:a=!0,className:o,fileName:l,packageManager:u,codeFormat:d,contentDeclarationFormat:f,...m})=>{const g=e.endsWith(`
|
|
288
|
+
`)?e.slice(0,-1):e,y=u||d||f;return b.jsx(IZ,{packageManager:u,codeFormat:d,contentDeclarationFormat:f,children:b.jsxs(Jr,{className:Te("relative text-sm leading-6",a&&"with-line-number ml-0",o),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(PZ,{}),d&&b.jsx(LZ,{}),f&&b.jsx(MZ,{})]})]}),b.jsx("div",{className:"sticky top-28",children:b.jsx("div",{className:Te("absolute bottom-0 right-2 flex h-7 items-center",y&&"h-11"),children:b.jsx(jD,{content:g})})})]}),b.jsx("div",{className:"grid size-full grid-cols-[0px] overflow-auto p-3",children:b.jsx(kZ,{lang:t,isDarkMode:n,children:g})})]})})},BZ=({children:e,isDarkMode:t,locale:n,options:r})=>{const{overrides:a,...o}=r??{};return b.jsx(DZ,{children:b.jsx(Kq,{options:{overrides:{h1:l=>b.jsx(S9,{isClickable:!0,...l}),h2:l=>b.jsx(A9,{isClickable:!0,...l}),h3:l=>b.jsx(pb,{isClickable:!0,...l}),h4:l=>b.jsx(w9,{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(VZ,{isDarkMode:t,language:(u=l.className)==null?void 0:u.replace("lang-",""),...l})},blockquote:({className:l,...u})=>b.jsx("blockquote",{className:Te("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:Te("mt-5 flex flex-col gap-3 pl-5",l),...u}),ol:({className:l,...u})=>b.jsx("ol",{className:Te("mt-5 flex flex-col gap-3 pl-5",l),...u}),li:({className:l,...u})=>b.jsx("li",{className:Te("list-disc",l),...u}),img:({className:l,...u})=>b.jsx("img",{...u,loading:"lazy",className:Te("max-w-full rounded-md",l),src:`${u.src}?raw=true`}),a:l=>{var u;return b.jsx(gb,{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:Te("max-w-full table-auto overflow-hidden text-left",l),...u})}),th:({className:l,...u})=>b.jsx("th",{className:Te("border-neutral bg-neutral/10 border-b p-4",l),...u}),tr:({className:l,...u})=>b.jsx("tr",{className:Te("hover:bg-neutral/10 hover:/10",l),...u}),td:({className:l,...u})=>b.jsx("td",{className:Te("border-b border-neutral-500/50 p-4",l),...u}),...a},wrapper:({className:l,...u})=>b.jsxs(b.Fragment,{children:[b.jsx(Yq,{}),b.jsx("div",{className:Te("flex flex-col gap-8 p-10",l),...u})]}),...o},children:e??""})})},zZ=e=>{let t,n;if(typeof e=="number"||!isNaN(Number(e)))t="=",n=e.toString();else if(typeof e=="string"){const a=["<=",">=","<",">","="].find(o=>e.startsWith(o));a&&(t=a,n=e.slice(a.length))}return{comparator:t,numberValue:n}},UZ=({value:e,onChange:t})=>{const{comparator:n,numberValue:r}=E.useMemo(()=>zZ(e),[e]),[a,o]=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(je,{onValueChange:o,defaultValue:n,children:[b.jsx(je.Trigger,{className:"w-20",children:b.jsx(je.Value,{placeholder:"Select a comparator"})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:"<",children:"<"}),b.jsx(je.Item,{value:"<=",children:"<="}),b.jsx(je.Item,{value:"=",children:"="}),b.jsx(je.Item,{value:">=",children:">="}),b.jsx(je.Item,{value:">",children:">"})]})]}),b.jsx(Jo,{type:"number","aria-label":"Quantity",defaultValue:l??void 0,onChange:d=>u(d.target.value),className:"min-w-4"})]})},nm={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:"Добавить новое условие"})}}},HZ=({keyPath:e,dictionary:t,...n})=>{const{editedContent:r,addEditedContent:a}=wn(),o=Zr(),{auditContentDeclarationField:l,isLoading:u}=O2();return b.jsx(H7,{variant:"default",onContentChange:d=>a(t.key,d,e),additionalButtons:b.jsx(gt,{Icon:P1,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:o.internationalization.locales??[],openAiApiKey:o.editor.openAiApiKey,model:o.editor.openAiApiModel,temperature:o.editor.openAiApiTemperature}).then(d=>{if(d!=null&&d.data)try{const f=d.data.fileContent;a(t.key,f,e)}catch(f){console.error(f)}})}}),...n})},FZ=({keyPath:e,dictionary:t,...n})=>{const{addEditedContent:r}=wn();return b.jsx(Cv,{variant:"default",onContentChange:a=>r(t.key,a,e),...n})},GZ=[{content:"False",value:!1},{content:"True",value:!0}],$Z=({dictionary:e,keyPath:t,...n})=>{const{addEditedContent:r}=wn();return b.jsx(wu,{choices:GZ,value:!0,onChange:a=>r(e.key,a,t),color:"text",size:"sm",...n})},qZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{locale:a,defaultLocale:o}=qv(),{selectedLocales:l,availableLocales:u}=Rk(),d=e[q.Translation],f=Object.keys(d),g=u.length>l.length?l:[...new Set([...u,...f])],y=e[q.Translation];return b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:g.map(v=>b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 w-full p-2 text-xs",children:yf(v,a)}),b.jsx("tr",{children:b.jsx(Ns,{section:y[v]??dr(y[o]),keyPath:[...t,{type:q.Translation,key:v}],dictionary:n,renderSection:r})})]},v))})})},KZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=wn(),{addNewEnumeration:o,removeEnumeration:l}=rn(nm),u=e[q.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[q.Enumeration]).map(f=>{const m=[...t,{type:q.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(gt,{label:l.label.value,variant:"hoverable",color:"text",Icon:Qv,className:"ml-auto",onClick:()=>a(n.key,void 0,m),children:l.text})})}),b.jsx("tr",{className:"w-full p-2",children:b.jsx(UZ,{value:f,onChange:g=>{const y=e[q.Enumeration],v=B7(y,f,g),_={...e,[q.Enumeration]:v};a(n.key,_,t)}})}),b.jsx("tr",{className:"block w-full",children:b.jsx(kb,{section:u[f]??dr(u[d]),keyPath:m,dictionary:n,renderSection:r})})]},f)})})}),b.jsx(gt,{label:o.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>a(n.key,dr(u[d])??"",[...t,{type:q.Enumeration,key:"unknown"}]),Icon:Th,className:"m-2",children:o.text})]})},WZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const a=e[q.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(o=>b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 block w-full p-2 text-xs",children:String(o)},o),b.jsx("tr",{className:"block w-full",children:b.jsx(Ns,{section:a[o]??dr(a.true),keyPath:[...t,{type:q.Condition,key:o}],dictionary:n,renderSection:r})},o)]},o))})})},YZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=wn(),{addNewElement:o,removeElement:l}=rn(nm);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(gt,{label:l.label.value,variant:"hoverable",color:"neutral",className:"ml-auto",textAlign:"left",onClick:()=>{const f=[...t,{type:q.Array,key:e.length}];a(n.key,void 0,f)},Icon:Qv,children:l.text})]}),b.jsx("tr",{className:"block w-full",children:b.jsx(Ns,{section:u??dr(e[0]),keyPath:[...t,{type:q.Array,key:d}],dictionary:n,renderSection:r})})]},JSON.stringify(u)))})}),b.jsx(gt,{label:o.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>{const u=[...t,{type:q.Array,key:e.length}];a(n.key,dr(e[0])??"",u,!1)},Icon:Th,children:o.text})]})},ZZ=({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 o=[...t,{type:q.Object,key:a}],l=e,u=Object.keys(l)[0],d=l[a]??dr(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(kb,{section:d,keyPath:o,dictionary:n,renderSection:r})},JSON.stringify(d))]},a)})})})}),XZ=({section:e,keyPath:t,dictionary:n,isDarkMode:r,onContentChange:a})=>{const[o,l]=E.useState(0),u=[{content:"Edit",value:0},{content:"Preview",value:1}],d=[...t,{type:q.Markdown}],f=e[q.Markdown];return b.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[b.jsx(wu,{choices:u,value:o,onChange:l,color:"text",size:"sm",className:"ml-auto"}),b.jsx(Ns,{section:f,keyPath:d,dictionary:n,renderSection:o===1?m=>b.jsx(BZ,{isDarkMode:r,children:m}):void 0,onContentChange:a})]})},QZ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:q.Insertion}],a=e[q.Insertion];return b.jsx("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:b.jsx(Ns,{section:a,keyPath:r,...n})})},JZ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:q.File}],a=e[q.File],{content:o}=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(Ns,{section:o,keyPath:r,...n})]})},eX=({keyPath:e,dictionary:t,renderSection:n,section:r,...a})=>{const{addEditedContent:o}=wn(),l=r[q.Nested],u=[...e,{type:q.Nested}];return b.jsxs("div",{className:"w-full p-2",children:[b.jsx(Hy,{children:"Dictionary key"}),b.jsx(Cv,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{o(t.key,{...l,dictionaryKey:String(d)},u)},children:l.dictionaryKey??""}),b.jsx(Hy,{children:"Path (optional)"}),b.jsx(Cv,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{o(t.key,{...l,path:d!==""?d:void 0},u)},children:l.path??""})]})},kb=({section:e,keyPath:t,dictionary:n,renderSection:r,isDarkMode:a})=>{const{tsxNotEditable:o}=rn(nm),l=qo(e);return l===q.ReactNode?b.jsxs(b.Fragment,{children:[b.jsx("span",{children:"[React Node]"}),b.jsx("span",{className:"text-neutral text-xs",children:o})]}):l===q.Nested?b.jsx(eX,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Translation?b.jsx(qZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Enumeration?b.jsx(KZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Condition?b.jsx(WZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Insertion?b.jsx(QZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Markdown?b.jsx(XZ,{dictionary:n,keyPath:t,section:e,isDarkMode:a}):l===q.File?b.jsx(JZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Array?b.jsx(YZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Object?b.jsx(ZZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===q.Number?b.jsx("div",{className:"w-full p-2",children:b.jsx(FZ,{dictionary:n,keyPath:t,type:"number","aria-label":"Edit field",children:e})}):l===q.Text?b.jsx("div",{className:"w-full p-2",children:typeof r=="function"?r(e):b.jsx(HZ,{variant:"default","aria-label":"Edit field",keyPath:t,dictionary:n,children:e})}):l===q.Boolean?b.jsx("div",{className:"w-full p-2",children:b.jsx($Z,{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]})},Ns=e=>b.jsx(Jr,{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(kb,{...e})}),cu=e=>{const t=YT(e),n=qo(e);return t&&(n===q.ReactNode||n===q.File)?!0:t&&typeof t.nodeType=="string"?cu(t[t.nodeType]):typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"},tX=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r})=>{const a=[{text:t,onClick:()=>n([])},...e.map((o,l)=>{var u;return{onClick:()=>n(e.slice(0,l+1)),text:((u=o.key)==null?void 0:u.toString())??""}})];return b.jsx(I9,{links:a,locale:r,elementType:"location"})},Df=e=>String(e).replace(/([A-Z])/g," $1").toLowerCase().trim(),xo=({section:e,keyPath:t,dictionaryKey:n})=>{const{locales:r}=rt==null?void 0:rt.internationalization,a=Ur(e,t),{addEditedContent:o}=Ko(),{setFocusedContentKeyPath:l,focusedContent:u}=Ea(),{addNewElement:d,goToField:f}=rn(nm),m=qo(a),g=v=>{var _;return(((_=u==null?void 0:u.keyPath)==null?void 0:_.length)??0)>0&&fu(v,(u==null?void 0:u.keyPath)??[])},y=cu(a);if(!a)return b.jsx(b.Fragment,{});if(y)return b.jsx(gt,{label:f.label.value,variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(t),IconRight:jf,children:Df(t[t.length-1].key)});if(typeof a=="object"){if(m===q.ReactNode)return b.jsx(b.Fragment,{children:"React Node"});if(m===q.Translation)return b.jsx("div",{className:"flex flex-col justify-between gap-2",children:r.map(_=>{const S=[...t,{type:q.Translation,key:_}];return b.jsx(xo,{keyPath:S,section:e,dictionaryKey:n},_)})});if(m===q.Enumeration||m===q.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(xo,{keyPath:S,section:e,dictionaryKey:n},_)})});if(m===q.Array)return b.jsxs("div",{className:"flex flex-col justify-between gap-2",children:[a.map((_,S)=>{const A=[...t,{type:q.Array,key:S}];return b.jsx(xo,{keyPath:A,section:e,dictionaryKey:n},JSON.stringify(A))}),b.jsx(gt,{label:d.label.value,variant:"hoverable",color:"neutral",textAlign:"left",onClick:()=>{const _=[...t,{type:q.Array,key:a.length}],S=a,A=dr(S[S.length-1])??"";o(n,A,_,!1),l(_)},Icon:Th,children:d.text})]});if(typeof a.nodeType=="string"){const _=[...t,{type:a.nodeType}];return b.jsx(xo,{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:q.Object,key:_}],A=Ur(e,S);return cu(A)?b.jsx(gt,{label:`${f.label.value} ${_}`,isActive:g(S),variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(S),IconRight:jf,children:Df(_)},_):b.jsx(Y1,{label:`${f.label.value} ${_}`,isActive:g(S),onClick:()=>l(S),header:Df(_),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(xo,{keyPath:S,section:e,dictionaryKey:n})})})},_)})})}return b.jsxs(b.Fragment,{children:["Error loading section --",m,"--",JSON.stringify(a),"--",JSON.stringify(t)]})},nX=({dictionary:e,isDarkMode:t})=>{var y,v;const{content:n,key:r}=e,{editedContent:a}=wn(),{focusedContent:o,setFocusedContentKeyPath:l}=Ea(),u=o==null?void 0:o.keyPath,d=typeof((y=a==null?void 0:a[e.key])==null?void 0:y.content)>"u"?n:(v=a==null?void 0:a[r])==null?void 0:v.content,f=Ur(d,u??[]),m=cu(d),g=cu(f);return E.useEffect(()=>{var _;typeof f>"u"&&l(((_=o==null?void 0:o.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(tX,{dictionaryKey:r,keyPath:u??[],onClickKeyPath:l}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsx(V7,{})})]}),b.jsxs("div",{className:"flex gap-2 max-md:flex-col",children:[typeof d=="object"&&d&&!m&&Object.keys(d).length>0&&b.jsx(Jr,{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(xo,{keyPath:[],section:d,dictionaryKey:r})}),(g||(u??[]).length>0)&&b.jsx(Ns,{keyPath:u??[],section:f,dictionary:e,isDarkMode:t})]})]})},rX={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:"Отслеживание"})}}},iX={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:"Пожалуйста, введите действительный тег"})}},aX=e=>{const{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:l,keyMinLengthError:u,descriptionRequiredError:d,descriptionInvalidTypeError:f,requiredErrorProjectId:m,invalidTypeErrorProjectId:g,invalidTypeErrorTags:y}=rn(iX);return sa.object({title:sa.string({required_error:t.value,invalid_type_error:n.value}).refine(v=>v.length===0||v.length>=4,{message:r.value}).optional(),key:sa.string({required_error:a.value,invalid_type_error:o.value}).min(4,{message:u.value}).regex(/^[a-zA-Z0-9-_]+$/,{message:l.value}).default(""),description:sa.string({required_error:d.value,invalid_type_error:f.value}).optional(),projectIds:sa.array(sa.string({required_error:m.value,invalid_type_error:g.value})).default([e]),tags:sa.array(sa.string({invalid_type_error:y.value})).default([])})},sX=({dictionary:e})=>{var N,k;const{session:t}=yu(),{project:n}=t??{},{data:r,isLoading:a}=w2(),{data:o}=R2(),l=aX(String(n==null?void 0:n._id)),{form:u,isSubmitting:d}=oU(l,{defaultValues:e}),{editedContent:f,setEditedDictionary:m}=wn(),{titleInput:g,keyInput:y,descriptionInput:v,projectInput:_,tagsSelect:S,auditButton:A}=rn(rX),{auditContentDeclaration:w,isLoading:T}=N2(),R=f==null?void 0:f[e.key];E.useEffect(()=>{u.reset(e)},[e,u==null?void 0:u.reset]),E.useEffect(()=>{typeof R>"u"&&u.reset(e)},[R]);const D=async()=>{const I={...e,...R};await w({fileContent:JSON.stringify(I)}).then(P=>{if(P!=null&&P.data)try{const V=JSON.parse(P.data.fileContent);m(U=>({...U,...I,...V})),u.reset({...I,...V})}catch(V){console.error(V)}})};return b.jsx(Jr,{background:"none",border:!0,roundedSize:"2xl",className:"w-full px-5 pb-3 pt-5",children:b.jsxs(et,{className:"flex w-full flex-col gap-8",...u,schema:l,onChange:I=>m(P=>({...P,...I})),children:[b.jsxs("div",{className:"flex w-full flex-1 gap-8 max-md:flex-col",children:[b.jsx(et.EditableFieldInput,{name:"key",label:y.label,placeholder:y.label.value,description:y.description,disabled:d,isRequired:!0,onSave:I=>{u.setValue("key",I),m(P=>({...e,...P??{},key:I}))}}),b.jsx(et.EditableFieldInput,{name:"title",label:g.label,placeholder:g.placeholder.value,description:g.description,disabled:d,onSave:I=>{u.setValue("title",I),m(P=>({...e,...P??{},title:I}))}})]}),b.jsx(et.EditableFieldTextArea,{name:"description",label:v.label,placeholder:v.placeholder.value,description:v.description,disabled:d,onSave:I=>{u.setValue("description",I),m(P=>({...e,...P??{},description:I}))}}),b.jsxs("div",{className:"flex size-full flex-1 gap-8 max-md:flex-col",children:[b.jsxs(et.MultiSelect,{name:"projectIds",label:_.label.value,description:_.description.value,onValueChange:I=>{const P=[I].flat();u.setValue("projectIds",P),m(V=>({...e,...V??{},projectIds:P}))},children:[b.jsx(mn.Trigger,{getBadgeValue:I=>{var P,V;return((V=(P=r==null?void 0:r.data)==null?void 0:P.find(U=>String(U._id)===I))==null?void 0:V.name)??I},children:b.jsx(mn.Input,{placeholder:_.placeholder.value})}),b.jsx(mn.Content,{children:b.jsx(jo,{isLoading:a,children:b.jsx(mn.List,{children:(N=r==null?void 0:r.data)==null?void 0:N.map(I=>b.jsx(mn.Item,{value:String(I._id),children:I.name},String(I._id)))})})})]}),b.jsxs(et.MultiSelect,{name:"tags",label:S.label.value,description:S.description.value,onValueChange:I=>{u.setValue("tags",[I].flat()),m(P=>({...e,...P??{},tags:[I].flat()}))},children:[b.jsx(mn.Trigger,{getBadgeValue:I=>{var P,V;return((V=(P=r==null?void 0:r.data)==null?void 0:P.find(U=>String(U._id)===I))==null?void 0:V.name)??I},children:b.jsx(mn.Input,{placeholder:S.placeholder.value})}),b.jsx(mn.Content,{children:b.jsx(jo,{isLoading:a,children:b.jsx(mn.List,{children:(k=o==null?void 0:o.data)==null?void 0:k.map(I=>b.jsx(mn.Item,{value:String(I.key),children:I.name??I.key},String(I.key)))})})})]})]}),b.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 max-md:flex-col",children:b.jsx(et.Button,{type:"button",label:A.label.value,Icon:P1,variant:"outline",color:"text",className:"max-md:w-full",onClick:D,disabled:d||T,isLoading:T,children:A.text})})]})})},oX={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 lX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UT(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 HT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UT(Object(n),!0).forEach(function(r){lX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cX(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function uX(e,t){if(e==null)return{};var n=cX(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dX(e,t){return fX(e)||hX(e,t)||mX(e,t)||pX()}function fX(e){if(Array.isArray(e))return e}function hX(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,o=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,o=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw o}}return n}}function mX(e,t){if(e){if(typeof e=="string")return FT(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 FT(e,t)}}function FT(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 pX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
289
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GT(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 $T(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(n),!0).forEach(function(r){gX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yX(){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,o){return o(a)},r)}}function Ec(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];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 _h(e){return{}.toString.call(e).includes("Object")}function vX(e){return!Object.keys(e).length}function uu(e){return typeof e=="function"}function bX(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _X(e,t){return _h(t)||fa("changeType"),Object.keys(t).some(function(n){return!bX(e,n)})&&fa("changeField"),t}function xX(e){uu(e)||fa("selectorType")}function EX(e){uu(e)||_h(e)||fa("handlerType"),_h(e)&&Object.values(e).some(function(t){return!uu(t)})&&fa("handlersType")}function SX(e){e||fa("initialIsRequired"),_h(e)||fa("initialType"),vX(e)&&fa("initialContent")}function AX(e,t){throw new Error(e[t]||e.default)}var wX={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"},fa=Ec(AX)(wX),hf={changes:_X,selector:xX,handler:EX,initial:SX};function TX(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hf.initial(e),hf.handler(t);var n={current:e},r=Ec(NX)(n,t),a=Ec(RX)(n),o=Ec(hf.changes)(e),l=Ec(CX)(n);function u(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return hf.selector(f),f(n.current)}function d(f){yX(r,a,o,l)(f)}return[u,d]}function CX(e,t){return uu(t)?t(e.current):t}function RX(e,t){return e.current=$T($T({},e.current),t),t}function NX(e,t,n){return uu(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 OX={create:TX},kX={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function DX(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];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 IX(e){return{}.toString.call(e).includes("Object")}function LX(e){return e||qT("configIsRequired"),IX(e)||qT("configType"),e.urls?(MX(),{paths:{vs:e.urls.monacoBase}}):e}function MX(){console.warn(PD.deprecation)}function jX(e,t){throw new Error(e[t]||e.default)}var PD={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!
|
|
290
|
+
You are using deprecated way of configuration.
|
|
291
|
+
|
|
292
|
+
Instead of using
|
|
293
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
294
|
+
use
|
|
295
|
+
monaco.config({ paths: { vs: '...' } })
|
|
296
|
+
|
|
297
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
298
|
+
`},qT=DX(jX)(PD),PX={config:LX},VX=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(o,l){return l(o)},a)}};function VD(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],VD(e[n],t[n]))}),HT(HT({},e),t)}var BX={type:"cancelation",msg:"operation is manually canceled"};function Sy(e){var t=!1,n=new Promise(function(r,a){e.then(function(o){return t?a(BX):r(o)}),e.catch(a)});return n.cancel=function(){return t=!0},n}var zX=OX.create({config:kX,isInitialized:!1,resolve:null,reject:null,monaco:null}),BD=dX(zX,2),Iu=BD[0],rm=BD[1];function UX(e){var t=PX.config(e),n=t.monaco,r=uX(t,["monaco"]);rm(function(a){return{config:VD(a.config,r),monaco:n}})}function HX(){var e=Iu(function(t){var n=t.monaco,r=t.isInitialized,a=t.resolve;return{monaco:n,isInitialized:r,resolve:a}});if(!e.isInitialized){if(rm({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Sy(Ay);if(window.monaco&&window.monaco.editor)return zD(window.monaco),e.resolve(window.monaco),Sy(Ay);VX(FX,$X)(qX)}return Sy(Ay)}function FX(e){return document.body.appendChild(e)}function GX(e){var t=document.createElement("script");return e&&(t.src=e),t}function $X(e){var t=Iu(function(r){var a=r.config,o=r.reject;return{config:a,reject:o}}),n=GX("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function qX(){var e=Iu(function(n){var r=n.config,a=n.resolve,o=n.reject;return{config:r,resolve:a,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){zD(n),e.resolve(n)},function(n){e.reject(n)})}function zD(e){Iu().monaco||rm({monaco:e})}function KX(){return Iu(function(e){var t=e.monaco;return t})}var Ay=new Promise(function(e,t){return rm({resolve:e,reject:t})}),UD={config:UX,init:HX,__getMonacoInstance:KX},WX={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},wy=WX,YX={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ZX=YX;function XX({children:e}){return $e.createElement("div",{style:ZX.container},e)}var QX=XX,JX=QX;function eQ({width:e,height:t,isEditorReady:n,loading:r,_ref:a,className:o,wrapperProps:l}){return $e.createElement("section",{style:{...wy.wrapper,width:e,height:t},...l},!n&&$e.createElement(JX,null,r),$e.createElement("div",{ref:a,style:{...wy.fullWidth,...!n&&wy.hide},className:o}))}var tQ=eQ,HD=E.memo(tQ);function nQ(e){E.useEffect(e,[])}var FD=nQ;function rQ(e,t,n=!0){let r=E.useRef(!0);E.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Un=rQ;function Ic(){}function No(e,t,n,r){return iQ(e,r)||aQ(e,t,n,r)}function iQ(e,t){return e.editor.getModel(GD(e,t))}function aQ(e,t,n,r){return e.editor.createModel(t,n,r?GD(e,r):void 0)}function GD(e,t){return e.Uri.parse(t)}function sQ({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:a,originalModelPath:o,modifiedModelPath:l,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:d=!1,theme:f="light",loading:m="Loading...",options:g={},height:y="100%",width:v="100%",className:_,wrapperProps:S={},beforeMount:A=Ic,onMount:w=Ic}){let[T,R]=E.useState(!1),[D,N]=E.useState(!0),k=E.useRef(null),I=E.useRef(null),P=E.useRef(null),V=E.useRef(w),U=E.useRef(A),ue=E.useRef(!1);FD(()=>{let J=UD.init();return J.then(H=>(I.current=H)&&N(!1)).catch(H=>(H==null?void 0:H.type)!=="cancelation"&&console.error("Monaco initialization: error:",H)),()=>k.current?Y():J.cancel()}),Un(()=>{if(k.current&&I.current){let J=k.current.getOriginalEditor(),H=No(I.current,e||"",r||n||"text",o||"");H!==J.getModel()&&J.setModel(H)}},[o],T),Un(()=>{if(k.current&&I.current){let J=k.current.getModifiedEditor(),H=No(I.current,t||"",a||n||"text",l||"");H!==J.getModel()&&J.setModel(H)}},[l],T),Un(()=>{let J=k.current.getModifiedEditor();J.getOption(I.current.editor.EditorOption.readOnly)?J.setValue(t||""):t!==J.getValue()&&(J.executeEdits("",[{range:J.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),J.pushUndoStop())},[t],T),Un(()=>{var J,H;(H=(J=k.current)==null?void 0:J.getModel())==null||H.original.setValue(e||"")},[e],T),Un(()=>{let{original:J,modified:H}=k.current.getModel();I.current.editor.setModelLanguage(J,r||n||"text"),I.current.editor.setModelLanguage(H,a||n||"text")},[n,r,a],T),Un(()=>{var J;(J=I.current)==null||J.editor.setTheme(f)},[f],T),Un(()=>{var J;(J=k.current)==null||J.updateOptions(g)},[g],T);let oe=E.useCallback(()=>{var ne;if(!I.current)return;U.current(I.current);let J=No(I.current,e||"",r||n||"text",o||""),H=No(I.current,t||"",a||n||"text",l||"");(ne=k.current)==null||ne.setModel({original:J,modified:H})},[n,t,a,e,r,o,l]),fe=E.useCallback(()=>{var J;!ue.current&&P.current&&(k.current=I.current.editor.createDiffEditor(P.current,{automaticLayout:!0,...g}),oe(),(J=I.current)==null||J.editor.setTheme(f),R(!0),ue.current=!0)},[g,f,oe]);E.useEffect(()=>{T&&V.current(k.current,I.current)},[T]),E.useEffect(()=>{!D&&!T&&fe()},[D,T,fe]);function Y(){var H,ne,ee,ve;let J=(H=k.current)==null?void 0:H.getModel();u||((ne=J==null?void 0:J.original)==null||ne.dispose()),d||((ee=J==null?void 0:J.modified)==null||ee.dispose()),(ve=k.current)==null||ve.dispose()}return $e.createElement(HD,{width:v,height:y,isEditorReady:T,loading:m,_ref:P,className:_,wrapperProps:S})}var oQ=sQ;E.memo(oQ);function lQ(e){let t=E.useRef();return E.useEffect(()=>{t.current=e},[e]),t.current}var cQ=lQ,mf=new Map;function uQ({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:a,path:o,theme:l="light",line:u,loading:d="Loading...",options:f={},overrideServices:m={},saveViewState:g=!0,keepCurrentModel:y=!1,width:v="100%",height:_="100%",className:S,wrapperProps:A={},beforeMount:w=Ic,onMount:T=Ic,onChange:R,onValidate:D=Ic}){let[N,k]=E.useState(!1),[I,P]=E.useState(!0),V=E.useRef(null),U=E.useRef(null),ue=E.useRef(null),oe=E.useRef(T),fe=E.useRef(w),Y=E.useRef(),J=E.useRef(r),H=cQ(o),ne=E.useRef(!1),ee=E.useRef(!1);FD(()=>{let W=UD.init();return W.then(F=>(V.current=F)&&P(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>U.current?j():W.cancel()}),Un(()=>{var F,re,te,de;let W=No(V.current,e||r||"",t||a||"",o||n||"");W!==((F=U.current)==null?void 0:F.getModel())&&(g&&mf.set(H,(re=U.current)==null?void 0:re.saveViewState()),(te=U.current)==null||te.setModel(W),g&&((de=U.current)==null||de.restoreViewState(mf.get(o))))},[o],N),Un(()=>{var W;(W=U.current)==null||W.updateOptions(f)},[f],N),Un(()=>{!U.current||r===void 0||(U.current.getOption(V.current.editor.EditorOption.readOnly)?U.current.setValue(r):r!==U.current.getValue()&&(ee.current=!0,U.current.executeEdits("",[{range:U.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),U.current.pushUndoStop(),ee.current=!1))},[r],N),Un(()=>{var F,re;let W=(F=U.current)==null?void 0:F.getModel();W&&a&&((re=V.current)==null||re.editor.setModelLanguage(W,a))},[a],N),Un(()=>{var W;u!==void 0&&((W=U.current)==null||W.revealLine(u))},[u],N),Un(()=>{var W;(W=V.current)==null||W.editor.setTheme(l)},[l],N);let ve=E.useCallback(()=>{var W;if(!(!ue.current||!V.current)&&!ne.current){fe.current(V.current);let F=o||n,re=No(V.current,r||e||"",t||a||"",F||"");U.current=(W=V.current)==null?void 0:W.editor.create(ue.current,{model:re,automaticLayout:!0,...f},m),g&&U.current.restoreViewState(mf.get(F)),V.current.editor.setTheme(l),u!==void 0&&U.current.revealLine(u),k(!0),ne.current=!0}},[e,t,n,r,a,o,f,m,g,l,u]);E.useEffect(()=>{N&&oe.current(U.current,V.current)},[N]),E.useEffect(()=>{!I&&!N&&ve()},[I,N,ve]),J.current=r,E.useEffect(()=>{var W,F;N&&R&&((W=Y.current)==null||W.dispose(),Y.current=(F=U.current)==null?void 0:F.onDidChangeModelContent(re=>{ee.current||R(U.current.getValue(),re)}))},[N,R]),E.useEffect(()=>{if(N){let W=V.current.editor.onDidChangeMarkers(F=>{var te;let re=(te=U.current.getModel())==null?void 0:te.uri;if(re&&F.find(de=>de.path===re.path)){let de=V.current.editor.getModelMarkers({resource:re});D==null||D(de)}});return()=>{W==null||W.dispose()}}return()=>{}},[N,D]);function j(){var W,F;(W=Y.current)==null||W.dispose(),y?g&&mf.set(o,U.current.saveViewState()):(F=U.current.getModel())==null||F.dispose(),U.current.dispose()}return $e.createElement(HD,{width:v,height:_,isEditorReady:N,loading:d,_ref:ue,className:S,wrapperProps:A})}var dQ=uQ,fQ=E.memo(dQ);const hQ=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:a=!0,isReadOnly:o=!1,onChange:l})=>{const u=E.useRef(null),d=E.useRef(null),[f,m]=E.useState({height:0,width:0}),g=E.useMemo(()=>n?"vs-dark-transparent":"hc-light-theme",[n]),y=(_,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(g),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(`
|
|
299
|
+
`).length>1;return b.jsxs("div",{className:Te("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:Te("absolute bottom-0 right-2 flex h-7 items-center"),children:b.jsx(jD,{content:e})})}),b.jsx("div",{className:"z-0 grid size-full grid-cols-[0px] overflow-auto",ref:u,children:b.jsx(fQ,{...f,defaultLanguage:"typescript",language:t,loading:b.jsx(jo,{}),defaultValue:String(e).replace(/\n$/,""),onMount:y,onChange:l,options:{readOnly:o,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:g,className:"my-2 rounded-md"})})]})},mQ=({dictionary:e,isDarkMode:t})=>{const{setEditedContent:n,editedContent:r}=wn(),a=l=>{try{return JSON.parse(l),!0}catch{return!1}},o=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(Jr,{background:"none",border:!0,roundedSize:"xl",className:"w-full overflow-hidden p-3",children:b.jsx(hQ,{language:"json",onChange:l=>{a(l??"{}")&&n(e.key,JSON.parse(l??"{}"))},isDarkMode:t,children:JSON.stringify(o,null,2)})})},pQ={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:"Реакт узел"})}},pf=({section:e,onValueChange:t})=>{const{multilingual:n,text:r,number:a,boolean:o,node:l,array:u,enumeration:d,triggerPlaceHolder:f,nest:m,condition:g,markdown:y,insertion:v,reactNode:_,file:S}=rn(pQ),A=qo(e),[w,T]=E.useState(A),R=D=>{T(D),t(D)};return b.jsxs(je,{value:w,onValueChange:R,children:[b.jsx(je.Trigger,{children:b.jsx(je.Value,{placeholder:f})}),b.jsxs(je.Content,{children:[b.jsx(je.Item,{value:q.Translation,children:n}),b.jsx(je.Item,{value:q.Text,children:r}),b.jsx(je.Item,{value:q.Number,children:a}),b.jsx(je.Item,{value:q.Boolean,children:o}),b.jsx(je.Item,{value:q.Object,children:l}),b.jsx(je.Item,{value:q.Array,children:u}),b.jsx(je.Item,{value:q.Enumeration,children:d}),b.jsx(je.Item,{value:q.Insertion,children:v}),b.jsx(je.Item,{value:q.Markdown,children:y}),b.jsx(je.Item,{value:q.Nested,children:m}),b.jsx(je.Item,{value:q.Condition,children:g}),b.jsx(je.Item,{value:q.ReactNode,disabled:!0,children:_}),b.jsx(je.Item,{value:q.File,children:S})]})]})},$D={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:"Добавить новый узел"})}}},Bv=({section:e,dictionaryKey:t,keyPath:n,onNodeTypeChange:r})=>{var d;const a=((d=Zr())==null?void 0:d.internationalization.locales)??[],o=qo(e),l=YT(e),u=f=>{const m=sc(o,a,f);r(m)};if(o===q.Translation||o===q.Condition||o===q.Enumeration){const f=Object.keys(e[o])[0],m=[...n,{type:o,key:f}];return b.jsxs("div",{className:"flex w-full flex-col gap-1",children:[b.jsx(pf,{section:e,onValueChange:g=>r(sc(g,a))}),b.jsx(Bv,{section:l,keyPath:m,dictionaryKey:t,onNodeTypeChange:u})]})}if(o===q.Array){const f=[...n,{type:o,key:0}];return b.jsxs("div",{className:"flex w-full flex-col gap-1",children:[b.jsx(pf,{section:e,onValueChange:m=>r(sc(m,a))}),b.jsx(Bv,{section:l,keyPath:f,dictionaryKey:t,onNodeTypeChange:u})]})}return o===q.Object?b.jsxs(b.Fragment,{children:[b.jsx(pf,{section:e,onValueChange:f=>r(sc(f,a))}),b.jsx("div",{className:"ml-10 mt-6",children:b.jsx(yQ,{keyPath:n,section:e,dictionaryKey:t})})]}):b.jsx(pf,{section:e,onValueChange:f=>r(sc(f,a))})},Db=({sectionKey:e,section:t,keyPath:n,dictionaryKey:r})=>{const{focusedContent:a,setFocusedContentKeyPath:o}=Ea(),{renameEditedContent:l,addEditedContent:u}=Ko(),{titleInput:d,deleteButton:f}=rn($D),m=g=>{l(r,g,n);const y=n.slice(0,-1),v=n[n.length-1],_=[...y,{...v,key:g}];o(_)};return b.jsx(Jr,{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":fu(n,(a==null?void 0:a.keyPath)??[]),onClick:()=>o(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(HC,{name:"key","aria-label":"Key",placeholder:d.placeholder.value,defaultValue:e,onSave:g=>m(g),variant:"invisible"}),b.jsx(gt,{label:f.label.value,variant:"hoverable",size:"icon-sm",color:"text",className:"translate-x-2",Icon:Qv,onClick:()=>{u(r,void 0,n);const g=n.slice(0,-1);o(g)}})]}),b.jsxs("span",{className:"text-neutral ml-3 text-sm",children:["( ",Df(e)," )"]})]}),b.jsx(Bv,{keyPath:n,dictionaryKey:r,section:t,onNodeTypeChange:g=>{u(r,g,n)}})]})})},gQ=({section:e,keyPath:t,dictionaryKey:n})=>{const{addNodeButton:r}=rn($D),{setFocusedContentKeyPath:a}=Fv(),{addEditedContent:o}=Ko();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(Db,{sectionKey:l,section:e==null?void 0:e[l],keyPath:[...t,{type:q.Object,key:l}],dictionaryKey:n})},l))}),b.jsx(gt,{label:r.label.value,variant:"hoverable",size:"md",color:"text",Icon:Th,className:"flex-1",onClick:()=>{const u=[...t,{type:q.Object,key:"newKey"}];o(n,"",u),a(u)},children:r.text})]})},yQ=({section:e,keyPath:t,dictionaryKey:n})=>!e||typeof e!="object"||typeof e.nodeType=="string"?b.jsx(Db,{sectionKey:"content",section:e,keyPath:t,dictionaryKey:n}):b.jsx(gQ,{section:e,keyPath:t,dictionaryKey:n}),vQ=({dictionary:e})=>{var o,l;const{content:t,key:n}=e,{editedContent:r}=wn(),a=typeof((o=r==null?void 0:r[n])==null?void 0:o.content)>"u"?t:(l=r==null?void 0:r[n])==null?void 0:l.content;return b.jsx(Db,{section:a,keyPath:[],dictionaryKey:e.key})},bQ=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r})=>{const a=Zr(),[o,l]=E.useState(1),{returnToDictionaryList:u}=rn(oX),{setFocusedContent:d}=Fv(),{setLocaleDictionaries:f}=Hv();return E.useEffect(()=>{d(m=>({...m??{},dictionaryKey:e.key})),f(m=>({...m,[e.key]:e}))},[]),b.jsx(P7,{availableLocales:(a==null?void 0:a.internationalization.locales)??[],children:b.jsxs("div",{className:"flex size-full flex-col gap-6 px-2",children:[b.jsx(gt,{onClick:t,variant:"hoverable",className:"z-10 ml-5 mr-auto",color:"text",Icon:EV,label:u.label.value,children:u.text}),b.jsx(wu,{defaultValue:o,onChange:m=>l(m),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:m})=>!(!r.includes("remote")&&m===0))}),o===0&&b.jsx(sX,{dictionary:e}),o===2&&b.jsx(vQ,{dictionary:e}),o===1&&b.jsx(nX,{dictionary:e,isDarkMode:n}),o===3&&b.jsx(mQ,{dictionary:e,isDarkMode:n}),b.jsx(pk,{dictionary:e,mode:r})]})})},_Q=({children:e,isHidden:t,minWidth:n=0,align:r="left",className:a,...o})=>b.jsx("div",{className:Te("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,...o,children:b.jsx("div",{style:{minWidth:`${n}px`},tabIndex:t!==!1?void 0:-1,className:Te(r==="right"&&"ml-auto"),children:e})}),xQ=e=>{const t=e.getBoundingClientRect(),n=t.top,r=t.bottom;if(n>=0&&r<=window.innerHeight){const o=t.left+t.width/2,l=t.top+10,u=document.elementFromPoint(o,l);return e===u||e.contains(u)}return!1},im=Q1((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})),qD=({title:e,identifier:t,children:n,header:r,closeOnOutsideClick:a=!0,backButton:o,isOpen:l,onClose:u})=>{const{isMobile:d}=I7("md"),f=E.useRef(null),m=E.useRef(null),{close:g,open:y,isOpen:v}=im(dk(S=>({close:()=>S.close(t),open:()=>S.open(t),isOpen:S.isOpen(t)})));fk({disableScroll:v,key:t?`right_drawer_${t}`:"right_drawer"}),E.useEffect(()=>{const S=A=>{try{if(!f.current)return;const w=v&&a,T=A.target&&!f.current.contains(A.target),R=xQ(f.current);(w&&T&&R||!A.target)&&(g(),u==null||u())}catch{g(),u==null||u()}};return window.addEventListener("mousedown",S),()=>window.removeEventListener("mousedown",S)},[v,g,u,a,t]),E.useEffect(()=>{l!==void 0&&(l?y():(g(),u==null||u()))},[g,y,u,l,t]);const _=S=>{S.target===S.currentTarget&&d&&(g(),u==null||u())};return b.jsx("div",{className:"fixed right-0 top-0 z-50 flex h-full justify-end",children:b.jsx(_Q,{isHidden:!v,align:"right",children:b.jsxs(Jr,{className:"text-text relative flex h-screen w-screen flex-col md:w-[400px]",ref:f,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:o&&b.jsx(gt,{variant:"hoverable",color:"text",label:o.text??"Go back",onClick:o.onBack,Icon:RV,children:o==null?void 0:o.text})}),b.jsx("div",{children:b.jsx(gt,{variant:"hoverable",color:"text",label:"Close",className:"ml-auto",onClick:g,Icon:Ts,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})})]})})})},EQ=()=>{const{toasts:e}=vC();return b.jsxs(c2.Provider,{children:[e.map(({id:t,title:n,description:r,action:a,...o})=>b.jsxs(f2,{...o,children:[b.jsxs("div",{className:"grid gap-1",children:[n&&b.jsx(m2,{children:n}),r&&b.jsx(p2,{children:r})]}),a,b.jsx(h2,{})]},t)),b.jsx(u2,{})]})},KD=(...e)=>{const{localeDictionaries:t}=i1(),{data:n,isWaitingData:r}=T2(...e),a=E.useMemo(()=>((n==null?void 0:n.data)??[]).reduce((l,u)=>(l[u.key]=u,l),{}),[n]),o=E.useMemo(()=>M2(a??{},t),[a,t]);return{online:a,locale:t,all:o,isLoading:r}},SQ=({children:e})=>b.jsx(sG,{features:d9,children:e}),AQ=({children:e})=>b.jsx(SQ,{children:b.jsxs(oz,{children:[b.jsx(EQ,{}),e]})}),wQ=({children:e})=>b.jsx(sV,{children:b.jsx(PP,{children:b.jsx(C1,{path:"*",element:e})})}),zv="dictionaryList",WD={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"})}},Ib=e=>`dictionary_edition_${e}`,YD=e=>{const t=Ib(e),{isOpen:n,open:r,close:a}=im(),{getEditedContentValue:o}=Ko(),{focusedContent:l,setFocusedContent:u}=Ea();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:o,close:()=>{a(t),u(d=>d!=null&&d.dictionaryKey?{...d,keyPath:[]}:d)}}},TQ=({locale:e,identifier:t,handleOnBack:n,isDarkMode:r})=>{const{modalTitle:a,openDictionaryEditor:o}=rn(WD),[l,u]=E.useState(!1),{all:d}=KD(),{focusedContent:f}=YD(t),m=E.useCallback(()=>{u(!1),n()},[n]),g=f==null?void 0:f.dictionaryKey;if(!g)return b.jsx(b.Fragment,{children:"No dictionary focused"});const y=d[g];return y?b.jsxs(b.Fragment,{children:[b.jsx(hk,{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(bQ,{dictionary:y,onClickDictionaryList:m,isDarkMode:r,mode:["local","remote"]})})}),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:y.title?y.title:y.key}),b.jsx(gt,{variant:"hoverable",color:"text",size:"icon-md",IconRight:j1,label:o.label.value,onClick:()=>u(!0)})]}),b.jsx(F9,{dictionary:y,locale:e,mode:["local","remote"]})]}):b.jsx(b.Fragment,{children:"No dictionary focused"})},CQ=({locale:e,dictionaryKey:t,isDarkMode:n})=>{const{backButtonText:r}=rn(WD),a=Ib(t),{focusedContent:o,close:l}=YD(t),{openDictionaryListDrawer:u}=im(f=>({openDictionaryListDrawer:()=>f.open(zv)})),d=()=>{l(),u()};return b.jsx(qD,{identifier:a,backButton:{onBack:d,text:r.value},onClose:l,children:o&&b.jsx(TQ,{focusedContent:o,locale:e,identifier:a,handleOnBack:d,isDarkMode:n})})},RQ=({locale:e,isDarkMode:t})=>{const{focusedContent:n}=Ea(),r=n==null?void 0:n.dictionaryKey;return r?b.jsx(CQ,{locale:e,dictionaryKey:r,isDarkMode:t}):b.jsx(b.Fragment,{})},NQ=()=>{const{all:e}=KD(),t=E.useMemo(()=>Object.keys(e),[e]),{close:n,open:r}=im(),{editedContent:a}=wn(),{setFocusedContent:o}=Ea(),l=d=>{n(zv);const{filePath:f}=e[d];o({dictionaryKey:d,dictionaryPath:f}),r(Ib(d))},u=E.useCallback(d=>Object.keys(a??{}).includes(d),[a]);return b.jsx(qD,{title:"Dictionary list",identifier:zv,children:t.map(d=>b.jsx("div",{children:b.jsx(gt,{label:`Open dictionary editor ${d}`,onClick:()=>l(d),variant:"hoverable",color:"text",IconRight:jf,size:"md",isFullWidth:!0,children:u(d)?`✎ ${d}`:d})},d))})},OQ=({children:e})=>{const[t]=As(hr.INTLAYER_CURRENT_LOCALE,void 0,{receive:!0,emit:!1});return b.jsxs("div",{className:"bg-card relative size-full p-3",children:[e,b.jsx(RQ,{locale:t}),b.jsx(NQ,{})]})},kQ=()=>{const[e,t]=E.useState();return E.useEffect(()=>{fetch("/api/config").then(n=>n.json()).then(n=>t(n.data))},[]),e},DQ=({children:e,iframeRef:t})=>{const n=kQ(),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(Tj,{postMessage:o=>{var l,u;window==null||window.postMessage(o,a),(u=(l=t.current)==null?void 0:l.contentWindow)==null||u.postMessage(o,r)},allowedOrigins:[r,a],mode:"editor",configuration:n,children:e}):b.jsx(jo,{})},IQ=()=>{const{editedContent:e,setEditedContentState:t}=wn(),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},LQ=(...e)=>K1(Ch(e)),MQ={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:"查看如何配置编辑器"})}}},jQ=()=>{const{title:e,description:t,documentationLink:n}=rn(MQ);return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsx(pb,{className:"mb-8",children:e}),b.jsx("strong",{className:"text-neutral block",children:t}),b.jsx(gb,{label:n.label.value,href:"https://intlayer.org/doc/concept/configuration#editor-configuration",color:"text",children:n.text})]})},PQ=({iframeRef:e,applicationPath:t})=>{const{editor:n}=Zr(),r=()=>a(n.enabled),a=xj();l1(r),IQ(),Rj();const[o,l]=E.useState(!1),[u]=Cj(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(jo,{isLoading:o}),b.jsx("iframe",{src:`${n.applicationURL}${t}`,title:"Intlayer Application",className:LQ("size-full",o&&"hidden"),ref:e,onLoad:()=>{l(!1),r()}})]}):b.jsx("div",{className:"flex size-full items-center justify-center",children:b.jsx(Jr,{className:"flex max-w-xl flex-col gap-4 p-6",children:b.jsx(jQ,{})})})},VQ=()=>{const e=E.useRef(null),t=Sa();return b.jsx(DQ,{iframeRef:e,children:b.jsx(Ij,{disableEditor:!0,children:b.jsx(OQ,{children:b.jsx(PQ,{iframeRef:e,applicationPath:t.pathname})})})})},BQ=()=>b.jsx(wQ,{children:b.jsx(AQ,{children:b.jsx(VQ,{})})});SM.createRoot(document.getElementById("root")).render(b.jsx(E.StrictMode,{children:b.jsx(BQ,{})}));
|